feature: po pay downpayment
This commit is contained in:
@@ -96,7 +96,7 @@ export default {
|
||||
let price = Number(ite.ReceiveOrderPoDetailPrice)
|
||||
let disc = Number(ite.Discount)
|
||||
let qty = Number(ite.ReceiveOrderPoDetailQty)
|
||||
|
||||
|
||||
if (ite.PurchaseOrderSummaryDiscountType == 'P') {
|
||||
disc = (price * Number(ite.Discount)) / 100
|
||||
}
|
||||
@@ -107,8 +107,18 @@ export default {
|
||||
|
||||
let pph = (sub - podisc) * (Number(faktur.form_tax_percent_pph) / 100)
|
||||
let ppn = (sub - podisc) * (Number(faktur.form_tax_percent_ppn) / 100)
|
||||
let grandtotal = (sub - podisc + pph + ppn) + Number(faktur.form_adjust_amount) + Number(faktur.form_shipping_cost)
|
||||
|
||||
|
||||
let grandtotal = 0;
|
||||
let dpamount = Number(faktur.dp_amount);
|
||||
if (faktur.type_purchase == 'aset') {
|
||||
grandtotal = (sub - podisc) + ( pph + ppn) - dpamount
|
||||
grandtotal = grandtotal + Number(faktur.form_adjust_amount) + Number(faktur.form_shipping_cost)
|
||||
} else {
|
||||
grandtotal = (sub - podisc + pph + ppn) + Number(faktur.form_adjust_amount) + Number(faktur.form_shipping_cost)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Store exact values with 2 decimal places using floor instead of rounding
|
||||
// This prevents rounding errors in financial calculations
|
||||
faktur.form_subtotal = sub
|
||||
@@ -124,6 +134,7 @@ export default {
|
||||
faktur.form_tax_amount_ppn = 0.00
|
||||
faktur.form_adjust_amount = 0.00
|
||||
faktur.form_adjust_note = ""
|
||||
faktur.dp_amount = 0.00
|
||||
}
|
||||
|
||||
context.commit("update_form_faktur", faktur)
|
||||
@@ -136,7 +147,7 @@ export default {
|
||||
try {
|
||||
let item = context.state.form_item
|
||||
let para_item = []
|
||||
|
||||
|
||||
let param = {
|
||||
SIPoID: context.state.form_faktur.form_po.PurchaseOrderID,
|
||||
SIDate: context.state.form_faktur.form_date,
|
||||
@@ -342,4 +353,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user