|Anonymous | Login | Signup for a new account||2019-10-20 05:11 BST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000989||SiT!||billing||public||2009-10-21 18:47||2009-10-28 18:01|
|Target Version||Fixed in Version|
|Summary||0000989: Adjusting minutes for billable incidents produce strange effects|
|Description||Nearly fresh install of 3.50.|
Configured sites, contacts, contracts, services etc ... as usual.
Action I made:
Adjust time to a billable closed incident before approve it (ie 30 minutes)
Result I obtained:
Non-sense numbers in billing units 1x, 1.5x and 2x, and also in balance when re-run report to view Approvable incidents.
Made the same thing two times more on the same billable incidents. The browser slow down in obtaining the list of the approvable incidents.
Made adjusting time once again. Now the browser says:
Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/sit/lib/billing.inc.php on line 1300
when I try to run report for incident to approve.
|Tags||No tags attached.|
|Users sponsoring this issue|
Total Sponsorship = UK£ 20
2009-10-22 15:58: gdavidvlk (UK£ 20)
edited on: 2009-10-22 16:26
I investigated a little on this issue. The problem is in billing_update_incident_balance.php module.
When you insert a positive amount of minutes, the module multiplies this value by 60 and modifies Billable Units
If you insert a negative amount of minutes, the modules doesn't modify the billable unit and change the Credit.
I tried setting up as contract a unit rate =1 conversion (1 minute = 1 billable unit) and I can obtain the right Adjust calculations by inserting minutes/60 for negative adjusts, and minutes for positive adjusts.
I think the calulations in the I billing_update_incident_balance.php module should be reviewed ...
|Hi, thanks for the bug report. I've not had time to investigate this yet, but I hope to find time this weekend to do some work on SiT! and I plan to look at this one. If all goes well I'll be releasing a patched 3.50 before Monday.|
Maybe is useful notice also that the adjust is done with the actual multiplier (ie 1.5x), and not with the multiplier active when the issue was under working (ie 1x). This is a non-sense, I think ...
In our company shuold be useful to have and "absolute" adjusting tool. I mean a tool to set the absolute amount of money to bill for that issue (obviously preserving the trace of time spent by engeneers in working it).
The page where this adjustment is made is done on the billing page (billable_incidents.php) under the maintenance menu and selecting approve, here next to the incident you get two options approve and adjust. The page which does the adjustment is billing_update_incident_balance.php
I've just reproduces this, I had an incident where the bill as 1 unit a 1.5x so total units where 1.5 and a charge of £150, I then added on another 30minutes and ended up with
7 Units @ 1x
14 Units @ 1.5x
10 Units @ 2.0x
So a total of 31 Units and 48 billable units hence a bill of £4800
I suspect this issue is another part of a problem we came across a while ago, it seems we started of measuring time in hence in all the places where users interacted with the system they entered time in minutes so we had to multiply by 60 it seems somewhere along the way we've switched to storing time in minutes. Looking billing_update_incident_balance.php line 67 converts the time into seconds.
I belive r5951 of svn branch 3.x resolves this can you confirm?
As for the absolute editing tool I think this could be useful, it would be worth you raising a separate feature request for that
Still doesn't work in r5951 ... Positive adjust modifies miunutes (and then the billing) nearly correctly (with multiplier of the time the adjusting is made, and this is not so correct ...), but negative adjust modifies credit amount by a factor of 1/60.
Why is different the way you adjust for positive and negative? I mean in both case it should modify OR the time OR the billing (I prefer the billing so the effective working units are preserved...). Don't you agree?
Update. Maybe it helps:
I investigated browsing my database and I found correct values of "duration" field in both negative and positive adjust, stored in sit_updates table.
So, I suppose, the problem is NOT in billing_update_incident_balance.php, rather in how positive and negative update durations are calculated in billable_incidents.php
|2009-10-21 18:47||gdavidvlk||New Issue|
|2009-10-22 15:58||gdavidvlk||Sponsorship Added||gdavidvlk: UK£ 20|
|2009-10-22 15:58||gdavidvlk||Sponsorship Total||0 => 20|
|2009-10-22 16:25||gdavidvlk||Note Added: 0002115|
|2009-10-22 16:26||gdavidvlk||Note Edited: 0002115||View Revisions|
|2009-10-23 14:17||ivan||Note Added: 0002119|
|2009-10-23 14:17||ivan||Status||new => acknowledged|
|2009-10-23 15:07||gdavidvlk||Note Added: 0002121|
|2009-10-24 17:54||paulh||Note Added: 0002129|
|2009-10-24 18:30||paulh||Note Added: 0002132|
|2009-10-28 12:43||gdavidvlk||Note Added: 0002142|
|2009-10-28 18:01||gdavidvlk||Note Added: 0002144|
|Copyright © 2000 - 2019 MantisBT Team|