|
@@ -63,7 +63,7 @@ class Good extends Base
|
|
|
if($good->isEmpty())$this->error("商品信息{$item['spuCode']}不存在");
|
|
|
if(!isset($catArr[$item['cat_code']]))$this->error("商品{$item['spuCode']}所选类目不存在");
|
|
|
$tax = $catArr[$item['cat_code']]['tax']==""?[]:explode('、', $catArr[$item['cat_code']]['tax']);
|
|
|
- if(!in_array($item['tax'],$tax))$this->error("商品{$item['spuCode']}所选税率与类目包含税率不一致");
|
|
|
+ if(!in_array($item['tax'],$tax) && $param['status']==2)$this->error("商品{$item['spuCode']}所选税率与类目包含税率不一致");
|
|
|
//采购端修改 只能在待财务设置税务类目状态 切该商品未参与采购付款回票对账
|
|
|
//销售端修改 只要没参与销售回款开票结算
|
|
|
$temp['id']=$good->id;
|
|
@@ -80,8 +80,7 @@ class Good extends Base
|
|
|
}
|
|
|
if($param['status']==2){
|
|
|
if($good->qrd_to_pay)$this->error("商品{$item['spuCode']}已参与销售回款开票结算");
|
|
|
- $check = CheckTax($item['is_discount'],$item['tax'],$item['inv_tag'],
|
|
|
- $item['addTax'],$message);
|
|
|
+ $check = CheckTax($item['is_discount'],$item['tax'],$item['inv_tag'],$item['addTax'],$message);
|
|
|
if($check==false)$this->error("商品{$item['spuCode']}{$message}");
|
|
|
$temp['inv_cat_code']=$catArr[$item['cat_code']]['merge_code'];
|
|
|
$temp['inv_cat_name']=$catArr[$item['cat_code']]['short_name'];
|