wugg 7 months ago
parent
commit
b9fdc83c76
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/command/caixiao.php

+ 3 - 1
app/command/caixiao.php

@@ -84,16 +84,18 @@ class caixiao extends Command
 
      protected function SpuCat($spuCode,$orderScource,$type=1){
         $spuCat= GoodTax::with(['tax'])->where("spuCode",$spuCode)->findOrEmpty();
-        $result=["cat_code"=>"","tax"=>"","inv_good_name"=>""];
+        $result=[];
         if($spuCat->isEmpty()) return $result;
         if($type==2 && $orderScource!=8){
             $result["cat_code"]=$spuCat->merge_code;
+            $result["cat_name"]=$spuCat->short_name;
             $result["tax"]=$spuCat->tax;
             $result["inv_good_name"]=$spuCat->inv_good_name;
         }else{
           $taxRelation= TaxRelation::with(['outputInfo'])->where(["income_tax_id"=>$spuCat->tax_id,"companyNo"=>$spuCat->companyNo])->findOrEmpty();
           if($taxRelation->isEmpty()) return $result;
           $result["cat_code"]=$taxRelation->merge_code;
+          $result['cat_name']=$taxRelation->short_name;
           $result["tax"]=$taxRelation->output_bind_tax;
           $result["inv_good_name"]=$spuCat->inv_good_name;
         }