ProMan totals changes.
This commit is contained in:
@@ -592,32 +592,34 @@ function ResolveCCCLineIssues(estData, bodyshop) {
|
|||||||
//Group by line no
|
//Group by line no
|
||||||
// For everything but the first one, strip out the price number in
|
// For everything but the first one, strip out the price number in
|
||||||
|
|
||||||
// InstanceRenderManager({executeFunction:true, args:[], promanager: () => {
|
InstanceRenderManager({
|
||||||
// const groupedByLineRef = _.groupBy(estData.joblines.data, "line_ref");
|
executeFunction: true,
|
||||||
// Object.keys(groupedByLineRef).forEach((lineRef) => {
|
args: [],
|
||||||
// let index0ActPrice;
|
promanager: () => {
|
||||||
// groupedByLineRef[lineRef].forEach((line, index) => {
|
const groupedByLineRef = _.groupBy(estData.joblines.data, "line_ref");
|
||||||
// //Let the first one keep it
|
Object.keys(groupedByLineRef).forEach((lineRef) => {
|
||||||
// if (index === 0){
|
let index0ActPrice;
|
||||||
// index0ActPrice = line.act_price;
|
groupedByLineRef[lineRef].forEach((line, index) => {
|
||||||
// return;}
|
//Let the first one keep it
|
||||||
// //Web Est seems to have additional costs with UNQ_SEQ 0. Keep them all?
|
if (index === 0) {
|
||||||
// if (line.unq_seq === 0) return;
|
index0ActPrice = line.act_price;
|
||||||
// if(index0ActPrice !== line.act_price){
|
return;
|
||||||
// line.notes += ` | Price override.`;
|
}
|
||||||
// return;
|
//Web Est seems to have additional costs with UNQ_SEQ 0. Keep them all?
|
||||||
// }
|
if (line.unq_seq === 0) return;
|
||||||
// const indexInEstData = estData.joblines.data.findIndex(
|
if (index0ActPrice !== line.act_price) {
|
||||||
// (l) => l.unq_seq === line.unq_seq
|
// line.notes += ` | Price override.`;
|
||||||
// );
|
return;
|
||||||
// estData.joblines.data[
|
}
|
||||||
// indexInEstData
|
const indexInEstData = estData.joblines.data.findIndex((l) => l.unq_seq === line.unq_seq);
|
||||||
// ].notes += ` | Scrubbed due to the line_ref issue. (prev act price = ${estData.joblines.data[indexInEstData].act_price})`;
|
//estData.joblines.data[indexInEstData].notes +=
|
||||||
// estData.joblines.data[indexInEstData].act_price = 0;
|
// ` | Act Price delete. (prev act price = ${estData.joblines.data[indexInEstData].act_price})`;
|
||||||
// estData.joblines.data[indexInEstData].db_price = 0;
|
estData.joblines.data[indexInEstData].act_price = 0;
|
||||||
// });
|
estData.joblines.data[indexInEstData].db_price = 0;
|
||||||
// })
|
});
|
||||||
// }})
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
InstanceRenderManager({
|
InstanceRenderManager({
|
||||||
executeFunction: true,
|
executeFunction: true,
|
||||||
|
|||||||
@@ -924,9 +924,8 @@ function CalculateTaxesTotals(job, otherTotals) {
|
|||||||
if (
|
if (
|
||||||
thresholdAmount === 9999.99 ||
|
thresholdAmount === 9999.99 ||
|
||||||
InstanceMgr({
|
InstanceMgr({
|
||||||
debug: true,
|
|
||||||
imex: false,
|
imex: false,
|
||||||
rome: false,
|
rome: thresholdAmount === 0 && parseInt(tyCounter) === 1,
|
||||||
promanager: thresholdAmount === 0 && parseInt(tyCounter) === 1
|
promanager: thresholdAmount === 0 && parseInt(tyCounter) === 1
|
||||||
})
|
})
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user