|
@@ -313,15 +313,19 @@ class Model_logic_u9xgsd extends Lin_Model {
|
|
|
return $this->logic_tools->ret_arr(1,"审核销售单成功");
|
|
|
}
|
|
|
//创建关联销售单
|
|
|
- public function createXsTwo($info){
|
|
|
+ public function createXsTwo($tmp_info){
|
|
|
$time = time();
|
|
|
- if(empty($info['dc_data'])){
|
|
|
+ if(empty($tmp_info['dc_data'])){
|
|
|
return ;
|
|
|
}
|
|
|
- $tmp_list = json_decode($info['dc_data'],true);
|
|
|
+ $tmp_list = json_decode($tmp_info['dc_data'],true);
|
|
|
if(empty($tmp_list)){
|
|
|
return ;
|
|
|
}
|
|
|
+ $info = $this->logic_order->getInfoByPlat($tmp_info['platform'],$tmp_info['order_no']);
|
|
|
+ $info['zq_u9_id'] = $tmp_info['id'];
|
|
|
+ $info['dc_no'] = $tmp_info['dc_no'];
|
|
|
+ $info['dc_data'] = $tmp_info['dc_data'];
|
|
|
$total_goods_num = 0;//订单产品总数量
|
|
|
foreach($tmp_list as $k=>$v){
|
|
|
$total_goods_num += $v['costuomqty'];
|
|
@@ -340,7 +344,6 @@ class Model_logic_u9xgsd extends Lin_Model {
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
$dc_params = [
|
|
|
'gys'=>$this->gys,//供应商
|
|
|
'number'=>$info['number'],//erp订单编码
|
|
@@ -357,10 +360,10 @@ class Model_logic_u9xgsd extends Lin_Model {
|
|
|
'tb_org_arr'=>$this->tb_org_arr,//要同步的组织列表
|
|
|
'list'=>$list
|
|
|
];
|
|
|
-
|
|
|
echo "<pre>";
|
|
|
var_dump($dc_params);
|
|
|
die;
|
|
|
+
|
|
|
//创建香港仓的销售单
|
|
|
$xsd_res = $this->apiyyv1->xsdTwoCreate($dc_params,$this->getToken(140));
|
|
|
|