cqp 1 semana atrás
pai
commit
92b18c4ae2
2 arquivos alterados com 11 adições e 0 exclusões
  1. 10 0
      app/Model/RevenueCost.php
  2. 1 0
      app/Service/StatisticsService.php

+ 10 - 0
app/Model/RevenueCost.php

@@ -31,4 +31,14 @@ class RevenueCost extends UseScopeBaseModel
     public static $field_hkd_detail = ['order_type','order_number','order_time','employee_id_1','employee_id_1_title','employee_id_2','employee_id_2_title','customer_code','customer_title','product_code','product_title','product_size','unit','price_1','price_1_total','price_2','price_2_total','quantity','price_3','price_3_total','price_4','price_4_total','profit','profit_rate','order_number_upstream','payment_amount','customer_profit_rate'];
     public static $field_hkd_profit_main = ['rc.employee_id_2','rc.employee_id_2_title','rc.payment_amount','employee_index.start_time','employee_index.end_time','employee_index.index','employee_index.id'];
     public static $field_hkd_salary_main = ['order_id as id','order_type','order_number','order_time','employee_id_1','employee_id_1_title','employee_id_2','employee_id_2_title','payment_amount','profit','order_id'];
+
+    public static $voucher_type = [
+         45 => "期初应收",
+         24 => "期初其他应收",
+         131 => "期初收入单",
+         112 => "费用单",
+         113 => "收入单",
+         129 => "其他应收单",
+         20 => "销售发票",
+    ];
 }

+ 1 - 0
app/Service/StatisticsService.php

@@ -189,6 +189,7 @@ class StatisticsService extends Service
                 'profit' => $value['profit'],
                 'profit_rate' => bcmul($value['profit_rate'],100,2) . '%',
                 'customer_profit_rate' => bcmul($value['customer_profit_rate'],100,2) . '%',
+                'voucher_type_title' => RevenueCost::$voucher_type[$value['voucher_type']] ?? "",
             ];
         }