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