feat: refs #6403 add debug on cancel shipment
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Pablo Natek 2024-11-13 11:03:57 +01:00
parent 021bc03ecf
commit 274a365ec0
1 changed files with 3 additions and 0 deletions

View File

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