8524-devToTest #3415
|
@ -65,7 +65,8 @@ module.exports = Self => {
|
||||||
iss.id itemShelvingSaleFk,
|
iss.id itemShelvingSaleFk,
|
||||||
iss.isPicked,
|
iss.isPicked,
|
||||||
iss.itemShelvingFk,
|
iss.itemShelvingFk,
|
||||||
st.code stateCode
|
st.code stateCode,
|
||||||
|
ac.username
|
||||||
FROM ticketCollection tc
|
FROM ticketCollection tc
|
||||||
LEFT JOIN collection c ON c.id = tc.collectionFk
|
LEFT JOIN collection c ON c.id = tc.collectionFk
|
||||||
JOIN sale s ON s.ticketFk = tc.ticketFk
|
JOIN sale s ON s.ticketFk = tc.ticketFk
|
||||||
|
@ -80,6 +81,7 @@ module.exports = Self => {
|
||||||
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
|
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
|
||||||
LEFT JOIN origin o ON o.id = i.originFk
|
LEFT JOIN origin o ON o.id = i.originFk
|
||||||
LEFT JOIN state st ON st.id = sg.stateFk
|
LEFT JOIN state st ON st.id = sg.stateFk
|
||||||
|
LEFT JOIN account.user ac ON ac.id = iss.userFk
|
||||||
WHERE tc.collectionFk = ?
|
WHERE tc.collectionFk = ?
|
||||||
GROUP BY s.id, ish.id, p.code, p2.code
|
GROUP BY s.id, ish.id, p.code, p2.code
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
@ -109,7 +111,8 @@ module.exports = Self => {
|
||||||
iss.id itemShelvingSaleFk,
|
iss.id itemShelvingSaleFk,
|
||||||
iss.isPicked,
|
iss.isPicked,
|
||||||
iss.itemShelvingFk,
|
iss.itemShelvingFk,
|
||||||
st.code stateCode
|
st.code stateCode,
|
||||||
|
ac.username
|
||||||
FROM sectorCollection sc
|
FROM sectorCollection sc
|
||||||
JOIN sectorCollectionSaleGroup ss ON ss.sectorCollectionFk = sc.id
|
JOIN sectorCollectionSaleGroup ss ON ss.sectorCollectionFk = sc.id
|
||||||
JOIN saleGroup sg ON sg.id = ss.saleGroupFk
|
JOIN saleGroup sg ON sg.id = ss.saleGroupFk
|
||||||
|
@ -124,6 +127,7 @@ module.exports = Self => {
|
||||||
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
|
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
|
||||||
LEFT JOIN origin o ON o.id = i.originFk
|
LEFT JOIN origin o ON o.id = i.originFk
|
||||||
LEFT JOIN state st ON st.id = sg.stateFk
|
LEFT JOIN state st ON st.id = sg.stateFk
|
||||||
|
LEFT JOIN account.user ac ON ac.id = sg.userFk
|
||||||
WHERE sc.id = ?
|
WHERE sc.id = ?
|
||||||
AND sgd.saleGroupFk
|
AND sgd.saleGroupFk
|
||||||
GROUP BY s.id, ish.id, p.code, p2.code`, [id, id], myOptions);
|
GROUP BY s.id, ish.id, p.code, p2.code`, [id, id], myOptions);
|
||||||
|
|
|
@ -21,9 +21,6 @@ BEGIN
|
||||||
IFNULL(sat.supplierFk, su.id) supplierFk,
|
IFNULL(sat.supplierFk, su.id) supplierFk,
|
||||||
t.landed
|
t.landed
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
JOIN ticketState ts ON ts.ticketFk = t.id
|
|
||||||
JOIN `state` s ON s.id = ts.stateFk
|
|
||||||
JOIN alertLevel al ON al.id = s.alertLevel
|
|
||||||
JOIN client c ON c.id = t.clientFk
|
JOIN client c ON c.id = t.clientFk
|
||||||
JOIN `address` a ON a.id = t.addressFk
|
JOIN `address` a ON a.id = t.addressFk
|
||||||
JOIN province p ON p.id = a.provinceFk
|
JOIN province p ON p.id = a.provinceFk
|
||||||
|
@ -40,8 +37,7 @@ BEGIN
|
||||||
LEFT JOIN agency ag ON ag.id = am.agencyFk
|
LEFT JOIN agency ag ON ag.id = am.agencyFk
|
||||||
LEFT JOIN supplierAgencyTerm sat ON sat.agencyFk = ag.id
|
LEFT JOIN supplierAgencyTerm sat ON sat.agencyFk = ag.id
|
||||||
AND wo.isFreelance
|
AND wo.isFreelance
|
||||||
WHERE al.code IN ('PACKED', 'DELIVERED')
|
WHERE co.code <> 'ES'
|
||||||
AND co.code <> 'ES'
|
|
||||||
AND am.name <> 'ABONO'
|
AND am.name <> 'ABONO'
|
||||||
AND w.code = 'ALG'
|
AND w.code = 'ALG'
|
||||||
AND t.id = vSelf
|
AND t.id = vSelf
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE vn.address MODIFY COLUMN isEqualizated tinyint(1) NULL;
|
Loading…
Reference in New Issue