|
Ewart, You should keep it simple and easy to read, hence easy to modify and easy to debug by coding it exactly how you have it written down in your requirements: /free Base = Qty * Price; Tax1 = Base * .02; Tax2 = Tax1 * .03; Total = Base + Tax1 + Tax2; /end-free You could of course make it impossible for the next programmer to understand what you are doing: /free Total = Qty * Price * 1.0206; /end-free Glenn Gundermann ggundermann@xxxxxx (647) 272-3295
Hello All, We have a complicated Invoice calculation process where a lot local taxes are to be considered. In order to make these calculations dynamic I plan to do the calculations using dynamic formulas so that any future changes can be considered. Eg: Description Name Formula Value Base value Base Qty * price 1000 Tax1 20% of base Tax1 Base * .02 20 Tax2 30% of Tax1 Tax2 Tax1 * .03 0.6 Total Total Base + Tax1 + Tax2 1020.6 Has anyone built something like that & can share the code - I can save some time. Thanks & best regards Ewart
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.