IO-233 Revert ITC Calculations.
This commit is contained in:
@@ -86,44 +86,44 @@ exports.default = async function (socket, jobid) {
|
|||||||
.multiply(line_val.quantity)
|
.multiply(line_val.quantity)
|
||||||
.multiply(bill_val.is_credit_memo ? -1 : 1);
|
.multiply(bill_val.is_credit_memo ? -1 : 1);
|
||||||
|
|
||||||
//Add appropriate tax amounts.
|
// //Add appropriate tax amounts.
|
||||||
const {
|
// const {
|
||||||
applicable_taxes: { local, state, federal },
|
// applicable_taxes: { local, state, federal },
|
||||||
} = line_val;
|
// } = line_val;
|
||||||
|
|
||||||
if (local) {
|
// if (local) {
|
||||||
if (bodyshop.cdk_configuration.itc_local)
|
// if (bodyshop.cdk_configuration.itc_local)
|
||||||
taxAllocations.local.cost = taxAllocations.local.cost.add(
|
// taxAllocations.local.cost = taxAllocations.local.cost.add(
|
||||||
lineDinero.percentage(bill_val.local_tax_rate || 0)
|
// lineDinero.percentage(bill_val.local_tax_rate || 0)
|
||||||
);
|
// );
|
||||||
lineDinero = lineDinero.add(
|
// lineDinero = lineDinero.add(
|
||||||
lineDinero.percentage(bill_val.local_tax_rate || 0)
|
// lineDinero.percentage(bill_val.local_tax_rate || 0)
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
if (state) {
|
// if (state) {
|
||||||
if (bodyshop.cdk_configuration.itc_state)
|
// if (bodyshop.cdk_configuration.itc_state)
|
||||||
taxAllocations.state.cost = taxAllocations.state.cost.add(
|
// taxAllocations.state.cost = taxAllocations.state.cost.add(
|
||||||
lineDinero.percentage(bill_val.state_tax_rate || 0)
|
// lineDinero.percentage(bill_val.state_tax_rate || 0)
|
||||||
);
|
// );
|
||||||
lineDinero = lineDinero.add(
|
// lineDinero = lineDinero.add(
|
||||||
lineDinero.percentage(bill_val.state_tax_rate || 0)
|
// lineDinero.percentage(bill_val.state_tax_rate || 0)
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
if (federal) {
|
// if (federal) {
|
||||||
//If it's an ITC, add it as a negative cost, otherwise add it to the item cost.
|
// //If it's an ITC, add it as a negative cost, otherwise add it to the item cost.
|
||||||
if (bodyshop.cdk_configuration.itc_federal)
|
// if (bodyshop.cdk_configuration.itc_federal)
|
||||||
taxAllocations.federal.cost = taxAllocations.federal.cost.add(
|
// taxAllocations.federal.cost = taxAllocations.federal.cost.add(
|
||||||
lineDinero.percentage(bill_val.federal_tax_rate || 0)
|
// lineDinero.percentage(bill_val.federal_tax_rate || 0)
|
||||||
);
|
// );
|
||||||
|
|
||||||
lineDinero = lineDinero.add(
|
// lineDinero = lineDinero.add(
|
||||||
lineDinero.percentage(bill_val.federal_tax_rate || 0)
|
// lineDinero.percentage(bill_val.federal_tax_rate || 0)
|
||||||
);
|
// );
|
||||||
|
|
||||||
// bill_acc[line_val.cost_center] = bill_acc[line_val.cost_center].add(
|
// // bill_acc[line_val.cost_center] = bill_acc[line_val.cost_center].add(
|
||||||
// lineDinero.percentage(bill_val.federal_tax_rate || 0)
|
// // lineDinero.percentage(bill_val.federal_tax_rate || 0)
|
||||||
// );
|
// // );
|
||||||
}
|
// }
|
||||||
|
|
||||||
bill_acc[line_val.cost_center] =
|
bill_acc[line_val.cost_center] =
|
||||||
bill_acc[line_val.cost_center].add(lineDinero);
|
bill_acc[line_val.cost_center].add(lineDinero);
|
||||||
|
|||||||
Reference in New Issue
Block a user