CORE POS - IS4C
The CORE POS front end
Static Public Member Functions | List of all members
CoopCredLib Class Reference
Inheritance diagram for CoopCredLib:
LibraryClass

Static Public Member Functions

static cclibtest ()
 
static chargeOK ($tender='')
 
static programOK ($pKey='', $conn='')
 
static getCCredSubtotals ($tender='', $conn, $programCode='', $table='', $ref='')
 
static ccDataConnect ()
 
static addDepartmentUsed ($paymentDepartment=0, $programID=0)
 

Detailed Description

Functions for the Coop Cred plugin.

Member Function Documentation

static CoopCredLib::addDepartmentUsed (   $paymentDepartment = 0,
  $programID = 0 
)
static

Add the department to the list of payment departments in the current transaction.

Returns
True or False
static CoopCredLib::ccDataConnect ( )
static

Connect to the coop cred database (local)

Returns
a SQLManager object

Create the connection object and add all local databases to it.

static CoopCredLib::chargeOK (   $tender = '')
static

Whether OK to use Coop Cred. Assign balance and availBal.

Returns
1 if OK, 0 if not. Never used, may never be and is therefore deprecated. Originally intended for making usage more like other tenders. At this point is not program-specific so hard to see its use. The assignments are in getCCredSubtotals(). $tender isn't needed.
static CoopCredLib::getCCredSubtotals (   $tender = '',
  $conn,
  $programCode = '',
  $table = '',
  $ref = '' 
)
static

Calculate Coop Cred-related subtotals for the named tender in the current transaction.

Parameters
$tender
$programCode
$table,defaultto localtemptrans for during-transaction, but localtranstoday for end of transaction.
$refemp-lane-trans, if needed for end of transaction
Returns
True or error message string.
static CoopCredLib::programOK (   $pKey = '',
  $conn = '' 
)
static

OK to use the tender or make the input?

Returns
True if all clear to charge or input to the program message if not
Parameters
$pKey- a tenderType or paymentDepartment

Note: Transfer-to-another member part is not done.

Knowing tenderType or paymentDepartment and memberID Step 1:

  • Find the program Step 2:
  • Is the program active? Step 3:
  • Is the member in it? CCredMemberships record exists.
  • Is the membership in the program active? x Is there enough to cover the amount?

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