fixing bugs

This commit is contained in:
omair saleh
2021-05-24 01:09:03 +08:00
parent df83d2fc7b
commit 63242e1249
@@ -123,11 +123,11 @@
<div class="col">
<div class="row align-items-end text-complete">
<div class="col">
<div class="font-heading all-caps fs-10">Purchase Order Total Amount:</div>
<div class="font-heading all-caps fs-10">Order Total Amount:</div>
</div>
<div class="col-12 text-left m-t-10 m-b-10">
<div class="font-heading fs-12">
<span class="bold text-success">{{totalPurchaseAmount}}</span>
<span class="bold text-success">{{totalOrderAmount}}</span>
</div>
</div>
</div>
@@ -185,13 +185,13 @@
totalAmount(){
return (Math.round((this.booking.amount + Number.EPSILON) * 100) / 100).toFixed(2);
},
totalPurchaseAmount(){
totalOrderAmount(){
let totalPurchase = (this.booking.purchase_order) ? this.booking.purchase_order.amount : 0;
let totalOrderAmount = this.booking.amount;
this.bookings.forEach(function(booking) {
totalPurchase += (booking.purchase_order ? booking.purchase_order.amount : 0);
totalOrderAmount += booking.amount;
});
return (Math.round((totalPurchase + Number.EPSILON) * 100) / 100).toFixed(2);
return (Math.round((totalOrderAmount + Number.EPSILON) * 100) / 100).toFixed(2);
},
validForSubmit(){
return (this.bookings.length>0);// && this.totalAmount == this.totalPurchaseAmount);