wugg 1 year ago
parent
commit
5db0d8f189
2 changed files with 4 additions and 11 deletions
  1. 3 2
      app/admin/controller/Good.php
  2. 1 9
      app/admin/model/Good.php

+ 3 - 2
app/admin/controller/Good.php

@@ -69,7 +69,8 @@ class Good extends Base
         	$temp['id']=$good->id;
         	$temp['status']=$param['status'];
         	if($param['status']<$good->status) $this->error("商品{$item['spuCode']}当前状态".\app\admin\model\Good::$status[$good->status]."不可修改");
-             $item['tax'] = bcdiv(str_replace('%', '', $item['tax']), "100", 2);
+            $tax= $item['tax'];
+        	$item['tax'] = bcdiv(str_replace('%', '', $item['tax']), "100", 2);
         	if($param['status']==1){
         		if($good->cgd_to_pay)$this->error("商品{$item['spuCode']}已参与采购付款回票对账");
         	    $temp["cgd_inv_cat_code"]=$catArr[$item['cat_code']]['merge_code'];
@@ -89,7 +90,7 @@ class Good extends Base
         	    $temp['is_discount']= $item['is_discount'];
         	    $temp['addTax']= $item['addTax'];
         	    $temp['inv_tag']= $item['inv_tag'];
-        	    $temp['tax_diff']= $item['tax']==$good->cgd_inv_tax?1:2;
+        	    $temp['tax_diff']= $tax==$good->cgd_inv_tax?1:2;
         	    $temp['cat_diff']= $temp['inv_cat_code']==$good->cgd_inv_cat_code?1:2;
         	}
         	$examinfo=$good->exam_info;

+ 1 - 9
app/admin/model/Good.php

@@ -27,15 +27,7 @@ class Good extends Model
         ->isEmpty();
          return  $isT==false;
     }
-    
-//     public function GetSupplierNameAttr($v,$row){
-//        return SupplierInfo::Where(['code'=>$row['companyNo']??''])->value('name','');
-//    }
-//
-//     public function GetCompanyNameAttr($v,$row){
-//        return CompanyInfo::Where(['companyNo'=>$row['companyNo']??""])->value('company_name','');
-//    }
-//
+
     public function GetExamInfoAttr($v){
        return $v==""?[]:json_decode($v,true);
     }