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.
Comment | File | Size | Author |
---|---|---|---|
#2 | storminvoice_rates.patch | 5.86 KB | Raphael Dürst |
storminvoice_rates.patch | 5.85 KB | Raphael Dürst | |
Comments
Comment #1
juliangb CreditAttribution: juliangb commentedThanks for the patch, marking for review.
Comment #2
Raphael Dürst CreditAttribution: Raphael Dürst commentedFound another bugfix while testing.
I uploaded the whole patch again.
Comment #3
willwh CreditAttribution: willwh commentedI 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.
Comment #4
juliangb CreditAttribution: juliangb commentedRead through, seems sensible, and has been reviewed by @willwh.
Marking #2 to be committed.
Comment #5
juliangb CreditAttribution: juliangb commentedPushed into 6.x-2.x and 7.x-1.x.
Thanks!