Merge branch 'dev' into 6998-supplierMigration
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-09-09 09:39:15 +00:00
commit 01690ed081
5 changed files with 28 additions and 5 deletions

View File

@ -47,11 +47,15 @@ BEGIN
FROM tmp.zoneGetShipped FROM tmp.zoneGetShipped
WHERE warehouseFk = vWarehouse; WHERE warehouseFk = vWarehouse;
SELECT IFNULL(available, 0) INTO vAvailable SELECT available INTO vAvailable
FROM tmp.ticketLot FROM tmp.ticketLot
WHERE warehouseFk = vWarehouse WHERE warehouseFk = vWarehouse
AND itemFk = vItem; AND itemFk = vItem;
IF vAvailable IS NULL THEN
SET vAvailable = 0;
END IF;
IF vAmount > vAvailable THEN IF vAmount > vAvailable THEN
CALL util.throw ('ORDER_ROW_UNAVAILABLE'); CALL util.throw ('ORDER_ROW_UNAVAILABLE');
END IF; END IF;

View File

@ -0,0 +1,19 @@
INSERT INTO hedera.message (code,description)
VALUES ('ORDER_ROW_UNAVAILABLE','The ordered quantity exceeds the available');
INSERT INTO hedera.message (code,description)
VALUES ('AMOUNT_NOT_MATCH_GROUPING','The quantity ordered does not match the grouping');
INSERT INTO hedera.messageI18n (code,lang,description)
VALUES ('ORDER_ROW_UNAVAILABLE','es','La cantidad pedida excede el disponible');
INSERT INTO hedera.messageI18n (code,lang,description)
VALUES ('AMOUNT_NOT_MATCH_GROUPING','es','La cantidad pedida no coincide con el agrupado');
INSERT INTO hedera.messageI18n (code,lang,description)
VALUES ('ORDER_ROW_UNAVAILABLE','fr','La quantité demandée dépasse ce qui est disponible');
INSERT INTO hedera.messageI18n (code,lang,description)
VALUES ('AMOUNT_NOT_MATCH_GROUPING','fr','La quantité commandée ne correspond pas au regroupement');
INSERT INTO hedera.messageI18n (code,lang,description)
VALUES ('ORDER_ROW_UNAVAILABLE','pt','A quantidade de entrega excede a disponibilidade');
INSERT INTO hedera.messageI18n (code,lang,description)
VALUES ('AMOUNT_NOT_MATCH_GROUPING','pt','A quantidade solicitada não corresponde ao agrupamento');

View File

@ -285,7 +285,7 @@ module.exports = Self => {
if (hasProblems === true) { if (hasProblems === true) {
whereProblems = {or: [ whereProblems = {or: [
{'tp.isFreezed': true}, {'tp.isFreezed': true},
{'tp.risk': {lt: 0}}, {'tp.hasRisk': true},
{'tp.hasTicketRequest': true}, {'tp.hasTicketRequest': true},
{'tp.hasComponentLack': true}, {'tp.hasComponentLack': true},
{'tp.isTaxDataChecked': false}, {'tp.isTaxDataChecked': false},
@ -295,7 +295,7 @@ module.exports = Self => {
} else if (hasProblems === false) { } else if (hasProblems === false) {
whereProblems = {and: [ whereProblems = {and: [
{'tp.isFreezed': false}, {'tp.isFreezed': false},
{'tp.risk': 0}, {'tp.hasRisk': false},
{'tp.hasTicketRequest': false}, {'tp.hasTicketRequest': false},
{'tp.hasComponentLack': false}, {'tp.hasComponentLack': false},
{'tp.isTaxDataChecked': true}, {'tp.isTaxDataChecked': true},

View File

@ -343,7 +343,7 @@ module.exports = Self => {
const problems = {[condition]: [ const problems = {[condition]: [
{'tp.isFreezed': hasProblem}, {'tp.isFreezed': hasProblem},
{'tp.risk': hasProblem}, {'tp.hasRisk': hasProblem},
{'tp.hasTicketRequest': hasProblem}, {'tp.hasTicketRequest': hasProblem},
{'tp.itemShortage': range}, {'tp.itemShortage': range},
{'tp.hasRounding': hasProblem} {'tp.hasRounding': hasProblem}

View File

@ -196,7 +196,7 @@ module.exports = Self => {
const problems = { const problems = {
[condition]: [ [condition]: [
{'tp.isFreezed': hasProblem}, {'tp.isFreezed': hasProblem},
{'tp.risk': hasProblem}, {'tp.hasRisk': hasProblem},
{'tp.hasTicketRequest': hasProblem}, {'tp.hasTicketRequest': hasProblem},
{'tp.itemShortage': range}, {'tp.itemShortage': range},
{'tp.hasComponentLack': hasProblem}, {'tp.hasComponentLack': hasProblem},