瀏覽代碼

如果客户退货那么 就提交 如果未出库 不占单 如果已出库对库存不做处理

lvhao 1 天之前
父節點
當前提交
b0fab060ec
共有 1 個文件被更改,包括 15 次插入0 次删除
  1. 15 0
      core/CoreApp/controllers/Apitt.php

+ 15 - 0
core/CoreApp/controllers/Apitt.php

@@ -1227,6 +1227,21 @@ $j = json_decode($j, true);
 				}
 				if($j['type'] == 2)
 				{
+
+					//reverse_event_type
+					if(isset($j['data'])){
+						if($j['data']['reverse_event_type'] == 'ORDER_RETURN'){
+							if($d['library'] == 1){
+								$whlabel = $this->whlabel->find_all("zd = '".$d['number']."'");
+								foreach ($whlabel as $v) 
+								   {
+									$this->whlabel->save(array('zd'=>''),$v['id']);
+								}
+							}
+							$this->fullordertt->save(array('state'=>214,'whlabel'=>$d['whlabel'],'fpdata'=>$d['fpdata']),$d['id']);
+						}
+
+					}
 					if(isset($j['reverse_order_status'])){
 						if($j['reverse_order_status'] == 50 || $j['reverse_order_status'] == 51)
 						{