Exemple #1
0
 define('PRICING_COLUMN_SIZES', '67');
 $vilains = array("à", "á", "â", "ã", "ä", "å", "æ", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï", "ð", "ñ", "ò", "ó", "ô", "õ", "ö", "÷", "ø", "ù", "ú", "û", "ü", "ý", "þ", "ÿ", "ß", "'", " ", "à", "á", "ã", "ä", "&Arond;", "è", "æ", "ê", "ë", "ì", "í", "Í", "î", "ï", "ò", "ó", "ô", "õ", "ö", "ø", "ù", "ú", "û", "ü", "ñ", "ç", "ý", "<", ">", "&");
 $cools = array('à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ', 'ß', '\'', ' ', 'à', 'á', 'ã', 'ä', 'å', 'è', 'æ', 'ê', 'ë', 'ì', 'í', 'î', 'Î', 'ï', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ñ', 'ç', 'ý', '<', '>', '&');
 $currencies = new currencies();
 $pdf->selectFont(BATCH_PDF_DIR . 'Helvetica.afm');
 $pdf->setFontFamily(BATCH_PDF_DIR . 'Helvetica.afm');
 // company name and details pulled from the my store address and phone number
 // in admin configuration mystore
 $y = $pdf->ezText(STORE_NAME_ADDRESS, COMPANY_HEADER_FONT_SIZE);
 $y -= 10;
 // logo image  set to right of the above .. change first number to move sideways
 $pdf->addJpegFromFile('../images/' . 'store_logo.jpg', 365, 730, 85, 80);
 // extra info boxs to be used by staff
 $pdf->setStrokeColor(0, 0, 0);
 $pdf->setLineStyle(1);
 $pdf->roundedRectangle(470, 730, 85, 85, 10, $f = 0);
 $pdf->rectangle(535, 748, 10, 10);
 $pdf->rectangle(535, 769, 10, 10);
 $pdf->rectangle(535, 790, 10, 10);
 $pdf->addText(480, 790, GENERAL_FONT_SIZE, TEXT_BANK);
 $pdf->addText(480, 769, GENERAL_FONT_SIZE, TEXT_POST);
 $pdf->addText(480, 748, GENERAL_FONT_SIZE, TEXT_SALES);
 // line between header order number and order date
 $pdf->setLineStyle(1);
 $pdf->line(LEFT_MARGIN, $y, LINE_LENGTH, $y);
 $pdf->ezSetY($y);
 $dup_y = $y;
 // order number
 $y = $pdf->ezText("<b>" . TEXT_ORDER_NUMBER . " </b>" . $orders['orders_prefix'] . $orders['orders_id'] . "\n\n", SUB_HEADING_FONT_SIZE);
 // order date
 if ($_POST['show_order_date']) {
 $pos = $y;
 foreach ($delivery_address_array as $key => $value) {
     $pdf->addText(LEFT_MARGIN, $pos -= SMALL_LEADING, SENDER_SMALL_FONT_SIZE, $value);
 }
 $pos = $y;
 //  $address_array=explode('<br>', str_replace("\r\n", "<br>", STORE_NAME_ADDRESS));
 foreach ($store_address_array as $key => $value) {
     // echo $value.'<br>' ;
     $pdf->addText(SHIP_TO_COLUMN_START, $pos -= SMALL_LEADING, SENDER_SMALL_FONT_SIZE, $value);
 }
 $y -= 70;
 // company name and details pulled from the my store address and phone number
 // in admin configuration mystore
 $pdf->setStrokeColor(0, 0, 0);
 $pdf->setLineStyle(1);
 $pdf->roundedRectangle(28, 640, 230, 120, 10, $f = 0);
 // order number
 //$y = $pdf->ezText("" . TEXT_ORDER_NUMBER . " " . $orders['orders_id'] ."\n\n",SENDER_FONT_SIZE);
 $indent = LEFT_MARGIN + TEXT_BLOCK_SMALL_INDENT;
 $pdf->addText($indent, $y, SUB_HEADING_FONT_SIZE, "<b>" . TEXT_TO . "</b>");
 //$y = $pdf->ezText(STORE_NAME_ADDRESS,GENERAL_FONT_SIZE);
 $pos = $y;
 $indent = LEFT_MARGIN + TEXT_BLOCK_INDENT;
 foreach ($store_address_array as $key => $value) {
     $pdf->addText($indent, $pos -= LABEL_LEADING, LABEL_FONT_SIZE, "<b>" . $value . "</b>");
 }
 // logo image  set to right of the above .. change first number to move sideways
 // $pdf->addJpegFromFile(BATCH_PRINT_INC . 'templates/' . 'invoicelogo.jpg',365,730,85,85);
 $pdf->setStrokeColor(0, 0, 0);
 $pdf->setLineStyle(1);
 $pdf->roundedRectangle(300, 640, 260, 120, 10, $f = 0);
 $pos = $y;
 foreach ($delivery_address_array as $key => $value) {
     $pdf->addText(LEFT_MARGIN, $pos -= SMALL_LEADING, SENDER_SMALL_FONT_SIZE, $value);
 }
 $pos = $y;
 //  $address_array=explode('<br>', str_replace("\r\n", "<br>", STORE_NAME_ADDRESS));
 foreach ($store_address_array as $key => $value) {
     // echo $value.'<br>' ;
     $pdf->addText(SHIP_TO_COLUMN_START, $pos -= SMALL_LEADING, SENDER_SMALL_FONT_SIZE, $value);
 }
 $y -= 55;
 // company name and details pulled from the my store address and phone number
 // in admin configuration mystore
 $pdf->setStrokeColor(0, 0, 0);
 $pdf->setLineStyle(1);
 $pdf->roundedRectangle(28, 570, 230, 120, 10, $f = 0);
 // order number
 //$y = $pdf->ezText("" . TEXT_ORDER_NUMBER . " " . $orders['orders_id'] ."\n\n",SENDER_FONT_SIZE);
 $indent = LEFT_MARGIN + TEXT_BLOCK_SMALL_INDENT;
 $pdf->addText($indent, $y, SUB_HEADING_FONT_SIZE, "<b>" . TEXT_TO . "</b>");
 //$y = $pdf->ezText(STORE_NAME_ADDRESS,GENERAL_FONT_SIZE);
 $pos = $y;
 $indent = LEFT_MARGIN + TEXT_BLOCK_INDENT;
 foreach ($store_address_array as $key => $value) {
     $pdf->addText($indent, $pos -= LABEL_LEADING, LABEL_FONT_SIZE, "<b>" . $value . "</b>");
 }
 // logo image  set to right of the above .. change first number to move sideways
 // $pdf->addJpegFromFile(BATCH_PRINT_INC . 'templates/' . 'invoicelogo.jpg',365,730,85,85);
 $pdf->setStrokeColor(0, 0, 0);
 $pdf->setLineStyle(1);
 $pdf->roundedRectangle(330, 570, 260, 120, 10, $f = 0);
Exemple #4
0
             case 3:
                 $store_address_array[3] = $value;
                 break;
             case 4:
                 $store_address_array[4] = $value;
                 break;
             default:
                 $store_address_array[4] .= ', ';
                 $store_address_array[4] .= $value;
                 break;
         }
     }
 }
 $pdf->setStrokeColor(0, 0, 0);
 $pdf->setLineStyle(1);
 $pdf->roundedRectangle(10, 5, 170, 90, 10, $f = 0);
 $pos = $y - 2 * GENERAL_LEADING;
 //  $address_array=explode('<br>', str_replace("\r\n", "<br>", STORE_NAME_ADDRESS));
 foreach ($store_address_array as $key => $value) {
     // echo $value.'<br>' ;
     $pdf->addText(LEFT_MARGIN, $pos -= SMALL_LEADING, SENDER_SMALL_FONT_SIZE, $value);
 }
 $pdf->addText(LEFT_MARGIN, $pos -= LABEL_LINE_SPACING, ORDERIDFONTSIZE, 'Order ' . $orders['orders_id']);
 $pos = $y;
 if ($billing == true) {
     $address_array = explode('<br>', tep_address_format($order->delivery['format_id'], $order->billing, 1, '', '<br>'));
 } else {
     $address_array = explode('<br>', tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'));
 }
 if (SHIP_FROM_COUNTRY == $address_array[count($address_array) - 1]) {
     $address_array[count($address_array) - 1] = '';