sync SVN r18194
This commit is contained in:
@@ -12067,18 +12067,31 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE actualizeazacontoare
|
||||
LOCAL loCoada, loContor
|
||||
Thisform.LockScreen = .T.
|
||||
LOCAL loCoada, loContor, lcFiltruVechi, lnRecnoVechi
|
||||
SELECT crsFacturi
|
||||
*!* filtrul se scoate doar cat se numara si se pune inapoi ca atare: o bifa nu schimba apartenenta la filtru, deci nu e nevoie de reconstruirea lui
|
||||
lcFiltruVechi = Filter()
|
||||
lnRecnoVechi = Recno('crsFacturi')
|
||||
SET FILTER TO
|
||||
loCoada = Createobject('CoadaContabilizareEF')
|
||||
loContor = loCoada.ContorBifate('crsFacturi')
|
||||
Thisform.AplicaFiltruDeCompletat()
|
||||
SELECT crsFacturi
|
||||
If !Empty(m.lcFiltruVechi)
|
||||
SET FILTER TO &lcFiltruVechi
|
||||
Endif
|
||||
Try
|
||||
Go m.lnRecnoVechi
|
||||
Catch
|
||||
Go Top
|
||||
Endtry
|
||||
This.lblContorBifate.Caption = Alltrim(Str(loContor.nGata)) + ' din ' + Alltrim(Str(loContor.nTotal)) + ' gata de import - ' + Alltrim(Str(loContor.nBifate)) + ' bifate - ' + Alltrim(Transform(loContor.nSuma, '999,999,999.99')) + ' lei' + IIF(loContor.nIndividual > 0, ' - ' + Alltrim(Str(loContor.nIndividual)) + ' se importa doar individual', '')
|
||||
This.chkDeCompletat.Caption = ALLTRIM(IIF(EMPTY(NVL(This.chkDeCompletat.Tag,'')), This.chkDeCompletat.Caption, This.chkDeCompletat.Tag)) + IIF((loContor.nTotal - loContor.nGata) > 0, ' (' + ALLTRIM(STR(loContor.nTotal - loContor.nGata)) + ')', '')
|
||||
This.chkCuGestiune.Caption = ALLTRIM(IIF(EMPTY(NVL(This.chkCuGestiune.Tag,'')), This.chkCuGestiune.Caption, This.chkCuGestiune.Tag)) + IIF(loContor.nGestiune > 0, ' (' + ALLTRIM(STR(loContor.nGestiune)) + ')', '')
|
||||
This.Cmd_executa1.Caption = Iif(loContor.nImport > 1, '\<Import ' + Alltrim(Str(loContor.nImport)) + ' bifate', '\<Import factura')
|
||||
This.Cmd_BifeazaTot1.Caption = Iif(loContor.nBifate > 0, '\<Deselecteaza toate', '\<Selecteaza toate')
|
||||
This.Cmd_Anulare1.Caption = '\<Anuleaza ' + Alltrim(Str(loContor.nAnulare)) + ' documente'
|
||||
Thisform.LockScreen = .F.
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE actualizeazalipsurilista
|
||||
@@ -12829,7 +12842,7 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE do_bifeazatot
|
||||
* bifeaza toate facturile eligibile vizibile; daca exista deja bifate, le debifeaza pe toate
|
||||
* bifeaza toate facturile eligibile vizibile si cele deja importate; daca exista deja bifate, le debifeaza pe toate
|
||||
LOCAL lcSelect, lnRecno, llDebifeaza
|
||||
lcSelect = SELECT()
|
||||
SELECT crsFacturi
|
||||
@@ -12840,7 +12853,7 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
||||
IF m.llDebifeaza
|
||||
REPLACE ales WITH 0
|
||||
ELSE
|
||||
IF NVL(eligibil_lot, 1) = 1
|
||||
IF NVL(eligibil_lot, 1) = 1 OR NVL(id_fact, 0) <> 0
|
||||
REPLACE ales WITH 1
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -15300,6 +15313,7 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
||||
LPARAMETERS nColIndex
|
||||
|
||||
If Inlist(This.RowColChange, 1, 3)
|
||||
Thisform.LockScreen = .T.
|
||||
Local lnIdVechi, lnRecnoNou
|
||||
lnIdVechi = 0
|
||||
If Used('crsDetaliiFacturi')
|
||||
@@ -15324,12 +15338,18 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
||||
Thisform.CompleteazaFactura() && cap factura
|
||||
Thisform.actualizeaza_grid2()
|
||||
Thisform.CompleteazaDetaliiFactura() && detalii factura
|
||||
Thisform.LockScreen = .F.
|
||||
Endif
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE grdFacturi.cAles._checkbox1.InteractiveChange
|
||||
IF Used('crsFacturi') And !Eof('crsFacturi')
|
||||
*!* bifa e permisa doar pe randuri eligibile sau deja importate (anulare in lot)
|
||||
IF This.Value = 1 And Nvl(crsFacturi.eligibil_lot,1) = 0 And Nvl(crsFacturi.id_fact,0) = 0
|
||||
This.Value = 0
|
||||
RETURN
|
||||
ENDIF
|
||||
REPLACE ales WITH IIF(This.Value=1,1,0) IN crsFacturi
|
||||
ENDIF
|
||||
Thisform.ActualizeazaContoare()
|
||||
@@ -15340,35 +15360,6 @@ DEFINE CLASS frm_import_efactura AS _frmbase OF "_frm_base.vcx"
|
||||
This.ToolTipText = IIF(EMPTY(NVL(crsFacturi.motiv_lot,'')), '', ALLTRIM(crsFacturi.motiv_lot))
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE grdFacturi.cAles._checkbox1.When
|
||||
RETURN (NVL(crsFacturi.eligibil_lot,1) # 0)
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE grdFacturi.MouseMove
|
||||
Lparameters nButton, nShift, nXCoord, nYCoord
|
||||
Local lnWhere, lnRelRow, lnRelCol, lnRecnoSalvat, lnDelta, lcTip
|
||||
|
||||
This.GridHitTest(m.nXCoord, m.nYCoord, @lnWhere, @lnRelRow, @lnRelCol)
|
||||
lcTip = ''
|
||||
If m.lnWhere = 3 And Used('crsFacturi')
|
||||
lnRecnoSalvat = Recno('crsFacturi')
|
||||
lnDelta = m.lnRelRow - This.ActiveRow
|
||||
Try
|
||||
Select crsFacturi
|
||||
Skip m.lnDelta
|
||||
If !Bof() And !Eof()
|
||||
lcTip = Alltrim(Nvl(motiv_lot,''))
|
||||
Endif
|
||||
Catch
|
||||
Endtry
|
||||
Try
|
||||
Go m.lnRecnoSalvat In crsFacturi
|
||||
Catch
|
||||
Endtry
|
||||
Endif
|
||||
This.ToolTipText = m.lcTip
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE Lb_titlu_alb_b121.RightClick
|
||||
This.Parent.chkTest.Visible = .T.
|
||||
ENDPROC
|
||||
|
||||
Reference in New Issue
Block a user