fix: refs #6404 fix cancel shipment #2486

Merged
pablone merged 3 commits from 6404-mrwIntegrationWebService into dev 2024-05-20 12:02:49 +00:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit d51c9fc120 - Show all commits

View File

@ -39,8 +39,8 @@ module.exports = Self => {
const xmlString = response.data;
const parser = new DOMParser();
const xmlDoc = parser.parseFromString(xmlString, 'text/xml');
const [resultElement] = xmlDoc.getElementsByTagName('Mensaje');
const resultElement = xmlDoc.getElementsByTagName('Mensaje')[0].textContent;
return resultElement.textContent;
return resultElement;
};
};

View File

@ -42,7 +42,8 @@ module.exports = Self => {
throw new UserError(`Some mrwConfig parameters are not set`);
const query =
`SELECT CASE co.code
`SELECT
CASE co.code
WHEN 'ES' THEN a.postalCode
WHEN 'PT' THEN LEFT(a.postalCode, 4)
WHEN 'AD' THEN REPLACE(a.postalCode, 'AD', '00')