IO-233 Begin Trans Headers
This commit is contained in:
17689
_reference/CDK Testing Accounts
Normal file
17689
_reference/CDK Testing Accounts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -3578,6 +3578,27 @@
|
||||
<folder_node>
|
||||
<name>dms</name>
|
||||
<children>
|
||||
<concept_node>
|
||||
<name>cashierid</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>default_journal</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -3641,6 +3662,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>generic_customer_number</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>mappingname</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -3662,6 +3704,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>srcco</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
</children>
|
||||
</folder_node>
|
||||
<concept_node>
|
||||
@@ -17074,6 +17137,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>createnewcustomer</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>getmakes</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -17116,6 +17200,48 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>usegeneric</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>useselected</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
</children>
|
||||
</folder_node>
|
||||
<concept_node>
|
||||
@@ -18940,6 +19066,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>control_type</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>controlnumber</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -32,6 +32,7 @@ export function DmsCustomerSelector({ bodyshop }) {
|
||||
const onUseSelected = () => {
|
||||
setVisible(false);
|
||||
socket.emit("cdk-selected-customer", selectedCustomer);
|
||||
setSelectedCustomer(null);
|
||||
};
|
||||
|
||||
const onUseGeneric = () => {
|
||||
@@ -40,11 +41,13 @@ export function DmsCustomerSelector({ bodyshop }) {
|
||||
"cdk-selected-customer",
|
||||
bodyshop.cdk_configuration.generic_customer_number
|
||||
);
|
||||
setSelectedCustomer(null);
|
||||
};
|
||||
|
||||
const onCreateNew = () => {
|
||||
setVisible(false);
|
||||
socket.emit("cdk-selected-customer", null);
|
||||
setSelectedCustomer(null);
|
||||
};
|
||||
|
||||
const columns = [
|
||||
|
||||
@@ -285,7 +285,7 @@ export function DmsPostForm({ bodyshop, socket, job }) {
|
||||
}}
|
||||
value={discrep.toFormat()}
|
||||
/>
|
||||
<Button disabled={discrep.getAmount() !== 0} shtmlType="submit">
|
||||
<Button disabled={discrep.getAmount() !== 0} htmlType="submit">
|
||||
{t("jobs.actions.dms.post")}
|
||||
</Button>
|
||||
<Button
|
||||
|
||||
@@ -91,6 +91,18 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.dms.srcco")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
//message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
name={["cdk_configuration", "srcco"]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.dms.generic_customer_number")}
|
||||
name={["cdk_configuration", "generic_customer_number"]}
|
||||
@@ -99,6 +111,12 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.dms.cashierid")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
//message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
name={["cdk_configuration", "cashierid"]}
|
||||
>
|
||||
<Input />
|
||||
@@ -113,7 +131,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
<Form.Item key={field.key}>
|
||||
<LayoutFormRow noDivider>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.dms.payer.name")}
|
||||
label={t("jobs.fields.dms.payer.name")}
|
||||
key={`${index}name`}
|
||||
name={[field.name, "name"]}
|
||||
rules={[
|
||||
@@ -125,9 +143,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t(
|
||||
"bodyshop.fields.dms.payer.dms_acctnumber"
|
||||
)}
|
||||
label={t("jobs.fields.dms.payer.dms_acctnumber")}
|
||||
key={`${index}dms_acctnumber`}
|
||||
name={[field.name, "dms_acctnumber"]}
|
||||
rules={[
|
||||
@@ -139,7 +155,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.dms.payer.control_type")}
|
||||
label={t("jobs.fields.dms.payer.control_type")}
|
||||
key={`${index}control_type`}
|
||||
name={[field.name, "control_type"]}
|
||||
rules={[
|
||||
|
||||
@@ -232,10 +232,13 @@
|
||||
"templates": "Delivery Templates"
|
||||
},
|
||||
"dms": {
|
||||
"cashierid": "Cashier ID",
|
||||
"default_journal": "Default Journal",
|
||||
"dms_acctnumber": "DMS Account #",
|
||||
"dms_wip_acctnumber": "DMS W.I.P. Account #",
|
||||
"mappingname": "DMS Mapping Name"
|
||||
"generic_customer_number": "Generic Customer Number",
|
||||
"mappingname": "DMS Mapping Name",
|
||||
"srcco": "Source Company #/Dealer #"
|
||||
},
|
||||
"email": "General Shop Email",
|
||||
"enforce_class": "Enforce Class on Conversion?",
|
||||
@@ -1072,8 +1075,11 @@
|
||||
"deliver": "Deliver",
|
||||
"dms": {
|
||||
"addpayer": "Add Payer",
|
||||
"createnewcustomer": "Create New Customer",
|
||||
"getmakes": "Get Makes",
|
||||
"post": "Post"
|
||||
"post": "Post",
|
||||
"usegeneric": "Use Generic Customer",
|
||||
"useselected": "Use Selected Customer"
|
||||
},
|
||||
"dmsautoallocate": "DMS Auto Allocate",
|
||||
"export": "Export",
|
||||
@@ -1167,6 +1173,7 @@
|
||||
"name1": "Customer Name",
|
||||
"payer": {
|
||||
"amount": "Amount",
|
||||
"control_type": "Control Type",
|
||||
"controlnumber": "Control Number",
|
||||
"dms_acctnumber": "DMS Account #",
|
||||
"name": "Payer Name"
|
||||
|
||||
@@ -232,10 +232,13 @@
|
||||
"templates": ""
|
||||
},
|
||||
"dms": {
|
||||
"cashierid": "",
|
||||
"default_journal": "",
|
||||
"dms_acctnumber": "",
|
||||
"dms_wip_acctnumber": "",
|
||||
"mappingname": ""
|
||||
"generic_customer_number": "",
|
||||
"mappingname": "",
|
||||
"srcco": ""
|
||||
},
|
||||
"email": "",
|
||||
"enforce_class": "",
|
||||
@@ -1072,8 +1075,11 @@
|
||||
"deliver": "",
|
||||
"dms": {
|
||||
"addpayer": "",
|
||||
"createnewcustomer": "",
|
||||
"getmakes": "",
|
||||
"post": ""
|
||||
"post": "",
|
||||
"usegeneric": "",
|
||||
"useselected": ""
|
||||
},
|
||||
"dmsautoallocate": "",
|
||||
"export": "",
|
||||
@@ -1167,6 +1173,7 @@
|
||||
"name1": "",
|
||||
"payer": {
|
||||
"amount": "",
|
||||
"control_type": "",
|
||||
"controlnumber": "",
|
||||
"dms_acctnumber": "",
|
||||
"name": ""
|
||||
|
||||
@@ -232,10 +232,13 @@
|
||||
"templates": ""
|
||||
},
|
||||
"dms": {
|
||||
"cashierid": "",
|
||||
"default_journal": "",
|
||||
"dms_acctnumber": "",
|
||||
"dms_wip_acctnumber": "",
|
||||
"mappingname": ""
|
||||
"generic_customer_number": "",
|
||||
"mappingname": "",
|
||||
"srcco": ""
|
||||
},
|
||||
"email": "",
|
||||
"enforce_class": "",
|
||||
@@ -1072,8 +1075,11 @@
|
||||
"deliver": "",
|
||||
"dms": {
|
||||
"addpayer": "",
|
||||
"createnewcustomer": "",
|
||||
"getmakes": "",
|
||||
"post": ""
|
||||
"post": "",
|
||||
"usegeneric": "",
|
||||
"useselected": ""
|
||||
},
|
||||
"dmsautoallocate": "",
|
||||
"export": "",
|
||||
@@ -1167,6 +1173,7 @@
|
||||
"name1": "",
|
||||
"payer": {
|
||||
"amount": "",
|
||||
"control_type": "",
|
||||
"controlnumber": "",
|
||||
"dms_acctnumber": "",
|
||||
"name": ""
|
||||
|
||||
@@ -149,9 +149,22 @@ async function CdkSelectedCustomer(socket, selectedCustomerId) {
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"DEBUG",
|
||||
`{5}Updating Service Vehicle History.`
|
||||
`{5} Updating Service Vehicle History. *** THIS IS CURRENTLY BEING SKIPPED DUE TO AN INCORRECT CASHIER ID PROVIDED BY CDK ***`
|
||||
);
|
||||
await InsertServiceVehicleHistory(socket);
|
||||
//await InsertServiceVehicleHistory(socket);
|
||||
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"DEBUG",
|
||||
`{6} Creating Transaction header with Dms Start WIP`
|
||||
);
|
||||
socket.DMSTransHeader = await InsertDmsStartWip(socket);
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"DEBUG",
|
||||
`{6} Creating Transaction with ID ${socket.DMSTransHeader.transID}`
|
||||
);
|
||||
socket.DMSBatchTxn = await InsertDmsBatchWip(socket);
|
||||
} catch (error) {
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
@@ -751,7 +764,7 @@ async function InsertServiceVehicleHistory(socket) {
|
||||
closeDate: moment(socket.JobData.invoice_date).format("YYYY-MM-DD"),
|
||||
closeTime: moment(socket.JobData.invoice_date).format("HH:MM:SS"),
|
||||
comments: socket.txEnvelope.story,
|
||||
cashierID: socket.JobData.bodyshop.cdk_configuration.cashierid, //NEEDS TO BE PROVIDED BY DEALER.
|
||||
cashierID: socket.JobData.bodyshop.cdk_configuration.cashierid,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -797,19 +810,19 @@ async function InsertDmsStartWip(socket) {
|
||||
);
|
||||
|
||||
const soapResponseAccountingGLInsertUpdate =
|
||||
await soapClientAccountingGLInsertUpdate.startWIPAsync({
|
||||
await soapClientAccountingGLInsertUpdate.doStartWIPAsync({
|
||||
arg0: CDK_CREDENTIALS,
|
||||
arg1: { id: socket.JobData.bodyshop.cdk_dealerid },
|
||||
arg1: { dealerId: socket.JobData.bodyshop.cdk_dealerid },
|
||||
arg2: {
|
||||
acctgDate: moment().toISOString(),
|
||||
desc: socket.txEnvelope.story,
|
||||
docType: 7 || 10, //Need to check what this usually would be?
|
||||
docType: 10 || 7, //Need to check what this usually would be? Apparently it is almost always 10 or 7.
|
||||
//1 Cash Receipt , 2 Check, 3 Journal Voucher, 4 Parts invoice, 5 Payable Invoice, 6 Recurring Entry, 7 Repair Order Invoice, 8 Vehicle Purchase Invoice, 9 Vehicle Sale Invoice, 10 Other, 11 Payroll, 12 Finance Charge, 13 FMLR Invoice, 14 Parts Credit Memo, 15 Manufacturer Document, 16 FMLR Credit Memo
|
||||
m13Flag: 0,
|
||||
refer: socket.JobData.ro_number,
|
||||
srcCo: socket.txEnvelope.journal,
|
||||
srcCo: socket.JobData.bodyshop.cdk_configuration.srcco,
|
||||
srcJrnl: socket.txEnvelope.journal,
|
||||
userID: "?", //Where is this coming from?
|
||||
userID: socket.JobData.bodyshop.cdk_configuration.cashierid, //Where is this coming from?
|
||||
//userName: "IMEX",
|
||||
},
|
||||
});
|
||||
@@ -820,13 +833,13 @@ async function InsertDmsStartWip(socket) {
|
||||
CdkBase.createXmlEvent(
|
||||
socket,
|
||||
rawRequest,
|
||||
`soapClientAccountingGLInsertUpdate.startWIPAsync request.`
|
||||
`soapClientAccountingGLInsertUpdate.doStartWIPAsync request.`
|
||||
);
|
||||
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"TRACE",
|
||||
`soapClientAccountingGLInsertUpdate.startWIPAsync Result ${JSON.stringify(
|
||||
`soapClientAccountingGLInsertUpdate.doStartWIPAsync Result ${JSON.stringify(
|
||||
result,
|
||||
null,
|
||||
2
|
||||
@@ -835,16 +848,76 @@ async function InsertDmsStartWip(socket) {
|
||||
CdkBase.createXmlEvent(
|
||||
socket,
|
||||
rawResponse,
|
||||
`soapClientAccountingGLInsertUpdate.startWIPAsync response.`
|
||||
`soapClientAccountingGLInsertUpdate.doStartWIPAsync response.`
|
||||
);
|
||||
CheckCdkResponseForError(socket, soapResponseAccountingGLInsertUpdate);
|
||||
const VehicleFromDMS = result && result.return && result.return.vehicle;
|
||||
return VehicleFromDMS;
|
||||
const TransactionHeader = result && result.return;
|
||||
return TransactionHeader;
|
||||
} catch (error) {
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"ERROR",
|
||||
`Error in QueryDmsVehicleById - ${error}`
|
||||
`Error in InsertDmsStartWip - ${error}`
|
||||
);
|
||||
throw new Error(error);
|
||||
}
|
||||
}
|
||||
|
||||
async function InsertDmsBatchWip(socket) {
|
||||
try {
|
||||
const soapClientAccountingGLInsertUpdate = await soap.createClientAsync(
|
||||
CdkWsdl.AccountingGLInsertUpdate
|
||||
);
|
||||
|
||||
const soapResponseAccountingGLInsertUpdate =
|
||||
await soapClientAccountingGLInsertUpdate.doTransBatchWIPAsync({
|
||||
arg0: CDK_CREDENTIALS,
|
||||
arg1: { dealerId: socket.JobData.bodyshop.cdk_dealerid },
|
||||
arg2: {
|
||||
acctgDate: moment().toISOString(),
|
||||
desc: socket.txEnvelope.story,
|
||||
docType: 10 || 7, //Need to check what this usually would be? Apparently it is almost always 10 or 7.
|
||||
//1 Cash Receipt , 2 Check, 3 Journal Voucher, 4 Parts invoice, 5 Payable Invoice, 6 Recurring Entry, 7 Repair Order Invoice, 8 Vehicle Purchase Invoice, 9 Vehicle Sale Invoice, 10 Other, 11 Payroll, 12 Finance Charge, 13 FMLR Invoice, 14 Parts Credit Memo, 15 Manufacturer Document, 16 FMLR Credit Memo
|
||||
m13Flag: 0,
|
||||
refer: socket.JobData.ro_number,
|
||||
srcCo: socket.JobData.bodyshop.cdk_configuration.srcco,
|
||||
srcJrnl: socket.txEnvelope.journal,
|
||||
userID: socket.JobData.bodyshop.cdk_configuration.cashierid, //Where is this coming from?
|
||||
//userName: "IMEX",
|
||||
},
|
||||
});
|
||||
|
||||
const [result, rawResponse, , rawRequest] =
|
||||
soapResponseAccountingGLInsertUpdate;
|
||||
|
||||
CdkBase.createXmlEvent(
|
||||
socket,
|
||||
rawRequest,
|
||||
`soapClientAccountingGLInsertUpdate.doTransBatchWIPAsync request.`
|
||||
);
|
||||
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"TRACE",
|
||||
`soapClientAccountingGLInsertUpdate.doTransBatchWIPAsync Result ${JSON.stringify(
|
||||
result,
|
||||
null,
|
||||
2
|
||||
)}`
|
||||
);
|
||||
CdkBase.createXmlEvent(
|
||||
socket,
|
||||
rawResponse,
|
||||
`soapClientAccountingGLInsertUpdate.doTransBatchWIPAsync response.`
|
||||
);
|
||||
CheckCdkResponseForError(socket, soapResponseAccountingGLInsertUpdate);
|
||||
const TransactionHeader = result && result.return;
|
||||
return TransactionHeader;
|
||||
} catch (error) {
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"ERROR",
|
||||
`Error in InsertDmsBatchWip - ${error}`
|
||||
);
|
||||
throw new Error(error);
|
||||
}
|
||||
|
||||
@@ -180,6 +180,7 @@ query QUERY_JOBS_FOR_CDK_EXPORT($id: uuid!) {
|
||||
md_responsibility_centers
|
||||
accountingconfig
|
||||
cdk_dealerid
|
||||
cdk_configuration
|
||||
}
|
||||
owner {
|
||||
accountingid
|
||||
|
||||
Reference in New Issue
Block a user