Compare commits

...

42 Commits

Author SHA1 Message Date
Robert Ferrús 846479f942 Merge branch 'dev' into 8077-sumDefaulter
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-19 13:05:04 +00:00
Alex Moreno 60734136c3 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-19 13:28:53 +01:00
Sergio De la torre f192b92c6a Merge pull request 'feat: refs #8099 refs#8099 addComplmentSalary' (!3219) from 8099-addComplementSalary into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
Reviewed-on: #3219
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-19 12:25:47 +00:00
Sergio De la torre feb11c123e feat: refs #8099 refs#8099 addComplmentSalary
gitea/salix/pipeline/pr-test This commit looks good Details
2024-11-19 11:45:40 +01:00
Sergio De la torre d21b42a567 feat: refs #8099 refs#8099 addComplmentSalary
gitea/salix/pipeline/pr-test This commit looks good Details
2024-11-19 11:24:00 +01:00
Alex Moreno 6a65ab42ce build: change package version
gitea/salix/pipeline/head This commit looks good Details
2024-11-19 09:12:42 +01:00
Alex Moreno 562d3b0f70 Merge pull request '8144-devToTest_2448' (!3216) from 8144-devToTest_2448 into test
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3216
Reviewed-by: Carlos Satorres <carlossa@verdnatura.es>
2024-11-19 07:36:02 +00:00
Alex Moreno 413e9e1e9f build: refs #8144 change package version
gitea/salix/pipeline/pr-test This commit looks good Details
2024-11-19 07:59:27 +01:00
Alex Moreno 7f39edf014 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details
2024-11-19 07:46:43 +01:00
Pablo Natek 0d205eb6ce Merge pull request 'fix: refs #7404 negative quantity' (!3214) from 7404-fixNegativeQuantity into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3214
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-19 06:16:09 +00:00
Sergio De la torre f3e5806990 Merge pull request 'fix: refs #6861 refs#6861 getTickets' (!3187) from 6861-ItemShelvingSalesgetTickets into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3187
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-11-19 06:08:10 +00:00
Sergio De la torre 6a94848007 Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into 6861-ItemShelvingSalesgetTickets
gitea/salix/pipeline/pr-master This commit looks good Details
2024-11-19 07:01:34 +01:00
Sergio De la torre 38f2421de0 Merge pull request 'fix: refs #6861 setQuantity' (!3119) from 6861-itemShelvingSetQuantity into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3119
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-11-19 05:58:59 +00:00
Sergio De la torre 8840d57041 Merge branch 'master' into 6861-ItemShelvingSalesgetTickets
gitea/salix/pipeline/pr-master This commit looks good Details
2024-11-19 05:55:54 +00:00
Sergio De la torre 2335ef754a Merge branch 'master' into 6861-itemShelvingSetQuantity
gitea/salix/pipeline/pr-master This commit looks good Details
2024-11-19 05:55:45 +00:00
Javi Gallego 7a9bcf11e2 Merge pull request 'refactor: refs #7457 Added from param if not exists' (!2502) from 7457-orderFilter into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2502
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-19 05:33:34 +00:00
Pablo Natek b70b69557e fix: refs #7457 empty commit for gitea 2024-11-19 06:30:19 +01:00
Pablo Natek 4e7a96442a Merge branch 'master' into 7404-fixNegativeQuantity
gitea/salix/pipeline/pr-master This commit looks good Details
2024-11-19 05:21:26 +00:00
Pablo Natek 33d9ba9b44 fix: refs #7404 negative quantity
gitea/salix/pipeline/pr-master Build queued... Details
2024-11-19 06:21:00 +01:00
Pablo Natek 056b5adddc Merge branch 'dev' into 7457-orderFilter 2024-11-19 05:12:18 +00:00
Alex Moreno 28ee32a411 Merge pull request 'fix: getSales' (!3213) from hotfix-gertSales into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3213
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-18 13:00:33 +00:00
Carlos Satorres 6619ec451c fix: getSales
gitea/salix/pipeline/pr-master This commit looks good Details
2024-11-18 13:46:56 +01:00
Guillermo Bonet 8d4769d74d feat: refs #8057 More precision in getGeo
gitea/salix/pipeline/head This commit looks good Details
2024-11-18 13:34:20 +01:00
Pablo Natek d2b545aaae Merge branch 'dev' into 7457-orderFilter 2024-11-18 10:05:29 +00:00
Jon Elias d2ea0a4bbd Merge pull request 'fix: redirect to invoice-out summary from salix' descriptor' (!3211) from Hotfix-DescriptorRedirectToLilium into master
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3211
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-15 13:26:28 +00:00
Jon Elias 7d7c66de89 Merge branch 'Hotfix-DescriptorRedirectToLilium' of https://gitea.verdnatura.es/verdnatura/salix into Hotfix-DescriptorRedirectToLilium
gitea/salix/pipeline/pr-master This commit looks good Details
2024-11-15 14:22:21 +01:00
Jon Elias 4783cc23ac refactor: deleted negative bases route due to not being used 2024-11-15 14:22:19 +01:00
Jon Elias af781d4c1a Merge branch 'master' into Hotfix-DescriptorRedirectToLilium
gitea/salix/pipeline/pr-master This commit looks good Details
2024-11-15 12:15:21 +00:00
Jon Elias 6ed521ae5e fix: redirect to invoice-out summary from salix' descriptor
gitea/salix/pipeline/pr-master This commit looks good Details
2024-11-15 13:10:19 +01:00
Pablo Natek 60f989b566 Merge branch 'dev' into 7457-orderFilter 2024-11-15 11:56:54 +00:00
Pablo Natek d8e728e823 Merge branch 'dev' into 7457-orderFilter 2024-11-15 06:17:04 +00:00
Pablo Natek 9ac54f463a fix: refs #7457 add with on select to reduce 2024-11-14 15:48:11 +01:00
Sergio De la torre 3a8c37aef8 fix: refs #6861 refs#6861 getTickets
gitea/salix/pipeline/pr-master This commit looks good Details
2024-11-12 11:59:51 +01:00
Pablo Natek 0c20aea45f Merge branch 'dev' of https: refs #7457//gitea.verdnatura.es/verdnatura/salix into 7457-orderFilter
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-11 07:34:26 +01:00
Pablo Natek 39f7391abf Merge branch '7457-orderFilter' of https://gitea.verdnatura.es/verdnatura/salix into 7457-orderFilter 2024-11-11 07:27:51 +01:00
Pablo Natek fc61f7e4ab fix: refs #7457 remove group by calc time reduce bellow 1s 2024-11-11 07:27:50 +01:00
Pablo Natek 838dd9e1b4 Merge branch 'dev' into 7457-orderFilter
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-24 04:36:11 +00:00
Sergio De la torre 989b68c33a fix: refs #6861 setQuantity
gitea/salix/pipeline/pr-master This commit looks good Details
2024-10-17 12:44:05 +02:00
Pablo Natek 78ee7e141d fix: refs #7457 remove translate and use param definition for restriction
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-17 08:40:25 +02:00
Pablo Natek a35c10adab fix: refs #7457 error on empty from param and add translate
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-17 08:35:24 +02:00
Pablo Natek 3ce8d21ed3 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7457-orderFilter
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-17 08:19:06 +02:00
Guillermo Bonet 33f1ed360b refactor: refs #7457 Added from param if not exists
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-05-23 12:16:12 +02:00
20 changed files with 141 additions and 19 deletions

View File

@ -57,10 +57,10 @@ module.exports = Self => {
ROW_NUMBER () OVER (PARTITION BY s.id ORDER BY pickingOrder) currentItemShelving, ROW_NUMBER () OVER (PARTITION BY s.id ORDER BY pickingOrder) currentItemShelving,
COUNT(*) OVER (PARTITION BY s.id ORDER BY s.id) totalItemShelving, COUNT(*) OVER (PARTITION BY s.id ORDER BY s.id) totalItemShelving,
sh.code, sh.code,
p2.code parkingCode, p2.code parkingCodePrevia,
p2.pickingOrder pickingOrder, p2.pickingOrder pickingOrderPrevia,
p.code parkingCodePrevia, p.code parkingCode,
p.pickingOrder pickingOrderPrevia, p.pickingOrder pickingOrder,
iss.id itemShelvingSaleFk, iss.id itemShelvingSaleFk,
iss.isPicked, iss.isPicked,
iss.itemShelvingFk iss.itemShelvingFk

View File

@ -4008,6 +4008,10 @@ INSERT IGNORE INTO pbx.queueMember
UPDATE vn.department SET pbxQueue = '1000' WHERE name = "CAMARA"; UPDATE vn.department SET pbxQueue = '1000' WHERE name = "CAMARA";
UPDATE vn.department SET pbxQueue = '2000' WHERE name = "VENTAS"; UPDATE vn.department SET pbxQueue = '2000' WHERE name = "VENTAS";
INSERT INTO vn.routeAction (id, name, price, isMainlineDelivered) VALUES(1, 'Pintar traje', 50.00, 0);
INSERT INTO vn.routeComplement (id, dated, workerFk, price, routeActionFk) VALUES(1, util.VN_CURDATE(), 9, 50.00, 1);
INSERT INTO srt.buffer (id, x, y, `size`, `length`, stateFk, typeFk, isActive, code, stratus, hasWorkerWaiting, reserve, routeFk, dayMinute, lastUnloaded, hasStrapper, typeDefaultFk, motors, editorFk) INSERT INTO srt.buffer (id, x, y, `size`, `length`, stateFk, typeFk, isActive, code, stratus, hasWorkerWaiting, reserve, routeFk, dayMinute, lastUnloaded, hasStrapper, typeDefaultFk, motors, editorFk)
VALUES (0, 0, 0, 0, NULL, 3, 1, 0, 'ENT', 0, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL), VALUES (0, 0, 0, 0, NULL, 3, 1, 0, 'ENT', 0, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
(1, 0, 9900, 0, NULL, 1, 0, 0, 'NOK', 0, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL), (1, 0, 9900, 0, NULL, 1, 0, 0, 'NOK', 0, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),

View File

@ -15,6 +15,7 @@ BEGIN
FROM address a FROM address a
JOIN town t ON t.provinceFk = a.provinceFk JOIN town t ON t.provinceFk = a.provinceFk
JOIN postCode p ON p.townFk = t.id JOIN postCode p ON p.townFk = t.id
AND (p.code = a.postalCode OR a.postalCode IS NULL)
JOIN zoneGeo zg ON zg.id = p.geoFk JOIN zoneGeo zg ON zg.id = p.geoFk
WHERE a.id = vSelf WHERE a.id = vSelf
ORDER BY (a.city SOUNDS LIKE t.name) DESC, ORDER BY (a.city SOUNDS LIKE t.name) DESC,

View File

@ -15,6 +15,7 @@ BEGIN
FROM client c FROM client c
JOIN town t ON t.provinceFk = c.provinceFk JOIN town t ON t.provinceFk = c.provinceFk
JOIN postCode p ON p.townFk = t.id JOIN postCode p ON p.townFk = t.id
AND (p.code = c.postcode OR c.postcode IS NULL)
JOIN zoneGeo zg ON zg.id = p.geoFk JOIN zoneGeo zg ON zg.id = p.geoFk
WHERE c.id = vSelf WHERE c.id = vSelf
ORDER BY (c.city SOUNDS LIKE t.name) DESC, ORDER BY (c.city SOUNDS LIKE t.name) DESC,

View File

@ -15,6 +15,7 @@ BEGIN
FROM supplier s FROM supplier s
JOIN town t ON t.provinceFk = s.provinceFk JOIN town t ON t.provinceFk = s.provinceFk
JOIN postCode p ON p.townFk = t.id JOIN postCode p ON p.townFk = t.id
AND (p.code = s.postCode OR s.postCode IS NULL)
LEFT JOIN supplierAddress sad ON sad.supplierFk = s.id LEFT JOIN supplierAddress sad ON sad.supplierFk = s.id
JOIN zoneGeo zg ON zg.id = p.geoFk JOIN zoneGeo zg ON zg.id = p.geoFk
WHERE s.id = vSelf WHERE s.id = vSelf

View File

@ -3,7 +3,8 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingSale_setQ
vItemShelvingSaleFk INT(10), vItemShelvingSaleFk INT(10),
vQuantity DECIMAL(10,0), vQuantity DECIMAL(10,0),
vIsItemShelvingSaleEmpty BOOLEAN, vIsItemShelvingSaleEmpty BOOLEAN,
vSectorFk INT vSectorFk INT,
vShelvingFk VARCHAR(10)
) )
BEGIN BEGIN
/** /**
@ -24,6 +25,7 @@ BEGIN
DECLARE vItemFk INT; DECLARE vItemFk INT;
DECLARE vTotalQuantity INT; DECLARE vTotalQuantity INT;
DECLARE vStateCode VARCHAR(45); DECLARE vStateCode VARCHAR(45);
DECLARE vCurrentShelvingFk VARCHAR(10);
DECLARE EXIT HANDLER FOR SQLEXCEPTION DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN BEGIN
@ -45,18 +47,25 @@ BEGIN
iss.saleFk, iss.saleFk,
iss.itemShelvingFk, iss.itemShelvingFk,
SUM(IFNULL(iss.quantity,0)), SUM(IFNULL(iss.quantity,0)),
IF(sgd.id, 'PREVIOUS_PREPARATION', 'PREPARED') IF(sgd.id, 'PREVIOUS_PREPARATION', 'PREPARED'),
ish.shelvingFk
INTO vItemFk, INTO vItemFk,
vSaleFk, vSaleFk,
vItemShelvingFk, vItemShelvingFk,
vReservedQuantity, vReservedQuantity,
vStateCode vStateCode,
vCurrentShelvingFk
FROM itemShelvingSale iss FROM itemShelvingSale iss
JOIN sale s ON s.id = iss.saleFk JOIN sale s ON s.id = iss.saleFk
JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
LEFT JOIN vn.saleGroupDetail sgd ON sgd.saleFk = iss.saleFk LEFT JOIN vn.saleGroupDetail sgd ON sgd.saleFk = iss.saleFk
WHERE iss.id = vItemShelvingSaleFk WHERE iss.id = vItemShelvingSaleFk
AND NOT iss.isPicked; AND NOT iss.isPicked;
IF NOT (vCurrentShelvingFk <=> vShelvingFk) THEN
CALL util.throw('The shelving can not be different from the shelving reserved');
END IF;
IF vQuantity > vReservedQuantity IF vQuantity > vReservedQuantity
OR (vQuantity < vReservedQuantity AND NOT vIsItemShelvingSaleEmpty) OR (vQuantity < vReservedQuantity AND NOT vIsItemShelvingSaleEmpty)
OR (vQuantity = vReservedQuantity AND vIsItemShelvingSaleEmpty) THEN OR (vQuantity = vReservedQuantity AND vIsItemShelvingSaleEmpty) THEN

View File

@ -80,7 +80,7 @@ proc: BEGIN
UPDATE stockBought s UPDATE stockBought s
JOIN tStockSold ts ON ts.workerFk = s.workerFk JOIN tStockSold ts ON ts.workerFk = s.workerFk
SET s.bought = IF(s.bought < ts.sold, ROUND(s.bought - ts.sold, 1), 0) SET s.bought = IF(s.bought < ABS(ts.sold), 0, ROUND(s.bought - ABS(ts.sold), 1))
WHERE s.dated = vDated; WHERE s.dated = vDated;
DROP TEMPORARY TABLE tCurrentData, tmp.item, tmp.buyUltimate, tStockSold; DROP TEMPORARY TABLE tCurrentData, tmp.item, tmp.buyUltimate, tStockSold;

View File

@ -10,6 +10,7 @@ CREATE OR REPLACE TEMPORARY TABLE tmp.tAddressGeo
FROM vn.address a FROM vn.address a
JOIN vn.town t ON t.provinceFk = a.provinceFk JOIN vn.town t ON t.provinceFk = a.provinceFk
JOIN vn.postCode p ON p.townFk = t.id JOIN vn.postCode p ON p.townFk = t.id
AND (p.code = a.postalCode OR a.postalCode IS NULL)
JOIN vn.zoneGeo zg ON zg.id = p.geoFk JOIN vn.zoneGeo zg ON zg.id = p.geoFk
GROUP BY a.id GROUP BY a.id
ORDER BY (a.city SOUNDS LIKE t.`name`) DESC, ORDER BY (a.city SOUNDS LIKE t.`name`) DESC,

View File

@ -13,6 +13,7 @@ CREATE OR REPLACE TEMPORARY TABLE tmp.tClientGeo
FROM vn.client c FROM vn.client c
JOIN vn.town t ON t.provinceFk = c.provinceFk JOIN vn.town t ON t.provinceFk = c.provinceFk
JOIN vn.postCode p ON p.townFk = t.id JOIN vn.postCode p ON p.townFk = t.id
AND (p.code = c.postcode OR c.postcode IS NULL)
JOIN vn.zoneGeo zg ON zg.id = p.geoFk JOIN vn.zoneGeo zg ON zg.id = p.geoFk
GROUP BY c.id GROUP BY c.id
ORDER BY (c.city SOUNDS LIKE t.`name`) DESC, ORDER BY (c.city SOUNDS LIKE t.`name`) DESC,

View File

@ -12,6 +12,7 @@ CREATE OR REPLACE TEMPORARY TABLE tmp.tSupplierGeo
FROM vn.supplier s FROM vn.supplier s
JOIN vn.town t ON t.provinceFk = s.provinceFk JOIN vn.town t ON t.provinceFk = s.provinceFk
JOIN vn.postCode p ON p.townFk = t.id JOIN vn.postCode p ON p.townFk = t.id
AND (p.code = s.postCode OR s.postCode IS NULL)
LEFT JOIN vn.supplierAddress sad ON sad.supplierFk = s.id LEFT JOIN vn.supplierAddress sad ON sad.supplierFk = s.id
JOIN vn.zoneGeo zg ON zg.id = p.geoFk JOIN vn.zoneGeo zg ON zg.id = p.geoFk
GROUP BY s.id GROUP BY s.id

View File

@ -0,0 +1,15 @@
USE vn;
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
VALUES('RouteAction', 'find', 'READ', 'ALLOW', 'ROLE', 'delivery');
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
VALUES('RouteComplement', 'find', 'READ', 'ALLOW', 'ROLE', 'delivery');
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
VALUES('RouteComplement', 'create', 'WRITE', 'ALLOW', 'ROLE', 'delivery');
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
VALUES('RouteComplement', 'deleteById', 'WRITE', 'ALLOW', 'ROLE', 'delivery');

View File

@ -50,8 +50,11 @@ module.exports = Self => {
i.id itemFk, i.id itemFk,
i.name itemName, i.name itemName,
ti.quantity, ti.quantity,
ROUND((ac.conversionCoefficient * (ti.quantity / b.packing) * buy_getVolume(b.id)) ROUND((ac.conversionCoefficient *
/ (vc.trolleyM3 * 1000000),1) volume, (ti.quantity / b.packing) *
buy_getVolume(b.id)
) / (vc.trolleyM3 * 1000000),
2) volume,
b.packagingFk packagingFk, b.packagingFk packagingFk,
b.packing b.packing
FROM tmp.item ti FROM tmp.item ti

View File

@ -1,7 +1,7 @@
export * from './module'; export * from './module';
import './main'; import './main';
import './summary';
import './descriptor'; import './descriptor';
import './descriptor-popover'; import './descriptor-popover';
import './descriptor-menu'; import './descriptor-menu';
import './summary';

View File

@ -34,6 +34,12 @@
"params": { "params": {
"invoice-out": "$ctrl.invoiceOut" "invoice-out": "$ctrl.invoiceOut"
} }
},
{
"url": "/:id",
"state": "invoiceOut.card",
"abstract": true,
"component": "vn-invoice-out-card"
} }
] ]
} }

View File

@ -22,7 +22,7 @@ module.exports = Self => {
}, { }, {
arg: 'from', arg: 'from',
type: 'date', type: 'date',
description: 'The from date' description: 'The from date',
}, { }, {
arg: 'to', arg: 'to',
type: 'date', type: 'date',
@ -84,7 +84,6 @@ module.exports = Self => {
Object.assign(myOptions, options); Object.assign(myOptions, options);
const args = ctx.args; const args = ctx.args;
// Apply filter by team // Apply filter by team
const teamMembersId = []; const teamMembersId = [];
if (args.myTeam != null) { if (args.myTeam != null) {
@ -101,9 +100,12 @@ module.exports = Self => {
teamMembersId.push(userId); teamMembersId.push(userId);
} }
if (args && args.myTeam) if (args?.myTeam)
args.teamIds = teamIds; args.teamIds = teamIds;
if (args?.to)
args.to.setHours(23, 59, 0, 0);
const where = buildFilter(args, (param, value) => { const where = buildFilter(args, (param, value) => {
switch (param) { switch (param) {
case 'search': case 'search':
@ -151,7 +153,12 @@ module.exports = Self => {
CREATE OR REPLACE TEMPORARY TABLE tmp.filter CREATE OR REPLACE TEMPORARY TABLE tmp.filter
(INDEX (id)) (INDEX (id))
ENGINE = MEMORY ENGINE = MEMORY
SELECT o.id, WITH wOrderTicket AS(
SELECT orderFk,
ticketFk
FROM orderTicket
GROUP BY orderFk
)SELECT o.id,
o.total, o.total,
o.date_send landed, o.date_send landed,
o.date_make created, o.date_make created,
@ -199,7 +206,6 @@ module.exports = Self => {
`); `);
stmt.merge(conn.makeWhere(filter.where)); stmt.merge(conn.makeWhere(filter.where));
stmt.merge(`GROUP BY id`);
stmt.merge(conn.makePagination(filter)); stmt.merge(conn.makePagination(filter));
stmts.push(stmt); stmts.push(stmt);
stmts.push(`SET SESSION optimizer_search_depth = @_optimizer_search_depth`); stmts.push(`SET SESSION optimizer_search_depth = @_optimizer_search_depth`);
@ -212,7 +218,6 @@ module.exports = Self => {
const sql = ParameterizedSQL.join(stmts, ';'); const sql = ParameterizedSQL.join(stmts, ';');
const result = await conn.executeStmt(sql, myOptions); const result = await conn.executeStmt(sql, myOptions);
return result[ordersIndex]; return result[ordersIndex];
}; };
}; };

View File

@ -23,6 +23,12 @@
"Route": { "Route": {
"dataSource": "vn" "dataSource": "vn"
}, },
"RouteAction": {
"dataSource": "vn"
},
"RouteComplement": {
"dataSource": "vn"
},
"RouteLog": { "RouteLog": {
"dataSource": "vn" "dataSource": "vn"
}, },
@ -32,4 +38,4 @@
"RoutesMonitor": { "RoutesMonitor": {
"dataSource": "vn" "dataSource": "vn"
} }
} }

View File

@ -0,0 +1,30 @@
{
"name": "RouteAction",
"base": "VnModel",
"mixins": {
"Loggable": true
},
"options": {
"mysql": {
"table": "routeAction"
}
},
"properties": {
"id": {
"type": "number",
"id": true,
"description": "Identifier"
},
"name": {
"type": "string",
"required": true
},
"price": {
"type": "number"
},
"isMainlineDelivered": {
"type": "boolean",
"required": true
}
}
}

View File

@ -0,0 +1,37 @@
{
"name": "RouteComplement",
"base": "VnModel",
"mixins": {
"Loggable": true
},
"options": {
"mysql": {
"table": "routeComplement"
}
},
"properties": {
"id": {
"type": "number",
"id": true,
"description": "Identifier"
},
"dated": {
"type": "date"
},
"price": {
"type": "number"
}
},
"relations": {
"worker": {
"type": "belongsTo",
"model": "Worker",
"foreignKey": "workerFk"
},
"routeAction": {
"type": "belongsTo",
"model": "RouteAction",
"foreignKey": "routeActionFk"
}
}
}

View File

@ -37,6 +37,7 @@ module.exports = Self => {
'name', 'name',
'subName', 'subName',
'itemPackingTypeFk', 'itemPackingTypeFk',
'size',
'tag5', 'tag5',
'value5', 'value5',
'tag6', 'tag6',

View File

@ -1,6 +1,6 @@
{ {
"name": "salix-back", "name": "salix-back",
"version": "24.44.0", "version": "24.50.0",
"author": "Verdnatura Levante SL", "author": "Verdnatura Levante SL",
"description": "Salix backend", "description": "Salix backend",
"license": "GPL-3.0", "license": "GPL-3.0",