Example #1
0
                                     $products['ean'][$thisid][] = $i['products_ean'];
                                 }
                                 $spanid = '<span id="get-' . $thisid . '" class="red">' . $thisid . '</span>';
                                 if ($i['waitingbox'] == '1') {
                                     $inwb[] = $spanid;
                                 } else {
                                     $infb[] = $spanid;
                                 }
                             }
                         }
                         $products['wb'] = implode(', ', $inwb);
                         $products['fb'] = implode(', ', $infb);
                         $result .= printCollectionRequest($products, $box_date, $sp_name);
                     } else {
                         //If not all products are finish, suggest waiting box
                         $class_o->updateProduct2WaitingBox($item['orders_products_id']);
                         $result .= printPackageTip('W', $box_date, '', $sp_name, $sp_class);
                     }
                 }
             } elseif ($item['status'] == $new_status) {
                 $result .= printPackageTip('P', '', '', $sp_name, $sp_class);
             } else {
                 //If product is already in package / sent
                 $errinfo = sprintf($template_error_status, $item_status[$item['status']]);
                 $result .= printPackageTip('E', $box_date, $errinfo, $sp_name, $sp_class);
             }
         }
     }
 } else {
     //FOR DEPOT PROCESS
     $sp_name = 'Depot';