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(bill_val.is_credit_memo ? -1 : 1);
|
||||
|
||||
//Add appropriate tax amounts.
|
||||
const {
|
||||
applicable_taxes: { local, state, federal },
|
||||
} = line_val;
|
||||
// //Add appropriate tax amounts.
|
||||
// const {
|
||||
// applicable_taxes: { local, state, federal },
|
||||
// } = line_val;
|
||||
|
||||
if (local) {
|
||||
if (bodyshop.cdk_configuration.itc_local)
|
||||
taxAllocations.local.cost = taxAllocations.local.cost.add(
|
||||
lineDinero.percentage(bill_val.local_tax_rate || 0)
|
||||
);
|
||||
lineDinero = lineDinero.add(
|
||||
lineDinero.percentage(bill_val.local_tax_rate || 0)
|
||||
);
|
||||
}
|
||||
if (state) {
|
||||
if (bodyshop.cdk_configuration.itc_state)
|
||||
taxAllocations.state.cost = taxAllocations.state.cost.add(
|
||||
lineDinero.percentage(bill_val.state_tax_rate || 0)
|
||||
);
|
||||
lineDinero = lineDinero.add(
|
||||
lineDinero.percentage(bill_val.state_tax_rate || 0)
|
||||
);
|
||||
}
|
||||
if (federal) {
|
||||
//If it's an ITC, add it as a negative cost, otherwise add it to the item cost.
|
||||
if (bodyshop.cdk_configuration.itc_federal)
|
||||
taxAllocations.federal.cost = taxAllocations.federal.cost.add(
|
||||
lineDinero.percentage(bill_val.federal_tax_rate || 0)
|
||||
);
|
||||
// if (local) {
|
||||
// if (bodyshop.cdk_configuration.itc_local)
|
||||
// taxAllocations.local.cost = taxAllocations.local.cost.add(
|
||||
// lineDinero.percentage(bill_val.local_tax_rate || 0)
|
||||
// );
|
||||
// lineDinero = lineDinero.add(
|
||||
// lineDinero.percentage(bill_val.local_tax_rate || 0)
|
||||
// );
|
||||
// }
|
||||
// if (state) {
|
||||
// if (bodyshop.cdk_configuration.itc_state)
|
||||
// taxAllocations.state.cost = taxAllocations.state.cost.add(
|
||||
// lineDinero.percentage(bill_val.state_tax_rate || 0)
|
||||
// );
|
||||
// lineDinero = lineDinero.add(
|
||||
// lineDinero.percentage(bill_val.state_tax_rate || 0)
|
||||
// );
|
||||
// }
|
||||
// if (federal) {
|
||||
// //If it's an ITC, add it as a negative cost, otherwise add it to the item cost.
|
||||
// if (bodyshop.cdk_configuration.itc_federal)
|
||||
// taxAllocations.federal.cost = taxAllocations.federal.cost.add(
|
||||
// lineDinero.percentage(bill_val.federal_tax_rate || 0)
|
||||
// );
|
||||
|
||||
lineDinero = lineDinero.add(
|
||||
lineDinero.percentage(bill_val.federal_tax_rate || 0)
|
||||
);
|
||||
// lineDinero = lineDinero.add(
|
||||
// lineDinero.percentage(bill_val.federal_tax_rate || 0)
|
||||
// );
|
||||
|
||||
// bill_acc[line_val.cost_center] = bill_acc[line_val.cost_center].add(
|
||||
// lineDinero.percentage(bill_val.federal_tax_rate || 0)
|
||||
// );
|
||||
}
|
||||
// // bill_acc[line_val.cost_center] = bill_acc[line_val.cost_center].add(
|
||||
// // lineDinero.percentage(bill_val.federal_tax_rate || 0)
|
||||
// // );
|
||||
// }
|
||||
|
||||
bill_acc[line_val.cost_center] =
|
||||
bill_acc[line_val.cost_center].add(lineDinero);
|
||||
|
||||
Reference in New Issue
Block a user