by jhenry » Fri Jul 23, 2010 9:42 am
Paul,
I didn't read the errors well enough but you were right it has to be from the double AND statements. Where are you doing the LIKE CONCAT statements? Is that done in a .php file or is it in the fields.ini.
I don't know if it helps but I am doing a very similar function where I have a Customers table and a account_taxes table. Each county here uses a different tax rate and I have to charge tax according to the location of the service. Each customer tax rate is selected in the Customers table from a lookup that uses the account_taxes table. So when I create a work order and select the customer I have the system query the customer database to get the proper tax rate multiply the rate times the labor hours and then total everything up at the end. I have a checkbox to select if the workorder is taxable (labor only has no tax) and then I have an onSave directive to total everything up. If this sounds like something similar to what you are doing let me know and I will post the Work_Orders.php that does the calculations.
Jason
Do not mistake understanding for realization, and do not mistake realization for liberation....Tibetan Saying.