feat: refs #6403 add debug on cancel shipment #3197

Merged
pablone merged 1 commits from 6403-add-debug-on-cancelShipment into master 2024-11-14 09:16:09 +00:00
1 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,9 @@ module.exports = Self => {
const xmlString = response.data; const xmlString = response.data;
const parser = new DOMParser(); const parser = new DOMParser();
const xmlDoc = parser.parseFromString(xmlString, 'text/xml'); const xmlDoc = parser.parseFromString(xmlString, 'text/xml');
await Self.rawSql('CALL util.debugAdd(?,?);', ['cancelShipment', xmlDoc]);
const result = xmlDoc.getElementsByTagName('Mensaje')[0].textContent; const result = xmlDoc.getElementsByTagName('Mensaje')[0].textContent;
return result.toLowerCase().includes('se ha cancelado correctamente'); return result.toLowerCase().includes('se ha cancelado correctamente');
}; };