fix: change total price to net price
parent
b2be2e0160
commit
f2fef65f20
|
@ -97,18 +97,14 @@ export class PriceCalculator {
|
|||
});
|
||||
const formulas = [...taxFormula, ...taxShareFormulas];
|
||||
const values = {
|
||||
total: transaction.total_price,
|
||||
total: transaction.total_net_price,
|
||||
...this.initialValue(formulas),
|
||||
...taxes,
|
||||
};
|
||||
|
||||
// const dpp = formulas.find((formula) => formula.value_for == 'dpp');
|
||||
|
||||
const dppValue = calculateFormula(
|
||||
dpp.formula_string,
|
||||
taxes,
|
||||
transaction.total_net_price,
|
||||
);
|
||||
const dppValue = calculateFormula(dpp.formula_string, taxes, values.total);
|
||||
|
||||
values['dpp'] = dppValue;
|
||||
values['dpp_value'] = dppValue;
|
||||
|
|
Loading…
Reference in New Issue