예제 #1
0
 protected function ajax()
 {
     CoreLocal::set("cabReference", $_REQUEST['input']);
     $receipt = ReceiptLib::printReceipt('cab', CoreLocal::get('cabReference'));
     ReceiptLib::writeLine($receipt);
     return 'Done';
 }
예제 #2
0
 function writeLine($text)
 {
     ReceiptLib::writeLine($text);
 }
예제 #3
0
    echo $m;
    ?>
</option>
<?php 
}
?>
</select> <br />

Send to printer <select name="print">
<option value="0">No</option>
<option value="1">Yes</option>
</select> <br />


Emp# <input type="text" size="3" name="emp_no" />

<input type="submit" value="Get Output" />
</form>
<hr />
<?php 
if (isset($_REQUEST['t_mod']) && isset($_REQUEST['emp_no'])) {
    CoreLocal::set('CashierNo', $_REQUEST['emp_no']);
    $tmod = $_REQUEST['t_mod'];
    echo "Output for {$tmod}:<br />";
    echo '<pre>';
    $report = $tmod::get();
    echo '</pre>';
    if (isset($_REQUEST['print']) && $_REQUEST['print'] == 1) {
        ReceiptLib::writeLine($report);
    }
}
예제 #4
0
 /**
   Write tender report to the printer
 */
 public static function printReport()
 {
     $contents = self::get();
     ReceiptLib::writeLine($contents);
 }
예제 #5
0
<?php

/*******************************************************************************

    Copyright 2010 Whole Foods Co-op.

    This file is part of IT CORE.

    IT CORE is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    IT CORE is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    in the file license.txt along with IT CORE; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*********************************************************************************/
ini_set('display_errors', 'Off');
include_once dirname(__FILE__) . '/../lib/AutoLoader.php';
CoreLocal::set("cabReference", $_REQUEST['input']);
$receipt = ReceiptLib::printReceipt('cab', CoreLocal::get('cabReference'));
ReceiptLib::writeLine($receipt);
echo "Done";