sync SVN r18229

This commit is contained in:
2026-09-30 10:09:11 +03:00
parent db81fb48b5
commit 377bad6bc1
2 changed files with 7 additions and 4 deletions

View File

@@ -3122,6 +3122,7 @@ select distinct u.cod_um_iso as UnitOfMeasure, u.um_iso as description
* GeneralLedgerEntries
* 4428 este optional sa aiba taxcode
* nu pun taxcode pentru 4428 pentru ca la exigibilizare TVA are un cod 380xxx diferit fata de 4428 301xxx si nu am 2 coduri pe aceeasi inregistrare in Registrul Jurnal
*!* 30.09.2026 marius.mutu - coloana de TVA (referita prin id_tva) nu are suma de taxa in D406
Text To m.lcSql Noshow Textmerge
select c.an,
c.luna,
@@ -3199,19 +3200,19 @@ select c.an,
a.suma,
a.suma_val,
case
when j.taxcode <> 0 and j.id_tva is null then
when (j.taxcode <> 0 or j.este_tva = 1) and j.id_tva is null then
null
else
decode(NVL(a.id_jtva_coloana,0), 0, null, a.id_jtva_coloana)
end as id_jtva_coloana,
case
when j.taxcode <> 0 and j.id_tva is null then
when (j.taxcode <> 0 or j.este_tva = 1) and j.id_tva is null then
0
else
decode(NVL(a.id_jtva_coloana,0), 0, 0, j.cota_tva)
end as cota_taxa,
case
when j.taxcode <> 0 and j.id_tva is null then
when (j.taxcode <> 0 or j.este_tva = 1) and j.id_tva is null then
null
else
decode(NVL(a.id_jtva_coloana,0), 0, null, j.denumire)
@@ -3328,7 +3329,7 @@ select c.an,
ac.id_sectie,
ac.id_valuta,
ac.curs) a
left join jtva_coloane j
left join (select j0.*, case when exists (select 1 from jtva_coloane b where b.id_tva = j0.id_jtva_coloana) then 1 else 0 end as este_tva from jtva_coloane j0) j
on a.id_jtva_coloana = j.id_jtva_coloana
left join vsaft_taxtable tx on a.taxcode = tx.taxcode) b
group by an,