Discount computation
Price Computations Explanation
The discount computation in JTS Sys is fairly complicated, but it allows all the range of discounting processes that are normal in the JTS business, and automates the computation of discount so staff should only have to check the computations, not actually calculate them.
- A Sales Invoice is created with Sales Invoice Items. The Items include details of each Product and its Quantity. A "SalePrice" is pulled through when the SII is created. This is always the SalePrice at the time the SII is created. A "TotalValue" is then created, this is always the Gross value at the SalePrice.
- JTS Sys will then generate a Discount. If the Customer has a discount this is returned. Every customer can have their own "global" discount. Then there is a check whether this Customer has a specific Discount for this product. This would be stored in the "CustomerProducts" data-table. If a long-term special price for one customer is needed, the discount should be added there. Then there is a check for Date-based promotions. These are stored by customer-type, with a DateStart and a DateEnd. If there is a valid promotion currently running this discount is used in preference. This completes the computations at the level of the SII.
- If any "Special" discount needs to be given, there is an additional manual field in the SalesInvoices data-table which accepts a simple money value. This allows extra discounts for example to sell off damaged stocks or if a customer's invoice exceeds a specific value. The Special discount does not have any automated computation built in.