I love SambaPOS and recently purchased a v5 license. I am having some trouble with logic in reports (customized), is there a tutorial that explains syntax with math operations?
Essentially what I want to do is the following:
-Grab the total number of item sales except for in 2 categories, so let’s say the total item sale is 150
-Variable: Op Cost = (item sales) * 1.51 (ex: 226.5)
-Variable: Food Cost = (total cash sales) * 0.35 = (ex: 138)
Now I want to take the total cash sales and deduct op cost and food cost to give me an amount my closer should have left to set aside.
I just can’t seem to figure out how! Any help would be awesome.
I do not yet, that is where I am stuck, not sure how to make that happen. I am familiar with variables and expressions in bash for example but the same logic doesn’t seem to apply.
You can use =2+2 in fields section of query. Expression part (eg odi = true) is used to filter results so 2+2 should not be used there. Also adding .sum to a field converts query to a group by and 2+2 won’t processed correctly as it does not have a meaning in the context of group by. Use it as it shown here and it will work fine.
Thank you. My ultimate goal is simply to modify the resulting number (85 in this case) of the Report Order Details Quantity. But I only want to include certain categories, is this possible? Also using the above login I try this but it yields no output:
{REPORT ORDER DETAILS:O.Quantity,=*1.51:(ODI=True)}
No, doesn’t look right to me, please explain what your trying to do again?
What’s X1.51 achieving?
Each comma splits the fields into columns, so your seccond column is =*1.51???
Get the total number of items sold in the following Category Groups: Food, Coffee then multiple that by 1.51
(This calculates my daily cost of operation to reserve in cash)
Then I also want to get the total cash sales for these category groups: Food, Coffee, Alcohol, Drinks and then get 30% of that number (this is my food cost to put aside for daily purchases).