# Sales Report monthly

**URL:** <https://forum.sambapos.com/t/sales-report-monthly/7344>\
**Category:** V5 Question\
**Created:** [September 28, 2015, 6:52pm UTC](https://forum.sambapos.com/t/sales-report-monthly/7344 "2015-09-28T18:52:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johan\_yo](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@Johan\_yo](https://forum.sambapos.com/u/Johan_yo)\
**Post date:** [September 28, 2015, 6:52pm UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/1 "2015-09-28T18:52:05Z")

</div>

Continuing the discussion from [Day by Day Sales Report](http://forum.sambapos.com/t/day-by-day-sales-report/2603):

> [@Day by Day Sales Report](https://forum.sambapos.com/t/day-by-day-sales-report/2603/1):
>
> I usually like to compare day sales between weeks or even months, lets say second saturday of every month… or all saturdays in a month…
> 
> that why I use this report… hope this is usefull!!!
> 
> Report:
> 
> ```
> [Ventas Dia a Dia:2,1, 1, 1, 1, 1]
> >Fecha|Dia|Neto|Taxa|Desc|Total
> @@VentasDiarias
> >TOTAL||@@TotalVentasDiarias
> 
> ```

How to make detail sales day by day report with contain payment:  
[Sales 1,1,1,1,1,1,1]

> Day|Netto|Tax|Discount|PaymentCash|PaymentCC|Total

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [September 28, 2015, 8:18pm UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/2 "2015-09-28T20:18:28Z")

</div>

I am confused… if your continuing that discussion then are you wanting a report similar to that? Or are you wanting something different?

EDIT: Nevermind I think I understand… your wanting a report like that but you want to include what type of payment?

In the future it might be better to explain in more detail what you want the report to show. For us to understand your request we have to first look at the referenced post and then build that report to see exactly what is in it and then look at what your requesting and try to decipher what your wanting…

If you just explain what you want in the report it would be easier to get you an answer. You might get better faster response from community.

Take a look at the Work Periods report it shows idea of Report Tags you can use.

For example:

```auto
[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}

```

Here is a great resource as well.

[http://www.sambapos.com/wiki/doku.php?id=custom\_reporting\_tags](http://www.sambapos.com/wiki/doku.php?id=custom_reporting_tags)

---

<div class="post-metadata">

**Author:** ![Johan\_yo](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@Johan\_yo](https://forum.sambapos.com/u/Johan_yo)\
**Post date:** [September 29, 2015, 5:18am UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/3 "2015-09-29T05:18:24Z")

</div>

Sorry,  
I want report total sales each day include each payment type

```auto
Day | Ticket Sales | Discount | Round | Tax | Total | Cash | Credit     
 --------- | ------------ | ----------- | ------ | --------- | ---------- | ---------- | -----------
27/09/2015 | 353,000.00 | (12,700.00) | 670.00 | 34,040.00 | 375,000.00 | 269,000.00 | 105,000.00         

```

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [September 29, 2015, 1:00pm UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/4 "2015-09-29T13:00:29Z")

</div>

Ok that is much more clear. Let me prepare you a sample.

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [September 29, 2015, 1:43pm UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/5 "2015-09-29T13:43:44Z")

</div>

Report size was set to 700

```auto
[Sales:1, 1.2, 1, 1, 1, 1, 1, 1]

>Day|Ticket Sales|Discount|Round|Tax|Total|Cash|Credit

{REPORT TICKET DETAILS:T.Date,([T.TotalAmount]-[CA.Discount]-[T.Tax]-[CA.Round]).sum,CA.Discount.sum,CA.Round.sum,T.Tax.sum,T.TotalAmount.sum,PA.Cash.sum,PA.Credit Card.sum:(TS.Status=Paid)}

>Total |{REPORT TICKET DETAILS:([T.TotalAmount]-[CA.Discount]-[T.Tax]-[CA.Round]).sum,CA.Discount.sum,CA.Round.sum,T.Tax.sum,T.TotalAmount.sum,PA.Cash.sum,PA.Credit Card.sum:(TS.Status=Paid)}

```

 ![](https://forum.sambapos.com/uploads/default/original/2X/0/0ce75976885835c8f4a94847e7b545f67ed8ae0e.png)

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [September 29, 2015, 2:19pm UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/6 "2015-09-29T14:19:33Z")

</div>

Thank you very much. Works great.

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [September 29, 2015, 2:24pm UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/7 "2015-09-29T14:24:02Z")

</div>

I know it should be understood but some people with version 4 reads these threads and its my experience with reports a lot of people with version 4 try these. This is only possible in version 5 it will not work in version 4 there is slight change in how its calculating the sum. I just wanted to make that clear so if someone tries this report in version 4 Custom Reports module.

Once version 5 slips into majority of systems I wouldn’t have made that statement but for now I feel it should be clarified to prevent someone frustration.

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [September 29, 2015, 2:35pm UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/8 "2015-09-29T14:35:33Z")

</div>

For answers to `V5 Question` topics we can assume it will work with V5. Answers to `Version 4` topics will work for both V4 and V5.

---

<div class="post-metadata">

**Author:** ![Johan\_yo](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@Johan\_yo](https://forum.sambapos.com/u/Johan_yo)\
**Post date:** [September 30, 2015, 4:25pm UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/9 "2015-09-30T16:25:07Z")

</div>

Thank You 😀

---

<div class="post-metadata">

**Author:** ![markjw](https://forum.sambapos.com/user_avatar/forum.sambapos.com/markjw/32/9942_2.png) [@markjw](https://forum.sambapos.com/u/markjw)\
**Post date:** [October 12, 2015, 5:47am UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/10 "2015-10-12T05:47:05Z")

</div>

Is there a way I can make this report to be grouped by word period instead of day?

So for example, if I set the range for all October 2015, instead of getting grouped by each day, I would get grouped for each work period, as work periods usually span over 2 dates, e.g.

01 Oct 12:30 - 02 Oct 02:45  
02 Oct 12:28 - 03 Oct 01:19  
etc

---

<div class="post-metadata">

**Author:** ![Johan\_yo](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@Johan\_yo](https://forum.sambapos.com/u/Johan_yo)\
**Post date:** [October 12, 2015, 6:08am UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/11 "2015-10-12T06:08:29Z")

</div>

Yes Change this Date filter  
 ![](https://forum.sambapos.com/uploads/default/original/2X/6/688a067e17ac71add0beb8178cde9672477926cf.png)

---

<div class="post-metadata">

**Author:** ![markjw](https://forum.sambapos.com/user_avatar/forum.sambapos.com/markjw/32/9942_2.png) [@markjw](https://forum.sambapos.com/u/markjw)\
**Post date:** [October 12, 2015, 6:30am UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/12 "2015-10-12T06:30:48Z")

</div>

No that’s not what I mean.

In the sales report, it is grouped by day, so like

01 Oct  
02 Oct  
etc

But in this case (which is common for many businesses who are open past midnight), a work period spans 2 days, like my example above.

So I want a report for a whole month, but instead of the grouping by days, I want grouping by work period.

For what you say, it is only good for one work period. But I want the monthly report showing the total for each work period.

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [October 12, 2015, 12:37pm UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/13 "2015-10-12T12:37:23Z")

</div>

Which sales report? Show the report syntax.

---

<div class="post-metadata">

**Author:** ![markjw](https://forum.sambapos.com/user_avatar/forum.sambapos.com/markjw/32/9942_2.png) [@markjw](https://forum.sambapos.com/u/markjw)\
**Post date:** [October 12, 2015, 6:18pm UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/14 "2015-10-12T18:18:55Z")

</div>

The report you posted above

> [@Sales Report monthly](http://forum.sambapos.com/t/sales-report-monthly/7344/5):
>
> Report size was set to 700 [Sales:1, 1.2, 1, 1, 1, 1, 1, 1] \>Day|Ticket Sales|Discount|Round|Tax|Total|Cash|Credit {REPORT TICKET DETAILS:T.Date,([T.TotalAmount]-[CA.Discount]-[T.Tax]-[CA.Round]).sum,CA.Discount.sum,CA.Round.sum,T.Tax.sum,T.TotalAmount.sum,PA.Cash.sum,PA.Credit Card.sum:(TS.Status=Paid)} \>Total |{REPORT TICKET DETAILS:([T.TotalAmount]-[CA.Discount]-[T.Tax]-[CA.Round]).sum,CA.Discount.sum,CA.Round.sum,T.Tax.sum,T.TotalAmount.sum,PA.Cash.sum,PA.Credit Card.sum:(TS.Status=Paid)…

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [October 12, 2015, 6:23pm UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/15 "2015-10-12T18:23:59Z")

</div>

Blah got your conversation mixed up witha nother one.

One moment ill try to explain.

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [October 12, 2015, 6:46pm UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/16 "2015-10-12T18:46:58Z")

</div>

You probably need to do the report in SQL. There is not currently an expression to filter it by Work Period. Maybe @emre can shed some light on that.

To take Date out of it you simply remove T.Date and it shows a total for that selected work period. But if you select an entire month it will show totals for that entire month.

---

<div class="post-metadata">

**Author:** ![markjw](https://forum.sambapos.com/user_avatar/forum.sambapos.com/markjw/32/9942_2.png) [@markjw](https://forum.sambapos.com/u/markjw)\
**Post date:** [October 12, 2015, 7:13pm UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/17 "2015-10-12T19:13:01Z")

</div>

Yeah I already created the one based on your example, as well as a data export to CSV of the same. But my client said it isn’t use to him because his work periods span over 2 days so the figures don’t match up what he needs.

I will take a look at doing in SQL. Thanks. 😄

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [October 12, 2015, 11:34pm UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/18 "2015-10-12T23:34:16Z")

</div>

I remember @QMcKay once requested storing work period ids with tickets. I can do it in next release. (or at most the other release)

---

<div class="post-metadata">

**Author:** ![markjw](https://forum.sambapos.com/user_avatar/forum.sambapos.com/markjw/32/9942_2.png) [@markjw](https://forum.sambapos.com/u/markjw)\
**Post date:** [October 13, 2015, 3:49am UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/19 "2015-10-13T03:49:58Z")

</div>

So then we would be able to group by work period ID in a similar report instead of date?

How would the best way to get the work period dates from the work period ID ?

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [October 13, 2015, 4:13am UTC](https://forum.sambapos.com/t/sales-report-monthly/7344/20 "2015-10-13T04:13:13Z")

</div>

Oh OK I thought that would simplify it for SQL reporting. For custom reports I can just include work period ranges without need for ID or something.

[Next page](https://forum.sambapos.com/t/sales-report-monthly/7344.md?page=2)
