Hotfix contabilizar DUA Ticket #188682
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Carlos Andrés 2024-05-28 13:01:27 +02:00
parent 6e5b41a886
commit cf84aa7256
1 changed files with 2 additions and 5 deletions

View File

@ -1,7 +1,7 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceIn_booking`(
vSelf INT,
vBookEntry INT
vBookNumber INT
)
BEGIN
/**
@ -12,7 +12,6 @@ BEGIN
* @param vSelf Id invoiceIn
* @param vBookEntry Id de asiento, si es NULL se genera uno nuevo
*/
DECLARE vBookNumber INT;
DECLARE vFiscalYear INT;
CREATE OR REPLACE TEMPORARY TABLE tInvoiceIn
@ -70,10 +69,8 @@ BEGIN
SELECT YEAR(bookEntried) INTO vFiscalYear FROM tInvoiceIn LIMIT 1;
IF vBookEntry IS NULL THEN
IF vBookNumber IS NULL THEN
CALL ledger_next(vFiscalYear, vBookNumber);
ELSE
SET vBookNumber = vBookEntry;
END IF;
-- Apunte del proveedor