From 85854e0713d07a3e525a6a0e5fd7a64c350dc406 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 25 Jun 2024 13:14:44 +0200 Subject: [PATCH] warmFix: use vn --- db/routines/vn/procedures/duaInvoiceInBooking.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/db/routines/vn/procedures/duaInvoiceInBooking.sql b/db/routines/vn/procedures/duaInvoiceInBooking.sql index 1f026e96b..6d0c9f517 100644 --- a/db/routines/vn/procedures/duaInvoiceInBooking.sql +++ b/db/routines/vn/procedures/duaInvoiceInBooking.sql @@ -36,7 +36,7 @@ BEGIN SELECT ASIEN INTO vBookEntry FROM dua WHERE id = vDuaFk; - IF vBookEntry IS NULL THEN + IF vBookEntry IS NULL THEN SELECT YEAR(IFNULL(ii.bookEntried, d.bookEntried)) INTO vFiscalYear FROM invoiceIn ii JOIN `entry` e ON e.invoiceInFk = ii.id @@ -45,7 +45,7 @@ BEGIN WHERE d.id = vDuaFk LIMIT 1; CALL ledger_nextTx(vFiscalYear, vBookEntry); - END IF; + END IF; OPEN vInvoicesIn; @@ -75,14 +75,14 @@ BEGIN JOIN ( WITH entries AS ( SELECT e.id, de.duaFk - FROM `entry` e - JOIN duaEntry de ON de.entryFk = e.id + FROM vn.`entry` e + JOIN vn.duaEntry de ON de.entryFk = e.id WHERE de.duaFk = vDuaFk AND (NOT e.isBooked OR NOT e.isConfirmed) ), notBookedEntries AS ( SELECT e.id - FROM duaEntry + FROM vn.duaEntry WHERE duaFk = vDuaFk AND NOT customsValue )