CORE POS - IS4C
The CORE POS front end
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
DiscountType Class Reference
Inheritance diagram for DiscountType:
CasePriceDiscount EveryoneSale MemberSale NormalPricing PercentMemSale SlidingMemSale StaffSale

Public Member Functions

 priceInfo ($row, $quantity=1)
 
 addDiscountLine ()
 
 isSale ()
 
 isMemberOnly ()
 
 isMemberSale ()
 
 isStaffOnly ()
 
 isStaffSale ()
 

Static Public Attributes

static $MAP
 

Protected Attributes

 $savedRow
 
 $savedInfo
 

Detailed Description

Base module for computing sale prices

Member Function Documentation

DiscountType::addDiscountLine ( )

Add a discount notification

Returns
None

Optionally add an informational record to the transaction so a savings message appears on screen.

DiscountType::isMemberOnly ( )
Returns
  • True The sale is only for members
  • False The sale is for everyone
DiscountType::isMemberSale ( )

Alias for isMemberOnly()

DiscountType::isSale ( )
Returns
  • True The item is on sale
  • False The item is not on sale
DiscountType::isStaffOnly ( )
Returns
  • True The sale is only for staff
  • False The sale is for everyone
DiscountType::isStaffSale ( )

Alias for isStaffOnly()

DiscountType::priceInfo (   $row,
  $quantity = 1 
)

Calculate pricing

Parameters
$rowA record from the products table
$quantityScanned quantity
Returns
Keyed array
  • regPrice The normal price per item
  • unitPrice The actual price per unit If it's not on sale, unitPrice will match regPrice
  • discount The discount amount for everyone
  • memDiscount The discount amount for members

Member Data Documentation

DiscountType::$MAP
static
Initial value:
= array(
0 => 'NormalPricing',
1 => 'EveryoneSale',
2 => 'MemberSale',
3 => 'PercentMemSale',
4 => 'StaffSale',
5 => 'SlidingMemSale',
6 => 'CasePriceDiscount',
)
DiscountType::$savedInfo
protected

Convenience variable to save prieInfo() return value for later if needed

DiscountType::$savedRow
protected

Convenience variable to save prieInfo() argument for later if needed


The documentation for this class was generated from the following file: