7658-devToTest_2428 #2663

Merged
alexm merged 251 commits from 7658-devToTest_2428 into test 2024-07-02 07:20:13 +00:00
1 changed files with 5 additions and 5 deletions
Showing only changes of commit 85854e0713 - Show all commits

View File

@ -36,7 +36,7 @@ BEGIN
SELECT ASIEN INTO vBookEntry FROM dua WHERE id = vDuaFk; 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 SELECT YEAR(IFNULL(ii.bookEntried, d.bookEntried)) INTO vFiscalYear
FROM invoiceIn ii FROM invoiceIn ii
JOIN `entry` e ON e.invoiceInFk = ii.id JOIN `entry` e ON e.invoiceInFk = ii.id
@ -45,7 +45,7 @@ BEGIN
WHERE d.id = vDuaFk WHERE d.id = vDuaFk
LIMIT 1; LIMIT 1;
CALL ledger_nextTx(vFiscalYear, vBookEntry); CALL ledger_nextTx(vFiscalYear, vBookEntry);
END IF; END IF;
OPEN vInvoicesIn; OPEN vInvoicesIn;
@ -75,14 +75,14 @@ BEGIN
JOIN ( JOIN (
WITH entries AS ( WITH entries AS (
SELECT e.id, de.duaFk SELECT e.id, de.duaFk
FROM `entry` e FROM vn.`entry` e
JOIN duaEntry de ON de.entryFk = e.id JOIN vn.duaEntry de ON de.entryFk = e.id
WHERE de.duaFk = vDuaFk WHERE de.duaFk = vDuaFk
AND (NOT e.isBooked OR NOT e.isConfirmed) AND (NOT e.isBooked OR NOT e.isConfirmed)
), ),
notBookedEntries AS ( notBookedEntries AS (
SELECT e.id SELECT e.id
FROM duaEntry FROM vn.duaEntry
WHERE duaFk = vDuaFk WHERE duaFk = vDuaFk
AND NOT customsValue AND NOT customsValue
) )