예제 #1
0
파일: print.php 프로젝트: jackyFeng/unisol
 * This is a separation section This is a separation section
 * This is a separation section This is a separation section
 * This is a separation section This is a separation section
 */
$orderNo = $order['order_id'];
$customer_id = $order['customer_id'];
$receiverName = $customerMgr->getLastName($customer_id) . " " . $customerMgr->getFirstName($customer_id);
$receiverAddress = $addressMgr->getGeneralAddress($customer_id, intval($order['address_no']));
$receiverPhone = $customerMgr->getContactNo($customer_id);
$receiverPostalCode = $addressMgr->getPostalCode($customer_id, intval($order['address_no']));
$totalPrice = $order['totalPrice'];
$itemList = $order['itemList'];
//var_dump($itemList);
$array = [];
foreach ($itemList as $item) {
    $product_full_code = $productMgr->getFullCodeByProductColor($item['product_id'], $item['color']);
    array_push($array, $product_full_code . "   x" . $item['quantity'] . "   \$" . number_format($item['price'], 2, '.', ''));
}
$pdf = new eFPDF('P');
$pdf->AddPage();
$pdf->Ln(20);
//BARCODE
$data = Barcode::fpdf($pdf, $black, $x, $y, $angle, $type, array('code' => $orderNo), $width, $height);
//ORDER ID
//$pdf->SetFont("Arial","B",16);
//$pdf->Cell(0, 10, "Here should be order number", 0, 1,"C");
$pdf->SetFont('Arial', '', $fontSize);
$pdf->SetTextColor(0, 0, 0);
$len = $pdf->GetStringWidth($data['hri']);
Barcode::rotate(-$len / 2, $data['height'] / 2 + $fontSize + $marge, $angle, $xt, $yt);
$pdf->TextWithRotation($x + $xt, $y + $yt, $data['hri'], $angle);