Home Page link  

Reporting Sales for different tender Types: SQL stumper.

 

Point-Of-Sale Software - - MS Point Of Sale software discussed here 

get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content  add this group's latest topics to your Google content  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Reporting Sales for different tender Types: SQL stumper. Mickie 01-04-2007
Posted by Mickie on January 4, 2007, 1:26 pm
Please log in for more thread options
OK you Kings of Kode..please help me. I am stumped.

I have several tender types..some are INTERNET orders, some are IN-STORE
orders. I am trying to create a report that lists every item sold (for a time
period), how many sold, how much it actually sold for, and if it was an
internet or in-store sale.

I have the Tender Detailed report by CheckPoint Software..that works pretty
well for monthly totals (even though I would LOVE to have the shipping $$
included in those numbers!!! hint hint)

So I looked at that structure to come up with the following SQL query.
(ignore the time in the last line..I am trying to get December sales data).

However, there are often TWO tenderEntry.ID number for each transaction
because one os for the initial tender amount and another is for the change
given. So I am getting 2 items with costs which will screw up my totals.

How do I do this? Arg...I hate myself!

I just want a list of every item sold, $ paid, and internet or in-store sale
(I call SaleType). Thats it!

SELECT
dbo.[Transaction].Time,
dbo.[Transaction].TransactionNumber, dbo.Item.ItemLookupCode,
dbo.Item.SubDescription1 AS Brand,
dbo.Item.Description AS ITEM,
dbo.TransactionEntry.Quantity AS QTYSOLD,
dbo.TenderEntry.TenderID,
CASE WHEN TenderEntry.TenderId < 6 THEN 'IN-STORE' ELSE 'INTERNET' END AS
SaleType,
dbo.TenderEntry.Description AS TenderType,
dbo.TransactionEntry.Price AS SOLDPRICE,
dbo.TransactionEntry.Price *
dbo.TransactionEntry.Quantity AS TOTALPRICE

FROM
dbo.TenderEntry INNER JOIN
dbo.TransactionEntry ON dbo.TenderEntry.TransactionNumber =
dbo.TransactionEntry.TransactionNumber INNER JOIN
dbo.Item ON dbo.TransactionEntry.ItemID = dbo.Item.ID LEFT OUTER JOIN
dbo.OrderHistory ON dbo.TenderEntry.OrderHistoryID = dbo.OrderHistory.ID
LEFT OUTER JOIN
dbo.[Order] ON dbo.OrderHistory.OrderID = dbo.[Order].ID LEFT OUTER JOIN
dbo.[Transaction] ON dbo.TenderEntry.TransactionNumber =
dbo.[Transaction].TransactionNumber

WHERE
(dbo.[Transaction].Time BETWEEN CONVERT(DATETIME, '2006-12-01 00:00:00',
102) AND CONVERT(DATETIME, '2006-12-31 00:00:00', 102))

Posted by Jeff @ Check Point Software on January 4, 2007, 10:36 pm
Please log in for more thread options
: quoted-printable

Mickie,

You should really re-think what you are doing!

The tender type should have nothing to do with the type of sale or who =
it was sold to. You will have nothing but problems doing it this way as =
you can have more than 10 ways to pay the bill, then you will have the =
sale listed 10 times! ;-(

What you should be doing is identify the Internet sales and non-Internet =
sales by the cashier. Set up your system with an Internet cashier and =
all of the rest of your cashiers.

Then setup you POS to ask for the cashier on start of the sale.

Then your existing and new custom reports will be correct, based on the =
items, departments, customers, etc., NOT how it was paid for.

--=20

Jeff=20
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

You must be using Outlook Express 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 Outlook Express. Click on "Open with =
newsreader"
under the MS Retail Management System on the right.

http://tinyurl.com/75bgz
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D

OK you Kings of Kode..please help me. I am stumped.

I have several tender types..some are INTERNET orders, some are =
IN-STORE=20
orders. I am trying to create a report that lists every item sold (for =
a time=20
period), how many sold, how much it actually sold for, and if it was =
an=20
internet or in-store sale.

I have the Tender Detailed report by CheckPoint Software..that works =
pretty=20
well for monthly totals (even though I would LOVE to have the shipping =
$$=20
included in those numbers!!! hint hint)

So I looked at that structure to come up with the following SQL query. =

(ignore the time in the last line..I am trying to get December sales =
data).

However, there are often TWO tenderEntry.ID number for each =
transaction=20
because one os for the initial tender amount and another is for the =
change=20
given. So I am getting 2 items with costs which will screw up my =
totals.

How do I do this? Arg...I hate myself!

I just want a list of every item sold, $ paid, and internet or =
in-store sale=20
(I call SaleType). Thats it!

SELECT =20
dbo.[Transaction].Time,=20
dbo.[Transaction].TransactionNumber, dbo.Item.ItemLookupCode,=20
dbo.Item.SubDescription1 AS Brand,=20
dbo.Item.Description AS ITEM,=20
dbo.TransactionEntry.Quantity AS QTYSOLD,=20
dbo.TenderEntry.TenderID,=20
CASE WHEN TenderEntry.TenderId < 6 THEN 'IN-STORE' ELSE 'INTERNET' END =
AS=20
SaleType,=20
dbo.TenderEntry.Description AS TenderType,=20
dbo.TransactionEntry.Price AS SOLDPRICE,=20
dbo.TransactionEntry.Price *=20
dbo.TransactionEntry.Quantity AS TOTALPRICE

FROM =20
dbo.TenderEntry INNER JOIN =20
dbo.TransactionEntry ON dbo.TenderEntry.TransactionNumber =3D=20
dbo.TransactionEntry.TransactionNumber INNER JOIN
dbo.Item ON dbo.TransactionEntry.ItemID =3D dbo.Item.ID LEFT OUTER =
JOIN
dbo.OrderHistory ON dbo.TenderEntry.OrderHistoryID =3D =
dbo.OrderHistory.ID=20
LEFT OUTER JOIN
dbo.[Order] ON dbo.OrderHistory.OrderID =3D dbo.[Order].ID LEFT OUTER =
JOIN
dbo.[Transaction] ON dbo.TenderEntry.TransactionNumber =3D=20
dbo.[Transaction].TransactionNumber

WHERE =20
(dbo.[Transaction].Time BETWEEN CONVERT(DATETIME, '2006-12-01 =
00:00:00',=20
102) AND CONVERT(DATETIME, '2006-12-31 00:00:00', 102))
------=_NextPart_000_0848_01C73037.B12672D0
Content-Type: text/html;
        charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8">
<META content=3D"MSHTML 6.00.5730.11" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#008000>Mickie,</FONT></DIV>
<DIV><FONT color=3D#008000></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#008000>You should really re-think what you are=20
doing!</FONT></DIV>
<DIV><FONT color=3D#008000></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#008000>The tender type should have nothing to do =
with the type=20
of sale or who it was sold to.&nbsp; You will have nothing but problems =
doing it=20
this way as you can have more than 10 ways to pay the bill, then you =
will have=20
the sale listed 10 times! ;-(</FONT></DIV>
<DIV><FONT color=3D#008000></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#008000>What you should be doing is identify the =
Internet sales=20
and non-Internet sales by the cashier.&nbsp; Set up your system with an =
Internet=20
cashier and all of the rest of your cashiers.</FONT></DIV>
<DIV><FONT color=3D#008000></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#008000>Then setup you POS to ask for the cashier on =
start of=20
the sale.</FONT></DIV>
<DIV><FONT color=3D#008000></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#008000>Then your existing and new custom reports =
will be=20
correct, based on the items, departments, customers, etc., NOT how it =
was paid=20
for.</FONT></DIV>
<DIV><BR>-- <BR><BR>Jeff <BR>Check Point Software</DIV>
<DIV>&nbsp;</DIV>
<DIV>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D</DIV>
<DIV>&nbsp;</DIV>
<DIV>You must be using Outlook Express or some other type of newsgroup =
reader=20
to<BR>see and download the file attachment(s).&nbsp; If you are not =
using a=20
reader, follow<BR>the link below to setup Outlook Express.&nbsp; Click =
on "Open=20
with newsreader"<BR>under the MS Retail Management System on the =
right.</DIV>
<DIV>&nbsp;</DIV>
<DIV><A=20
href=3D"http://tinyurl.com/75bgz">http://tinyurl.com/75bgz</A><BR>=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
<BR></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #008000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Mickie" &lt;<A=20
=
soft.com</A>&gt;=20
wrote in message <A=20
=
D6122-B2D6-48E7-9490-CDDDA4682BE4@microsoft.com</A>...</DIV>OK=20
you Kings of Kode..please help me. I am stumped.<BR><BR>I have several =
tender=20
types..some are INTERNET orders, some are IN-STORE <BR>orders. I am =
trying to=20
create a report that lists every item sold (for a time <BR>period), =
how many=20
sold, how much it actually sold for, and if it was an <BR>internet or =
in-store=20
sale.<BR><BR>I have the Tender Detailed report by CheckPoint =
Software..that=20
works pretty <BR>well for monthly totals (even though I would LOVE to =
have the=20
shipping $$ <BR>included in those numbers!!! hint hint)<BR><BR>So I =
looked at=20
that structure to come up with the following SQL query. <BR>(ignore =
the time=20
in the last line..I am trying to get December sales =
data).<BR><BR>However,=20
there are often TWO tenderEntry.ID number for each transaction =
<BR>because one=20
os for the initial tender amount and another is for the change =
<BR>given. So I=20
am getting 2 items with costs which will screw up my =
totals.<BR><BR>How do I=20
do this? Arg...I hate myself!<BR><BR>I just want a list of every item =
sold, $=20
paid, and internet or in-store sale <BR>(I call SaleType). Thats=20
it!<BR><BR>SELECT&nbsp;&nbsp;&nbsp;&nbsp; <BR>dbo.[Transaction].Time,=20
<BR>dbo.[Transaction].TransactionNumber, dbo.Item.ItemLookupCode,=20
<BR>dbo.Item.SubDescription1 AS Brand, <BR>dbo.Item.Description AS =
ITEM,=20
<BR>dbo.TransactionEntry.Quantity AS QTYSOLD, =
<BR>dbo.TenderEntry.TenderID,=20
<BR>CASE WHEN TenderEntry.TenderId &lt; 6 THEN 'IN-STORE' ELSE =
'INTERNET' END=20
AS <BR>SaleType, <BR>dbo.TenderEntry.Description AS TenderType,=20
<BR>dbo.TransactionEntry.Price AS SOLDPRICE, =
<BR>dbo.TransactionEntry.Price *=20
<BR>dbo.TransactionEntry.Quantity AS=20
TOTALPRICE<BR><BR>FROM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

<BR>dbo.TenderEntry INNER=20
=
JOIN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>dbo.TransactionEntry ON dbo.TenderEntry.TransactionNumber =3D=20
<BR>dbo.TransactionEntry.TransactionNumber INNER JOIN<BR>dbo.Item ON=20
dbo.TransactionEntry.ItemID =3D dbo.Item.ID LEFT OUTER =
JOIN<BR>dbo.OrderHistory=20
ON dbo.TenderEntry.OrderHistoryID =3D dbo.OrderHistory.ID <BR>LEFT =
OUTER=20
JOIN<BR>dbo.[Order] ON dbo.OrderHistory.OrderID =3D dbo.[Order].ID =
LEFT OUTER=20
JOIN<BR>dbo.[Transaction] ON dbo.TenderEntry.TransactionNumber =3D=20
=
<BR>dbo.[Transaction].TransactionNumber<BR><BR>WHERE&nbsp;&nbsp;&nbsp;&nb=
sp;=20
<BR>(dbo.[Transaction].Time BETWEEN CONVERT(DATETIME, '2006-12-01 =
00:00:00',=20
<BR>102) AND CONVERT(DATETIME, '2006-12-31 00:00:00',=20
102))</BLOCKQUOTE></BODY></HTML>

------=
Posted by Mickie on January 5, 2007, 6:11 pm
Please log in for more thread options
ARG.

Is there no way then?

It was suggested in the very beginning that I set up different tender Types
to track this information. I really need to track the CASHIER to see who
entered the order, etc, s I can't use that. Maybe I can use SALESPERSON to
track the sales?

The tender types actually work with the different ways we sell....like
Amazon, ebay, Website. I use your report to show us what the breakdown in
sales is.

Thanks Jeff....guess I will have to re-think this.


"Jeff @ Check Point Software" wrote:

> Mickie,
>
> You should really re-think what you are doing!
>
> The tender type should have nothing to do with the type of sale or who it was
sold to. You will have nothing but problems doing it this way as you can have
more than 10 ways to pay the bill, then you will have the sale listed 10 times!
;-(

>
> What you should be doing is identify the Internet sales and non-Internet sales
by the cashier. Set up your system with an Internet cashier and all of the rest
of your cashiers.

>
> Then setup you POS to ask for the cashier on start of the sale.
>
> Then your existing and new custom reports will be correct, based on the items,
departments, customers, etc., NOT how it was paid for.
>
> --
>
> Jeff
> Check Point Software
>
> =====================================================
>
> You must be using Outlook Express 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 Outlook Express. Click on "Open with newsreader"
> under the MS Retail Management System on the right.
>
> http://tinyurl.com/75bgz
> =====================================================
>
> OK you Kings of Kode..please help me. I am stumped.
>
> I have several tender types..some are INTERNET orders, some are IN-STORE
> orders. I am trying to create a report that lists every item sold (for a
time
> period), how many sold, how much it actually sold for, and if it was an
> internet or in-store sale.
>
> I have the Tender Detailed report by CheckPoint Software..that works pretty
> well for monthly totals (even though I would LOVE to have the shipping $$
> included in those numbers!!! hint hint)
>
> So I looked at that structure to come up with the following SQL query.
> (ignore the time in the last line..I am trying to get December sales data).
>
> However, there are often TWO tenderEntry.ID number for each transaction
> because one os for the initial tender amount and another is for the change
> given. So I am getting 2 items with costs which will screw up my totals.
>
> How do I do this? Arg...I hate myself!
>
> I just want a list of every item sold, $ paid, and internet or in-store sale
> (I call SaleType). Thats it!
>
> SELECT
> dbo.[Transaction].Time,
> dbo.[Transaction].TransactionNumber, dbo.Item.ItemLookupCode,
> dbo.Item.SubDescription1 AS Brand,
> dbo.Item.Description AS ITEM,
> dbo.TransactionEntry.Quantity AS QTYSOLD,
> dbo.TenderEntry.TenderID,
> CASE WHEN TenderEntry.TenderId < 6 THEN 'IN-STORE' ELSE 'INTERNET' END AS
> SaleType,
> dbo.TenderEntry.Description AS TenderType,
> dbo.TransactionEntry.Price AS SOLDPRICE,
> dbo.TransactionEntry.Price *
> dbo.TransactionEntry.Quantity AS TOTALPRICE
>
> FROM
> dbo.TenderEntry INNER JOIN
> dbo.TransactionEntry ON dbo.TenderEntry.TransactionNumber =
> dbo.TransactionEntry.TransactionNumber INNER JOIN
> dbo.Item ON dbo.TransactionEntry.ItemID = dbo.Item.ID LEFT OUTER JOIN
> dbo.OrderHistory ON dbo.TenderEntry.OrderHistoryID = dbo.OrderHistory.ID
> LEFT OUTER JOIN
> dbo.[Order] ON dbo.OrderHistory.OrderID = dbo.[Order].ID LEFT OUTER JOIN
> dbo.[Transaction] ON dbo.TenderEntry.TransactionNumber =
> dbo.[Transaction].TransactionNumber
>
> WHERE
> (dbo.[Transaction].Time BETWEEN CONVERT(DATETIME, '2006-12-01 00:00:00',
> 102) AND CONVERT(DATETIME, '2006-12-31 00:00:00', 102))

Similar ThreadsPosted
RMS limit the cashier to certain tender types, ie no cash sales July 19, 2005, 9:22 am
Tender Summary report combining all registers and tender types May 7, 2008, 7:08 pm
no tender types available June 11, 2005, 9:20 pm
Tender Types? July 28, 2005, 9:31 pm
Tender Types October 7, 2005, 4:04 am
Tender types December 6, 2005, 7:10 pm
no tender types in POS November 28, 2007, 2:26 am
Overtendering on any tender types June 14, 2005, 9:23 am
"No Tender Types Defined..." June 30, 2005, 3:38 pm
Blank Tender Types February 28, 2006, 10:23 am

Contact Us | Privacy Policy
This site is not affiliated with Intuit - makers of Quickbooks and Quicken software
This site is not affiliated with Sage Software - makers of Peachtree accounting software
XML SitemapXML Sitemap