cqpCow 11 miesięcy temu
rodzic
commit
e15df2a580
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      app/Service/ImportService.php

+ 2 - 2
app/Service/ImportService.php

@@ -761,9 +761,9 @@ class ImportService extends Service
                 $tmp['customer_contact'] = $customer_contact_tmp;
                 $tmp['plat_type'] = $value[3];
                 $tmp['plat_order'] = $value[0];
-                $tmp['discount_fee'] = $value[9];
+                $tmp['discount_fee'] = $value[9] ?: 0;
                 $tmp['product_total'] += $value[7];
-                $tmp['contract_fee'] += $value[7] - ($value[9]);
+                $tmp['contract_fee'] += $value[7] - $tmp['discount_fee'];
                 $tmp['construction_time'] = $value[12] ?? 0;
                 $tmp['handover_time'] = $value[13] ?? 0;
                 $insert[$keys] = $tmp;