Weekly report showing daily sales

Hi,

I have got a report which will show total sales for the past week (by entering dates or selecting past week). I need this to show the sales for each workperiod which is for each day. How can i go about doing this?

I would want it to show in the following format if possible:

Workperiod 1 | Cash 50.00 | Card £25.00 | Total £75.00
Workperiod 2 | Cash 30.00 | Card £35.00 | Total £65.00

this is my current template:

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

[Tickets:2, 1, 2]
>>Ticket Counts
@!{TICKET TYPE LIST}
$1|{REPORT TICKET TOTAL:(TY=$1)}
Total|{REPORT TICKET TOTAL}


[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)}

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

Are your work periods strictly within a day or do you open past mignight?

They are strictly within a day

OK, better way anyway, we have WP start and end dates in the WorkPeriods table in the DB.
Not tried but think you would want to use the {START} and {END} tags to query the db fr list of start and end dates.
Declaring these with @{REPORT SQL or seperatle @@SQL script then using $1 and $2 for report dates <>

To be able to group amounts on both columns and rows you need to use pivot type reporting features. I demonstrated a SQL based technique here.

1 Like

How it’s complicated. идн

Ok so I have not gone into any sql so wouldnt know how to get this done. Can someone have a look and see how you would get the daily sales with sql.

Thanks