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,
|
additionalCosts: null,
|
||||||
additionalCostItems: [],
|
additionalCostItems: [],
|
||||||
adjustments: null,
|
adjustments: null,
|
||||||
towing: null,
|
towing: Dinero(),
|
||||||
shipping: Dinero(),
|
shipping: Dinero(),
|
||||||
storage: null,
|
storage: null,
|
||||||
pvrt: null,
|
pvrt: null,
|
||||||
@@ -668,7 +668,7 @@ function CalculateAdditional(job) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (val.line_desc.toLowerCase().includes("towing")) {
|
if (val.line_desc.toLowerCase().includes("towing")) {
|
||||||
ret.towing = lineValue;
|
ret.towing = ret.towing.add(lineValue);
|
||||||
return acc;
|
return acc;
|
||||||
} else {
|
} else {
|
||||||
ret.additionalCostItems.push({ key: val.line_desc, total: lineValue });
|
ret.additionalCostItems.push({ key: val.line_desc, total: lineValue });
|
||||||
@@ -919,7 +919,7 @@ function CalculateTaxesTotals(job, otherTotals) {
|
|||||||
|
|
||||||
Object.keys(taxableAmountsByTier).forEach((taxTierKey) => {
|
Object.keys(taxableAmountsByTier).forEach((taxTierKey) => {
|
||||||
taxable_adjustment = taxableAmountsByTier[taxTierKey].multiply(percent_of_adjustment);
|
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) {
|
if (job.adjustment_bottom_line > 0) {
|
||||||
taxableAmountsByTier[taxTierKey] = taxableAmountsByTier[taxTierKey].add(taxable_adjustment);
|
taxableAmountsByTier[taxTierKey] = taxableAmountsByTier[taxTierKey].add(taxable_adjustment);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -489,7 +489,7 @@ function CalculateAdditional(job) {
|
|||||||
additionalCosts: null,
|
additionalCosts: null,
|
||||||
additionalCostItems: [],
|
additionalCostItems: [],
|
||||||
adjustments: null,
|
adjustments: null,
|
||||||
towing: null,
|
towing: Dinero(),
|
||||||
shipping: Dinero(),
|
shipping: Dinero(),
|
||||||
storage: null,
|
storage: null,
|
||||||
pvrt: null,
|
pvrt: null,
|
||||||
@@ -512,7 +512,7 @@ function CalculateAdditional(job) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (val.line_desc.toLowerCase().includes("towing")) {
|
if (val.line_desc.toLowerCase().includes("towing")) {
|
||||||
ret.towing = lineValue;
|
ret.towing = ret.towing.add(lineValue);
|
||||||
return acc;
|
return acc;
|
||||||
} else {
|
} else {
|
||||||
ret.additionalCostItems.push({ key: val.line_desc, total: lineValue });
|
ret.additionalCostItems.push({ key: val.line_desc, total: lineValue });
|
||||||
|
|||||||
Reference in New Issue
Block a user