fix: refs #6404 fix cancel shipment
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Pablo Natek 2024-05-20 12:14:59 +02:00
parent 2b0ab1816f
commit d51c9fc120
2 changed files with 4 additions and 3 deletions

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')