Merge branch 'dev' into 7920-itemShelving
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
commit
9d5ef3eeb0
|
@ -139,6 +139,12 @@
|
||||||
"StarredModule": {
|
"StarredModule": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
"SaySimpleCountry": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
|
"SaySimpleConfig": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
"TempContainer": {
|
"TempContainer": {
|
||||||
"dataSource": "tempStorage"
|
"dataSource": "tempStorage"
|
||||||
},
|
},
|
||||||
|
|
|
@ -44,6 +44,11 @@
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Continent",
|
"model": "Continent",
|
||||||
"foreignKey": "continentFk"
|
"foreignKey": "continentFk"
|
||||||
|
},
|
||||||
|
"saySimpleCountry": {
|
||||||
|
"type": "hasOne",
|
||||||
|
"model": "SaySimpleCountry",
|
||||||
|
"foreignKey": "countryFk"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"acls": [
|
"acls": [
|
||||||
|
@ -54,4 +59,4 @@
|
||||||
"permission": "ALLOW"
|
"permission": "ALLOW"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"name": "SaySimpleConfig",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "saySimpleConfig"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "number",
|
||||||
|
"id": true
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"acls": [
|
||||||
|
{
|
||||||
|
"accessType": "READ",
|
||||||
|
"principalType": "ROLE",
|
||||||
|
"principalId": "$authenticated",
|
||||||
|
"permission": "ALLOW"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"name": "SaySimpleCountry",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "saySimpleCountry"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"countryFk": {
|
||||||
|
"type": "number",
|
||||||
|
"id": true
|
||||||
|
},
|
||||||
|
"channel": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"acls": [
|
||||||
|
{
|
||||||
|
"accessType": "READ",
|
||||||
|
"principalType": "ROLE",
|
||||||
|
"principalId": "$authenticated",
|
||||||
|
"permission": "ALLOW"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -4022,3 +4022,10 @@ INSERT INTO srt.buffer (id, x, y, `size`, `length`, stateFk, typeFk, isActive, c
|
||||||
(10, 0, 2000, 500, 13000, 1, 1, 1, '05A', 5, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL);
|
(10, 0, 2000, 500, 13000, 1, 1, 1, '05A', 5, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL);
|
||||||
|
|
||||||
|
|
||||||
|
INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel)
|
||||||
|
VALUES (19, 1169),
|
||||||
|
(8, 1183),
|
||||||
|
(NULL, 1320);
|
||||||
|
|
||||||
|
INSERT IGNORE INTO vn.saySimpleConfig (url)
|
||||||
|
VALUES ('saysimle-url-mock');
|
|
@ -127,7 +127,7 @@ BEGIN
|
||||||
LEFT JOIN tItemShelvingStock_byWarehouse issw ON issw.itemFk = i.id
|
LEFT JOIN tItemShelvingStock_byWarehouse issw ON issw.itemFk = i.id
|
||||||
AND issw.warehouseFk = t.warehouseFk
|
AND issw.warehouseFk = t.warehouseFk
|
||||||
WHERE IFNULL(v.visible, 0) < s.quantity
|
WHERE IFNULL(v.visible, 0) < s.quantity
|
||||||
AND IFNULL(av.available, 0) < s.quantity
|
AND IFNULL(av.available, 0) < 0
|
||||||
AND IFNULL(issw.visible, 0) < s.quantity
|
AND IFNULL(issw.visible, 0) < s.quantity
|
||||||
AND NOT s.isPicked
|
AND NOT s.isPicked
|
||||||
AND NOT s.reserved
|
AND NOT s.reserved
|
||||||
|
@ -190,7 +190,7 @@ BEGIN
|
||||||
LEFT JOIN tItemShelvingStock_byWarehouse issw ON issw.itemFk = i.id
|
LEFT JOIN tItemShelvingStock_byWarehouse issw ON issw.itemFk = i.id
|
||||||
AND issw.warehouseFk = t.warehouseFk
|
AND issw.warehouseFk = t.warehouseFk
|
||||||
WHERE IFNULL(v.visible, 0) < s.quantity
|
WHERE IFNULL(v.visible, 0) < s.quantity
|
||||||
AND IFNULL(av.available, 0) >= s.quantity
|
AND IFNULL(av.available, 0) >= 0
|
||||||
AND IFNULL(issw.visible, 0) < s.quantity
|
AND IFNULL(issw.visible, 0) < s.quantity
|
||||||
AND s.quantity > 0
|
AND s.quantity > 0
|
||||||
AND NOT s.isPicked
|
AND NOT s.isPicked
|
||||||
|
|
|
@ -14,7 +14,7 @@ proc:BEGIN
|
||||||
*/
|
*/
|
||||||
DECLARE vDone INT DEFAULT FALSE;
|
DECLARE vDone INT DEFAULT FALSE;
|
||||||
DECLARE vHasItemPackingType BOOL;
|
DECLARE vHasItemPackingType BOOL;
|
||||||
DECLARE vItemPackingTypeFk INT;
|
DECLARE vItemPackingTypeFk VARCHAR(1) DEFAULT 'H';
|
||||||
DECLARE vNewTicketFk INT;
|
DECLARE vNewTicketFk INT;
|
||||||
|
|
||||||
DECLARE vItemPackingTypes CURSOR FOR
|
DECLARE vItemPackingTypes CURSOR FOR
|
||||||
|
@ -36,14 +36,10 @@ proc:BEGIN
|
||||||
) ENGINE=MEMORY
|
) ENGINE=MEMORY
|
||||||
SELECT vSelf ticketFk, vOriginalItemPackingTypeFk itemPackingTypeFk;
|
SELECT vSelf ticketFk, vOriginalItemPackingTypeFk itemPackingTypeFk;
|
||||||
|
|
||||||
IF NOT vHasItemPackingType THEN
|
|
||||||
LEAVE proc;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tSalesToMove (
|
CREATE OR REPLACE TEMPORARY TABLE tSalesToMove (
|
||||||
ticketFk INT,
|
ticketFk INT,
|
||||||
saleFk INT,
|
saleFk INT,
|
||||||
itemPackingTypeFk INT
|
itemPackingTypeFk VARCHAR(1)
|
||||||
) ENGINE=MEMORY;
|
) ENGINE=MEMORY;
|
||||||
|
|
||||||
INSERT INTO tSalesToMove (saleFk, itemPackingTypeFk)
|
INSERT INTO tSalesToMove (saleFk, itemPackingTypeFk)
|
||||||
|
@ -55,7 +51,6 @@ proc:BEGIN
|
||||||
AND i.itemPackingTypeFk <> vOriginalItemPackingTypeFk;
|
AND i.itemPackingTypeFk <> vOriginalItemPackingTypeFk;
|
||||||
|
|
||||||
OPEN vItemPackingTypes;
|
OPEN vItemPackingTypes;
|
||||||
|
|
||||||
l: LOOP
|
l: LOOP
|
||||||
SET vDone = FALSE;
|
SET vDone = FALSE;
|
||||||
FETCH vItemPackingTypes INTO vItemPackingTypeFk;
|
FETCH vItemPackingTypes INTO vItemPackingTypeFk;
|
||||||
|
@ -71,7 +66,6 @@ proc:BEGIN
|
||||||
WHERE itemPackingTypeFk = vItemPackingTypeFk;
|
WHERE itemPackingTypeFk = vItemPackingTypeFk;
|
||||||
|
|
||||||
END LOOP;
|
END LOOP;
|
||||||
|
|
||||||
CLOSE vItemPackingTypes;
|
CLOSE vItemPackingTypes;
|
||||||
|
|
||||||
UPDATE sale s
|
UPDATE sale s
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
-- ALTER TABLE vn.sale MODIFY COLUMN originalQuantity decimal(10,2) DEFAULT 0.00 NOT NULL COMMENT 'Se utiliza para notificar a través de rocket los cambios de quantity';
|
ALTER TABLE vn.sale MODIFY COLUMN originalQuantity decimal(10,2) DEFAULT 0.00 NOT NULL COMMENT 'Se utiliza para notificar a través de rocket los cambios de quantity';
|
|
@ -0,0 +1,16 @@
|
||||||
|
CREATE TABLE IF NOT EXISTS vn.saySimpleCountry(
|
||||||
|
countryFk MEDIUMINT(8) UNSIGNED,
|
||||||
|
channel INT(4) COMMENT 'channel de whatsapp de saySimple',
|
||||||
|
PRIMARY KEY (countryFk),
|
||||||
|
CONSTRAINT `saySimpleCountry_FK` FOREIGN KEY (`countryFk`) REFERENCES vn.country (`id`) ON UPDATE CASCADE
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS vn.saySimpleConfig(
|
||||||
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
url VARCHAR(255) NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel)
|
||||||
|
VALUES (19, 1169),
|
||||||
|
(8, 1183),
|
||||||
|
(NULL, 1320);
|
|
@ -54,7 +54,10 @@ module.exports = Self => {
|
||||||
{
|
{
|
||||||
relation: 'country',
|
relation: 'country',
|
||||||
scope: {
|
scope: {
|
||||||
fields: ['name']
|
fields: ['id', 'name'],
|
||||||
|
include: {
|
||||||
|
relation: 'saySimpleCountry',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue