Add DMS error WIP query.
This commit is contained in:
@@ -362,6 +362,13 @@ const FortellisActions = {
|
||||
type: "post",
|
||||
apiName: "CDK Drive Post Accounts GL WIP",
|
||||
},
|
||||
QueryErrorWip: {
|
||||
url: isProduction
|
||||
? "https://api.fortellis.io/cdk/drive/glpost/errWIP"
|
||||
: "https://api.fortellis.io/cdk-test/drive/glpost/errWIP",
|
||||
type: "get",
|
||||
apiName: "CDK Drive Post Accounts GL WIP",
|
||||
},
|
||||
ServiceHistoryInsert: {
|
||||
url: isProduction
|
||||
? "https://api.fortellis.io/cdk/drive/post/service-vehicle-history-mgmt/v2/"
|
||||
|
||||
@@ -242,6 +242,8 @@ async function FortellisSelectedCustomer({ socket, redisHelpers, ioHelpers, sele
|
||||
"DEBUG",
|
||||
`{6.1} Getting errors for Transaction ID ${DMSTransHeader.transID}`
|
||||
);
|
||||
|
||||
const DmsError = await QueryDmsErrWip({ socket, redisHelpers, JobData });
|
||||
// socket.DmsError = await QueryDmsErrWip(socket);
|
||||
// //Delete the transaction
|
||||
// CdkBase.createLogEvent(socket, "DEBUG", `{ 6.2 } Deleting Transaction ID ${ socket.DMSTransHeader.transID } `);
|
||||
@@ -1161,34 +1163,32 @@ async function PostDmsBatchWip({ socket, redisHelpers, JobData }) {
|
||||
}
|
||||
}
|
||||
|
||||
// async function QueryDmsErrWip(socket) {
|
||||
// try {
|
||||
// const soapClientAccountingGLInsertUpdate = await soap.createClientAsync(CdkWsdl.AccountingGLInsertUpdate);
|
||||
async function QueryDmsErrWip({ socket, redisHelpers, JobData }) {
|
||||
let DMSTransHeader;
|
||||
try {
|
||||
DMSTransHeader = await redisHelpers.getSessionTransactionData(socket.id, getTransactionType(JobData.id), FortellisCacheEnums.DMSTransHeader);
|
||||
|
||||
// const soapResponseAccountingGLInsertUpdate = await soapClientAccountingGLInsertUpdate.doErrWIPAsync({
|
||||
// arg0: CDK_CREDENTIALS,
|
||||
// arg1: { dealerId: socket.JobData.bodyshop.cdk_dealerid },
|
||||
// arg2: socket.DMSTransHeader.transID
|
||||
// });
|
||||
|
||||
// const [result, rawResponse, , rawRequest] = soapResponseAccountingGLInsertUpdate;
|
||||
const result = await MakeFortellisCall({
|
||||
...FortellisActions.QueryErrorWip,
|
||||
headers: {},
|
||||
redisHelpers,
|
||||
socket,
|
||||
jobid: JobData.id,
|
||||
requestPathParams: DMSTransHeader.transID,
|
||||
body: {
|
||||
|
||||
// CdkBase.createXmlEvent(socket, rawRequest, `soapClientAccountingGLInsertUpdate.doErrWIPAsync request.`);
|
||||
|
||||
// CdkBase.createLogEvent(
|
||||
// socket,
|
||||
// "DEBUG",
|
||||
// `soapClientAccountingGLInsertUpdate.doErrWIPAsync Result ${JSON.stringify(result, null, 2)}`
|
||||
// );
|
||||
// CdkBase.createXmlEvent(socket, rawResponse, `soapClientAccountingGLInsertUpdate.doErrWIPAsync response.`);
|
||||
// CheckCdkResponseForError(socket, soapResponseAccountingGLInsertUpdate);
|
||||
// const PostResult = result && result.return;
|
||||
// return PostResult;
|
||||
// } catch (error) {
|
||||
// CdkBase.createLogEvent(socket, "ERROR", `Error in QueryDmsErrWip - ${error}`);
|
||||
// throw new Error(error);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
});
|
||||
return result;
|
||||
} catch (error) {
|
||||
handleFortellisApiError(socket, error, "PostDmsBatchWip", {
|
||||
transId: DMSTransHeader?.transID,
|
||||
jobId: JobData.id
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
// async function DeleteDmsWip(socket) {
|
||||
// try {
|
||||
|
||||
Reference in New Issue
Block a user