Exemplo n.º 1
0
     $box_date = date('d. M', $order_date);
     //Retrieve all products from the order
     //No need for depot orders, only 1 product per order
     //FOR NOW WE ONLY USE PACKAGE FOR DEPOT ORDERS
     //FOR SEGMENT ID 1 (DEPOT HAMBURG)
     if ($item['segments_id'] == SEGMENT_ID_HAMBURG) {
         $packages = $class_do->packageUsable();
         if (count($packages) == 0) {
             //If no usable package found for Depot, create 1
             $package_id = $class_do->packageCreate($item['segments_id']);
         } else {
             //If usable package found for Depot, use it
             $package_id = $packages[0]['depot_packages_id'];
         }
         //Add product to package and update product status
         $class_do->packageInsert($package_id, $id);
         $class_do->updateStatus($id, $new_status, $session_userinfo['username']);
     } else {
         //FOR OTHER SEGMENT WE UPDATE
         //AUTOMATICALLY TO STATUS COMPLETE
         //TODO: WE NEED TO PROCEED PACKAGES FOR LOCALS WHEN NEEDED
         $class_do->updateStatus($id, '11', $session_userinfo['username']);
     }
 }
 //Check if it's a missing mixed orders
 $item_trans = array();
 $order_trans = array();
 if ($item['trans_type'] == 'SP') {
     $item_trans = $class_jo->retrieveItemDetail($item['trans_id']);
     $order_trans = $class_jo->retrieveDetail($item_trans['jng_sp_orders_id']);
 } elseif ($item['trans_type'] == 'JG') {