wugg 8 місяців тому
батько
коміт
e819673b91
2 змінених файлів з 2 додано та 1 видалено
  1. 1 0
      app/admin/controller/Sale.php
  2. 1 1
      app/admin/model/GoodTax.php

+ 1 - 0
app/admin/controller/Sale.php

@@ -277,6 +277,7 @@ class Sale extends Base
             if ($datainfo > 0) {
                 $taxInfo = OrderTax::SpuCat($spuCode);
                 if (!empty($taxInfo)) {
+
                    (new \app\admin\model\OrderTax)->saveAll(array_map(function ($item)use($orderCode){
                         $temp=[];
                         $temp['code']=$orderCode;

+ 1 - 1
app/admin/model/GoodTax.php

@@ -31,7 +31,7 @@ class GoodTax extends Model
         if($item->isEmpty()) return [];
         $temp=[];
         if($type==1){
-             $temp['spuCode']=$item->childCode;
+             $temp['spuCode']=$item->spuCode;
              $temp['cat_code']=$item->merge_code;
              $temp['cat_name']=$item->short_name;
              $temp['tax']=$item->tax;