------=_NextPart_000_0789_01BF715A.074FD150
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Maybe this will explain it better...
SQL Query follows....kinda
/* tax summary for month by taxid */
set nocount on
declare @begindate char(10), @enddate char(10)
select @begindate =3D '1/1/2000'
select @enddate =3D '1/31/2000'
set nocount off
select invoiceid from invoices
where date >=3D @begindate and date < @enddate
and type <> "void"
and amount <> 0
/* taxid from invoiceitems */
/* select taxid from above invoiceid in invoiceitems
if taxid =3D 1 then place in this virtual table (tax1)
if taxid =3D 2 then place in this virtual table (tax2)
if taxid =3D 3 then place in this virtual table (tax3)
if taxid =3D 4 then place in this virtual table (tax4)
if taxid =3D 5 then place in this virtual table (tax5)
if taxid =3D null then freakout
In virtual table (tax1) add all amounts
add all tax
add all tax2
bothtaxes =3D tax + tax2
amountsbeforetax =3D amounts - bothtaxes
print discription from virtual table (tax1)
print "Amount Invoiced before taxes =3D" amountsberforetax
print "Amount Invoiced taxes only =3D" bothtaxes
print "Amount Invoiced Total =3D" amounts
In virtual table (tax2) add....etc */
Ken
------=_NextPart_000_0789_01BF715A.074FD150
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">