I am working on a project and I'm using storminvoice for invoicing several tasks of a project.

But when I have a task with pricemode daily, a price of 800, a duration of 4 and the durationunit day, I get the wrong amount. In this case I expect an amount of 800*4 = 3200, but instead I get 800/8*4 = 400, because it ignores the durationunit.

I don't know if it's actually intended to ignore the durationunit, but for my case the unit is important.

When I made a patch, I also saw that the hours per day to calculate the daily rate are hardcoded. So I made a setting for this.

With my patch, when calculating the rates, it checks if the durationunit is hour or day and calculates the rate accordingly.

#2 storminvoice_rates.patch5.86 KBRaphael Dürst
PASSED: [[SimpleTest]]: [MySQL] 2,614 pass(es). View
storminvoice_rates.patch5.85 KBRaphael Dürst
PASSED: [[SimpleTest]]: [MySQL] 2,614 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


juliangb’s picture

Version: 6.x-2.0 » 6.x-2.x-dev
Status: Patch (to be ported) » Needs review

Thanks for the patch, marking for review.

Raphael Dürst’s picture

5.86 KB
PASSED: [[SimpleTest]]: [MySQL] 2,614 pass(es). View

Found another bugfix while testing.

I uploaded the whole patch again.

willwh’s picture

I applied this and ran through testing some invoices in my 6x setup - I don't see any issues with this.

Juliangb - can you confirm there is no reason for ignoring the durationunit? If that's the case - I think this is good to go in 6.x-2.x.

juliangb’s picture

Status: Needs review » Reviewed & tested by the community

Read through, seems sensible, and has been reviewed by @willwh.

Marking #2 to be committed.

juliangb’s picture

Status: Reviewed & tested by the community » Fixed

Pushed into 6.x-2.x and 7.x-1.x.


Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.