sync SVN r18098
This commit is contained in:
@@ -9479,6 +9479,9 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
||||
*m: pozitioneazalistasubimport
|
||||
*m: scrienote
|
||||
*p: cantetlot
|
||||
*p: cconddif
|
||||
*p: ccondlipsa
|
||||
*p: cfiltrubaza
|
||||
*p: llotactiv
|
||||
*p: lprimite
|
||||
*p: nforecolorpartener
|
||||
@@ -9495,6 +9498,9 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
||||
cantetlot =
|
||||
Caption = "Form"
|
||||
cbuton7 = pgfeFactura.page1.cmdTrimite;pgfeFactura.page1.cmdRaspunsuri
|
||||
cconddif =
|
||||
ccondlipsa =
|
||||
cfiltrubaza =
|
||||
DoCreate = .T.
|
||||
FontBold = .F.
|
||||
Height = 600
|
||||
@@ -12118,7 +12124,7 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
||||
RETURN
|
||||
ENDIF
|
||||
|
||||
LOCAL lcFiltru, lnIdCurent, llGoTop
|
||||
LOCAL lcCondBife, lcFiltru, lnIdCurent, llGoTop
|
||||
llGoTop = (Vartype(m.tlGoTop) = 'L' And m.tlGoTop)
|
||||
lnIdCurent = 0
|
||||
SELECT crsFacturi
|
||||
@@ -12133,6 +12139,17 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
||||
IF This.chkCuGestiune.Value
|
||||
lcFiltru = IIF(EMPTY(m.lcFiltru), '!EMPTY(gest)', m.lcFiltru + ' AND !EMPTY(gest)')
|
||||
ENDIF
|
||||
*!* bifele Diferente/Lipsa se reevalueaza local, ca sa nu fie nevoie de o noua cautare dupa import
|
||||
lcCondBife = ''
|
||||
IF This.chkDiferente.Value
|
||||
lcCondBife = '(!ISNULL(jtotctva) AND (ALLTRIM(NVL(nume_valuta,"RON")) <> "RON" OR ABS(NVL(diferenta,0)) > 0.15))'
|
||||
ENDIF
|
||||
IF This.chkLipsaRegistru.Value
|
||||
lcCondBife = IIF(EMPTY(m.lcCondBife), '', m.lcCondBife + ' OR ') + '(ISNULL(jtotctva))'
|
||||
ENDIF
|
||||
IF !EMPTY(m.lcCondBife)
|
||||
lcFiltru = IIF(EMPTY(m.lcFiltru), '', m.lcFiltru + ' AND ') + '(' + m.lcCondBife + ')'
|
||||
ENDIF
|
||||
|
||||
SELECT crsFacturi
|
||||
IF !EMPTY(m.lcFiltru)
|
||||
@@ -12150,6 +12167,17 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
*!* daca filtrul a scos randul curent, capul si detaliile trebuie recompletate pentru randul nou
|
||||
IF NVL(id, 0) <> m.lnIdCurent
|
||||
IF EOF()
|
||||
Thisform.actualizeaza_grid2() && lista a ramas goala: golesc si detaliile
|
||||
ELSE
|
||||
Thisform.CompleteazaFactura()
|
||||
Thisform.actualizeaza_grid2()
|
||||
Thisform.CompleteazaDetaliiFactura()
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
Thisform.grdFacturi.Refresh()
|
||||
ENDPROC
|
||||
|
||||
@@ -13050,9 +13078,8 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
||||
|
||||
PROCEDURE do_import
|
||||
* un singur buton de import: coada de contabilizare cand exista facturi bifate, altfel doar factura curenta
|
||||
Local loCoadaImp, loContorImp, lnBifateImp, lnIdCurentImp
|
||||
Local loCoadaImp, loContorImp, lnBifateImp
|
||||
This.actualizeazalipsurirandcurent()
|
||||
lnIdCurentImp = Iif(Used('crsFacturi'), Nvl(crsFacturi.Id, 0), 0)
|
||||
lnBifateImp = 0
|
||||
If This.lLotActiv
|
||||
SELECT crsFacturi
|
||||
@@ -13067,16 +13094,14 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
||||
Else
|
||||
This.do_executa()
|
||||
Endif
|
||||
This.do_cauta()
|
||||
*!* do_cauta reface cursorul, deci lista sare pe primul rand: repun randul de la care s-a pornit importul
|
||||
If m.lnIdCurentImp <> 0 And Used('crsFacturi')
|
||||
Select crsFacturi
|
||||
Locate For Id = m.lnIdCurentImp
|
||||
If !Found()
|
||||
Go Top
|
||||
Endif
|
||||
Thisform.grdFacturi.Refresh()
|
||||
*!* randul importat e deja actualizat in cursor: reevaluez doar filtrele si contoarele, fara sa refac lista
|
||||
If This.lLotActiv
|
||||
This.ActualizeazaContoare()
|
||||
Else
|
||||
Thisform.AplicaFiltruDeCompletat()
|
||||
Endif
|
||||
This.NumaraDiferenteImport()
|
||||
Thisform.grdFacturi.Refresh()
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE do_listare
|
||||
@@ -14627,6 +14652,17 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
||||
lnDif = 0
|
||||
lnLipsa = 0
|
||||
|
||||
*!* filtrele ultimei cautari se retin, ca sa se poata renumara dupa import fara sa se refaca lista
|
||||
IF PCOUNT() > 0
|
||||
This.cFiltruBaza = NVL(m.tcFiltruBaza, '')
|
||||
This.cCondDif = NVL(m.tcDif, '')
|
||||
This.cCondLipsa = NVL(m.tcLipsa, '')
|
||||
ELSE
|
||||
tcFiltruBaza = This.cFiltruBaza
|
||||
tcDif = This.cCondDif
|
||||
tcLipsa = This.cCondLipsa
|
||||
ENDIF
|
||||
|
||||
*!* fara nicio bifa, cursorul afisat e chiar setul de baza: numaram local, fara interogare
|
||||
IF EMPTY(This.chkDiferente.Value) AND EMPTY(This.chkLipsaRegistru.Value) AND USED('crsFacturi')
|
||||
lnSelect = SELECT()
|
||||
|
||||
Reference in New Issue
Block a user