Another question:
Quick workflow description:
Customers open a ticket, registered on their name. Now most of them pay their ticket as they leave, but it happens som1 comes back to pay next day. So I made a button to move the entire ticket to pre-order, so I can close the workperiod.
Now, in the end of day report, it all shows up, included the unpaid ticket.
How can I calculate account totals so it won’t add open/unpaid tickets to the results?
[VERKOOP 21%:2,1, 1]
{ACCOUNT TRANSACTION DETAILS:Sales Hoog}
>Sales Hoog||€ [=F(TN('{ACCOUNT CREDIT TOTAL:Sales Hoog}'),(TS Status=Paid),'#,#0.00')]
>BTW Hoog||€ [=F(TN('{ACCOUNT CREDIT TOTAL:BTW Hoog}'),(TS Status=Paid),'#,#0.00')]
[VERKOOP 6%:2,1, 1]
{ACCOUNT TRANSACTION DETAILS:Sales Laag}
>Sales Laag||€ [=F(TN('{ACCOUNT CREDIT TOTAL:Sales Laag}'),(TS Status=Paid),'#,#0.00')]
>BTW Laag||€ [=F(TN('{ACCOUNT CREDIT TOTAL:BTW Laag}'),(TS Status=Paid),'#,#0.00')]
[Orders:1, 1]
{REPORT TICKET TYPES:TotalAmount >= 0}
[Refunds:1, 1]
{REPORT TICKET TYPES:TotalAmount < 0}
[Payments:2, 1, 2]
{REPORT PAYMENT DETAILS:P.Name,P.Amount.Percent,P.Amount.Sum:Payment.Amount > 0}
>Totaal|{REPORT PAYMENT DETAILS:P.Amount.Sum:Payment.Amount > 0}
[Refund Payments:2, 1, 2]
{REPORT REFUND PAYMENTS}
[Ticket Details:2, 1, 2]
>>Ticket Counts
@!{TICKET TYPE LIST}
$1|{REPORT TICKET COUNT:(TY=$1)}|{REPORT TICKET TOTAL:(TY=$1)}
Total|{REPORT TICKET COUNT}|{REPORT TICKET TOTAL}
Amount per Ticket||[=F(TN('{REPORT TICKET TOTAL}')/TN('{REPORT TICKET COUNT}'))]
>>Order Counts
@!{TICKET TYPE LIST}
$1|{REPORT ORDER COUNT:(TY=$1)}|{REPORT ORDER TOTAL:(TY=$1)}
Total|{REPORT ORDER COUNT: }|{REPORT ORDER TOTAL: }
Orders per Ticket||[=F(TN('{REPORT ORDER COUNT: }')/TN('{REPORT TICKET COUNT: }'))]
Amount per Order||[=F(TN('{REPORT ORDER TOTAL: }')/TN('{REPORT ORDER COUNT: }'))]
>>Ticket Counts per State
{REPORT TICKET STATES}
>>Order Counts per State
{REPORT ORDER STATES}
[Ticket Tags:1, 1, 1]
{REPORT TICKET TAGS}
[Payment Details:2, 1, 2]
@{TICKET TYPE LIST}
@{TAX TYPE LIST}
>$1
{REPORT PAYMENT DETAILS:P.Name,P.Amount.Percent,P.Amount.Sum:(TY=$1)}
{REPORT CALCULATION DETAILS:C.Name,C.X,C.CalculationAmount.Sum:(TY=$1)}
$2||{REPORT TICKET DETAILS:TX.$2.Sum:(TY=$1)}
[User Sales:1, 1]
{REPORT ORDER DETAILS:O.User,O.ExactTotal.Sum}
@{REPORT PAYMENT DETAILS:P.User,P.Amount.Sum::{0}:,}
[Settled by $1:1, 1, 1]
{REPORT PAYMENT DETAILS:P.Name,P.Amount.Percent,P.Amount.Sum:(PU=$1)}
>Total Income|{REPORT PAYMENT DETAILS:P.Amount.Sum:(PU=$1)}
[Item Sales:2, 1, 2]
{REPORT ORDER DETAILS:O.ItemGroup,O.ExactTotal.Percent,O.ExactTotal.Sum:(ODI=True)}
Total||{REPORT ORDER DETAILS:O.ExactTotal.Sum:(ODI=True)}
For some reason TS Status=Paid is not in the right place, or not working with account statement…
[VERKOOP 21%:2,1, 1]
{ACCOUNT TRANSACTION DETAILS:Sales Hoog}
>Sales Hoog||€ [=F(TN('{ACCOUNT CREDIT TOTAL:Sales Hoog}'),(TS Status=Paid),'#,#0.00')]
>BTW Hoog||€ [=F(TN('{ACCOUNT CREDIT TOTAL:BTW Hoog}'),(TS Status=Paid),'#,#0.00')]
[VERKOOP 6%:2,1, 1]
{ACCOUNT TRANSACTION DETAILS:Sales Laag}
>Sales Laag||€ [=F(TN('{ACCOUNT CREDIT TOTAL:Sales Laag}'),(TS Status=Paid),'#,#0.00')]
>BTW Laag||€ [=F(TN('{ACCOUNT CREDIT TOTAL:BTW Laag}'),(TS Status=Paid),'#,#0.00')]
Tnx