*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="ocasabanca.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS frm_casaban AS _frmbase OF "_frm_base.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Shape1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_listare1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_excel1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="oMenuShortcut" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cFDOC.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cFDOC.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cDataact.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cDataact.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cDataireg.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cDataireg.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cNract.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cNract.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cbancasa.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cbancasa.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cExplicatia.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cExplicatia.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cIncasari.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cIncasari.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cPlati.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cPlati.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cScd.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cScd.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cScc.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cScc.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cNrord.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cNrord.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cnResp.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cnResp.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cSucursala.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cSucursala.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cAscd.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cAscd.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cAscc.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cAscc.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cAlteExplicatii.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cAlteExplicatii.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cRegComert.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cRegComert.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cCodFiscal.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cCodFiscal.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cSoldCum.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.cSoldCum.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="BUT_STERGE1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_start_criterii1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_reset_criterii1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="opt_defalcat" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_dataact" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_dataireg" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_bancasa" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_import1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cboBanca" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: butdrept
		*m: clickdreapta
		*m: do_import
		*m: do_modifica_defalcare
		*m: listare_chitanta
		*m: listare_dispozitie
		*m: notacontab
		*p: ccont
		*p: ddataact1
		*p: ddataact2
		*p: lafisaretot
		*p: lalegmultiplu		&& .T. daca se pot alege mai multi parteneri.
		*p: laratainregoperator
		*p: nidbancasa
		*p: npreccred
		*p: npreccredi
		*p: npreccredval
		*p: npreccredvali
		*p: nprecdeb
		*p: nprecdebi
		*p: nprecdebval
		*p: nprecdebvali
		*p: nrcont
		*p: nsoldf
		*p: nsoldi
		*p: ntotincasari
		*p: ntotplati
		*p: tip
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		cbuton7 = But_import1
		ccont = 
		ddataact1 = {}
		ddataact2 = {}
		DoCreate = .T.
		Height = 565
		lafisaretot = .F.
		laratainregoperator = .F.
		Name = "frm_casaban"
		nidbancasa = 0
		npreccred = 0.00
		npreccredi = 0
		npreccredval = 0
		npreccredvali = 0
		nprecdeb = 0.00
		nprecdebi = 0
		nprecdebval = 0
		nprecdebvali = 0
		nrcont = 
		nsoldf = 0
		nsoldi = 0
		ntotincasari = 0
		ntotplati = 0
		tip = 
		Width = 800
		_memberdata = <VFPData>
			<memberdata name="lafisaretot" display="lAfisareTot"/>
			<memberdata name="nidbancasa" display="nIdBancasa"/>
		</VFPData>
		_shape1.Anchor = 10
		_shape1.Height = 29
		_shape1.Left = -72
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 800
		_shape1.ZOrderSet = 0
		_shape2.Height = 29
		_shape2.Left = 696
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 104
		_shape2.ZOrderSet = 1
		Lb_titlu_alb_b121.Caption = "REGISTRUL IN LEI"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 12
		Lb_titlu_alb_b121.ZOrderSet = 4
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 766
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 6
		BUT_TERMIN1.Top = 1
		BUT_TERMIN1.ZOrderSet = 5
		Gridsort1.Left = 201
		Gridsort1.Name = "Gridsort1"
		Gridsort1.ocolumnreference = thisform.grid1
		Gridsort1.Top = 31
	*</PropValue>

	ADD OBJECT 'But_excel1' AS but_excel WITH ;
		Anchor = 9, ;
		Left = 710, ;
		Name = "But_excel1", ;
		TabIndex = 8, ;
		Top = 1, ;
		ZOrderSet = 9
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_import1' AS but_modiparam WITH ;
		Anchor = 9, ;
		caction = do_import, ;
		Left = 568, ;
		Name = "But_import1", ;
		TabIndex = 17, ;
		ToolTipText = "Import din fisier MT940, xls...", ;
		Top = 1, ;
		Visible = .F.
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_listare1' AS but_listare WITH ;
		Anchor = 9, ;
		Left = 738, ;
		Name = "But_listare1", ;
		TabIndex = 7, ;
		Top = 1, ;
		Visible = .T., ;
		ZOrderSet = 8
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 598, ;
		lvizibil = .F., ;
		Name = "But_modifica1", ;
		TabIndex = 11, ;
		Top = 1, ;
		Visible = .F., ;
		ZOrderSet = 7
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_reset_criterii1' AS but_reset_criterii WITH ;
		Anchor = 9, ;
		Left = 626, ;
		Name = "But_reset_criterii1", ;
		TabIndex = 10, ;
		Top = 1, ;
		Visible = .T., ;
		ZOrderSet = 26
		*< END OBJECT: ClassLib="ocriterii.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_start_criterii1' AS but_start_criterii WITH ;
		Anchor = 9, ;
		Left = 654, ;
		Name = "But_start_criterii1", ;
		TabIndex = 9, ;
		Top = 1, ;
		ZOrderSet = 25
		*< END OBJECT: ClassLib="ocriterii.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'BUT_STERGE1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 682, ;
		Name = "BUT_STERGE1", ;
		TabIndex = 25, ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'cboBanca' AS _cbbase WITH ;
		BoundColumn = 3, ;
		BoundTo = .T., ;
		ColumnCount = 4, ;
		ColumnLines = .F., ;
		ColumnWidths = "350,200,0,0", ;
		ControlSource = "Thisform.nIdBancasa", ;
		FontName = "Arial", ;
		Height = 24, ;
		Left = 19, ;
		Name = "cboBanca", ;
		RowSource = "select bancasa, PADL(transform(sold, '999 999 999.99') + ' ' + padr(ALLT(numeval), 5, ' ') , 25, ' ')  as sold, id_bancasa, ord, numeval from cBancasaLista order by 4,1 into cursor cCasbanListaTemp", ;
		RowSourceType = 3, ;
		Top = 87, ;
		Width = 299
		*< END OBJECT: ClassLib="_cb_base.vcx" BaseClass="combobox" />

	ADD OBJECT 'Ck_bancasa' AS ck_filtru_nom WITH ;
		Alignment = 0, ;
		camp_nume = bancasa, ;
		camp_tabela = bancasa, ;
		Caption = "Banca", ;
		Left = 18, ;
		Name = "Ck_bancasa", ;
		tabela = vbancasa, ;
		TabIndex = 1, ;
		titlu = Alegeti banca, ;
		Top = 32
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_dataact' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		camp_nume = dataact, ;
		Caption = "Data act", ;
		Left = 18, ;
		Name = "Ck_dataact", ;
		TabIndex = 2, ;
		tip = D, ;
		Top = 49
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_dataireg' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		camp_nume = dataireg, ;
		Caption = "Data inreg.", ;
		Left = 18, ;
		Name = "Ck_dataireg", ;
		TabIndex = 3, ;
		tip = D, ;
		Top = 66
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'grid1' AS _grdbase WITH ;
		Anchor = 15, ;
		ColumnCount = 19, ;
		DeleteMark = .F., ;
		FontName = "Arial", ;
		GridLineColor = 192,192,192, ;
		Height = 414, ;
		Left = 12, ;
		Name = "grid1", ;
		Panel = 1, ;
		RecordSource = "casban", ;
		RowHeight = 19, ;
		TabIndex = 5, ;
		Top = 144, ;
		Width = 780, ;
		ZOrderSet = 23, ;
		Column1.ColumnOrder = 1, ;
		Column1.ControlSource = "fdoc", ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 10, ;
		Column1.Name = "cFDOC", ;
		Column1.ReadOnly = .T., ;
		Column1.Visible = .T., ;
		Column1.Width = 102, ;
		Column2.ColumnOrder = 2, ;
		Column2.ControlSource = "dataact", ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 10, ;
		Column2.Name = "cDataact", ;
		Column2.Visible = .T., ;
		Column2.Width = 81, ;
		Column3.ColumnOrder = 3, ;
		Column3.ControlSource = "dataireg", ;
		Column3.FontName = "Arial", ;
		Column3.FontSize = 10, ;
		Column3.Name = "cDataireg", ;
		Column3.Visible = .T., ;
		Column3.Width = 83, ;
		Column4.ControlSource = "nract", ;
		Column4.FontName = "Arial", ;
		Column4.FontSize = 10, ;
		Column4.Name = "cNract", ;
		Column4.Visible = .T., ;
		Column4.Width = 94, ;
		Column5.ControlSource = "bancasa", ;
		Column5.FontName = "Arial", ;
		Column5.FontSize = 10, ;
		Column5.Name = "cbancasa", ;
		Column5.Visible = .T., ;
		Column5.Width = 180, ;
		Column6.ControlSource = "nume", ;
		Column6.FontName = "Arial", ;
		Column6.FontSize = 10, ;
		Column6.Name = "cExplicatia", ;
		Column6.Visible = .T., ;
		Column6.Width = 104, ;
		Column7.ColumnOrder = 7, ;
		Column7.ControlSource = "incasari", ;
		Column7.FontName = "Arial", ;
		Column7.FontSize = 10, ;
		Column7.Format = "R", ;
		Column7.InputMask = (get_mask(15,gnPA)), ;
		Column7.Name = "cIncasari", ;
		Column7.Visible = .T., ;
		Column7.Width = 108, ;
		Column8.ColumnOrder = 8, ;
		Column8.ControlSource = "plati", ;
		Column8.FontName = "Arial", ;
		Column8.FontSize = 10, ;
		Column8.Format = "R", ;
		Column8.InputMask = (get_mask(15,gnPA)), ;
		Column8.Name = "cPlati", ;
		Column8.Visible = .T., ;
		Column8.Width = 116, ;
		Column9.ColumnOrder = 10, ;
		Column9.ControlSource = "scd", ;
		Column9.FontName = "Arial", ;
		Column9.FontSize = 10, ;
		Column9.Name = "cScd", ;
		Column9.Visible = .T., ;
		Column9.Width = 70, ;
		Column10.ColumnOrder = 12, ;
		Column10.ControlSource = "scc", ;
		Column10.FontName = "Arial", ;
		Column10.FontSize = 10, ;
		Column10.Name = "cScc", ;
		Column10.Visible = .T., ;
		Column10.Width = 64, ;
		Column11.ColumnOrder = 15, ;
		Column11.ControlSource = "nrord", ;
		Column11.FontName = "Arial", ;
		Column11.FontSize = 10, ;
		Column11.Name = "cNrord", ;
		Column11.Visible = .T., ;
		Column11.Width = 118, ;
		Column12.ColumnOrder = 16, ;
		Column12.ControlSource = "nresp", ;
		Column12.FontName = "Arial", ;
		Column12.FontSize = 10, ;
		Column12.Name = "cnResp", ;
		Column12.Visible = .T., ;
		Column12.Width = 116, ;
		Column13.ColumnOrder = 17, ;
		Column13.ControlSource = "sucursala", ;
		Column13.FontName = "Arial", ;
		Column13.FontSize = 10, ;
		Column13.Name = "cSucursala", ;
		Column13.Width = 167, ;
		Column14.ColumnOrder = 11, ;
		Column14.ControlSource = "ascd", ;
		Column14.FontName = "Arial", ;
		Column14.FontSize = 10, ;
		Column14.Name = "cAscd", ;
		Column14.Width = 60, ;
		Column15.ColumnOrder = 13, ;
		Column15.ControlSource = "ascc", ;
		Column15.FontName = "Arial", ;
		Column15.FontSize = 10, ;
		Column15.Name = "cAscc", ;
		Column15.Width = 78, ;
		Column16.ColumnOrder = 14, ;
		Column16.ControlSource = "explicatia", ;
		Column16.FontName = "Arial", ;
		Column16.FontSize = 10, ;
		Column16.Name = "cAlteExplicatii", ;
		Column16.Width = 145, ;
		Column17.ColumnOrder = 18, ;
		Column17.ControlSource = "reg_comert", ;
		Column17.FontName = "Arial", ;
		Column17.FontSize = 10, ;
		Column17.Name = "cRegComert", ;
		Column17.Width = 117, ;
		Column18.ColumnOrder = 19, ;
		Column18.ControlSource = "cod_fiscal", ;
		Column18.FontName = "Arial", ;
		Column18.FontSize = 10, ;
		Column18.Name = "cCodFiscal", ;
		Column18.ReadOnly = .T., ;
		Column18.Width = 119, ;
		Column19.ColumnOrder = 9, ;
		Column19.ControlSource = "soldcum", ;
		Column19.FontName = "Arial", ;
		Column19.Format = "R", ;
		Column19.InputMask = (get_mask(15,gnPA)), ;
		Column19.Name = "cSoldCum", ;
		Column19.ReadOnly = .T., ;
		Column19.Width = 107
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'grid1.cAlteExplicatii.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Alte explicatii", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cAlteExplicatii.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cAscc.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Analitic cred.", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cAscc.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 0,64,128
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cAscd.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Analitic deb.", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cAscd.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 0,64,128
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cbancasa.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Banca", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cbancasa.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 0,64,128, ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cCodFiscal.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod Fiscal/CNP", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cCodFiscal.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cDataact.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data act", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cDataact.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 0,64,128, ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cDataireg.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data inreg.", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cDataireg.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 0,64,128, ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cExplicatia.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatia", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cExplicatia.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 0,64,128, ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cFDOC.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Fel Doc.", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cFDOC.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 0,64,128, ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cIncasari.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Incasari", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cIncasari.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 0,64,128, ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cNract.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr. act", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cNract.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 0,64,128, ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cnResp.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Responsabil", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cnResp.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 0,64,128, ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cNrord.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Lucrare/Contract", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cNrord.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 0,64,128, ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cPlati.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Plati", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cPlati.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 0,64,128, ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cRegComert.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Reg. Comert/CI", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cRegComert.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cScc.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont cred.", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cScc.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 0,64,128, ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cScd.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont deb.", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cScd.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 0,64,128, ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cSoldCum.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sold cumulat", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cSoldCum.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.cSucursala.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sucursala", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grid1.cSucursala.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 0,64,128
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Label2' AS _label WITH ;
		Anchor = 9, ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		Caption = "Rulaje in perioada", ;
		Height = 18, ;
		Left = 275, ;
		Name = "Label2", ;
		TabIndex = 23, ;
		Top = 37, ;
		Width = 105, ;
		ZOrderSet = 21
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'Label3' AS _label WITH ;
		Anchor = 9, ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		Caption = "Sold final", ;
		Height = 18, ;
		Left = 688, ;
		Name = "Label3", ;
		TabIndex = 22, ;
		Top = 63, ;
		Width = 55, ;
		ZOrderSet = 16
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'Label4' AS _label WITH ;
		Anchor = 9, ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		Caption = "Incasari", ;
		Height = 18, ;
		Left = 392, ;
		Name = "Label4", ;
		TabIndex = 19, ;
		Top = 63, ;
		Width = 47, ;
		ZOrderSet = 19
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'Label5' AS _label WITH ;
		Anchor = 9, ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		Caption = "Plati", ;
		Height = 18, ;
		Left = 550, ;
		Name = "Label5", ;
		TabIndex = 21, ;
		Top = 64, ;
		Width = 28, ;
		ZOrderSet = 17
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'Label9' AS _label WITH ;
		Anchor = 9, ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		Caption = "Sold precedent", ;
		Height = 18, ;
		Left = 203, ;
		Name = "Label9", ;
		TabIndex = 20, ;
		Top = 60, ;
		Width = 89, ;
		ZOrderSet = 18
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'oMenuShortcut' AS menulib WITH ;
		Left = 446, ;
		Name = "oMenuShortcut", ;
		TabIndex = 24, ;
		Top = 9, ;
		ZOrderSet = 22
		*< END OBJECT: ClassLib="utility.vcx" BaseClass="container" />

	ADD OBJECT 'opt_defalcat' AS _optiongrup WITH ;
		AutoSize = .T., ;
		Height = 28, ;
		Left = 19, ;
		Name = "opt_defalcat", ;
		TabIndex = 4, ;
		Top = 115, ;
		Visible = .F., ;
		Width = 298, ;
		Option1.AutoSize = .T., ;
		Option1.Caption = "Defalcat după documentul pereche", ;
		Option1.FontCharSet = 238, ;
		Option1.Left = 5, ;
		Option1.Name = "Option1", ;
		Option1.Top = 5, ;
		Option2.AutoSize = .T., ;
		Option2.Caption = "Cumulat", ;
		Option2.Left = 228, ;
		Option2.Name = "Option2", ;
		Option2.Top = 6
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="optiongroup" />

	ADD OBJECT 'Shape1' AS shape WITH ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		Height = 65, ;
		Left = 175, ;
		Name = "Shape1", ;
		SpecialEffect = 0, ;
		Top = 47, ;
		Width = 614, ;
		ZOrderSet = 2
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape4' AS shape WITH ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		Height = 41, ;
		Left = 326, ;
		Name = "Shape4", ;
		SpecialEffect = 0, ;
		Top = 71, ;
		Width = 316, ;
		ZOrderSet = 3
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Text3' AS _textbox WITH ;
		Alignment = 1, ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.nsoldi", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(12,gnPA)), ;
		Left = 180, ;
		Name = "Text3", ;
		ReadOnly = .T., ;
		TabIndex = 13, ;
		TabStop = .F., ;
		Top = 81, ;
		Width = 133, ;
		ZOrderSet = 12
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Text4' AS _textbox WITH ;
		Alignment = 1, ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.ntotincasari", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(12,gnPA)), ;
		Left = 352, ;
		Name = "Text4", ;
		ReadOnly = .T., ;
		TabIndex = 14, ;
		TabStop = .F., ;
		Top = 81, ;
		Width = 133, ;
		ZOrderSet = 15
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Text5' AS _textbox WITH ;
		Alignment = 1, ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.ntotplati", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(12,gnPA)), ;
		Left = 497, ;
		Name = "Text5", ;
		ReadOnly = .T., ;
		TabIndex = 15, ;
		TabStop = .F., ;
		Top = 81, ;
		Width = 133, ;
		ZOrderSet = 13
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Text6' AS _textbox WITH ;
		Alignment = 1, ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.nsoldf", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(12,gnPA)), ;
		Left = 649, ;
		Name = "Text6", ;
		ReadOnly = .T., ;
		TabIndex = 16, ;
		TabStop = .F., ;
		Top = 81, ;
		Width = 133, ;
		ZOrderSet = 14
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Text7' AS _textbox WITH ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.ddataact1", ;
		Height = 23, ;
		Left = 430, ;
		Name = "Text7", ;
		ReadOnly = .T., ;
		SpecialEffect = 0, ;
		TabIndex = 17, ;
		TabStop = .F., ;
		Top = 35, ;
		Visible = .T., ;
		Width = 133, ;
		ZOrderSet = 11
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Text8' AS _textbox WITH ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.ddataact2", ;
		Height = 23, ;
		Left = 569, ;
		Name = "Text8", ;
		ReadOnly = .T., ;
		SpecialEffect = 0, ;
		TabIndex = 18, ;
		TabStop = .F., ;
		Top = 35, ;
		Width = 133, ;
		ZOrderSet = 10
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS tcFiltru,tcFiltru2
		
		LOCAL lnprecdeb, lnpreccred
		lnprecdeb = THIS.nprecdebI
		lnpreccred = THIS.npreccredI
		LOCAL lnSoldi, lnSoldf
		
		THISFORM.MOUSEPOINTER= 11
		THISFORM.LOCKSCREEN = .T.
		
		IF !EMPTY(tcFiltru2)
			IF USED('crssume')
				USE IN crssume
			ENDIF
			pcexec=[select sum(incasari) as precdeb,sum(plati) as preccred from ]+gcS+[.vbancasa_] + Alltrim(thisform.ccont) + [ where ]+tcFiltru2
			lnsucces=goExecutor.oexecute(pcexec,'crsSold')
			IF lnsucces > 0
				SELECT crsSold
				GO TOP
				lnprecdeb = NVL(precdeb,0)
				lnpreccred = NVL(preccred,0)
				USE IN crsSold
			ELSE
				aMESSAGEBOX(goExecutor.cEroare, 0 + 16, 'Eroare')
			ENDIF
		ENDIF
		
		save_grid_tag(THISFORM.grid1)
		pobancasa.ca_baza1.cfiltru=tcFiltru
		pobancasa.ca_baza1.afisare()
		restore_grid_tag(THISFORM.grid1)
		
		SELECT casban
		UPDATE casban SET dataireg = {} WHERE nrcrt = 1
		UPDATE casban SET dataact = {} WHERE nrcrt = 1
		CALCULATE SUM(incasari),SUM(plati) FOR !EMPTY(dataireg) TO lntotincasari, lntotplati
		GO TOP 
		lnSoldi = lnprecdeb - lnprecCred
		lnSoldf = lnSoldi + lntotincasari - lntotplati
		
		WITH THIS
			.nSoldi = lnSoldi
			.nSoldf = lnSoldf
			.nTotincasari = lntotincasari
			.nTotPlati = lntotplati
			.nprecDeb = lnPrecDeb
			.nprecCred = lnPrecCred	
		ENDWITH
		
		THISFORM.LOCKSCREEN=.F.
		THISFORM.MOUSEPOINTER= 0
		
		THISFORM.text3.REFRESH
		THISFORM.text4.REFRESH
		THISFORM.text5.REFRESH
		THISFORM.text6.REFRESH
		THISFORM.text7.SETFOCUS
		THISFORM.text8.SETFOCUS
		
		SELE casban
		THISFORM.grid1.SETFOCUS
		
	ENDPROC

	PROCEDURE butdrept
		local laMenu[1]
		*!*	scatter memvar
		laMenu=""
		laMenu[1] = "Nota contabila"
		
		
		thisform.oMenuShortcut.ShowMenu(@laMenu)
			
		DO CASE
			CASE BAR()=1
				thisform.NOTACONTAB
		ENDCASE
		*!*	thisform.actualizeaza_grid1() 
	ENDPROC

	PROCEDURE clickdreapta
		Local lnOptiune
		THIS.AlwaysOnTop = .F.
		Select casban
		lnOptiune = xmenu("Dispozitie de " + Iif(casban.incasari<>0, "incasare", "plata") + ;
			" A4;Dispozitie de " + Iif(casban.incasari<>0, "incasare", "plata") + ' A5'+ Iif(casban.incasari <> 0, ";Relistare chitanta", ""))
		If EMPTY(m.lnOptiune)
			RETURN 
		ENDIF 	
		
		If Inlist(m.lnOptiune, 1,2)
			This.listare_dispozitie(Iif(m.lnOptiune = 1, 'A4', 'A5'))
		Else
			This.listare_chitanta()
		Endif
		
		THIS.AlwaysOnTop = .T. 
	ENDPROC

	PROCEDURE do_cauta
		LPARAMETERS tlDontSetFocus
		* tlDontSetFocus = .T. nu se apeleaza grid.setfocus daca este apelat do_cauta din cboBanca.valid. da eroare
		
		*!* 19.01.2017
		*!* Thisform.grID1.SetFocus in loc de butcriterii.setfocus pentru ca puneam filtru pe data act din checkbox, apoi dadeam un enter in plus si aparea din nou
		*!* fereastra de cautare, la care dadeam renunt si nu se mai facea cautarea
		
		Local lcFiltru, lcFiltruBancasa, lcFiltruDate, lcFiltru2
		Local lnIdBancasa, lnSold, lnSoldVal
		Local lcFiltruIdBancasa
		*:Global filtrutext
		
		lcFiltru=[]
		lcFiltru2=[]
		lcFiltruBancasa=[]
		lcFiltruDate=[]
		
		This.ddataact1 = Ctod('01/'+Alltrim(Str(gnLuna))+'/'+Alltrim(Str(gnAn)))
		This.ddataact2=Gomonth(This.ddataact1,1)-1
		
		With Thisform.ck_bancasa
			If .Value=1
				lcFiltru = lcFiltru + .filtru
				*lcFiltruBancasa = [(UPPER(SUBSTR(bancasa,1,]+ALLTRIM(STR(LEN(.cvaloare1)))+[))=']+UPPER(ALLTRIM(.cvaloare1))+[')]
				lcFiltruBancasa = [1=1 ] + .filtru
			Endif
		Endwith
		
		IF !EMPTY(NVL(thisform.nIdBancasa,0) )
			lcFiltruIdBancasa = [ and id_bancasa = ] + ALLTRIM(STR(thisform.nIdBancasa))
			lcFiltru = m.lcFiltru + m.lcFiltruIdBancasa
			lcFiltruBancasa = m.lcFiltruBancasa + IIF(!EMPTY(m.lcFiltruBancasa), m.lcFiltruIdBancasa, [1=1 ] + m.lcFiltruIdBancasa)
		ENDIF 
		
		With Thisform.ck_dataact
			If .Value=1
				lcFiltru=lcFiltru+.filtru
				lcFiltruDate = lcFiltruDate + [ OR dataact<to_date(']+Dtos(Ctod(.cvaloare1))+[','YYYY-MM-DD')]
				This.ddataact1 = .cvaloare1
				This.ddataact2 = .cvaloare2
			Endif
		Endwith
		
		If Thisform.ck_dataireg.Value=1
			lcFiltru=lcFiltru+Thisform.ck_dataireg.filtru
			lcFiltruDate=lcFiltruDate+[ OR dataireg<to_date(']+Dtos(Ctod(Thisform.ck_dataireg.cvaloare1))+[','YYYY-MM-DD')]
		ENDIF
		
		If Len(Thisform.filtru_pretty)>0
			filtrutext = Thisform.filtru_pretty
			If At("AND", filtrutext) = 1
				filtrutext = Right(filtrutext, Len(filtrutext) - 4)
			Endif
		
			lcFiltru =lcFiltru + " and (" + Alltrim(filtrutext) + ")"
		Endif
		
		lcFiltru = Iif(Empty(lcFiltru),[2=2],Substr(lcFiltru,5)) + gcCondSucursala
		Do Case
			Case !Empty(lcFiltruBancasa) And !Empty(lcFiltruDate)
				lcFiltru2 = lcFiltruBancasa + [ AND (NRCRT = 1]+lcFiltruDate+[) ] + gcCondSucursala
			Case !Empty(lcFiltruBancasa)
				*lcFiltru2=SUBSTR(lcFiltruBancasa,1,LEN(lcFiltruBancasa)-1)+[ AND NRCRT=1)]
				lcFiltru2 = [(] + lcFiltruBancasa + [ AND NRCRT = 1) ] + gcCondSucursala
			Case !Empty(lcFiltruDate)
				lcFiltru2 = [(NRCRT = 1] + lcFiltruDate + [) ] + gcCondSucursala
			Otherwise
				lcFiltru2 = [NRCRT = 1 ] + gcCondSucursala
		Endcase
		
		If (This.filtru_pretty#"none")
			Thisform.actualizeaza_grid1(lcFiltru, lcFiltru2)
			If Reccount("casban") = 0
				aMESSAGEBOX("Cautarea nu a intors rezultate!", 64, "Info cautare")
		
			Endif
		Endif
		
		* Recreez cursorul cBancasaLista in caz ca am importat un extras sau s-au facut modificari de alt utilizator
		creeaza_cursor_bancasalista(Thisform.ccont)
		This.cboBanca.Requery()
		
		* Completez soldul cumulat dupa fiecare operatiune, defalcat pe banci
		SELECT distinct id_bancasa FROM casban WHERE !EMPTY(NVL(id_bancasa,0)) INTO CURSOR cIdBancasaTemp
		SELECT cIdbancasaTemp
		SCAN
			lnIdBancasa = id_bancasa
			lnSold = 0
			SELECT casban
			SCAN FOR id_bancasa = m.lnIdBancasa
				lnSold = m.lnSold + incasari - plati
				REPLACE soldcum WITH m.lnSold
			ENDSCAN && lcCursor
		ENDSCAN && cIdbancasaTemp
		USE IN (SELECT('cIdBancasaTemp'))
		GO TOP IN casban
		
		* Nu mai pun setfocus pe grid, pentru ca apelez do_cauta din cboBanca.valid() si da eroare "nu se poate apela setfocus din valid"
		IF !m.tlDontSetFocus
			Thisform.grID1.SetFocus
		ENDIF 	
		
		
		  
	ENDPROC

	PROCEDURE do_excel
		lcAlias = this.grid1.RecordSource 
		lcFiltru = FILTER(lcAlias)
		IF EMPTY(lcFiltru)
			lcFiltru = '.T.'
		ENDIF 
		
		lcColumnList = ''
		lcHeaderList = ''
		lcSelect = ''
		llSelect = .T.
		lcType = 'CURSOR'
		lcFrom = lcAlias
		lcWhere = lcFiltru
		lcOrder = ''
		lcOutput = 'crsExcel'
		
		get_schema_grid(this.grid1,@lcColumnList, @lcHeaderList, @lcSelect, llSelect, lcType, lcFrom, lcWhere, lcOrder, lcOutput)
		&lcSelect
		*!*	MESSAGEBOX(p3)
		IF USED(lcOutput)
			DO export_xls WITH lcOutput IN oproceduri_comune.prg
			USE IN (lcOutput)
		ENDIF 	
		
	ENDPROC

	PROCEDURE do_import
		do form frm_import_extrase_banca.scx
		
		Thisform.do_cauta()
		Thisform.but_start_criterii1.refreshstatus()
	ENDPROC

	PROCEDURE do_listare
		*****REluat from cont2000:
		Local lcCursor, lcRaport, lnXmenuRet, llCasa
		Thisform.AlwaysOnTop=.F.
		If This.filtru_traducere()#""
			lctext=" si "+This.filtru_traducere()
		Else
			lctext=""
		Endif
		
		llCasa = Iif(Thisform.lb_titlu_alb_b121.Caption="REGISTRUL DE CASA",.T.,.F.)
		lcDispozitie = "Dispozitie de " + Iif(casban.incasari<>0, "incasare", "plata")
		lcDispozitieTot = ";Dispozitii de incasare/plata toata selectia"
		*!*	modificare	v 2.0.111
		*!*	lnXmenuRet = xmenu("Listare registru;Listare selectie")
		lnXmenuRet = xmenu(Iif(llCasa,"Listare registru - o casa;Listare registru - case cumulate;Listare selectie;\-;" + ;
			m.lcDispozitie + m.lcDispozitieTot + ;
		IIF(casban.incasari<>0,";Listare chitanta;Listare chitante toata selectia",""),;
			"Listare registru;Listare selectie;\-;" + m.lcDispozitie + m.lcDispozitieTot))
		*!*	modificare	v 2.0.111	^
		Do Case
			Case lnXmenuRet = 1		&& Listare
				pcSubtitlu = This.filtru_pretty_ro + lctext
				*!*	modificare	v 2.0.111
				*!*			If Thisform.Ck_bancasa.Value = 0
				If Thisform.ck_bancasa.Value = 0 Or (Thisform.ck_bancasa.Value = 1 And !Like([*=*],Thisform.ck_bancasa.filtru))
					*!*	modificare	v 2.0.111	^
					Thisform.ck_bancasa.Value = 1
					Thisform.ck_bancasa.InteractiveChange
					If gnButon=2
						Thisform.ck_bancasa.Value = 0
						Return
					Endif
					Thisform.do_cauta
				Endif
		
				Private pnSoldi, pnSoldf, pnPrecDeb, pnPrecCred
				pnSoldi = This.nSoldi
				pnSoldf = This.nSoldf
				pnPrecDeb = This.nPrecDeb
				pnPrecCred = This.nPrecCred
		
		
				*!*	pcDataOra = get_ora(2)
				*!*	modificare	v 2.0.117
				If raport_regcasa_restrans(1,llCasa,[casban],[casban_ordonat])
				*!*	modificare	v 2.0.117	^
					If llCasa
						Select casban
						*!*	modificare	v 2.0.117
						*!*				Select * From casban Order By dataireg,dataact,cod Where nrcrt = 2 Into Cursor casban_ordonat Readwrite
						*!*	modificare	v 2.0.117	^
						lcRaport = [registru_casa_rpt1]
						lcCursor = [casban_ordonat]
					Endif
		
					If !llCasa
						*!*	modificare	v 2.0.117
						*!*				Select casban
						*!*				Select * From casban Order By dataact,cod Where nrcrt = 2 Into Cursor casban_ordonat Readwrite
						*!*	modificare	v 2.0.117	^
						lcRaport = [registru_banca_rpt1]
						lcCursor = [casban_ordonat]
					Endif
		
					*!* 29.05.2008
					*!* daca nu am rulaje in luna vreau sa listez soldul initial = soldul final fara inregistrari
					*!* si trebuie sa pun o linie goala in tabel pt listare
					If Reccount('casban_ordonat') = 0
						Select bancasa From casban Where nrcrt = 1 Into Cursor cSolduriTemp
						Select casban_ordonat
						Append From Dbf('cSolduriTemp')
						Use In (Select('cSolduriTemp'))
					Endif
					*!* 29.05.2008 ^
		
					goExport.export2frx(m.lcCursor, m.lcRaport, , , , , , .T.)
					Use In (Select('casban_ordonat'))
				*!*	modificare	v 2.0.117
				Endif
				*!*	modificare	v 2.0.117	^
				Thisform.AlwaysOnTop=.T.
				*!*	modificare	v 2.0.111
			Case lnXmenuRet = 2 And llCasa
				pcSubtitlu = This.filtru_pretty_ro + lctext
				If Thisform.ck_bancasa.Value = 0 Or (Thisform.ck_bancasa.Value = 1 And Like([*=*],Thisform.ck_bancasa.filtru))
					Thisform.lalegmultiplu = .F.
					Thisform.ck_bancasa.Value = 1
					Thisform.lalegmultiplu = .T.
					Thisform.ck_bancasa.InteractiveChange
					If gnButon=2
						Thisform.ck_bancasa.Value = 0
						Thisform.lalegmultiplu = .F.
						Return
					Endif
					Thisform.do_cauta
				Endif
		
				Private pnSoldi, pnSoldf, pnPrecDeb, pnPrecCred
				pnSoldi = This.nSoldi
				pnSoldf = This.nSoldf
				pnPrecDeb = This.nPrecDeb
				pnPrecCred = This.nPrecCred
		
				Select casban
				*!*	modificare	v 2.0.117
				*!*			Select * From casban Order By dataireg,bancasa,dataact,cod Where nrcrt = 2 Into Cursor casban_ordonat Readwrite
				If raport_regcasa_restrans(2,llCasa,[casban],[casban_ordonat])
				*!*	modificare	v 2.0.117	^
					lcRaport = [registru_casa_rpt3]
					lcCursor = [casban_ordonat]
		
					If Reccount('casban_ordonat') = 0
						Select bancasa From casban Where nrcrt = 1 Into Cursor cSolduriTemp
						Select casban_ordonat
						Append From Dbf('cSolduriTemp')
						Use In (Select('cSolduriTemp'))
					Endif
		
					goExport.export2frx(m.lcCursor, m.lcRaport, , , , , , .T.)
					Use In (Select('casban_ordonat'))
				*!*	modificare	v 2.0.117
				Endif
				*!*	modificare	v 2.0.117	^
				Thisform.AlwaysOnTop=.T.
				Thisform.lalegmultiplu = .F.
				*!*		CASE lnXmenuRet = 3
			Case (lnXmenuRet = 3 and m.llCasa) Or (lnXmenuRet = 2 And !llCasa) && Selectie listare
				*!*	modificare	v 2.0.111	^
				Private pctitlu, pcSubtitlu
				pctitlu = Thisform.lb_titlu_alb_b121.Caption + [ (extras)]
				pcSubtitlu = This.filtru_pretty_ro_full
				lcCursor = [casban]
				lcRaport = [registru_casabanca_rpt2]
				goExport.export2frx(m.lcCursor, m.lcRaport, , , , , , .T.)
			Case (m.lnXmenuRet = 5 and m.llCasa) or (m.lnXmenuRet = 4 And !llCasa) && dispozitie plata/incasare
				This.listare_dispozitie()
			Case (m.lnXmenuRet = 6 and m.llCasa) or (m.lnXmenuRet = 5 And !llCasa) && dispozitii plata/incasare
				This.listare_dispozitie("", .T.)		
			CASE (m.lnXmenuRet = 7 AND m.llCasa)
				This.listare_chitanta()
			CASE (m.lnXmenuRet = 8 AND m.llCasa)
				This.listare_chitanta(.T.)
		Endcase
	ENDPROC

	PROCEDURE do_modifica_defalcare
		Lparameters tnOptiune
		*!*	 nu o apelez si din ProgrammaticChange pentru ca initializez valoarea lui opt_defalcat cu glBanCasaCum, 
		*!*	cu care am apelat deja creeaza_cursor_bancasa inainte sa intru in formular
		Thisform.grid1.salveaza_grid()
		Thisform.ck_bancasa.tabela = [vbancasa_] + Alltrim(Thisform.ccont) + Iif(tnOptiune=1,[],[_CUM])
		creeaza_cursor_bancasa(Thisform.ccont,tnOptiune==2)
		Thisform.grid1.incarca_grid()
		Thisform.do_cauta()
	ENDPROC

	PROCEDURE do_reset
		this.ck_bancasa.Value = 0
		this.ck_dataact.Value = 0
		this.ck_dataireg.Value = 0
		
		DODEFAULT()
	ENDPROC

	PROCEDURE do_sterge
		Local overif As 'verificare'
		Local lcCursor, llRul, llSucces
		
		If !Thisform.lactiv4
			Return
		Endif
		
		Local lnCod, lnSucces, lnRecno, lcSql
		Store .F. To  llRul
		lnSucces = 0
		
		If glLunaInchisa
			Return
		Endif
		
		
		Select casban
		lnRecno = Recno()
		lnCod = cod
		If Empty(Nvl(lnCod,0))
			Return
		Endif
		
		
		Use In (SELECT('actactan'))
		
		lcSql = [select * from vact_tot where an = ] + Transform(gnAn) + [ and luna = ] + Transform(gnLuna) + [ and cod = ] + Alltrim(Str(lnCod)) + [ order by id_act]
		lcCursor = [v_act]
		llSucces = goExecutor.oExecuta(lcSql,lcCursor)
		
		If m.llSucces
			Select * From v_act Into Cursor actactan
		
			Select Max(id_util) As id_utilizator From actactan Into Cursor crsUtilizator
			If id_utilizator <> gnIdUtil
				AMessagebox([Nu aveti dreptul de a sterge inregistrarea!], 0 + 48,[Atentie])
				llSucces = .F.	
			ENDIF
			Use In (Select("crsUtilizator"))
		
			IF m.llSucces
				overif = Createobject('verificare')
				overif.Show(1)
				Clear Class 'verificare'
		
				If buton = 1
					lnSucces  = OSCRIE_IN_FISIERE(2,.F.,llRul)
					llSucces = (m.lnSucces > 0)
				ENDIF
			ENDIF 	
		ENDIF 
		
		Use In (SELECT('v_act'))
		Use In (SELECT('actactan'))
		
		This.do_cauta
		Go Iif(lnRecno < 2, 1, Iif(lnRecno <> Reccount(),lnRecno - 1, lnRecno))
		Thisform.grid1.SetFocus()
		 
	ENDPROC

	PROCEDURE do_termin
		THIS.BUT_STArt_criterii1.RESETstatus()
		DODEFAULT()
		
	ENDPROC

	PROCEDURE Init
		Lparameters tcCont, tlArataInregOperator, tlAfisareTot
		* tlAfisareTot = .T. daca se afiseaza toate inregistrarile la intrarea in formular
		*!*	tlArataInregOperator - .T. se arata doar inregistrarile operatorului
		
		This.lArataInregOperator = tlArataInregOperator
		This.lAfisareTot = m.tlAfisareTot
		
		Thisform.ccont = Alltrim(tcCont)
		IF !PEMSTATUS(Thisform.ck_BANCASA,'tabela',5)
			ADDPROPERTY(Thisform.ck_BANCASA, 'tabela', '')
		ENDIF 
		IF !PEMSTATUS(Thisform.ck_BANCASA,'titlu',5)
			ADDPROPERTY(Thisform.ck_BANCASA, 'titlu', '')
		ENDIF 
		Thisform.ck_BANCASA.tabela = [vbancasa_] + Alltrim(tcCont)
		
		*!*	modificare	v 2.5.40
		If Inlist(Thisform.ccont, '5311','5121')
			Thisform.opt_defalcat.Visible = .T.
			Thisform.opt_defalcat.Value = IIF(glBanCasaCum,2,1)
		Endif
		*!*	modificare	v 2.5.40	^
		PRIVATE pcbanca,pccec,pccasa,pntotincasari,pntotplati,pnsoldi,pnsoldf,pnsuma1,pddataact1,pddataact2
		STORE 0 TO pntotincasari,pntotplati,pnsoldi,pnsoldf,pnsuma1
		STORE "" TO pcbanca,pccec,pccasa
		
		
		DODEFAULT()
		
		* Afisez toate inregistrarile cand intru pentru banca/casa. Sunt putine
		IF this.lAfisareTot
			This.do_reset() && afisarea tuturor inregistrarilor
		ENDIF 
		
		this.WindowState = 2
	ENDPROC

	PROCEDURE listare_chitanta
		LPARAMETERS tlToataSelectia
		* tlToataSelectia: .T. = se listeaza chitante pentru toata selectia, .F. se listeaza doar chitanta de pe inregistrarea curenta
		Local lcCursor, lcConditie, lnCod, lnRecno
		
		lcCursor = Thisform.grid1.RecordSource
		Select (lcCursor)
		lnCod = cod
		lnRecno = RECNO()
		lcConditie = IIF(m.tlToataSelectia, [incasari<>0], [cod = ] + ALLTRIM(STR(m.lnCod)))
		llSilent = .F.
		IF m.tlToataSelectia
			llSilent = (AMESSAGEBOX('Listare silentioasa la imprimanta implicita (Da) sau previzualizati fiecare chitanta (Nu)?',4+32,_Screen.Caption) = 6) && listare silentioasa cand se listeaza toata selectia
		ENDIF 
		If Reccount(lcCursor) > 0
			Select (lcCursor)
			SCAN FOR &lcConditie
				lnCod = &lcCursor..cod
				lnNract = nract
				WAIT WINDOW 'Relistare chitanta ' + ALLTRIM(STR(m.lnNract)) NOWAIT 
				relisteaza_chitanta(m.lnCod, m.llSilent)
			ENDSCAN 	
			SELECT (m.lcCursor)
			TRY 
				GOTO m.lnRecno
			CATCH 
				GO TOP IN (m.lcCursor)
			ENDTRY 	
		Endif 
	ENDPROC

	PROCEDURE listare_dispozitie
		Lparameters tcPagina, tlToataSelectia
		* tlToataSelectia: .T. = se listeaza chitante pentru toata selectia, .F. se listeaza doar chitanta de pe inregistrarea curenta
		*** tcPagina: A4/A5
		
		Local lcPagina, lcSelect
		Local lcConditie, lcExplicatia, lcRegComert, lnRecno
		Local lnCod
		Private pcSerie, pcNumar, pcFunctie, pcSumaLitere, pnSuma, pdDataact, pnNrAct
		Private pcExplic, pcExplic2, pcExplicatie, pcNume, pcScop, pcTip
		*:Global gnButon
		Store '' To m.pcSerie, m.pcNumar, m.pcFunctie, m.pcSumaLitere, m.pcExplic, m.pcExplic2, m.pcExplicatie, m.pcNume, m.pcScop, m.pcTip
		Store 0 To m.pnSuma, m.pnNrAct
		Store {} To m.pdDataact
		m.lcSelect = Select()
		
		m.lcPagina = Iif(!Empty(m.tcPagina), Upper(Transform(m.tcPagina)), 'A4')
		
		Select casban
		lnRecno = Recno()
		lnCod = cod
		lcConditie = Iif(m.tlToataSelectia, [.T.], [cod = ] + Alltrim(Str(m.lnCod)))
		Scan For &lcConditie
			m.pcExplicatie = 'Nume'
			m.pcScop = ''
			m.pcNume = Alltrim(Nvl(nume, ''))
			lcRegComert = Alltrim(Nvl(reg_comert, ''))
		
			m.pcNumar = m.lcRegComert
			m.pdDataact = Nvl(dataact, {})
			m.pnNrAct = Nvl(nract, 0)
			lcExplicatia = Alltrim(explicatia)
		
			If (casban.incasari <> 0)
				m.pnSuma = incasari
				m.pcTip = 'INCASARE'
				m.pcExplic = 'incasarii'
				m.pcExplic2 = 'Incasat'
			Else
				m.pnSuma = plati
				m.pcTip = 'PLATA'
				m.pcExplic = 'platii'
				m.pcExplic2 = 'Platit'
			Endif
			m.pcSumaLitere = suma_in_vorbe(m.pnSuma)
		
			gnButon = 1
			If !Pemstatus(This, 'cScop', 5)
				AddProperty(This, 'cScop', pcScop)
				AddProperty(This, 'cFunctie', pcFunctie)
		*!*		ADDPROPERTY(This, 'cSerie', pcSerie)
		*!*		ADDPROPERTY(This, 'cNumar', pcNumar)
			Endif
			pcScop = Iif(!Empty(m.lcExplicatia), m.lcExplicatia, This.cScop)
			pcFunctie = This.cFunctie
		*!*	pcSerie = This.cSerie
		*!*	pcNumar = This.cNumar
		
			Do Form datedisp542
		
			This.cScop = pcScop
			This.cFunctie = pcFunctie
		*!*	This.cSerie = pcSerie
		*!*	This.cNumar = pcNumar
		
			If gnButon = 1
				Select casban
		
				Create Cursor crscasban  (nract N(20), suma N(16, 2), dataact d)
				Select crscasban
				Append Blank
				Replace suma With m.pnSuma, nract With m.pnNrAct, dataact With m.pdDataact
		
		
				Thisform.AlwaysOnTop = .F.
				*goExport.export2frx([crscasban], Iif(m.lcPagina = 'A4', [dispozitie542], [dispozitie542_a5]))
				goExport.export2frx([crscasban],  Iif(m.lcPagina = 'A4', [dispozitie542], [dispozitie542_a5]), .F., , , , , .T., , )		
				Thisform.AlwaysOnTop = .T.
			Endif
		
			Use In (Select('crscasban'))
			SELECT casban 
		Endscan && casban
		
		SELECT casban
		TRY 
			GOTO m.lnRecno
		CATCH 
			GO TOP IN casban 
		ENDTRY 
		Release m.pcSerie, m.pcNumar, m.pcFunctie, m.pcSumaLitere, m.pnSuma, m.pdDataact, m.pnNrAct
		
		Select (m.lcSelect)
		  
	ENDPROC

	PROCEDURE notacontab
		Private pcselect,pcfiltru,pcschema,pcorder,llAfisare,poact,pcnume
		Store "" To poact,pcnume
		Store .F. To llAfisare
		Select casban
		pcnume = NVL(nume,'')
		pcschema=['ID_ACT N(20),LUNA N(2),AN N(4),COD N(20),DATAIREG D,nract N(20),DATAACT D,'+]+;
			['EXPLICATIA C(100),SCD C(4),ASCD C(4),SCC C(4),ASCC C(4),SUMA N(19,2),PERECHED N(14),'+]+;
			['PERECHEC N(14),SUMA_VAL N(19,2),NUME_VAL C(5),CURS N(8,2),DATASCAD D,NEIMPOZAB N(19,2),'+]+;
			['NNIR N(10),ID_UTIL N(5),UTIL C(30),DATAORA T,ID_UTILS N(5),UTILS C(30),DATAORAS T,'+]+;
			['ID_RESPONSABIL N(5),NRESP C(30),ID_VENCHELT N(5),DST_CHLT C(100),ID_LUCRARE N(5),NRORD C(30),ID_SECTIE N(5),'+]+;
			['SECTIE C(30),PROC_TVA N(5,2),ID_SET N(20),ID_FACT N(20),ID_PARTD N(10),PARTD C(50),ID_PARTC N(10),'+]+;
			['PARTC C(50),ID_SUCURSALA N(5),SUCURSALA C(50),ID_FDOC N(5),FDOC C(30),'+]+;
			['EXPLICATIA4 C(100),EXPLICATIA5 C(100),ID_GESTD N(5),GESTD C(50),ID_GESTC N(5),GESTC C(50)']
		pcschema=['']
		pcselect=['select * from ]+gcS+[.vact where 2=2']
		pcfiltru=[luna=]+Alltrim(Str(gnLuna))+[ and an=]+Alltrim(Str(gnAn))+;
			[ and cod=]+Alltrim(Str(cod))
		&& nu e nevoie de gnIdSucursala deoarece codul e unc
		pcorder=[dataact,serie_act,nract]
		gencursor("poact","acn1",pcselect,pcfiltru,pcschema,pcorder,llAfisare)
		poact.ca_baza1.afisare()
		
		Thisform.but_termin1.Enabled=.F.
		Select acn1
		Do nrord With "ACN1"
		GO TOP 
		*!*	ORC=Createobj("AFDEBCRED")
		*!*	ORC.LABELTITLU.Caption="NOTA CONTABILA"
		*!*	ORC.ali = 'act'
		*!*	ORC.Show(1)
		Thisform.AlwaysOnTop = .F.
		ORC=Createobj("frm_debcred")
		ORC.Lb_titlu_alb_b121.Caption="Nota contabila "+Alltrim(Nvl(pcnume,[]))
		ORC.lb_titlu1.Caption="NOTA CONTABILA"
		ORC._grdbase1.RemoveObject("cUtil")
		ORC._grdbase1.RemoveObject("cDataOra")
		ORC.Show(1)
		Thisform.but_termin1.Enabled=.T.
		Thisform.AlwaysOnTop = .T.
		Use In (SELECT('acn1'))
		Release ORC,poact
		*Thisform.actualizeaza_grid1()
	ENDPROC

	PROCEDURE Show
		LPARAMETERS nStyle
		DODEFAULT(nStyle)
		This.cboBanca.Requery()
	ENDPROC

	PROCEDURE But_reset_criterii1.Click
		thisform.nIdBancasa = 0
		DODEFAULT()
	ENDPROC

	PROCEDURE But_start_criterii1.loadcriterii
		PARAMETERS tacriterii
		EXTERNAL ARRAY tacriterii
		#define crlf CHR(13)+CHR(10)
		*!*	lcStringCriterii= thisform.ck_bancasa.Caption + "\" + thisform.ck_bancasa.camp_nume
		*!*	lcstringcriterii=lcstringcriterii + "\T\none\"			 		+ crlf + ; 
		*!*					  "Nr. act\nract\N\none\"   					+ crlf + ;
		*!*					  "Data act\dataact\D\none\"					+ crlf + ;
		*!*					  "Data inregistrarii\dataireg\D\none\"			+ crlf + ;
		*!*					  "Fel document\fdoc\T\none\" 			+ crlf + ;
		*!*					  "Lucrare\nrord\T\none\" 				+ crlf + ;
		*!*					  "Explicatia\nume\T\none\" 			+ crlf + ;			
		*!*	  				  "Incasari\incasari\N\none\" 			+ crlf + ;			
		*!*	  				  "Plati\plati\N\none\" 				+ crlf + ;	
		*!*					  "Cont debitor\scd\T\none\" 					+ crlf + ;	
		*!*					  "Cont creditor\scc\T\none\" 					+ crlf + ;				  
		*!*	  				  "Responsabil\nresp\T\none\"				  
		lcstringcriterii= "Nr. act\nract\N\none\"   				+ crlf + ;
						  "Fel document\fdoc\T\ID_FDOC\nom_feldoc"	+ crlf + ;
						  "Lucrare\nrord\T\ID_LUCRARE\nom_lucrare"	+ crlf + ;
						  "Explicatia\nume\T\none\"	+ crlf + ;			
		  				  "Incasari\incasari\N\none\" 			+ crlf + ;			
		  				  "Plati\plati\N\none\" 				+ crlf + ;	
						  "Cont debitor\scd\T\none\" 			+ crlf + ;	
						  "Analitic debitor\ascd\T\none\" 		+ crlf + ;	
						  "Cont creditor\scc\T\none\" 			+ crlf + ;	
						  "Analitic creditor\ascc\T\none\"		+ crlf + ;				  
		  				  "Responsabil\nresp\T\ID_RESPONSABIL\nom_parteneri" + ;
		  				  Iif(glEMama,crlf+"Sucursala\sucursala\T\none\",[])
		DODEFAULT()
	ENDPROC

	PROCEDURE cboBanca.DropDown
		This.FontName= "Courier New"
		
	ENDPROC

	PROCEDURE cboBanca.Init
		DODEFAULT()
		IF USED('cCasbanListaTemp')
			GO TOP IN cCasbanListaTemp
			thisform.nIdBancasa = cCasbanListaTemp.id_bancasa
		ENDIF 
	ENDPROC

	PROCEDURE cboBanca.Valid
		* cand deschid lista, pun Courier New ca sa fie aliniate soldurile la dreapta
		* cand inchid lista pe valid, pun la loc Arial
		This.FontName = "Arial"
		Thisform.do_cauta(.T.)
	ENDPROC

	PROCEDURE Ck_bancasa.InteractiveChange
		Local lcCont, lcTitlu, llToateIreg, loCauta, lcNume, lnIdPart, lcSirIdPart, lcSirNume, llCasa, lcXMLParteneri
		
		With This
			.filtru = ""
			.filtru_vfp = ""
			If .Value = 0
				Return
			Endif
		Endwith
		
		lcCont = Thisform.nrcont
		lcTitlu = Thisform.lb_titlu_alb_b121.Caption
		llToateIreg = .F.
		
		*!*	modificare v 2.0.111
		*!*	locauta = caut_parteneri(lcCont , lcTitlu, llToateIreg)
		*!*	lcNume = ALLTRIM(loCauta.denumire)
		*!*	lnIdPart = loCauta.id_part
		If Thisform.lalegmultiplu
			lcXMLParteneri = caut_parteneri_xml(lcCont,lcTitlu,llToateIreg)
			If !Empty(lcXMLParteneri) And gnbuton = 1
				Xmltocursor(lcXMLParteneri, "crsCasaTemp")
				If Reccount('crsCasaTemp') = 0
					amessagebox('Nu ați selectat vreo casă!',0+48,'Atentie')
					Return
				Endif
				lcSirIdPart = cursor2lista("crsCasaTemp", "id_part", ",")
				lcSirNume = cursor2lista("crsCasaTemp","denumire",",")
				Use In crsCasaTemp
			Else
				amessagebox("Nu ați selectat vreo casă!",0+48,"Atentie")
				Return
			Endif
		Else
			loCauta = caut_parteneri(lcCont , lcTitlu, llToateIreg)
			lcNume = Alltrim(loCauta.denumire)
			lnIdPart = loCauta.id_part
		Endif
		
		With This
			*!*		IF !EMPTY(lcNume) AND !EMPTY(lnIdPart)
			*!*			.cvaloare1 = lcNume
			*!*			*.filtru = [ AND UPPER(SUBSTR(]+ALLTRIM(.camp_nume)+[,1,]+ALLTRIM(STR(LEN(.cvaloare1)))+[))=']+.cvaloare1+[']
			*!*			.filtru = [ AND id_bancasa = ] + ALLTRIM(STR(lnIdPart))
			*!*			.filtru_vfp = [ AND id_bancasa = ] + ALLTRIM(STR(lnIdPart))
			*!*			.cTraducere = this.caption + " este " + ALLTRIM(NVL(.cvaloare1,""))
			*!*	ELSE
			*!*			.cvaloare1 = ""
			*!*			.filtru = ""
			*!*			.Value = 0
			*!*			.cTraducere = ""
			*!*	endif
			Do Case
				Case !Thisform.lalegmultiplu And !Empty(lcNume) And !Empty(lnIdPart)
					.cvaloare1 = lcNume
					.filtru = [ AND id_bancasa = ] + Alltrim(Str(lnIdPart))
					.filtru_vfp = [ AND id_bancasa = ] + Alltrim(Str(lnIdPart))
					.cTraducere = This.Caption + " este " + Alltrim(Nvl(.cvaloare1,""))
				Case Thisform.lalegmultiplu And !Empty(lcSirIdPart) And !Empty(lcSirNume)
					.cvaloare1 = lcSirNume
					.filtru = [ AND id_bancasa in (] + Alltrim(lcSirIdPart) + [)]
					.filtru_vfp = [ AND INLIST(id_bancasa,] + Alltrim(lcSirIdPart) + [)]
					.cTraducere = This.Caption + " : " + Alltrim(Nvl(.cvaloare1,""))
				Otherwise
					.cvaloare1 = ""
					.filtru = ""
					.Value = 0
					.cTraducere = ""
			Endcase
			*!*	modificare v 2.0.111	^
			If This.Value = 0
				.cvaloare1 = ""
				.filtru = ""
				.Value = 0
				.cTraducere = ""
			Endif
		Endwith
		Thisform.do_cauta()
		Thisform.but_start_criterii1.refreshstatus()
		
	ENDPROC

	PROCEDURE Ck_dataact.InteractiveChange
		DODEFAULT()
		thisform.do_cauta()
		thisform.but_start_criterii1.refreshstatus()
	ENDPROC

	PROCEDURE Ck_dataireg.InteractiveChange
		DODEFAULT()
		thisform.do_cauta()
		thisform.but_start_criterii1.refreshstatus()
	ENDPROC

	PROCEDURE grid1.cAscc.Header1.Click
		ThisForm.gridsort1.gridsort(This.Parent)
	ENDPROC

	PROCEDURE grid1.cAscd.Header1.Click
		ThisForm.gridsort1.gridsort(This.Parent)
	ENDPROC

	PROCEDURE grid1.cbancasa.Header1.Click
		ThisForm.gridsort1.gridsort(This.Parent)
	ENDPROC

	PROCEDURE grid1.cbancasa.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE grid1.cbancasa.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE grid1.cDataact.Header1.Click
		ThisForm.gridsort1.gridsort(This.Parent)
	ENDPROC

	PROCEDURE grid1.cDataact.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE grid1.cDataact.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE grid1.cDataireg.Header1.Click
		ThisForm.gridsort1.gridsort(This.Parent)
	ENDPROC

	PROCEDURE grid1.cDataireg.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE grid1.cDataireg.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE grid1.cExplicatia.Header1.Click
		ThisForm.gridsort1.gridsort(This.Parent)
	ENDPROC

	PROCEDURE grid1.cExplicatia.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE grid1.cExplicatia.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE grid1.cFDOC.Header1.Click
		ThisForm.gridsort1.gridsort(This.Parent)
	ENDPROC

	PROCEDURE grid1.cFDOC.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE grid1.cFDOC.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE grid1.cIncasari.Header1.Click
		ThisForm.gridsort1.gridsort(This.Parent)
	ENDPROC

	PROCEDURE grid1.cIncasari.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE grid1.cIncasari.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE grid1.cNract.Header1.Click
		ThisForm.gridsort1.gridsort(This.Parent)
	ENDPROC

	PROCEDURE grid1.cNract.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE grid1.cNract.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE grid1.cnResp.Header1.Click
		ThisForm.gridsort1.gridsort(This.Parent)
	ENDPROC

	PROCEDURE grid1.cnResp.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE grid1.cnResp.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE grid1.cNrord.Header1.Click
		ThisForm.gridsort1.gridsort(This.Parent)
	ENDPROC

	PROCEDURE grid1.cNrord.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE grid1.cNrord.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE grid1.cPlati.Header1.Click
		ThisForm.gridsort1.gridsort(This.Parent)
	ENDPROC

	PROCEDURE grid1.cPlati.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE grid1.cPlati.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE grid1.cScc.Header1.Click
		ThisForm.gridsort1.gridsort(This.Parent)
	ENDPROC

	PROCEDURE grid1.cScc.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE grid1.cScc.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE grid1.cScd.Header1.Click
		ThisForm.gridsort1.gridsort(This.Parent)
	ENDPROC

	PROCEDURE grid1.cScd.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE grid1.cScd.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE grid1.cSucursala.Header1.Click
		ThisForm.gridsort1.gridsort(This.Parent)
	ENDPROC

	PROCEDURE opt_defalcat.InteractiveChange
		Thisform.do_modifica_defalcare(This.Value)
	ENDPROC

	PROCEDURE Text3.Refresh
		*THIS.FORECOLOR=IIF(M.PRECDEB-M.PRECCRED>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE Text4.Refresh
		*THIS.FORECOLOR=IIF(TINCASARI>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE Text5.Refresh
		*THIS.FORECOLOR=IIF(TPLATI>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE Text6.Refresh
		*THIS.FORECOLOR=IIF(TINCASARI-TPLATI>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE Text7.GotFocus
		*!*	if bdataact==.f. then
		*!*		m.dataact1=""
		*!*		endif
		*!*	this.refresh
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_casaban_restrans AS _frmbase OF "_frm_base.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="grd_feldocument" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_feldocument.cAles.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_feldocument.cAles._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_feldocument.cFel_document.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_feldocument.cFel_document.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Lb_explicatie1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_parteneri" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_parteneri.cAles.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_parteneri.cAles._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_parteneri.cDenumire.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_parteneri.cDenumire.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_parteneri.cCod_fiscal.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_parteneri.cCod_fiscal.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Lb_explicatie2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="BUT_RENUNT1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmd_select_adv1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_denumire" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Lb_simplu3" UniqueID="" Timestamp="" />

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 480
		Name = "frm_casaban_restrans"
		Width = 404
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 404
		_shape2.Height = 29
		_shape2.Left = 312
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 67
		Lb_titlu_alb_b121.Caption = "CUMULARE INREGISTRARI"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 7
		BUT_TERMIN1.Left = 372
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 5
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT 'BUT_RENUNT1' AS but_renunt WITH ;
		Left = 342, ;
		Name = "BUT_RENUNT1", ;
		TabIndex = 6, ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Clb_denumire' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 17, ;
		Name = "Clb_denumire", ;
		Top = 257, ;
		Width = 367, ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 101, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 258, ;
		Lb_simplu1.Caption = "Denumire", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cmd_select_adv1' AS cmd_select_adv WITH ;
		ccoloana = ales, ;
		cgrid = thisform.grd_parteneri, ;
		Left = 12, ;
		Name = "Cmd_select_adv1", ;
		TabIndex = 3, ;
		Top = 448
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'grd_feldocument' AS _grdbase WITH ;
		ColumnCount = 2, ;
		DeleteMark = .F., ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Height = 135, ;
		Left = 12, ;
		Name = "grd_feldocument", ;
		Panel = 1, ;
		RecordSource = "crsdocumente", ;
		RowHeight = 20, ;
		TabIndex = 1, ;
		Top = 76, ;
		Width = 385, ;
		Column1.ControlSource = "ales", ;
		Column1.FontName = "Segoe UI", ;
		Column1.FontSize = 10, ;
		Column1.Name = "cAles", ;
		Column1.Sparse = .F., ;
		Column1.Width = 30, ;
		Column2.ControlSource = "fel_document", ;
		Column2.FontName = "Segoe UI", ;
		Column2.FontSize = 10, ;
		Column2.Name = "cFel_document", ;
		Column2.Width = 323
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'grd_feldocument.cAles._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		AutoSize = .F., ;
		Caption = "", ;
		Centered = .T., ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Left = 23, ;
		Name = "_checkbox1", ;
		Top = 34
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'grd_feldocument.cAles.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ales", ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_feldocument.cFel_document.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Fel document", ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_feldocument.cFel_document.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grd_parteneri' AS _grdbase WITH ;
		ColumnCount = 3, ;
		DeleteMark = .F., ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Height = 152, ;
		Left = 12, ;
		Name = "grd_parteneri", ;
		Panel = 1, ;
		RecordSource = "crsparteneri", ;
		RowHeight = 20, ;
		TabIndex = 2, ;
		Top = 291, ;
		Width = 385, ;
		Column1.ControlSource = "ales", ;
		Column1.FontName = "Segoe UI", ;
		Column1.FontSize = 10, ;
		Column1.Name = "cAles", ;
		Column1.Sparse = .F., ;
		Column1.Width = 30, ;
		Column2.ControlSource = "denumire", ;
		Column2.FontName = "Segoe UI", ;
		Column2.FontSize = 10, ;
		Column2.Name = "cDenumire", ;
		Column2.Width = 244, ;
		Column3.ControlSource = "cod_fiscal", ;
		Column3.FontName = "Segoe UI", ;
		Column3.FontSize = 10, ;
		Column3.Name = "cCod_fiscal"
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'grd_parteneri.cAles._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		AutoSize = .F., ;
		Caption = "", ;
		Centered = .T., ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Left = 23, ;
		Name = "_checkbox1", ;
		Top = 34
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'grd_parteneri.cAles.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ales", ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_parteneri.cCod_fiscal.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "C.I.F./C.N.P.", ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_parteneri.cCod_fiscal.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grd_parteneri.cDenumire.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Denumire", ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_parteneri.cDenumire.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Lb_explicatie1' AS _label WITH ;
		Caption = "Alegeti felurile de document care se vor cumula", ;
		Left = 12, ;
		Name = "Lb_explicatie1", ;
		TabIndex = 8, ;
		Top = 55
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'Lb_explicatie2' AS _label WITH ;
		AutoSize = .T., ;
		Caption = "Alegeti partenerii pentru care se vor cumula tipurile alese mai sus", ;
		Height = 19, ;
		Left = 4, ;
		Name = "Lb_explicatie2", ;
		TabIndex = 9, ;
		Top = 231, ;
		Width = 382, ;
		WordWrap = .T.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'Lb_simplu3' AS _label WITH ;
		Caption = 'Daca nu doriti sa cumulati inregistrarile, apasati pe "TERMINAT".', ;
		Left = 13, ;
		Name = "Lb_simplu3", ;
		TabIndex = 8, ;
		Top = 36
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />
	
	PROCEDURE inainte_de_do_termin
		Local llReturn
		Store .T. To llReturn
		
		Select crsdocumente
		lnRecno = Recno()
		Calculate Cnt() For ales = 1 To pnDocAles
		Go (lnRecno)
		
		Select crsparteneri
		lnRecno = Recno()
		Calculate Cnt() For ales = 1 To pnPartAles
		Go (lnRecno)
		
		Do Case
		Case pnDocAles = 0 AND pnPartAles <> 0
			amessagebox("Nu ati ales tipul de document pentru care se va face cumularea!",48,"Atentie")
			This.grd_feldocument.SetFocus()
			llReturn = .F.
		Case pnDocAles <> 0 AND pnPartAles = 0
			amessagebox("Nu ati ales partenerii pentru care se va face cumularea!",48,"Atentie")
			This.grd_parteneri.SetFocus()
			llReturn = .F.
		Otherwise
			llReturn = .T.
		Endcase
		
		Return llReturn
	ENDPROC

	PROCEDURE Clb_denumire.Text_simplu1.KeyPress
		Lparameters nKeyCode, nShiftAltCtrl
		If nKeyCode = 13 And !Empty(This.Value)
			Nodefault
			Select crsparteneri
			Locate For Like(Alltrim(This.Value)+[*],denumire)
			If !Found()
				Go Top
			Endif
			Thisform.grd_parteneri.SetFocus()
		Else
			DoDefault()
		Endif
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_casaban_val AS _frmbase OF "_frm_base.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Shape1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cFdoc.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cFdoc.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cDataact.Header2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cDataact.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cNract.Header3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cNract.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cbancasa.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cbancasa.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cIncasari.Header5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cIncasari.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cPlati.Header6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cPlati.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cScd.Header7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cScd.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cScc.Header8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cScc.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cExplicatia.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cExplicatia.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cIncasVal.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cIncasVal.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cPlatiVal.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cPlatiVal.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cCurs.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cCurs.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column13.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column13.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cNumeVal.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cNumeVal.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cPereche.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cPereche.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cDataIreg.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cDataIreg.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cNrord.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cNrord.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cNresp.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cNresp.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cAscd.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cAscd.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cAscc.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cAscc.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cExplicatia2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cExplicatia2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cRegComert.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cRegComert.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cCodFiscal.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cCodFiscal.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cSoldCum.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cSoldCum.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_listare1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_excel1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text10" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="oMenuShortcut" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_start_criterii1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_reset_criterii1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_dataact" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_bancasa" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="opt_defalcat" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cboBanca" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: butapend
		*m: butdrept
		*m: clickdreapta
		*m: do_modifica_defalcare
		*m: listare_chitanta
		*m: listare_dispozitie
		*m: notacontab
		*p: ccont
		*p: ddataact1
		*p: ddataact2
		*p: lafisaretot
		*p: laratainregoperator		&& Daca se afiseaza doar inregistrarile utilizatorului curent
		*p: nidbancasa
		*p: npreccred
		*p: npreccredi
		*p: npreccredval
		*p: npreccredvali
		*p: nprecdeb
		*p: nprecdebi
		*p: nprecdebval
		*p: nprecdebvali
		*p: nrcont
		*p: nrcontval
		*p: nsoldf
		*p: nsoldfval
		*p: nsoldi
		*p: nsoldival
		*p: ntotincasari
		*p: ntotincasval
		*p: ntotplati
		*p: ntotplatival
		*p: tip
	*</DefinedPropArrayMethod>

	*<PropValue>
		ccont = 
		ddataact1 = {}
		ddataact2 = {}
		DoCreate = .T.
		Height = 550
		lafisaretot = .F.
		laratainregoperator = .F.
		Name = "frm_casaban_val"
		nidbancasa = 0
		npreccred = 0
		npreccredi = 0
		npreccredval = 0
		npreccredvali = 0
		nprecdeb = 0
		nprecdebi = 0
		nprecdebval = 0
		nprecdebvali = 0
		nrcont = 
		nrcontval = 
		nsoldf = 0
		nsoldfval = 0
		nsoldi = 0
		nsoldival = 0
		ntotincasari = 0
		ntotincasval = 0
		ntotplati = 0
		ntotplatival = 0
		tip = 
		Width = 800
		_memberdata = <VFPData>
			<memberdata name="laratainregoperator" type="property" display="lArataInregOperator"/>
			<memberdata name="lafisaretot" display="lAfisareTot"/>
			<memberdata name="nidbancasa" display="nIdBancasa"/>
		</VFPData>
		_shape1.Anchor = 10
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 800
		_shape2.Height = 29
		_shape2.Left = 696
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 104
		Lb_titlu_alb_b121.Caption = "REGISTRUL IN VALUTA"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 21
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 766
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 17
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT 'But_excel1' AS but_excel WITH ;
		Anchor = 9, ;
		Left = 702, ;
		Name = "But_excel1", ;
		TabIndex = 20, ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_listare1' AS but_listare WITH ;
		Anchor = 9, ;
		Left = 734, ;
		Name = "But_listare1", ;
		TabIndex = 18, ;
		Top = 1, ;
		Visible = .T.
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 610, ;
		lvizibil = .F., ;
		Name = "But_modifica1", ;
		TabIndex = 19, ;
		Top = 1, ;
		Visible = .F.
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_reset_criterii1' AS but_reset_criterii WITH ;
		Anchor = 9, ;
		Left = 640, ;
		Name = "But_reset_criterii1", ;
		TabIndex = 9, ;
		Top = 1, ;
		Visible = .T., ;
		ZOrderSet = 26
		*< END OBJECT: ClassLib="ocriterii.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_start_criterii1' AS but_start_criterii WITH ;
		Anchor = 9, ;
		Left = 670, ;
		Name = "But_start_criterii1", ;
		TabIndex = 8, ;
		Top = 1, ;
		ZOrderSet = 25
		*< END OBJECT: ClassLib="ocriterii.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'cboBanca' AS _cbbase WITH ;
		BoundColumn = 3, ;
		BoundTo = .T., ;
		ColumnCount = 4, ;
		ColumnLines = .F., ;
		ColumnWidths = "350,200,0,0", ;
		ControlSource = "Thisform.nIdBancasa", ;
		FontName = "Arial", ;
		Height = 24, ;
		Left = 13, ;
		Name = "cboBanca", ;
		RowSource = "select bancasa, PADL(transform(sold, '999 999 999.99') + ' ' + padr(ALLT(numeval), 5, ' ') , 25, ' ')  as sold, id_bancasa, ord, numeval from cBancasaLista order by 4,1 into cursor cCasbanListaTemp", ;
		RowSourceType = 3, ;
		Top = 78, ;
		Width = 299
		*< END OBJECT: ClassLib="_cb_base.vcx" BaseClass="combobox" />

	ADD OBJECT 'Ck_bancasa' AS ck_filtru_nom WITH ;
		Alignment = 0, ;
		camp_nume = bancasa, ;
		camp_tabela = bancasa, ;
		Caption = "Banca", ;
		Left = 17, ;
		Name = "Ck_bancasa", ;
		tabela = vbancasa_val, ;
		TabIndex = 1, ;
		titlu = Alegeti banca, ;
		Top = 40
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_dataact' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		camp_nume = dataact, ;
		Caption = "Data act", ;
		Left = 17, ;
		Name = "Ck_dataact", ;
		TabIndex = 3, ;
		tip = D, ;
		Top = 58
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Grid1' AS _grdbase WITH ;
		Anchor = 15, ;
		ColumnCount = 24, ;
		DeleteMark = .F., ;
		FontCharSet = 1, ;
		GridLineColor = 192,192,192, ;
		Height = 385, ;
		Left = 12, ;
		Name = "Grid1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "casban", ;
		RowHeight = 19, ;
		TabIndex = 16, ;
		Tag = "RESIZABLE", ;
		Top = 158, ;
		Width = 780, ;
		ZOrderSet = 5, ;
		Column1.Alignment = 0, ;
		Column1.BackColor = 255,255,255, ;
		Column1.ColumnOrder = 1, ;
		Column1.ControlSource = "fdoc", ;
		Column1.FontCharSet = 1, ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 10, ;
		Column1.Format = "", ;
		Column1.InputMask = "", ;
		Column1.Name = "cFdoc", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 106, ;
		Column2.Alignment = 0, ;
		Column2.BackColor = 255,255,255, ;
		Column2.ColumnOrder = 2, ;
		Column2.ControlSource = "dataact", ;
		Column2.FontCharSet = 1, ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 10, ;
		Column2.Name = "cDataact", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 70, ;
		Column3.Alignment = 0, ;
		Column3.BackColor = 255,255,255, ;
		Column3.ColumnOrder = 4, ;
		Column3.ControlSource = "nract", ;
		Column3.FontCharSet = 1, ;
		Column3.FontName = "Arial", ;
		Column3.FontSize = 10, ;
		Column3.Format = "", ;
		Column3.InputMask = "", ;
		Column3.Name = "cNract", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 87, ;
		Column4.Alignment = 0, ;
		Column4.BackColor = 255,255,255, ;
		Column4.ColumnOrder = 5, ;
		Column4.ControlSource = "bancasa", ;
		Column4.FontCharSet = 1, ;
		Column4.FontName = "Arial", ;
		Column4.FontSize = 10, ;
		Column4.Format = "", ;
		Column4.InputMask = "", ;
		Column4.Name = "cbancasa", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 153, ;
		Column5.Alignment = 1, ;
		Column5.BackColor = 255,255,255, ;
		Column5.ColumnOrder = 7, ;
		Column5.ControlSource = "incasari", ;
		Column5.DynamicForeColor = "IIF(INCASARI>=0, RGB(0,0,0), RGB(255,0,0))", ;
		Column5.FontCharSet = 1, ;
		Column5.FontName = "Arial", ;
		Column5.FontSize = 10, ;
		Column5.Format = "r", ;
		Column5.InputMask = (get_mask(12,gnPA)), ;
		Column5.Name = "cIncasari", ;
		Column5.ReadOnly = .T., ;
		Column5.Width = 97, ;
		Column6.Alignment = 1, ;
		Column6.BackColor = 255,255,255, ;
		Column6.ColumnOrder = 8, ;
		Column6.ControlSource = "plati", ;
		Column6.DynamicForeColor = "IIF(PLATI>=0, RGB(0,0,0), RGB(255,0,0))", ;
		Column6.FontCharSet = 1, ;
		Column6.FontName = "Arial", ;
		Column6.FontSize = 10, ;
		Column6.Format = "r", ;
		Column6.InputMask = (get_mask(12,gnPA)), ;
		Column6.Name = "cPlati", ;
		Column6.ReadOnly = .T., ;
		Column6.Width = 97, ;
		Column7.Alignment = 0, ;
		Column7.BackColor = 255,255,255, ;
		Column7.ColumnOrder = 9, ;
		Column7.ControlSource = "scd", ;
		Column7.FontCharSet = 1, ;
		Column7.FontName = "Arial", ;
		Column7.FontSize = 10, ;
		Column7.Format = "", ;
		Column7.InputMask = "", ;
		Column7.Name = "cScd", ;
		Column7.ReadOnly = .T., ;
		Column7.Width = 60, ;
		Column8.Alignment = 0, ;
		Column8.BackColor = 255,255,255, ;
		Column8.ColumnOrder = 11, ;
		Column8.ControlSource = "scc", ;
		Column8.FontCharSet = 1, ;
		Column8.FontName = "Arial", ;
		Column8.FontSize = 10, ;
		Column8.Format = "", ;
		Column8.InputMask = "", ;
		Column8.Name = "cScc", ;
		Column8.ReadOnly = .T., ;
		Column8.Width = 60, ;
		Column9.Alignment = 0, ;
		Column9.BackColor = 255,255,255, ;
		Column9.ColumnOrder = 6, ;
		Column9.ControlSource = "nume", ;
		Column9.FontCharSet = 1, ;
		Column9.FontName = "Arial", ;
		Column9.FontSize = 10, ;
		Column9.Name = "cExplicatia", ;
		Column9.ReadOnly = .T., ;
		Column9.Width = 151, ;
		Column10.BackColor = 255,255,255, ;
		Column10.ColumnOrder = 13, ;
		Column10.ControlSource = "incasval", ;
		Column10.FontCharSet = 1, ;
		Column10.FontName = "Arial", ;
		Column10.FontSize = 10, ;
		Column10.Format = "r", ;
		Column10.InputMask = (get_mask(12,gnPA)), ;
		Column10.Name = "cIncasVal", ;
		Column10.ReadOnly = .T., ;
		Column10.Width = 109, ;
		Column11.BackColor = 255,255,255, ;
		Column11.ColumnOrder = 14, ;
		Column11.ControlSource = "platival", ;
		Column11.FontCharSet = 1, ;
		Column11.FontName = "Arial", ;
		Column11.FontSize = 10, ;
		Column11.Format = "r", ;
		Column11.InputMask = (get_mask(12,gnPA)), ;
		Column11.Name = "cPlatiVal", ;
		Column11.ReadOnly = .T., ;
		Column11.Width = 92, ;
		Column12.BackColor = 255,255,255, ;
		Column12.ColumnOrder = 17, ;
		Column12.ControlSource = "curs", ;
		Column12.FontCharSet = 1, ;
		Column12.FontName = "Arial", ;
		Column12.FontSize = 10, ;
		Column12.Format = "r", ;
		Column12.InputMask = "", ;
		Column12.Name = "cCurs", ;
		Column12.ReadOnly = .T., ;
		Column12.Width = 87, ;
		Column13.BackColor = 255,255,255, ;
		Column13.ColumnOrder = 16, ;
		Column13.ControlSource = "", ;
		Column13.FontCharSet = 1, ;
		Column13.FontName = "Arial", ;
		Column13.FontSize = 10, ;
		Column13.Format = "r", ;
		Column13.InputMask = "999 999 999", ;
		Column13.Name = "Column13", ;
		Column13.ReadOnly = .T., ;
		Column13.Visible = .F., ;
		Column13.Width = 0, ;
		Column14.BackColor = 255,255,255, ;
		Column14.ColumnOrder = 18, ;
		Column14.ControlSource = "numeval", ;
		Column14.FontCharSet = 1, ;
		Column14.FontName = "Arial", ;
		Column14.FontSize = 10, ;
		Column14.Name = "cNumeVal", ;
		Column14.ReadOnly = .T., ;
		Column14.Width = 99, ;
		Column15.BackColor = 255,255,255, ;
		Column15.ColumnOrder = 22, ;
		Column15.ControlSource = "sucursala", ;
		Column15.FontCharSet = 1, ;
		Column15.FontName = "Arial", ;
		Column15.FontSize = 10, ;
		Column15.Name = "cPereche", ;
		Column15.ReadOnly = .T., ;
		Column15.Width = 164, ;
		Column16.ColumnOrder = 3, ;
		Column16.ControlSource = "dataireg", ;
		Column16.FontCharSet = 1, ;
		Column16.FontName = "Arial", ;
		Column16.FontSize = 10, ;
		Column16.Name = "cDataIreg", ;
		Column16.ReadOnly = .T., ;
		Column16.Width = 79, ;
		Column17.ColumnOrder = 20, ;
		Column17.ControlSource = "nrord", ;
		Column17.FontCharSet = 1, ;
		Column17.FontName = "Arial", ;
		Column17.FontSize = 10, ;
		Column17.Name = "cNrord", ;
		Column17.ReadOnly = .T., ;
		Column17.Width = 161, ;
		Column18.ColumnOrder = 21, ;
		Column18.ControlSource = "nresp", ;
		Column18.FontCharSet = 1, ;
		Column18.FontName = "Arial", ;
		Column18.FontSize = 10, ;
		Column18.Name = "cNresp", ;
		Column18.ReadOnly = .T., ;
		Column18.Width = 167, ;
		Column19.ColumnOrder = 10, ;
		Column19.ControlSource = "ascd", ;
		Column19.FontCharSet = 1, ;
		Column19.FontName = "Arial", ;
		Column19.FontSize = 10, ;
		Column19.Name = "cAscd", ;
		Column19.ReadOnly = .T., ;
		Column19.Width = 70, ;
		Column20.ColumnOrder = 12, ;
		Column20.ControlSource = "ascc", ;
		Column20.FontCharSet = 1, ;
		Column20.FontName = "Arial", ;
		Column20.FontSize = 10, ;
		Column20.Name = "cAscc", ;
		Column20.ReadOnly = .T., ;
		Column20.Width = 81, ;
		Column21.ColumnOrder = 19, ;
		Column21.ControlSource = "explicatia", ;
		Column21.FontCharSet = 1, ;
		Column21.FontName = "Arial", ;
		Column21.FontSize = 10, ;
		Column21.Name = "cExplicatia2", ;
		Column21.ReadOnly = .T., ;
		Column21.Width = 143, ;
		Column22.ColumnOrder = 23, ;
		Column22.ControlSource = "reg_comert", ;
		Column22.FontCharSet = 1, ;
		Column22.FontName = "Arial", ;
		Column22.FontSize = 10, ;
		Column22.Name = "cRegComert", ;
		Column22.ReadOnly = .T., ;
		Column22.Width = 145, ;
		Column23.ColumnOrder = 24, ;
		Column23.ControlSource = "cod_fiscal", ;
		Column23.FontCharSet = 1, ;
		Column23.FontName = "Arial", ;
		Column23.FontSize = 10, ;
		Column23.Name = "cCodFiscal", ;
		Column23.ReadOnly = .T., ;
		Column23.Width = 130, ;
		Column24.ColumnOrder = 15, ;
		Column24.ControlSource = "soldcum", ;
		Column24.FontCharSet = 1, ;
		Column24.Format = "R", ;
		Column24.InputMask = (get_mask(15,gnPA)), ;
		Column24.Name = "cSoldCum", ;
		Column24.ReadOnly = .T., ;
		Column24.Width = 111
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'Grid1.cAscc.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Analitic Cred.", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cAscc.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cAscd.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Analitic Deb.", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cAscd.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cbancasa.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Banca", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cbancasa.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cCodFiscal.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod fiscal/CNP", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cCodFiscal.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cCurs.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Curs schimb", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cCurs.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cDataact.Header2' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data act", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header2"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cDataact.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cDataIreg.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data inreg.", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cDataIreg.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cExplicatia.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatia", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cExplicatia.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cExplicatia2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Alte explicatii", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cExplicatia2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cFdoc.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Fel Doc.", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cFdoc.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cIncasari.Header5' AS header WITH ;
		Alignment = 2, ;
		Caption = "Incasari", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header5"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cIncasari.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cIncasVal.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Incasari valuta", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cIncasVal.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cNract.Header3' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr. act", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header3"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cNract.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cNresp.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Responsabil", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cNresp.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cNrord.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Lucrare", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cNrord.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cNumeVal.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nume valuta", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cNumeVal.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column13.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Curs BNR", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column13.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255, ;
		Visible = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cPereche.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sucursala", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cPereche.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cPlati.Header6' AS header WITH ;
		Alignment = 2, ;
		Caption = "Plati", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header6"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cPlati.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cPlatiVal.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Plati valuta", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cPlatiVal.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cRegComert.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Reg. Comert/CI", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cRegComert.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cScc.Header8' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont.Cred.", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header8"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cScc.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cScd.Header7' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont.Deb.", ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header7"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cScd.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cSoldCum.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sold cumulat valuta", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cSoldCum.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Label1' AS _label WITH ;
		Anchor = 9, ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		Caption = "Lei", ;
		Height = 18, ;
		Left = 201, ;
		Name = "Label1", ;
		TabIndex = 35, ;
		Top = 79, ;
		Width = 19, ;
		ZOrderSet = 20
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'Label2' AS _label WITH ;
		Anchor = 9, ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		Caption = "Rulaje in perioada", ;
		Height = 18, ;
		Left = 251, ;
		Name = "Label2", ;
		TabIndex = 38, ;
		Top = 32, ;
		Width = 105, ;
		ZOrderSet = 31
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'Label3' AS _label WITH ;
		Anchor = 9, ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		Caption = "Sold final", ;
		Height = 18, ;
		Left = 730, ;
		Name = "Label3", ;
		TabIndex = 37, ;
		Top = 57, ;
		Width = 55, ;
		ZOrderSet = 27
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'Label4' AS _label WITH ;
		Anchor = 9, ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		Caption = "Incasari", ;
		Height = 18, ;
		Left = 471, ;
		Name = "Label4", ;
		TabIndex = 33, ;
		Top = 58, ;
		Width = 47, ;
		ZOrderSet = 20
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'Label5' AS _label WITH ;
		Anchor = 9, ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		Caption = "Plati", ;
		Height = 18, ;
		Left = 625, ;
		Name = "Label5", ;
		TabIndex = 36, ;
		Top = 59, ;
		Width = 28, ;
		ZOrderSet = 27
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'Label6' AS _label WITH ;
		Anchor = 9, ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		Caption = "Valuta", ;
		Height = 18, ;
		Left = 201, ;
		Name = "Label6", ;
		TabIndex = 34, ;
		Top = 107, ;
		Width = 39, ;
		ZOrderSet = 20
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'Label7' AS _label WITH ;
		Anchor = 9, ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		Caption = "Sold precedent", ;
		Height = 18, ;
		Left = 291, ;
		Name = "Label7", ;
		TabIndex = 32, ;
		Top = 58, ;
		Width = 89, ;
		ZOrderSet = 20
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'oMenuShortcut' AS menulib WITH ;
		Left = 504, ;
		Name = "oMenuShortcut", ;
		TabIndex = 40, ;
		Top = 9
		*< END OBJECT: ClassLib="utility.vcx" BaseClass="container" />

	ADD OBJECT 'opt_defalcat' AS _optiongrup WITH ;
		AutoSize = .T., ;
		Height = 27, ;
		Left = 13, ;
		Name = "opt_defalcat", ;
		TabIndex = 4, ;
		Top = 107, ;
		Visible = .F., ;
		Width = 297, ;
		Option1.AutoSize = .T., ;
		Option1.Caption = "Defalcat după documentul pereche", ;
		Option1.FontCharSet = 238, ;
		Option1.Left = 5, ;
		Option1.Name = "Option1", ;
		Option1.Top = 5, ;
		Option2.AutoSize = .T., ;
		Option2.Caption = "Cumulat", ;
		Option2.Left = 227, ;
		Option2.Name = "Option2", ;
		Option2.Top = 5
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="optiongroup" />

	ADD OBJECT 'Shape1' AS shape WITH ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		Height = 92, ;
		Left = 192, ;
		Name = "Shape1", ;
		SpecialEffect = 0, ;
		Top = 42, ;
		Width = 602, ;
		ZOrderSet = 2
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Text1' AS _textbox WITH ;
		Alignment = 1, ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.ntotplatival", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(12,gnPA)), ;
		Left = 521, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		TabIndex = 26, ;
		TabStop = .F., ;
		Top = 104, ;
		Width = 130, ;
		ZOrderSet = 14
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Text10' AS _textbox WITH ;
		Alignment = 1, ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.nsoldival", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(12,gnPA)), ;
		Left = 252, ;
		Name = "Text10", ;
		ReadOnly = .T., ;
		TabIndex = 24, ;
		TabStop = .F., ;
		Top = 104, ;
		Width = 130, ;
		ZOrderSet = 16
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Text2' AS _textbox WITH ;
		Alignment = 1, ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.nsoldfval", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(12,gnPA)), ;
		Left = 656, ;
		Name = "Text2", ;
		ReadOnly = .T., ;
		TabIndex = 29, ;
		TabStop = .F., ;
		Top = 104, ;
		Width = 130, ;
		ZOrderSet = 14
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Text3' AS _textbox WITH ;
		Alignment = 1, ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.nsoldi", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(12,gnPA)), ;
		Left = 252, ;
		Name = "Text3", ;
		ReadOnly = .T., ;
		TabIndex = 23, ;
		TabStop = .F., ;
		Top = 76, ;
		Width = 130, ;
		ZOrderSet = 16
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Text4' AS _textbox WITH ;
		Alignment = 1, ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.ntotincasari", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(12,gnPA)), ;
		Left = 387, ;
		Name = "Text4", ;
		ReadOnly = .T., ;
		TabIndex = 22, ;
		TabStop = .F., ;
		Top = 76, ;
		Width = 130, ;
		ZOrderSet = 16
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Text5' AS _textbox WITH ;
		Alignment = 1, ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.ntotplati", ;
		FontName = "Arial Narrow", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(12,gnPA)), ;
		Left = 521, ;
		Name = "Text5", ;
		ReadOnly = .T., ;
		TabIndex = 27, ;
		TabStop = .F., ;
		Top = 76, ;
		Width = 130, ;
		ZOrderSet = 14
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Text6' AS _textbox WITH ;
		Alignment = 1, ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.nsoldf", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(12,gnPA)), ;
		Left = 656, ;
		Name = "Text6", ;
		ReadOnly = .T., ;
		TabIndex = 28, ;
		TabStop = .F., ;
		Top = 76, ;
		Width = 130, ;
		ZOrderSet = 14
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Text7' AS _textbox WITH ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.ddataact1", ;
		Height = 23, ;
		Left = 387, ;
		Name = "Text7", ;
		ReadOnly = .T., ;
		SpecialEffect = 0, ;
		TabIndex = 30, ;
		TabStop = .F., ;
		Top = 33, ;
		Visible = .T., ;
		Width = 130
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Text8' AS _textbox WITH ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.ddataact2", ;
		Height = 23, ;
		Left = 521, ;
		Name = "Text8", ;
		ReadOnly = .T., ;
		SpecialEffect = 0, ;
		TabIndex = 31, ;
		TabStop = .F., ;
		Top = 33, ;
		Width = 130
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Text9' AS _textbox WITH ;
		Alignment = 1, ;
		Anchor = 9, ;
		BackColor = 255,255,255, ;
		ControlSource = "thisform.ntotincasval", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(12,gnPA)), ;
		Left = 387, ;
		Name = "Text9", ;
		ReadOnly = .T., ;
		TabIndex = 25, ;
		TabStop = .F., ;
		Top = 104, ;
		Width = 130, ;
		ZOrderSet = 16
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />
	
	PROCEDURE actualizeaza_grid1
		Lparameters tcFiltru, tcFiltru2
		
		LOCAL lntotincasari,lntotplati,lntotincasval,lntotplatival, lnSoldi, lnSoldf, lnSoldiVal, lnSoldfVal
		LOCAL lnPrecDeb, lnPrecCred, lnPrecDebval, lnPrecCredval
		
		lcFiltru = tcFiltru
		lcFiltru2 = tcFiltru2
		
		lnPrecDeb = this.nprecdebI
		lnPrecCred = this.npreccredI
		lnPrecDebval = this.nprecdebvalI
		lnPrecCredval = this.npreccredvalI
		
		
		Thisform.MousePointer = 11
		Thisform.LockScreen = .T.
		
		
		&& actualizez soldurile precedente
		If !Empty(tcFiltru2)
			If Used('crsSold')
				Use In crsSold
			Endif   
		    lcSelect = [select sum(incasari) as precdeb, sum(plati) as preccred, ] + ;
		    [sum(incasval) as precdebval, sum(platival) as preccredval ] + ;
		    [from ] + gcS + [.vbancasa_] + Alltrim(thisform.ccont) + [ where ] + tcFiltru2 	
		    lcCursor = [crsSold]
		    lnSucces = goExecutor.oExecute(lcSelect,lcCursor)
		    IF lnSucces < 0
				aMESSAGEBOX(goExecutor.cEroare,0+16,'Eroare')
			ENDIF		    
		
		    SELECT crsSold
		    GO TOP        
		    lnPrecDeb = precdeb
		    lnPrecCred = preccred
		    lnPrecDebVal = precdebval
		    lnPrecCredVal = preccredval
		    USE IN crsSold
		ENDIF
		
		
		save_grid_tag(Thisform.grid1)
		pobancasa.ca_baza1.cfiltru=lcFiltru
		pobancasa.ca_baza1.afisare()
		restore_grid_tag(Thisform.grid1)
		
		Select casban
		Update casban Set dataireg = {} Where nrcrt = 1
		Update casban Set dataact = {} Where nrcrt = 1
		Calculate Sum(incasari),Sum(plati),Sum(incasval),Sum(platival) For !Empty(dataireg) ;
		   To lntotincasari,lntotplati,lntotincasval,lntotplatival
		GO TOP 
		
		lnsoldi = lnPrecdeb - lnprecCred 
		lnsoldival = lnPrecDebval - lnPrecCredval 
		
		lnsoldf = lnsoldi + lntotincasari - lntotplati
		lnsoldfval = lnsoldival + lntotincasval - lntotplatival
		
		WITH THIS
			.nSoldi = lnSoldi
			.nSoldf = lnSoldf
			.nTotincasari = lntotincasari
			.nTotPlati = lntotplati
			.nSoldiVal = lnSoldiVal
			.nSoldfVal = lnSoldfVal
			.nTotincasVal = lntotincasVal
			.nTotPlatiVal = lntotplatiVal	
			.nprecDeb = lnPrecDeb
			.nprecCred = lnPrecCred
			.nprecDebVal = lnPrecDebVal
			.nprecCredVal = lnPrecCredVal
		ENDWITH
		
		Thisform.text1.Refresh
		Thisform.text2.Refresh
		Thisform.text3.Refresh
		Thisform.text4.Refresh
		Thisform.text5.Refresh
		Thisform.text6.Refresh
		Thisform.text7.Refresh
		Thisform.text8.Refresh
		Thisform.text9.Refresh
		Thisform.text10.Refresh
		
		Thisform.LockScreen = .F.
		Thisform.MousePointer = 0
		
		Select casban
		Go Top
		Thisform.grid1.Refresh
	ENDPROC

	PROCEDURE butapend
		LOCAL C,lbMenu[4]
		
		
		lbMenu=""
		lbMenu[1]="\<Deblocare"
		if thisform.grid1.readonly
			lbMenu[2]="\Adaug Blanc"
			else 
			lbMenu[2]="\<Adaug Blanc"
		endif
		lbMenu[3]="\-"
		lbMenu[4]="\<Revenire"
		
		
		thisform.oMenuShortcut.ShowMenu(@lbMenu)
			
		DO CASE
			CASE BAR()=1
		*!*			DO MESAJ WITH 'Efectele modificarilor se pot vedea','la redeschiderea situatiei analitice'
				amessagebox("Efectele modificarilor se pot vedea la redeschiderea situatiei analitice!",64,"Info")
				IF THISFORM.tip='banca'	
					thisform.grid1.recordsource='bancaval'
					sele BANcaval
				ELSE
					thisform.grid1.recordsource='casaval'
					sele casaval
				endif
				thisform.grid1.DELETEMARK=.T.
				thisform.grid1.setall("DynamicBackColor", "RGB(234,252,253)", "Column")
				thisform.grid1.readonly=.f.
		*!*			DO umple_log WITH thisform.Titlufrumos1.Caption,''		
			CASE BAR()=2
				append blank
				
			CASE BAR()=4
				thisform.grid1.readonly=.T.
				thisform.grid1.recordsource='casban'
				thisform.grid1.DELETEMARK=.F.
				thisform.grid1.setall("DynamicBackColor", "RGB(255,255,255)", "Column")
				
		ENDCASE
		
		
		
		
		
	ENDPROC

	PROCEDURE butdrept
		Local laMenu[1]
		*!*	scatter memvar
		laMenu=""
		laMenu[1]="Nota contabila"
		
		Thisform.oMenuShortcut.ShowMenu(@laMenu)
		Do Case
		Case Bar()=1
			Thisform.NOTACONTAB
		Endcase
		*!*	thisform.actualizeaza_grid1()
	ENDPROC

	PROCEDURE clickdreapta
		Local lnOptiune
		THIS.AlwaysOnTop = .F.
		Select casban
		lnOptiune = xmenu("Dispozitie de " + Iif(casban.incasari<>0, "incasare", "plata") + ;
			" A4;Dispozitie de " + Iif(casban.incasari<>0, "incasare", "plata") + ' A5' + Iif(casban.incasari <> 0, ";Relistare chitanta", ""))
		If Empty(m.lnOptiune)
			Return
		Endif
		If Inlist(m.lnOptiune, 1,2)
			This.listare_dispozitie(Iif(m.lnOptiune = 1, 'A4', 'A5'))
		Else
			This.listare_chitanta()
		Endif
		
		
		THIS.AlwaysOnTop = .T.
	ENDPROC

	PROCEDURE do_cauta
		Lparameters tlDontSetFocus
		* tlDontSetFocus = .T. nu se apeleaza grid.setfocus daca este apelat do_cauta din cboBanca.valid. da eroare
		
		Local lcFiltru, lcFiltruBancasa, lcFiltruDate, lcFiltru2, lnIdBancasa
		
		lcFiltru = "2=2"
		lcFiltruBancasa = ""
		lcFiltruDate = ""
		lcFiltru2 = ""
		
		This.ddataact1 = Ctod('01/' + Alltrim(Str(gnLuna)) + '/' + Alltrim(Str(gnAn)))
		This.ddataact2 = Gomonth(This.ddataact1, 1) - 1
		
		
		With Thisform.ck_bancasa
			If .Value = 1
				lcFiltru = lcFiltru + .filtru
				lcFiltruBancasa = [1=1 ] + .filtru
			Endif
		Endwith
		
		If !Empty(Nvl(Thisform.nIdBancasa, 0) )
			Do Case
				Case cCasbanListaTemp.ord = 2 && valuta
					lcFiltruValuta = [ and numeval = '] + Alltrim(cCasbanListaTemp.numeval) + [']
					lcFiltru = m.lcFiltru  + m.lcFiltruValuta
					lcFiltruBancasa = m.lcFiltruBancasa + Iif(!Empty(m.lcFiltruBancasa), m.lcFiltruIdBancasa, [1=1 ] + m.lcFiltruValuta)
				Otherwise
					lcFiltruIdBancasa = [ and id_bancasa = ] + Alltrim(Str(Thisform.nIdBancasa))
					lcFiltru = m.lcFiltru + m.lcFiltruIdBancasa
					lcFiltruBancasa = m.lcFiltruBancasa + Iif(!Empty(m.lcFiltruBancasa), m.lcFiltruIdBancasa, [1=1 ] + m.lcFiltruIdBancasa)
			Endcase
		Endif
		
		With Thisform.ck_dataact
			If .Value = 1
				lcFiltru = lcFiltru + .filtru
				This.ddataact1 = .cvaloare1
				This.ddataact2 = .cvaloare2
				lcFiltruDate = lcFiltruDate + [ OR dataact<to_date('] + Dtos(Ctod(.cvaloare1)) + [','YYYY-MM-DD')]
			Endif
		Endwith
		
		
		
		If Len(Thisform.filtru_pretty) > 0
			filtrutext = Thisform.filtru_pretty
			If At("AND", filtrutext) = 1
				filtrutext = Right(filtrutext, Len(filtrutext) - 4)
			Endif
		
			lcFiltru = lcFiltru + " and (" + Alltrim(filtrutext) + ")"
		Endif
		
		lcFiltru = lcFiltru + gcCondSucursala
		
		Do Case
			Case !Empty(lcFiltruBancasa) And !Empty(lcFiltruDate)
				lcFiltru2 = lcFiltruBancasa + [ AND (NRCRT=1 ] + lcFiltruDate + [) ] + gcCondSucursala
			Case !Empty(lcFiltruBancasa)
		*lcFiltru2=SUBSTR(lcFiltruBancasa,1,LEN(lcFiltruBancasa)-1)+[ AND NRCRT=1)]
				lcFiltru2 = [(] + lcFiltruBancasa + [ AND NRCRT=1) ] + gcCondSucursala
			Case !Empty(lcFiltruDate)
				lcFiltru2 = [(NRCRT=1 ] + lcFiltruDate + [) ] + gcCondSucursala
			Otherwise
				lcFiltru2 = [NRCRT=1 ] + gcCondSucursala
		Endcase
		
		*!*	THISFORM.actualizeaza_grid1(lcFiltru,lcFiltru2)
		*!*	IF RECCOUNT('casban')=0
		*!*		aMESSAGEBOX("Cautarea nu a intors rezultate!",64,"Info cautare")
		*!*		THISFORM.ck_bancasa.SETFOCUS()
		*!*	ENDIF
		If (This.filtru_pretty # "none")
			Thisform.actualizeaza_grid1(lcFiltru, lcFiltru2)
			If Reccount("casban") = 0
				aMESSAGEBOX("Cautarea nu a intors rezultate!", 64, "Info cautare")
			Endif
		Endif
		
		* Recreez cursorul cBancasaLista in caz ca am importat un extras sau s-au facut modificari de alt utilizator
		creeaza_cursor_bancasalista(Thisform.ccont)
		This.cboBanca.Requery()
		
		* Completez soldul cumulat dupa fiecare operatiune, defalcat pe banci
		Select Distinct id_bancasa From casban  WHERE !EMPTY(NVL(id_bancasa,0)) Into Cursor cIdBancasaTemp
		Select cIdBancasaTemp
		Scan
			lnIdBancasa = id_bancasa
			lnSold = 0
			Select casban
			Scan For id_bancasa = m.lnIdBancasa
				lnSold = m.lnSold + incasval - platival
				Replace soldcum With m.lnSold
			Endscan && lcCursor
		Endscan && cIdbancasaTemp
		Use In (Select('cIdBancasaTemp'))
		Go Top In casban
		
		* Nu mai pun setfocus pe grid, pentru ca apelez do_cauta din cboBanca.valid() si da eroare "nu se poate apela setfocus din valid"
		If !m.tlDontSetFocus
			Thisform.grID1.SetFocus
		Endif
		
		*!*	THISFORM.but_start_criterii1.SETFOCUS
		
		
	ENDPROC

	PROCEDURE do_excel
		lcAlias = this.grid1.RecordSource 
		lcFiltru = FILTER(lcAlias)
		IF EMPTY(lcFiltru)
			lcFiltru = '.T.'
		ENDIF 
		
		lcColumnList = ''
		lcHeaderList = ''
		lcSelect = ''
		llSelect = .T.
		lcType = 'CURSOR'
		lcFrom = lcAlias
		lcWhere = lcFiltru
		lcOrder = ''
		lcOutput = 'crsExcel'
		
		get_schema_grid(this.grid1,@lcColumnList, @lcHeaderList, @lcSelect, llSelect, lcType, lcFrom, lcWhere, lcOrder, lcOutput)
		&lcSelect
		*!*	MESSAGEBOX(p3)
		IF USED(lcOutput)
			DO export_xls WITH lcOutput IN oproceduri_comune.prg
			USE IN (lcOutput)
		ENDIF 	
		
	ENDPROC

	PROCEDURE do_listare
		Thisform.AlwaysOnTop = .F.
		Local lcDispozitie, lctext, llCasa, lnXmenuRet
		
		Private pcBancasa, pcCampgrup, pcTitlu, pcTitlugrup
		Private pnSoldi, pnSoldf, pnSoldiVal, pnSoldfVal, pnPrecDeb, pnPrecCred, pnPrecDebVal, pnPrecCredVal
		pnSoldi = This.nSoldi
		pnSoldf = This.nSoldf
		pnSoldiVal = This.nSoldiVal
		pnSoldfVal = This.nSoldfVal
		pnPrecDeb = This.nPrecDeb
		pnPrecCred = This.nPrecCred
		pnPrecDebVal = This.nPrecDebVal
		pnPrecCredVal = This.nPrecCredVal
		
		If This.filtru_traducere() # ""
			lctext = " si " + This.filtru_traducere()
		Else
			lctext = ""
		Endif
		
		llCasa = 'CASA' $ Thisform.lb_titlu_alb_b121.Caption
		lcDispozitie = "Dispozitie de " + Iif(NVL(casban.incasari,0) <> 0, "incasare", "plata")
		lcDispozitieTot = ";Dispozitii de incasare/plata toata selectia"
		
		lnXmenuRet = xmenu(Iif(m.llCasa, "Listare registru;" + ;
			m.lcDispozitie + ;
			m.lcDispozitieTot + ;
			Iif(casban.incasari <> 0, ";Listare chitanta;Listare chitante toata selectia", ""), "Listare registru;"))
		Do Case
			Case m.lnXmenuRet = 1
		
				*!*	pcDataora = get_ora(2)
				If Thisform.lb_titlu_alb_b121.Caption = 'REGISTRUL DE BANCA IN VALUTA'
					Select * From casban  Order By dataact, cod Where nrcrt = 2 Into Cursor casban_ordonat Readwrite
		
					pcTitlu = 'REGISTRUL DE BANCA IN VALUTA'
					pcCampgrup = [dataact]
					pcBancasa = 'Banca: '
					pcTitlugrup = [Data actului: ]
				Else
					Select * From casban Order By dataireg, dataact, cod Where nrcrt = 2 Into Cursor casban_ordonat Readwrite
					pcTitlu = 'REGISTRUL DE CASA IN VALUTA'
					pcCampgrup = [dataireg]
					pcBancasa = 'Casa: '
					pcTitlugrup = [Data inregistrarii: ]
		
				Endif
		
				*!* 29.05.2008
				*!* daca nu am rulaje in luna vreau sa listez soldul initial = soldul final fara inregistrari
				*!* si trebuie sa pun o linie goala in tabel pt listare
				If Reccount('casban_ordonat') = 0
					Select bancasa From casban Where nrcrt = 1 Into Cursor cSolduriTemp
					Select casban_ordonat
					Append From Dbf('cSolduriTemp')
					Use In (Select('cSolduriTemp'))
				Endif
				*!* 29.05.2008 ^
		
				goExport.export2frx([casban_ordonat], [registru_casabanca_valuta_rpt1], , , , , , .T.)
				Use In casban_ordonat
			Case (m.lnXmenuRet = 2 and m.llCasa) && dispozitie plata/incasare
				This.listare_dispozitie()
			Case (m.lnXmenuRet = 3 and m.llCasa) && dispozitie plata/incasare
				This.listare_dispozitie()
			CASE (m.lnXmenuRet = 4 AND m.llCasa) && chitanta
				This.listare_chitanta()	
			CASE (m.lnXmenuRet = 5 AND m.llCasa) && toate chitantele
				This.listare_chitanta(.T.)		
		Endcase
		
		Thisform.AlwaysOnTop = .T.
		
	ENDPROC

	PROCEDURE do_modifica_defalcare
		Lparameters tnOptiune
		*!*	 nu o apelez si din ProgrammaticChange pentru ca initializez valoarea lui opt_defalcat cu glBanCasaCum, 
		*!*	cu care am apelat deja creeaza_cursor_bancasa inainte sa intru in formular
		Thisform.grid1.salveaza_grid()
		Thisform.ck_bancasa.tabela = [vbancasa_val_] + Alltrim(Thisform.ccont) + Iif(tnOptiune=1,[],[_CUM])
		creeaza_cursor_bancasa(Thisform.ccont,tnOptiune==2)
		Thisform.grid1.incarca_grid()
		Thisform.do_cauta()
	ENDPROC

	PROCEDURE do_reset
		Thisform.ck_bancasa.Value=0
		Thisform.ck_dataact.Value=0
		DODEFAULT()
	ENDPROC

	PROCEDURE do_sterge
		*!*	sele casban
		*!*	SCAT FIEL COD MEMV
		
		*!*	IF !USED('actjur')
		*!*		USE &gcdate\act IN 0 AGAIN ALIAS actjur
		*!*		SELECT actjur
		*!*	ENDIF 
		
		*!*	*!*	SELECT act.cod_fiscal,act.nume_3,act.nume_4,act.suma_2,act.suma_3,;
		*!*	*!*	ACT.COD,ACT.DATAACT,ACT.NRACT,ACT.DATAIREG,ACT.NUME,ACT.NUME_2,ACT.EXPLICATIA,;
		*!*	*!*	ACT.SCC,ACT.SCD,ACT.FDOC,ACT.SUMA,act.pereche,act.datascad,act.nume_5,act.util,act.utils,act.dataora,act.dataoras,;
		*!*	*!*	act.nresp,act.dst_chlt,act.nrord;
		*!*	*!*	FROM ACT;
		*!*	*!*	where deleted();
		*!*	*!*	INTO CURSOR ACTACTAN order by dataireg
		
		*!*	*!*	OJ=CREA('AFISJUR')
		*!*	*!*	OJ.stergere
		*!*	*!*	OJ.RELEASE
		
		*!*	lncod=m.cod
		*!*	STERGE_DIN_FISIERE(.t.,lnCod)
		
		*!*	IF USED('actactan')
		*!*		USE IN actactan
		*!*	ENDIF 
		*!*	IF USED('actjur')
		*!*		USE IN actjur
		*!*	ENDIF 
		
		*!*	IF buton=2
		*!*		RETURN
		*!*	ENDIF 
		
		*!*	DO save_grid WITH thisform.Grid1
		
		*!*	sele casa
		*!*	loca for cod=-1
		*!*	if !found()
		*!*		appe blan
		*!*		repl cod with -1
		*!*	endif
		*!*	repl scc with ''
		*!*	repl scd with ''
		
		*!*	*!*	select BAL
		*!*	*!*	loca for left(cont,4)='5311'
		*!*	*!*	SCATTER MEMVAR
		
		*!*	IF USED('AAA')
		*!*		USE IN AAA
		*!*	ENDIF 
		
		*!*	SELECT COD,DATAIREG,casa,INCASARI,PLATI,SCD,SCC,ALLTRIM(STR(COD))+ALLTRIM(casa) as zz FROM casa INTO CURSOR aaa order by dataireg
		
		*!*	SELECT aaa
		*!*	TOTAL TO &loc\&nfscurt\tempo\tb ON zz fields incasari,plati	
		
		*!*	USE &loc\&nfscurt\tempo\tb IN 0 ALIAS tb
		*!*	SELECT tb
		
		*!*	SELECT DISTINCT t.*,a.fdoc,a.dataact,a.nract,a.NUME from tb t LEFT JOIN act a ON t.cod=a.cod ;
		*!*	where inlist('5311',a.scc,a.scd) or t.cod=-1 ;
		*!*	INTO CURSOR casban
		*!*	USE IN tb	
		*!*		
		*!*	sele casban 
		*!*	INDEX ON CASA+STR(DAY(DATAIREG)) TAG CASADATA OF &LOC\&NFSCURT\TEMPO\CASBAN
		*!*	INDEX ON DATAireg TAG DATAireg OF &LOC\&NFSCURT\TEMPO\CASBAN
		
		
		*!*	DO restore_grid WITH thisform.Grid1
		
		*!*	*DO MESAJ WITH 'Modificarile vor fi vizibile','dupa redeschiderea Reg. de Casa'
	ENDPROC

	PROCEDURE do_termin
		THIS.BUT_STArt_criterii1.RESETstatus()
		DODEFAULT()
	ENDPROC

	PROCEDURE Init
		LPARAMETERS tcCont, tlArataInregOperator, tlAfisareTot
		* tlAfisareTot = .T. daca se afiseaza toate inregistrarile la intrarea in formular
		*!*	tlArataInregOperator - .T. se arata doar inregistrarile operatorului
		
		thisform.lArataInregOperator = tlArataInregOperator
		This.lAfisareTot = m.tlAfisareTot
		
		Thisform.ccont = Alltrim(tcCont)
		Thisform.ck_BANCASA.tabela = [vbancasa_] + Alltrim(tcCont)
		
		If Inlist(Thisform.ccont, '5314','5124')
			Thisform.opt_defalcat.Visible = .T.
			Thisform.opt_defalcat.Value = IIF(glBanCasaCum,2,1)
		Endif
		
		Private pcbanca,pccec,pccasa,pnincasari,pnplati,pndifrul,pntdif,pnsuma1,pnincasarival,pnplatival,pndifrulval,pntdifval
		Store 0 To pnincasari,pnplati,pndifrul,pntdif,pnsuma1,pnincasarival,pnplatival,pndifrulval,pntdifval
		
		Store "" To pcbanca,pccec,pccasa
		
		* Afisez toate inregistrarile cand intru pentru banca/casa. Sunt putine
		IF this.lAfisareTot
			This.do_reset() && afisarea tuturor inregistrarilor
		ENDIF 
		
		Thisform.WindowState=2
		DoDefault()
		
	ENDPROC

	PROCEDURE listare_chitanta
		LPARAMETERS tlToataSelectia
		* tlToataSelectia: .T. = se listeaza chitante pentru toata selectia, .F. se listeaza doar chitanta de pe inregistrarea curenta
		Local lcCursor, lcConditie, lnCod, lnRecno
		
		lcCursor = Thisform.grid1.RecordSource
		Select (lcCursor)
		lnCod = cod
		lnRecno = RECNO()
		lcConditie = IIF(m.tlToataSelectia, [incasari<>0], [cod = ] + ALLTRIM(STR(m.lnCod)))
		llSilent = .F.
		IF m.tlToataSelectia
			llSilent = (AMESSAGEBOX('Listare silentioasa la imprimanta implicita (Da) sau previzualizati fiecare chitanta (Nu)?',4+32,_Screen.Caption) = 6) && listare silentioasa cand se listeaza toata selectia
		ENDIF 
		If Reccount(lcCursor) > 0
			Select (lcCursor)
			SCAN FOR &lcConditie
				lnCod = &lcCursor..cod
				lnNract = nract
				WAIT WINDOW 'Relistare chitanta ' + ALLTRIM(STR(m.lnNract)) NOWAIT 
				relisteaza_chitanta(m.lnCod, m.llSilent)
			ENDSCAN 	
			SELECT (m.lcCursor)
			TRY 
				GOTO m.lnRecno
			CATCH 
				GO TOP IN (m.lcCursor)
			ENDTRY 	
		Endif 
	ENDPROC

	PROCEDURE listare_dispozitie
		Lparameters tcPagina, tlToataSelectia
		*** tcPagina: A4/A5
		
		Local lcPagina, lcSelect
		Local lcConditie, lcExplicatia, lcRegComert, lnCod, lnRecno
		Private pcSerie, pcNumar, pcFunctie, pcSumaLitere, pnSuma, pdDataact, pnNrAct, pcNumeValuta
		Private pcExplic, pcExplic2, pcExplicatie, pcNume, pcScop, pcTip
		*:Global gnButon
		Store '' To m.pcSerie, m.pcNumar, m.pcFunctie, m.pcSumaLitere, m.pcExplic, m.pcExplic2, m.pcExplicatie, m.pcNume, m.pcScop, m.pcTip
		Store 0 To m.pnSuma, m.pnNrAct
		Store {} To m.pdDataact
		m.lcSelect = Select()
		
		m.lcPagina = Iif(!Empty(m.tcPagina), Upper(Transform(m.tcPagina)), 'A4')
		
		Select casban
		lnRecno = Recno()
		lnCod = cod
		lcConditie = Iif(m.tlToataSelectia, [.T.], [cod = ] + Alltrim(Str(m.lnCod)))
		Scan For &lcConditie
			m.pcExplicatie = 'Responsabil'
			m.pcScop = ''
			m.pcNume = Alltrim(Nvl(nume, ''))
			m.pdDataact = Nvl(dataact, {})
			m.pnNrAct = Nvl(nract, 0)
			lcExplicatia = Alltrim(explicatia)
			m.pcNumeValuta = Alltrim(Nvl(numeval,''))
			lcRegComert = Alltrim(Nvl(reg_comert, ''))
		* Primele caractere sunt seria, cifrele sunt numarul cartii de identitate
			Do While .T.
				If Isalpha(m.lcRegComert)
					m.pcSerie = m.pcSerie + Left(m.lcRegComert,1)
					m.lcRegComert = Substr(m.lcRegComert,2)
				Else
					m.pcNumar = m.lcRegComert
					Exit
				Endif
			Enddo && .T.
		
		
			If (casban.incasval <> 0)
				m.pnSuma = incasval
				m.pcTip = 'INCASARE'
				m.pcExplic = 'incasarii'
				m.pcExplic2 = 'Incasat'
			Else
				m.pnSuma = platival
				m.pcTip = 'PLATA'
				m.pcExplic = 'platii'
				m.pcExplic2 = 'Platit'
			Endif
		
			m.pcSumaLitere = suma_in_vorbe(m.pnSuma, pcNumeValuta)
		
			gnButon = 1
			If !Pemstatus(This, 'cScop', 5)
				AddProperty(This, 'cScop', pcScop)
				AddProperty(This, 'cFunctie', pcFunctie)
		*!*		ADDPROPERTY(This, 'cSerie', pcSerie)
		*!*		ADDPROPERTY(This, 'cNumar', pcNumar)
			Endif
			pcScop = Iif(!Empty(m.lcExplicatia), m.lcExplicatia, This.cScop)
			pcFunctie = This.cFunctie
		*!*	pcSerie = This.cSerie
		*!*	pcNumar = This.cNumar
		
			Do Form datedisp542
		
			This.cScop = pcScop
			This.cFunctie = pcFunctie
		*!*	This.cSerie = pcSerie
		*!*	This.cNumar = pcNumar
		
			If gnButon = 1
				Select casban
		
				Create Cursor crscasban  (nract N(20), suma N(16, 2), dataact d)
				Select crscasban
				Append Blank
				Replace suma With m.pnSuma, nract With m.pnNrAct, dataact With m.pdDataact
		
		
				Thisform.AlwaysOnTop = .F.
		*		goExport.export2frx([crscasban], Iif(m.lcPagina = 'A4', [dispozitie542], [dispozitie542_a5]))
				goExport.export2frx([crscasban],  Iif(m.lcPagina = 'A4', [dispozitie542], [dispozitie542_a5]), .F., , , , , .T., , )			
				Thisform.AlwaysOnTop = .T.
			Endif
		
			Use In (Select('crscasban'))
		Endscan && casaban
		Release m.pcSerie, m.pcNumar, m.pcFunctie, m.pcSumaLitere, m.pnSuma, m.pdDataact, m.pnNrAct
		
		Select (m.lcSelect)
		 
	ENDPROC

	PROCEDURE notacontab
		Private pcselect,pcfiltru,pcschema,pcorder,llAfisare,poact,pcnume
		Store "" To poact,pcnume
		Store .F. To llAfisare
		Select casban
		pcnume = NVL(nume, '')
		pcschema=['ID_ACT N(20),LUNA N(2),AN N(4),COD N(20),DATAIREG D,nract N(20),DATAACT D,'+]+;
			['EXPLICATIA C(100),SCD C(4),ASCD C(4),SCC C(4),ASCC C(4),SUMA N(19,2),PERECHED N(14),'+]+;
			['PERECHEC N(14),SUMA_VAL N(19,2),NUME_VAL C(5),CURS N(8,2),DATASCAD D,NEIMPOZAB N(19,2),'+]+;
			['NNIR N(10),ID_UTIL N(5),UTIL C(30),DATAORA T,ID_UTILS N(5),UTILS C(30),DATAORAS T,'+]+;
			['ID_RESPONSABIL N(5),NRESP C(30),ID_VENCHELT N(5),DST_CHLT C(100),ID_LUCRARE N(5),NRORD C(30),ID_SECTIE N(5),'+]+;
			['SECTIE C(30),PROC_TVA N(5,2),ID_SET N(20),ID_FACT N(20),ID_PARTD N(10),PARTD C(50),ID_PARTC N(10),'+]+;
			['PARTC C(50),ID_SUCURSALA N(5),SUCURSALA C(50),ID_FDOC N(5),FDOC C(30),'+]+;
			['EXPLICATIA4 C(100),EXPLICATIA5 C(100),ID_GESTD N(5),GESTD C(50),ID_GESTC N(5),GESTC C(50)']
		pcschema=['']
		pcselect=['select * from ]+gcS+[.vact where 2=2']
		pcfiltru=[luna=]+Alltrim(Str(gnLuna))+[ and an=]+Alltrim(Str(gnAn))+;
			[ and cod=]+Alltrim(Str(cod))
		pcorder=[dataact,serie_act,nract]
		gencursor("poact","acn1",pcselect,pcfiltru,pcschema,pcorder,llAfisare)
		poact.ca_baza1.afisare()
		
		Thisform.but_termin1.Enabled=.F.
		Select acn1
		Do nrord With "ACN1"
		GO TOP 
		*!*	ORC=Createobj("AFDEBCRED")
		*!*	ORC.LABELTITLU.Caption="NOTA CONTABILA"
		*!*	ORC.ali = 'act'
		*!*	ORC.Show(1)
		Thisform.AlwaysOnTop = .F.
		ORC=Createobj("frm_debcred")
		ORC.Lb_titlu_alb_b121.Caption="Nota contabila "+Alltrim(pcnume)
		ORC.lb_titlu1.Caption="NOTA CONTABILA"
		ORC._grdbase1.RemoveObject("cUtil")
		ORC._grdbase1.RemoveObject("cDataOra")
		ORC.Show(1)
		Thisform.but_termin1.Enabled=.T.
		Thisform.AlwaysOnTop = .T.
		Use In (SELECT('acn1'))
		Release ORC,poact
		*Thisform.actualizeaza_grid1()
	ENDPROC

	PROCEDURE But_reset_criterii1.Click
		thisform.nIdBancasa = 0
		DODEFAULT()
	ENDPROC

	PROCEDURE But_start_criterii1.loadcriterii
		PARAMETERS tacriterii
		EXTERNAL ARRAY tacriterii
		#define crlf CHR(13)+CHR(10)
		*!*	lcStringCriterii= thisform.ck_bancasa.Caption + "\" + thisform.ck_bancasa.camp_nume
		*!*	lcstringcriterii=lcstringcriterii + "\T\none\"			 		+ crlf + ; 
		*!*					  "Nr. act\nract\N\none\"   					+ crlf + ;
		*!*					  "Data act\dataact\D\none\"					+ crlf + ;
		*!*					  "Data inregistrarii\dataireg\D\none\"			+ crlf + ;
		*!*					  "Fel document\fdoc\T\none\" 			+ crlf + ;
		*!*					  "Lucrare\nrord\T\none\" 				+ crlf + ;
		*!*					  "Explicatia\nume\T\none\" 			+ crlf + ;			
		*!*	  				  "Incasari\incasari\N\none\" 			+ crlf + ;			
		*!*	  				  "Plati\plati\N\none\" 				+ crlf + ;	
		*!*					  "Cont debitor\scd\T\none\" 					+ crlf + ;	
		*!*					  "Cont creditor\scc\T\none\" 					+ crlf + ;				  
		*!*	  				  "Responsabil\nresp\T\none\"				  
		lcstringcriterii= "Nr. act\nract\N\none\"   			+ crlf + ;
						  "Fel document\fdoc\T\ID_FDOC\nom_feldoc" 			+ crlf + ;
						  "Lucrare\nrord\T\ID_LUCRARE\nom_lucrare" 				+ crlf + ;
						  "Explicatia\nume\T\none\"		+ crlf + ;			
		  				  "Incasari\incasari\N\none\" 			+ crlf + ;			
		  				  "Incasari valuta\incasval\N\none\" 	+ crlf + ;			  				  
		  				  "Plati\plati\N\none\" 				+ crlf + ;	
		  				  "Plati valuta\platival\N\none\" 		+ crlf + ;	 				  
						  "Cont debitor\scd\T\none\" 			+ crlf + ;	
						  "Analitic debitor\ascd\T\none\" 		+ crlf + ;	
						  "Cont creditor\scc\T\none\" 			+ crlf + ;	
						  "Analitic creditor\ascc\T\none\"		+ crlf + ;				  
						  "Valuta\numeval\T\id_valuta\nom_valute" 	+ crlf + ; 
		  				  "Responsabil\nresp\T\ID_RESPONSABIL\nom_parenteri" + ;
		  				  Iif(glEMama,crlf+"Sucursala\sucursala\T\none","")  				  		  
		DODEFAULT()
	ENDPROC

	PROCEDURE cboBanca.DropDown
		This.FontName= "Courier New"
		
	ENDPROC

	PROCEDURE cboBanca.Init
		DODEFAULT()
		IF USED('cCasbanListaTemp')
			GO TOP IN cCasbanListaTemp
			thisform.nIdBancasa = cCasbanListaTemp.id_bancasa
		ENDIF 
	ENDPROC

	PROCEDURE cboBanca.Valid
		* cand deschid lista, pun Courier New ca sa fie aliniate soldurile la dreapta
		* cand inchid lista pe valid, pun la loc Arial
		This.FontName = "Arial"
		Thisform.do_cauta(.T.)
	ENDPROC

	PROCEDURE Ck_bancasa.InteractiveChange
		LOCAL lcCont, lcTitlu, llToateIreg, loCauta
		
		WITH THIS
			.filtru = ""
			.filtru_vfp = ""
			IF .VALUE = 0
				RETURN
			ENDIF
		ENDWITH
		
		lcCont = THISFORM.nrcont
		lcTitlu = THISFORM.lb_titlu_alb_b121.CAPTION
		llToateIreg = .F.
		
		loCauta = caut_parteneri( lcCont , lcTitlu, llToateIreg)
		lcNume = ALLTRIM(loCauta.denumire)
		lnIdPart = loCauta.id_part
		WITH THIS
			IF !EMPTY(lcNume) AND !EMPTY(lnIdPart)
				.cvaloare1 = lcNume
				*.filtru = [ AND UPPER(SUBSTR(]+ALLTRIM(.camp_nume)+[,1,]+ALLTRIM(STR(LEN(.cvaloare1)))+[))=']+.cvaloare1+[']
				.filtru = [ AND id_bancasa = ] + ALLTRIM(STR(lnIdPart))
				.filtru_vfp = [ AND id_bancasa = ] + ALLTRIM(STR(lnIdPart))
				.cTraducere = this.caption + " este " + ALLTRIM(NVL(.cvaloare1,""))
			ELSE
				.cvaloare1 = ""
				.filtru = ""
				.VALUE = 0
				.cTraducere = ""
			ENDIF
		
			IF THIS.VALUE = 0
				.cvaloare1 = ""
				.filtru = ""
				.VALUE = 0
				.cTraducere = ""
			ENDIF
		
		ENDWITH
		
		thisform.do_cauta()
		thisform.but_start_criterii1.refreshstatus()
		
	ENDPROC

	PROCEDURE Ck_dataact.InteractiveChange
		DODEFAULT()
		thisform.do_cauta()
		thisform.but_start_criterii1.refreshstatus()
	ENDPROC

	PROCEDURE Grid1.cbancasa.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cbancasa.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE Grid1.cCurs.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cCurs.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.cDataact.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cDataact.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE Grid1.cDataIreg.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cExplicatia.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cExplicatia.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE Grid1.cFdoc.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cFdoc.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE Grid1.cIncasari.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cIncasari.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE Grid1.cIncasVal.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cIncasVal.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.cNract.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cNract.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE Grid1.cNresp.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cNrord.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cNumeVal.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.Column13.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.Column13.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.cPereche.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cPlati.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cPlati.Text1.RightClick
		thisform.clickdreapta()
	ENDPROC

	PROCEDURE Grid1.cPlatiVal.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cPlatiVal.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.cScc.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cScc.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.cScd.Text1.DblClick
		If nrcrt=2
			Thisform.butdrept()
		Endif
	ENDPROC

	PROCEDURE Grid1.cScd.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE opt_defalcat.InteractiveChange
		Thisform.do_modifica_defalcare(This.Value)
	ENDPROC

	PROCEDURE Text1.Refresh
		*THIS.FORECOLOR=IIF(TPLATI>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE Text10.Refresh
		*THIS.FORECOLOR=IIF(TINCASARI>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE Text2.Refresh
		*THIS.FORECOLOR=IIF(TINCASARI-TPLATI>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE Text3.Refresh
		*THIS.FORECOLOR=IIF(TINCASARI>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE Text4.Refresh
		*THIS.FORECOLOR=IIF(TINCASARI>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE Text5.Refresh
		*THIS.FORECOLOR=IIF(TPLATI>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE Text6.Refresh
		*THIS.FORECOLOR=IIF(TINCASARI-TPLATI>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE Text7.GotFocus
		*!*	IF bdataact==.F. THEN
		*!*		m.dataact1=""
		*!*	ENDIF
		*!*	THIS.REFRESH
	ENDPROC

	PROCEDURE Text8.GotFocus
		*!*	if bdataact==.f. then
		*!*		m.dataact2=""
		*!*		endif
		*!*	this.refresh
	ENDPROC

	PROCEDURE Text9.Refresh
		*THIS.FORECOLOR=IIF(TINCASARI>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

ENDDEFINE

DEFINE CLASS verificare AS formtermin OF "baza.vcx" 		&& La stergerea setului de note contabile din registrul jurnal.
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Precedent1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Blocbuton1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Blocbuton1.Da1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Blocbuton1.Nu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column2.Header2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column3.Header3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column4.Header4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column5.Header5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column6.Header6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column7.Header7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column7.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column8.Header8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column8.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column9.Header9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column9.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column10.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column10.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column11.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column11.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column12.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column12.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column13.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column13.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column14.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column14.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column16.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column16.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column17.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column17.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column18.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column18.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column19.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column19.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column20.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column20.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column21.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column21.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column22.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column22.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column23.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column23.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column24.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column24.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column25.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column25.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column26.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column26.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column27.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column27.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column28.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column28.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column29.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column29.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column30.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column30.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column31.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column31.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column32.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column32.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column33.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column33.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column15.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column15.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column34.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column34.Text1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: aleg_ascc
		*m: aleg_ascd
		*m: verif_ascc
		*m: verif_ascd
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		DataSession = 1
		DoCreate = .T.
		Height = 329
		Name = "verificare"
		Width = 666
		SHAPE1.Height = 36
		SHAPE1.Left = 0
		SHAPE1.Name = "SHAPE1"
		SHAPE1.Top = 0
		SHAPE1.Width = 668
		TERMINAT1.COMMAND1.Name = "COMMAND1"
		TERMINAT1.IMBUTON1.Height = 27
		TERMINAT1.IMBUTON1.Name = "IMBUTON1"
		TERMINAT1.IMBUTON1.Width = 30
		TERMINAT1.Left = 634
		TERMINAT1.Name = "TERMINAT1"
		TERMINAT1.Top = 2
		TERMINAT1.Visible = .F.
		TITLUFRUMOS1.Caption = "STERGETI SETUL DE NOTE CONTABILE ?"
		TITLUFRUMOS1.Height = 27
		TITLUFRUMOS1.Left = 7
		TITLUFRUMOS1.Name = "TITLUFRUMOS1"
		TITLUFRUMOS1.Top = 5
		TITLUFRUMOS1.Width = 364
	*</PropValue>

	ADD OBJECT 'Blocbuton1' AS blocbuton WITH ;
		Height = 37, ;
		Left = 559, ;
		Name = "Blocbuton1", ;
		Top = -1, ;
		Visible = .T., ;
		Width = 110
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Blocbuton1.Da1' AS da WITH ;
		Left = 55, ;
		Name = "Da1", ;
		Top = 4, ;
		Imbuton1.Height = 27, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 51, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Blocbuton1.Nu1' AS nu WITH ;
		Left = 4, ;
		Name = "Nu1", ;
		Top = 4, ;
		Imbuton1.Height = 27, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 51, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Grid1' AS grid WITH ;
		BackColor = 255,255,255, ;
		ColumnCount = 34, ;
		DeleteMark = .F., ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		GridLineColor = 192,192,192, ;
		GridLines = 3, ;
		Height = 294, ;
		Left = 0, ;
		Name = "Grid1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "ACTACTAN", ;
		RowHeight = 20, ;
		TabIndex = 5, ;
		Top = 35, ;
		Width = 667, ;
		ZOrderSet = 5, ;
		Column1.Alignment = 1, ;
		Column1.BackColor = 255,255,255, ;
		Column1.ControlSource = "NRCRT()", ;
		Column1.FontCharSet = 238, ;
		Column1.FontName = "Segoe UI", ;
		Column1.FontSize = 10, ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 42, ;
		Column2.Alignment = 0, ;
		Column2.BackColor = 255,255,255, ;
		Column2.ColumnOrder = 3, ;
		Column2.ControlSource = "DATAIREG", ;
		Column2.FontCharSet = 238, ;
		Column2.FontName = "Segoe UI", ;
		Column2.FontSize = 10, ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 99, ;
		Column3.Alignment = 0, ;
		Column3.BackColor = 255,255,255, ;
		Column3.ColumnOrder = 2, ;
		Column3.ControlSource = "FDOC", ;
		Column3.FontCharSet = 238, ;
		Column3.FontName = "Segoe UI", ;
		Column3.FontSize = 10, ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 109, ;
		Column4.Alignment = 0, ;
		Column4.BackColor = 255,255,255, ;
		Column4.ColumnOrder = 4, ;
		Column4.ControlSource = "DATAACT", ;
		Column4.FontCharSet = 238, ;
		Column4.FontName = "Segoe UI", ;
		Column4.FontSize = 10, ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 99, ;
		Column5.Alignment = 1, ;
		Column5.BackColor = 255,255,255, ;
		Column5.ColumnOrder = 5, ;
		Column5.ControlSource = "NRACT", ;
		Column5.FontCharSet = 238, ;
		Column5.FontName = "Segoe UI", ;
		Column5.FontSize = 10, ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T., ;
		Column5.Width = 85, ;
		Column6.Alignment = 0, ;
		Column6.BackColor = 255,255,255, ;
		Column6.ColumnOrder = 11, ;
		Column6.ControlSource = "partd", ;
		Column6.FontCharSet = 238, ;
		Column6.FontName = "Segoe UI", ;
		Column6.FontSize = 10, ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .T., ;
		Column6.Width = 143, ;
		Column7.Alignment = 1, ;
		Column7.BackColor = 255,255,255, ;
		Column7.ColumnOrder = 6, ;
		Column7.ControlSource = "SCD", ;
		Column7.DynamicForeColor = "rgb(0,0,128)", ;
		Column7.FontBold = .F., ;
		Column7.FontCharSet = 238, ;
		Column7.FontName = "Segoe UI", ;
		Column7.FontSize = 10, ;
		Column7.ForeColor = 0,0,128, ;
		Column7.Name = "Column7", ;
		Column7.ReadOnly = .T., ;
		Column7.Width = 68, ;
		Column8.Alignment = 1, ;
		Column8.BackColor = 255,255,255, ;
		Column8.ColumnOrder = 8, ;
		Column8.ControlSource = "SCC", ;
		Column8.DynamicForeColor = "rgb(0,0,128)", ;
		Column8.FontBold = .F., ;
		Column8.FontCharSet = 238, ;
		Column8.FontName = "Segoe UI", ;
		Column8.FontSize = 10, ;
		Column8.Name = "Column8", ;
		Column8.ReadOnly = .T., ;
		Column8.Width = 71, ;
		Column9.Alignment = 1, ;
		Column9.BackColor = 255,255,255, ;
		Column9.ColumnOrder = 10, ;
		Column9.ControlSource = "SUMA", ;
		Column9.DynamicForeColor = "IIF(SUMA>=0, RGB(0,0,0), RGB(255,0,0))", ;
		Column9.FontBold = .F., ;
		Column9.FontCharSet = 238, ;
		Column9.FontName = "Segoe UI", ;
		Column9.FontSize = 10, ;
		Column9.Format = "r", ;
		Column9.InputMask = (get_mask(12,gnPa)), ;
		Column9.Name = "Column9", ;
		Column9.ReadOnly = .T., ;
		Column9.Width = 114, ;
		Column10.Alignment = 0, ;
		Column10.BackColor = 255,255,255, ;
		Column10.ColumnOrder = 12, ;
		Column10.ControlSource = "partc", ;
		Column10.FontCharSet = 238, ;
		Column10.FontName = "Segoe UI", ;
		Column10.FontSize = 10, ;
		Column10.Name = "Column10", ;
		Column10.ReadOnly = .T., ;
		Column10.Width = 142, ;
		Column11.Alignment = 0, ;
		Column11.BackColor = 255,255,255, ;
		Column11.ColumnOrder = 13, ;
		Column11.ControlSource = "EXPLICATIA", ;
		Column11.FontCharSet = 238, ;
		Column11.FontName = "Segoe UI", ;
		Column11.FontSize = 10, ;
		Column11.Name = "Column11", ;
		Column11.ReadOnly = .T., ;
		Column11.Width = 95, ;
		Column12.BackColor = 255,255,255, ;
		Column12.ColumnOrder = 29, ;
		Column12.ControlSource = "COD", ;
		Column12.FontCharSet = 238, ;
		Column12.FontName = "Segoe UI", ;
		Column12.FontSize = 10, ;
		Column12.Name = "Column12", ;
		Column12.ReadOnly = .T., ;
		Column12.Width = 93, ;
		Column13.BackColor = 255,255,255, ;
		Column13.ColumnOrder = 17, ;
		Column13.ControlSource = "pereched", ;
		Column13.FontCharSet = 238, ;
		Column13.FontName = "Segoe UI", ;
		Column13.FontSize = 10, ;
		Column13.Name = "Column13", ;
		Column13.ReadOnly = .T., ;
		Column13.Width = 95, ;
		Column14.BackColor = 255,255,255, ;
		Column14.ColumnOrder = 20, ;
		Column14.ControlSource = "explicatia4", ;
		Column14.FontCharSet = 238, ;
		Column14.FontName = "Segoe UI", ;
		Column14.FontSize = 10, ;
		Column14.Name = "Column14", ;
		Column14.ReadOnly = .T., ;
		Column14.Width = 132, ;
		Column15.BackColor = 255,255,255, ;
		Column15.ColumnOrder = 22, ;
		Column15.ControlSource = "suma_val", ;
		Column15.FontCharSet = 238, ;
		Column15.FontName = "Segoe UI", ;
		Column15.FontSize = 10, ;
		Column15.Format = "r", ;
		Column15.InputMask = (get_mask(12,gnPval)), ;
		Column15.Name = "Column16", ;
		Column15.ReadOnly = .T., ;
		Column16.BackColor = 255,255,255, ;
		Column16.ColumnOrder = 23, ;
		Column16.ControlSource = "curs", ;
		Column16.FontCharSet = 238, ;
		Column16.FontName = "Segoe UI", ;
		Column16.FontSize = 10, ;
		Column16.Format = "r", ;
		Column16.InputMask = (get_mask(12,gnPcurs)), ;
		Column16.Name = "Column17", ;
		Column16.ReadOnly = .T., ;
		Column17.BackColor = 255,255,255, ;
		Column17.ColumnOrder = 28, ;
		Column17.ControlSource = "proc_tva", ;
		Column17.FontCharSet = 238, ;
		Column17.FontName = "Segoe UI", ;
		Column17.FontSize = 10, ;
		Column17.InputMask = "999.99", ;
		Column17.Name = "Column18", ;
		Column17.ReadOnly = .T., ;
		Column17.Width = 86, ;
		Column18.BackColor = 255,255,255, ;
		Column18.ColumnOrder = 19, ;
		Column18.ControlSource = "datascad", ;
		Column18.FontCharSet = 238, ;
		Column18.FontName = "Segoe UI", ;
		Column18.FontSize = 10, ;
		Column18.Name = "Column19", ;
		Column18.ReadOnly = .T., ;
		Column18.Visible = .T., ;
		Column18.Width = 100, ;
		Column19.BackColor = 255,255,255, ;
		Column19.ColumnOrder = 21, ;
		Column19.ControlSource = "explicatia5", ;
		Column19.FontCharSet = 238, ;
		Column19.FontName = "Segoe UI", ;
		Column19.FontSize = 10, ;
		Column19.Name = "Column20", ;
		Column19.ReadOnly = .T., ;
		Column19.Width = 128, ;
		Column20.BackColor = 255,255,255, ;
		Column20.ColumnOrder = 31, ;
		Column20.ControlSource = "util", ;
		Column20.FontCharSet = 238, ;
		Column20.FontName = "Segoe UI", ;
		Column20.FontSize = 10, ;
		Column20.Name = "Column21", ;
		Column20.ReadOnly = .T., ;
		Column20.Width = 129, ;
		Column21.BackColor = 255,255,255, ;
		Column21.ColumnOrder = 32, ;
		Column21.ControlSource = "dataora", ;
		Column21.FontCharSet = 238, ;
		Column21.FontName = "Segoe UI", ;
		Column21.FontSize = 10, ;
		Column21.Name = "Column22", ;
		Column21.ReadOnly = .T., ;
		Column21.Width = 131, ;
		Column22.BackColor = 255,255,255, ;
		Column22.ColumnOrder = 33, ;
		Column22.ControlSource = "utils", ;
		Column22.FontCharSet = 238, ;
		Column22.FontName = "Segoe UI", ;
		Column22.FontSize = 10, ;
		Column22.Name = "Column23", ;
		Column22.ReadOnly = .T., ;
		Column22.Width = 111, ;
		Column23.BackColor = 255,255,255, ;
		Column23.ColumnOrder = 34, ;
		Column23.ControlSource = "dataoras", ;
		Column23.FontCharSet = 238, ;
		Column23.FontName = "Segoe UI", ;
		Column23.FontSize = 10, ;
		Column23.Name = "Column24", ;
		Column23.ReadOnly = .T., ;
		Column23.Width = 113, ;
		Column24.BackColor = 255,255,255, ;
		Column24.ColumnOrder = 25, ;
		Column24.ControlSource = "nresp", ;
		Column24.FontCharSet = 238, ;
		Column24.FontName = "Segoe UI", ;
		Column24.FontSize = 10, ;
		Column24.Name = "Column25", ;
		Column24.ReadOnly = .T., ;
		Column24.Width = 120, ;
		Column25.BackColor = 255,255,255, ;
		Column25.ColumnOrder = 26, ;
		Column25.ControlSource = "dst_chlt", ;
		Column25.FontCharSet = 238, ;
		Column25.FontName = "Segoe UI", ;
		Column25.FontSize = 10, ;
		Column25.Name = "Column26", ;
		Column25.ReadOnly = .T., ;
		Column26.BackColor = 255,255,255, ;
		Column26.ColumnOrder = 14, ;
		Column26.ControlSource = "nrord", ;
		Column26.FontCharSet = 238, ;
		Column26.FontName = "Segoe UI", ;
		Column26.FontSize = 10, ;
		Column26.Name = "Column27", ;
		Column26.ReadOnly = .T., ;
		Column26.Width = 119, ;
		Column27.BackColor = 255,255,255, ;
		Column27.ColumnOrder = 16, ;
		Column27.ControlSource = "nnir", ;
		Column27.FontCharSet = 238, ;
		Column27.FontName = "Segoe UI", ;
		Column27.FontSize = 10, ;
		Column27.Name = "Column28", ;
		Column27.ReadOnly = .T., ;
		Column27.Width = 107, ;
		Column28.BackColor = 255,255,255, ;
		Column28.ColumnOrder = 27, ;
		Column28.ControlSource = "sectie", ;
		Column28.FontCharSet = 238, ;
		Column28.FontName = "Segoe UI", ;
		Column28.FontSize = 10, ;
		Column28.Name = "Column29", ;
		Column28.ReadOnly = .T., ;
		Column28.Width = 113, ;
		Column29.BackColor = 255,255,255, ;
		Column29.ColumnOrder = 24, ;
		Column29.ControlSource = "neimpozab", ;
		Column29.FontCharSet = 238, ;
		Column29.FontName = "Segoe UI", ;
		Column29.FontSize = 10, ;
		Column29.InputMask = (get_mask(12,gnPa)), ;
		Column29.Name = "Column30", ;
		Column29.ReadOnly = .T., ;
		Column29.Width = 90, ;
		Column30.BackColor = 242,255,255, ;
		Column30.ColumnOrder = 7, ;
		Column30.ControlSource = "ascd", ;
		Column30.DynamicBackColor = "rgb(242,255,255)", ;
		Column30.FontCharSet = 238, ;
		Column30.FontName = "Segoe UI", ;
		Column30.FontSize = 10, ;
		Column30.Format = "r", ;
		Column30.InputMask = "xxxx", ;
		Column30.Name = "Column31", ;
		Column30.ReadOnly = .T., ;
		Column30.Width = 59, ;
		Column31.BackColor = 242,255,255, ;
		Column31.ColumnOrder = 9, ;
		Column31.ControlSource = "ascc", ;
		Column31.DynamicBackColor = "rgb(242,255,255)", ;
		Column31.FontCharSet = 238, ;
		Column31.FontName = "Segoe UI", ;
		Column31.FontSize = 10, ;
		Column31.Format = "r", ;
		Column31.InputMask = "xxxx", ;
		Column31.Name = "Column32", ;
		Column31.ReadOnly = .T., ;
		Column31.Width = 55, ;
		Column32.BackColor = 255,255,255, ;
		Column32.ColumnOrder = 18, ;
		Column32.ControlSource = "perechec", ;
		Column32.FontCharSet = 238, ;
		Column32.FontName = "Segoe UI", ;
		Column32.FontSize = 10, ;
		Column32.Name = "Column33", ;
		Column32.ReadOnly = .T., ;
		Column32.Width = 112, ;
		Column33.BackColor = 255,255,255, ;
		Column33.ColumnOrder = 30, ;
		Column33.ControlSource = "sucursala", ;
		Column33.FontCharSet = 238, ;
		Column33.FontName = "Segoe UI", ;
		Column33.FontSize = 10, ;
		Column33.Name = "Column15", ;
		Column33.ReadOnly = .T., ;
		Column33.Width = 174, ;
		Column34.BackColor = 255,255,255, ;
		Column34.ColumnOrder = 15, ;
		Column34.ControlSource = "contract", ;
		Column34.FontCharSet = 238, ;
		Column34.FontName = "Segoe UI", ;
		Column34.FontSize = 10, ;
		Column34.Name = "Column34", ;
		Column34.ReadOnly = .T., ;
		Column34.Width = 99
		*< END OBJECT: BaseClass="grid" />

	ADD OBJECT 'Grid1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "NrCrt", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column1.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column10.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatia 2", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column10.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column11.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatia 3", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column11.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column12.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "COD", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column12.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column13.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.doc.platit", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column13.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column14.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatia 4", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column14.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column15.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sucursala", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column15.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column16.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Suma 2", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column16.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column17.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Suma 3", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column17.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column18.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Procent TVA", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column18.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column19.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data scadenta", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column19.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column2.Header2' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data Inreg.", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header2"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column2.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column20.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatia 5", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column20.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column21.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Operator introducere", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column21.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column22.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data&ora introducerii", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column22.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column23.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Operator stergere", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column23.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column24.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data&ora stergerii", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column24.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column25.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Responsabili", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column25.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column26.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cheltuieli/Venituri", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column26.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column27.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Lucrare/Comanda", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column27.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column28.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.NIR/Bon", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column28.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column29.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sectie", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column29.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column3.Header3' AS header WITH ;
		Alignment = 2, ;
		Caption = "Fel Doc.", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header3"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column3.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column30.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Neimpozabil", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column30.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column31.Header1' AS header WITH ;
		Caption = "Analit.", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column31.Text1' AS textbox WITH ;
		BackColor = 242,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column32.Header1' AS header WITH ;
		Caption = "Analit.", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column32.Text1' AS textbox WITH ;
		BackColor = 242,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column33.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.doc.incasat", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column33.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column34.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Contract", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column34.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column4.Header4' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data Act", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header4"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column4.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column5.Header5' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.Doc.", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header5"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column5.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column6.Header6' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatia 1", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header6"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column6.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column7.Header7' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont Deb.", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header7"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column7.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontBold = .F., ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,128, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column8.Header8' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont Cred.", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header8"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column8.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontBold = .F., ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column9.Header9' AS header WITH ;
		Alignment = 2, ;
		Caption = "Suma", ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		Name = "Header9"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column9.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontBold = .F., ;
		FontCharSet = 238, ;
		FontName = "Segoe UI", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Precedent1' AS precedent WITH ;
		Left = 603, ;
		Name = "Precedent1", ;
		Top = 2, ;
		Visible = .F., ;
		IMBUTON1.Height = 27, ;
		IMBUTON1.Name = "IMBUTON1", ;
		IMBUTON1.Width = 30, ;
		COMMAND1.Name = "COMMAND1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />
	
	PROCEDURE aleg_ascc
		*!*	LOCAL cc,acc
		*!*	m.den=''
		*!*	SELECT actactan
		*!*	cc=scC
		*!*	acc=ascc
		
		*!*	SELECT cont+'.'+acont+' - '+denumire as den FROM plcontana WHERE ALLTRIM(cont)=ALLTRIM(cc) INTO CURSOR ceva ORDER BY acont
		*!*	SELECT ceva
		
		*!*	IF _tally=0
		*!*		*	DO mesaj WITH 'Nu au fost definite simboluri analitice','pentru contul '+cc
		*!*		IF USED('CEVA')
		*!*			USE IN ceva 
		*!*		ENDIF 
		*!*		SELECT actactan 
		*!*		RETURN
		*!*	ENDIF
		
		*!*	SELECT ceva 
		*!*	DO caut_alfa_cursor WITH 'ceva','den','Alegeti simbolul analitic','m.den'
		
		*!*	SELECT actactan
		*!*	REPLACE ascC WITH SUBSTR(m.den,6,4)
		
		*!*	IF USED('CEVA')
		*!*		USE IN ceva 
		*!*	ENDIF  
		*!*	SELECT actactan 
		*!*	thisform.grid1.refresh
	ENDPROC

	PROCEDURE aleg_ascd
		*!*	LOCAL cc
		*!*	m.den=''
		*!*	SELECT actactan
		*!*	cc=scd
		
		*!*	SELECT cont+'.'+acont+' - '+denumire as den FROM plcontana WHERE cont=cc INTO CURSOR ceva ORDER BY acont
		*!*	IF _tally=0
		*!*	*DO mesaj WITH 'Nu au fost definite simboluri analitice','pentru contul '+cc
		*!*		IF USED('CEVA')
		*!*			USE IN ceva 
		*!*		ENDIF 
		*!*		SELECT actactan 
		*!*		RETURN
		*!*	endif
		
		*!*	DO caut_alfa_cursor WITH 'ceva','den','Alegeti simbolul analitic','m.den'
		
		*!*	SELECT actactan
		*!*	REPLACE ascd WITH SUBSTR(m.den,6,4)
		*!*	IF USED('CEVA')
		*!*		USE IN ceva 
		*!*	ENDIF 
		*!*	SELECT actactan 
		*!*	thisform.grid1.refresh
	ENDPROC

	PROCEDURE Init
		Do nrord With 'actactan'
		Select actactan
		Go Top
	ENDPROC

	PROCEDURE verif_ascc
		*!*	LOCAL lc_d,acC
		*!*	m.den=''
		*!*	ll_l=.f.
		*!*	SELECT actactan
		*!*	lc_C=scC
		*!*	acC=ascC
		
		*!*	SELECT cont+'.'+acont+' - '+denumire as den,cont,acont FROM plcontana ;
		*!*	WHERE ALLTRIM(cont)=ALLTRIM(lc_C) ;
		*!*	INTO CURSOR tceva ORDER BY acont
		
		*!*	SELECT tceva
		
		*!*	IF _tally=0
		*!*		IF !EMPTY(acC)
		*!*			DO mesaj WITH 'Nu au fost definite simboluri analitice','pentru contul '+lc_C
		*!*			ll_l=.t.
		*!*		ENDIF 
		*!*		
		*!*		IF USED('TCEVA')
		*!*			USE IN Tceva 
		*!*		ENDIF 
		*!*		SELECT actactan 
		*!*		THIS.grid1.Setfocus 
		*!*		RETURN ll_l
		*!*	ELSE 
		*!*		IF !PlClick
		*!*			IF EMPTY(acc)
		*!*				SELECT actactan
		*!*				IF FLOCK()
		*!*					REPLACE ascc WITH '0000'
		*!*				ENDIF 
		*!*				IF USED('TCEVA')
		*!*					USE IN Tceva 
		*!*				ENDIF 
		*!*				SELECT actactan 
		*!*				THIS.grid1.SetFocus 
		*!*				RETURN ll_l
		*!*			ENDIF 
		*!*		ENDIF 
		*!*	ENDIF
		
		*!*	SELECT tceva
		*!*	IF PlClick
		*!*		DO caut_alfa_cursor WITH 'tceva','den','Alegeti simbolul analitic','m.den'
		*!*		SELECT actactan
		*!*		REPLACE ascC WITH SUBSTR(m.den,6,4)
		*!*	ELSE 
		*!*		LOCATE FOR ALLTRIM(cont)=ALLTRIM(lc_C) AND ALLTRIM(acont)=ALLTRIM(acC)
		*!*		IF !FOUND()
		*!*			DO caut_alfa_cursor WITH 'tceva','den','Alegeti simbolul analitic','m.den'
		*!*			SELECT actactan
		*!*			REPLACE ascC WITH SUBSTR(m.den,6,4)
		*!*		ENDIF 
		*!*	ENDIF 
		
		*!*	IF USED('TCEVA')
		*!*		USE IN Tceva 
		*!*	ENDIF  
		
		*!*	SELECT actactan 
		*!*	this.grid1.Refresh 
		*!*	RETURN ll_l
	ENDPROC

	PROCEDURE verif_ascd
		*!*	LOCAL lc_d,acd
		*!*	m.den=''
		*!*	ll_l=.f.
		*!*	SELECT actactan
		*!*	lc_d=scd
		*!*	acd=ascd
		
		*!*	SELECT cont+'.'+acont+' - '+denumire as den,cont,acont FROM plcontana ;
		*!*	WHERE ALLTRIM(cont)=ALLTRIM(lc_d) ;
		*!*	INTO CURSOR tceva ORDER BY acont
		
		*!*	SELECT tceva
		
		*!*	IF _tally=0
		*!*		IF !EMPTY(acd)
		*!*			DO mesaj WITH 'Nu au fost definite simboluri analitice','pentru contul '+lc_d
		*!*			ll_l=.t.
		*!*		ENDIF 
		*!*		
		*!*		IF USED('TCEVA')
		*!*			USE IN Tceva 
		*!*		ENDIF 
		*!*		SELECT actactan 
		*!*		THIS.Grid1.SetFocus 
		*!*		RETURN ll_l
		*!*	ELSE 
		*!*		IF !PlClick
		*!*			IF empty(acd)
		*!*				SELECT actactan
		*!*				IF FLOCK()
		*!*					REPLACE ascd WITH '0000'
		*!*				ENDIF 
		*!*				IF USED('TCEVA')
		*!*					USE IN Tceva 
		*!*				ENDIF 
		*!*				SELECT actactan 
		*!*				THIS.Grid1.SetFocus  
		*!*				RETURN ll_l
		*!*			ENDIF 
		*!*		ENDIF 
		*!*	ENDIF
		
		*!*	SELECT tceva
		
		*!*	IF PlClick
		*!*		DO caut_alfa_cursor WITH 'tceva','den','Alegeti simbolul analitic','m.den'
		*!*		SELECT actactan
		*!*		REPLACE ascd WITH SUBSTR(m.den,6,4)
		*!*	ELSE 
		*!*		LOCATE FOR ALLTRIM(cont)=ALLTRIM(lc_d) AND ALLTRIM(acont)=ALLTRIM(acd)
		*!*		IF !FOUND()
		*!*			DO caut_alfa_cursor WITH 'tceva','den','Alegeti simbolul analitic','m.den'
		*!*			SELECT actactan
		*!*			REPLACE ascd WITH SUBSTR(m.den,6,4)
		*!*		ENDIF 
		*!*	ENDIF 
		
		*!*	IF USED('TCEVA')
		*!*		USE IN Tceva 
		*!*	ENDIF  
		
		*!*	SELECT actactan 
		*!*	THIS.Grid1.Refresh
		*!*	RETURN ll_l
	ENDPROC

	PROCEDURE Grid1.Column1.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.Column1.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column10.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.Column10.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column11.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.Column11.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column12.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.Column12.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column2.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.Column2.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column3.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.Column3.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column31.Text1.Click
		*!*	*thisform.ALEG_ASCD()
		*!*	this.LostFocus(.t.)
	ENDPROC

	PROCEDURE Grid1.Column31.Text1.LostFocus
		*!*	PARAMETERS PlClick
		*!*		ll_l=thisform.verif_ASCD()
		*!*		IF ll_l
		*!*			REPLACE ACTACTAN.ASCD WITH ''
		*!*			RETURN 0
		*!*		ENDIF 
		*!*		THIS.Parent.Parent.Refresh 
		*ENDIF 
	ENDPROC

	PROCEDURE Grid1.Column32.Text1.Click
		*!*	*thisform.ALEG_ASCC()
		*!*	this.LostFocus(.t.)
		
	ENDPROC

	PROCEDURE Grid1.Column32.Text1.LostFocus
		*!*	PARAMETERS PlClick
		*!*	*IF !EMPTY(ascc)
		*!*		ll_l=thisform.verif_ASCC()
		*!*		IF ll_l
		*!*			REPLACE ACTACTAN.ASCC WITH ''
		*!*			RETURN 0
		*!*		ENDIF 
		*!*		THIS.Parent.Parent.Refresh 
		*!*	*ENDIF 
	ENDPROC

	PROCEDURE Grid1.Column4.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.Column4.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column5.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.Column5.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column6.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.Column6.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column7.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.Column7.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column8.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.Column8.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column9.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.Column9.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Precedent1.COMMAND1.Click
		BUTON=3
		THISFORM.Release 
	ENDPROC

ENDDEFINE
