RPS-85 Ignore NAGS lines.
This commit is contained in:
@@ -390,6 +390,7 @@ async function DecodeLinFile(extensionlessFilePath) {
|
||||
jobline.ignore = false;
|
||||
|
||||
//Wheel Repair Pricing PRS-82
|
||||
//Verified on 08/24/21
|
||||
if (
|
||||
jobline.part_type === "PAN" &&
|
||||
jobline.line_desc.toLowerCase().includes("wheel") &&
|
||||
@@ -411,6 +412,7 @@ async function DecodeLinFile(extensionlessFilePath) {
|
||||
// }
|
||||
|
||||
//RPS-39 - OEM ON OEM SAVINGS
|
||||
//Verified on 08/24/21
|
||||
if (
|
||||
jobline.part_type === "PAN" &&
|
||||
jobline.db_price !== jobline.act_price
|
||||
@@ -419,7 +421,7 @@ async function DecodeLinFile(extensionlessFilePath) {
|
||||
}
|
||||
|
||||
//$0DB price for aftermarket and recycled parts. RPS-83
|
||||
//Norm to double check.
|
||||
//Verified on 08/24/21
|
||||
if (
|
||||
(jobline.part_type === "PAA" || jobline.part_type === "PAL") &&
|
||||
jobline.db_price === 0 &&
|
||||
@@ -429,8 +431,10 @@ async function DecodeLinFile(extensionlessFilePath) {
|
||||
}
|
||||
|
||||
//05/20
|
||||
//We’ll have to apply a rule that will not count any A/M, Reman or new part price that is manually changed to $0.00. Only recycled parts that are changed to $0.00 can be counted towards RPS.
|
||||
//We’ll have to apply a rule that will not count any A/M, Reman or new part price that is manually changed to $0.00.
|
||||
//Only recycled parts that are changed to $0.00 can be counted towards RPS.
|
||||
// This is separate from $0.00 DB prices that need to be updated to the manually entered price.
|
||||
//Verified on 08/24/21
|
||||
if (
|
||||
jobline.part_type !== "PAL" &&
|
||||
jobline.act_price === 0 &&
|
||||
@@ -442,22 +446,22 @@ async function DecodeLinFile(extensionlessFilePath) {
|
||||
jobline.ignore = true;
|
||||
}
|
||||
|
||||
// if (
|
||||
// !!jobline.db_price &&
|
||||
// jobline.db_price > 0 &&
|
||||
// !!jobline.act_price &&
|
||||
// jobline.act_price > jobline.db_price
|
||||
// ) {
|
||||
// //Actual price should never be higher than the DB Price.
|
||||
// jobline.db_price = jobline.act_price;
|
||||
// }
|
||||
|
||||
//Update as per Norm from Rod & Waldo - Only Recycled Glass should count towards RPS, not A/M or OEM
|
||||
//08/24/21 - Norm to take as action item to determine what the final set of rules were per Derek.
|
||||
if (jobline.glass_flag && jobline.part_type !== "PAL") {
|
||||
jobline.ignore = true;
|
||||
}
|
||||
|
||||
//09/2021 Detect NAGS lines using RegEx for the Part Number
|
||||
if (
|
||||
jobline.line_desc.toLowerCase().includes("glass") &&
|
||||
jobline.oem_partno.match(`[A-Z]{2}[0-9]{5}[A-Z]{3}`)
|
||||
) {
|
||||
console.log(jobline.line_desc, "NAGS Line ignored");
|
||||
jobline.ignore = true;
|
||||
}
|
||||
|
||||
//Logic Based Exclusions.
|
||||
//Verified on 08/24/21
|
||||
if (
|
||||
!jobline.part_type ||
|
||||
jobline.db_ref.startsWith("900") ||
|
||||
@@ -475,10 +479,10 @@ async function DecodeLinFile(extensionlessFilePath) {
|
||||
) {
|
||||
jobline.ignore = true;
|
||||
}
|
||||
|
||||
//Check to see if this is a discount line i.e. a 900511
|
||||
if (jobline.db_ref === "900511" && jobline.prt_dsmk_p !== 50) {
|
||||
jobline.ignore = false;
|
||||
console.log("dsmk_d", jobline.prt_dsmk_p);
|
||||
//Calculate the discount to be added as a negative.
|
||||
jobline.act_price = jobline.prt_dsmk_m;
|
||||
}
|
||||
|
||||
@@ -57,6 +57,9 @@ export default function JobsDetailDescriptionMolecule({ loading, job }) {
|
||||
<Descriptions.Item label="Last Updated">
|
||||
<TimeAgoFormatter>{job.updated_at}</TimeAgoFormatter>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="# RPS Eligible Parts">
|
||||
{job && job.joblines.filter((i) => !i.ignore).length}
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</PageHeader>
|
||||
</div>
|
||||
|
||||
@@ -169,19 +169,6 @@ export default function JobLinesTableMolecule({ loading, job }) {
|
||||
x: true,
|
||||
y: "20rem",
|
||||
}}
|
||||
// summary={
|
||||
// () => (
|
||||
// <Table.Summary.Row>
|
||||
// <Table.Summary.Cell index={0}>Summary</Table.Summary.Cell>
|
||||
// <Table.Summary.Cell index={5}>
|
||||
// This is a summary content
|
||||
// </Table.Summary.Cell>
|
||||
// <Table.Summary.Cell index={6}>
|
||||
// This is a summary content
|
||||
// </Table.Summary.Cell>
|
||||
// </Table.Summary.Row>
|
||||
// )
|
||||
// }
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -45,6 +45,9 @@ export function JobsTargetsStatsMolecule({
|
||||
errorMessage="It looks like this job doesn't exist."
|
||||
/>
|
||||
);
|
||||
|
||||
const targetRpsDollars = dbPriceSum.percentage(selectedJobTargetPc * 100);
|
||||
const dollarDiff = jobRpsDollars.subtract(targetRpsDollars);
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
@@ -77,13 +80,22 @@ export function JobsTargetsStatsMolecule({
|
||||
<Statistic
|
||||
title="Target RPS $"
|
||||
style={{ margin: "0rem .5rem" }}
|
||||
value={dbPriceSum.percentage(selectedJobTargetPc * 100).toFormat()}
|
||||
value={targetRpsDollars.toFormat()}
|
||||
/>
|
||||
<Statistic
|
||||
title="Current RPS $"
|
||||
style={{ margin: "0rem .5rem" }}
|
||||
value={jobRpsDollars.toFormat()}
|
||||
/>
|
||||
<Statistic
|
||||
title="Diff."
|
||||
style={{ margin: "0rem .5rem" }}
|
||||
valueStyle={{
|
||||
color:
|
||||
dollarDiff && dollarDiff.getAmount() <= 0 ? "tomato" : "seagreen",
|
||||
}}
|
||||
value={dollarDiff && dollarDiff.toFormat()}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ display: "flex" }}>
|
||||
<Statistic
|
||||
|
||||
@@ -30,11 +30,12 @@ export default function SiderMenuOrganism() {
|
||||
<Menu.Item key="/settings" icon={<SettingFilled />}>
|
||||
<Link to="/settings">Settings</Link>
|
||||
</Menu.Item>
|
||||
<SiderSignOut />
|
||||
|
||||
<Menu.Divider />
|
||||
<SiderSignOut style={{ color: "tomato" }} />
|
||||
<Menu.Item
|
||||
key="3"
|
||||
icon={<CloseOutlined />}
|
||||
key="3" style={{ color: "tomato" }}
|
||||
icon={<CloseOutlined style={{ color: "tomato" }}/>}
|
||||
onClick={() => {
|
||||
ipcRenderer.send(ipcTypes.default.quit);
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user