$content .= '    <table border="0" cellpadding="0" cellspacing="0">';
$content .= '    <tr><th style="width:150px;">Configuration</th><th colspan="2" style="width:150px;">Value</th></tr>';
$content .= '    <tr class="o"><td>Silver Usage</td><td>' . $input72 . '</td><td>gram</td></tr>';
$content .= '    <tr class="e"><td>Antitarnish Usage</td><td>' . $input73 . '</td><td>liter</td></tr>';
$content .= '    </table>';
$content .= '  </div>';
$content .= '</div>';
//#production .draw-table
//
//Production Instruction Settings Form
use_class('jng_sp');
use_class('products_brand');
$class_sp = new jng_sp();
$class_pb = new products_brand();
$sps = $class_sp->retrieveList();
$brands = $class_pb->retrieveList('active_status=1');
$content .= '<div id="production-instruction" class="draw-table" style="clear:both;padding-top:20px;">';
$content .= '  <div style="float:left;">';
$content .= '    <h2>Production Instruction (PI) Using Red Paper</h2>';
$content .= '    <table border="0" cellpadding="0" cellspacing="0">';
$content .= '    <tr><th style="width:150px;">Configuration</th><th style="width:550px;">Value</th></tr>';
$content .= '    <tr class="o"><td>Sales Partner</td><td>';
$checked = in_array('0', $sp_using_red_paper) ? 'checked="checked"' : '';
$cbid = 'set-pi-red-sp-0';
$content .= '<div class="float-left w080 tal" style="margin:2px 0;"><input type="checkbox" id="' . $cbid . '" name="' . $cbid . '" value="0" ' . $checked . '/><label for="' . $cbid . '"> JG.DE</label></div>';
foreach ($sps as $sp_id => $dt) {
    $cbid = 'set-pi-red-sp-' . $sp_id;
    $checked = in_array($sp_id, $sp_using_red_paper) ? 'checked="checked"' : '';
    $content .= '<div class="float-left w080 tal" style="margin:2px 0;"><input type="checkbox" id="' . $cbid . '" name="' . $cbid . '" value="' . $sp_id . '" ' . $checked . '/><label for="' . $cbid . '"> ' . $dt['package_prefix'] . '</label></div>';
}
$content .= '    </td></tr>';
Esempio n. 2
0
function comboProductsBrand($id, $name = '', $value = '', $class = '', $html_params = '', $filter = '')
{
    use_class('products_brand');
    $class_pb = new products_brand();
    $brands = $class_pb->retrieveList($filter, 'brand_name');
    $navoptions = '<select id="' . $id . '"';
    if ($name != '') {
        $navoptions .= ' name="' . $name . '"';
    }
    if ($class != '') {
        $navoptions .= ' class="' . $class . '"';
    }
    if ($html_params != '') {
        $navoptions .= ' ' . $html_params;
    }
    $navoptions .= '>';
    $selected = $value == '' ? 'selected="selected"' : '';
    $navoptions .= '<option value="" ' . $selected . '>Please select a brand...</option>';
    $navoptions .= '<option value="0" ' . ($value == '0' ? 'selected="selected"' : '') . '>No Special Brand</option>';
    //$navoptions .= loadComboList('products_brand', 'products_brand_id', 'brand_name', $value, "active_status = '1'");
    foreach ($brands as $brand_id => $brand_data) {
        $navoptions .= '<option value="' . $brand_id . '" ' . ($value == $brand_id ? 'selected="selected"' : '') . '>' . $brand_data['brand_name'] . '</option>';
    }
    $navoptions .= '</select>';
    return $navoptions;
}
 private function renderFilter()
 {
     use_class('jng_sp');
     use_class('products_brand');
     use_class('CategoryTop');
     $class_sp = new jng_sp();
     $class_pb = new products_brand();
     $sp_datas = $class_sp->retrieveList();
     $brands = $class_pb->retrieveList("active_status='1'");
     //FILTER Order Type
     $order_type_selected = self::getSession(self::FILTER_ORDER_TYPE);
     $order_types = array(self::ORDER_TYPE_ALL => 'All Orders', self::ORDER_TYPE_JG => 'JG Orders');
     $order_type_groups['SP Orders'][self::ORDER_TYPE_SP] = 'All SP Orders';
     foreach ($sp_datas as $sp_id => $sp_data) {
         $order_type_groups['SP Orders'][$sp_id] = $sp_data['name'];
     }
     $order_type_groups['Depot Orders'] = $this->DP_ORDER_TYPES;
     $filter_order_type = '<select name="' . self::FILTER_ORDER_TYPE . '" class="cbo_filters">' . loadComboListFromArray($order_types, null, $order_type_selected, true, $order_type_groups) . '</select>';
     /* Filter SP now merged into Filter Order Type
        array_unshift($sp_datas, array(self::FILTER_SP_ID => '0', 'name' => 'All Sales Partners'));
        $filter_sp = $class_sp->drawCombo($sp_datas, $this->filters_sp_id, '', self::FILTER_SP_ID, 'cbo_filters');
         */
     //FILTER Brand
     $brand_options = array();
     $brand_options[0] = 'Show All Brands';
     foreach ($brands as $b) {
         $brand_options[$b['products_brand_id']] = $b['brand_name'];
     }
     $filter_brand = '<select name="' . self::FILTER_BRAND_ID . '" class="cbo_filters">' . loadComboListFromArray($brand_options, null, $this->filters_brand_id, false) . '</select>';
     //FILTER Category
     $category_selected = self::getSession(self::FILTER_CAT_ID);
     $categories = array('' => 'Show All Categories');
     $category_groups = array();
     while ($ct = CategoryTop::getOneByOneAsObject()) {
         if ($ct->getCategoriesTotalCount() > 0) {
             while ($cat = $ct->getCategoriesOneByOneAsObject()) {
                 if ($cat->getProductCodePrefix() != "") {
                     $category_groups[$ct->name][$cat->id] = $cat->getName(1);
                 }
             }
         }
     }
     $filter_category = '<select name="' . self::FILTER_CAT_ID . '" class="cbo_filters">' . loadComboListFromArray($categories, null, $category_selected, true, $category_groups) . '</select>';
     /*
             $filter_category = 
            comboProductsCategory(
                    self::FILTER_CAT_ID
                    , self::FILTER_CAT_ID
                    , $this->filters_cat_id
                    , 'cbo_filters'
                    , ''
                    , 'Show All Category');
     */
     //FILTER Product ID/EAN
     $filter_prod_search = '<input type="text" name="' . self::FILTER_LIST_EAN . '" class="txt_filters input" value="' . $this->filters_list_ean . '" />';
     //FILTER Order No.
     $filter_orders_no = '<input type="text" name="' . self::FILTER_LIST_ORDERS_NO . '" class="txt_filters" value="' . $this->filters_list_orders_no . '" />';
     //FILTER Lead Time Start Date
     $filter_leadtime = '<input name="' . self::FILTER_LEADTIME_START_DATE . '" class="date_picker" value="' . $this->filters_leadtime_date_start . '"/>' . ' to <input name="' . self::FILTER_LEADTIME_END_DATE . '" class="date_picker" value="' . $this->filters_leadtime_date_end . '"/>' . ' <input type="button" value="Go" class="btn_filters_leadtime_go" ' . 'title="Apply lead time start date filter" />' . ' <input type="button" value="Clear" class="date_range_clear" ' . 'title="Clear lead time start date filter" />';
     $enter_info = '<span class="notice smallText" style="font-weight:normal;">' . '(press <em>Enter</em> to filter)</span>';
     $result .= '<div style="margin-bottom:10px;">';
     $result .= '<table border="0" cellpadding="0" cellspacing="0">';
     $result .= '<tr>';
     $result .= '<td class="bold">Order Type</td>';
     //$result .= '<td class="bold">Sales Partner</td>';
     $result .= '<td class="bold">Brand</td>';
     $result .= '<td class="bold">Category</td>';
     $result .= '<td class="bold">Product ID/EAN ' . $enter_info . '</td>';
     $result .= '<td class="bold">Order No. ' . $enter_info . '</td>';
     $result .= '<td class="bold">Lead Time Start Date</td>';
     $result .= '</tr>';
     $result .= '<tr>' . '<td>' . $filter_order_type . '</td>' . '<td>' . $filter_brand . '</td>' . '<td>' . $filter_category . '</td>' . '<td>' . $filter_prod_search . '</td>' . '<td>' . $filter_orders_no . '</td>' . '<td>' . $filter_leadtime . '</td>' . '</tr>';
     $result .= '</table></div>';
     return $result;
 }
Esempio n. 4
0
} else {
    $button_set_1 = 'style="display:block;"';
    $button_set_2 = 'style="display:none;"';
}
$cat_total_query = "SELECT count(jc.jng_sp_catalog_id) AS total FROM jng_sp_catalog jc";
if (strpos($filter_query, 'p.') !== false) {
    $cat_total_query .= " LEFT JOIN products p ON p.products_id=jc.products_id";
}
$cat_total_query .= $filter_query;
$cat_total_result = tep_db_query($cat_total_query);
$cat_total = tep_db_fetch_array($cat_total_result);
//PAGING QUERY & LINKS
$offset = ($page - 1) * ROWPERPAGE;
$page_query = " LIMIT " . ROWPERPAGE . " OFFSET {$offset}";
$pagelink = tep_paging($cat_total['total'], $page, '?open=analysis-vc&amp;page=');
$brands = $class_pb->retrieveList();
function drawBrandCombo($with_show_all, $name, $current_brand, $params = '')
{
    global $brands;
    $brand_combo = '<select name="' . $name . '" ' . $params . '>';
    $selected = 'selected="selected"';
    if ($with_show_all) {
        $brand_combo .= '<option value="" ' . $sel . '>Please select a logo option...</option>';
    }
    $sel = $current_brand == 'N' ? $selected : '';
    $brand_combo .= '<option value="N" ' . $sel . '>No Logo</option>';
    $sel = $current_brand == '0' ? $selected : '';
    $brand_combo .= '<option value="0" ' . $sel . '>JULIE &amp; GRACE</option>';
    foreach ($brands as $b) {
        $sel = $current_brand == $b['products_brand_id'] ? $selected : '';
        $brand_combo .= '<option value="' . $b['products_brand_id'] . '" ' . $sel . '>' . $b['brand_name'] . '</option>';
Esempio n. 5
0
 function retrieveListProductOverview_drawFilter($ean_list = null, $date_start = null, $date_end = null, $brand_id = null, $cat_id = null)
 {
     use_class('products_brand');
     $class_pb = new products_brand();
     $brands = $class_pb->retrieveList("active_status='1'");
     $brand_options = array();
     $brand_options[0] = 'Show All Brands';
     foreach ($brands as $b) {
         $brand_options[$b['products_brand_id']] = $b['brand_name'];
     }
     $filter_brand = '<select name="brand_id">' . loadComboListFromArray($brand_options, null, $brand_id, false) . '</select>';
     $filter_category = comboProductsCategory('cat_id', 'cat_id', $cat_id, '', '', 'Show All Category');
     $filter_prod_search = '<input type="text" name="ean_list" class="product-id input2" value="' . $ean_list . '" />';
     $filter_range_date = '<input name="date_range_start" class="date_picker" value="' . $date_start . '"/>';
     $filter_range_date .= ' to ';
     $filter_range_date .= '<input name="date_range_end" class="date_picker" value="' . $date_end . '"/>';
     $filter_range_date .= ' <input type="button" value="Go" class="date_range_go" title="Apply lead time start date filter" />';
     $filter_range_date .= ' <input type="button" value="Clear" class="date_range_clear" title="Clear lead time start date filter" />';
     $result .= '<div style="margin-bottom:10px;">';
     $result .= '<table border="0" cellpadding="0" cellspacing="0">';
     $result .= '<tr>';
     $result .= '<td rowspan="2" class="w080 bold" style="v-align:middle;">Filter by:</td>';
     $result .= '<td class="bold">Brand</td>';
     $result .= '<td class="bold">Category</td>';
     $result .= '<td class="bold">Product ID/EAN <span class="notice smallText" style="font-weight:normal;">(press <em>Enter</em> to filter)</span></td>';
     $result .= '<td class="bold">Lead Time Start Date</td>';
     $result .= '</tr>';
     $result .= '<tr><td>' . $filter_brand . '</td><td>' . $filter_category . '</td><td>' . $filter_prod_search . '</td><td>' . $filter_range_date . '</td></tr>';
     $result .= '</table></div>';
     return $result;
 }
Esempio n. 6
0
 function manageOrderList_drawFilter($dpo_option = 'ALL', $dpo_group = '', $ean_list = null, $date_start = null, $date_end = null, $brand_id = null, $cat_id = null)
 {
     $dpo_options = array();
     $dpo_options['ALL'] = 'All Depot Orders';
     $dpo_options['MMO'] = 'Missing Mixed Orders';
     $dpo_options['MAN'] = 'Manual Refill Orders';
     $dpo_options['OUT'] = 'Outsourcing Refill Orders';
     $dpo_options['REF'] = 'Auto Refill Orders (ALL)';
     $dpo_options['RFD'] = 'Auto Refill Orders (Daily)';
     $dpo_options['RFZ'] = 'Auto Refill Orders (Zalando)';
     $dpo_options['NRA'] = 'Non-Refill Orders (ALL)';
     $dpo_options['NRI'] = 'Non-Refill Orders (Internal)';
     $dpo_options['NRO'] = 'Non-Refill Orders (Outsourcing)';
     $dpo_options['GRP'] = 'Specific Name';
     $dpo_grp_options = array();
     $dpo_grp_options = $this->retrieveGroupNameList();
     if (count($dpo_grp_options) == 0) {
         $dpo_grp_options[] = 'No Specific Name found, please use other filter';
     } else {
         array_unshift($dpo_grp_options, 'Select a name from the list');
     }
     $show_group = array('NRA', 'NRI', 'NRO', 'GRP');
     $show_group_combo = in_array($dpo_option, $show_group) ? '' : ' style="display:none;"';
     use_class('products_brand');
     $class_pb = new products_brand();
     $brands = $class_pb->retrieveList("active_status='1'");
     $brand_options = array();
     $brand_options[0] = 'Show All Brands';
     foreach ($brands as $b) {
         $brand_options[$b['products_brand_id']] = $b['brand_name'];
     }
     $filter_dpo = '<select class="orders-dpoo">' . loadComboListFromArray($dpo_options, null, $dpo_option, false) . '</select>';
     $filter_dpo .= '<select class="orders-dpoo-group"' . $show_group_combo . '>' . loadComboListFromArray($dpo_grp_options, $dpo_group, null, false) . '</select>';
     $filter_brand = '<select name="brand_id">' . loadComboListFromArray($brand_options, null, $brand_id, false) . '</select>';
     $filter_category = comboProductsCategory('cat_id', 'cat_id', $cat_id, '', '', 'Show All Category');
     $filter_prod_search = '<input type="text" name="ean_list" class="product-id input2" value="' . $ean_list . '" />';
     $filter_range_date = '<input name="date_range_start" class="date_picker" value="' . $date_start . '"/>';
     $filter_range_date .= ' to ';
     $filter_range_date .= '<input name="date_range_end" class="date_picker" value="' . $date_end . '"/>';
     $filter_range_date .= ' <input type="button" value="Go" class="date_range_go" title="Apply lead time start date filter" />';
     $filter_range_date .= ' <input type="button" value="Clear" class="date_range_clear" title="Clear lead time start date filter" />';
     $result .= '<div style="margin-bottom:10px;">';
     $result .= '<table border="0" cellpadding="0" cellspacing="0">';
     $result .= '<tr>';
     $result .= '<td rowspan="2" class="w080 bold" style="v-align:middle;">Filter by:</td>';
     $result .= '<td class="bold">Depot Order Type</td>';
     $result .= '<td class="bold">Brand</td>';
     $result .= '<td class="bold">Category</td>';
     $result .= '<td class="bold">Product ID/EAN <span class="notice smallText" style="font-weight:normal;">(press <em>Enter</em> to filter)</span></td>';
     $result .= '<td class="bold">Lead Time Start Date</td>';
     $result .= '</tr>';
     $result .= '<tr><td>' . $filter_dpo . '</td><td>' . $filter_brand . '</td><td>' . $filter_category . '</td><td>' . $filter_prod_search . '</td><td>' . $filter_range_date . '</td></tr>';
     $result .= '</table></div>';
     return $result;
 }
<?php

/**
 * Description of scorecardproductsmanagement
 *
 * @author IT TEAM BONOFACTUM
 * @created Jul 8, 2013 3:28:10 PM
 */
use_class('products_brand');
use_class('scorecard');
$class_pb = new products_brand();
$brandlist = $class_pb->retrieveList();
$year_period = date('Y');
$year_previous = strval(intval($year_period) - 1);
$current_month = date('m');
$categories_active = load_config('products-categories-sorting');
if (isset($_POST['me_action'])) {
    if ($_POST['me_action'] == 'LOADTABLES') {
        $def_col_width = ' w080';
        $classname_label = 'label w150';
        $periods = array();
        $periods_plan = array();
        for ($m = 1; $m <= 12; $m++) {
            $year = $year_previous;
            $month = str_pad($m, 2, '0', STR_PAD_LEFT);
            $p = $year . $month;
            $periods[] = $p;
            $periods_name[$p] = date('My', strtotime($year . '-' . $month . '-01'));
        }
        for ($m = 1; $m <= 12; $m++) {
            $year = $year_period;
Esempio n. 8
0
 function generateBarcode($barcode_type, $barcode_id, $label_data = '', $printer_resolution = '')
 {
     $result = array();
     $ds = $label_data == '' ? $this->retrieveData($barcode_type, $barcode_id) : $label_data;
     if ($ds != "no data") {
         if ($barcode_type == 'ean13') {
             #$p_ean;$p_category;$p_shortname;$p_price;$order_qty;$sp_id;$p_code;$p_brand;$p_length;$p_targetaudience";
             //list - split is deprecated on php 5, so we change using explode;
             //list($ean13_code,$category,$products_short_name,$price,$qty,$jng_sp_id,$products_code,$products_brand,$products_length,$products_targetaudience) = split(";",$ds);
             $data_source = explode(';', $ds);
             $ean13_code = $data_source[0];
             $category = $this->convertToGermanHex($data_source[1]);
             $products_short_name = $this->convertToGermanHex($data_source[2]);
             $price = $data_source[3];
             $qty = $data_source[4];
             $jng_sp_id = $data_source[5];
             $products_code = $data_source[6];
             $products_brand = $data_source[7];
             $products_length = $data_source[8];
             $products_targetaudience = $this->convertToGermanHex($data_source[9]);
             $products_brand_id = $this->convertToGermanHex($data_source[10]);
             //$amazon_label = ($jng_sp_id=='5');
             $amazon_label = in_array($jng_sp_id, array_keys(getSalesPartnerUseAmazonLogistic()));
             use_class('products_brand');
             $class_pb = new products_brand();
             $brands = $class_pb->retrieveList('need_repackaging=1');
             $brands = array_keys($brands);
             $need_brand_printed = in_array($products_brand_id, $brands);
             //DIAMORE
             if ($qty == 0) {
                 $qty = 1;
             }
             if ($ean13_code != '') {
                 $left_margin_amvd = 30;
                 //IF SUDDENLY HH PRINTED TOO MUCH TO THE RIGHT PLS CHANGE USING 5 AS BELOW
                 //$left_margin_amvd = 5;    //IF SUDDENLY MARGIN GOING LEFT UNTIL TRUNCATE PLS USE 30 AS ABOVE
                 $lbcmd = "^XA";
                 $lbcmd .= "^CI6";
                 //Activate German Character
                 $lbcmd .= "^MTD";
                 //^MTD : Direct Thermal Media; ^MTT : Thermal Transfer Media
                 $lbcmd .= "^MD30";
                 $lbcmd .= "^JWH";
                 $lbcmd .= "^MMT";
                 $lbcmd .= "^MUd,300,300";
                 $lbcmd .= "^LH0,0";
                 $lbcmd .= "^MNY";
                 //$lbcmd .= ($jng_sp_id!='5') ? "^PW800" : "^PW900";    //IF SUDDENLY HH PRINTED TOO MUCH TO THE RIGHT PLS CHANGE USING ^PW900 AS BELOW
                 $lbcmd .= !$amazon_label ? "^PW800" : "^PW900";
                 //IF SUDDENLY HH PRINTED TOO MUCH TO THE RIGHT PLS CHANGE USING ^PW900 AS BELOW
                 //$lbcmd .= "^^PW900";      //Print Width   //IF SUDDENLY MARGIN GOING LEFT UNTIL TRUNCATE PLS USE ^PW800 ^PW900 AS ABOVE
                 //$lbcmd .= "^LL149"; //Label Length, MAX LENGTH is 32000
                 $lbcmd .= "^JMB^FS";
                 //Set dots per milimeter (Big Size of Barcode)
                 //$lbcmd .= "^FO0,30^GB700,110^FS";	#boxes label (temporary)
                 //$lbcmd .= "^FO320,30^GB0,110^FS";	#vertical line / for cutting center(temporary)
                 //$lbcmd .= "^FO210,50^BEN,50,Y,N^FD$ean13_code^FS";	#draw barcode NON AMVD
                 //$lbcmd .= "^FO240,40^BEN,50,Y,N^FD$ean13_code^FS";	#draw barcode AMVD
                 /*
                 if($jng_sp_id<>3){
                         //FORMAT USING PRICE
                         $lbcmd .= "^FO0,50^ADN,1,1^FD$category^FS";
                         $lbcmd .= "^FO0,70^ADN,1,1^FD$material^FS";
                         $lbcmd .= "^FO0,100^ARN,15,4^FD$price^FS";
                 }else{
                 */
                 if ($amazon_label) {
                     /*
                     //FORMAT 1
                     $lbcmd .= "^FO10,25^ADN,1,1^FD$products_brand^FS";
                     $lbcmd .= "^FO10,45^ADN,1,1^FD$products_targetaudience^FS";
                     $lbcmd .= "^FO10,65^ADN,1,1^FD$category $products_length^FS";
                     $lbcmd .= "^FO10,85^ADN,1,1^FD$products_short_name^FS";
                     $lbcmd .= "^FO10,105^ADN,1,1^FD$products_code^FS";
                     */
                     /*
                     //FORMAT 2
                     $lbcmd .= "^FO10,25^ADN,1,1^FD$products_brand^FS";
                     $lbcmd .= "^FO10,45^ADN,1,1^FD$products_targetaudience^FS";
                     $lbcmd .= "^FO10,65^ADN,1,1^FD$category^FS";
                     $lbcmd .= "^FO10,85^ADN,1,1^FD$products_short_name^FS";
                     $lbcmd .= "^FO10,105^ADN,1,1^FD$products_code $products_length^FS";
                     */
                     //FORMAT 3
                     $lbcmd .= "^FO240,40^BY2,3^BEN,50,Y,N^FD{$ean13_code}^FS";
                     //IF SUDDENLY HH PRINTED TOO MUCH TO THE RIGHT PLS CHANGE USING 210 AS BELOW
                     //$lbcmd .= "^FO210,40^BY2,3^BEN,50,Y,N^FD$ean13_code^FS"; #draw barcode AMVD //IF SUDDENLY MARGIN GOING LEFT UNTIL TRUNCATE PLS USE 240 AS ABOVE
                     $lbcmd .= "^FO{$left_margin_amvd},29^ADN,1,1^FD{$products_brand}^FS";
                     $lbcmd .= "^FO{$left_margin_amvd},53^ADN,1,1^FH^FD{$products_targetaudience} {$category}^FS";
                     $lbcmd .= "^FO{$left_margin_amvd},77^ADN,1,1^FH^FD{$products_short_name} {$products_length}^FS";
                     $lbcmd .= "^FO{$left_margin_amvd},101^ADN,1,1^FD{$products_code}^FS";
                 } else {
                     $lbcmd .= "^FO210,50^BEN,50,Y,N^FD{$ean13_code}^FS";
                     #draw barcode NON AMVD
                     //FORMAT NOT USING PRICE
                     if ($need_brand_printed) {
                         $lbcmd .= "^FO0,30^ADN,1,1^FH^FD{$products_brand}^FS";
                         $lbcmd .= "^FO0,60^ADN,1,1^FH^FD{$category} {$products_length}^FS";
                         $lbcmd .= "^FO0,90^ADN,1,1^FH^FD{$products_short_name}^FS";
                         $lbcmd .= "^FO0,120^ADN,1,1^FD{$products_code}^FS";
                     } else {
                         $lbcmd .= "^FO0,40^ADN,1,1^FH^FD{$category} {$products_length}^FS";
                         $lbcmd .= "^FO0,70^ADN,1,1^FH^FD{$products_short_name}^FS";
                         $lbcmd .= "^FO0,100^ADN,1,1^FD{$products_code}^FS";
                     }
                 }
                 //}
                 $lbcmd .= "^XZ";
                 $label = $lbcmd;
                 /*MARKED THIS >> WE ALREADY HANDLE PRINT LOOP BY QTY ON MANOBO CLIENT, AND WE NEED ONLY A SINGLE LABEL FOR EAN LOCAL CACHE
                   for($p=1;$p<=$qty;$p++) $label .= $lbcmd;
                    */
             }
             $label_name = "{$ean13_code}.data";
             $result['qty'] = $qty;
             //number of label will be printed
         } elseif ($barcode_type == 'code39') {
             #date;number;orderseq;nametag;kunde;auftragsnr;lieferscheinnr;qty;artikel
             //list - split is deprecated on php 5, so we change using explode;
             //list($order_date,$order_num,$order_seq,$order_tag,$cust_name,$order_no,$shipment_id,$qty,$article_number,$order_product_id,$partner_type,$ean13_code,$category,$material,$price,$qty13,$jng_sp_id) = split(";",$ds);
             $data_source = explode(';', $ds);
             $order_date = $data_source[0];
             $order_num = $data_source[1];
             $order_seq = $data_source[2];
             $order_tag = $data_source[3];
             $cust_name = $data_source[4];
             $order_no = $data_source[5];
             $shipment_id = $data_source[6];
             $qty = $data_source[7];
             $article_number = $data_source[8];
             $order_product_id = $data_source[9];
             $partner_type = $data_source[10];
             $ean13_code = $data_source[11];
             $category = $data_source[12];
             $material = $data_source[13];
             $price = $data_source[14];
             $qty13 = $data_source[15];
             $jng_sp_id = $data_source[16];
             /*
                             $cust_name = str_replace("ö","oe",$cust_name);
                             $cust_name = str_replace("ä","ae",$cust_name);
                             $cust_name = str_replace("ü","ue",$cust_name);
                             $cust_name = str_replace("ß","ss",$cust_name);
                             $cust_name = str_replace("Ö","Oe",$cust_name);
                             $cust_name = str_replace("Ä","Ae",$cust_name);
                             $cust_name = str_replace("Ü","Ue",$cust_name);
             *
             */
             $label = "^XA";
             if ($printer_resolution == '300') {
                 $label .= "^CI6";
                 //Activate German Character
                 $label .= "^MTD";
                 //^MTD : Direct Thermal Media; ^MTT : Thermal Transfer Media
                 $label .= "^MD15";
                 $label .= "^JWH";
                 $label .= "^MMT";
                 $label .= "^MUd,300,300";
                 $label .= "^LH0,0";
                 //^MNY Media Tracking : non-continuous media web sensing (no need to using ^LL - Label Length);
                 //^MNN Media Tracking : continuous media - no label gap censor (must using ^LL - Label Length)
                 $label .= "^MNY";
                 $label .= "^PW900";
                 $label .= "^JMB^FS";
                 //Set dots per milimeter (Big Size of Barcode)
                 //$label .= "^LL384.5";
                 //$label .= "^FO50,10^ARN,30,18^FD".$order_date." - No. ".sprintf("%03s\n", $order_num)." (".$order_seq.")^FS";
                 $label .= "^FO20,10^APN,25,14^FD{$order_date} - No. " . sprintf("%03s\n", $order_num) . "^FS";
                 $label .= "^FO370,10^APN,25,14^FD{$order_tag}^FS";
                 $label .= "^FO20,60^BY2,3^B3N,N,50,Y,N^FD{$barcode_id}^FS";
                 #draw barcode
                 ##--------------------DETAIL SECTION
                 #Kunde
                 $label .= "^FO20,160^APN,25,14^FDKunde^FS";
                 $label .= "^FO210,160^APN,25,14^FD:^FS";
                 $label .= "^FO230,160^APN,25,14^FH^FD" . $this->convertToGermanHex($cust_name) . "^FS";
                 #Auftragsnr
                 $label .= "^FO20,190^APN,25,14^FDAuftragsnr^FS";
                 $label .= "^FO210,190^APN,25,14^FD:^FS";
                 $label .= "^FO230,190^APN,25,14^FD{$order_no}^FS";
                 if ($shipment_id != '') {
                     #Lieferscheinnr
                     $label .= "^FO20,220^APN,25,14^FDLieferscheinnr^FS";
                     $label .= "^FO210,220^APN,25,14^FD:^FS";
                     $label .= "^FO230,220^APN,25,14^FD{$shipment_id}^FS";
                     #Artikel
                     /*
                                             $label .= "^FO20,250^APN,25,14^FDArtikel^FS";
                                             $label .= "^FO210,250^APN,25,14^FD:^FS";
                                             $label .= "^FO230,250^APN,25,14^FD$article_number^FS";
                     */
                 }
                 /*else{
                       #Artikel
                       $label .= "^FO20,220^APN,25,14^FDArtikel^FS";
                       $label .= "^FO210,220^APN,25,14^FD:^FS";
                       $label .= "^FO230,220^APN,25,14^FD$article_number^FS";
                   }*/
             } else {
                 $label .= "^CI6";
                 //Activate German Character
                 $label .= "^MTD";
                 //^MTD : Direct Thermal Media; ^MTT : Thermal Transfer Media
                 $label .= "^MD10";
                 $label .= "^JWH";
                 $label .= "^MUd,203,203";
                 $label .= "^JM10000";
                 $label .= "^LH0,0";
                 //^MNY Media Tracking : non-continuous media web sensing (no need to using ^LL - Label Length);
                 //^MNN Media Tracking : continuous media - no label gap censor (must using ^LL - Label Length)
                 $label .= "^MNN";
                 $label .= "^LL384.5";
                 //$label .= "^FO50,10^ARN,30,18^FD".$order_date." - No. ".sprintf("%03s\n", $order_num)." (".$order_seq.")^FS";
                 $label .= "^FO50,10^ARN,30,18^FD{$order_date} - No. " . sprintf("%03s\n", $order_num) . "^FS";
                 $label .= "^FO500,10^ARN,30,18^FD{$order_tag}^FS";
                 $label .= "^FO50,60^BY3^B3N,N,100,Y,N^FD{$barcode_id}^FS";
                 #draw barcode
                 ##--------------------DETAIL SECTION
                 #Kunde
                 $label .= "^FO50,210^ARN,25,14^FDKunde^FS";
                 $label .= "^FO240,210^ARN,25,14^FD:^FS";
                 $label .= "^FO260,210^ARN,25,14^FH^FD" . $this->convertToGermanHex($cust_name) . "^FS";
                 #Auftragsnr
                 $label .= "^FO50,240^ARN,25,14^FDAuftragsnr^FS";
                 $label .= "^FO240,240^ARN,25,14^FD:^FS";
                 $label .= "^FO260,240^ARN,25,14^FD{$order_no}^FS";
                 if ($shipment_id != '') {
                     #Lieferscheinnr
                     $label .= "^FO50,270^ARN,25,14^FDLieferscheinnr^FS";
                     $label .= "^FO240,270^ARN,25,14^FD:^FS";
                     $label .= "^FO260,270^ARN,25,14^FD{$shipment_id}^FS";
                     #Artikel
                     /*
                                             $label .= "^FO50,300^ARN,25,14^FDArtikel^FS";
                                             $label .= "^FO240,300^ARN,25,14^FD:^FS";
                                             $label .= "^FO260,300^ARN,25,14^FD$article_number^FS";
                     */
                 }
                 /*else{
                       #Artikel
                       $label .= "^FO50,270^ARN,25,14^FDArtikel^FS";
                       $label .= "^FO240,270^ARN,25,14^FD:^FS";
                       $label .= "^FO260,270^ARN,25,14^FD$article_number^FS";
                   }*/
             }
             $label .= "^XZ";
             $file_postfix = $printer_resolution == '300' ? '' : $printer_resolution;
             $label_name = strtoupper($partner_type) . "-{$order_product_id}.data{$file_postfix}";
         }
         $result['barcode_type'] = $barcode_type;
         $result['label'] = $label;
         $result['label_name'] = $label_name;
     } else {
         $result['label'] = $ds;
     }
     return $result;
 }
Esempio n. 9
0
 function manageOrderList_drawFilter($jng_sp_id, $ean_list = null, $date_start = null, $date_end = null, $brand_id = null, $cat_id = null, $orders_no = '')
 {
     use_class('jng_sp');
     use_class('products_brand');
     $class_sp = new jng_sp();
     $class_pb = new products_brand();
     $spdata = $class_sp->retrieveList();
     $brands = $class_pb->retrieveList("active_status='1'");
     array_unshift($spdata, array('jng_sp_id' => '0', 'name' => 'All Sales Partners'));
     $filter_sp = $class_sp->drawCombo($spdata, $jng_sp_id, '', 'jng_sp_id', 'orders-spid');
     $brand_options = array();
     $brand_options[0] = 'Show All Brands';
     foreach ($brands as $b) {
         $brand_options[$b['products_brand_id']] = $b['brand_name'];
     }
     $filter_brand = '<select name="brand_id">' . loadComboListFromArray($brand_options, null, $brand_id, false) . '</select>';
     $filter_category = comboProductsCategory('cat_id', 'cat_id', $cat_id, '', '', 'Show All Category');
     $filter_prod_search = '<input type="text" name="ean_list" class="product-id input" value="' . $ean_list . '" />';
     $filter_range_date = '<input name="date_range_start" class="date_picker" value="' . $date_start . '"/>';
     $filter_range_date .= ' to <input name="date_range_end" class="date_picker" value="' . $date_end . '"/>';
     $filter_range_date .= ' <input type="button" value="Go" class="date_range_go" title="Apply lead time start date filter" />';
     $filter_range_date .= ' <input type="button" value="Clear" class="date_range_clear" title="Clear lead time start date filter" />';
     $filter_orders_no = '<input type="text" name="orders_no" class="orders-no" value="' . (is_array($orders_no) ? implode(",", $orders_no) : $orders_no) . '" />';
     $enter_info = '<span class="notice smallText" style="font-weight:normal;">(press <em>Enter</em> to filter)</span>';
     $result .= '<div style="margin-bottom:10px;">';
     $result .= '<table border="0" cellpadding="0" cellspacing="0">';
     $result .= '<tr>';
     $result .= '<td rowspan="2" class="w080 bold" style="v-align:middle;">Filter by:</td>';
     $result .= '<td class="bold">Sales Partner</td>';
     $result .= '<td class="bold">Brand</td>';
     $result .= '<td class="bold">Category</td>';
     $result .= '<td class="bold">Product ID/EAN ' . $enter_info . '</td>';
     $result .= '<td class="bold">Order No. ' . $enter_info . '</td>';
     $result .= '<td class="bold">Lead Time Start Date</td>';
     $result .= '</tr>';
     $result .= '<tr><td>' . $filter_sp . '</td><td>' . $filter_brand . '</td><td>' . $filter_category . '</td><td>' . $filter_prod_search . '</td><td>' . $filter_orders_no . '</td><td>' . $filter_range_date . '</td></tr>';
     $result .= '</table></div>';
     return $result;
 }