Merge branch 'test' into 5858_fix_zone-incldued_HTML
gitea/salix/pipeline/pr-test This commit looks good Details
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Javier Segarra 2024-04-04 05:41:26 +00:00
commit b7c0ce0852
7 changed files with 24 additions and 10 deletions

View File

@ -7,9 +7,8 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`clientsDisable`
DO BEGIN DO BEGIN
UPDATE account.user u UPDATE account.user u
JOIN client c ON c.id = u.id JOIN client c ON c.id = u.id
JOIN clientType ct ON ct.id = c.typeFk
SET u.active = FALSE SET u.active = FALSE
WHERE ct.code = 'normal' WHERE c.typeFk = 'normal'
AND u.id NOT IN ( AND u.id NOT IN (
SELECT DISTINCT c.id SELECT DISTINCT c.id
FROM client c FROM client c

View File

@ -15,6 +15,13 @@ proc:BEGIN
DECLARE vHasTooMuchCollections BOOL; DECLARE vHasTooMuchCollections BOOL;
DECLARE vLockTime INT DEFAULT 15; DECLARE vLockTime INT DEFAULT 15;
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
DO RELEASE_LOCK('collection_assign');
RESIGNAL;
END;
-- Si hay colecciones sin terminar, sale del proceso -- Si hay colecciones sin terminar, sale del proceso
CALL collection_get(vUserFk); CALL collection_get(vUserFk);

View File

@ -219,9 +219,11 @@ proc:BEGIN
UPDATE tmp.productionBuffer pb UPDATE tmp.productionBuffer pb
JOIN ( JOIN (
SELECT SUM(litros) liters, SELECT SUM(litros) liters,
@lines:= COUNT(*) + @lines `lines`, @lines:= COUNT(*) + @lines,
COUNT(*) `lines`,
MAX(i.`size`) height, MAX(i.`size`) height,
@volume := SUM(sv.volume) + @volume volume @volume := SUM(sv.volume) + @volume,
SUM(sv.volume) volume
FROM saleVolume sv FROM saleVolume sv
JOIN sale s ON s.id = sv.saleFk JOIN sale s ON s.id = sv.saleFk
JOIN item i ON i.id = s.itemFk JOIN item i ON i.id = s.itemFk

View File

@ -0,0 +1 @@
CREATE INDEX expeditionLog_action_IDX USING BTREE ON srt.expeditionLog (`action`);

View File

@ -0,0 +1 @@
CREATE INDEX expeditionLog_expeditionFk_IDX USING BTREE ON srt.expeditionLog (expeditionFk);

View File

@ -96,9 +96,9 @@ module.exports = Self => {
// When claimState has been changed // When claimState has been changed
if (args.claimStateFk) { if (args.claimStateFk) {
const newState = await models.ClaimState.findById(args.claimStateFk, null, myOptions); const newState = await models.ClaimState.findById(args.claimStateFk, null, myOptions);
await notifyStateChange(ctx, salesPerson.id, claim, newState.code); await notifyStateChange(ctx, salesPerson.id, claim, newState.description);
if (newState.code == 'canceled') if (newState.code == 'canceled')
await notifyStateChange(ctx, claim.workerFk, claim, newState.code); await notifyStateChange(ctx, claim.workerFk, claim, newState.description);
} }
if (tx) await tx.commit(); if (tx) await tx.commit();

View File

@ -147,6 +147,10 @@ module.exports = async function(ctx, Self, tickets, reqArgs = {}) {
); );
} }
} catch (error) { } catch (error) {
await Self.rawSql(`
INSERT INTO util.debug (variable, value)
VALUES ('invoicingTicketError', ?)
`, [ticket.id + ' - ' + error]);
// Domain not found // Domain not found
if (error.responseCode == 450) return invalidEmail(ticket); if (error.responseCode == 450) return invalidEmail(ticket);