IO-2829 Multiple Towing Lines

Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
Allan Carr
2024-06-25 13:26:56 -07:00
parent fc7da187f4
commit f81b21b933
2 changed files with 5 additions and 5 deletions

View File

@@ -643,7 +643,7 @@ function CalculateAdditional(job) {
additionalCosts: null,
additionalCostItems: [],
adjustments: null,
towing: null,
towing: Dinero(),
shipping: Dinero(),
storage: null,
pvrt: null,
@@ -668,7 +668,7 @@ function CalculateAdditional(job) {
}
if (val.line_desc.toLowerCase().includes("towing")) {
ret.towing = lineValue;
ret.towing = ret.towing.add(lineValue);
return acc;
} else {
ret.additionalCostItems.push({ key: val.line_desc, total: lineValue });
@@ -919,7 +919,7 @@ function CalculateTaxesTotals(job, otherTotals) {
Object.keys(taxableAmountsByTier).forEach((taxTierKey) => {
taxable_adjustment = taxableAmountsByTier[taxTierKey].multiply(percent_of_adjustment);
console.log("🚀 ~ taxableAmountsByTier ~ taxable_adjustment:", taxable_adjustment)
console.log("🚀 ~ taxableAmountsByTier ~ taxable_adjustment:", taxable_adjustment);
if (job.adjustment_bottom_line > 0) {
taxableAmountsByTier[taxTierKey] = taxableAmountsByTier[taxTierKey].add(taxable_adjustment);
} else {

View File

@@ -489,7 +489,7 @@ function CalculateAdditional(job) {
additionalCosts: null,
additionalCostItems: [],
adjustments: null,
towing: null,
towing: Dinero(),
shipping: Dinero(),
storage: null,
pvrt: null,
@@ -512,7 +512,7 @@ function CalculateAdditional(job) {
}
if (val.line_desc.toLowerCase().includes("towing")) {
ret.towing = lineValue;
ret.towing = ret.towing.add(lineValue);
return acc;
} else {
ret.additionalCostItems.push({ key: val.line_desc, total: lineValue });