This commit is contained in:
parent
8f9adbb37c
commit
bb8379f8db
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue