diff --git a/back/models/expedition_PrintOut.json b/back/models/expedition_PrintOut.json index dd49b0234..23a2fdbc4 100644 --- a/back/models/expedition_PrintOut.json +++ b/back/models/expedition_PrintOut.json @@ -14,9 +14,6 @@ }, "itemFk": { "type": "number" - }, - "isChecked": { - "type": "boolean" } } } \ No newline at end of file diff --git a/db/routines/vn/procedures/expeditionScan_Put.sql b/db/routines/vn/procedures/expeditionScan_Put.sql index fc7d4da23..999b9af10 100644 --- a/db/routines/vn/procedures/expeditionScan_Put.sql +++ b/db/routines/vn/procedures/expeditionScan_Put.sql @@ -4,12 +4,12 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionScan_Put`( vExpeditionFk INT ) BEGIN - IF NOT (SELECT TRUE FROM expedition WHERE id = vExpeditionFk LIMIT 1) THEN - CALL util.throw('Expedition not exists'); + IF NOT EXISTS (SELECT id FROM expeditionPallet WHERE id = vPalletFk) THEN + CALL util.throw('Pallet not exists'); END IF; - IF NOT (SELECT TRUE FROM expeditionPallet WHERE id = vPalletFk LIMIT 1) THEN - CALL util.throw('Pallet not exists'); + IF NOT EXISTS (SELECT id FROM expedition WHERE id = vExpeditionFk) THEN + CALL util.throw('Expedition not exists'); END IF; REPLACE expeditionScan(expeditionFk, palletFk) diff --git a/modules/order/back/methods/order/filter.js b/modules/order/back/methods/order/filter.js index ccc149958..2aeb1aac5 100644 --- a/modules/order/back/methods/order/filter.js +++ b/modules/order/back/methods/order/filter.js @@ -79,6 +79,7 @@ module.exports = Self => { const models = Self.app.models; const conn = Self.dataSource.connector; const myOptions = {}; + const userId = ctx.req.accessToken.userId; if (typeof options == 'object') Object.assign(myOptions, options);