wugg před 3 měsíci
rodič
revize
5de7526349
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5 1
      app/cxinv/model/FinancialProducts.php

+ 5 - 1
app/cxinv/model/FinancialProducts.php

@@ -1,7 +1,7 @@
 <?php
 namespace app\cxinv\model;
 
-use think\model\concern\SoftDelete;
+use app\user\model\TaxCategory;use think\model\concern\SoftDelete;
 class FinancialProducts extends Base
 {
     use SoftDelete;
@@ -44,4 +44,8 @@ class FinancialProducts extends Base
     public function ProductsCombind(){
         return $this->hasMany('ProductsCombind','parent_id','id');
     }
+
+    public function setCatNameAttr($value,$row){
+        return TaxCategory::where("merge_code",$row['cat_code'])->value("short_name","");
+    }
 }