|
@@ -1026,10 +1026,16 @@ class Goodup extends Base
|
|
$tax_id = isset($this->post['tax_id'])&&$this->post['tax_id']!==''? intval($this->post['tax_id']):'';
|
|
$tax_id = isset($this->post['tax_id'])&&$this->post['tax_id']!==''? intval($this->post['tax_id']):'';
|
|
$open_type= isset($this->post['open_type'])&&$this->post['open_type']!==''? intval($this->post['open_type']):'';
|
|
$open_type= isset($this->post['open_type'])&&$this->post['open_type']!==''? intval($this->post['open_type']):'';
|
|
$inv_good_name = isset($this->post['inv_good_name'])&&$this->post['inv_good_name']!==''? trim($this->post['inv_good_name']):'';
|
|
$inv_good_name = isset($this->post['inv_good_name'])&&$this->post['inv_good_name']!==''? trim($this->post['inv_good_name']):'';
|
|
|
|
+ $cgd_tax_id = isset($this->post['cgd_tax_id'])&&$this->post['cgd_tax_id']!==''? intval($this->post['cgd_tax_id']):'0';
|
|
|
|
+ $cgd_tax = isset($this->post['cgd_tax'])&&$this->post['cgd_tax']!==''? trim($this->post['cgd_tax']):'';
|
|
if($open_type=='') return error_show(1004,'开票商品类型不能为空');
|
|
if($open_type=='') return error_show(1004,'开票商品类型不能为空');
|
|
if($open_type==1){
|
|
if($open_type==1){
|
|
if($tax_id=='') return error_show(1004,'商品税目id不能为空');
|
|
if($tax_id=='') return error_show(1004,'商品税目id不能为空');
|
|
if($inv_good_name=='') return error_show(1004,'开票商品名称不能为空');
|
|
if($inv_good_name=='') return error_show(1004,'开票商品名称不能为空');
|
|
|
|
+ if($cgd_supplier_code!=''){
|
|
|
|
+ if($cgd_tax_id==0) return error_show(1004,'源头供应商开票税目不能为空');
|
|
|
|
+ if($cgd_tax==='') return error_show(1004,'源头供应商开票税率不能为空');
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if($isCombind==1){
|
|
if($isCombind==1){
|
|
if(empty($combindList)) return error_show(1004,'组合商品子商品信息不能为空');
|
|
if(empty($combindList)) return error_show(1004,'组合商品子商品信息不能为空');
|
|
@@ -1153,6 +1159,8 @@ class Goodup extends Base
|
|
$taxInfo->tax_id = $tax_id;
|
|
$taxInfo->tax_id = $tax_id;
|
|
$taxInfo->inv_good_name = $inv_good_name;
|
|
$taxInfo->inv_good_name = $inv_good_name;
|
|
$taxInfo->tax = $tax;
|
|
$taxInfo->tax = $tax;
|
|
|
|
+ $taxInfo->cgd_tax_id = $cgd_tax_id;
|
|
|
|
+ $taxInfo->cgd_tax = $cgd_tax;
|
|
$taxInfo->creater = $this->uname;
|
|
$taxInfo->creater = $this->uname;
|
|
$taxInfo->createrid =$this->uid;
|
|
$taxInfo->createrid =$this->uid;
|
|
$taxInfo->save();
|
|
$taxInfo->save();
|