|
| __construct ($percent, $name='custdata') |
|
| percentage () |
|
Calculate a per-transaction discount
This module is called in Database::getsubtotals() and the value it calculates will be stored in session as 'transDiscount'. The default version simply returns the value calculated by the translog.subtotals view.
static COREPOS\pos\lib\DiscountModule::lineItems |
( |
| ) |
|
|
static |
Add a log record w/ upc DISCLINEITEM for Each discount in stacking mode The applicable discount in non-stacking mode
COREPOS\pos\lib\DiscountModule::percentage |
( |
| ) |
|
Decide what percent discount to apply to this transaction.
- Returns
- int percentage (i.e., 5 == 5%)
static COREPOS\pos\lib\DiscountModule::transReset |
( |
| ) |
|
|
static |
static COREPOS\pos\lib\DiscountModule::updateDiscount |
( |
DiscountModule |
$mod, |
|
|
|
$do_subtotal = true |
|
) |
| |
|
static |
Add or update a discount module in the current transaction. Automatically subtotals if the discount changes.
Examine current discounts to see if this one has already applied
Add object to the list of active discounts Then loop through to see whether it changes the effective discount with stacking settings taken into account
When discount changes:
- Update the session value
- Update the localtemptrans.percentDiscount value
- Subtotal the transaction
The documentation for this class was generated from the following file:
- pos/is4c-nf/lib/DiscountModule.php