7691-testToMaster #2703
|
@ -3,7 +3,7 @@
|
|||
<soap:Header>
|
||||
<mrw:AuthInfo>
|
||||
<mrw:CodigoFranquicia><%= mrw.franchiseCode %></mrw:CodigoFranquicia>
|
||||
<mrw:CodigoAbonado><%= mrw.subscriberCode %></mrw:CodigoAbonado>
|
||||
<mrw:CodigoAbonado><%= expeditionData.clientType %></mrw:CodigoAbonado>
|
||||
<mrw:CodigoDepartamento/>
|
||||
<mrw:UserName><%= mrw.user %></mrw:UserName>
|
||||
<mrw:Password><%= mrw.password %></mrw:Password>
|
||||
|
|
|
@ -50,9 +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
|
||||
oa.description deliveryObservation,
|
||||
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
|
||||
|
|
|
@ -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;
|
|
@ -7,7 +7,6 @@ SELECT
|
|||
s.city,
|
||||
sp.name province,
|
||||
s.nif,
|
||||
sa.iban,
|
||||
sa.supplierFk,
|
||||
be.name bankName,
|
||||
ad.value accountDetailValue
|
||||
|
@ -21,9 +20,10 @@ FROM
|
|||
LEFT JOIN supplierAccount sa ON sa.supplierFk = s.id
|
||||
LEFT JOIN bankEntity be ON sa.bankEntityFk = be.id
|
||||
LEFT JOIN accountDetail ad ON ad.supplierAccountFk = sa.id
|
||||
LEFT JOIN accountDetailType adt ON adt.id = ad.accountDetailTypeFk AND adt.id = 3
|
||||
JOIN accountDetailType adt ON adt.id = ad.accountDetailTypeFk AND adt.id = 3
|
||||
WHERE
|
||||
(m.companyFk = ? OR m.companyFk IS NULL)
|
||||
AND (c.id = ? OR (c.id IS NULL AND c.countryFk = sa.countryFk))
|
||||
GROUP BY ad.value
|
||||
ORDER BY
|
||||
m.created DESC;
|
||||
m.created DESC;
|
||||
|
|
Loading…
Reference in New Issue