Hello
I have 3 Departments,It is posssible to create a Work Period repport only for 2 Departments? I need work Period Report for 2 Departments together and the other one separatly.
Thanks
Hello
I have 3 Departments,It is posssible to create a Work Period repport only for 2 Departments? I need work Period Report for 2 Departments together and the other one separatly.
Thanks
Yes look here this gives you everything you need. https://sambapos.com/wiki/doku.php/custom_reporting
This Repport shows me Work Period Repport. In wich Section can I remove or add Departments
Thanks for your Precious Help.
[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}
If you read the link I gave you it explains how to use custom reports.
Have a nice day
Reading is easy, but doing is something else
we are not IT educated people, only because of this reason we need your help.
I need this report really very urgently, your help will be highly appreciated if you can add an option
to create same report for Departments.This one gives all sales, without regarding any departments.
Need to make separatly ! For exemple only for âRestaurantâ Department.
Thank you very very much in Advance.
[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}
You donât have to be IT educated to learn how to use a feature. That documentation tells you how to use the custom reports feature. It would also benefit you to learn how to use it.
Everyone needs stuff urgently. In the future if you really need configuration help and you need it fast and just want someone to do it for you a reseller can help you configure it for a fee.
According to the documentation Try adding (DE=Restaurant) where Restaurant would be your department. That goes on end of your report tag.
Example
{REPORT ORDER DETAILS:O.User,O.ExactTotal.Sum:(DE=Restaurant OR DE=Patio)}
That would list for Restaurant and Patio departments.
Thank you for reply
I think I put this line in wrong place. It is coming always the same, all departments.
i would like to ask you once again correct place for this line
{REPORT ORDER DETAILS:O.User,O.ExactTotal.Sum:(DE=Restaurant OR DE=Patio)}
I donât see that you put it anywhere. Please read the tutorial I gave you. Itâs obvious your not wanting to learn and just want us to do it for you.
You are wrong, If i can, i do surely without asking you.
You will need to put it many places, in almost every Report Tag. This is a âfilterâ or a âconstraintâ that you can add to Report Tags that support the DE filter:
(DE=Restaurant)
For example, this screenshot shows the filter in 7 places - you will need to put more of these in, basically anywhere you use a {REPORT TAG:<fields>:(filter)}
âŠ
Here is the code for the 7 filters (the last 3 sections of the Report):
[Payment Details:2, 1, 2]
@{TICKET TYPE LIST}
@{TAX TYPE LIST}
|$1|{REPORT PAYMENT DETAILS:P.Amount.Sum:(TY=$1) and (DE=Restaurant)}
{REPORT PAYMENT DETAILS:P.Name,P.Amount.Percent,P.Amount.Sum:(TY=$1) and (DE=Restaurant)}
{REPORT CALCULATION DETAILS:C.Name,C.X,C.CalculationAmount.Sum:(TY=$1) and (DE=Restaurant)}
$2||{REPORT TICKET DETAILS:TX.$2.Sum:(TY=$1) and (DE=Restaurant)}
[User Sales:1,1, 1]
{REPORT ORDER DETAILS:O.User,'',O.ExactTotal.Sum:(DE=Restaurant)}
[Item Sales by Amount:2, 1, 2]
{REPORT ORDER DETAILS:O.ItemGroup,O.ExactTotal.Percent,O.ExactTotal.Sum:(DE=Restaurant)}
Total||{REPORT ORDER DETAILS:O.ExactTotal.Sum:(DE=Restaurant)}
Mr. QMcKay
Thank you very much for your appeciable Help.
I put DE Filter where you showed me, at the end of the report, tax section is not correctly calculated. And it shows me all sales, not only Restaurant.
With (DE=Restaurant)}
Without (DE=Restaurant)}
Some tags the expression wonât work. Most of that is explained in the wiki. I am fairly sure the tax portion of wp report is not compatible but the wiki Iâm fairly sure gives some methods to do what you need.
Work period report contains some tags that are not custom report tags they were instead hard coded to do a specific job.
I highly recommend you trying some simple examples in the wiki and get a good understanding of how the reports feature works. Once you do that there will not be a report you canât build.
{REPORT PAYMENT DETAILS:X}
I can say for sure that Payment Details works properly, and reports Tax correctly.
Look at this:
[Payment Details:2, 1, 2]
@{TICKET TYPE LIST}
@{TAX TYPE LIST}
@{REPORT PAYMENT DETAILS:P.Department::,}
$3|$1|{REPORT PAYMENT DETAILS:P.Amount.Sum:(TY=$1) and (DE=$3)}
{REPORT PAYMENT DETAILS:P.Name,P.Amount.Percent,P.Amount.Sum:(TY=$1) and (DE=$3)}
{REPORT CALCULATION DETAILS:C.Name,C.X,C.CalculationAmount.Sum:(TY=$1) and (DE=$3)}
$3|$2|{REPORT TICKET DETAILS:TX.$2.Sum;0.00:(TY=$1) and (DE=$3)}
Get list of Ticket Types and put into variable $1
@{TICKET TYPE LIST}
Get list of Tax Templates and put into variable $2
@{TAX TYPE LIST}
Get list of Departments and put into variable $3
@{REPORT PAYMENT DETAILS:P.Department::,}
In the current Workperiod, there have been a few sales using Restaurant department, and 1 sale using BAR department. My Tax Templates are called T1 and T2. I have some other Ticket Types besides Ticket, which are Ticket2 and Staff Ticket. No sales have occurred using those last 2 Ticket Types, so they show no values.
Restaurant is in blue, and BAR is in red âŠ
Here is the Payments âSummaryâ section (this section is before the Payment Details section):
[Payments:2, 1, 2]
@{TICKET TYPE LIST}
@{TAX TYPE LIST}
@{REPORT PAYMENT DETAILS:P.Department::,}
>>$3
{REPORT PAYMENT DETAILS:P.Name,P.Amount.Percent,P.Amount.Sum:(DE=$3) && Payment.Amount>0}
>Total||{REPORT PAYMENT DETAILS:P.Amount.Sum:Payment.Amount > 0 && (DE=$3)}
{REPORT TICKET DETAILS:X}
I modified everything up until just before the âTicket Counts per Stateâ:
[Ticket Details:2, 1, 2]
>Type|Count|Amount
@{TICKET TYPE LIST}
@{TAX TYPE LIST}
@{REPORT TICKET DETAILS:T.Department::,}
$3 - $1|{REPORT TICKET COUNT:(TY=$1) && (DE=$3)}|{REPORT TICKET TOTAL:(TY=$1) && (DE=$3)}
>$3 - Total|{REPORT TICKET COUNT:(DE=$3)}|{REPORT TICKET TOTAL:(DE=$3)}
>GRAND Total|{REPORT TICKET COUNT}|{REPORT TICKET TOTAL}
Amount per Ticket||[=F(TN('{REPORT TICKET TOTAL}')/TN('{REPORT TICKET COUNT}'))]
>>Order Counts||
>Type|Count|Amount
@{TICKET TYPE LIST}
@{TAX TYPE LIST}
@{REPORT TICKET DETAILS:T.Department::,}
$3 - $1|{REPORT ORDER COUNT:(TY=$1) && (DE=$3)}|{REPORT ORDER TOTAL:(TY=$1) && (DE=$3)}
>Total|{REPORT ORDER COUNT: }|{REPORT ORDER TOTAL: }
@{TICKET TYPE LIST}
@{TAX TYPE LIST}
@{REPORT TICKET DETAILS:T.Department::,}
$3 - Orders per Ticket||[=F(TN('{REPORT ORDER COUNT:(DE=$3)}')/TN('{REPORT TICKET COUNT:(DE=$3)}'))]
$3 - Amount per Order||[=F(TN('{REPORT ORDER TOTAL:(DE=$3)}')/TN('{REPORT ORDER COUNT:(DE=$3)}'))]
>Total Orders per Ticket||[=F(TN('{REPORT ORDER COUNT: }')/TN('{REPORT TICKET COUNT: }'))]
>Total Amount per Order||[=F(TN('{REPORT ORDER TOTAL: }')/TN('{REPORT ORDER COUNT: }'))]
>>Ticket Counts per State||
>Type|Count|Amount
{REPORT TICKET STATES}
>>Order Counts per State||
>Type|Count|Amount
{REPORT ORDER STATES}
As Kendash mentions, there are Report Tags that are âhard-codedâ and do not accept much in the way of filters, so if you want more âgranularâ control over your details, you canât use the following tags, and must use a different tag, like one of the DETAILS tags.
Examples of âhard-codedâ tags that do not accept filters, or the filters are very specific for the tag:
{REPORT TICKET TYPES}
{REPORT REFUND PAYMENTS}
{REPORT TICKET STATES}
{REPORT ORDER STATES}
The default Workperiod Report does a SALES section by using simply {REPORT TICKET TYPES}
.
[Sales:1, 1, 1]
{REPORT TICKET TYPES:!PreOrder && TotalAmount >= 0}
Since that tag does not accept filters like (DE=Restaurant)
, and it doesnât even let you pick the Fields that you might want either, we need to get our Sales report in another way if we want to split it by Department and/or Ticket Type. Here is an ideaâŠ
[Sales by Department:3, 1, 2]
@{TICKET TYPE LIST}
@{TAX TYPE LIST}
@{REPORT TICKET DETAILS:T.Department::,}
>>$3|Count|Amount
$1|{REPORT TICKET COUNT:(TY=$1) && (DE=$3)}|{REPORT TICKET TOTAL:(TY=$1) && (DE=$3)}
>Tax OUT TTL||[=F(TN('{REPORT TICKET TOTAL:(DE=$3)}') - TN('{REPORT TICKET DETAILS:TX.T1.sum:(DE=$3)}') - TN('{REPORT TICKET DETAILS:TX.T2.sum:(DE=$3)}'))]
$2|-|{REPORT TICKET DETAILS:TX.$2.sum:(DE=$3)}
>Tax TTL||[=F(TN('{REPORT TICKET DETAILS:TX.T1.sum:(DE=$3)}') + TN('{REPORT TICKET DETAILS:TX.T2.sum:(DE=$3)}'))]
>TOTAL - $3|{REPORT TICKET COUNT:(DE=$3)}|{REPORT TICKET TOTAL:(DE=$3)}
>>GRAND Total|{REPORT TICKET COUNT}|{REPORT TICKET TOTAL}
You should notice there a couple hard-coded values in there, namely TX.T1.sum
and TX.T2.sum
which happen to be my Tax Template Names (T1 and T2). I could not find another way to get a âTax Totalâ or a âTax OUT Totalâ so that is why they are hard-coded. Change them to suit your system.
By this time, you should start to get the idea about how to make Reports for your own needs. Study the above posts and give them time to soak in and understand them.