fix: refs #7346 ticket_close serial
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Andrés 2024-09-06 12:52:24 +02:00
parent 3c6920a094
commit d10db686e5
1 changed files with 7 additions and 3 deletions

View File

@ -17,6 +17,7 @@ BEGIN
DECLARE vHasDailyInvoice BOOL;
DECLARE vWithPackage BOOL;
DECLARE vHasToInvoice BOOL;
DECLARE vSerial VARCHAR(2);
DECLARE cur CURSOR FOR
SELECT ticketFk FROM tmp.ticket_close;
@ -83,14 +84,17 @@ BEGIN
GROUP BY e.freightItemFk);
IF(vHasDailyInvoice) AND vHasToInvoice THEN
SELECT invoiceSerial(vClientFk, vCompanyFk, 'quick') INTO vSerial;
IF NOT vSerial THEN
CALL util.throw('Cannot booking without a serial');
END IF;
-- Facturacion rapida
CALL ticket_setState(vCurTicketFk, 'DELIVERED');
-- Facturar si está contabilizado
IF vIsTaxDataChecked THEN
CALL invoiceOut_newFromClient(
vClientFk,
(SELECT invoiceSerial(vClientFk, vCompanyFk, 'multiple')),
vSerial,
vShipped,
vCompanyFk,
NULL,