Merge branch 'test' into 5858_fix_zone-incldued_HTML
This commit is contained in:
commit
b7c0ce0852
|
@ -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
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_assign`(
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_assign`(
|
||||||
vUserFk INT,
|
vUserFk INT,
|
||||||
OUT vCollectionFk INT
|
OUT vCollectionFk INT
|
||||||
)
|
)
|
||||||
proc:BEGIN
|
proc:BEGIN
|
||||||
/**
|
/**
|
||||||
* Comprueba si existen colecciones libres que se ajustan
|
* Comprueba si existen colecciones libres que se ajustan
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
@ -84,5 +91,5 @@ proc:BEGIN
|
||||||
WHERE id = vCollectionFk;
|
WHERE id = vCollectionFk;
|
||||||
|
|
||||||
DO RELEASE_LOCK('collection_assign');
|
DO RELEASE_LOCK('collection_assign');
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
CREATE INDEX expeditionLog_action_IDX USING BTREE ON srt.expeditionLog (`action`);
|
|
@ -0,0 +1 @@
|
||||||
|
CREATE INDEX expeditionLog_expeditionFk_IDX USING BTREE ON srt.expeditionLog (expeditionFk);
|
|
@ -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();
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue