Added decimal precision and SGI groupings.
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -65,10 +65,18 @@ async function DecodeEstimate(filePath, includeFilePathInReturnJob = false, clos
|
||||
delete job.mat_rates;
|
||||
job.insp_date = ad2.INSP_DATE;
|
||||
|
||||
const ins_rule_set = store.get("ins_rule_set");
|
||||
|
||||
if (job.OWNR_FN === "" || !job.OWNR_FN) job.OWNR_FN = ad2.CLMT_FN;
|
||||
if (job.OWNR_LN === "" || !job.OWNR_LN) job.OWNR_LN = ad2.CLMT_LN;
|
||||
if (ins_rule_set === "SGI") {
|
||||
if (job.OWNR_FN === "" || !job.OWNR_FN) job.OWNR_FN = job.INSD_FN;
|
||||
if (job.OWNR_LN === "" || !job.OWNR_LN) job.OWNR_LN = job.INSD_LN;
|
||||
}
|
||||
if (job.OWNR_CO_NM) job.OWNR_LN = `${job.OWNR_LN} ${job.OWNR_CO_NM}`;
|
||||
delete job.OWNR_CO_NM;
|
||||
delete job.INSD_LN;
|
||||
delete job.INSD_FN;
|
||||
const accepted_ins_co = store.get("accepted_ins_co");
|
||||
|
||||
let returnValue;
|
||||
@@ -77,7 +85,6 @@ async function DecodeEstimate(filePath, includeFilePathInReturnJob = false, clos
|
||||
// returnValue = { ERROR: "Vehicle mileage is less than 20,000kms." };
|
||||
// } else
|
||||
|
||||
const ins_rule_set = store.get("ins_rule_set");
|
||||
|
||||
if (!accepted_ins_co.includes(job.INS_CO_NM)) {
|
||||
returnValue = {
|
||||
@@ -192,8 +199,8 @@ async function DecodeAd1File(extensionlessFilePath) {
|
||||
// "CAT_NO",
|
||||
"TLOS_IND",
|
||||
// "CUST_PR",
|
||||
// "INSD_LN",
|
||||
// "INSD_FN",
|
||||
"INSD_LN",
|
||||
"INSD_FN",
|
||||
// "INSD_TITLE",
|
||||
// "INSD_CO_NM",
|
||||
// "INSD_ADDR1",
|
||||
|
||||
Reference in New Issue
Block a user