/**
   Generate the message
   @param $val the value returned by the object's select_condition()
   @param $ref a transaction reference (emp-lane-trans)
   @param $reprint boolean
   @return [string] message to print on receipt
 */
 public function message($val, $ref, $reprint = false)
 {
     list($emp, $reg, $trans) = explode('-', $ref, 3);
     // full identier:
     // YYYY-MM-DD emp_no-register_no-trans_no
     $identifier = date('Y-m-d') . ' ' . $emp . '-' . $reg . '-' . $trans;
     return "\n" . ReceiptLib::code39($identifier) . "\n";
 }
예제 #2
0
 public function message($str)
 {
     $ret = "\n";
     $ret .= ReceiptLib::biggerFont(ReceiptLib::centerBig('Save $5 on a ')) . "\n";
     $ret .= ReceiptLib::biggerFont(ReceiptLib::centerBig('purchase of $25 or more')) . "\n\n";
     $expires = strtotime('+30 days');
     $ret .= ReceiptLib::centerString('Expires: ' . date('m/d/Y', $expires)) . "\n";
     $barcode = 'RC' . date('ym', $expires) . '009';
     $ret .= ReceiptLib::code39($barcode);
     return array('print' => $ret, 'any' => '');
 }