Page 1 of 1

need help with calculate field

PostPosted: Sun Apr 17, 2005 7:17 am
by jack
I have a DB to figure my invoices in my repair business. I have a field which id's my wholesale customers. So parts I use in their repairs will get a discount on parts as opposed to regualr retail customers. My problem is haveing filemaker automatically apply a discount calculation to my invoice to wholesale customers and then charge the retail price(no discount) for retail customers. I also have a calc field to display the discount, but it will apply this calx to ALL my records and not allow me to adjust this calc to apply only to the wholesale customer record. How can I have my db calculate different discount amounts to different customers invoices?
Thanks, Jack

PostPosted: Sun Apr 17, 2005 10:02 am
by John Sindelar
I imagine you have a relationship from your invoice to your customer's table and, in customers, have some kind of "flag" for wholesale customers.

If so, your discount calc would be something like this:

InvoiceAmount * if (Customers::WholesaleFlag = 1 ; .10 ; 0 )

This would return a 10% discount for wholesale customers and a $0 discount for regular customers.

Hope that helps.

John