feature/IO-3255-simplified-parts-management - Checkpoint
This commit is contained in:
@@ -154,8 +154,8 @@ const partsManagementVehicleDamageEstimateAddRq = async (req, res) => {
|
|||||||
const servicing_dealer_addr1 = rfAdr.Address1 || null;
|
const servicing_dealer_addr1 = rfAdr.Address1 || null;
|
||||||
const servicing_dealer_city = rfAdr.City || null;
|
const servicing_dealer_city = rfAdr.City || null;
|
||||||
const servicing_dealer_st = rfAdr.StateProvince || null;
|
const servicing_dealer_st = rfAdr.StateProvince || null;
|
||||||
const servicing_dealer_zip = rfAdr.PostalCode || null;
|
// const servicing_dealer_zip = rfAdr.PostalCode || null;
|
||||||
const servicing_dealer_ctry = rfAdr.Country || null;
|
// const servicing_dealer_ctry = rfAdr.Country || null;
|
||||||
const rfComms = rfParty.ContactInfo?.Communications
|
const rfComms = rfParty.ContactInfo?.Communications
|
||||||
? Array.isArray(rfParty.ContactInfo.Communications)
|
? Array.isArray(rfParty.ContactInfo.Communications)
|
||||||
? rfParty.ContactInfo.Communications
|
? rfParty.ContactInfo.Communications
|
||||||
@@ -184,19 +184,19 @@ const partsManagementVehicleDamageEstimateAddRq = async (req, res) => {
|
|||||||
|
|
||||||
const vehicleData = {
|
const vehicleData = {
|
||||||
shopid: shopId,
|
shopid: shopId,
|
||||||
vin,
|
// vin,
|
||||||
plate_no,
|
plate_no,
|
||||||
plate_st,
|
plate_st
|
||||||
year: v_model_yr,
|
// year: v_model_yr,
|
||||||
make: v_make_desc,
|
// make: v_make_desc
|
||||||
model: v_model_desc,
|
// model: v_model_desc
|
||||||
color: v_color,
|
// color: v_color,
|
||||||
bstyle: body_style,
|
// bstyle: body_style,
|
||||||
engine: engine_desc,
|
// engine: engine_desc
|
||||||
prod_dt: production_date,
|
// prod_dt: production_date,
|
||||||
options: v_options,
|
// options: v_options,
|
||||||
type: v_type,
|
// type: v_type,
|
||||||
condition: driveable
|
// condition: driveable
|
||||||
};
|
};
|
||||||
|
|
||||||
// ── PROFILE & RATES ─────────────────────────────────────────────────────────
|
// ── PROFILE & RATES ─────────────────────────────────────────────────────────
|
||||||
@@ -230,8 +230,8 @@ const partsManagementVehicleDamageEstimateAddRq = async (req, res) => {
|
|||||||
line_no: parseInt(line.LineNum, 10),
|
line_no: parseInt(line.LineNum, 10),
|
||||||
unq_seq: parseInt(line.UniqueSequenceNum, 10),
|
unq_seq: parseInt(line.UniqueSequenceNum, 10),
|
||||||
manual_line: line.ManualLineInd === "1",
|
manual_line: line.ManualLineInd === "1",
|
||||||
automated_entry: line.AutomatedEntry === "1",
|
// automated_entry: line.AutomatedEntry === "1",
|
||||||
desc_judgment_ind: line.DescJudgmentInd === "1",
|
// desc_judgment_ind: line.DescJudgmentInd === "1",
|
||||||
status: line.LineStatusCode || null,
|
status: line.LineStatusCode || null,
|
||||||
line_desc: line.LineDesc || null,
|
line_desc: line.LineDesc || null,
|
||||||
|
|
||||||
@@ -244,13 +244,14 @@ const partsManagementVehicleDamageEstimateAddRq = async (req, res) => {
|
|||||||
|
|
||||||
// non-OEM → not persisted at jobline level
|
// non-OEM → not persisted at jobline level
|
||||||
|
|
||||||
after_market_usage: line.PartInfo?.AfterMarketUsage || null,
|
// after_market_usage: line.PartInfo?.AfterMarketUsage || null,
|
||||||
certification_type: line.PartInfo?.CertificationType || null,
|
// certification_type: line.PartInfo?.CertificationType || null,
|
||||||
|
// certification_type: line.PartInfo?.CertificationType || null,
|
||||||
tax_part: line.PartInfo?.TaxableInd === "1",
|
tax_part: line.PartInfo?.TaxableInd === "1",
|
||||||
glass_flag: line.PartInfo?.GlassPartInd === "1",
|
glass_flag: line.PartInfo?.GlassPartInd === "1",
|
||||||
price_j: line.PriceJudgmentInd === "1",
|
price_j: line.PriceJudgmentInd === "1",
|
||||||
price_inc: line.PriceInclInd === "1",
|
price_inc: line.PriceInclInd === "1",
|
||||||
order_by_application_ind: String(line.PartInfo?.OrderByApplicationInd).toLowerCase() === "true",
|
// order_by_application_ind: String(line.PartInfo?.OrderByApplicationInd).toLowerCase() === "true",
|
||||||
|
|
||||||
// labor
|
// labor
|
||||||
mod_lbr_ty: line.LaborInfo?.LaborType || null,
|
mod_lbr_ty: line.LaborInfo?.LaborType || null,
|
||||||
@@ -258,7 +259,7 @@ const partsManagementVehicleDamageEstimateAddRq = async (req, res) => {
|
|||||||
lbr_op: line.LaborInfo?.LaborOperation || null,
|
lbr_op: line.LaborInfo?.LaborOperation || null,
|
||||||
lbr_amt: parseFloat(line.LaborInfo?.LaborAmt || 0),
|
lbr_amt: parseFloat(line.LaborInfo?.LaborAmt || 0),
|
||||||
|
|
||||||
parent_line_no: line.ParentLineNum ? parseInt(line.ParentLineNum, 10) : null,
|
// parent_line_no: line.ParentLineNum ? parseInt(line.ParentLineNum, 10) : null,
|
||||||
notes: line.LineMemo || null
|
notes: line.LineMemo || null
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -294,9 +295,9 @@ const partsManagementVehicleDamageEstimateAddRq = async (req, res) => {
|
|||||||
ownr_ph2,
|
ownr_ph2,
|
||||||
ownr_fax,
|
ownr_fax,
|
||||||
ownr_ea,
|
ownr_ea,
|
||||||
preferred_contact,
|
// preferred_contact,
|
||||||
|
|
||||||
est_co_id: est_aff,
|
// est_co_id: est_aff,
|
||||||
est_ct_fn: est_fn,
|
est_ct_fn: est_fn,
|
||||||
est_ct_ln: est_ln,
|
est_ct_ln: est_ln,
|
||||||
est_ea,
|
est_ea,
|
||||||
@@ -307,14 +308,14 @@ const partsManagementVehicleDamageEstimateAddRq = async (req, res) => {
|
|||||||
agt_ea,
|
agt_ea,
|
||||||
|
|
||||||
servicing_dealer,
|
servicing_dealer,
|
||||||
servicing_dealer_addr1,
|
// servicing_dealer_addr1,
|
||||||
servicing_dealer_city,
|
// servicing_dealer_city,
|
||||||
servicing_dealer_st,
|
// servicing_dealer_st,
|
||||||
servicing_dealer_zip,
|
// servicing_dealer_zip,
|
||||||
servicing_dealer_ctry,
|
// servicing_dealer_ctry,
|
||||||
servicing_dealer_contact,
|
servicing_dealer_contact,
|
||||||
|
|
||||||
...rates,
|
// ...rates,
|
||||||
|
|
||||||
production_vars: {
|
production_vars: {
|
||||||
documentVersions,
|
documentVersions,
|
||||||
@@ -362,7 +363,7 @@ const partsManagementVehicleDamageEstimateAddRq = async (req, res) => {
|
|||||||
const partsOrders = Object.entries(poGroups).map(([vendorid, entries]) => ({
|
const partsOrders = Object.entries(poGroups).map(([vendorid, entries]) => ({
|
||||||
jobid: jobId,
|
jobid: jobId,
|
||||||
vendorid,
|
vendorid,
|
||||||
order_number: `${clm_no}-${entries[0].line.LineNum}`,
|
order_number: `${entries[0].line.LineNum}`,
|
||||||
order_date: currentDate,
|
order_date: currentDate,
|
||||||
orderedby: "XML-API",
|
orderedby: "XML-API",
|
||||||
user_email: userEmail,
|
user_email: userEmail,
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<VehicleDamageEstimateAddRq xmlns="http://www.cieca.com/BMS">
|
<VehicleDamageEstimateAddRq xmlns="http://www.cieca.com/BMS">
|
||||||
<!-- Shop identifier -->
|
<!-- Shop identifier -->
|
||||||
<ShopID>12345</ShopID>
|
<ShopID>71f8494c-89f0-43e0-8eb2-820b52d723bc</ShopID>
|
||||||
|
|
||||||
<!-- Request & Claim -->
|
<!-- Request & Claim -->
|
||||||
<RqUID>17e5ccc4-cdfb-4cf3-a08d-ecfa8d145d6f</RqUID>
|
<RqUID>17e5ccc4-cdfb-4cf3-a08d-ecfa8d145d6f</RqUID>
|
||||||
<RefClaimNum>CLM123</RefClaimNum>
|
<RefClaimNum>200</RefClaimNum>
|
||||||
|
|
||||||
<!-- Document metadata -->
|
<!-- Document metadata -->
|
||||||
<DocumentInfo>
|
<DocumentInfo>
|
||||||
|
|||||||
Reference in New Issue
Block a user