eFactura, verificare partener, istoric CF: numar pe bife, TVA la incasare, explicatii pe cota
- borderou si import eFactura: bifele de cautare arata numarul de documente in eticheta, inca de la deschiderea ferestrei. Numararea se face local din cursorul deja adus cand nicio bifa nu e bifata (cursorul e chiar setul de baza) si prin interogare doar cand o bifa e bifata, ca sa nu apara interogari inutile. Latimile bifelor au fost marite: erau croite exact pe textul original, iar " (N)" era taiat de marginea controlului. - verificare cod fiscal: starea partenerului include "TVA la incasare", cu perioada in detalii; sursa e ANAF live sau cache-ul ISTORIC_CODURI_FISCALE (ocautare.prg, validare.prg). - modificare nota: lista de explicatii TVA se filtreaza dupa cota TVA a liniei curente (omodificari.vc2, caut_explicatie_tva din oproceduri_comune.prg). - istoric coduri fiscale: coloane nefolosite ascunse, adaugate cele venite de la ANAF (TVA la incasare, split TVA, inactiv si perioadele aferente) - overificari.vc2. - docs/scripturi-migrare-db.md: regulile de rulare manuala pe schema tinta si un pachet per script. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8Ham1HJ8BB2v9nbtWgdZq
This commit is contained in:
@@ -197,6 +197,9 @@ Procedure ANAF_StarePartener
|
||||
Addproperty(loOut, "dSfarsitScpTVA", Iif(Pemstatus(loRezANAF, 'dSfarsitScpTVA', 5), Nvl(loRezANAF.dSfarsitScpTVA, {}), {}))
|
||||
Addproperty(loOut, "dAnulareScpTVA", Iif(Pemstatus(loRezANAF, 'dAnulareScpTVA', 5), Nvl(loRezANAF.dAnulareScpTVA, {}), {}))
|
||||
Addproperty(loOut, "cMesajScpTVA", Iif(Pemstatus(loRezANAF, 'cMesajScpTVA', 5), Alltrim(Nvl(loRezANAF.cMesajScpTVA, '')), ''))
|
||||
Addproperty(loOut, "lTvaIncasareANAF", Iif(Pemstatus(loRezANAF, 'lTvaIncasare', 5), Nvl(loRezANAF.lTvaIncasare, .F.), .F.))
|
||||
Addproperty(loOut, "dInceputTvaInc", Iif(Pemstatus(loRezANAF, 'dInceputTvaInc', 5), Nvl(loRezANAF.dInceputTvaInc, {}), {}))
|
||||
Addproperty(loOut, "dSfarsitTvaInc", Iif(Pemstatus(loRezANAF, 'dSfarsitTvaInc', 5), Nvl(loRezANAF.dSfarsitTvaInc, {}), {}))
|
||||
Addproperty(loOut, "dData", m.ldData)
|
||||
Addproperty(loOut, "cSursa", Iif(Pemstatus(loRezANAF, 'cSursa', 5), loRezANAF.cSursa, 'ANAF'))
|
||||
Addproperty(loOut, "dDataSursa", Iif(Pemstatus(loRezANAF, 'dDataSursa', 5), Nvl(loRezANAF.dDataSursa, {}), {}))
|
||||
@@ -233,6 +236,9 @@ Procedure ANAF_CitesteDinIstoric
|
||||
Addproperty(loRez, "dSfarsitScpTVA", Nvl(data_sfarsit_ScpTVA, {}))
|
||||
Addproperty(loRez, "dAnulareScpTVA", Nvl(data_anul_imp_ScpTVA, {}))
|
||||
Addproperty(loRez, "cMesajScpTVA", Nvl(mesaj_ScpTVA, ""))
|
||||
Addproperty(loRez, "lTvaIncasare", Nvl(statusTvaIncasare, .F.))
|
||||
Addproperty(loRez, "dInceputTvaInc", Nvl(dataInceputTvaInc, {}))
|
||||
Addproperty(loRez, "dSfarsitTvaInc", Nvl(dataSfarsitTvaInc, {}))
|
||||
Addproperty(loRez, "cSursa", m.tcSursa)
|
||||
Addproperty(loRez, "dDataSursa", Nvl(data_sursa, {}))
|
||||
Endif
|
||||
@@ -844,7 +850,7 @@ DEFINE CLASS anaf_verif_cautare AS Custom
|
||||
|
||||
PROCEDURE TextStare
|
||||
Lparameters toStare, tcPerioada
|
||||
Return Iif(toStare.lPlatitorANAF, 'Platitor TVA', 'Neplatitor TVA') + Nvl(m.tcPerioada, '') + Iif(toStare.lInactivANAF, ', Inactiv', '')
|
||||
Return Iif(toStare.lPlatitorANAF, 'Platitor TVA', 'Neplatitor TVA') + Nvl(m.tcPerioada, '') + Iif(toStare.lInactivANAF, ', Inactiv', '') + Iif(toStare.lTvaIncasareANAF, ', TVA la incasare', '')
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE SufixPerioadaTVA
|
||||
@@ -913,6 +919,11 @@ DEFINE CLASS anaf_verif_cautare AS Custom
|
||||
If !Empty(toStare.cMesajScpTVA)
|
||||
lcTxt = m.lcTxt + 'Mesaj ANAF: ' + Alltrim(toStare.cMesajScpTVA) + Chr(13)
|
||||
Endif
|
||||
If toStare.lTvaIncasareANAF
|
||||
lcTxt = m.lcTxt + 'TVA la incasare' + ;
|
||||
Iif(!Empty(toStare.dInceputTvaInc), ' din ' + Dtoc(toStare.dInceputTvaInc), '') + ;
|
||||
Iif(!Empty(toStare.dSfarsitTvaInc), ' pana la ' + Dtoc(toStare.dSfarsitTvaInc), '') + Chr(13)
|
||||
Endif
|
||||
If !Empty(m.lcTxt)
|
||||
lcTxt = m.lcTxt + Chr(13)
|
||||
Endif
|
||||
@@ -3161,7 +3172,7 @@ Endproc && caut_politici_curente_util
|
||||
************************************** SFARSIT: caut_politici_curente_util **************************************
|
||||
***************************************** INCEPUT:caut_explicatie_tva *******************************************
|
||||
Function caut_explicatie_tva
|
||||
Parameters tnIdJtva, tnPornire, tlDesktop, tlTipEx
|
||||
Parameters tnIdJtva, tnPornire, tlDesktop, tlTipEx, tnCotaTva
|
||||
*!* tlTipEx = 0 - toate
|
||||
*!* = 1 - doar TVA exigibil din JC
|
||||
*!* = 2 - doar TVA neexigibil din JC
|
||||
@@ -3207,6 +3218,10 @@ Function caut_explicatie_tva
|
||||
lcFiltruOriginal = [id_jtva_coloana in (select id_tva from vjtva_coloane where ] + ;
|
||||
[id_jtva_ex is not null)]
|
||||
Endcase
|
||||
*** filtru suplimentar pe cota TVA a liniei curente; fara procent (0/gol) se pastreaza lista completa
|
||||
If Vartype(tnCotaTva) = 'N' And tnCotaTva > 0
|
||||
lcFiltruOriginal = lcFiltruOriginal + [ and cota_tva = ] + Alltrim(Str(tnCotaTva, 10, 2))
|
||||
Endif
|
||||
*!* *!* If tnIdJtva > 0
|
||||
*!* *!* lcFiltruOriginal = [jc * 4 + jv * 2 + decode(afisat,0,0,1) in ] + ;
|
||||
*!* *!* [(select jc * 4 + jv * 2 + decode(afisat,0,0,1) from ] + gcS + [.vjtva_coloane ] + ;
|
||||
|
||||
@@ -4618,7 +4618,9 @@ Procedure verificare_parteneri_istoric
|
||||
Endif
|
||||
|
||||
Text To lcSql Noshow
|
||||
select id, dataora, id_util, dataorav, id_utilv, cod_fiscal, firma, adresa, judet, regcom, codpostal, telefon, fax, datatvamfin, platitortvamfin, stare, platitortvavies, util, utilv
|
||||
select id, dataora, id_util, dataorav, id_utilv, cod_fiscal, firma, adresa, judet, regcom, codpostal, telefon, fax, datatvamfin, platitortvamfin, stare, platitortvavies,
|
||||
dataorav_anaf, tvaincasare, splittva, inactiv, data_inceput_scptva, data_sfarsit_scptva, data_anul_imp_scptva, data_inceput_tvainc, data_sfarsit_tvainc, data_inactivare, data_reactivare,
|
||||
util, utilv
|
||||
from vistoric_coduri_fiscale
|
||||
where cod_fiscal = ?pcCodFiscal
|
||||
Endtext
|
||||
|
||||
@@ -1741,6 +1741,9 @@ Function ANAF_VerdictDinCursor
|
||||
Addproperty(loResult, "dSfarsitScpTVA", Nvl(data_sfarsit_ScpTVA, {}))
|
||||
Addproperty(loResult, "dAnulareScpTVA", Nvl(data_anul_imp_ScpTVA, {}))
|
||||
Addproperty(loResult, "cMesajScpTVA", Nvl(mesaj_ScpTVA, ""))
|
||||
Addproperty(loResult, "lTvaIncasare", Nvl(tvaincasare, .F.))
|
||||
Addproperty(loResult, "dInceputTvaInc", Nvl(dataInceputTvaInc, {}))
|
||||
Addproperty(loResult, "dSfarsitTvaInc", Nvl(dataSfarsitTvaInc, {}))
|
||||
Else
|
||||
If m.lnReccountTemp = 1 And Empty(denumire) And Nvl(cui, 0) = m.tnCuiCautat
|
||||
tlNegasit = .T.
|
||||
@@ -2669,10 +2672,10 @@ Define Class VerificareANAF As Custom
|
||||
lnRecnoInit = Recno()
|
||||
Scan For cui <> 0 And Left(Nvl(sursa, ''), 5) <> 'CACHE'
|
||||
pcCodFiscal = Transform(cui)
|
||||
pcFirma = Nvl(firma, '')
|
||||
pcAdresa = Nvl(adresa, '')
|
||||
pcJudet = Nvl(judet, '')
|
||||
pcRegCom = Nvl(nrRegCom, '')
|
||||
pcFirma = Alltrim(Nvl(firma, ''))
|
||||
pcAdresa = Alltrim(Nvl(adresa, ''))
|
||||
pcJudet = Alltrim(Nvl(judet, ''))
|
||||
pcRegCom = Alltrim(Nvl(nrRegCom, ''))
|
||||
pcCodPostal = ''
|
||||
pcTelefon = ''
|
||||
pcFax = ''
|
||||
|
||||
Reference in New Issue
Block a user