$box_date = date('d. M', $order_date); //Retrieve all products from the order $items = $class_o->retrieveProducts($order['orders_id']); foreach ($items as $key => $i) { //Exclude any canceled and complete products $iscanceled = $class_o->productStatusIsCancelled($i['status']); $iscomplete = $i['status'] == '9' || $i['status'] == '11'; if ($iscanceled || $iscomplete) { unset($items[$key]); } else { $items[$key]['products_ean'] = $class_ean->getEAN($i['products_id'], $i['products_articles_id']); } } if ($item['order_item_total'] == '1' || count($items) == 1) { //If order only consist of 1 product $packages = $class_mp->getUsablePackages(); if (count($packages) == 0) { //If no usable package found for JNG, create 1 $package_id = $class_mp->createNew(); } else { //If usable package found fo JNG, use it $package_id = $packages[0]['packages_id']; } //Add product to package and update product status $class_mp->addItem($package_id, $id); $class_o->updateProductStatus($id, $new_status, $session_userinfo['username']); $result .= printPackageTip('P', $box_date, '', $sp_name, $sp_class); saveIDforPrintingOrderLabel($id_raw); $result .= '<input type="hidden" id="print_order_id" value="' . $id_raw . '" />'; } else { //If order has more than 1 product, check if all products status are finish
function retrieveListProductOverview($status, $ean_list = '', $date_start = null, $date_end = null, $brand_id = null, $cat_id = null) { use_class('payone_invoice'); //use_class('product'); use_class('Product'); global $STOCKLESS_ELEMENTS_CATEGORY, $PROD_SUBSTATUS_USE_LINE; $USE_ORDER_FILTER_TO_ALLOW_PRINTING_PI = false; $filter_date_shown = ($status < 2 or $status > 7) ? 'Date' : 'Started Date'; $show_stock_status = $status == '1' || $status == '2' || $status == '3' || $status == '4' || $status == '8'; $orders_products = $this->retrieveOrdersProducts($status, $ean_list, $date_start, $date_end, $brand_id, $cat_id); list($status, $sub_status) = explode('-', $status); $filters = $this->retrieveListProductOverview_drawFilter($ean_list, $date_start, $date_end, $brand_id, $cat_id); $result = ''; if (count($orders_products) > 0) { use_class('products_minierp'); $class_pm = new products_minierp(); if ($status == '5') { //Query Package for Finish Products use_class('minierp_packages'); $class_mp = new minierp_packages(); $usable_packages = $class_mp->getUsablePackages(); $packages_exist = count($usable_packages) > 0; } $orders = array(); $orders_items = array(); $orders_onhold_notice = array(); $orders_vorkasse_unpaid = array(); $orders_vorkasse_notice = array(); $order_pi_print_count = array(); $order_pi_ready = array(); $order_pi_collection = array(); $order_pi_unscanned = array(); $header = array(); //$header['d'] = (($status < 2) OR ($status > 7)) ? 'Date' : 'Lead Time'; //if (!(($status < 2) OR ($status > 7))) $header['d2'] = 'Started Date'; $header['d'] = $status > 9 ? 'Date' : 'Lead Time'; if ($status <= 9) { $header['d2'] = 'Cycle Time'; } $header['r'] = 'Source'; $header['c'] = 'Customer / Order No'; $header['o'] = 'Order ID'; $header['a'] = 'Product Code'; $header['e'] = 'Customized'; $header['p'] = 'Price'; $header['q'] = 'Qty'; if ($show_stock_status) { $header['s'] = $status == '8' ? 'Status' : 'Stock'; } if ($status == '3') { $header['pc1'] = '<abbr title="PI has been sent to PRINTER by MC">P</abbr>'; $header['pc2'] = '<abbr title="PI has been SCANNED for EAN label in MC">S</abbr>'; } $sub_status = trim($sub_status); $sub_prod_show_line_only = in_array($sub_status[0], $PROD_SUBSTATUS_USE_LINE); if ($status == '4' && $sub_prod_show_line_only) { $header['g'] = 'Status'; } $header['t'] = 'Action'; $timestamp = date('Y-m-d H:i:s'); foreach ($orders_products as $row) { $oiid = $row['orders_products_id']; $orders_items[$oiid] = $row; $oid = $row['orders_id']; $order_pi_print_count[$oid][$oiid] = $row['print_count']; $order_pi_unscanned[$oid][$oiid] = $row['print_confirmed']; if (!isset($order_pi_collection[$oid])) { $order_pi_ready[$oid] = false; $order_pi_collection[$oid] = array(); } $order_pi_collection[$oid][] = $row['orders_products_id']; if (count($order_pi_collection[$oid]) == $row['order_item_total']) { $order_pi_ready[$oid] = true; if (orderItemHaveStatus($oid, 10, 'JG')) { $order_pi_ready[$oid] = false; } } $products_id = $row['products_id']; $articles_id = $row['products_articles_id']; //$obj_product = new product($products_id); $obj_product = new Product($products_id); $order_vorkasse_unpaid = $row['payment_method'] == PAYMENT_METHOD_BANK_TRANSFER && $row['paid_status'] == '0'; $order_date = strtotime($row['date_purchased']); $o = array(); $date_used = $status < 3 ? strtotime($row['status_date']) : strtotime($row['prod_target_in']); /* if (($status < 2) OR ($status > 7)) { $value_date = date('d-M-y', $order_date); } else { $value_date = displayLeadTime($row['prod_target_in'], $date_used); } $o['d'] = $value_date; */ $o['d'] = $order_vorkasse_unpaid ? date('d-M-y', $order_date) : displayLeadTime($row['leadtime_start_date'], strtotime($row['leadtime_start_date'])); if ($status <= 9 && !$order_vorkasse_unpaid) { $previous_moved_date = $status == 4 ? $row['status_date_prod'] : $row['status_date']; $o['d2'] = displayCycleTime($previous_moved_date); } $o['r'] = $row['dti_referrers_code'] == '' ? '<span class="notice">julie-grace.de</span>' : $row['dti_referrers_code']; $cust = '<a href="?open=customer&id=' . $row['customers_id'] . '&hidemenu=true" class="view_webpage" >' . $row['customers_name'] . '</a> <sup>' . $row['customers_order_count'] . '</sup>'; $crown_img_col = array('V' => 'vip', 'B' => 'black'); if ($row['list_type'] != '' && array_key_exists($row['list_type'], $crown_img_col)) { $crown_img_title = array('V' => 'VIP Customer', 'B' => 'Blacklist Customer'); $crown_img = '<a href="?open=customers-special-detail&id=' . $row['customers_id'] . '&hidemenu=true" class="view_webpage">'; $crown_img .= '<img src="images/list-' . $crown_img_col[$row['list_type']] . '.gif" title="' . $crown_img_title[$row['list_type']] . '" />'; $crown_img .= '</a> '; $cust = $crown_img . $cust; } $orders_products_id = 'JG-' . $row['orders_products_id']; $orders_products_id = '<a href="?open=order-history&opid=' . $row['orders_products_id'] . '&hidemenu=true" class="view_webpage">' . $orders_products_id . '</a>'; $order_no = '<a href="?open=customer-care-order-detail&source=JG&id=' . $row['orders_id'] . '&hidemenu=true" class="view_webpage">' . $row['orders_no'] . '</a>'; if ($row['order_item_total'] > 1) { $orders_products_id .= " <sup>{$row['order_item_count']}/{$row['order_item_total']}</sup>"; } if ($row['products_problem'] != '0') { $rep_img = array('R' => 'icon-hazard', 'W' => 'icon-hazard-red'); $return = $this->retrieveReturnDetailLatest($row['orders_products_id']); $return_id = $return['orders_products_return_id']; $order_no = '<a href="?open=order-return&id=' . $return_id . '&hidemenu=true" class="view_webpage" title="View Return Detail"><img src="images/' . $rep_img[$row['products_problem']] . '.png" class="repro-' . $row['products_problem'] . '"/></a> ' . $order_id; } $o['c'] = $cust . '<br /><small>order no:</small> ' . $order_no; $o['o'] = $orders_products_id; $promod = $row['products_model']; if ($row['products_length'] > 0) { $promod .= '_' . textLength($row['products_length'], false); } $product = '<div><a href="?open=product-detail&products_id=' . $row['products_id'] . '" target="_blank" title="View product detail">' . $promod . '</a></div>'; $pimg = webImageSource($row['products_image'], '500'); if ($pimg != '') { // $dbqtooltip = tep_db_query("SELECT SUM(total_sold) total_sold, AVG(returned_rate) returned_rate, MAX(active_age) active_age FROM jng_sp_catalog WHERE products_id = $row[products_id] GROUP BY products_id"); // $restooltip = tep_db_fetch_array($dbqtooltip); /* $thumb_title = 'Tot.Sold: '.floor($restooltip['total_sold']); $thumb_title .= ' • Returns: '.number_format($restooltip['returned_rate'],1); $thumb_title .= '% • Age: '.intval($restooltip['active_age']).' days'; */ // $restooltip['sold_monthly_1'] = $row['sold_monthly_1']; // $thumb_title = displayTooltipThumb($restooltip); $thumb = '<div class="thumb" thumbid="' . "{$products_id}-{$articles_id}" . '"><a href="' . $pimg . '" class="view_image" title="' . $thumb_title . '">' . webImage($row['products_image'], '80', '80', '', 'img-border img-padding') . '</a></div>'; $product = $thumb . $product; } //$diamond_icon = ($obj_product->brand_id == 14) ? drawDiamondIcon('Diamond Product', ' ') : ''; $diamond_icon = $obj_product->isUsingDiamond() ? drawDiamondIcon('Diamond Product', ' ') : ''; $gold_icon = drawGoldIcon($obj_product->metal_stamp_code, $obj_product->metal_stamp_info, '', ' '); $icons = $gold_icon . $diamond_icon; $o['a'] = drawTableArticleInfoWithIcons($product, $icons); $customized = ''; if ($row['customers_image_id'] != '') { $custom_image = '<a class="view_webpage" href="?open=customers-images&id=' . $row['customers_image_id'] . '&hidemenu=true" title="View uploaded image and comment">'; $custom_image .= '<span class="thumb" style="display:none;">'; $custom_image .= webImage($row['customers_image'], '80', '80', '', 'img-border img-padding'); $custom_image .= '<br /></span>'; $custom_image .= '<span>Image</span></a>'; $customized = $custom_image; } if ($row['customers_text_id'] != '') { $custom_text = array(); $custom_text[] = $row['customers_text_line1']; if ($row['customers_text_line2'] != '') { $custom_text[] = $row['customers_text_line2']; } $customized = implode('<br />', $custom_text); } if ($customized == '') { $customized = ' '; } $o['e'] = $customized; $o['p'] = number_format($row['final_price'], 2); $o['q'] = $row['products_quantity']; $action = ''; // $el_link = '<a href="?open=elements-stock&products_id='.$products_id.'&hidemenu=true" class="view_webpage"></a>'; //PREVIOUS $el_link = '<a href="?open=products-elements-stock&products_id=' . $products_id . '&paid=' . $row['products_articles_id'] . '&qty=' . $row['products_quantity'] . '&status=' . $row['stock_status'] . '&hidemenu=true" class="view_webpage"></a>'; $pr_link = '<a href="javascript:void();" onclick="alert(\'Please use Finish Good Stock\');"></a>'; $dp_link = '<a href="javascript:void();" onclick="alert(\'Please use Depot Stock\');"></a>'; switch ($row['stock_status']) { case '0': $stock_status = '<strong class="red">!</strong>'; if ($status == '8') { //$do_status = statusNameShort($row['depot_orders_status']); $do_status = $row['depot_orders_status'] == '4' && isset($row['depot_orders_prod_status']) && $row['depot_orders_prod_status'] != '' ? statusNameProduction($row['depot_orders_prod_status'], false, true) : statusNameShort($row['depot_orders_status']); if (!is_array($do_status)) { //$stock_status = '<span class="red">'.$do_status.'</span>'; $stock_status = '<a href="?open=depot-order&id=' . $row['depot_orders_id'] . '&hidemenu=true" title="MMO product, current status is ' . $do_status . '" class="red view_webpage">' . $do_status . '</a>'; } } break; case 'R': $show_btn_inprod = true; $stock_status = $el_link . '<abbr title="Element Stock OK, Ready for Production" class="green">OK</abbr>'; break; case 'S': $show_btn_insrcn = true; $stock_status = $el_link . '<abbr title="Element Stock Need Sourcing" class="red">NS</abbr>'; break; case 'P': $show_btn_inprod = true; $stock_status = $pr_link . '<abbr title="Use Finished Goods Stock" class="green">FG</abbr>'; break; case 'D': if (is_null($row['depot_orders_id'])) { $stock_status = $dp_link . '<abbr title="Use Depot Stock" class="green">DS</abbr>'; } else { $stock_status = '<a href="?open=depot-order&id=' . $row['depot_orders_id'] . '&hidemenu=true" class="green view_webpage">DS</a>'; } break; case 'W': $stock_status = $el_link . '<abbr title="Product is using Wholesale Element" class="red">WP</abbr>'; break; default: $stock_status = '<strong class="red">?</strong>'; } if ($show_stock_status) { $o['s'] = $stock_status; } if ($status == '3') { $o['pc1'] = $row['print_count'] > 0 ? '<img title="Printed ' . $row['print_count'] . ' time(s)" src="images/icon-tick.png">' : '<img title="Not yet printed" src="images/icon-tick-dis.png">'; $o['pc2'] = $row['print_confirmed'] > 0 ? '<img title="Scanned ' . $row['print_confirmed'] . ' time(s)" src="images/icon-tick.png">' : '<img title="Not yet scanned" src="images/icon-tick-dis.png">'; } if ($status == '4' && $sub_prod_show_line_only) { $o['g'] = isset($row['prod_status']) && $row['prod_status'] != '' ? strtoupper(statusNameProduction($row['prod_status'], true)) : ''; } $disabled = $this->isDelayInfoSent($row['orders_products_id']) ? 'disabled="disabled"' : ''; $late_button = '<input type="button" class="actbtn" name="delay" value="Delay" title="Inform Customer about delivery delay" ' . $disabled . ' />'; // if($row['status']<='2' && !$order_vorkasse_unpaid) $action .= '<input type="button" class="actbtn" name="3" value="Ready" title="Set to Ready for Production" />'; if ($row['status'] == '1') { if ($row['payment_method'] == PAYMENT_METHOD_BANK_TRANSFER && $row['paid_status'] == '0') { $order_vorkasse_unpaid = true; } if (!$order_vorkasse_unpaid) { //$action .= '<input type="button" class="actbtn" name="4" value="PI & Set2Prod" title="Print PI and Set to In Production" />'; //$action .= '<input type="button" class="actbtn" name="10" value="Cancel" title="Add this product to Cancel Request List" />'; if ($row['stock_status'] == 'P' || $row['stock_status'] == 'R' || $row['stock_status'] == 'W') { $action .= '<input type="button" class="actbtn green" name="3" value="Ready" title="Set to Ready for Production" style="width:70px;" />'; } elseif ($row['stock_status'] == 'S') { $action .= '<input type="button" class="actbtn red" name="2" value="Sourcing" title="Set to In Sourcing" style="width:70px;" />'; } $action .= '<input type="button" class="actbtn" name="10" value="Cancel" title="Cancel this product" />'; } else { if ($row['last_sent_date'] == '') { $action .= '<span class="green">Reminder Not Sent</span>'; /* if(!in_array($row['orders_id'],$orders_vorkasse_notice)) { $orders_vorkasse_notice[] = $row['orders_id']; $action .= '<input type="button" class="actbtn" name="reminder" value="Reminder" title="Send payment reminder to customer" />'; } else { $action .= '<input type="button" value="Reminder" disabled="disabled" />'; } */ } else { $overtime = strtotime($row['last_sent_date']) < strtotime('-' . PAYMENT_METHOD_BANK_TRANSFER_OVERDUE); if ($row['sent_count'] > 1) { $action .= '<span class="red">Cancel Notification Sent</span>'; } else { $action .= '<span class="blue">Reminder Sent</span>'; } /* if(!in_array($row['orders_id'],$orders_vorkasse_notice) && $overtime) { $orders_vorkasse_notice[] = $row['orders_id']; $action .= '<input type="button" class="actbtn red" name="unpaidcancel" value="CANCEL" title="Cancel order and send email notification to customer" />'; } else { $btn_text = ($overtime) ? 'CANCEL' : 'Reminder Sent'; $action .= '<input type="button" value="'.$btn_text.'" disabled="disabled" />'; } */ } } } if ($row['status'] == '2') { $action .= '<input type="button" class="actbtn" name="3" value="Ready" title="Set to Ready for Production" />'; $action .= $late_button; $action .= '<input type="button" class="actbtn" name="1" value="N" title="Set back to New" />'; $action .= '<input type="button" class="actbtn" name="10" value="C" title="Cancel this product" />'; } if ($row['status'] == '3') { //$action .= '<input type="button" class="actbtn" name="4" value="PI & Set2Prod" title="Print PI and Set to In Production" />'; //$action .= $late_button; if (!$USE_ORDER_FILTER_TO_ALLOW_PRINTING_PI) { $hid = ''; $action .= '<input type="button" class="actbtn" name="printpi" value="Print PI" title="Print Production Instruction" ' . $hid . '/>'; $action .= '<input type="hidden" name="oi_id_cols" value="' . $row['orders_products_id'] . '" />'; } //$action .= '<input type="button" class="actbtn" name="1" value="N" title="Set back to New" />'; $action .= '<input type="button" class="actbtn" name="10" value="C" title="Add this product to Cancel Request List" />'; $action .= '<input type="button" class="actbtn" name="2" value="S" title="Set to In Sourcing" />'; } if ($row['status'] == '4') { $action .= '<input type="button" class="actbtn" name="5" value="Finish" title="Set to Finish" />'; $action .= $late_button; $action .= '<input type="button" class="actbtn" name="4" value="PI" title="Reprint Production Instruction" />'; // $action .= '<input type="button" class="actbtn" name="13" value="H" title="Set to On Hold" />'; $action .= '<input type="button" class="actbtn" name="2" value="S" title="Set to In Sourcing" />'; $action .= '<input type="button" class="actbtn" name="10" value="C" title="Add this product to Cancel Request List" />'; $prod_sub_status = getProductionSubStatus(4); if (count($prod_sub_status) > 0) { $action .= '<br/>'; } foreach ($prod_sub_status as $pss => $pss_name) { if (in_array($pss, $PROD_SUBSTATUS_USE_LINE)) { continue; } if ($pss == $sub_status[0]) { continue; } $action .= '<input type="button" class="actbtn" name="4-' . $pss . '" value="' . $pss . '" title="Moved to ' . $pss_name . '" />'; } } if ($row['status'] == '5') { if ($order_vorkasse_unpaid) { if ($row['last_sent_date'] == '') { if (!in_array($row['orders_id'], $orders_vorkasse_notice)) { $orders_vorkasse_notice[] = $row['orders_id']; $action .= '<input type="button" class="actbtn" name="reminder" value="Reminder" title="Send payment reminder to customer" />'; } else { $action .= '<input type="button" value="Reminder" disabled="disabled" />'; } } else { $overtime = strtotime($row['last_sent_date']) < strtotime('-' . PAYMENT_METHOD_BANK_TRANSFER_OVERDUE); if (!in_array($row['orders_id'], $orders_vorkasse_notice) && $overtime) { $orders_vorkasse_notice[] = $row['orders_id']; if ($row['sent_count'] == '1') { $action .= '<input type="button" class="actbtn" name="reminder2" value="Reminder 2" title="Send 2nd payment reminder to customer" />'; } else { $action .= '<input type="button" class="actbtn red" name="unpaidcancel" value="CANCEL" title="Cancel order and send email notification to customer" />'; } } else { if ($overtime) { $btn_text = $row['sent_count'] == '1' ? 'Reminder 2' : 'CANCEL'; } else { $btn_text = $row['sent_count'] == '1' ? 'Reminder' : 'Reminder 2'; } $action .= '<input type="button" value="' . $btn_text . '" disabled="disabled" />'; } } } else { $action .= '<input type="button" class="actbtn" name="6" value="Package" title="Add to Selected Package" ' . (!$packages_exist ? 'style="display:none;"' : '') . ' />'; $disabled = $this->isDelayInfoSent($row['orders_products_id']) ? 'disabled="disabled"' : ''; $action .= '<input type="button" class="actbtn" name="delay" value="Delay" title="Inform Customer about delivery delay" ' . $disabled . ' />'; } $action .= '<input type="button" class="actbtn" name="4-P" value="Prod" title="Set back to Production" />'; $action .= '<input type="button" class="actbtn" name="10" value="C" title="Add this product to Cancel Request List" />'; } if ($row['status'] == '8') { $action .= '<input type="button" class="actbtn" name="10" value="Cancel" title="Add this product to Cancel Request List" />'; } if ($row['status'] == '13') { $action .= '<input type="button" class="actbtn" name="5" value="Finish" title="Set to Finish" />'; if ($row['last_sent_date'] == '' && !in_array($row['orders_id'], $orders_onhold_notice)) { $orders_onhold_notice[] = $row['orders_id']; $action .= '<input type="button" class="actbtn" name="holdnotice" value="Notify" title="Send on Hold notice to customer" />'; } else { $action .= '<input type="button" value="Notify" disabled="disabled" />'; } $action .= '<input type="button" class="actbtn" name="10" value="C" title="Add this product to Cancel Request List" />'; } //Default Row Action Value (id, status) $action .= '<input type="hidden" id="opid-' . $row['orders_products_id'] . '" name="op_id" value="' . $row['orders_products_id'] . '" />'; $action .= '<input type="hidden" name="op_status" value="' . $row['status'] . '" />'; $action .= '<input type="hidden" name="csl_type" value="' . ($order_vorkasse_unpaid ? 'B' : $row['list_type']) . '" />'; if ($show_stock_status) { $action .= '<input type="hidden" name="oi_stock_status" value="' . $row['stock_status'] . '" >'; } $o['t'] = $action; if ($order_vorkasse_unpaid) { $orders_vorkasse_unpaid[$row['orders_products_id']] = $o; } else { $orders[$row['orders_products_id']] = $o; } } $buttons = ''; switch ($status) { case '1': /* $buttons .= 'Product Amount: <input type="text" class="iwbutton" id="pi_print_amount" name="ppa" value="10" title="Set number of products to print" style="width:50px;text-align=center;" />'; $buttons .= ' <input type="button" class="grpbtn button" name="printmultpi" value="Print PI and set to Production" title="Print Production Instruction of a set number of products" />'; * */ break; case '3': //if(!$USE_ORDER_FILTER_TO_ALLOW_PRINTING_PI) { // $buttons .= '<input type="button" class="grpbtn button" name="togglehideoi" value="Toggle Printed" title="Show or hide already printed items" />'; //} else { $buttons .= '<div>'; $buttons .= '<input type="button" id="btn-reprint-pi-now" class="button help" value="REPRINT NOW for All Already Printed, Unscanned PI (0)" title="Reprint automatically NOW for all PI which<br/><strong>Already printed but not EAN scanned yet</strong>"/> '; $buttons .= '<input type="button" id="btn-reprint-pi-nextbatch" class="button help" value="REPRINT ON NEXT BATCH for All Already Printed, Unscanned PI (0)" title="Reprint ON NEXT BATCH print PI for all PI which<br/><strong>Already printed but not EAN scanned yet</strong>"/><br/><br/>'; $buttons .= '</div>'; $buttons .= '<table class="form" border="0" cellpadding="0" cellspacing="0"><tr>'; $buttons .= '<td class="bold">Show Products</td>'; $buttons .= '<td style="padding-left:30px;"><input id="rb-orf-2" type="radio" class="readyfilter" name="readyfilter" value="2"/></td>'; $buttons .= '<td><label for="rb-orf-2">Unprinted <span id="orfc-up">(0)</span></label></td>'; //$buttons .= '<td style="padding-left:30px;"><input id="rb-orf-1" type="radio" class="readyfilter" name="readyfilter" value="1" /></td>'; //$buttons .= '<td><label for="rb-orf-1">Ready to be printed <span id="orfc-rp">(0)</span></label></td>'; $buttons .= '<td style="padding-left:30px;"><input id="rb-orf-4" type="radio" class="readyfilter" name="readyfilter" value="4" /></td>'; $buttons .= '<td><label for="rb-orf-4">Already Printed <span id="orfc-ap">(0)</span></label></td>'; $buttons .= '<td style="padding-left:30px;"><input id="rb-orf-5" type="radio" class="readyfilter" name="readyfilter" value="5" /></td>'; $buttons .= '<td><label for="rb-orf-5">Already Printed, Unscanned <span id="orfc-apun">(0)</span></label></td>'; $buttons .= '<td style="padding-left:30px;"><input id="rb-orf-3" type="radio" class="readyfilter" name="readyfilter" value="3" checked="checked" /></td>'; $buttons .= '<td><label class="bold" for="rb-orf-3">All <span id="orfc-al">(0)</span></label></td>'; $buttons .= '</tr></table>'; //} break; case '5': // if($packages_exist) { // $packages = '<h3>'; // $packages .= 'Package: '.$class_mp->packageCombo($usable_packages, 'package', '', 'id="selpack"'); // $packages .= ' <input type="button" class="pkgbtn" name="addall2pack" value="Add all products to this Package" title="Add all listed products to the selected package" />'; // $packages .= '</h3>'; // } else { // $packages = '<h3>Please create a new package</h3>'; // } // $buttons .= '<div style="float:right;"><input type="button" class="pkgbtn button" name="createnewpackage" value="Create New Package" title="Create a new package for shipping" /></div>'; // $buttons .= '<div id="pack_cont" style="padding:10px 0px;">'.$packages.'</div>'; $jp_mb = new messagebox(); $jp_mb->add('Package Management is prohibited here, please <a href="?open=packaging" class="bold">click here and use module Packaging Process</a>'); $buttons = $jp_mb->build(); break; } if ($status == 3 || $status == 4 || $status == 5 || $status == 13) { $style = $status == 5 && !$packages_exist ? 'style="display:none;"' : ''; //$buttons .= '<input type="button" class="button barcode-form-trigger" value="BARCODE ENTRY" '.$style.' />'; } if ($buttons != '') { $buttons = '<div class="spb" style="margin-bottom:10px;"><input type="hidden" name="grp_status" value="' . $status . '" />' . $buttons . '</div>'; } $result .= '<div id="orders-' . $status . '">'; $result .= $buttons; $orders_total = count($orders); $orders_vorkasse_unpaid_total = count($orders_vorkasse_unpaid); if ($orders_total > 0) { $result .= $this->drawTableListProduct($header, $orders, $orders_items, $USE_ORDER_FILTER_TO_ALLOW_PRINTING_PI, 4, $order_pi_print_count, $order_pi_ready, $order_pi_collection, $order_pi_unscanned); } if ($orders_vorkasse_unpaid_total > 0) { $header['d'] = 'Date'; unset($header['d2']); if ($orders_total > 0) { $result .= '<div> </div>'; } $result .= '<h3 class="red">Unpaid Prepayment (' . $orders_vorkasse_unpaid_total . ') - <span class="notice">No need to process these orders</span></h3>'; $result .= $this->drawTableListProduct($header, $orders_vorkasse_unpaid, $orders_items, $USE_ORDER_FILTER_TO_ALLOW_PRINTING_PI, 3); } $result .= '</div>'; } else { $result .= '<h3>No Orders in this status</h3>'; } return $filters . $result; }