Hello! Need help doing some calculations. (SAMBAPOS V5)
Any help and ideas are very much appreciated!!!
The code for the report im using is below and screenshots with more details of what i am trying to achieve
I need to calculate the current user total sales before the tips
i tried doing a calculation similar to [T.TotalAmount]-[CT.Tip]
and many other variations but still unable to get the result.
the value i am getting right now it (total sales + taxes + tips)
here is what i got so far but getting a blank
||||${REPORT PAYMENT TOTAL:[=TN(’{T.TotalAmount}’)-TN(’{CT.Tip}’)] AND (TU={SETTING:CURRENTUSER})}
but not quite working yet, not sure what code or expression to calculate the total of the curren user tickets and also not sure if the tips will be the correct total added tips for current user to substract.
But that wont work either as REPORT PAYMENT TOTAL is not a field type expression, you need a DETAQILS report expression, although saying that you wont as payment details probably doesnt see calculation expression
You need to get a list of users after a @
i.e. @report-tag which gives a list to loop through.
Then where that report used CURRENTUSER you use $1 which represents the list loop value
It would look something like
@{USERS LIST REPORT}
{REPORT XX DETAILS:XField, YField, etc etc:(TU=$1)}
Which will give you a table report for each user through the @ and $1.
**THATS OBVIOUSLY NOT THE REPORT NEEDED BEFORE YOU COPY AND PASTE IT