|
@@ -613,6 +613,13 @@ class Goodup extends Base
|
|
|
if($cgd_tax==='') return error_show(1004,'源头供应商开票税率不能为空');
|
|
|
}
|
|
|
}
|
|
|
+ $is_syscn_tax = isset($this->post['is_syscn_tax'])&&$this->post['is_syscn_tax']!==""? intval($this->post['is_syscn_tax']):"0";
|
|
|
+ $out_tax_id = isset($this->post['out_tax_id'])&&$this->post['out_tax_id']!==""? intval($this->post['out_tax_id']):"0";
|
|
|
+ $out_tax = isset($this->post['out_tax'])&&$this->post['out_tax']!==""? floatval($this->post['out_tax']):"";
|
|
|
+ if($is_syscn_tax==1){
|
|
|
+ $out_tax_id = $tax_id;
|
|
|
+ $out_tax = $tax;
|
|
|
+ }
|
|
|
$createrid= $this->uid;
|
|
|
$creater= $this->uname;
|
|
|
$spucode=makeNo("SKU");
|
|
@@ -688,6 +695,7 @@ class Goodup extends Base
|
|
|
"other_config"=>$other_config,
|
|
|
"field_change"=>'',
|
|
|
"is_step" => count($good_ladder) > 1 ? 1 : 0,//如果阶梯价个数大于1,说明启用阶梯价
|
|
|
+ 'is_syscn_tax'=>$is_syscn_tax,
|
|
|
"is_online"=>0,
|
|
|
"stock_moq"=>$stock_moq,
|
|
|
'open_type'=>$open_type,
|
|
@@ -790,7 +798,10 @@ class Goodup extends Base
|
|
|
'tax_id'=>$tax_id,
|
|
|
'inv_good_name'=>$inv_good_name,
|
|
|
"cgd_tax_id"=>$cgd_tax_id,
|
|
|
+ 'out_tax_id'=>$out_tax_id,
|
|
|
+ 'out_tax'=>$out_tax,
|
|
|
"cgd_tax"=>$cgd_tax,
|
|
|
+ "status"=> $is_syscn_tax==1?2 :1,
|
|
|
'tax'=>$tax,
|
|
|
"creater"=>$creater,
|
|
|
"createrid"=>$createrid,
|
|
@@ -999,6 +1010,13 @@ class Goodup extends Base
|
|
|
if($cgd_tax==='') return error_show(1004,'源头供应商开票税率不能为空');
|
|
|
}
|
|
|
}
|
|
|
+ $is_syscn_tax = isset($this->post['is_syscn_tax'])&&$this->post['is_syscn_tax']!==""? intval($this->post['is_syscn_tax']):"0";
|
|
|
+ $out_tax_id = isset($this->post['out_tax_id'])&&$this->post['out_tax_id']!==""? intval($this->post['out_tax_id']):"0";
|
|
|
+ $out_tax = isset($this->post['out_tax'])&&$this->post['out_tax']!==""? floatval($this->post['out_tax']):"";
|
|
|
+ if($is_syscn_tax==1){
|
|
|
+ $out_tax_id = $tax_id;
|
|
|
+ $out_tax = $tax;
|
|
|
+ }
|
|
|
if($isCombind==1){
|
|
|
if(empty($combindList)) return error_show(1004,'组合商品子商品信息不能为空');
|
|
|
$dchild=[];
|
|
@@ -1029,6 +1047,7 @@ class Goodup extends Base
|
|
|
"moq"=>$moq,
|
|
|
"is_exclusive"=>$is_exclusive,
|
|
|
"customized"=>$customized,
|
|
|
+ 'is_syscn_tax'=>$is_syscn_tax,
|
|
|
"tax"=>$tax,
|
|
|
"supplierNo"=>$supplierNo,
|
|
|
"is_auth"=>$is_auth,
|
|
@@ -1119,6 +1138,9 @@ class Goodup extends Base
|
|
|
$taxInfo->companyNo = $company_id;
|
|
|
$taxInfo->open_type = $open_type;
|
|
|
$taxInfo->tax_id = $tax_id;
|
|
|
+ $taxInfo->out_tax_id = $out_tax_id;
|
|
|
+ $taxInfo->out_tax = $out_tax;
|
|
|
+ $taxInfo->status =$is_syscn_tax ?2 : 1;
|
|
|
$taxInfo->inv_good_name = $inv_good_name;
|
|
|
$taxInfo->tax = $tax;
|
|
|
$taxInfo->cgd_tax_id = $cgd_tax_id;
|
|
@@ -1331,6 +1353,9 @@ class Goodup extends Base
|
|
|
$creater= $this->uname;
|
|
|
Db::startTrans();
|
|
|
try {
|
|
|
+ if($status==9 && $data['is_syscn_tax']==1){
|
|
|
+ $status=1;
|
|
|
+ }
|
|
|
if($status==1){
|
|
|
//区分是否是对接平台
|
|
|
$platform_info=Db::name('platform')
|
|
@@ -1363,7 +1388,6 @@ class Goodup extends Base
|
|
|
]);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
$old_status = $data['status'];
|
|
|
$data['status']=$status;
|
|
|
$data['updatetime']=date("Y-m-d H:i:s");
|
|
@@ -1581,14 +1605,14 @@ class Goodup extends Base
|
|
|
return error_show(1004,"未找到商品数据");
|
|
|
}
|
|
|
$online_reason = isset($this->post['online_reason'])&&$this->post['online_reason']!==""? trim($this->post['online_reason']):"";
|
|
|
- if($online_reason===""){
|
|
|
- return error_show(1004,"参数online_reason不能为空");
|
|
|
- }
|
|
|
+// if($online_reason===""){
|
|
|
+// return error_show(1004,"参数online_reason不能为空");
|
|
|
+// }
|
|
|
$online_remark= isset($this->post['online_remark'])&&$this->post['online_remark']!==""? trim($this->post['online_remark']):"";
|
|
|
- if($online_remark===""){
|
|
|
- return error_show(1004,"参数online_remark不能为空");
|
|
|
- }
|
|
|
-
|
|
|
+// if($online_remark===""){
|
|
|
+// return error_show(1004,"参数online_remark不能为空");
|
|
|
+// }
|
|
|
+//
|
|
|
$fixed = isset($this->post['is_fixed'])&&$this->post['is_fixed']!==''? intval($this->post['is_fixed']):1;
|
|
|
if($fixed==1){
|
|
|
//使用实时金价
|
|
@@ -2482,6 +2506,13 @@ class Goodup extends Base
|
|
|
if($cgd_tax_id==0) return error_show(1004,'源头供应商开票税目不能为空');
|
|
|
if($cgd_tax==='') return error_show(1004,'源头供应商开票税率不能为空');
|
|
|
}
|
|
|
+ }
|
|
|
+ $is_syscn_tax = isset($this->post['is_syscn_tax'])&&$this->post['is_syscn_tax']!==""? intval($this->post['is_syscn_tax']):"0";
|
|
|
+ $out_tax_id = isset($this->post['out_tax_id'])&&$this->post['out_tax_id']!==""? intval($this->post['out_tax_id']):"0";
|
|
|
+ $out_tax = isset($this->post['out_tax'])&&$this->post['out_tax']!==""? trim($this->post['out_tax']):"";
|
|
|
+ if($is_syscn_tax==1){
|
|
|
+ $out_tax_id=$tax_id;
|
|
|
+ $out_tax=$tax;
|
|
|
}
|
|
|
if($isCombind==1){
|
|
|
if(empty($combindList)) return error_show(1004,'组合商品子商品信息不能为空');
|
|
@@ -2528,6 +2559,7 @@ class Goodup extends Base
|
|
|
"packing_list"=>$packing_list,
|
|
|
"packing_weight"=>$packing_weight,
|
|
|
"good_bar"=>$good_bar,
|
|
|
+ 'is_syscn_tax'=>$is_syscn_tax,
|
|
|
"supply_area"=>$supply_area,
|
|
|
"delivery_place"=>$delivery_place,
|
|
|
"origin_place"=>$origin_place,
|
|
@@ -2663,6 +2695,9 @@ class Goodup extends Base
|
|
|
$taxInfo->inv_good_name = $inv_good_name;
|
|
|
$taxInfo->cgd_tax_id = $cgd_tax_id;
|
|
|
$taxInfo->cgd_tax = $cgd_tax;
|
|
|
+ $taxInfo->out_tax_id = $out_tax_id;
|
|
|
+ $taxInfo->out_tax = $out_tax;
|
|
|
+ $taxInfo->status = $is_syscn_tax==1?2:1;
|
|
|
$taxInfo->tax = $tax;
|
|
|
$taxInfo->creater = $this->uname;
|
|
|
$taxInfo->createrid =$this->uid;
|