فهرست منبع

结算账单 快递费用合计

ANG YU 4 سال پیش
والد
کامیت
09e799666e

+ 9 - 9
app/OwnerFeeExpress.php

@@ -16,16 +16,16 @@ class OwnerFeeExpress extends Model
         "province_id",
         "logistic_id",
         "logistic_number",
-        "weight",
-        "initial_weight",
-        "initial_weight_price",
-        "additional_weight",
-        "additional_weight_amount",
-        "additional_weight_price",
-        "total_fee",
-        "tax_rate",
+        "weight",//重量
+        "initial_weight",//首重
+        "initial_weight_price",//首重价格
+        "additional_weight",//续重
+        "additional_weight_amount",//续重数量,
+        "additional_weight_price",//续重价格
+        "total_fee",//总费用
+        "tax_rate",//税率
         "created_at",
-        "owner_id"
+        "owner_id"//货主
     ];
 
     public function province(): BelongsTo

+ 15 - 0
app/OwnerLogisticFeeReport.php

@@ -26,6 +26,11 @@ class OwnerLogisticFeeReport extends Model
         'tax_fee',//税费
         'owner_id'//货主
     ];
+
+        protected $appends = [
+            'initial_weight_fee',
+            'additional_weight_fee'
+        ];
     public $timestamps = false;
 
     public function logistic(): BelongsTo
@@ -37,5 +42,15 @@ class OwnerLogisticFeeReport extends Model
     {
         return $this->belongsTo(Province::class);
     }
+
+    public function getInitialWeightFeeAttribute(): string
+    {
+        return number_format($this->initial_weight * $this->initial_weight_price * $this->initial_amount, 2);
+    }
+
+    public function getAdditionalWeightFeeAttribute(): string
+    {
+        return number_format($this->additional_weight * $this->additional_price * $this->additional_amount, 2);
+    }
 }
 

+ 10 - 2
resources/views/finance/settlementBills/expressFee/report/index.blade.php

@@ -89,8 +89,12 @@
                     <td>@{{ report.province.name }}</td>
                     <td>@{{ report.initial_weight }}</td>
                     <td>@{{ report.initial_amount }}</td>
+                    <td>@{{ report.initial_weight_price }}</td>
+                    <td>@{{ report.initial_weight_fee }}</td>
                     <td>@{{ report.additional_weight }}</td>
                     <td>@{{ report.additional_amount }}</td>
+                    <td>@{{ report.additional_price }}</td>
+                    <td>@{{ report.additional_weight_fee }}</td>
                     <td>@{{ report.fee }}</td>
                 </tr>
             </table>
@@ -191,9 +195,13 @@
                     {name: 'logistic.name', value: '快递公司'},
                     {name: 'province', value: '地区'},
                     {name: 'initial_weight', value: '首重'},
-                    {name: 'initial_amount', value: '订单数'},
+                    {name: 'initial_amount', value: '首重数量'},
+                    {name: 'initial_weight_price', value: '首重价格'},
+                    {name: 'initial_weight_fee', value: '首重费用'},
                     {name: 'additional_weight', value: '续重'},
-                    {name: 'additional_amount', value: '续重合计'},
+                    {name: 'additional_amount', value: '续重数量'},
+                    {name: 'additional_price', value: '续重价格'},
+                    {name: 'additional_weight_fee', value: '续重费用'},
                     {name: 'fee', value: '(省份)合计'},
                 ];
                 new Header({