refs #5753 fix ticketToInvoice
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-07-03 10:04:03 +02:00
parent d1fb2859be
commit 7fe8698b6f
2 changed files with 11 additions and 11 deletions

View File

@ -58312,9 +58312,9 @@ BEGIN
DECLARE vMaxShipped DATE; DECLARE vMaxShipped DATE;
DECLARE vDone BOOL; DECLARE vDone BOOL;
DECLARE vTicketFk INT; DECLARE vTicketFk INT;
DECLARE vCursor CURSOR FOR DECLARE vCursor CURSOR FOR
SELECT id SELECT id
FROM ticketToInvoice; FROM tmp.ticketToInvoice;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
@ -71802,7 +71802,7 @@ BEGIN
JOIN ticket t ON t.id = tmpTicket.ticketFk; JOIN ticket t ON t.id = tmpTicket.ticketFk;
CALL addressTaxArea (); CALL addressTaxArea ();
IF vTaxArea IS NOT NULL THEN IF vTaxArea IS NOT NULL THEN
UPDATE tmp.addressTaxArea UPDATE tmp.addressTaxArea
SET areaFk = vTaxArea; SET areaFk = vTaxArea;
@ -71874,8 +71874,8 @@ BEGIN
CREATE TEMPORARY TABLE tmp.ticketAmount CREATE TEMPORARY TABLE tmp.ticketAmount
(INDEX (ticketFk)) (INDEX (ticketFk))
ENGINE = MEMORY ENGINE = MEMORY
SELECT ticketFk, SELECT ticketFk,
taxableBase, taxableBase,
SUM(CAST(taxableBase * rate / 100 AS DECIMAL(10, 2))) tax, SUM(CAST(taxableBase * rate / 100 AS DECIMAL(10, 2))) tax,
code code
FROM tmp.ticketTax FROM tmp.ticketTax
@ -72172,12 +72172,12 @@ proc:BEGIN
DECLARE hasInvoice BOOL; DECLARE hasInvoice BOOL;
SELECT COUNT(*) INTO hasInvoice SELECT COUNT(*) INTO hasInvoice
FROM ticket FROM ticket
WHERE id = vSelf WHERE id = vSelf
AND refFk IS NOT NULL; AND refFk IS NOT NULL;
IF hasInvoice THEN IF hasInvoice THEN
LEAVE proc; LEAVE proc;
END IF; END IF;

View File

@ -178,4 +178,4 @@
"Failed to upload delivery note": "Error to upload delivery note {{id}}", "Failed to upload delivery note": "Error to upload delivery note {{id}}",
"Mail not sent": "There has been an error sending the invoice to the client [{{clientId}}]({{{clientUrl}}}), please check the email address", "Mail not sent": "There has been an error sending the invoice to the client [{{clientId}}]({{{clientUrl}}}), please check the email address",
"The renew period has not been exceeded": "The renew period has not been exceeded" "The renew period has not been exceeded": "The renew period has not been exceeded"
} }