IO-1921 Add shipping to reconciliation.
This commit is contained in:
@@ -523,6 +523,7 @@ function CalculateAdditional(job) {
|
||||
additionalCostItems: [],
|
||||
adjustments: null,
|
||||
towing: null,
|
||||
shipping: Dinero(),
|
||||
storage: null,
|
||||
pvrt: null,
|
||||
total: null,
|
||||
@@ -530,6 +531,7 @@ function CalculateAdditional(job) {
|
||||
ret.towing = Dinero({
|
||||
amount: Math.round((job.towing_payable || 0) * 100),
|
||||
});
|
||||
|
||||
ret.additionalCosts = job.joblines
|
||||
.filter((jl) => !jl.removed && IsAdditionalCost(jl))
|
||||
.reduce((acc, val) => {
|
||||
@@ -537,6 +539,11 @@ function CalculateAdditional(job) {
|
||||
amount: Math.round((val.act_price || 0) * 100),
|
||||
}).multiply(val.part_qty || 1);
|
||||
|
||||
if (val.db_ref === "936004") {
|
||||
//Shipping line IO-1921.
|
||||
ret.shipping = ret.shipping.add(lineValue);
|
||||
}
|
||||
|
||||
if (val.line_desc.toLowerCase().includes("towing")) {
|
||||
ret.towing = lineValue;
|
||||
return acc;
|
||||
|
||||
Reference in New Issue
Block a user