*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="overificari.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS frm_inainte_de 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="Edit1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: cmesaj
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 3
		cmesaj = 
		DoCreate = .T.
		Height = 76
		MaxHeight = 551
		Name = "frm_inainte_de"
		Width = 624
		_shape1.Anchor = 11
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 624
		_shape2.Anchor = 9
		_shape2.Left = 576
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		Lb_titlu_alb_b121.Caption = "Mesaj"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 590
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
	*</PropValue>

	ADD OBJECT 'Edit1' AS editbox WITH ;
		Anchor = 15, ;
		BackColor = 212,208,200, ;
		BorderStyle = 1, ;
		ControlSource = "thisform.cMesaj", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Height = 20, ;
		Left = 12, ;
		Name = "Edit1", ;
		ReadOnly = .T., ;
		ScrollBars = 2, ;
		SpecialEffect = 1, ;
		Top = 44, ;
		Width = 600
		*< END OBJECT: BaseClass="editbox" />

ENDDEFINE

DEFINE CLASS frm_situatii_invalidate 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="Gridextra1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column6.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column7.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column7.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column8.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column8.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column9.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column9.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column10.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column10.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column11.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column11.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column11.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column12.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column12.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column13.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column13.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column14.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column14.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column15.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdSituatiiInvalidate.Column15.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cboTabel" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_txDataf" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_txDatai" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_reface1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txtCont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_label2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_label3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmd_cauta1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_label4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkInvalidate" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_label5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_verifica1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: do_autentificare
		*m: do_validare
		*m: meniu_dblclick
		*p: ddataf
		*p: ddatai
		*p: lautoverificare		&& Daca se porneste verificarea automat din metoda Show, cand este apelata verificarea din Reg. TVA
		*p: lmfin
		*p: lparola
		*p: lvies
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 3
		Caption = "Verificare Parteneri"
		cbuton1 = but_excel1
		cusername = 
		ddataf = {}
		ddatai = {}
		DoCreate = .T.
		Height = 416
		lautoverificare = .F.
		lmfin = .F.
		lparola = .F.
		lvies = .F.
		Name = "frm_situatii_invalidate"
		Width = 774
		_memberdata = <VFPData>
			<memberdata name="lparola" display="lParola"/>
		</VFPData>
		_shape1.Anchor = 10
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 780
		_shape2.Left = 744
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		Lb_titlu_alb_b121.Caption = "Situatii validate / invalidate"
		Lb_titlu_alb_b121.Left = 12
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 9
		Lb_titlu_alb_b121.Top = 5
		BUT_TERMIN1.Anchor = 8
		BUT_TERMIN1.Left = 743
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 7
		BUT_TERMIN1.Top = 0
		Gridsort1.Left = 9
		Gridsort1.Name = "Gridsort1"
		Gridsort1.Top = 37
	*</PropValue>

	ADD OBJECT '_label1' AS _label WITH ;
		Caption = "Perioada", ;
		Left = 290, ;
		Name = "_label1", ;
		TabIndex = 11, ;
		Top = 33
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT '_label2' AS _label WITH ;
		Caption = "Situatie", ;
		Left = 96, ;
		Name = "_label2", ;
		TabIndex = 14, ;
		Top = 33
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT '_label3' AS _label WITH ;
		Caption = "-", ;
		FontSize = 12, ;
		Left = 365, ;
		Name = "_label3", ;
		TabIndex = 15, ;
		Top = 50
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT '_label4' AS _label WITH ;
		Caption = "Stare", ;
		Left = 14, ;
		Name = "_label4", ;
		TabIndex = 13, ;
		Top = 33
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT '_label5' AS _label WITH ;
		Caption = "Cont", ;
		Left = 456, ;
		Name = "_label5", ;
		TabIndex = 10, ;
		Top = 33
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT '_txDataf' AS _textbox WITH ;
		ControlSource = "thisform.dDataf", ;
		DisabledForeColor = 0,0,0, ;
		ForeColor = 0,0,0, ;
		Format = "k", ;
		Left = 373, ;
		Name = "_txDataf", ;
		TabIndex = 3, ;
		Top = 49, ;
		Width = 72, ;
		ZOrderSet = 8
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT '_txDatai' AS _textbox WITH ;
		ControlSource = "thisform.dDatai", ;
		DisabledForeColor = 0,0,0, ;
		Format = "k", ;
		Left = 290, ;
		Name = "_txDatai", ;
		TabIndex = 2, ;
		Top = 49, ;
		Width = 72, ;
		ZOrderSet = 8
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'But_reface1' AS but_reface WITH ;
		Anchor = 9, ;
		caction = do_reface, ;
		Comment = "*:OnResize=RT", ;
		Left = 713, ;
		Name = "But_reface1", ;
		TabIndex = 12, ;
		Top = 0, ;
		Visible = .T., ;
		ZOrderSet = 10
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_verifica1' AS but_verifica WITH ;
		Anchor = 9, ;
		caction = do_validare, ;
		Left = 682, ;
		Name = "But_verifica1", ;
		ToolTipText = "Marcheaza validat (fara refacere)", ;
		Top = 0
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'cboTabel' AS _combobox WITH ;
		Height = 24, ;
		Left = 96, ;
		Name = "cboTabel", ;
		RowSource = "Toate,Balanta verificare,Balanta parteneri,Inregistrari parteneri,Reg. Cumparari,Reg. vanzari,Stoc,Stoc ob. inv.", ;
		RowSourceType = 1, ;
		TabIndex = 1, ;
		Top = 48, ;
		Value = Toate, ;
		Width = 182
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'chkInvalidate' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Invalidate", ;
		Left = 14, ;
		Name = "chkInvalidate", ;
		TabIndex = 6, ;
		Top = 52
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Cmd_cauta1' AS cmd_cauta WITH ;
		Left = 544, ;
		Name = "Cmd_cauta1", ;
		TabIndex = 5, ;
		Top = 47
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'grdSituatiiInvalidate' AS _grdbase WITH ;
		Anchor = 15, ;
		ColumnCount = 15, ;
		DeleteMark = .F., ;
		HeaderHeight = 32, ;
		Height = 324, ;
		Left = 12, ;
		Name = "grdSituatiiInvalidate", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "csituatiiinvalidate", ;
		TabIndex = 8, ;
		Top = 84, ;
		Width = 756, ;
		Column1.ColumnOrder = 2, ;
		Column1.ControlSource = "csituatiiinvalidate.situatie", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 172, ;
		Column2.ColumnOrder = 3, ;
		Column2.ControlSource = "csituatiiinvalidate.an", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 38, ;
		Column3.ColumnOrder = 4, ;
		Column3.ControlSource = "csituatiiinvalidate.luna", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 35, ;
		Column4.ColumnOrder = 5, ;
		Column4.ControlSource = "csituatiiinvalidate.cont", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 30, ;
		Column5.ColumnOrder = 6, ;
		Column5.ControlSource = "csituatiiinvalidate.cgest", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T., ;
		Column5.Width = 70, ;
		Column6.ColumnOrder = 10, ;
		Column6.ControlSource = "csituatiiinvalidate.dultima_operatie", ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .T., ;
		Column6.Width = 126, ;
		Column7.ColumnOrder = 11, ;
		Column7.ControlSource = "csituatiiinvalidate.dultima_refacere", ;
		Column7.Name = "Column7", ;
		Column7.ReadOnly = .T., ;
		Column7.Width = 128, ;
		Column8.ColumnOrder = 7, ;
		Column8.ControlSource = "csituatiiinvalidate.dinvalidat", ;
		Column8.Name = "Column8", ;
		Column8.ReadOnly = .T., ;
		Column8.Width = 117, ;
		Column9.ColumnOrder = 12, ;
		Column9.ControlSource = "csituatiiinvalidate.ctip_validare", ;
		Column9.Name = "Column9", ;
		Column9.ReadOnly = .T., ;
		Column9.Width = 76, ;
		Column10.ColumnOrder = 1, ;
		Column10.ControlSource = "' '", ;
		Column10.CurrentControl = "Text1", ;
		Column10.DynamicBackColor = "IIF(!EMPTY(NVL(csituatiiinvalidate.dinvalidat,{//::})), RGB(255,0,0), RGB(255,255,255))", ;
		Column10.DynamicForeColor = "IIF(!EMPTY(NVL(csituatiiinvalidate.dinvalidat,{//::})), RGB(255,0,0), RGB(255,255,255))", ;
		Column10.Name = "Column10", ;
		Column10.ReadOnly = .T., ;
		Column10.Width = 27, ;
		Column11.ColumnOrder = 13, ;
		Column11.ControlSource = "csituatiiinvalidate.blocat", ;
		Column11.CurrentControl = "Check1", ;
		Column11.Name = "Column11", ;
		Column11.ReadOnly = .T., ;
		Column11.Sparse = .F., ;
		Column11.Width = 38, ;
		Column12.ColumnOrder = 14, ;
		Column12.ControlSource = "csituatiiinvalidate.util_validare", ;
		Column12.Name = "Column12", ;
		Column12.ReadOnly = .T., ;
		Column12.Width = 176, ;
		Column13.ColumnOrder = 15, ;
		Column13.ControlSource = "csituatiiinvalidate.dataora_validare", ;
		Column13.Name = "Column13", ;
		Column13.ReadOnly = .T., ;
		Column13.Width = 178, ;
		Column14.ColumnOrder = 8, ;
		Column14.ControlSource = "csituatiiinvalidate.util_invalidare", ;
		Column14.Name = "Column14", ;
		Column14.ReadOnly = .T., ;
		Column14.Width = 125, ;
		Column15.ColumnOrder = 9, ;
		Column15.ControlSource = "csituatiiinvalidate.explicatie", ;
		Column15.Name = "Column15", ;
		Column15.ReadOnly = .T., ;
		Column15.Width = 72
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'grdSituatiiInvalidate.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Situatie", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grdSituatiiInvalidate.Column10.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Stare", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grdSituatiiInvalidate.Column11.Check1' AS checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Height = 17, ;
		Left = 21, ;
		Name = "Check1", ;
		Top = 47, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'grdSituatiiInvalidate.Column11.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Blocat", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grdSituatiiInvalidate.Column11.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 'grdSituatiiInvalidate.Column12.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Utilizator validare", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grdSituatiiInvalidate.Column12.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 'grdSituatiiInvalidate.Column13.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data validare", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grdSituatiiInvalidate.Column13.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 'grdSituatiiInvalidate.Column14.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Utilizator invalidare", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grdSituatiiInvalidate.Column14.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 'grdSituatiiInvalidate.Column15.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatie", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grdSituatiiInvalidate.Column15.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 'grdSituatiiInvalidate.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "An", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grdSituatiiInvalidate.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Luna", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grdSituatiiInvalidate.Column4.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grdSituatiiInvalidate.Column5.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Gest", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grdSituatiiInvalidate.Column6.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data ultimei operatii", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grdSituatiiInvalidate.Column7.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data ultimei refaceri", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grdSituatiiInvalidate.Column8.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data invalidare", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grdSituatiiInvalidate.Column9.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Tip validare", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Gridextra1' AS gridextra WITH ;
		gridexpression = Thisform._grdbase1, ;
		Height = 17, ;
		Left = 744, ;
		Name = "Gridextra1", ;
		Top = 36, ;
		Width = 24
		*< END OBJECT: ClassLib="..\utile\gridextras\gridextras.vcx" BaseClass="custom" />

	ADD OBJECT 'txtCont' AS _textbox WITH ;
		DisabledForeColor = 0,0,0, ;
		ForeColor = 0,0,0, ;
		Format = "k", ;
		Left = 456, ;
		Name = "txtCont", ;
		TabIndex = 4, ;
		Top = 48, ;
		Width = 72, ;
		ZOrderSet = 8
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />
	
	PROCEDURE actualizeaza_grid1
		Lparameters tcFiltru
		
		Local lcFiltru
		lcFiltru = Iif(Empty(tcFiltru), poSituatii.ca_baza1.cfiltru, m.tcFiltru)
		
		Thisform.MousePointer = 11
		Thisform.LockScreen = .T.
		save_grid_tag(Thisform.grdSituatiiInvalidate)
		
		poSituatii.ca_baza1.cfiltru = lcFiltru
		poSituatii.ca_baza1.afisare()
		
		restore_grid_tag(Thisform.grdSituatiiInvalidate)
		Thisform.MousePointer = 0
		Thisform.LockScreen = .F.
		
		
		Select cSituatiiInvalidate
		Go Top
		Thisform.grdSituatiiInvalidate.SetFocus
		
	ENDPROC

	PROCEDURE DblClick
		This.but_reface1.Visible = .T.
	ENDPROC

	PROCEDURE do_autentificare
		Local lcParola
		IF !this.lParola 
			lcParola = Inputbox('Parola', 'Parola', '')
			This.lParola = (m.lcParola = Transform(Year(Date())) + Padl(Transform(Month(Date())), 2, '0') + Padl(Transform(Day(Date())), 2, '0'))
		ENDIF 
		Return This.lParola
	ENDPROC

	PROCEDURE do_cauta
		LOCAL llInvalidate, lcFiltru, lcSituatie
		
		Private pcTabel, pdDataI, pdDataF, pcCont
		pdDataI = Thisform.dDataI
		pdDataF = Thisform.dDataF
		pcCont = ALLTRIM(thisform.txtCont.Value)
		lcSituatie = UPPER(ALLTRIM(thisform.cboTabel.Value))
		pcTabel = IIF(lcSituatie = 'BALANTA VERIFICARE', 'BAL', ;
			IIF(m.lcSituatie = 'BALANTA PARTENERI', 'BALANTA_PARTENERI', ;
			IIF(m.lcSituatie = 'INREGISTRARI PARTENERI', 'IREG_PARTENERI', ; 
			IIF(m.lcSituatie = 'REG. CUMPARARI', 'JC2007', ;
			IIF(m.lcSituatie = 'REG. VANZARI', 'JV2007', ;
			IIF(m.lcSituatie = 'STOC', 'STOC', ;
			IIF(m.lcSituatie = 'STOC OB. INV.', 'STOC_OBINV', '')))))))
		
		llInvalidate = (This.chkInvalidate.Value = 1)
		
		Do Case
			Case EMPTY(m.pdDataI) AND !Empty(m.pdDataF)
				AMESSAGEBOX("Nu ati completat data initiala!",0+48,"Atentie")
				Thisform._txDatai.SetFocus()
				Return .F.
			Case !EMPTY(m.pdDataI) AND Empty(m.pdDataF)
				AMESSAGEBOX("Nu ati completat data finala!",0+48,"Atentie")
				Thisform._txDataf.SetFocus()
				Return .F.
			Case !EMPTY(m.pdDataI) AND !Empty(m.pdDataF) AND m.pdDataI > m.pdDataF
				AMESSAGEBOX("Data finala trebuie sa fie mai mare decat data initiala !",0+48,"Atentie")
				Thisform._txDataf.SetFocus()
				Return .F.
		Endcase
		
		
		lcFiltru = ""
		
		IF m.llInvalidate
			lcFiltru = lcFiltru + [ and dinvalidat is not null]
		ENDIF 
		
		If !EMPTY(m.pcTabel)
			lcFiltru = lcFiltru + [ and tabel = ?pcTabel]
		ENDIF
		
		IF !EMPTY(m.pcCont)
			lcFiltru = lcFiltru + [ and cont = ?pcCont]
		ENDIF 
		
		If !EMPTY(m.pdDataI)
			IF YEAR(m.pdDataI) = YEAR(m.pdDataF) AND MONTH(m.pdDataI) = MONTH(m.pdDataF)
				lcFiltru = lcFiltru + [ and an=] + TRANSFORM(YEAR(m.pdDataI)) + [ and luna = ] + TRANSFORM(MONTH(m.pdDataI))
			ELSE 	
				lcFiltru = lcFiltru + [ and an*12+luna between ] + TRANSFORM(YEAR(m.pdDataI) * 12 + MONTH(m.pdDataI)) + [ and ]  + TRANSFORM(YEAR(m.pdDataF) * 12 + MONTH(m.pdDataF))
			ENDIF 
		ENDIF
		IF !EMPTY(m.lcFiltru)
			m.lcFiltru = SUBSTR(m.lcFiltru, 6)
		ELSE 
			m.lcFiltru = [2=2]	
		ENDIF 
		
		Thisform.actualizeaza_grid1(lcFiltru)
	ENDPROC

	PROCEDURE do_reface
		Local lcFilter, lcParola, lcSituatie, lcSql, llSucces, lnOptiune, lnRecno
		Private pnAn, pnIdGestiune, pnLuna, pnLunar, pnVenchelt, pcCont
		
		If !This.do_autentificare()
			Return
		Endif
		
		If !This.but_reface1.Visible
			Return
		Endif
		If Reccount('cSituatiiInvalidate') = 0
			Return
		Endif
		
		
		lnOptiune = xmenu("Refacere situatie curenta;Refacere toate situatiile selectate")
		If Empty(m.lnOptiune)
			Return
		Endif
		If AMessagebox('Doriti sa refaceti ' + Iif(m.lnOptiune = 1, 'situatia curenta', 'toate situatiile selectate') + '?', 4 + 32, _Screen.Caption) <> 6
			Return
		Endif
		lnRecno = Recno('cSituatiiInvalidate')
		lcFilter = Iif(m.lnOptiune = 1, 'RECNO() = ' + Alltrim(Str(m.lnRecno)), '.T.')
		
		
		Select cSituatiiInvalidate
		Scan For !Empty(Nvl(cSituatiiInvalidate.dinvalidat, {//::})) And &lcFilter
			lcSituatie = Alltrim(situatie)
			pnAn = Int(an)
			pnLuna = Int(luna)
			pcCont = Alltrim(Cont)
			pnLunar = 3 && stergere + refacere cu precedente
			pnVenchelt = 0 && refacere inregistrari parteneri dupa id_venchelt (trebuie verifica in config_cont_ireg!!!)
			pnIdGestiune = Iif(Empty(Nvl(id_gestiune, 0)), Cast(Null As N(10)), id_gestiune)
			lcSql = [begin pack_contafin_set_idutil(?gnIdUtil); pack_contafin.validare_invalidare(pack_contafin.nTipValidareManuala, ?pcTabel,?pnAn,?pnLuna,?pcCont,?pnIdGestiune); end;]
			
			Wait Window 'Refacere ' + m.lcSituatie + ' ' + Padl(m.pnLuna, 2, '0') + '/' + Alltrim(Str(m.pnAn)) Nowait
			Do Case
				Case m.lcSituatie = 'BALANTA VERIFICARE'
					lcSql = [begin pack_refaceri.refac_balanta(?pnAn, ?pnLuna, ?pnLunar); end;]
				Case m.lcSituatie = 'BALANTA PARTENERI'
					lcSql = [begin pack_refaceri.refac_balanta_parteneri(?pnAn, ?pnLuna, ?pcCont, ?pnLunar); end;]
				Case m.lcSituatie = 'INREGISTRARI PARTENERI'
					lcSql = [begin pack_refaceri.refac_ireg_parteneri(?pnAn, ?pnLuna, ?pcCont, ?pnLunar, ?pnVenchelt); end;]
				Case m.lcSituatie = 'REG. CUMPARARI'
					lcSql = [begin pack_refaceri.refac_tva_2007('JC', ?pnAn, ?pnLuna); end;]
				Case m.lcSituatie = 'REG. VANZARI'
					lcSql = [begin pack_refaceri.refac_tva_2007('JV', ?pnAn, ?pnLuna); end;]
				Case m.lcSituatie = 'STOC'
					lcSql = [begin pack_refaceri.refac_stoc(?pnAn, ?pnLuna, ?pnLunar, ?pnIdGestiune); end;]
				Case m.lcSituatie = 'STOC OB. INV.'
					lcSql = [begin pack_refaceri.refac_stoc_obinv(?pnAn, ?pnLuna, ?pnLunar); end;]
			Endcase
			llSucces = goExecutor.oExecuta(m.lcSql)
			If !m.llSucces
				Exit
			Endif
		Endscan
		
		AMessagebox('Refacerile s-au incheiat!', 0 + 64, _Screen.Caption)
		This.do_cauta()
	ENDPROC

	PROCEDURE do_validare
		Local lcFilter, lcSituatie, lcSql, llSucces, lnOptiune, lnRecno
		PRIVATE pcCont, pcTabel, pnAn, pnIdGestiune, pnLuna
		If !This.do_autentificare()
			Return
		Endif
		
		lnOptiune = xmenu("Validare situatie curenta;Validare toate situatiile selectate")
		If Empty(m.lnOptiune)
			Return
		Endif
		If AMessagebox('Doriti sa validati ' + Iif(m.lnOptiune = 1, 'situatia curenta', 'toate situatiile selectate') + '?', 4 + 32, _Screen.Caption) <> 6
			Return
		Endif
		lnRecno = Recno('cSituatiiInvalidate')
		lcFilter = Iif(m.lnOptiune = 1, 'RECNO() = ' + Alltrim(Str(m.lnRecno)), '.T.')
		
		
		Select cSituatiiInvalidate
		Scan For !Empty(Nvl(cSituatiiInvalidate.dinvalidat, {//::})) And &lcFilter
			lcSituatie = Alltrim(situatie)
			pcTabel = Alltrim(tabel)
			pnAn = Int(an)
			pnLuna = Int(luna)
			pcCont = Alltrim(Cont)
			pnIdGestiune = Iif(Empty(Nvl(id_gestiune, 0)), Cast(Null As N(10)), id_gestiune)
		
		
		  
		
			Wait Window 'Validare ' + m.lcSituatie + ' ' + Padl(m.pnLuna, 2, '0') + '/' + Alltrim(Str(m.pnAn)) Nowait
			lcSql = [begin pack_contafin.validare_invalidare(pack_contafin.nTipValidareManuala, ?pcTabel,?pnAn,?pnLuna,?pcCont,?pnIdGestiune); end;]
			
			llSucces = goExecutor.oExecuta(m.lcSql)
			If !m.llSucces
				Exit
			Endif
		Endscan
		
		AMessagebox('Validarile s-au incheiat!', 0 + 64, _Screen.Caption)
		This.do_cauta()
	ENDPROC

	PROCEDURE Init
		DODEFAULT()
		
		*!*	thisform.ddatai = DATE(m.gnAn, m.gnLuna, 1)
		*!*	thisform.ddataf = GOMONTH(thisform.ddatai, 1) - 1
		
		this.chkInvalidate.Value = 1
		This.do_cauta()
		
		this.WindowState= 2 
	ENDPROC

	PROCEDURE meniu_dblclick
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_verificare_globala 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="grid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column1._image1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column1._image2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column3._editbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column4._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_listare1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_refacere1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_diferente" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 450
		Name = "frm_verificare_globala"
		Width = 800
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 800
		_shape2.Height = 29
		_shape2.Left = 697
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 103
		Lb_titlu_alb_b121.Caption = "VERIFICARE GLOBALA"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 6
		BUT_TERMIN1.Left = 768
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 3
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

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

	ADD OBJECT 'But_refacere1' AS but_reface WITH ;
		Left = 702, ;
		Name = "But_refacere1", ;
		TabIndex = 5, ;
		Top = 1, ;
		Visible = .T.
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'ck_diferente' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Doar cu diferente", ;
		Left = 24, ;
		Name = "ck_diferente", ;
		TabIndex = 1, ;
		Top = 36
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'grid1' AS _grdrow WITH ;
		AllowHeaderSizing = .F., ;
		ColumnCount = 4, ;
		DeleteMark = .F., ;
		GridLines = 1, ;
		HeaderHeight = 20, ;
		Height = 372, ;
		Left = 14, ;
		Name = "grid1", ;
		Panel = 1, ;
		RecordSource = "crsverificari", ;
		RowHeight = 55, ;
		ScrollBars = 2, ;
		TabIndex = 2, ;
		Top = 60, ;
		Width = 778, ;
		Column1.ColumnOrder = 2, ;
		Column1.ControlSource = "explicatia", ;
		Column1.FontBold = .T., ;
		Column1.FontName = "Arial Narrow", ;
		Column1.FontSize = 10, ;
		Column1.Format = "!", ;
		Column1.Name = "Column2", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 213, ;
		Column2.Alignment = 2, ;
		Column2.ColumnOrder = 1, ;
		Column2.ControlSource = "", ;
		Column2.DynamicCurrentControl = "iif(empty(mesaj),'_image1','_image2')", ;
		Column2.Name = "Column1", ;
		Column2.ReadOnly = .T., ;
		Column2.Sparse = .F., ;
		Column2.Width = 46, ;
		Column3.ControlSource = "mesaj", ;
		Column3.DynamicForeColor = "IIF(selectat=1,RGB(255,0,0),RGB(0,0,0))", ;
		Column3.FontName = "Arial Narrow", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Sparse = .F., ;
		Column3.Width = 439, ;
		Column4.ControlSource = "selectat", ;
		Column4.Name = "Column4", ;
		Column4.Sparse = .F., ;
		Column4.Width = 46
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'grid1.Column1._image1' AS _image WITH ;
		Height = 32, ;
		Left = 28, ;
		Name = "_image1", ;
		Picture = ..\graphics\checkmrk.ico, ;
		Top = 23, ;
		Width = 32
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="image" />

	ADD OBJECT 'grid1.Column1._image2' AS _image WITH ;
		Height = 32, ;
		Left = 23, ;
		Name = "_image2", ;
		Picture = ..\graphics\pericol.ico, ;
		Top = 47, ;
		Width = 32
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="image" />

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

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

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

	ADD OBJECT 'grid1.Column3._editbox1' AS _editbox WITH ;
		FontName = "Arial Narrow", ;
		Left = 48, ;
		Name = "_editbox1", ;
		Top = 23
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="editbox" />

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

	ADD OBJECT 'grid1.Column4._checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		Caption = "", ;
		Centered = .T., ;
		Left = 7, ;
		Name = "_checkbox1", ;
		Top = 35
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'grid1.Column4.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Selectat", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />
	
	PROCEDURE do_listare
		If Reccount('crsverificari')>0
			Thisform.AlwaysOnTop = .F.
			raport_mesaje(Thisform.lb_titlu_alb_b121.Caption+" "+Padl(Alltrim(Str(gnLuna)),2,'0')+"/"+Alltrim(Str(gnAn)))
			Thisform.AlwaysOnTop = .T.
		Else
			aMessagebox("Nu sunt inregistrari de listat!",0+48,"Atentie")
		Endif
	ENDPROC

	PROCEDURE do_reface
		LOCAL X, lcLunar
		lcLunar = '1'
		x= xmenu('Refacere \<completa;\-;\Refacere sume precedente si lunare')
		DO case
			CASE x = 3
				lcLunar = [1]
			CASE x = 1
				lcLunar = [3]
			OTHERWISE
				RETURN 
		ENDCASE 
		
		If Used('crsrefaceri')
			Use In crsrefaceri
		Endif
		Select sursa,Cont,tip From crsverificari Where selectat=1 Into Cursor crsrefaceri
		
		If Reccount('crsrefaceri')>0
		*!*	orp=Create('parola')
		*!*	orp.Show(1)
		*!*	If buton # 3
		*!*		RETURN
		*!*	ENDIF
			Local lcsursa,lccont,lctip
			Thisform.MousePointer= 11
			Thisform.LockScreen=.T.
			Thisform.AlwaysOnTop=.F.
			save_grid_tag(Thisform.grid1)
		
		
			Select crsrefaceri
			Scan
				lcsursa=Upper(Alltrim(sursa))
				lccont=Alltrim(Cont)
		*		lctip=tip
				lctip = lcLunar && '1'
				Do refacere With lcsursa,lctip,lccont In orefaceri.prg
				Select crsrefaceri
			Endscan
		
			If Used('crsverificari')
				Use In crsverificari
			Endif
			Create Cursor crsverificari (sursa c(20),Cont c(20),tip c(1),mesaj c(200),selectat N(1),explicatia c(50),luna N(2),an N(4))
			Do VerificareLunaDeschisa In overificari.prg
			Select crsverificari
			Go Top
			restore_grid_tag(Thisform.grid1)
			aMessagebox("Refacerea s-a incheiat!",0+64,"Info refacere")
			Thisform.AlwaysOnTop=.T.
			Thisform.LockScreen = .F.
			Thisform.MousePointer = 0
		Endif
		
		Use In crsrefaceri
		Thisform.ck_diferente.Value=0
	ENDPROC

	PROCEDURE do_sterge
		
		
	ENDPROC

	PROCEDURE Init
		DoDefault()
		
		Select crsverificari
		Go Top
		
		*!*	If m.nivel > 0
		*!*		Thisform.but_refacere1.Visible=.F.
		*!*		Thisform._shape2.Width=Thisform._shape2.Width-Thisform.but_refacere1.Width
		*!*		Thisform._shape2.Left=Thisform._shape2.Left+Thisform.but_refacere1.Width
		*!*	Endif
	ENDPROC

	PROCEDURE ck_diferente.Click
		If This.Value=1
			Select crsverificari
			Set Filter To !Empty(mesaj)
			Thisform.Refresh
		Else
			Select crsverificari
			Set Filter To
			Thisform.Refresh
		Endif
		
	ENDPROC

	PROCEDURE grid1.Column2.Text1.DblClick
		lcExplicatia=Upper(Alltrim(This.Value))
		Thisform.AlwaysOnTop=.F.
		lcFunc = []
		Do Case
			Case lcExplicatia='BALANTA'
				lcFunc = [viz_balanta]
				*Do viz_balanta
			Case lcExplicatia='REGISTRUL DE VANZARI'
				lcFunc = [viz_regvanz]
				*Do viz_regvanz
			Case lcExplicatia='REGISTRUL DE CUMPARARI'
				lcFunc = [viz_regcump]
				*Do viz_regcump
			Case Substr(lcExplicatia,1,17)='BALANTA ANALITICA'
				lcFunc = [lans_balanta_parteneri]
				*Do lans_balanta_parteneri
			Case Substr(lcExplicatia,1,12)='INREGISTRARI'
				lcFunc = [lans_ireg_parteneri]
				*Do lans_ireg_parteneri
		ENDCASE
		IF !EMPTY(lcFunc)
			DO &lcFunc
		ENDIF 
		Thisform.AlwaysOnTop=.T.
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_verificare_globala_per 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="grid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column1._image1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column1._image2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column3._editbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column6.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grid1.Column6._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_listare1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_refacere1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_explicatia" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmd_cauta1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nfinal
		*p: ninit
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 450
		Name = "frm_verificare_globala_per"
		nfinal = 0
		ninit = 0
		Width = 800
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 828
		_shape2.Height = 29
		_shape2.Left = 696
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 105
		Lb_titlu_alb_b121.Caption = "VERIFICARE GLOBALA"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 7
		BUT_TERMIN1.Left = 768
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 4
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

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

	ADD OBJECT 'But_refacere1' AS but_reface WITH ;
		Left = 703, ;
		Name = "But_refacere1", ;
		TabIndex = 6, ;
		Top = 1, ;
		Visible = .T.
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Ck_explicatia' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		camp_nume = explicatia, ;
		Caption = "Explicatia", ;
		FontName = "Arial Narrow", ;
		Left = 24, ;
		Name = "Ck_explicatia", ;
		TabIndex = 1, ;
		Top = 41
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Cmd_cauta1' AS cmd_cauta WITH ;
		Left = 108, ;
		Name = "Cmd_cauta1", ;
		TabIndex = 2, ;
		Top = 37
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'grid1' AS _grdrow WITH ;
		AllowHeaderSizing = .F., ;
		ColumnCount = 6, ;
		DeleteMark = .F., ;
		GridLines = 1, ;
		HeaderHeight = 20, ;
		Height = 360, ;
		Left = 13, ;
		Name = "grid1", ;
		Panel = 1, ;
		RecordSource = "crsverificari", ;
		RowHeight = 41, ;
		ScrollBars = 2, ;
		TabIndex = 3, ;
		Top = 72, ;
		Width = 779, ;
		Column1.ColumnOrder = 2, ;
		Column1.ControlSource = "explicatia", ;
		Column1.FontBold = .T., ;
		Column1.FontName = "Arial Narrow", ;
		Column1.FontSize = 10, ;
		Column1.Format = "!", ;
		Column1.Name = "Column2", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 213, ;
		Column2.Alignment = 2, ;
		Column2.ColumnOrder = 1, ;
		Column2.ControlSource = "", ;
		Column2.DynamicCurrentControl = "iif(empty(mesaj),'_image1','_image2')", ;
		Column2.Name = "Column1", ;
		Column2.ReadOnly = .T., ;
		Column2.Sparse = .F., ;
		Column2.Width = 46, ;
		Column3.ControlSource = "mesaj", ;
		Column3.DynamicForeColor = "IIF(selectat=1,RGB(255,0,0),RGB(0,0,0))", ;
		Column3.FontName = "Arial Narrow", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Sparse = .F., ;
		Column3.Width = 392, ;
		Column4.ColumnOrder = 5, ;
		Column4.ControlSource = "an", ;
		Column4.Name = "Column5", ;
		Column4.Width = 36, ;
		Column5.ColumnOrder = 4, ;
		Column5.ControlSource = "luna", ;
		Column5.Name = "Column4", ;
		Column5.Width = 33, ;
		Column6.ControlSource = "selectat", ;
		Column6.Name = "Column6", ;
		Column6.Sparse = .F., ;
		Column6.Width = 47
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'grid1.Column1._image1' AS _image WITH ;
		Height = 32, ;
		Left = 28, ;
		Name = "_image1", ;
		Picture = ..\graphics\checkmrk.ico, ;
		Top = 23, ;
		Width = 32
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="image" />

	ADD OBJECT 'grid1.Column1._image2' AS _image WITH ;
		Height = 32, ;
		Left = 23, ;
		Name = "_image2", ;
		Picture = ..\graphics\pericol.ico, ;
		Top = 47, ;
		Width = 32
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="image" />

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

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

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

	ADD OBJECT 'grid1.Column3._editbox1' AS _editbox WITH ;
		FontName = "Arial Narrow", ;
		Left = 48, ;
		Name = "_editbox1", ;
		Top = 23
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="editbox" />

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

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

	ADD OBJECT 'grid1.Column4.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

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

	ADD OBJECT 'grid1.Column5.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'grid1.Column6._checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		Caption = "", ;
		Centered = .T., ;
		Left = 14, ;
		Name = "_checkbox1", ;
		Top = 35
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'grid1.Column6.Header1' AS header WITH ;
		Caption = "Selectat", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />
	
	PROCEDURE do_cauta
		Local lcFiltru
		Select crsverificari
		Replace selectat With 0 All
		lcFiltru=[!EMPTY(mesaj)]
		If Thisform.ck_explicatia.Value=1
			lcFiltru=lcFiltru+Thisform.ck_explicatia.filtru_vfp
		Endif
		Select crsverificari
		Set Filter To &lcFiltru
		Replace selectat With 1 For &lcFiltru
		Go Top
		Thisform.Refresh
		
	ENDPROC

	PROCEDURE do_listare
		If Reccount('crsverificari')>0
			Thisform.AlwaysOnTop = .F.
			raport_mesaje(thisform.lb_titlu_alb_b121.Caption)
			Thisform.AlwaysOnTop = .T.
		Else
			aMessagebox("Nu sunt inregistrari de listat!",0+48,"Atentie")
		Endif
	ENDPROC

	PROCEDURE do_reface
		LOCAL X, lcLunar
		lcLunar = '1'
		x= xmenu('Refacere \<completa;\-;\Refacere sume precedente si lunare')
		DO case
			CASE x = 3
				lcLunar = [1]
			CASE x = 1
				lcLunar = [3]
			OTHERWISE
				RETURN 
		ENDCASE 
		
		If Used('crsrefaceri')
			Use In crsrefaceri
		Endif
		Select sursa,Cont,tip,luna,an From crsverificari Where selectat=1 Into Cursor crsrefaceri
		
		If Reccount('crsrefaceri')>0
			Local lcsursa,lccont,lctip,lnAn,lnLuna
			Thisform.MousePointer= 11
			Thisform.LockScreen=.T.
			Thisform.AlwaysOnTop=.F.
			save_grid_tag(Thisform.grid1)
		
			Select crsrefaceri
			Scan
				lcsursa=Upper(Alltrim(sursa))
				lccont=Alltrim(Cont)
				lctip = lcLunar && '1'
				lnAn=an
				lnLuna=luna
				Do refacere With lcsursa,lctip,lccont,lnLuna,lnAn In orefaceri.prg
				Select crsrefaceri
			Endscan
		
			If Used('crsverificari')
				Use In crsverificari
			Endif
			Create Cursor crsverificari (sursa c(20),Cont c(20),tip c(1),mesaj c(200),selectat N(1),explicatia c(50),luna N(2),an N(4))
			lnInit=Thisform.ninit
			lnFinal=Thisform.nfinal
			For k=lnInit To lnFinal
				lnLuna=Mod(k,12)
				lnAn=Int(k/12)
				If lnLuna=0
					lnLuna=12
					lnAn=lnAn-1
				Endif
				Do VerificareLunaDeschisa With lnLuna,lnAn,.F. in overificari.prg
			Endfor
			Select crsverificari
			Go Top
			restore_grid_tag(Thisform.grid1)
			Thisform.do_cauta
			aMessagebox("Refacerea s-a incheiat!",0+64,"Info refacere")
			Thisform.AlwaysOnTop=.T.
			Thisform.LockScreen = .F.
			Thisform.MousePointer = 0
		Endif
		
		Use In crsrefaceri
		
	ENDPROC

	PROCEDURE do_sterge
		
		
	ENDPROC

	PROCEDURE Init
		DoDefault()
		
		*!*	Select crsverificari
		*!*	Go Top
		
		*!*	If m.nivel > 0
		*!*		Thisform.but_refacere1.Visible=.F.
		*!*		Thisform._shape2.Width=Thisform._shape2.Width-Thisform.but_refacere1.Width
		*!*		Thisform._shape2.Left=Thisform._shape2.Left+Thisform.but_refacere1.Width
		*!*	Endif
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_verificare_parteneri 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="_grdbase1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column1._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column4._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column6.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column7.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column7.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column8.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column8.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column9.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column9.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column10.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column10.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column11.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column11.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column12.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column12.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column13.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column13.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column13._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column14.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column14.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column14._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column15.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column15.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column16.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column16.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column17.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column17.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column17._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column18.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column18.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column18._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column19.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column19.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column20.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column20.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column21.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column21.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column23.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column23.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cTVAincasare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cTVAincasare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cTVAincasare.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cSplitTVA.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cSplitTVA.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cSplitTVA.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cInactiv.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cInactiv.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cInactiv.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column26.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column26.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column27.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column27.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_verifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Gridextra1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkMFIN" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkVIES" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkMFINURL" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkVIESURL" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="spnPauza" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lblInfo" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkLiniaCurenta" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkDuplicat" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkPlatitor" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkInvalid" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cmdVerifica" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lblVerifica" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkExperimental" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkANAF" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkInactiv" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: filtreatentionari
		*m: meniu_dblclick
		*p: lautoverificare		&& Daca se porneste verificarea automat din metoda Show, cand este apelata verificarea din Reg. TVA
		*p: lmfin
		*p: lvies
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 3
		Caption = "Verificare Parteneri"
		cbuton1 = but_excel1
		cusername = 
		DoCreate = .T.
		Height = 416
		lautoverificare = .F.
		lmfin = .F.
		lvies = .F.
		Name = "frm_verificare_parteneri"
		Width = 774
		_memberdata = <VFPData>
			<memberdata name="filtreatentionari" display="FiltreAtentionari"/>
		</VFPData>
		_shape1.Anchor = 10
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 780
		_shape2.Name = "_shape2"
		Lb_titlu_alb_b121.Caption = "Verificare parteneri"
		Lb_titlu_alb_b121.Left = 12
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.Top = 0
		BUT_TERMIN1.Anchor = 8
		BUT_TERMIN1.Left = 743
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 0
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdbase1' AS _grdbase WITH ;
		Anchor = 15, ;
		ColumnCount = 27, ;
		DeleteMark = .F., ;
		HeaderHeight = 32, ;
		Height = 283, ;
		Left = 12, ;
		Name = "_grdbase1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "crsverificareparteneri", ;
		Top = 84, ;
		Width = 756, ;
		Column1.ColumnOrder = 1, ;
		Column1.ControlSource = "crsverificareparteneri.ales", ;
		Column1.CurrentControl = "_checkbox1", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .F., ;
		Column1.Sparse = .F., ;
		Column1.Visible = .T., ;
		Column1.Width = 25, ;
		Column2.ColumnOrder = 3, ;
		Column2.ControlSource = "crsverificareparteneri.denumire", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.ToolTipText = "Dublu click pentru verificare manuala pe www.mfinante.ro", ;
		Column2.Visible = .T., ;
		Column2.Width = 221, ;
		Column3.ColumnOrder = 5, ;
		Column3.ControlSource = "crsverificareparteneri.cod_fiscal", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.ToolTipText = "Dublu click pentru verificare manuala pe www.mfinante.ro", ;
		Column3.Visible = .T., ;
		Column3.Width = 75, ;
		Column4.ColumnOrder = 6, ;
		Column4.ControlSource = "crsverificareparteneri.valid", ;
		Column4.CurrentControl = "_checkbox1", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Sparse = .F., ;
		Column4.Visible = .T., ;
		Column4.Width = 41, ;
		Column5.ColumnOrder = 10, ;
		Column5.ControlSource = "crsverificareparteneri.firma", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T., ;
		Column5.Visible = .T., ;
		Column5.Width = 305, ;
		Column6.ColumnOrder = 14, ;
		Column6.ControlSource = "crsverificareparteneri.cod", ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .T., ;
		Column6.Visible = .T., ;
		Column6.Width = 75, ;
		Column7.BackColor = 185,220,255, ;
		Column7.ColumnOrder = 16, ;
		Column7.ControlSource = "crsverificareparteneri.adresa", ;
		Column7.DynamicBackColor = "RGB(185,220,255)", ;
		Column7.Name = "Column7", ;
		Column7.ReadOnly = .T., ;
		Column7.Visible = .T., ;
		Column7.Width = 150, ;
		Column8.ColumnOrder = 17, ;
		Column8.ControlSource = "crsverificareparteneri.judet", ;
		Column8.Name = "Column8", ;
		Column8.ReadOnly = .T., ;
		Column8.Visible = .T., ;
		Column8.Width = 89, ;
		Column9.ColumnOrder = 18, ;
		Column9.ControlSource = "crsverificareparteneri.regcom", ;
		Column9.Name = "Column9", ;
		Column9.ReadOnly = .T., ;
		Column9.Visible = .T., ;
		Column9.Width = 75, ;
		Column10.ColumnOrder = 19, ;
		Column10.ControlSource = "crsverificareparteneri.codpostal", ;
		Column10.Name = "Column10", ;
		Column10.ReadOnly = .T., ;
		Column10.Visible = .T., ;
		Column10.Width = 75, ;
		Column11.ColumnOrder = 20, ;
		Column11.ControlSource = "crsverificareparteneri.telefon", ;
		Column11.Name = "Column11", ;
		Column11.ReadOnly = .T., ;
		Column11.Visible = .T., ;
		Column11.Width = 75, ;
		Column12.ColumnOrder = 21, ;
		Column12.ControlSource = "crsverificareparteneri.fax", ;
		Column12.Name = "Column12", ;
		Column12.ReadOnly = .T., ;
		Column12.Visible = .T., ;
		Column12.Width = 75, ;
		Column13.ColumnOrder = 22, ;
		Column13.ControlSource = "crsverificareparteneri.vies", ;
		Column13.CurrentControl = "_checkbox1", ;
		Column13.Name = "Column13", ;
		Column13.ReadOnly = .T., ;
		Column13.Sparse = .F., ;
		Column13.Visible = .T., ;
		Column13.Width = 75, ;
		Column14.ColumnOrder = 23, ;
		Column14.ControlSource = "crsverificareparteneri.platitortva", ;
		Column14.CurrentControl = "_checkbox1", ;
		Column14.Name = "Column14", ;
		Column14.ReadOnly = .T., ;
		Column14.Sparse = .F., ;
		Column14.Visible = .T., ;
		Column14.Width = 75, ;
		Column15.ColumnOrder = 24, ;
		Column15.ControlSource = "crsverificareparteneri.eroare", ;
		Column15.Name = "Column15", ;
		Column15.ReadOnly = .T., ;
		Column15.Visible = .T., ;
		Column15.Width = 58, ;
		Column16.ColumnOrder = 8, ;
		Column16.ControlSource = "datatvamfin", ;
		Column16.Name = "Column16", ;
		Column16.ReadOnly = .T., ;
		Column17.ColumnOrder = 7, ;
		Column17.ControlSource = "platitortvamfin", ;
		Column17.CurrentControl = "_checkbox1", ;
		Column17.Name = "Column17", ;
		Column17.ReadOnly = .T., ;
		Column17.Sparse = .F., ;
		Column17.Width = 71, ;
		Column18.ColumnOrder = 25, ;
		Column18.ControlSource = "crsverificareparteneri.duplicat", ;
		Column18.CurrentControl = "_checkbox1", ;
		Column18.Name = "Column18", ;
		Column18.ReadOnly = .T., ;
		Column18.Sparse = .F., ;
		Column18.Width = 62, ;
		Column19.ColumnOrder = 4, ;
		Column19.ControlSource = "crsverificareparteneri.atribut_fiscal", ;
		Column19.Name = "Column19", ;
		Column19.ReadOnly = .T., ;
		Column19.Width = 41, ;
		Column20.ColumnOrder = 9, ;
		Column20.ControlSource = "stare", ;
		Column20.Name = "Column20", ;
		Column20.ReadOnly = .T., ;
		Column20.Width = 88, ;
		Column21.ColumnOrder = 2, ;
		Column21.ControlSource = "atentie", ;
		Column21.Name = "Column21", ;
		Column21.ReadOnly = .T., ;
		Column21.Width = 78, ;
		Column22.ColumnOrder = 26, ;
		Column22.ControlSource = "crsverificareparteneri.id_part", ;
		Column22.Name = "Column23", ;
		Column22.ReadOnly = .T., ;
		Column23.ColumnOrder = 11, ;
		Column23.ControlSource = "crsverificareparteneri.tvaincasare", ;
		Column23.CurrentControl = "Check1", ;
		Column23.Name = "cTVAincasare", ;
		Column23.ReadOnly = .T., ;
		Column23.Sparse = .F., ;
		Column23.Width = 59, ;
		Column24.ColumnOrder = 12, ;
		Column24.ControlSource = "crsverificareparteneri.splittva", ;
		Column24.CurrentControl = "Check1", ;
		Column24.Name = "cSplitTVA", ;
		Column24.ReadOnly = .T., ;
		Column24.Sparse = .F., ;
		Column24.Width = 59, ;
		Column25.ColumnOrder = 13, ;
		Column25.ControlSource = "crsverificareparteneri.inactiv", ;
		Column25.CurrentControl = "Check1", ;
		Column25.Name = "cInactiv", ;
		Column25.ReadOnly = .T., ;
		Column25.Sparse = .F., ;
		Column25.Width = 51, ;
		Column26.BackColor = 255,202,228, ;
		Column26.ColumnOrder = 15, ;
		Column26.ControlSource = "crsverificareparteneri.adresa_roa", ;
		Column26.DynamicBackColor = "RGB(255,202,228)", ;
		Column26.Name = "Column26", ;
		Column26.ReadOnly = .T., ;
		Column26.Width = 150, ;
		Column27.ColumnOrder = 27, ;
		Column27.ControlSource = "IIF(EMPTY(NVL(sursa,'')),'',IIF(ALLTRIM(sursa)=='ANAF','ANAF','CACHE '+DTOC(NVL(data_sursa,DATE()))+IIF(ALLTRIM(sursa)=='CACHE_INDISP',' (ANAF indisponibil)','')))", ;
		Column27.Name = "Column27", ;
		Column27.ReadOnly = .T., ;
		Column27.Visible = .T., ;
		Column27.Width = 230
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdbase1.cInactiv.Check1' AS checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Height = 17, ;
		Left = 15, ;
		Name = "Check1", ;
		Top = 59, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.cInactiv.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Inactiv", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cInactiv.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 '_grdbase1.Column1._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 13, ;
		Name = "_checkbox1", ;
		ReadOnly = .F., ;
		Top = 84
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ales", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column10.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod postal", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column11.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Telefon", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column12.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Fax", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column13._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 41, ;
		Name = "_checkbox1", ;
		ReadOnly = .T., ;
		Top = 48
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.Column13.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Interogare VIES", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column14._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 49, ;
		Name = "_checkbox1", ;
		ReadOnly = .T., ;
		Top = 72
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.Column14.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Platitor TVA VIES", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column15.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Eroare", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column16.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data verificata", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column16.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 '_grdbase1.Column17._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 41, ;
		Name = "_checkbox1", ;
		ReadOnly = .T., ;
		Top = 48
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.Column17.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Platitor TVA ANAF", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column18._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 50, ;
		Name = "_checkbox1", ;
		Top = 72
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.Column18.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Duplicat", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column19.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Atribut fiscal", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column19.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 '_grdbase1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Denumire", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column20.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Stare", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column21.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Atentie", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column23.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id partener", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column23.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 '_grdbase1.Column26.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Adresa ROA", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column27.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Provenienta", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column27.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 '_grdbase1.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "CIF/CNP", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column4._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 25, ;
		Name = "_checkbox1", ;
		ReadOnly = .T., ;
		Top = 66
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.Column4.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod valid", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column5.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Firma ANAF", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column6.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column7.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Adresa ANAF", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column8.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Judet", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column9.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Reg. com.", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.cSplitTVA.Check1' AS checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Height = 17, ;
		Left = 39, ;
		Name = "Check1", ;
		Top = 71, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.cSplitTVA.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Split TVA", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cSplitTVA.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 '_grdbase1.cTVAincasare.Check1' AS checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Height = 17, ;
		Left = 39, ;
		Name = "Check1", ;
		Top = 59, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.cTVAincasare.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "TVA Incasare", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cTVAincasare.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 'But_renunt1' AS but_renunt WITH ;
		Anchor = 8, ;
		Left = 713, ;
		Name = "But_renunt1", ;
		Top = 0
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_verifica1' AS but_verifica WITH ;
		Anchor = 8, ;
		Comment = "*:OnResize=rt", ;
		Left = 683, ;
		Name = "But_verifica1", ;
		TabIndex = 13, ;
		ToolTipText = "Verificare coduri fiscale", ;
		Top = 0
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'chkANAF' AS _checkbox WITH ;
		Alignment = 0, ;
		Anchor = 6, ;
		Caption = "Serviciu web ANAF", ;
		Enabled = .F., ;
		Left = 441, ;
		Name = "chkANAF", ;
		ToolTipText = "Se verifica prin serviciul web ANAF, cate 500 de coduri fiscale per interogare", ;
		Top = 393, ;
		Value = .F., ;
		Visible = .F.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkDuplicat' AS _checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		Caption = "Coduri duplicate!", ;
		FontBold = .T., ;
		ForeColor = 255,0,0, ;
		Height = 29, ;
		Left = 358, ;
		Name = "chkDuplicat", ;
		SpecialEffect = 0, ;
		Style = 1, ;
		ToolTipText = "Apasati pe buton pentru a selecta codurile fiscale/denumirile duplicate!", ;
		Top = 50, ;
		Visible = .F., ;
		Width = 131
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkExperimental' AS _checkbox WITH ;
		Alignment = 0, ;
		Anchor = 6, ;
		Caption = "Mod experimental", ;
		Enabled = .F., ;
		Left = 313, ;
		Name = "chkExperimental", ;
		ToolTipText = "Nu se cere codul Captcha si se interogheaza www.mfinante.ro fara pauza intre coduri fiscale", ;
		Top = 392, ;
		Value = .F., ;
		Visible = .F.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkInactiv' AS _checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		Caption = "Inactivi!", ;
		FontBold = .T., ;
		Height = 29, ;
		Left = 489, ;
		Name = "chkInactiv", ;
		SpecialEffect = 0, ;
		Style = 1, ;
		ToolTipText = "Apasati pe buton pentru a selecta codurile fiscale invalide!", ;
		Top = 50, ;
		Visible = .F., ;
		Width = 72
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkInvalid' AS _checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		Caption = "Coduri invalide!", ;
		FontBold = .T., ;
		Height = 29, ;
		Left = 248, ;
		Name = "chkInvalid", ;
		SpecialEffect = 0, ;
		Style = 1, ;
		ToolTipText = "Apasati pe buton pentru a selecta codurile fiscale invalide!", ;
		Top = 50, ;
		Visible = .F., ;
		Width = 111
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkLiniaCurenta' AS _checkbox WITH ;
		Alignment = 0, ;
		Anchor = 6, ;
		Caption = "Verificare inregistrari de la linia curenta in jos", ;
		Left = 12, ;
		Name = "chkLiniaCurenta", ;
		ToolTipText = "Verificare inregistrari de la linia curenta in jos (altfel toate inregistrarile)", ;
		Top = 372, ;
		Value = .F.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkMFIN' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Interogare Min. Finante", ;
		Enabled = .F., ;
		Left = 12, ;
		Name = "chkMFIN", ;
		ToolTipText = "Informatii persoane juridice de pe website-ul www.mfinante.ro (cod, firma, adresa, reg. com. cod postal, telefon, fax)", ;
		Top = 32, ;
		Value = .T.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkMFINURL' AS _checkbox WITH ;
		Alignment = 0, ;
		Anchor = 6, ;
		Caption = "Interogare mfinante.ro via romfast.ro", ;
		Enabled = .F., ;
		Left = 312, ;
		Name = "chkMFINURL", ;
		ToolTipText = "Interogare direct mfinante.ro sau via romfast.ro", ;
		Top = 372, ;
		Value = .F., ;
		Visible = .F.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkPlatitor' AS _checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		BackColor = 150,150,150, ;
		Caption = "(Ne)Platitori TVA (cu/fara) RO!", ;
		FontBold = .T., ;
		Height = 29, ;
		Left = 564, ;
		Name = "chkPlatitor", ;
		SpecialEffect = 0, ;
		Style = 1, ;
		ToolTipText = "Apasati pe buton pentru a selecta inregistrarile Platitori TVA fara RO sau Neplatitori TVA cu RO", ;
		Top = 50, ;
		Visible = .F., ;
		Width = 210
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkVIES' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Interogare VIES", ;
		Left = 12, ;
		Name = "chkVIES", ;
		ToolTipText = "Calitate platitor TVA din registrul operatorilor intracomunitari de pe website-ul ec.europa.eu", ;
		Top = 57, ;
		Value = .T.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkVIESURL' AS _checkbox WITH ;
		Alignment = 0, ;
		Anchor = 6, ;
		Caption = "Interogare ec.europa.eu via romfast.ro", ;
		Enabled = .F., ;
		Left = 12, ;
		Name = "chkVIESURL", ;
		ToolTipText = "Interogare direct ec.europa.eu sau via romfast.ro", ;
		Top = 392, ;
		Value = .F., ;
		Visible = .F.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'cmdVerifica' AS cmd_executa WITH ;
		BackColor = 0,0,0, ;
		caction = do_verifica, ;
		Caption = "\<Verifica!!", ;
		ForeColor = 255,255,0, ;
		Height = 29, ;
		Left = 158, ;
		Name = "cmdVerifica", ;
		SpecialEffect = 0, ;
		ToolTipText = "Verificare coduri fiscale", ;
		Top = 51
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Gridextra1' AS gridextra WITH ;
		allowgridpreferences = .F., ;
		gridexpression = Thisform._grdbase1, ;
		Height = 17, ;
		Left = 744, ;
		Name = "Gridextra1", ;
		Top = 36, ;
		Width = 24
		*< END OBJECT: ClassLib="..\utile\gridextras\gridextras.vcx" BaseClass="custom" />

	ADD OBJECT 'lblInfo' AS _label WITH ;
		Caption = "Apasati ESC pentru a intrerupe verificarile *** Dublu click pe Denumire pentru verificare manuala / istoric verificari", ;
		FontSize = 8, ;
		ForeColor = 255,255,128, ;
		Left = 12, ;
		Name = "lblInfo", ;
		Top = 16, ;
		Visible = .F.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'lblVerifica' AS _label WITH ;
		Anchor = 10, ;
		AutoSize = .F., ;
		Caption = "Se verifica...", ;
		FontBold = .T., ;
		Height = 17, ;
		Left = 162, ;
		Name = "lblVerifica", ;
		Top = 32, ;
		Visible = .F., ;
		Width = 606
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'spnPauza' AS _spinner WITH ;
		Anchor = 6, ;
		Enabled = .F., ;
		Height = 24, ;
		Increment =   1.00, ;
		KeyboardHighValue = 100, ;
		KeyboardLowValue = 0, ;
		Left = 245, ;
		Name = "spnPauza", ;
		SpinnerHighValue = 100.00, ;
		SpinnerLowValue =   0.00, ;
		ToolTipText = "Pauza (sec) intre interogarile www.mfinante.ro", ;
		Top = 388, ;
		Value = 5.0, ;
		Visible = .F., ;
		Width = 56
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="spinner" />
	
	PROCEDURE Activate
		*** lansez verificarea automat, cand sunt apelat cu lista de parteneri din Reg TVA
		*** o lansez pe activate ca sa se vada tabelul cu parteneri cand se face verificarea
		Local llMFin, llVIES, llValidare
		llMFin = This.chkMFIN.Value
		llVIES = This.chkVIES.Value
		llValidare = .T.
		If This.lAutoverificare
			This.lAutoverificare = .F. && sa nu mai fac autoverificarea la un activate ulterior
			Select crsVerificareParteneri
			Go top 
			this._grdbase1.Refresh()
			This.do_verifica(m.llValidare, m.llMFin, m.llVIES)
		Endif
	ENDPROC

	PROCEDURE do_termin
		Local lcMFINROMFAST, lcVIESROMFAST
		lcMFINROMFAST = TRANSFORM(this.chkMFINURL.Value)
		lcVIESROMFAST = TRANSFORM(this.chkVIESURL.Value)
		goAPI.WriteProfileString(m.gcSettingsFile, [validare], "mfinromfast", m.lcMFINROMFAST) 
		goAPI.WriteProfileString(m.gcSettingsFile, [validare], "viesromfast", m.lcVIESROMFAST) 
		DODEFAULT() 
	ENDPROC

	PROCEDURE do_verifica
		Lparameters tlValidare, tlMFIN, tlVIES
		*** tlValidare - se doreste validarea codurilor (se apeleaza din INIT automat)
		*** tlMFIN - se doreste verificarea MFIN (se apeleaza din INIT automat)
		*** tlVIES - se doreste verificarea VIES (se apeleaza din INIT automat)
		
		Local lcCodFiscal, lcEroare, lcKey, lcTipInterogare, lcXml, llAtributFiscal, llMFINURL, llVIESURL
		Local llMFIN, llVIES
		Local llLiniaCurenta, lnRecord, lcConditieSuplimentara, llModExperimental
		
		Local loPartener
		llMFINURL = This.chkMFINURL.Value && verificare prin ROMFAST.RO = .T.
		llVIESURL = This.chkVIESURL.Value && verificare prin ROMFAST.RO = .T.
		
		llLiniaCurenta = This.chkLiniaCurenta.Value
		lcConditieSuplimentara = ".T."
		lnRecord = 1
		If m.llLiniaCurenta
			lnRecord = Iif(!Eof(), Recno('crsVerificareParteneri'), 0)
			lnRecord = Max(m.lnRecord, 1)
		Endif
		*!* VERIFIC CIF, CNP VALID
		Local loVerificare
		*!*	glRCViesURL = .T.
		*!*	gcRCVIESURL = "http://localhost/update/verificarecod.aspx/verificarecod/verificare/CIF/|CIF|/VIES"
		*!*	loVerificare = Createobject("verificarecod", glRCViesURL, glRCMfinURL, gcRCRomfastURL, gcRCMfinanteURL, gcRCMfinanteParams) && validare.prg
		loVerificare = Createobject("verificarecod", m.llMFINURL, m.llVIESURL) && validare.prg
		
		*!* MOD EXPERIMENTAL
		llModExperimental = This.chkExperimental.Value
		llServiciuWebANAF = This.chkANAF.Value
		
		loVerificare.lOneSession = !m.llModExperimental
		loVerificare.lCaptcha = !m.llModExperimental
		*!* MOD EXPERIMENTAL ^
		
		llValidare = Iif(Pcount() >= 1, m.tlValidare, .F.)
		llMFIN = Iif(Pcount() >= 2, m.tlMFIN, This.chkMFIN.Value)
		llVIES = Iif(Pcount() >= 3, m.tlVIES, This.chkVIES.Value)
		
		llValidare = llValidare Or m.llMFIN Or m.llVIES && se valideaza codurile daca se doreste verificarea MFIN/VIES
		*** VERIFICARE CODURI FISCALE, PARTENERI DUPLICATI
		Select cod_fiscal, Count(*) As nr From crsVerificareParteneri Group By cod_fiscal Having nr > 1 Into Cursor cCodDuplicat
		Select denumire, Count(*) As nr From crsVerificareParteneri Group By denumire Having nr > 1 Into Cursor cDenumireDuplicat
		Select cCodDuplicat
		Scan
			lcCodFiscal = cod_fiscal
			Update crsVerificareParteneri Set duplicat = .T. Where cod_fiscal = m.lcCodFiscal
		Endscan
		Select cDenumireDuplicat
		Scan
			lcDenumire = denumire
			Update crsVerificareParteneri Set duplicat = .T. Where denumire = m.lcDenumire
		Endscan
		Use In (Select('cCodDuplicat'))
		Use In (Select('cDenumireDuplicat'))
		
		*** activez checkboxul CODURI/DENUMIRI DUPLICATE
		Select crsVerificareParteneri
		Locate For duplicat
		This.chkDuplicat.Visible = Found()
		
		Go Top In crsVerificareParteneri
		
		If m.llValidare Or m.llMFIN Or m.llVIES
			Select crsVerificareParteneri
			Replace All IsCIF With loVerificare.IsCIF(cod_fiscal)
			Replace All Valid With Iif(IsCIF, loVerificare.validare('CIF', cod_fiscal), loVerificare.validare('CNP', cod_fiscal))
			REPLACE all valid with .T. FOR EMPTY(NVL(cod_fiscal,'')) && nu consider invalide codurile fiscale goale
			*** activez checkboxul CODURI INVALIDE
			Locate For !Valid
			This.chkInvalid.Visible = Found()
		
			Go Top In crsVerificareParteneri
		Endif
		
		If !(m.llVIES Or m.llMFIN)
			Return
		Endif
		
		This.lblVerifica.Visible = .T.
		This.cmdVerifica.Visible = .F.
		
		*!* VERIFIC CODURILE FISCALE VALIDE PENTRU ATRIBUTUL FISCAL IN VIES
		lcTipInterogare = Iif(m.llVIES, 'VIES', '') + Iif(m.llMFIN, 'MFIN', '')
		
		lcConditieSuplimentara = Iif(m.llLiniaCurenta, "recno() >= " + Alltrim(Str(m.lnRecord)), ".T.")
		If m.llServiciuWebANAF
			&& verificare serviciu web ANAF
			SELECT distinct cod_fiscal, IIF(!EMPTY(NVL(data, {})), data, DATE(m.gnAn, m.gnLuna, 1)) as data ;
				FROM crsVerificareParteneri ;
				WHERE Valid And IsCIF And &lcConditieSuplimentara ;
				INTO CURSOR cListaCIFTempX
			
			loVerificareANAF = CREATEOBJECT("VerificareANAF") && validare.prg
			
			SELECT crsVerificareParteneri
			REPLACE ALL cod_fiscalfro WITH ALLTRIM(Strtran(cod_fiscal, loVerificare.GetCodTara(cod_fiscal),''))
			INDEX ON cod_fiscalfro TAG cfro
			
			SELECT distinct data FROM cListaCIFTempX INTO CURSOR cListaCIFTempData
			SELECT cListaCIFTempData
			SCAN 
				ldData = data
				SELECT cod_fiscal FROM cListaCIFTempX WHERE data = m.ldData INTO CURSOR cListaCIFTemp
		
				lcCursorVerificareANAF = loVerificareANAF.VerificaListaCIF("cListaCIFTemp", m.ldData)
				USE IN (SELECT('cListaCIFTemp'))
				IF USED(m.lcCursorVerificareANAF)	
					SELECT (m.lcCursorVerificareANAF)
					* cui, Data, denumire, adresa, tva, data_sfarsit, data_anul_imp, mesaj
					SCAN 
						SCATTER NAME loRec
						WITH loRec
							lcCheieCauta = PADR(ALLTRIM(STR(.cui)), 30)
							SELECT crsVerificareParteneri
							llGasit = .F.
							IF SEEK(m.lcCheieCauta, 'crsVerificareParteneri', 'cfro')
								llGasit = .T.
								DO WHILE !(EMPTY(NVL(data, {})) OR data = m.ldData)
									SKIP
									IF EOF() OR cod_fiscalfro <> m.lcCheieCauta
										llGasit = .F.
										EXIT
									ENDIF
								ENDDO
							ENDIF
							IF llGasit
								Replace firma With .denumire, adresa With .adresa, datatvamfin With TRANSFORM(.data), platitortvamfin With .tva, stare With .mesaj, cod WITH ALLTRIM(STR(.cui)), ;
									tvaincasare WITH .tvaincasare, splittva WITH .splittva, inactiv WITH .inactiv, ;
									sursa WITH NVL(.sursa, 'ANAF'), data_sursa WITH .data_sursa
							ENDIF 
						ENDWITH 
					ENDSCAN && (m.lcCursorVerificareANAF)	
				ENDIF 
			ENDSCAN && cListaCIFTempData
			SET ORDER TO 0 IN crsVerificareParteneri
			USE IN (SELECT('cListaCIFTempData'))	
			USE IN (SELECT('cListaCIFTempX'))
			USE IN (SELECT('cListaCIFTemp'))
			
		Else
			&& verificare pagina mfinante.ro
			Select crsVerificareParteneri
			Scan For Valid And IsCIF And &lcConditieSuplimentara
				lcEroare = ""
				lcCodFiscal = Alltrim(Upper(cod_fiscal))
				llAtributFiscal = Isalpha(lcCodFiscal)
				This.lblVerifica.Caption = "Se verifica... " + Alltrim(denumire) + ' ' + Transform(Recno()) + "/" + Transform(Reccount()) + " " + Transform(Round(Recno()/Reccount()*100,2)) + ' % * Apasati tasta <ESC> pentru a intrerupe operatia de verificare'
				Wait Window Alltrim(denumire) + ' ' + Transform(Recno()) + "/" + Transform(Reccount()) + " " + Transform(Round(Recno()/Reccount()*100,2)) + ' %' + ;
					Chr(13) + Chr(10) + '* Apasati tasta <ESC> pentru a intrerupe operatia de verificare' Nowait
		
				*!*		if m.llModExperimental
				*!*			loVerificare = Createobject("verificarecod", m.llMFINURL, m.llVIESURL) && validare.prg
				*!*			loVerificare.lCaptcha = .F.
				*!*		endif
		
				lcXml = loVerificare.Verificare('CIF', lcCodFiscal, m.lcTipInterogare)
				If Type('loVerificare.oEntitate') = 'O'
					loPartener = loVerificare.oEntitate
					lcEroare = loPartener.eroare
					With loPartener
						Replace cod With .cod, eroare With .eroare In crsVerificareParteneri
						If m.llVIES
							Replace VIES With .VIES, platitorTVA With .platitorTVA In crsVerificareParteneri
						Endif
						If m.llMFIN
							Replace firma With .firma, adresa With .adresa, judet With .judet, regcom With .regcom, ;
								codpostal With .codpostal, telefon With .telefon, fax With .fax, ;
								datatvamfin With .datatvamfin, platitortvamfin With .platitortvamfin, stare With .stare ;
								In crsVerificareParteneri
						Endif
					Endwith
				Endif
		
				If !Empty(lcEroare) And aMESSAGEBOX(lcEroare + CRLF + 'Doriti sa continuati?', 4+ 32, _Screen.Caption) <> 6
					Exit
				Endif
		
		
				If !m.llModExperimental
					If Recno('crsVerificareParteneri') < Reccount('crsVerificareParteneri')
						lcKey = Inkey(This.spnPauza.Value)
						If lcKey = 27 && ESC
							If aMESSAGEBOX('Doriti sa intrerupeti operatia?', 4+32, _Screen.Caption) = 6
								Exit
							Endif
						Endif
					Endif
				Else
					If Mod(Recno('crsVerificareParteneri'), 50) = 0 && astept 1 secunda la fiecare 50 inregistrari
						lcKey = Inkey(1)
						If lcKey = 27 && ESC
							If aMESSAGEBOX('Doriti sa intrerupeti operatia?', 4+32, _Screen.Caption) = 6
								Exit
							Endif
						Endif
					Endif
				Endif
			Endscan
		ENDIF && m.llServiciuWebANAF
		Release loVerificare
		
		Update crsVerificareParteneri Set atentie = 'DUPLICAT' Where duplicat
		Update crsVerificareParteneri Set atentie = Alltrim(Alltrim(atentie) + ' ' + Iif(!platitortvamfin, 'NE', '') + 'PLATITOR TVA') Where !Empty(firma) And ((Upper(atribut_fiscal) = 'RO' And !platitortvamfin) Or (Empty(atribut_fiscal) And platitortvamfin))
		
		*** activez checkboxul platitor TVA fara RO
		Select crsVerificareParteneri
		Locate For 'PLATITOR TVA'$atentie
		This.chkPlatitor.Visible = Found()
		
		LOCATE FOR inactiv
		This.chkInactiv.Visible = Found()
		
		This.lblVerifica.Visible = .F.
		This.cmdVerifica.Visible = .T.
		
		Go Top In crsVerificareParteneri
		
		
	ENDPROC

	PROCEDURE filtreatentionari
		LOCAL lcFilter
		lcFilter = Iif(Thisform.chkInvalid.Value = 1, "!valid", ".T.") + ' and ' + ;
			Iif(Thisform.chkDuplicat.Value = 1, "duplicat", ".T.") + ' And ' + ;
			Iif(Thisform.chkPlatitor.Value = 1, "'PLATITOR'$ATENTIE", ".T.") + ' And ' + ;
			Iif(Thisform.chkInactiv.Value = 1, "inactiv", ".T.")
		
		Thisform.gridextra1.customcolumnfilters[1,5] = m.lcFilter
		Thisform.gridExtra1.applyfilter()
	ENDPROC

	PROCEDURE Init
		LPARAMETERS tlValidare, tlMFIN, tlVIES, tlAutoVerificare, tlExperimental, tlServiciuWebANAF
		*** tlExperimental: .T. se verifica mfinante.ro fara captcha, fara pauze, cu interogari distincte pentru fiecare cod
		*** tlServiciuWebANAF: .T. se verifica prin serviciul web ANAF, cate 500 de coduri fiscale per interogare
		
		#DEFINE CRLF CHR(13) + CHR(10)
		Local lcMFINROMFAST, lcVIESROMFAST, llMFINROMFAST, llVIESROMFAST
		
		lcMFINROMFAST = goAPI.GetProfileString(m.gcSettingsFile, [validare], "mfinromfast") 
		lcVIESROMFAST = goAPI.GetProfileString(m.gcSettingsFile, [validare], "viesromfast") 
		lcMFINROMFAST = NVL(m.lcMFINROMFAST, '')
		lcVIESROMFAST = NVL(m.lcVIESROMFAST, '')
		IF !INLIST(m.lcMFINROMFAST, '.T.', '.F.')
			llMFINROMFAST = .F.
		ELSE 
			llMFINROMFAST = &lcMFINROMFAST
		ENDIF 
		IF !INLIST(m.lcVIESROMFAST, '.T.', '.F.')
			llVIESROMFAST = .F.
		ELSE 
			llVIESROMFAST = &lcVIESROMFAST
		ENDIF 
		
		* Nu mai intretin nici un serviciu pentru verificarea prin romfast.ro
		llMFINROMFAST = .F.
		llVIESROMFAST = .F.	
		tlExperimental = .F. && nu mai functioneaza mfinante.ro experimental
		
		this.chkMFINURL.Value = m.llMFINROMFAST
		this.chkVIESURL.Value = m.llVIESROMFAST
		
		this.chkMFIN.Value = m.tlMFIN
		this.chkVIES.Value = m.tlVIES
		
		this.chkExperimental.Value = m.tlExperimental
		this.chkANAF.Value = .T. && m.tlServiciuWebANAF mai functioneaza doar serviciul ANAF, nu si mfinante.ro 
			
		*!*	this.but_verifica1.ToolTipText = "Verificare coduri fiscale"
		
		this.spnPauza.ToolTipText = "Pauza (sec) intre interogarile www.mfinante.ro" + CHR(13) + CHR(10) + ;
			"Daca interogarile sunt prea dese, mfinante.ro blocheaza cautarile." + CHR(13) + CHR(10) + ;
			"Incercati pauze mai mari de 5-6 secunde!"
			
		this.WindowState = 2 
		this.gridextra1.setup()
		
		DODEFAULT()
		
		This.lAutoVerificare = m.tlAutoVerificare
		
		
		
		*** FONT ROSU PENTRU CODURILE, PARTENERII DUPLICATI
		this._grdbase1.SetAll("DynamicForeColor","IIF(duplicat, RGB(255,0,0), RGB(0,0,0))", "Column")
		*** FUNDAL GRI PENTRU PARTENERII CU RO SI FARA DATA LUARII IN EVIDENTA TVA SAU FARA RO SI CU DATA LUARII IN EVIDENTA TVA
		this._grdbase1.SetAll("DynamicBackColor","IIF('PLATITOR TVA'$ATENTIE, RGB(200,200,200), RGB(255,255,255))", "Column")
		
		SELECT crsVerificareParteneri
		GO TOP 
		
		this._grDBASE1.HeaderHeight = 32 
	ENDPROC

	PROCEDURE Load
		*** campurile de provenienta (cache/ANAF) trebuie sa existe INAINTE ca grid-ul sa se construiasca (Load ruleaza inaintea obiectelor din forma);
		*** ALTER TABLE nu functioneaza pe acest cursor (are campuri peste 10 caractere, ex. platitortvamfin) - se rematerializeaza cu SELECT
		LOCAL lcAliasTmp
		IF TYPE('crsVerificareParteneri.sursa') = 'U'
			lcAliasTmp = 'crsVPTmp' + Sys(2015)
			SELECT *, SPACE(20) AS sursa, {} AS data_sursa FROM crsVerificareParteneri INTO CURSOR (lcAliasTmp) READWRITE
			USE IN (SELECT('crsVerificareParteneri'))
			SELECT * FROM (lcAliasTmp) INTO CURSOR crsVerificareParteneri READWRITE
			USE IN (SELECT(lcAliasTmp))
		ENDIF
		DODEFAULT()
	ENDPROC

	PROCEDURE meniu_dblclick
		*** Verificare cod fiscal de pe inregistrarea curenta
		Local loDate As "empty"
		Local lcAlias, lcCodFiscal, lcDenumire, lnOptiune, lnRaspuns, loPartener
		
		lnOptiune = 0
		loPartener = Null
		loDate = Createobject("empty")
		
		lcAlias = This._grdbase1.RecordSource
		Select (m.lcAlias)
		AddProperty(loDate, "denumire",  Alltrim(denumire))
		AddProperty(loDate, "cod_fiscal", Alltrim(Nvl(cod_fiscal, '')))
		
		lnRaspuns = VerificaCodFiscal(loDate, @lnOptiune, @loPartener)
	ENDPROC

	PROCEDURE chkDuplicat.Click
		Thisform.FiltreAtentionari()
	ENDPROC

	PROCEDURE chkInactiv.Click
		Thisform.FiltreAtentionari()
	ENDPROC

	PROCEDURE chkInvalid.Click
		Thisform.FiltreAtentionari()
		
	ENDPROC

	PROCEDURE chkMFIN.ProgrammaticChange
		Thisform.chkMFINURL.Visible = .F. && This.Value 
		thisform.spnPauza.Visible =  .F. && This.Value
		thisform.chkLiniaCurenta.Visible = This.Value or thisform.chkVies.Value
	ENDPROC

	PROCEDURE chkMFIN.Valid
		Thisform.chkMFINURL.Visible = This.Value 
		thisform.spnPauza.Visible =  This.Value
		thisform.chkLiniaCurenta.Visible = This.Value or thisform.chkVies.Value
	ENDPROC

	PROCEDURE chkPlatitor.Click
		Thisform.FiltreAtentionari()
	ENDPROC

	PROCEDURE chkVIES.ProgrammaticChange
		Thisform.chkViesURL.Visible = .F. && This.Value 
		thisform.chkLiniaCurenta.Visible = This.Value or thisform.chkMfin.Value
	ENDPROC

	PROCEDURE chkVIES.Valid
		Thisform.chkViesURL.Visible = This.Value 
		thisform.chkLiniaCurenta.Visible = This.Value or thisform.chkMfin.Value
	ENDPROC

	PROCEDURE _grdbase1.Column16.Text1.DblClick
		Thisform.meniu_dblclick()
	ENDPROC

	PROCEDURE _grdbase1.Column2.Text1.DblClick
		Thisform.meniu_dblclick()
		
	ENDPROC

	PROCEDURE _grdbase1.Column20.Text1.DblClick
		Thisform.meniu_dblclick()
	ENDPROC

	PROCEDURE _grdbase1.Column3.Text1.DblClick
		Thisform.meniu_dblclick()
	ENDPROC

	PROCEDURE _grdbase1.Column5.Text1.DblClick
		Thisform.meniu_dblclick()
	ENDPROC

	PROCEDURE _grdbase1.Column6.Text1.DblClick
		Thisform.meniu_dblclick()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_verificare_parteneri_istoric 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="_grdbase1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cFirma.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cFirma.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cCodFiscal.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cCodFiscal.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cAdresa.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cAdresa.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cJudet.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cJudet.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cRegCom.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cRegCom.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cCodPostal.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cCodPostal.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cTelefon.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cTelefon.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cFax.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cFax.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cPlatitorTVAVies.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cPlatitorTVAVies.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cPlatitorTVAVies._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataTVAMfin.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataTVAMfin.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cPlatitorTVAMfin.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cPlatitorTVAMfin.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cPlatitorTVAMfin._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cStare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cStare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataOra.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataOra.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cUtil.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cUtil.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataOraV.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataOraV.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cUtilV.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cUtilV.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataOravAnaf.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataOravAnaf.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cTvaIncasare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cTvaIncasare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cTvaIncasare._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cSplitTva.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cSplitTva.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cSplitTva._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cInactiv.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cInactiv.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cInactiv._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataInceputScpTva.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataInceputScpTva.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataSfarsitScpTva.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataSfarsitScpTva.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataAnulImpScpTva.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataAnulImpScpTva.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataInceputTvaInc.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataInceputTvaInc.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataSfarsitTvaInc.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataSfarsitTvaInc.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataInactivare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataInactivare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataReactivare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.cDataReactivare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Gridextra1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lblInfo" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: do_lanseaza_mfin
		*p: lautoverificare		&& Daca se porneste verificarea automat din metoda Show, cand este apelata verificarea din Reg. TVA
		*p: lmfin
		*p: lvies
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 3
		Caption = "Verificare Parteneri"
		cbuton1 = but_excel1
		cusername = 
		DoCreate = .T.
		Height = 234
		lautoverificare = .F.
		lmfin = .F.
		lvies = .F.
		Name = "frm_verificare_parteneri_istoric"
		Width = 774
		_memberdata = <VFPData>
			<memberdata name="lvies" display="lVIES"/>
			<memberdata name="lmfin" display="lMFIN"/>
		</VFPData>
		_shape1.Anchor = 10
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 780
		_SHAPE2.Left = 720
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		Lb_titlu_alb_b121.Caption = "Verificare parteneri istoric"
		Lb_titlu_alb_b121.Left = 12
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.Top = 0
		BUT_TERMIN1.Anchor = 8
		BUT_TERMIN1.Left = 743
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 0
		GRIDSORT1.Name = "GRIDSORT1"
		GRIDSORT1.Top = 41
	*</PropValue>

	ADD OBJECT '_grdbase1' AS _grdbase WITH ;
		Anchor = 15, ;
		ColumnCount = 27, ;
		DeleteMark = .F., ;
		HeaderHeight = 32, ;
		Height = 190, ;
		Left = 12, ;
		Name = "_grdbase1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "crsVerificareParteneriIstoric", ;
		Top = 38, ;
		Width = 756, ;
		Column1.ColumnOrder = 2, ;
		Column1.ControlSource = "firma", ;
		Column1.Name = "cFirma", ;
		Column1.ReadOnly = .T., ;
		Column1.Visible = .T., ;
		Column1.Width = 75, ;
		Column2.ColumnOrder = 1, ;
		Column2.ControlSource = "cod_fiscal", ;
		Column2.Name = "cCodFiscal", ;
		Column2.ReadOnly = .T., ;
		Column2.Visible = .T., ;
		Column2.Width = 75, ;
		Column3.ColumnOrder = 7, ;
		Column3.ControlSource = "adresa", ;
		Column3.Name = "cAdresa", ;
		Column3.ReadOnly = .T., ;
		Column3.Visible = .T., ;
		Column3.Width = 75, ;
		Column4.ColumnOrder = 8, ;
		Column4.ControlSource = "judet", ;
		Column4.Name = "cJudet", ;
		Column4.ReadOnly = .T., ;
		Column4.Visible = .T., ;
		Column4.Width = 75, ;
		Column5.ColumnOrder = 9, ;
		Column5.ControlSource = "regcom", ;
		Column5.Name = "cRegCom", ;
		Column5.ReadOnly = .T., ;
		Column5.Visible = .T., ;
		Column5.Width = 75, ;
		Column6.ColumnOrder = 10, ;
		Column6.ControlSource = "codpostal", ;
		Column6.Name = "cCodPostal", ;
		Column6.ReadOnly = .T., ;
		Column6.Visible = .F., ;
		Column6.Width = 75, ;
		Column7.ColumnOrder = 11, ;
		Column7.ControlSource = "telefon", ;
		Column7.Name = "cTelefon", ;
		Column7.ReadOnly = .T., ;
		Column7.Visible = .F., ;
		Column7.Width = 75, ;
		Column8.ColumnOrder = 12, ;
		Column8.ControlSource = "fax", ;
		Column8.Name = "cFax", ;
		Column8.ReadOnly = .T., ;
		Column8.Visible = .F., ;
		Column8.Width = 75, ;
		Column9.ColumnOrder = 6, ;
		Column9.ControlSource = "platitortvavies", ;
		Column9.CurrentControl = "_checkbox1", ;
		Column9.Name = "cPlatitorTVAVies", ;
		Column9.ReadOnly = .T., ;
		Column9.Sparse = .F., ;
		Column9.Visible = .F., ;
		Column9.Width = 54, ;
		Column10.ColumnOrder = 5, ;
		Column10.ControlSource = "datatvamfin", ;
		Column10.Name = "cDataTVAMfin", ;
		Column10.ReadOnly = .T., ;
		Column10.Visible = .F., ;
		Column11.ColumnOrder = 4, ;
		Column11.ControlSource = "platitortvamfin", ;
		Column11.CurrentControl = "_checkbox1", ;
		Column11.Name = "cPlatitorTVAMfin", ;
		Column11.ReadOnly = .T., ;
		Column11.Sparse = .F., ;
		Column11.Visible = .F., ;
		Column11.Width = 51, ;
		Column12.ColumnOrder = 3, ;
		Column12.ControlSource = "stare", ;
		Column12.Name = "cStare", ;
		Column12.ReadOnly = .T., ;
		Column12.Width = 88, ;
		Column13.ControlSource = "dataora", ;
		Column13.Name = "cDataOra", ;
		Column13.ReadOnly = .T., ;
		Column14.ControlSource = "util", ;
		Column14.Name = "cUtil", ;
		Column14.ReadOnly = .T., ;
		Column14.Width = 103, ;
		Column15.ControlSource = "dataorav", ;
		Column15.Name = "cDataOraV", ;
		Column15.ReadOnly = .T., ;
		Column16.ControlSource = "utilv", ;
		Column16.Name = "cUtilV", ;
		Column16.ReadOnly = .T., ;
		Column16.Width = 114, ;
		Column17.ControlSource = "dataorav_anaf", ;
		Column17.Name = "cDataOravAnaf", ;
		Column17.ReadOnly = .T., ;
		Column17.Width = 85, ;
		Column18.ControlSource = "tvaincasare", ;
		Column18.CurrentControl = "_checkbox1", ;
		Column18.Name = "cTvaIncasare", ;
		Column18.ReadOnly = .T., ;
		Column18.Sparse = .F., ;
		Column18.Width = 54, ;
		Column19.ControlSource = "splittva", ;
		Column19.CurrentControl = "_checkbox1", ;
		Column19.Name = "cSplitTva", ;
		Column19.ReadOnly = .T., ;
		Column19.Sparse = .F., ;
		Column19.Width = 54, ;
		Column20.ControlSource = "inactiv", ;
		Column20.CurrentControl = "_checkbox1", ;
		Column20.Name = "cInactiv", ;
		Column20.ReadOnly = .T., ;
		Column20.Sparse = .F., ;
		Column20.Width = 54, ;
		Column21.ControlSource = "data_inceput_scptva", ;
		Column21.Name = "cDataInceputScpTva", ;
		Column21.ReadOnly = .T., ;
		Column21.Width = 85, ;
		Column22.ControlSource = "data_sfarsit_scptva", ;
		Column22.Name = "cDataSfarsitScpTva", ;
		Column22.ReadOnly = .T., ;
		Column22.Width = 85, ;
		Column23.ControlSource = "data_anul_imp_scptva", ;
		Column23.Name = "cDataAnulImpScpTva", ;
		Column23.ReadOnly = .T., ;
		Column23.Width = 85, ;
		Column24.ControlSource = "data_inceput_tvainc", ;
		Column24.Name = "cDataInceputTvaInc", ;
		Column24.ReadOnly = .T., ;
		Column24.Width = 85, ;
		Column25.ControlSource = "data_sfarsit_tvainc", ;
		Column25.Name = "cDataSfarsitTvaInc", ;
		Column25.ReadOnly = .T., ;
		Column25.Width = 85, ;
		Column26.ControlSource = "data_inactivare", ;
		Column26.Name = "cDataInactivare", ;
		Column26.ReadOnly = .T., ;
		Column26.Width = 85, ;
		Column27.ControlSource = "data_reactivare", ;
		Column27.Name = "cDataReactivare", ;
		Column27.ReadOnly = .T., ;
		Column27.Width = 85
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdbase1.cAdresa.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Adresa", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cAdresa.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cCodFiscal.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod Fiscal", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cCodFiscal.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cCodPostal.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod postal", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cCodPostal.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cDataAnulImpScpTva.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Anulare scutire TVA", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.cDataInactivare.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data inactivare", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.cDataInceputScpTva.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Inceput scutire TVA", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.cDataInceputTvaInc.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Inceput TVA incasare", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.cDataOra.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Creat la", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cDataOra.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cDataOraV.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Verificat la", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cDataOraV.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cDataOravAnaf.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data ANAF", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.cDataReactivare.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data reactivare", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.cDataSfarsitScpTva.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sfarsit scutire TVA", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.cDataSfarsitTvaInc.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sfarsit TVA incasare", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.cDataTVAMfin.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data TVA MFIN", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.cFax.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Fax", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cFax.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cFirma.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Denumire", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cFirma.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cInactiv._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 19, ;
		Name = "_checkbox1", ;
		ReadOnly = .T., ;
		Top = 96
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.cInactiv.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Inactiv", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cInactiv.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cJudet.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Judet", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cJudet.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cPlatitorTVAMfin._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 41, ;
		Name = "_checkbox1", ;
		ReadOnly = .T., ;
		Top = 48
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.cPlatitorTVAMfin.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Platitor TVA MFIN", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cPlatitorTVAMfin.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cPlatitorTVAVies._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 49, ;
		Name = "_checkbox1", ;
		ReadOnly = .T., ;
		Top = 72
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.cPlatitorTVAVies.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Platitor TVA VIES", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cPlatitorTVAVies.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cRegCom.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Reg. com.", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cRegCom.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cSplitTva._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 19, ;
		Name = "_checkbox1", ;
		ReadOnly = .T., ;
		Top = 120
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.cSplitTva.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Split TVA", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cSplitTva.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cStare.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Stare", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cStare.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cTelefon.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Telefon", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cTelefon.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cTvaIncasare._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 19, ;
		Name = "_checkbox1", ;
		ReadOnly = .T., ;
		Top = 144
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.cTvaIncasare.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "TVA incasare", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cTvaIncasare.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cUtil.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Creat de", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cUtil.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.cUtilV.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Verificat de", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.cUtilV.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Gridextra1' AS gridextra WITH ;
		gridexpression = Thisform._grdbase1, ;
		Height = 17, ;
		Left = 744, ;
		Name = "Gridextra1", ;
		Top = 36, ;
		Width = 24
		*< END OBJECT: ClassLib="..\utile\gridextras\gridextras.vcx" BaseClass="custom" />

	ADD OBJECT 'lblInfo' AS _label WITH ;
		Caption = "Dublu click pe Denumire pentru verificare manuala pe www.mfinante.ro", ;
		FontSize = 8, ;
		ForeColor = 255,255,128, ;
		Left = 12, ;
		Name = "lblInfo", ;
		Top = 16
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />
	
	PROCEDURE Activate
		*** nu sterge
	ENDPROC

	PROCEDURE do_lanseaza_mfin
		Local lcCodFiscal
		lcCodFiscal = ALLTRIM(cod_fiscal)
		IF ISALPHA(lcCodFiscal)
			lcCodFiscal = ALLTRIM(SUBSTR(lcCodFiscal, 2))
			IF ISALPHA(lcCodFiscal)
				lcCodFiscal = ALLTRIM(SUBSTR(lcCodFiscal, 2))
			ENDIF 
		ENDIF 	
		OPEN_DEFAULT_APP("http://www.mfinante.ro/infocodfiscal.html?pagina=domenii&cod=" + m.lcCodFiscal)
	ENDPROC

	PROCEDURE Init
		Lparameters tcCodFiscal, tcNume
		Local lcTitlu
		lcTitlu = ""
		
		If !Empty(m.tcCodFiscal)
			lcTitlu = lcTitlu + " " + Alltrim(m.tcCodFiscal)
		EndIf 	
		
		If !Empty(m.tcNume)
			lcTitlu = lcTitlu + " (" + Alltrim(m.tcNume) + ")"
		EndIf 	
		
		
		this.lb_titlu_alb_b121.Caption = "Istoric verificare " + m.lcTitlu
		
		DoDefault()
		this.WindowState = 2 
		this.gridextra1.setup()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_verificare_parteneri_old 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="_grdbase1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column1._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column4._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column6.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column7.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column7.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column8.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column8.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column9.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column9.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column10.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column10.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column11.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column11.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column12.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column12.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column13.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column13.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column13._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column14.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column14.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column14._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column15.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column15.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column16.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column16.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column17.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column17.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column17._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column18.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column18.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column18._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column19.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column19.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column20.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column20.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column21.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column21.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column23.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1.Column23.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_verifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Gridextra1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkMFIN" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkVIES" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkMFINURL" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkVIESURL" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="spnPauza" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lblInfo" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkLiniaCurenta" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkDuplicat" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkPlatitor" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkInvalid" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cmdVerifica" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lblVerifica" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: do_lanseaza_istoric
		*m: do_lanseaza_mfin
		*m: meniu_dblclick
		*p: lautoverificare		&& Daca se porneste verificarea automat din metoda Show, cand este apelata verificarea din Reg. TVA
		*p: lmfin
		*p: lvies
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 3
		Caption = "Verificare Parteneri"
		cbuton1 = but_excel1
		cusername = 
		DoCreate = .T.
		Height = 416
		lautoverificare = .F.
		lmfin = .F.
		lvies = .F.
		Name = "frm_verificare_parteneri"
		Width = 774
		_memberdata = <VFPData>
			<memberdata name="lvies" display="lVIES"/>
			<memberdata name="lmfin" display="lMFIN"/>
		</VFPData>
		_shape1.Anchor = 10
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 780
		_SHAPE2.Left = 597
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		Lb_titlu_alb_b121.Caption = "Verificare parteneri"
		Lb_titlu_alb_b121.Left = 12
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.Top = 0
		BUT_TERMIN1.Anchor = 8
		BUT_TERMIN1.Left = 743
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 0
		GRIDSORT1.Name = "GRIDSORT1"
		GRIDSORT1.Top = 41
	*</PropValue>

	ADD OBJECT '_grdbase1' AS _grdbase WITH ;
		Anchor = 15, ;
		ColumnCount = 22, ;
		DeleteMark = .F., ;
		HeaderHeight = 32, ;
		Height = 283, ;
		Left = 12, ;
		Name = "_grdbase1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "crsverificareparteneri", ;
		Top = 84, ;
		Width = 756, ;
		Column1.ColumnOrder = 1, ;
		Column1.ControlSource = "crsverificareparteneri.ales", ;
		Column1.CurrentControl = "_checkbox1", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .F., ;
		Column1.Sparse = .F., ;
		Column1.Visible = .T., ;
		Column1.Width = 25, ;
		Column2.ColumnOrder = 3, ;
		Column2.ControlSource = "crsverificareparteneri.denumire", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.ToolTipText = "Dublu click pentru verificare manuala pe www.mfinante.ro", ;
		Column2.Visible = .T., ;
		Column2.Width = 75, ;
		Column3.ColumnOrder = 5, ;
		Column3.ControlSource = "crsverificareparteneri.cod_fiscal", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.ToolTipText = "Dublu click pentru verificare manuala pe www.mfinante.ro", ;
		Column3.Visible = .T., ;
		Column3.Width = 75, ;
		Column4.ColumnOrder = 6, ;
		Column4.ControlSource = "crsverificareparteneri.valid", ;
		Column4.CurrentControl = "_checkbox1", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Sparse = .F., ;
		Column4.Visible = .T., ;
		Column4.Width = 41, ;
		Column5.ColumnOrder = 10, ;
		Column5.ControlSource = "crsverificareparteneri.firma", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T., ;
		Column5.Visible = .T., ;
		Column5.Width = 75, ;
		Column6.ColumnOrder = 11, ;
		Column6.ControlSource = "crsverificareparteneri.cod", ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .T., ;
		Column6.Visible = .T., ;
		Column6.Width = 75, ;
		Column7.ColumnOrder = 12, ;
		Column7.ControlSource = "crsverificareparteneri.adresa", ;
		Column7.Name = "Column7", ;
		Column7.ReadOnly = .T., ;
		Column7.Visible = .T., ;
		Column7.Width = 75, ;
		Column8.ColumnOrder = 13, ;
		Column8.ControlSource = "crsverificareparteneri.judet", ;
		Column8.Name = "Column8", ;
		Column8.ReadOnly = .T., ;
		Column8.Visible = .T., ;
		Column8.Width = 75, ;
		Column9.ColumnOrder = 14, ;
		Column9.ControlSource = "crsverificareparteneri.regcom", ;
		Column9.Name = "Column9", ;
		Column9.ReadOnly = .T., ;
		Column9.Visible = .T., ;
		Column9.Width = 75, ;
		Column10.ColumnOrder = 15, ;
		Column10.ControlSource = "crsverificareparteneri.codpostal", ;
		Column10.Name = "Column10", ;
		Column10.ReadOnly = .T., ;
		Column10.Visible = .T., ;
		Column10.Width = 75, ;
		Column11.ColumnOrder = 16, ;
		Column11.ControlSource = "crsverificareparteneri.telefon", ;
		Column11.Name = "Column11", ;
		Column11.ReadOnly = .T., ;
		Column11.Visible = .T., ;
		Column11.Width = 75, ;
		Column12.ColumnOrder = 17, ;
		Column12.ControlSource = "crsverificareparteneri.fax", ;
		Column12.Name = "Column12", ;
		Column12.ReadOnly = .T., ;
		Column12.Visible = .T., ;
		Column12.Width = 75, ;
		Column13.ColumnOrder = 18, ;
		Column13.ControlSource = "crsverificareparteneri.vies", ;
		Column13.CurrentControl = "_checkbox1", ;
		Column13.Name = "Column13", ;
		Column13.ReadOnly = .T., ;
		Column13.Sparse = .F., ;
		Column13.Visible = .T., ;
		Column13.Width = 75, ;
		Column14.ColumnOrder = 19, ;
		Column14.ControlSource = "crsverificareparteneri.platitortva", ;
		Column14.CurrentControl = "_checkbox1", ;
		Column14.Name = "Column14", ;
		Column14.ReadOnly = .T., ;
		Column14.Sparse = .F., ;
		Column14.Visible = .T., ;
		Column14.Width = 75, ;
		Column15.ColumnOrder = 20, ;
		Column15.ControlSource = "crsverificareparteneri.eroare", ;
		Column15.Name = "Column15", ;
		Column15.ReadOnly = .T., ;
		Column15.Visible = .T., ;
		Column15.Width = 58, ;
		Column16.ColumnOrder = 8, ;
		Column16.ControlSource = "datatvamfin", ;
		Column16.Name = "Column16", ;
		Column16.ReadOnly = .T., ;
		Column17.ColumnOrder = 7, ;
		Column17.ControlSource = "platitortvamfin", ;
		Column17.CurrentControl = "_checkbox1", ;
		Column17.Name = "Column17", ;
		Column17.ReadOnly = .T., ;
		Column17.Sparse = .F., ;
		Column17.Width = 71, ;
		Column18.ColumnOrder = 21, ;
		Column18.ControlSource = "crsverificareparteneri.duplicat", ;
		Column18.CurrentControl = "_checkbox1", ;
		Column18.Name = "Column18", ;
		Column18.ReadOnly = .T., ;
		Column18.Sparse = .F., ;
		Column18.Width = 62, ;
		Column19.ColumnOrder = 4, ;
		Column19.ControlSource = "crsverificareparteneri.atribut_fiscal", ;
		Column19.Name = "Column19", ;
		Column19.ReadOnly = .T., ;
		Column19.Width = 41, ;
		Column20.ColumnOrder = 9, ;
		Column20.ControlSource = "stare", ;
		Column20.Name = "Column20", ;
		Column20.ReadOnly = .T., ;
		Column20.Width = 88, ;
		Column21.ColumnOrder = 2, ;
		Column21.ControlSource = "atentie", ;
		Column21.Name = "Column21", ;
		Column21.ReadOnly = .T., ;
		Column21.Width = 78, ;
		Column22.ColumnOrder = 22, ;
		Column22.ControlSource = "crsverificareparteneri.id_part", ;
		Column22.Name = "Column23", ;
		Column22.ReadOnly = .T.
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdbase1.Column1._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 13, ;
		Name = "_checkbox1", ;
		ReadOnly = .F., ;
		Top = 84
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ales", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column10.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod postal", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column10.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column11.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Telefon", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column11.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column12.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Fax", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column12.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column13._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 41, ;
		Name = "_checkbox1", ;
		ReadOnly = .T., ;
		Top = 48
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.Column13.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Interogare VIES", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column13.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column14._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 49, ;
		Name = "_checkbox1", ;
		ReadOnly = .T., ;
		Top = 72
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.Column14.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Platitor TVA VIES", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column14.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column15.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Eroare", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column15.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column16.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data TVA MFIN", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column17._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 41, ;
		Name = "_checkbox1", ;
		ReadOnly = .T., ;
		Top = 48
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.Column17.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Platitor TVA MFIN", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column17.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column18._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 50, ;
		Name = "_checkbox1", ;
		Top = 72
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.Column18.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Duplicat", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column18.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column19.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Atribut fiscal", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Denumire", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column20.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Stare", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column20.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column21.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Atentie", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column21.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column23.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id partener", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdbase1.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "CIF/CNP", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column4._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 25, ;
		Name = "_checkbox1", ;
		ReadOnly = .T., ;
		Top = 66
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdbase1.Column4.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod valid", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column4.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column5.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Firma MFIN", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column5.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column6.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column6.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column7.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Adresa", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column7.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column8.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Judet", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column8.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdbase1.Column9.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Reg. com.", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdbase1.Column9.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_renunt1' AS but_renunt WITH ;
		Anchor = 8, ;
		Left = 713, ;
		Name = "But_renunt1", ;
		Top = 0
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_verifica1' AS but_verifica WITH ;
		Anchor = 8, ;
		Comment = "*:OnResize=rt", ;
		Left = 683, ;
		Name = "But_verifica1", ;
		TabIndex = 13, ;
		ToolTipText = "Verificare coduri fiscale", ;
		Top = 0
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'chkDuplicat' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Coduri duplicate!", ;
		FontBold = .T., ;
		ForeColor = 255,0,0, ;
		Height = 27, ;
		Left = 381, ;
		Name = "chkDuplicat", ;
		SpecialEffect = 0, ;
		Style = 1, ;
		ToolTipText = "Apasati pe buton pentru a selecta codurile fiscale/denumirile duplicate!", ;
		Top = 52, ;
		Visible = .F., ;
		Width = 115
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkInvalid' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Coduri invalide!", ;
		FontBold = .T., ;
		Height = 27, ;
		Left = 277, ;
		Name = "chkInvalid", ;
		SpecialEffect = 0, ;
		Style = 1, ;
		ToolTipText = "Apasati pe buton pentru a selecta codurile fiscale invalide!", ;
		Top = 52, ;
		Visible = .F., ;
		Width = 106
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkLiniaCurenta' AS _checkbox WITH ;
		Alignment = 0, ;
		Anchor = 6, ;
		Caption = "Verificare inregistrari de la linia curenta in jos", ;
		Left = 245, ;
		Name = "chkLiniaCurenta", ;
		ToolTipText = "Verificare inregistrari de la linia curenta in jos (altfel toate inregistrarile)", ;
		Top = 370, ;
		Value = .F.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkMFIN' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Interogare Min. Finante", ;
		Left = 12, ;
		Name = "chkMFIN", ;
		ToolTipText = "Informatii persoane juridice de pe website-ul www.mfinante.ro (cod, firma, adresa, reg. com. cod postal, telefon, fax)", ;
		Top = 32, ;
		Value = .T.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkMFINURL' AS _checkbox WITH ;
		Alignment = 0, ;
		Anchor = 6, ;
		Caption = "Interogare mfinante.ro via romfast.ro", ;
		Left = 12, ;
		Name = "chkMFINURL", ;
		ToolTipText = "Interogare direct mfinante.ro sau via romfast.ro", ;
		Top = 370, ;
		Value = .F.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkPlatitor' AS _checkbox WITH ;
		Alignment = 0, ;
		BackColor = 150,150,150, ;
		Caption = "(Ne)Platitori TVA (cu/fara) RO!", ;
		FontBold = .T., ;
		Height = 27, ;
		Left = 492, ;
		Name = "chkPlatitor", ;
		SpecialEffect = 0, ;
		Style = 1, ;
		ToolTipText = "Apasati pe buton pentru a selecta inregistrarile Platitori TVA fara RO sau Neplatitori TVA cu RO", ;
		Top = 52, ;
		Visible = .F., ;
		Width = 187
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkVIES' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Interogare VIES", ;
		Left = 12, ;
		Name = "chkVIES", ;
		ToolTipText = "Calitate platitor TVA din registrul operatorilor intracomunitari de pe website-ul ec.europa.eu", ;
		Top = 57, ;
		Value = .T.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'chkVIESURL' AS _checkbox WITH ;
		Alignment = 0, ;
		Anchor = 6, ;
		Caption = "Interogare ec.europa.eu via romfast.ro", ;
		Left = 12, ;
		Name = "chkVIESURL", ;
		ToolTipText = "Interogare direct ec.europa.eu sau via romfast.ro", ;
		Top = 392, ;
		Value = .F.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'cmdVerifica' AS cmd_executa WITH ;
		BackColor = 0,0,0, ;
		caction = do_verifica, ;
		Caption = "\<Verifica!!", ;
		ForeColor = 255,255,0, ;
		Left = 158, ;
		Name = "cmdVerifica", ;
		SpecialEffect = 0, ;
		ToolTipText = "Verificare coduri fiscale", ;
		Top = 52
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Gridextra1' AS gridextra WITH ;
		gridexpression = Thisform._grdbase1, ;
		Height = 17, ;
		Left = 744, ;
		Name = "Gridextra1", ;
		Top = 36, ;
		Width = 24
		*< END OBJECT: ClassLib="..\utile\gridextras\gridextras.vcx" BaseClass="custom" />

	ADD OBJECT 'lblInfo' AS _label WITH ;
		Caption = "Apasati ESC pentru a intrerupe verificarile *** Dublu click pe Denumire pentru verificare manuala / istoric verificari", ;
		FontSize = 8, ;
		ForeColor = 255,255,128, ;
		Left = 12, ;
		Name = "lblInfo", ;
		Top = 16
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'lblVerifica' AS _label WITH ;
		Anchor = 10, ;
		AutoSize = .F., ;
		Caption = "Se verifica...", ;
		FontBold = .T., ;
		Height = 17, ;
		Left = 162, ;
		Name = "lblVerifica", ;
		Top = 32, ;
		Visible = .F., ;
		Width = 606
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'spnPauza' AS _spinner WITH ;
		Anchor = 6, ;
		Height = 24, ;
		Increment =   1.00, ;
		KeyboardHighValue = 100, ;
		KeyboardLowValue = 0, ;
		Left = 245, ;
		Name = "spnPauza", ;
		SpinnerHighValue = 100.00, ;
		SpinnerLowValue =   0.00, ;
		ToolTipText = "Pauza (sec) intre interogarile www.mfinante.ro", ;
		Top = 388, ;
		Value = 5.0, ;
		Width = 56
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="spinner" />
	
	PROCEDURE Activate
		*** lansez verificarea automat, cand sunt apelat cu lista de parteneri din Reg TVA
		*** o lansez pe activate ca sa se vada tabelul cu parteneri cand se face verificarea
		Local llMFin, llVIES, llValidare
		llMFin = This.chkMFIN.Value
		llVIES = This.chkVIES.Value
		llValidare = .T.
		If This.lAutoverificare
			This.lAutoverificare = .F. && sa nu mai fac autoverificarea la un activate ulterior
			Select crsVerificareParteneri
			Go top 
			this._grdbase1.Refresh()
			This.do_verifica(m.llValidare, m.llMFin, m.llVIES)
		Endif
	ENDPROC

	PROCEDURE do_lanseaza_istoric
		Local lcCodFiscal
		lcCodFiscal = ALLTRIM(crsverificareparteneri.cod_fiscal)
		IF ISALPHA(lcCodFiscal)
			lcCodFiscal = ALLTRIM(SUBSTR(lcCodFiscal, 2))
			IF ISALPHA(lcCodFiscal)
				lcCodFiscal = ALLTRIM(SUBSTR(lcCodFiscal, 2))
			ENDIF 
		ENDIF 	
		Do verificare_parteneri_istoric With m.lcCodFiscal In oproceduri_comune.prg
		
	ENDPROC

	PROCEDURE do_lanseaza_mfin
		Local lcCodFiscal
		lcCodFiscal = ALLTRIM(crsverificareparteneri.cod_fiscal)
		IF ISALPHA(lcCodFiscal)
			lcCodFiscal = ALLTRIM(SUBSTR(lcCodFiscal, 2))
			IF ISALPHA(lcCodFiscal)
				lcCodFiscal = ALLTRIM(SUBSTR(lcCodFiscal, 2))
			ENDIF 
		ENDIF 	
		OPEN_DEFAULT_APP("http://www.mfinante.ro/infocodfiscal.html?pagina=domenii&cod=" + m.lcCodFiscal)
		  
	ENDPROC

	PROCEDURE do_termin
		Local lcMFINROMFAST, lcVIESROMFAST
		lcMFINROMFAST = TRANSFORM(this.chkMFINURL.Value)
		lcVIESROMFAST = TRANSFORM(this.chkVIESURL.Value)
		goAPI.WriteProfileString(m.gcSettingsFile, [validare], "mfinromfast", m.lcMFINROMFAST) 
		goAPI.WriteProfileString(m.gcSettingsFile, [validare], "viesromfast", m.lcVIESROMFAST) 
		DODEFAULT() 
	ENDPROC

	PROCEDURE do_verifica
		Lparameters tlValidare, tlMFIN, tlVIES
		*** tlValidare - se doreste validarea codurilor (se apeleaza din INIT automat)
		*** tlMFIN - se doreste verificarea MFIN (se apeleaza din INIT automat)
		*** tlVIES - se doreste verificarea VIES (se apeleaza din INIT automat)
		
		Local lcCodFiscal, lcEroare, lcKey, lcTipInterogare, lcXml, llAtributFiscal, llMFINURL, llVIESURL
		Local llMFIN, llVIES
		LOCAL llLiniaCurenta, lnRecord, lcConditieSuplimentara
		
		Local loPartener
		llMFINURL = This.chkMFINURL.Value && verificare prin ROMFAST.RO = .T.
		llVIESURL = This.chkVIESURL.Value && verificare prin ROMFAST.RO = .T.
		
		llLiniaCurenta = this.chkLiniaCurenta.Value 
		lcConditieSuplimentara = ".T."
		lnRecord = 1
		IF m.llLiniaCurenta
			lnRecord = Iif(!Eof(), RECNO('crsVerificareParteneri'), 0)
			lnRecord = MAX(m.lnRecord, 1)
		ENDIF 
		*!* VERIFIC CIF, CNP VALID
		Local loVerificare
		*!*	glRCViesURL = .T.
		*!*	gcRCVIESURL = "http://localhost/update/verificarecod.aspx/verificarecod/verificare/CIF/|CIF|/VIES"
		*!*	loVerificare = Createobject("verificarecod", glRCViesURL, glRCMfinURL, gcRCRomfastURL, gcRCMfinanteURL, gcRCMfinanteParams) && validare.prg
		loVerificare = Createobject("verificarecod", m.llMFINURL, m.llVIESURL) && validare.prg
		
		llValidare = IIF(PCOUNT() >= 1, m.tlValidare, .F.)
		llMFIN = IIF(PCOUNT() >= 2, m.tlMFIN, This.chkMFIN.Value)
		llVIES = IIF(PCOUNT() >= 3, m.tlVIES, This.chkVIES.Value)
		
		llValidare = llValidare or m.llMFIN or m.llVIES && se valideaza codurile daca se doreste verificarea MFIN/VIES
		*** VERIFICARE CODURI FISCALE, PARTENERI DUPLICATI
		SELECT cod_fiscal, COUNT(*) as nr FROM crsVerificareParteneri GROUP BY cod_fiscal HAVING nr > 1 INTO CURSOR cCodDuplicat
		SELECT denumire, COUNT(*) as nr FROM crsVerificareParteneri GROUP BY denumire HAVING nr > 1 INTO CURSOR cDenumireDuplicat
		SELECT cCodDuplicat
		SCAN
			lcCodFiscal = cod_fiscal
			UPDATE crsVerificareParteneri SET duplicat = .T. WHERE cod_fiscal = m.lcCodFiscal
		ENDSCAN 
		SELECT cDenumireDuplicat
		SCAN
			lcDenumire = denumire
			UPDATE crsVerificareParteneri SET duplicat = .T. WHERE denumire = m.lcDenumire
		ENDSCAN 
		USE IN (SELECT('cCodDuplicat'))
		USE IN (SELECT('cDenumireDuplicat'))
		
		*** activez checkboxul CODURI/DENUMIRI DUPLICATE
		Select crsVerificareParteneri
		Locate for duplicat 
		This.chkDuplicat.Visible = Found()
		
		Go TOP IN crsVerificareParteneri
			
		IF m.llValidare OR m.llMFIN OR m.llVIES
			Select crsVerificareParteneri
			Replace All IsCIF With loVerificare.IsCIF(COD_FISCAL)
			Replace All Valid With Iif(IsCIF, loVerificare.validare('CIF', COD_FISCAL), loVerificare.validare('CNP', COD_FISCAL))
			*** activez checkboxul CODURI INVALIDE
			Locate for !valid
			This.chkInvalid.Visible = Found()
		
			GO TOP IN crsVerificareParteneri
		EndIf
		
		If !(m.llVIES Or m.llMFIN)
			Return
		Endif
		
		this.lblVerifica.Visible = .T.
		this.cmdVerifica.Visible = .F.
		
		*!* VERIFIC CODURILE FISCALE VALIDE PENTRU ATRIBUTUL FISCAL IN VIES
		lcTipInterogare = Iif(m.llVIES, 'VIES', '') + Iif(m.llMFIN, 'MFIN', '')
		
		lcConditieSuplimentara = IIF(m.llLiniaCurenta, "recno() >= " + ALLTRIM(STR(m.lnRecord)), ".T.")
		Select crsVerificareParteneri
		Scan For Valid And IsCIF AND &lcConditieSuplimentara 
			lcEroare = ""
			lcCodFiscal = Alltrim(Upper(COD_FISCAL))
			llAtributFiscal = Isalpha(lcCodFiscal)
			This.lblVerifica.Caption = "Se verifica... " + Alltrim(DENUMIRE) + ' ' + TRANSFORM(RECNO()) + "/" + TRANSFORM(RECCOUNT()) + " " + Transform(Round(Recno()/Reccount()*100,2)) + ' % * Apasati tasta <ESC> pentru a intrerupe operatia de verificare'
			Wait Window Alltrim(DENUMIRE) + ' ' + TRANSFORM(RECNO()) + "/" + TRANSFORM(RECCOUNT()) + " " + Transform(Round(Recno()/Reccount()*100,2)) + ' %' + ;
				Chr(13) + Chr(10) + '* Apasati tasta <ESC> pentru a intrerupe operatia de verificare' NOWAIT 
		
			lcXml = loVerificare.Verificare('CIF', lcCodFiscal, m.lcTipInterogare)
			If Type('loVerificare.oEntitate') = 'O'
				loPartener = loVerificare.oEntitate
				lcEroare = loPartener.eroare
				With loPartener
					Replace cod With .cod, eroare With .eroare In crsVerificareParteneri
					IF m.llVIES
						REPLACE VIES With .VIES, platitorTVA With .platitorTVA In crsVerificareParteneri
					ENDIF 		
					IF m.llMFIN
						Replace firma With .firma, adresa With .adresa, judet With .judet, regcom With .regcom, ;
							codpostal With .codpostal, telefon With .telefon, fax With .fax, ;
							datatvamfin WITH .datatvamfin, platitortvamfin WITH .platitortvamfin, stare with .stare ;
							In crsVerificareParteneri
					ENDIF 					
				Endwith
			Endif
		
			If !Empty(lcEroare) And aMESSAGEBOX(lcEroare + CRLF + 'Doriti sa continuati?', 4+ 32, _Screen.Caption) <> 6
				Exit
			Endif
		
		
			IF RECNO('crsVerificareParteneri') < RECCOUNT('crsVerificareParteneri')
				lcKey = Inkey(This.spnPauza.Value)
				If lcKey = 27 && ESC
					If aMESSAGEBOX('Doriti sa intrerupeti operatia?', 4+32, _Screen.Caption) = 6
						Exit
					Endif
				ENDIF
			ENDIF 	
		Endscan
		RELEASE loVerificare
		
		Update crsVerificareParteneri set atentie = 'DUPLICAT' where duplicat
		Update crsVerificareParteneri set atentie = Alltrim(Alltrim(atentie) + ' ' + Iif(!IsDigit(datatvamfin), 'NE', '') + 'PLATITOR TVA') where !EMPTY(firma) AND ((UPPER(atribut_fiscal) = 'RO' AND !IsDigit(datatvamfin)) or (EMPTY(atribut_fiscal) AND IsDigit(datatvamfin)))
		
		*** activez checkboxul platitor TVA fara RO
		Select crsVerificareParteneri
		Locate for 'PLATITOR TVA'$atentie
		This.chkPlatitor.Visible = Found()
		
		this.lblVerifica.Visible = .F.
		this.cmdVerifica.Visible = .T.
		
		GO TOP IN crsVerificareParteneri
		
		
	ENDPROC

	PROCEDURE Init
		LPARAMETERS tlValidare, tlMFIN, tlVIES, tlAutoVerificare
		#DEFINE CRLF CHR(13) + CHR(10)
		Local lcMFINROMFAST, lcVIESROMFAST, llMFINROMFAST, llVIESROMFAST
		
		lcMFINROMFAST = goAPI.GetProfileString(m.gcSettingsFile, [validare], "mfinromfast") 
		lcVIESROMFAST = goAPI.GetProfileString(m.gcSettingsFile, [validare], "viesromfast") 
		lcMFINROMFAST = NVL(m.lcMFINROMFAST, '')
		lcVIESROMFAST = NVL(m.lcVIESROMFAST, '')
		IF !INLIST(m.lcMFINROMFAST, '.T.', '.F.')
			llMFINROMFAST = .T.
		ELSE 
			llMFINROMFAST = &lcMFINROMFAST
		ENDIF 
		IF !INLIST(m.lcVIESROMFAST, '.T.', '.F.')
			llVIESROMFAST = .T.
		ELSE 
			llVIESROMFAST = &lcVIESROMFAST
		ENDIF 
		
		this.chkMFINURL.Value = m.llMFINROMFAST
		this.chkVIESURL.Value = m.llVIESROMFAST
		
		this.chkMFIN.Value = m.tlMFIN
		this.chkVIES.Value = m.tlVIES
		
			
		*!*	this.but_verifica1.ToolTipText = "Verificare coduri fiscale"
		
		this.spnPauza.ToolTipText = "Pauza (sec) intre interogarile www.mfinante.ro" + CHR(13) + CHR(10) + ;
			"Daca interogarile sunt prea dese, mfinante.ro blocheaza cautarile." + CHR(13) + CHR(10) + ;
			"Incercati pauze mai mari de 5-6 secunde!"
			
		this.WindowState = 2 
		this.gridextra1.setup()
		
		DODEFAULT()
		
		This.lAutoVerificare = m.tlAutoVerificare
		
		
		
		*** FONT ROSU PENTRU CODURILE, PARTENERII DUPLICATI
		this._grdbase1.SetAll("DynamicForeColor","IIF(duplicat, RGB(255,0,0), RGB(0,0,0))", "Column")
		*** FUNDAL GRI PENTRU PARTENERII CU RO SI FARA DATA LUARII IN EVIDENTA TVA SAU FARA RO SI CU DATA LUARII IN EVIDENTA TVA
		this._grdbase1.SetAll("DynamicBackColor","IIF('PLATITOR TVA'$ATENTIE, RGB(200,200,200), RGB(255,255,255))", "Column")
		
		SELECT crsVerificareParteneri
		GO TOP 
		 
	ENDPROC

	PROCEDURE meniu_dblclick
		Local lnOptiune, lcAlias, lcCodFiscal
		lcAlias = this._grdbase1.RecordSource 
		Select (m.lcAlias)
		lcCodFiscal = Alltrim(Nvl(cod_fiscal,''))
		If Empty(m.lcCodFiscal)
			Return 
		EndIf 
		lnOptiune = xmenu('Verifica codul manual pe www.mfinante.ro;Afiseaza istoric verificari')
		Do Case
			Case m.lnOptiune = 1
				Thisform.do_lanseaza_mfin()
			Case m.lnOptiune = 2
				Thisform.do_lanseaza_istoric()
		Endcase
		
	ENDPROC

	PROCEDURE chkDuplicat.Click
		Local lcFilter
		lcFilter = Iif(Thisform.chkInvalid.Value = 1, "!valid", ".T.") + ' and ' + ;
			Iif(Thisform.chkDuplicat.Value = 1, "duplicat", ".T.") + ' And ' + ;
			Iif(Thisform.chkPlatitor.Value = 1, "'PLATITOR'$ATENTIE", ".T.")
		
		Thisform.gridextra1.customcolumnfilters[1,5] = m.lcFilter
		Thisform.gridExtra1.applyfilter()
	ENDPROC

	PROCEDURE chkInvalid.Click
		Local lcFilter
		lcFilter = Iif(Thisform.chkInvalid.Value = 1, "!valid", ".T.") + ' and ' + ;
			Iif(Thisform.chkDuplicat.Value = 1, "duplicat", ".T.") + ' And ' + ;
			Iif(Thisform.chkPlatitor.Value = 1, "'PLATITOR'$ATENTIE", ".T.")
		
		Thisform.gridextra1.customcolumnfilters[1,5] = m.lcFilter
		Thisform.gridExtra1.applyfilter()
	ENDPROC

	PROCEDURE chkMFIN.ProgrammaticChange
		Thisform.chkMFINURL.Visible = This.Value 
		thisform.spnPauza.Visible =  This.Value
		thisform.chkLiniaCurenta.Visible = This.Value or thisform.chkVies.Value
	ENDPROC

	PROCEDURE chkMFIN.Valid
		Thisform.chkMFINURL.Visible = This.Value 
		thisform.spnPauza.Visible =  This.Value
		thisform.chkLiniaCurenta.Visible = This.Value or thisform.chkVies.Value
	ENDPROC

	PROCEDURE chkPlatitor.Click
		Local lcFilter
		lcFilter = Iif(Thisform.chkInvalid.Value = 1, "!valid", ".T.") + ' and ' + ;
			Iif(Thisform.chkDuplicat.Value = 1, "duplicat", ".T.") + ' And ' + ;
			Iif(Thisform.chkPlatitor.Value = 1, "'PLATITOR'$ATENTIE", ".T.")
		
		Thisform.gridextra1.customcolumnfilters[1,5] = m.lcFilter
		Thisform.gridExtra1.applyfilter()
	ENDPROC

	PROCEDURE chkVIES.ProgrammaticChange
		Thisform.chkViesURL.Visible = This.Value 
		thisform.chkLiniaCurenta.Visible = This.Value or thisform.chkMfin.Value
	ENDPROC

	PROCEDURE chkVIES.Valid
		Thisform.chkViesURL.Visible = This.Value 
		thisform.chkLiniaCurenta.Visible = This.Value or thisform.chkMfin.Value
	ENDPROC

	PROCEDURE _grdbase1.Column16.Text1.DblClick
		Thisform.meniu_dblclick()
	ENDPROC

	PROCEDURE _grdbase1.Column2.Text1.DblClick
		Thisform.meniu_dblclick()
		
	ENDPROC

	PROCEDURE _grdbase1.Column20.Text1.DblClick
		Thisform.meniu_dblclick()
	ENDPROC

	PROCEDURE _grdbase1.Column3.Text1.DblClick
		Thisform.meniu_dblclick()
	ENDPROC

	PROCEDURE _grdbase1.Column5.Text1.DblClick
		Thisform.meniu_dblclick()
	ENDPROC

	PROCEDURE _grdbase1.Column6.Text1.DblClick
		Thisform.meniu_dblclick()
	ENDPROC

ENDDEFINE
