Work Period Report Template

Apologies if its already been posted but I am just tinkering with custom reports module.
My first plan is to recreate and customize the work period report to our requirements.

As a reference/learning tool and to save some time can you post the template of the default work period report?

Also is it possible to edit the work period report?

It doesn’t exist. It is hard-coded in v4.

No, because it isn’t templated.

For V5, all default Reports have become Custom Reports, so they can be edited.


Here it is in V5… much of it won’t work for v4 because it uses Report Tags that are not available in v4, but maybe it at least shows some insight …

[Sales:1, 1]
{REPORT TICKET TYPES:!PreOrder && TotalAmount >= 0}

[Pre Orders:1, 1]
{REPORT TICKET TYPES:PreOrder && 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}
>Total|{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}

[Item Sales:2, 1, 2]
{REPORT ORDER DETAILS:O.ItemGroup,O.ExactTotal.Percent,O.ExactTotal.Sum}
Total||{REPORT ORDER DETAILS:O.ExactTotal.Sum}

Thanks, will see how it goes.

In trying to get my head round the report codes

I have started fresh period and put through selection of tickets - paid cash, paid card, submitted on table, refunded and a void.

Am tying to replicate the ‘Sales Total’ from the top of the work period report as an excersize.
I am unsure exactly how samba calcs the total current sales which as far as I can see should be anything which has been submitted but submitted seems to exclude refunded.
I have Just about managed to calculate the same vale via;
[=F (TN(’{REPORT ORDER TOTAL: (OS=Submitted)}’) - TN(’{REPORT ORDER TOTAL:(OS=Refund)}’))]
But am unsure is this would miss something on a proper days sales.

Any comments appreciated.

Something similar to this should work:

[=F(-1*(TN('{ACCOUNT TOTAL:Sales}')+TN('{ACCOUNT TOTAL:Sales T1}')+TN('{ACCOUNT TOTAL:Sales T2}')),'0.00')]

In basic form, we are summing 3 Accounts:

F(
-1 * (
{ACCOUNT TOTAL:Sales}
+
{ACCOUNT TOTAL:Sales T1}
+
{ACCOUNT TOTAL:Sales T2}
)
,'0.00')

I do it this way to include my main Sales Account (Sales), plus 2 Tax Rates, whose Account Names are Sales T1 and Sales T2.

Think I’m missing something somewhere, spent last two hours trying to grasp TAGS, FIELDS and EXPRESSIONS but not having much luck.
Have read back and forth the post;

Have got some to work but not others :-S
Order and payment reports seem to work but not ticket.
Cash|{REPORT PAYMENT TOTAL:(PT=Cash)}
Card|{REPORT PAYMENT TOTAL:(PT=Credit Card)}

No problem but ticket reports dont seem to be working for me.
Tried;
{REPORT TICKET TOTAL:(EN=Tables)}
{REPORT TICKET TOTAL:(EN.Tables)}
{REPORT TICKET TOTAL:EN.Tables}
{REPORT TICKET TOTAL:(EN=T01)}
{REPORT TICKET TOTAL:(EN.T01)}
{REPORT TICKET TOTAL:EN.T01}

Cant seem to work it out.
Get an error saying no property or field ‘EN’ exists in type ‘TicketData’

What am I missing?>!?
The post lists;
TICKET DETAILS
EN.

Can you try this?

{REPORT TICKET TOTAL:(TEN.Tables=T01)}

http://sambapos.com/wiki/doku.php?id=custom_reporting_tags#list_of_all_possible_expression_fields

1 Like

EN is for ticket details tags not ticket total.

1 Like

Hello,

I have this 2 reports:

[Sales:1,1]

Sales Report
Sales|P [=F(TN(‘{ACCOUNT CREDIT TOTAL:Sales}’),‘#,#0.00’)]
Service|P [=F(TN(‘{ACCOUNT CREDIT TOTAL:Service}’),‘#,#0.00’)]
Discounts|P [=F(TN(‘{ACCOUNT DEBIT TOTAL:Discount}’),‘#,#0.00’)]
Total|P [=F(TN(‘{ACCOUNT CREDIT TOTAL:Sales}’)+TN(‘{ACCOUNT CREDIT TOTAL:Service}’)-TN(‘{ACCOUNT DEBIT TOTAL:Discount}’),‘#,#0.00’)]

[Summary:1,1]

Income|
Cash|P [=F(TN(‘{ACCOUNT TRANSACTION TOTAL:Payment Transaction:Cash}’),‘#,#0.00’)]
Credit Card|P [=F(TN(‘{ACCOUNT TRANSACTION TOTAL:Payment Transaction:Credit Card}’),‘#,#0.00’)]
Customer Accounts|P [=F(TN(‘{ACCOUNT TOTAL:Customer Accounts}’),‘#,#0.00’)]
Total|P [=F(TN(‘{ACCOUNT TRANSACTION TOTAL:Payment Transaction:Payment Accounts}’)+TN(‘{ACCOUNT TOTAL:Customer Accounts}’),‘#,#0.00’)]

and I need to split the service into 2 (tips from credit card + tips from cash), because I have implemented the CC tips and a cash tips setup. I tried multiple setups, no luck.

Can you help me ? THX

images: