:

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
This is a multi-part message in MIME format.
------=_NextPart_000_0523_01C7B445.5E574830 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Jerry,
Why should a payment method have any factor with sales?
Don't you have coupons as a payment type?
--=20 Regards,
Jeff Hobbs Check Point Software
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D
When responding to posts, please "Reply to Group" via your newsreader so = that others may learn and benefit from your issue.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D
You must be using Outlook Express/Windows Mail/Windows Live = Mail/Thunderbird or some other type of newsgroup reader to see and = download the file attachment(s). If you are not using a reader, follow = the link below to setup the above programs. Click on "Open with = newsreader" under the MS Retail Management System on the right.
formatting link

On Jun 21, 6:03 am, "Jason" wrote:
bearing on
field.
Sales does
sense, you
be
you
line
the
sum(salesplustax),sum(sales),
I see what you mean. Try to figure out how to get it to factor in the coupons (- value) in the total?
------=_NextPart_000_0523_01C7B445.5E574830 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Jerry,   Why should a payment method have any factor with sales?   Don't you have coupons as a payment type? -- Regards,   Jeff HobbsCheck Point Software   =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D   When responding to posts, please "Reply to Group" via your = newsreader so=20 that others may learn and benefit from your issue.   =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D   You must be using Outlook Express/Windows Mail/Windows Live=20 Mail/Thunderbird or some other type of newsgroup reader to see and = download the=20 file attachment(s).  If you are not using a reader, follow the link = below=20 to setup the above programs.  Click on "Open with newsreader" under = the MS=20 Retail Management System on the right.  
formatting link
  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
in = message=20 news:= snipped-for-privacy@i38g2000prf.googlegroups.com...On=20 Jun 21, 6:03 am, "Jason" <microsoft.public....@= >=20 The Sales field in the batch table is pre-tax. Tender type has no = bearing=20 on> the Sales column. In your example, you would get $30 in the = sales=20 field.>> The Returns field needs to be taken into = consideration,=20 because Sales does> NOT include returns. So to get total = pre-tax sales=20 in the true sense, you> need Sales+Returns (returns are = negative in the=20 Returns field).>> select=20 (closingtime),sum(customercount),>=20 sum(salesplustax)+sum(returns),sum(sales)+sum(returns),>=20 (sum(sales)+sum(Returns))/sum(customercount)> from = batch> where=20 closingtime between '2007-01-1' and '2008-01-01'> and = customercount=20 <> 0> group by (closingtime)>> Now note one = more=20 thing. I changed your end date. 2007-12-31 would be> translated = into=20 midnight on that date (the beginning of the day) and you> would = be=20 in =
message>> news:11= snipped-for-privacy@e9g2000prf.googlegroups.com...>>>>=20 > Hi All ->> > Does the sales column of the batch = table=20 include the final bottom line> > sale without tax but = includes=20 coupons/gift certificates?  If a> > customer uses a = coupon=20 (tender type) of $10 off on a $30 sale will the> > sales = field equal=20 $30 or $20?  Does sales represent the before the> > = discount=20 total or the total including the discount?>> > I run = the=20 following query:> > select (closingtime),sum(customercount), =
sum(salesplustax),sum(sales),> >=20 sum(sales)/sum(customercount)> > from batch> > = where=20 closingtime between '2007-01-1' and '2007-12-31'> > and=20 customercount <> 0> > group by = (closingtime)>>=20 > The daily sales don't match the sales figures using the Shirt +=20 F6> > function from POS.>> >=20 = Date           &nb= sp;    =20 SQL Query         POS Shift = F6>=20 > 2007-06-14       1162.9500 = 1055.12>=20 > 2007-06-15       1848.4300 = 1771.85>=20 > 2007-06-16      =20 = 565.11           &= nbsp;  =20 513.75>> > Thanks> > Jerry- Hide quoted = text=20 ->> - Show quoted text -I see what you = mean.  Try=20 to figure out how to get it to factor in thecoupons (- value) in = the=20 total?
------=_NextPart_000_0523_01C7B445.5E574830--
Reply to
CptSoft

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.