refactor: refs #6724 Minor change
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-04-18 14:42:29 +02:00
parent 8f9adbb37c
commit bb8379f8db
1 changed files with 1 additions and 8 deletions

View File

@ -4,16 +4,9 @@ BEGIN
DECLARE vRate DOUBLE DEFAULT 1;
DECLARE vDated DATE;
DECLARE vExpenseFk VARCHAR(10);
DECLARE vIsBooked BOOLEAN DEFAULT FALSE;
SELECT isBooked INTO vIsBooked
FROM invoiceIn ii
WHERE id = vInvoiceInFk;
CALL invoiceIn_checkBooked(vInvoiceInFk);
IF vIsBooked THEN
CALL util.throw('A booked invoice cannot be modified');
END IF;
SELECT MAX(rr.dated) INTO vDated
FROM referenceRate rr
JOIN invoiceIn ii ON ii.id = vInvoiceInFk