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: pozitioneazalistasubimport
|
||||||
*m: scrienote
|
*m: scrienote
|
||||||
*p: cantetlot
|
*p: cantetlot
|
||||||
|
*p: cconddif
|
||||||
|
*p: ccondlipsa
|
||||||
|
*p: cfiltrubaza
|
||||||
*p: llotactiv
|
*p: llotactiv
|
||||||
*p: lprimite
|
*p: lprimite
|
||||||
*p: nforecolorpartener
|
*p: nforecolorpartener
|
||||||
@@ -9495,6 +9498,9 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
|||||||
cantetlot =
|
cantetlot =
|
||||||
Caption = "Form"
|
Caption = "Form"
|
||||||
cbuton7 = pgfeFactura.page1.cmdTrimite;pgfeFactura.page1.cmdRaspunsuri
|
cbuton7 = pgfeFactura.page1.cmdTrimite;pgfeFactura.page1.cmdRaspunsuri
|
||||||
|
cconddif =
|
||||||
|
ccondlipsa =
|
||||||
|
cfiltrubaza =
|
||||||
DoCreate = .T.
|
DoCreate = .T.
|
||||||
FontBold = .F.
|
FontBold = .F.
|
||||||
Height = 600
|
Height = 600
|
||||||
@@ -12118,7 +12124,7 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
|||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
LOCAL lcFiltru, lnIdCurent, llGoTop
|
LOCAL lcCondBife, lcFiltru, lnIdCurent, llGoTop
|
||||||
llGoTop = (Vartype(m.tlGoTop) = 'L' And m.tlGoTop)
|
llGoTop = (Vartype(m.tlGoTop) = 'L' And m.tlGoTop)
|
||||||
lnIdCurent = 0
|
lnIdCurent = 0
|
||||||
SELECT crsFacturi
|
SELECT crsFacturi
|
||||||
@@ -12133,6 +12139,17 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
|||||||
IF This.chkCuGestiune.Value
|
IF This.chkCuGestiune.Value
|
||||||
lcFiltru = IIF(EMPTY(m.lcFiltru), '!EMPTY(gest)', m.lcFiltru + ' AND !EMPTY(gest)')
|
lcFiltru = IIF(EMPTY(m.lcFiltru), '!EMPTY(gest)', m.lcFiltru + ' AND !EMPTY(gest)')
|
||||||
ENDIF
|
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
|
SELECT crsFacturi
|
||||||
IF !EMPTY(m.lcFiltru)
|
IF !EMPTY(m.lcFiltru)
|
||||||
@@ -12150,6 +12167,17 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
|||||||
ENDIF
|
ENDIF
|
||||||
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()
|
Thisform.grdFacturi.Refresh()
|
||||||
ENDPROC
|
ENDPROC
|
||||||
|
|
||||||
@@ -13050,9 +13078,8 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
|||||||
|
|
||||||
PROCEDURE do_import
|
PROCEDURE do_import
|
||||||
* un singur buton de import: coada de contabilizare cand exista facturi bifate, altfel doar factura curenta
|
* 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()
|
This.actualizeazalipsurirandcurent()
|
||||||
lnIdCurentImp = Iif(Used('crsFacturi'), Nvl(crsFacturi.Id, 0), 0)
|
|
||||||
lnBifateImp = 0
|
lnBifateImp = 0
|
||||||
If This.lLotActiv
|
If This.lLotActiv
|
||||||
SELECT crsFacturi
|
SELECT crsFacturi
|
||||||
@@ -13067,16 +13094,14 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
|||||||
Else
|
Else
|
||||||
This.do_executa()
|
This.do_executa()
|
||||||
Endif
|
Endif
|
||||||
This.do_cauta()
|
*!* randul importat e deja actualizat in cursor: reevaluez doar filtrele si contoarele, fara sa refac lista
|
||||||
*!* do_cauta reface cursorul, deci lista sare pe primul rand: repun randul de la care s-a pornit importul
|
If This.lLotActiv
|
||||||
If m.lnIdCurentImp <> 0 And Used('crsFacturi')
|
This.ActualizeazaContoare()
|
||||||
Select crsFacturi
|
Else
|
||||||
Locate For Id = m.lnIdCurentImp
|
Thisform.AplicaFiltruDeCompletat()
|
||||||
If !Found()
|
|
||||||
Go Top
|
|
||||||
Endif
|
|
||||||
Thisform.grdFacturi.Refresh()
|
|
||||||
Endif
|
Endif
|
||||||
|
This.NumaraDiferenteImport()
|
||||||
|
Thisform.grdFacturi.Refresh()
|
||||||
ENDPROC
|
ENDPROC
|
||||||
|
|
||||||
PROCEDURE do_listare
|
PROCEDURE do_listare
|
||||||
@@ -14627,6 +14652,17 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
|||||||
lnDif = 0
|
lnDif = 0
|
||||||
lnLipsa = 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
|
*!* 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')
|
IF EMPTY(This.chkDiferente.Value) AND EMPTY(This.chkLipsaRegistru.Value) AND USED('crsFacturi')
|
||||||
lnSelect = SELECT()
|
lnSelect = SELECT()
|
||||||
|
|||||||
Reference in New Issue
Block a user