Batch Table Sales Column

Hi All -
Does the sales column of the batch table include the final bottom line
sale without tax but includes coupons/gift certificates? If a
customer uses a coupon (tender type) of $10 off on a $30 sale will the
sales field equal $30 or $20? Does sales represent the before the
discount total or the total including the discount?
I run the following query:
select (closingtime),sum(customercount), sum(salesplustax),sum(sales),
sum(sales)/sum(customercount)
from batch
where closingtime between '2007-01-1' and '2007-12-31'
and customercount 0
group by (closingtime)
The daily sales don't match the sales figures using the Shirt + F6
function from POS.
Date SQL Query POS Shift F6
2007-06-14 1162.9500 1055.12
2007-06-15 1848.4300 1771.85
2007-06-16 565.11 513.75
Thanks
Jerry
Reply to
Jerry
The Sales field in the batch table is pre-tax. Tender type has no bearing on the Sales column. In your example, you would get $30 in the sales field.
The Returns field needs to be taken into consideration, because Sales does NOT include returns. So to get total pre-tax sales in the true sense, you need Sales+Returns (returns are negative in the Returns field).
select (closingtime),sum(customercount), sum(salesplustax)+sum(returns),sum(sales)+sum(returns), (sum(sales)+sum(Returns))/sum(customercount) from batch where closingtime between '2007-01-1' and '2008-01-01' and customercount 0 group by (closingtime)
Now note one more thing. I changed your end date. 2007-12-31 would be translated into midnight on that date (the beginning of the day) and you would be excluding batches on that day.
Reply to
Jason
On Jun 21, 6:03 am, "Jason" wrote:
I see what you mean. Try to figure out how to get it to factor in the coupons (- value) in the total?
Reply to
Jerry
On Jun 21, 6:03 am, "Jason" wrote:
I see what you mean. Try to figure out how to get it to factor in the coupons (- value) in the total?
Reply to
CptSoft

Site Timeline Threads

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.