Kicker


as of: February 14, 2013

Kicker modules control whether or not the cash drawer opens. The base class provides methods for three different scenarios. Subclasses may override any combination of the three.

boolean doKick()
boolean kickOnSignIn()
boolean kickOnSignOut()

For all three methods, a return value of True means the drawer should open and a return value of False means it should not. The kickOnSignIn method is checked when the cashier first signs into POS. The doKick method is checked at the end of each transaction. The kickOnSignOut method is checked when the cashier signs out.

Example: open the drawer on another tender type in addition the default, cash.

class KickCCandCA extends Kicker {
	function doKick(){
		$db = Database::tDataConnect();

		/* check for any records that match the conditions */
		$query = "SELECT trans_id FROM localtemptrans
			WHERE trans_subtype = 'CC' OR
			(trans_subtype = 'CA' AND total <> 0)";
		$result = $db->query($query);

		$num_rows = $db->num_rows($result);

		if ($num_rows > 0)
			return True;
		else
			return False;
	}
}