[Consumption:5,2,2, 3, 3]
Name|Unit|Bot|ml|Total ml
{REPORT CONSUMPTION DETAILS:C.Name,C.Unit,[C.Consumption.Sum],[([C.Consumption])-([C.Consumption]).Sum],[C.Consumption]*750:C.Consumption != 0:{0}|{1}|[=F(TN('{2}'),'0000.00').substr(5,2)*.750]|{3}|{4}}
What’s happening:
[=F(TN('{2}'),'0000.00') This will convert any number to 4 whole numbers, a period then 2 decimal places. For example a number of 5 will be converted to 0005.00.
.substr(5,2) This is used to select character(s). Starting at the first zero (counting from 0…not 1) we going to count until we get to the first decimal place. In this case it’s in the 5th position. Then we want to select 2 characters, starting on the first decimal number(the 5th position from the previous step) we are going to count 2 places (counting from 1…not 0 this time). We could also use substr(6,-2) and get the same results. This will select the 2 decimal places.
If you think you will have a consumption more than 9999, you will have to adjust the formats accordingly.
Edit
I had to adjust the report from my testing. My original report had .substr(3,1).
Actually, after thinking about this some more, you are going to want the whole number and decimal.
Lets say you have a 1.5 bottles of Arrack. Each bottle holds 750 ml. You are going to have a total of 1125 ml of Arrack (1.5 bottles * 750 ml = 1125 ml). The way you want to figure it, will show only 375 ml (.5 bottle * 750 ml = 375 ml). It will be off 750 ml (the ml’s of 1 bottle).
1 bottle * 750 ml = 750 ml
+ 0.5 bottle * 750 ml = 375 ml
----------------------------------------
1125 ml
So change the decimal places in your tn to 000.00000000 or whatever you need.
Normal practice is you set your inventory unit as the lowest common denominator.
One thing we have to understand, is that inventory numbers will almost always not match physical inventory exactly, when dealing with pourable liquids or measurable ingredients. If a POS system says inventory of 1.25, it would be reasonable to think that the physical inventory is 1 full bottle with another bottle that is somewhere in between 1/2 and almost empty. The failing point is not the POS system but rather us people.
The issue is rounding…You can try extending the decimals as JTRTech and Francisco_Lopez mentioned. You will have to also .substr accordingly.
Maybe another option would be figure out how many 50 ml serving you have???
This is what I mean about lowest common denominator as inventory unit.
Using ml as unit would make life allot easier, 50 won’t work with 375ml so either 25ml or 1ml base unit, I’d say 1ml as clean accross the board unit rather than say 25ml which fits in all sizes but less clear to work with.
As Bob says though, I’ve never seen a stock take calculate as accurate as single shot. Our stocktaker does 10th of a bottle as count unit for closing stock but even experianced stocktaker won’t get that 100% accurate meaning typical variance arround 2-4 shots on monthly stocktake is within acceptable margin of error.
Unless your weighing or decanting to measure your not going to be acurate to much under 50ml anyway with different shape bottles etc.
Ml unit keeps math and recipe simple.
If you work on bottle as you say a recipe for a shot is already 0.06666666667 which is odd way to work in my opinion.
Your setting decimal places after the calculation. If origional figues already rounded to 2 then your math isn’t going to just put back the rounding at the end.
BTW just keep saying its wrong isn’t very productive.
Decimal places may not even help if samba is only storing #.## in dB, likely need to adjust a setting somewhere to increase, posibly on windows regional settings.
Either way multiple times you have been told to change your base unit, id sugest doing that, lowest common denominator is common method and suggested many times on multiple threads.