Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into test
This commit is contained in:
commit
ff2e00c51c
|
@ -7,9 +7,8 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`clientsDisable`
|
|||
DO BEGIN
|
||||
UPDATE account.user u
|
||||
JOIN client c ON c.id = u.id
|
||||
JOIN clientType ct ON ct.id = c.typeFk
|
||||
SET u.active = FALSE
|
||||
WHERE ct.code = 'normal'
|
||||
WHERE c.typeFk = 'normal'
|
||||
AND u.id NOT IN (
|
||||
SELECT DISTINCT c.id
|
||||
FROM client c
|
||||
|
|
|
@ -15,6 +15,13 @@ proc:BEGIN
|
|||
DECLARE vHasTooMuchCollections BOOL;
|
||||
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
|
||||
CALL collection_get(vUserFk);
|
||||
|
||||
|
|
|
@ -219,9 +219,11 @@ proc:BEGIN
|
|||
UPDATE tmp.productionBuffer pb
|
||||
JOIN (
|
||||
SELECT SUM(litros) liters,
|
||||
@lines:= COUNT(*) + @lines `lines`,
|
||||
@lines:= COUNT(*) + @lines,
|
||||
COUNT(*) `lines`,
|
||||
MAX(i.`size`) height,
|
||||
@volume := SUM(sv.volume) + @volume volume
|
||||
@volume := SUM(sv.volume) + @volume,
|
||||
SUM(sv.volume) volume
|
||||
FROM saleVolume sv
|
||||
JOIN sale s ON s.id = sv.saleFk
|
||||
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
|
||||
if (args.claimStateFk) {
|
||||
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')
|
||||
await notifyStateChange(ctx, claim.workerFk, claim, newState.code);
|
||||
await notifyStateChange(ctx, claim.workerFk, claim, newState.description);
|
||||
}
|
||||
|
||||
if (tx) await tx.commit();
|
||||
|
|
|
@ -147,6 +147,10 @@ module.exports = async function(ctx, Self, tickets, reqArgs = {}) {
|
|||
);
|
||||
}
|
||||
} catch (error) {
|
||||
await Self.rawSql(`
|
||||
INSERT INTO util.debug (variable, value)
|
||||
VALUES ('invoicingTicketError', ?)
|
||||
`, [ticket.id + ' - ' + error]);
|
||||
// Domain not found
|
||||
if (error.responseCode == 450) return invalidEmail(ticket);
|
||||
|
||||
|
|
Loading…
Reference in New Issue