Merged in feature/IO-2829-Multiple-Towing-Lines (pull request #1500)
IO-2829 Multiple Towing Lines Approved-by: Dave Richer
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user