diff --git a/back/methods/mrw-config/createShipment.js b/back/methods/mrw-config/createShipment.js index 13d3a591f..9b23cc370 100644 --- a/back/methods/mrw-config/createShipment.js +++ b/back/methods/mrw-config/createShipment.js @@ -50,10 +50,10 @@ module.exports = Self => { DATE_FORMAT(t.shipped, '%d/%m/%Y') created, t.shipped, CONCAT( e.ticketFk, LPAD(e.counter, mc.counterWidth, '0')) reference, - LPAD(IF(mw.serviceType IS NULL, ms.serviceType, mw.serviceType), mc.serviceTypeWidth,'0') serviceType, + LPAD(IF(mw.serviceType IS NULL, ms.serviceType, mw.serviceType), mc.serviceTypeWidth, '0') serviceType, IF(mw.weekdays, 'S', 'N') weekDays, oa.description deliveryObservation, - ms.clientType + LPAD(ms.clientType, mc.clientTypeWidth, '0') clientType FROM expedition e JOIN ticket t ON e.ticketFk = t.id JOIN agencyMode am ON am.id = t.agencyModeFk diff --git a/db/versions/11139-bronzeCataractarum/00-firstScript.sql b/db/versions/11139-bronzeCataractarum/00-firstScript.sql new file mode 100644 index 000000000..2816fab86 --- /dev/null +++ b/db/versions/11139-bronzeCataractarum/00-firstScript.sql @@ -0,0 +1,6 @@ +-- Place your SQL code here +ALTER TABLE vn.mrwConfig ADD IF NOT EXISTS clientTypeWidth int(10) unsigned NULL + COMMENT 'If it does not reach the required value, it will be padded with zeros on the left to meet the specified length.'; + +UPDATE vn.mrwConfig + SET clientTypeWidth = 6; \ No newline at end of file