fix total cbm order component

This commit is contained in:
omair saleh
2022-01-03 16:11:35 +08:00
parent a331c659a8
commit 1efbca15ec
@@ -90,7 +90,7 @@
</div>
<div class="col-auto text-right">
<small class="fs-10 all-caps muted">Total CBM</small>
<h6 class="no-margin semi-bold">{{(Math.ceil((item.parcels.origin_warehouse_packages.reduce((total, obj) => obj.cbm + total, 0) + item.parcels.in_transit_packages.reduce((total, obj) => obj.cbm + total, 0) + item.parcels.delivered_packages.reduce((total, obj) => obj.cbm + total, 0)) * 10000) / 10000).toFixed(3)}}</h6>
<h6 class="no-margin semi-bold">{{(Math.ceil((item.parcels.origin_warehouse_packages.flatMap(packing_list => packing_list.packages).reduce((total, obj) => obj.cbm + total, 0) + item.parcels.in_transit_packages.flatMap(packing_list => packing_list.packages).reduce((total, obj) => obj.cbm + total, 0) + item.parcels.destination_warehouse_packages.flatMap(packing_list => packing_list.packages).reduce((total, obj) => obj.cbm + total, 0) + item.parcels.delivered_packages.flatMap(packing_list => packing_list.packages).reduce((total, obj) => obj.cbm + total, 0)) * 10000) / 10000).toFixed(3)}}</h6>
</div>
</div>
</div>