コード例 #1
0
 function toDelivery()
 {
     $order_id = $_POST['order_id'];
     $_POST['opid'] = $this->system->op_id;
     $_POST['opname'] = $this->system->op_name;
     $objOrder =& $this->system->loadModel('trading/order');
     $aItems = $objOrder->getItemList($_POST['order_id'], '', true);
     foreach ($_POST['send'] as $k => $v) {
         if ($aItems[0]['store'] < $v) {
             $store_statues = 1;
         }
     }
     if (!$store_staues) {
         $store_time_type = $this->system->getConf('system.store.time');
         if ($store_time_type == '3') {
             $oScare = new mdl_scare();
             if ($oScare->getOrderStastus($order_id, 'ship_status')) {
                 $scare_goods = $oScare->getOrderGoodsById($order_id);
                 if (isset($scare_goods)) {
                     foreach ($scare_goods as $k => $v) {
                         $oScare->reduceCount($v['goods_id'], $v['nums']);
                     }
                 }
             }
         }
     }
 }