hello all,
i am new to filemaker pro 7 and accidently came across this very interesting website.
i have already tried to get some help to my problem at comp.databases.filemaker, but there's still no satisfying solution in sight. as there seem to be some pros out here, i have decided to bother you as well ;-)
basically i have the following problem:
i am building an invoicing database. it's already working quite neatly with customer, products, invoice and lineitems table linked to fill in data automatically.
for fiscal reasons, i need to be able to print invoices that list different tax rates and amounts of different products seperately. i.e., i have to calculate a subtotal for each tax rate for the according listitems.
since there may be one or more tax rates in an invoice, i would like to find a dynamic approach, instead of "hard-coding" summary fields for every possible tax rate. (the rates may be subject to change. in that case i would have to redesign the database.)
maybe you will get a better picture if i show you, what i have got so far and what i still need:
the following (simplified) tables are already working fine (set up with relations to products and customers and according lookups)
Invoice
-------
ID
InvoiceNo
CustomerID
Date
Invoice_LineItems
-----------------
ID
InvoiceID
Quantity
Article
PricePerUnit
TaxRate
example data:
Invoice
-------
ID...InvoiceNo...CustID...Date
1.....000-000......1..........05/22/2005
Invoice_LineItems
-----------------
ID...InvID...Qty...Article......PpU......TaxRate
1.....1..........3......Flooboo....1,20.......7%
2.....1..........1......Shnoops...2,00.....16%
3.....1..........2......Noofoo.....3,00.......7%
4.....1..........4......Foowhoo...2,20.......0%
and i need a print-out like that:
Date: 05/22/2005
Invoice No.: 000-000
Customer No.: 1
Qty...Article..........PpU......Price...TaxRate
-------------------------------------------------
3.......Flooboo.......1,20.....3,60......7%
1.......Shnoops......2,00.....2,00....16%
2.......Noofoo........3,50.....7,00......7%
4.......Foowhoo......2,20.....8,80......0%
.....................................------
net 0%...........................8,80
net 7%.........................10,60
tax 7%...........................0,74
net 16%..........................2,00
tax 16%..........................0,32
.....................................------
total...............................22,46
.................................======
my big problem is the last part of this invoice: the listing of tax amount summaries before the grand total. i don't know how to implement that kind of "subsummary by category". additionally, it would be nice if the the print-out showed only occuring tax rates in order to avoid list items like: net 0%=0; net 7%=0, tax 7%=0.
the only solution i can think of right now is to calculate the tax amounts for every possible tax rate in the line items table and create summary fields for those within the invoice table. but if the rates change i will have to add more fields.
that cannot be the appropriate "filemaker way", can it?
any help is greatly appreciated,
jo