Unit Price Calculation in MandalayCS
When a weighed transaction is created, the system will work out the chargeable price as weight x unit cost. The result will calculate to 2 decimal places and display as cents. The is reflected in the Web Based Reporting (WBR) ticket details view.
At times users will notice a slight variance to the calculated unit price during reporting/invoicing, this is because the system back calculates unit price. That is, the charged price divided by the quantity.
The system's behaviour is better understood by looking at the two scenarios:
Scenario 1: Rounding
Administration - Product Tab
Example a)
Mixed Waste at 0.11 net weight
When the transaction is created the system will work out the chargeable price as 0.11 x 220.40 which will calculate to $24.244 and because you have to round money values this equates to $24.24 . Now when we display the unit price we have to show the calculated price which will be $24.24 divided by the quantity which is 220.363636363636 so rounded this will be $220.37.
Example b)
Mixed Waste at 0.12 net weight
When the transaction is created the system will work out the chargeable price as 0.12 x 220.40 which will calculate to $26.448 and because you have to round money values this equates to $26.45 . Now when we display the unit price we have to show the calculated price which will be $26.45 divided by the quantity which is 220.4166666 so rounded this will be $220.42.
Scenario 2: Minimum Charge
Administration - Product Tab
Example a)
C&D Waste at 0.20 net weight
When the transaction is created the system will work out the chargeable price as 0.20 x 170.00 which will calculate to $34 and because there is a minimum charge it will default to $85. Now when we display the unit price we have to show the calculated price which will be $85 divided by the quantity which is $425.
Example b)
C&D Waste at 0.45 net weight
When the transaction is created the system will work out the chargeable price as 0.45 x 170.00 which will calculate to $76.50 and because there is a minimum charge it will default to $85. Now when we display the unit price we have to show the calculated price which will be $85 divided by the quantity which is $188.89.
Note: The Ticket Template can be adjusted to not display the calculated Unit Price on dockets.