diff --git a/db/routines/vn/procedures/collection_getTickets.sql b/db/routines/vn/procedures/collection_getTickets.sql index fed7a3eb6..a468d7582 100644 --- a/db/routines/vn/procedures/collection_getTickets.sql +++ b/db/routines/vn/procedures/collection_getTickets.sql @@ -30,7 +30,9 @@ BEGIN t.warehouseFk, w.id salesPersonFk, IFNULL(ob.description,'') observaciones, - cc.rgb + cc.rgb, + p.code parkingCode, + IF (ps.ticketFk, TRUE, FALSE) isAdvanced FROM vn.ticket t LEFT JOIN vn.ticketCollection tc ON t.id = tc.ticketFk LEFT JOIN vn.collection c2 ON c2.id = tc.collectionFk @@ -42,7 +44,10 @@ BEGIN LEFT JOIN vn.agencyMode am ON am.id = z.agencyModeFk LEFT JOIN vn.client c ON c.id = t.clientFk LEFT JOIN vn.worker w ON w.id = c.salesPersonFk - LEFT JOIN observation ob ON ob.ticketFk = t.id + LEFT JOIN observation ob ON ob.ticketFk = t.id + LEFT JOIN vn.ticketParking tp ON tp.ticketFk = t.id + LEFT JOIN vn.parking p ON tp.parkingFk = p.id + LEFT JOIN vn.packingSiteAdvanced ps ON ps.ticketFk = t.id WHERE t.id = vParamFk AND t.shipped >= vYesterday UNION @@ -52,7 +57,9 @@ BEGIN t.warehouseFk, w.id salesPersonFk, ob.description, - IF(NOT (vItemPackingTypeFk <=> 'V'), cc.rgb, NULL) `rgb` + IF(NOT (vItemPackingTypeFk <=> 'V'), cc.rgb, NULL) `rgb`, + p.code parkingCode, + IF (ps.ticketFk, TRUE, FALSE) isAdvanced FROM vn.ticket t JOIN vn.ticketCollection tc ON t.id = tc.ticketFk LEFT JOIN vn.collection c2 ON c2.id = tc.collectionFk @@ -64,7 +71,10 @@ BEGIN LEFT JOIN vn.agencyMode am ON am.id = z.agencyModeFk LEFT JOIN vn.client c ON c.id = t.clientFk LEFT JOIN vn.worker w ON w.id = c.salesPersonFk - LEFT JOIN observation ob ON ob.ticketFk = t.id + LEFT JOIN observation ob ON ob.ticketFk = t.id + LEFT JOIN vn.ticketParking tp ON tp.ticketFk = t.id + LEFT JOIN vn.parking p ON tp.parkingFk = p.id + LEFT JOIN vn.packingSiteAdvanced ps ON ps.ticketFk = t.id WHERE tc.collectionFk = vParamFk UNION SELECT sg.ticketFk, @@ -73,7 +83,9 @@ BEGIN t.warehouseFk, c.salesPersonFk, ob.description, - NULL `rgb` + NULL `rgb`, + p.code parkingCode, + IF (ps.ticketFk, TRUE, FALSE) isAdvanced FROM vn.sectorCollection sc JOIN vn.sectorCollectionSaleGroup ss ON ss.sectorCollectionFk = sc.id JOIN vn.saleGroup sg ON sg.id = ss.saleGroupFk @@ -81,7 +93,10 @@ BEGIN LEFT JOIN vn.zone z ON z.id = t.zoneFk LEFT JOIN vn.agencyMode am ON am.id = z.agencyModeFk LEFT JOIN observation ob ON ob.ticketFk = t.id - LEFT JOIN vn.client c ON c.id = t.clientFk + LEFT JOIN vn.client c ON c.id = t.clientFk + LEFT JOIN vn.ticketParking tp ON tp.ticketFk = t.id + LEFT JOIN vn.parking p ON tp.parkingFk = p.id + LEFT JOIN vn.packingSiteAdvanced ps ON ps.ticketFk = t.id WHERE sc.id = vParamFk AND t.shipped >= vYesterday GROUP BY ticketFk; diff --git a/db/routines/vn/procedures/itemShelving_get.sql b/db/routines/vn/procedures/itemShelving_get.sql index 606bb8bd9..07384b721 100644 --- a/db/routines/vn/procedures/itemShelving_get.sql +++ b/db/routines/vn/procedures/itemShelving_get.sql @@ -7,9 +7,10 @@ BEGIN * @param vSelf matrĂ­cula del carro **/ SELECT ish.itemFk item, - IFNULL(i.longName, CONCAT(i.name, ' ', i.size)) description, + i.name, + i.longName, + i.size, ish.visible, - CEIL(ish.visible/ish.packing) stickers, ish.packing, ish.grouping, p.code, @@ -17,7 +18,8 @@ BEGIN s.priority, ish.isChecked, ic.url, - ish.available + ish.available, + ish.buyFk FROM itemShelving ish JOIN item i ON i.id = ish.itemFk JOIN shelving s ON vSelf = s.code COLLATE utf8_unicode_ci diff --git a/db/versions/11274-redGerbera/00-firstScript4.sql b/db/versions/11274-redGerbera/00-firstScript4.sql deleted file mode 100644 index c1f574379..000000000 --- a/db/versions/11274-redGerbera/00-firstScript4.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE vn.autonomy MODIFY COLUMN isUeeMember tinyint(1) DEFAULT FALSE NOT NULL; \ No newline at end of file