I'm looking for an elegant solution to calculate the potential discount for an invoice, based on the terms of invoice.
I have a list of terms which has a discount percent, along with the net days to pay. Company pays within that time, they get the discount.
So, this list looks something like:
1% 10 Net 30
2% 10 Net 20
3% 10 Net 10
I'm envisioning a Terms/Discount table where the properties of each term are stored and the value list is made up of the available terms (2nd field, calculated descripiton). When the invoice is created or the terms are changed, then the individual "parts" of the terms can be looked up and applied to the invoice.
...or should I just keep the value list as is and use if statements in a script to calculate the discount?
Thanks for the look!
If there is any chance you will want to change the individual terms of a specific invoice, you should use a lookup.
You should also use a lookup if you are likely to change the existing values of a 'terms package" - since you wouldn't want this to affect your already existing invoices.