function bill_cuts($bill)
{
    global $pdf, $s;
    bill_reset($bill);
    $pdf->SetDrawColor($s->draw);
    //top bottom of sheet
    $pdf->Line($bill->x, 0, $bill->x, $s->margin_top / 2);
    $pdf->Line($bill->x + $bill->w, 0, $bill->x + $bill->w, $s->margin_bottom / 2);
    //bill horz
    if ($bill->y < 1) {
        //do first line
        $pdf->Line(0, $bill->y, $bill->x - 0.1, $bill->y);
        $pdf->Line($bill->x + $bill->w + 0.1, $bill->y, $s->page_width, $bill->y);
    }
    $pdf->Line(0, $bill->y + $bill->h, $bill->x - 0.1, $bill->y + $bill->h);
    $pdf->Line($bill->x + $bill->w + 0.1, $bill->y + $bill->h, $s->page_width, $bill->y + $bill->h);
    //bill vert
    $y_s = 0.05;
    $pdf->Line($bill->x, $bill->y - $y_s, $bill->x, $bill->y + $y_s);
    $pdf->Line($bill->x + $bill->w, $bill->y - $y_s, $bill->x + $bill->w, $bill->y + $y_s);
}
Example #2
0
     if (isset($_REQUEST['type'])) {
         $type = $_REQUEST['type'];
     }
     if (!bill_type_set($type)) {
         $err = bill_print();
         status_report('BILL_PRINT', $err);
         if (!$err) {
             // this allows bill_select to forget precedent selection
             $_REQUEST['keep_separated'] = 0;
         }
     }
     bill_select();
     break;
 case 'bill_reset':
     if (isset($_REQUEST['reset'])) {
         $err = bill_reset($_SESSION['sourceid']);
         status_report('BILL_RESET', $err);
         if ($err) {
             printing_choose();
         } else {
             orders_list();
         }
     } else {
         bill_reset_confirm();
     }
     break;
 case 'print_orders':
     $err = print_orders($_SESSION['sourceid']);
     status_report('ORDERS_PRINT', $err);
     if (!$err) {
         orders_list();