CORE POS - IS4C
The CORE POS front end
|
Public Member Functions | |
__construct ($percent, $name='custdata') | |
calculate ($discountable_total=0) | |
percentage () | |
Static Public Member Functions | |
static | updateDiscount (DiscountModule $mod, $do_subtotal=true) |
static | transReset () |
static | lineItems () |
Public Attributes | |
$name = 'custdata' | |
Protected Attributes | |
$my_discount = 0 | |
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.
DiscountModule::calculate | ( | $discountable_total = 0 ) |
Calculate the discount based on current transaction state
Note return value should be positive unless you're doing something odd
|
static |
Add a log record w/ upc DISCLINEITEM for Each discount in stacking mode The applicable discount in non-stacking mode
DiscountModule::percentage | ( | ) |
Decide what percent discount to apply to this transaction.
|
static |
Reset all discounts
|
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: