$log_total_dhl = $class_ml->retrieveContentsTotal($logistic_id, 'DHL', $use_cogs);
     }
     $result .= '<input type="hidden" id="log_value_ged_hidden" value="' . displayCurrency('EUR', $log_total_ged) . '" />';
     $result .= '<input type="hidden" id="log_value_dhl_hidden" value="' . displayCurrency('EUR', $log_total_dhl) . '" />';
     echo utf8_encode($result);
 } elseif ($_POST['me_action'] == 'SETSENT') {
     $logistic_id = tep_db_prepare_input($_POST['logistic_id']);
     $packages = $class_ml->retrievePackages($logistic_id, true);
     foreach ($packages as $type => $pack) {
         if ($type == 'P') {
             use_class('jng_sp_packages');
             $class_jp = new jng_sp_packages();
             use_class('jng_sp_orders');
             $class_jo = new jng_sp_orders();
             foreach ($pack as $p) {
                 $items = $class_jp->sendPackage($p['packages_id']);
                 foreach ($items as $items_id) {
                     $class_jo->updateItemStatus($items_id, '7', $session_userinfo['username']);
                 }
             }
         } elseif ($type == 'J') {
             use_class('minierp_packages');
             $class_mp = new minierp_packages();
             use_class('orders');
             $class_o = new orders();
             foreach ($pack as $p) {
                 $items = $class_mp->sendPackage($p['packages_id']);
                 foreach ($items as $items_id) {
                     $class_o->updateProductStatus($items_id, '7', $session_userinfo['username']);
                 }
             }
Ejemplo n.º 2
0
         $class_jp->removeItem($items_id);
         $class_jo->updateItemStatus($items_id, $new_status, $session_userinfo['username']);
         $result = array();
         $result['oi_id'] = $items_id;
         $result['old_status'] = $old_status;
         $result['new_status'] = $new_status;
         ajaxReturn($result);
     }
     exit;
 } elseif ($_POST['me_action'] == 'SENDPACKAGE') {
     $package_id = tep_db_prepare_input($_POST['package_id']);
     $old_status = '6';
     $new_status = '7';
     use_class('jng_sp_packages');
     $class_jp = new jng_sp_packages();
     $items = $class_jp->sendPackage($package_id);
     $total_items = 0;
     foreach ($items as $items_id) {
         $item = $class_jo->retrieveItemDetail($items_id);
         if ($item['status'] == $old_status) {
             $total_items++;
             $class_jo->updateItemStatus($items_id, $new_status, $session_userinfo['username']);
         }
     }
     $result = array();
     $result['package_id'] = $package_id;
     $result['old_status'] = $old_status;
     $result['new_status'] = $new_status;
     $result['total_items'] = $total_items;
     ajaxReturn($result);
     exit;