refactor!: remove unused field

This commit is contained in:
Methapon Metanipat 2024-10-03 11:58:27 +07:00
parent c5c26400f8
commit ab91d0923f
3 changed files with 10 additions and 5 deletions

View file

@ -339,8 +339,8 @@ export class QuotationController extends Controller {
const price = list.reduce(
(a, c) => {
const price = c.pricePerUnit * c.amount;
const discount = price * c.discount;
const vat = (price - discount) * c.vat;
const discount = Math.round(price * c.discount * 100) / 100;
const vat = Math.round((price - discount) * c.vat * 100) / 100;
a.totalPrice += price;
a.totalDiscount += discount;
@ -353,7 +353,6 @@ export class QuotationController extends Controller {
totalPrice: 0,
totalDiscount: 0,
vat: 0,
vatExcluded: 0,
finalPrice: 0,
},
);
@ -547,7 +546,6 @@ export class QuotationController extends Controller {
totalPrice: 0,
totalDiscount: 0,
vat: 0,
vatExcluded: 0,
finalPrice: 0,
},
);