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

	*<PropValue>
		Name = "cus_odata_firme"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec, tnId
		
		Local lcActiune, lcBanca3, lcCodF, lcCodFirma, lcDeclarant, lcFunctie, lcId, lcIndiceitm, lcPoint
		Local lcSql, lcTipModificare, lcadresa, lcantet, lcbanca1, lcbanca2, lcbloc, lccaen, lccod_postal
		Local lccontb1, lccontb2, lccontb3, lcemail, lcfax, lcfirma, lcindicativ, lcjudet, lclocalitate
		Local lcnumar, lcnume, lcoasp, lcpctl, lcprenume, lcregc, lcscara, lcschema, lcstrada, lctel, lctel2
		Local lctel3, lnapart, lncapss, lncapsv, lncodang, lne_mama, lnid_formaj, lnid_formao, lnid_formap
		Local lnid_tip_soc, lnidl, lnidm, lnpersj, lcCaenRevizie
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE", 'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE", 'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE", 'DELETE')
			lcId = Alltrim(Str(tnId))
		Else
			lcId = "NULL"
		Endif
		
		lcPoint = Set("Point")
		Set Point To '.' && pentru str()
		
		If Inlist(lcActiune, "UPDATE", 'INSERT')
			lnid_formaj = Nvl(Alltrim(Str(toRec.id_forma_juridica)), "0")
			lnid_formao = Nvl(Alltrim(Str(toRec.id_forma_organizare)), "0")
			lnid_formap = Nvl(Alltrim(Str(toRec.id_forma_prop)), "0")
			lnid_tip_soc = Nvl(Alltrim(Str(toRec.id_tip_soc)), "0")
		
			lcindicativ = Nvl(Strtran(Alltrim(Upper(toRec.indicativ)), ['], ['']), "")
		
			lcfirma = Nvl(Strtran(Alltrim(Upper(toRec.firma)), ['], ['']), "")
			lcantet = Nvl(Strtran(Alltrim(Upper(toRec.antet)), ['], ['']), "")
			lcCodF = Nvl(Strtran(Alltrim(Upper(toRec.cod_fiscal)), ['], ['']), "")
			lcregc = Nvl(Strtran(Alltrim(Upper(toRec.reg_comert)), ['], ['']), "")
			lcbanca1 = Nvl(Strtran(Alltrim(Upper(toRec.banca1)), ['], ['']), "")
			lccontb1 = Nvl(Strtran(Alltrim(Upper(toRec.cont_banca1)), ['], ['']), "")
			lcbanca2 = Nvl(Strtran(Alltrim(Upper(toRec.banca2)), ['], ['']), "")
			lccontb2 = Nvl(Strtran(Alltrim(Upper(toRec.cont_banca2)), ['], ['']), "")
			lcBanca3 = Nvl(Strtran(Alltrim(Upper(toRec.banca3)), ['], ['']), "")
			lccontb3 = Nvl(Strtran(Alltrim(Upper(toRec.cont_banca3)), ['], ['']), "")
			lcBanca4 = Nvl(Strtran(Alltrim(Upper(toRec.banca4)), ['], ['']), "")
			lccontb4 = Nvl(Strtran(Alltrim(Upper(toRec.cont_banca4)), ['], ['']), "")
			lcBanca5 = Nvl(Strtran(Alltrim(Upper(toRec.banca5)), ['], ['']), "")
			lccontb5 = Nvl(Strtran(Alltrim(Upper(toRec.cont_banca5)), ['], ['']), "")
			lcBanca6 = Nvl(Strtran(Alltrim(Upper(toRec.banca6)), ['], ['']), "")
			lccontb6 = Nvl(Strtran(Alltrim(Upper(toRec.cont_banca6)), ['], ['']), "")
			lcBanca7 = Nvl(Strtran(Alltrim(Upper(toRec.banca7)), ['], ['']), "")
			lccontb7 = Nvl(Strtran(Alltrim(Upper(toRec.cont_banca7)), ['], ['']), "")
			lcBanca8 = Nvl(Strtran(Alltrim(Upper(toRec.banca8)), ['], ['']), "")
			lccontb8 = Nvl(Strtran(Alltrim(Upper(toRec.cont_banca8)), ['], ['']), "")
			lcBanca9 = Nvl(Strtran(Alltrim(Upper(toRec.banca9)), ['], ['']), "")
			lccontb9 = Nvl(Strtran(Alltrim(Upper(toRec.cont_banca9)), ['], ['']), "")
			lcBanca10 = Nvl(Strtran(Alltrim(Upper(toRec.banca10)), ['], ['']), "")
			lccontb10 = Nvl(Strtran(Alltrim(Upper(toRec.cont_banca10)), ['], ['']), "")							
			lcadresa = Nvl(Strtran(Alltrim(Upper(toRec.adresa)), ['], ['']), "")
			lcCodFirma = Nvl(Strtran(Alltrim(Upper(toRec.cod_firma)), ['], ['']), "")
			lnpersj = Nvl(Alltrim(Str(toRec.persoana_juridica)), "0")
			lncodang = Nvl(Alltrim(Str(toRec.codang)), "0")
			lcnume = Nvl(Strtran(Alltrim(Upper(toRec.nume)), ['], ['']), "")
			lcprenume = Nvl(Strtran(Alltrim(Upper(toRec.prenume)), ['], ['']), "")
			lctel = Nvl(Strtran(Alltrim(Upper(toRec.telefon)), ['], ['']), "")
			lctel2 = Nvl(Strtran(Alltrim(Upper(toRec.telefon2)), ['], ['']), "")
			lctel3 = Nvl(Strtran(Alltrim(Upper(toRec.telefon3)), ['], ['']), "")
			lcfax = Nvl(Strtran(Alltrim(Upper(toRec.fax)), ['], ['']), "")
			lcemail = Nvl(Strtran(Alltrim(Upper(toRec.email)), ['], ['']), "")
			lcoasp = Nvl(Strtran(Alltrim(Upper(toRec.oasp)), ['], ['']), "")
			lncapsv = Nvl(Alltrim(Str(toRec.capital_soc_var, 16, 2)), "0")
			lncapss = Nvl(Alltrim(Str(toRec.capital_soc_sub, 16, 2)), "0")
			lcpctl = Nvl(Strtran(Alltrim(Upper(toRec.punct_luc)), ['], ['']), "")
			lccaen = Nvl(Strtran(Alltrim(Upper(toRec.caen)), ['], ['']), "")
			lcCaenRevizie = Nvl(Alltrim(Upper(toRec.caen_revizie)), "")
			lcschema = Nvl(Strtran(Alltrim(Upper(toRec.schema)), ['], ['']), "")
			lcjudet = Nvl(Strtran(Alltrim(Upper(toRec.judet)), ['], ['']), "")
			lclocalitate = Nvl(Strtran(Alltrim(Upper(toRec.localitate)), ['], ['']), "")
			lcstrada = Nvl(Strtran(Alltrim(Upper(toRec.strada)), ['], ['']), "")
			lcnumar = Nvl(Strtran(Alltrim(Upper(toRec.numar)), ['], ['']), "")
			lcbloc = Nvl(Strtran(Alltrim(Upper(toRec.Bloc)), ['], ['']), "")
			lcscara = Nvl(Strtran(Alltrim(Upper(toRec.scara)), ['], ['']), "")
			lccod_postal = Nvl(Strtran(Alltrim(Upper(toRec.cod_postal)), ['], ['']), "")
			lnapart = Nvl(Alltrim(Str(toRec.apart)), "NULL")
			lne_mama = Iif(Nvl(toRec.e_mama, 0) = 0, '0', Alltrim(Str(toRec.e_mama)))
			lnidm = Iif(Nvl(toRec.id_mama, 0) = 0, 'NULL', Alltrim(Str(toRec.id_mama)))
			lnidl = Nvl(Alltrim(Str(toRec.id_loc)), "NULL")
			lcDeclarant = Nvl(Strtran(Alltrim(Upper(toRec.declarant)), ['], ['']), "")
			lcFunctie = Nvl(Strtran(Alltrim(Upper(toRec.functie)), ['], ['']), "")
			lcIndiceitm = Nvl(Strtran(Alltrim(Upper(toRec.indice_itm)), ['], ['']), "")
			lcTipModificare = Alltrim(Str(toRec.tip_modificare))
		Endif
		
		Do Case
			Case lcActiune = "UPDATE" And gcNumeProgram = [ROADEF]
				lcSql = [begin pack_def.modifica_date_firma(] + lcId + [,'] + lcfirma + [','] + lcantet + [','] + ;
					lcCodF + [','] + lcregc + [','] + ;
					lcbanca1 + [','] + lccontb1 + [','] + lcbanca2 + [','] + lccontb2 + [','] + lcBanca3 + [','] + lccontb3 + [','] + ;
					lcbanca4 + [','] + lccontb4 + [','] + lcbanca5 + [','] + lccontb5 + [','] + lcBanca6 + [','] + lccontb6 + [','] + ;
					lcbanca7 + [','] + lccontb7 + [','] + lcbanca8 + [','] + lccontb8 + [','] + lcBanca9 + [','] + lccontb9 + [','] + ;
					lcbanca10 + [','] + lccontb10 + [','] + ;									
					lcadresa + [','] + lcCodFirma + ;
					[',] + lnpersj + [,] + lncodang + [,'] + lcnume + ;
					[','] + lcprenume + [','] + lctel + [','] + lctel2 + [','] + lctel3 + [','] + lcfax + ;
					[','] + lcemail + [','] + lcoasp + [',] + lncapsv + ;
					[,] + lncapss + [,'] + lcpctl + [','] + lccaen + [','] + lcschema + ;
					[','] + lcjudet + [','] + lclocalitate + [','] + lcstrada + [','] + lcnumar + ;
					[','] + lcbloc + [','] + lcscara + [',] + lnapart + [,'] + lccod_postal + ;
					[',] + lnidm + [,] + lne_mama + [,] + lnidl + [,] + Alltrim(Str(gnIdUtil)) + ;
					[,] + lnid_formaj + [,] + lnid_formao + [,] + lnid_formap + [,] + lnid_tip_soc + ;
					[,'] + lcindicativ + [','] + lcDeclarant + [','] + lcFunctie + [','] + lcIndiceitm + [',] + lcTipModificare + ;
					[,'] + lcCaenRevizie + ['); end;]
		
			Case Inlist(lcActiune, "INSERT", "UPDATE")
				lcSql = [begin pack_drepturi.firmemodinsproc(] + lcId + [,'] + lcfirma + [','] + lcantet + [','] + ;
					lcCodF + [','] + lcregc + [','] + ;
					lcbanca1 + [','] + lccontb1 + [','] + lcbanca2 + [','] + lccontb2 + [','] + lcBanca3 + [','] + lccontb3 + [','] + ;
					lcbanca4 + [','] + lccontb4 + [','] + lcbanca5 + [','] + lccontb5 + [','] + lcBanca6 + [','] + lccontb6 + [','] + ;
					lcbanca7 + [','] + lccontb7 + [','] + lcbanca8 + [','] + lccontb8 + [','] + lcBanca9 + [','] + lccontb9 + [','] + ;
					lcbanca10 + [','] + lccontb10 + [','] + ;			
					lcadresa + [','] + lcCodFirma + ;
					[',] + lnpersj + [,] + lncodang + [,'] + lcnume + ;
					[','] + lcprenume + [','] + lctel + [','] + lctel2 + [','] + lctel3 + [','] + lcfax + ;
					[','] + lcemail + [','] + lcoasp + [',] + lncapsv + ;
					[,] + lncapss + [,'] + lcpctl + [','] + lccaen + [','] + lcschema + ;
					[','] + lcjudet + [','] + lclocalitate + [','] + lcstrada + [','] + lcnumar + ;
					[','] + lcbloc + [','] + lcscara + [',] + lnapart + [,'] + lccod_postal + ;
					[',] + lnidm + [,] + lne_mama + [,] + lnidl + [,] + Alltrim(Str(gnIdUtil)) + ;
					[,] + lnid_formaj + [,] + lnid_formao + [,] + lnid_formap + [,] + lnid_tip_soc + ;
					[,'] + lcindicativ + [','] + lcDeclarant + [','] + lcFunctie + [','] + lcIndiceitm + ['] + ;
					[,'] + lcCaenRevizie + ['); end;]
		
				*!*			_cliptext = lcSql
			Case lcActiune = "DELETE"
				lcSql = [begin contafin_oracle.pack_drepturi.firmedelproc(] + lcId + [,] + Alltrim(Str(gnIdUtil)) + [); end;]
		Endcase
		This.csql = lcSql
		Set Point To &lcPoint
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_firme_mini AS cus_odata_firme OF "ofirma.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_firrme_mini"
	*</PropValue>

ENDDEFINE

DEFINE CLASS frm_firme 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="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cFirma.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cFirma.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cSchema.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cSchema.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCod_Fiscal.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCod_Fiscal.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCont_Banca1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCont_Banca1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cBanca1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cBanca1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cBanca2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cBanca2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCont_Banca2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCont_Banca2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cBanca3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cBanca3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCont_Banca3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCont_Banca3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cAdresa.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cAdresa.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCod_Firma.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCod_Firma.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cPersoanaJuridica.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cPersoanaJuridica.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCodAng.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCodAng.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cNume.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cNume.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cPrenume.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cPrenume.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCapital_soc_sub.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCapital_soc_sub.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCapital_soc_var.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCapital_soc_var.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCaen.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCaen.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cPunctLucru.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cPunctLucru.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cOasp.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cOasp.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cTelefon.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cTelefon.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cTelefon2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cTelefon2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cTelefon3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cTelefon3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cFax.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cFax.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cEmail.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cEmail.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cReg_Comert.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cReg_Comert.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cSucursala.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cSucursala.Text1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: do_refresh_date
	*</DefinedPropArrayMethod>

	*<PropValue>
		cbuton3 = but_modifica1
		cbuton4 = but_sterge1
		cgridsortlist = grd_firme
		Desktop = .T.
		DoCreate = .T.
		Height = 515
		lactiv3 = .T.
		lactiv4 = .T.
		Name = "frm_firme"
		Width = 791
		_shape1.Anchor = 10
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 792
		_SHAPE2.Height = 29
		_SHAPE2.Left = 648
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		_SHAPE2.Width = 144
		LB_TITLU_ALB_B121.Caption = "FIRME"
		LB_TITLU_ALB_B121.FontBold = .T.
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		LB_TITLU_ALB_B121.TabIndex = 9
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 756
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 2
		BUT_TERMIN1.Top = 1
		GRIDSORT1.Name = "GRIDSORT1"
	*</PropValue>

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

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 671, ;
		Name = "But_nou1", ;
		TabIndex = 5, ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 729, ;
		Name = "But_sterge1", ;
		TabIndex = 3, ;
		Top = 1, ;
		Visible = .T.
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'grd_firme' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 27, ;
		DeleteMark = .F., ;
		Height = 444, ;
		Left = 8, ;
		Name = "grd_firme", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "v_firme", ;
		TabIndex = 1, ;
		Top = 48, ;
		Width = 775, ;
		Column1.ControlSource = "firma", ;
		Column1.Name = "cFirma", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 155, ;
		Column2.ColumnOrder = 27, ;
		Column2.ControlSource = "schema", ;
		Column2.Name = "cSchema", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 120, ;
		Column3.ColumnOrder = 2, ;
		Column3.ControlSource = "cod_fiscal", ;
		Column3.Name = "cCod_Fiscal", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 120, ;
		Column4.ColumnOrder = 6, ;
		Column4.ControlSource = "cont_banca1", ;
		Column4.Name = "cCont_Banca1", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 161, ;
		Column5.ColumnOrder = 5, ;
		Column5.ControlSource = "banca1", ;
		Column5.Name = "cBanca1", ;
		Column5.ReadOnly = .T., ;
		Column5.Width = 121, ;
		Column6.ColumnOrder = 7, ;
		Column6.ControlSource = "banca2", ;
		Column6.Name = "cBanca2", ;
		Column6.ReadOnly = .T., ;
		Column6.Width = 131, ;
		Column7.ColumnOrder = 8, ;
		Column7.ControlSource = "cont_banca2", ;
		Column7.Name = "cCont_Banca2", ;
		Column7.ReadOnly = .T., ;
		Column7.Width = 149, ;
		Column8.ColumnOrder = 9, ;
		Column8.ControlSource = "banca3", ;
		Column8.Name = "cBanca3", ;
		Column8.ReadOnly = .T., ;
		Column8.Width = 148, ;
		Column9.ColumnOrder = 10, ;
		Column9.ControlSource = "cont_banca3", ;
		Column9.Name = "cCont_Banca3", ;
		Column9.ReadOnly = .T., ;
		Column9.Width = 141, ;
		Column10.ColumnOrder = 11, ;
		Column10.ControlSource = "adresa", ;
		Column10.Name = "cAdresa", ;
		Column10.ReadOnly = .T., ;
		Column10.Width = 174, ;
		Column11.ColumnOrder = 12, ;
		Column11.ControlSource = "cod_firma", ;
		Column11.Name = "cCod_Firma", ;
		Column11.ReadOnly = .T., ;
		Column11.Width = 98, ;
		Column12.ColumnOrder = 18, ;
		Column12.ControlSource = "persoana_juridica", ;
		Column12.Name = "cPersoanaJuridica", ;
		Column12.ReadOnly = .T., ;
		Column12.Sparse = .F., ;
		Column12.Width = 99, ;
		Column13.ColumnOrder = 19, ;
		Column13.ControlSource = "codang", ;
		Column13.Name = "cCodAng", ;
		Column13.ReadOnly = .T., ;
		Column13.Width = 130, ;
		Column14.ColumnOrder = 20, ;
		Column14.ControlSource = "nume", ;
		Column14.Name = "cNume", ;
		Column14.ReadOnly = .T., ;
		Column14.Width = 119, ;
		Column15.ColumnOrder = 21, ;
		Column15.ControlSource = "prenume", ;
		Column15.Name = "cPrenume", ;
		Column15.ReadOnly = .T., ;
		Column15.Width = 132, ;
		Column16.ColumnOrder = 23, ;
		Column16.ControlSource = "capital_soc_sub", ;
		Column16.Name = "cCapital_soc_sub", ;
		Column16.ReadOnly = .T., ;
		Column16.Width = 134, ;
		Column17.ColumnOrder = 24, ;
		Column17.ControlSource = "capital_soc_var", ;
		Column17.Name = "cCapital_soc_var", ;
		Column17.ReadOnly = .T., ;
		Column17.Width = 116, ;
		Column18.ColumnOrder = 26, ;
		Column18.ControlSource = "caen", ;
		Column18.Name = "cCaen", ;
		Column18.ReadOnly = .T., ;
		Column18.Width = 129, ;
		Column19.ColumnOrder = 25, ;
		Column19.ControlSource = "punct_luc", ;
		Column19.Name = "cPunctLucru", ;
		Column19.ReadOnly = .T., ;
		Column19.Width = 107, ;
		Column20.ColumnOrder = 22, ;
		Column20.ControlSource = "oasp", ;
		Column20.Name = "cOasp", ;
		Column20.ReadOnly = .T., ;
		Column20.Width = 112, ;
		Column21.ColumnOrder = 13, ;
		Column21.ControlSource = "telefon", ;
		Column21.Name = "cTelefon", ;
		Column21.ReadOnly = .T., ;
		Column21.Width = 103, ;
		Column22.ColumnOrder = 14, ;
		Column22.ControlSource = "telefon2", ;
		Column22.Name = "cTelefon2", ;
		Column22.ReadOnly = .T., ;
		Column22.Width = 115, ;
		Column23.ColumnOrder = 15, ;
		Column23.ControlSource = "telefon3", ;
		Column23.Name = "cTelefon3", ;
		Column23.ReadOnly = .T., ;
		Column23.Width = 125, ;
		Column24.ColumnOrder = 16, ;
		Column24.ControlSource = "fax", ;
		Column24.Name = "cFax", ;
		Column24.ReadOnly = .T., ;
		Column24.Width = 118, ;
		Column25.ColumnOrder = 17, ;
		Column25.ControlSource = "email", ;
		Column25.Name = "cEmail", ;
		Column25.ReadOnly = .T., ;
		Column25.Width = 122, ;
		Column26.ColumnOrder = 3, ;
		Column26.ControlSource = "reg_comert", ;
		Column26.Name = "cReg_Comert", ;
		Column26.ReadOnly = .T., ;
		Column26.Width = 147, ;
		Column27.ColumnOrder = 4, ;
		Column27.ControlSource = "sucursala", ;
		Column27.Name = "cSucursala", ;
		Column27.ReadOnly = .T., ;
		Column27.Width = 122
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

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

	ADD OBJECT 'grd_firme.cAdresa.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 'grd_firme.cBanca1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Banca 1", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cBanca1.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 'grd_firme.cBanca2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Banca 2", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cBanca2.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 'grd_firme.cBanca3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Banca 3", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cBanca3.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 'grd_firme.cCaen.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "CAEN", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_firme.cCapital_soc_sub.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Capital social subscris", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cCapital_soc_sub.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 'grd_firme.cCapital_soc_var.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Capital social varsat", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cCapital_soc_var.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 'grd_firme.cCod_Firma.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod firma", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cCod_Firma.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 'grd_firme.cCod_Fiscal.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod fiscal", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cCod_Fiscal.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 'grd_firme.cCodAng.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod ang.", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cCodAng.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 'grd_firme.cCont_Banca1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont banca 1", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cCont_Banca1.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 'grd_firme.cCont_Banca2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont banca 2", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cCont_Banca2.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 'grd_firme.cCont_Banca3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont banca 3", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cCont_Banca3.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 'grd_firme.cEmail.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "E-mail", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cEmail.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 'grd_firme.cFax.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Fax", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cFax.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 'grd_firme.cFirma.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Firma", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cFirma.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 'grd_firme.cNume.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nume", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cNume.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 'grd_firme.cOasp.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Oasp", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cOasp.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 'grd_firme.cPersoanaJuridica.Check1' AS checkbox WITH ;
		Alignment = 2, ;
		BackStyle = 0, ;
		Caption = "", ;
		Centered = .T., ;
		Height = 17, ;
		Left = 47, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 35, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'grd_firme.cPersoanaJuridica.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Persoana juridica", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cPrenume.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Prenume", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cPrenume.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 'grd_firme.cPunctLucru.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Punct de lucru", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cPunctLucru.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 'grd_firme.cReg_Comert.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Reg. comert", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cReg_Comert.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 'grd_firme.cSchema.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Schema", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cSchema.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 'grd_firme.cSucursala.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sucursala", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cSucursala.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 'grd_firme.cTelefon.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Telefon", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cTelefon.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 'grd_firme.cTelefon2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Telefon 2", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cTelefon2.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 'grd_firme.cTelefon3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Telefon 3", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cTelefon3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE actualizeaza_grid1
		Lparameters pcFiltru
		Local lcFiltru
		lcFiltru=pcFiltru
		If Empty(lcFiltru)
			lcFiltru=pofirme.ca_baza1.cfiltru
		Endif
		save_grid_tag(Thisform.grd_firme)
		pofirme.ca_baza1.cfiltru=lcFiltru
		pofirme.ca_baza1.afisare()
		restore_grid_tag(Thisform.grd_firme)
		Thisform.grd_firme.SetFocus()
		
	ENDPROC

	PROCEDURE Destroy
		If Used('v_firme')
			Use In v_firme
		Endif
	ENDPROC

	PROCEDURE do_adauga
		Local lcSql, llSucces, loRec
		Private pcSchema, pnLuna, pnAn
		*:Global gnButon
		gnButon=1
		Select v_firme
		Scatter Name loRec Blank
		
		AddProperty(loRec, "an", Year(Date()))
		AddProperty(loRec, "luna", Month(Date()))
		
		Do Adauga_Modifica_Inregistrare With "firme_mini",loRec,,"INSERT"
		
		If gnButon=1
			*** import dump firma noua doar pentru firme simple si firma mama, nu pentru membru grup care are deja schema creata pe mama
			If Nvl(loRec.id_mama, 0) = 0
				pcSchema = Alltrim(loRec.schema)
				pnAn = loRec.an
				pnLuna = loRec.luna
		
				lcSql = [begin SYN_NEWSCHEMAJOB(?pcSchema, ?pnLuna, ?pnAn); end;]
				llSucces = goExecutor.oExecuta(m.lcSql)
				If llSucces
					_Screen.cNewSchema = m.pcSchema
					_Screen.nNewSchemaAn = m.pnAn
					_Screen.nNewSchemaLuna = m.pnLuna
					_Screen.cTime = Time()
					_Screen.oFundal.tmrProgressBar.Enabled = .T.
		
					AMESSAGEBOX('Se creeaza firma "' + Alltrim(loRec.firma) + '" in baza de date!' + Chr(13) + Chr(10) + ;
						'Urmariti progresul in formularul principal.',0+64+4096,_Screen.Caption)
				Endif
			Endif
		
			This.actualizeaza_grid1()
		Endif
		
	ENDPROC

	PROCEDURE do_modifica
		If Reccount('v_firme')>0
			gnButon=1
			Select v_firme
			Scatter Name loRec
			AddProperty(loRec, "an", Year(Date()))
			AddProperty(loRec, "luna", Month(Date()))
			
			Do Adauga_Modifica_Inregistrare With "firme_mini",loRec,loRec.Id_firma,"UPDATE"
			
			If gnButon=1
				This.actualizeaza_grid1()
			Endif
		Endif
	ENDPROC

	PROCEDURE do_refresh_date
	ENDPROC

	PROCEDURE do_sterge
		If Reccount('v_firme')>0
			gnButon=1
			Select v_firme
			Scatter Name loRec
			Do STERGE_INREGISTRARE With "firme_mini",loRec.Id_firma
			If gnButon=1
				This.actualizeaza_grid1()
			Endif
		Endif
	ENDPROC

	PROCEDURE grd_firme.Init
		*!* MAMA : ALBASTRU DESCHIS
		*!* SUCURSALA : GALBEN PAI
		*!* FIRMA INDEPENDENTA : ALB
		THIS.SetAll("dynamicbackcolor","iif(e_mama = 1, RGB(255,255,225), IIF(NVL(id_mama,0) <> 0, RGB(240,241,255), RGB(255,255,255)))","Column")
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_firme_mini_nou 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="Cus_odata_firme_mini1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txtSchema" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lblFirma" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txtFirma" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="optGrup" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cboLuna" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cboAn" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lblLunaInitializare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cboGrupParinte" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lblGrupParinte" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: sucursala
		*m: verificaschema
		*p: id_judet
		*p: nid
		*p: orec
		*p: parenta
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 3
		Desktop = .T.
		DoCreate = .T.
		Height = 227
		id_judet = 0
		Name = "frm_firme_mini_nou"
		nid = 
		orec = 
		parenta = 0
		ScrollBars = 2
		Width = 415
		_shape1.Anchor = 10
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 702
		_shape1.ZOrderSet = 1
		_SHAPE2.Height = 29
		_SHAPE2.Left = 593
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		_SHAPE2.Width = 72
		_SHAPE2.ZOrderSet = 2
		LB_TITLU_ALB_B121.Caption = "ADAUGARE FIRMA"
		LB_TITLU_ALB_B121.FontBold = .T.
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		LB_TITLU_ALB_B121.TabIndex = 9
		LB_TITLU_ALB_B121.ZOrderSet = 3
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 383
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 7
		BUT_TERMIN1.Top = 0
		BUT_TERMIN1.ZOrderSet = 4
		Gridsort1.Left = 12
		Gridsort1.Name = "Gridsort1"
		Gridsort1.Top = 264
	*</PropValue>

	ADD OBJECT '_label1' AS _label WITH ;
		Caption = "Schema", ;
		FontBold = .T., ;
		Left = 14, ;
		Name = "_label1", ;
		TabIndex = 10, ;
		Top = 77, ;
		ZOrderSet = 7
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

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

	ADD OBJECT 'cboAn' AS _combobox WITH ;
		BoundTo = .T., ;
		ControlSource = "poRec.an", ;
		Height = 24, ;
		Left = 199, ;
		Name = "cboAn", ;
		RowSource = "2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021", ;
		RowSourceType = 1, ;
		TabIndex = 6, ;
		Top = 181, ;
		Width = 63, ;
		ZOrderSet = 11
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'cboGrupParinte' AS _combobox WITH ;
		ColumnCount = 2, ;
		ColumnLines = .F., ;
		ColumnWidths = "200,50", ;
		Height = 24, ;
		Left = 125, ;
		Name = "cboGrupParinte", ;
		RowSource = "crsGrupuri.firma", ;
		RowSourceType = 6, ;
		TabIndex = 4, ;
		Top = 150, ;
		Visible = .F., ;
		Width = 256, ;
		ZOrderSet = 13
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'cboLuna' AS _combobox WITH ;
		BoundTo = .T., ;
		ControlSource = "poRec.luna", ;
		Height = 24, ;
		Left = 142, ;
		Name = "cboLuna", ;
		RowSource = "1,2,3,4,5,6,7,8,9,10,11,12", ;
		RowSourceType = 1, ;
		TabIndex = 5, ;
		Top = 181, ;
		Width = 51, ;
		ZOrderSet = 10
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'Cus_odata_firme_mini1' AS cus_odata_firme_mini WITH ;
		Left = 0, ;
		Name = "Cus_odata_firme_mini1", ;
		Top = 36
		*< END OBJECT: ClassLib="ofirma.vcx" BaseClass="custom" />

	ADD OBJECT 'lblFirma' AS _label WITH ;
		Caption = "Firma", ;
		FontBold = .T., ;
		Left = 14, ;
		Name = "lblFirma", ;
		TabIndex = 11, ;
		Top = 51, ;
		ZOrderSet = 7
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'lblGrupParinte' AS _label WITH ;
		Caption = "Grup parinte", ;
		FontBold = .T., ;
		Left = 125, ;
		Name = "lblGrupParinte", ;
		TabIndex = 13, ;
		Top = 131, ;
		Visible = .F., ;
		ZOrderSet = 14
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'lblLunaInitializare' AS _label WITH ;
		Caption = "Luna de initializare", ;
		FontBold = .T., ;
		Left = 14, ;
		Name = "lblLunaInitializare", ;
		TabIndex = 12, ;
		Top = 185, ;
		ZOrderSet = 12
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT 'optGrup' AS _optiongrup WITH ;
		AutoSize = .T., ;
		ButtonCount = 3, ;
		Height = 65, ;
		Left = 14, ;
		Name = "optGrup", ;
		TabIndex = 3, ;
		Top = 110, ;
		Width = 101, ;
		ZOrderSet = 9, ;
		Option1.AutoSize = .T., ;
		Option1.Caption = "Firma simpla", ;
		Option1.FontCharSet = 238, ;
		Option1.Left = 5, ;
		Option1.Name = "Option1", ;
		Option1.Top = 5, ;
		Option2.AutoSize = .T., ;
		Option2.Caption = "Grup", ;
		Option2.Left = 5, ;
		Option2.Name = "Option2", ;
		Option2.Top = 24, ;
		Option3.AutoSize = .T., ;
		Option3.BackStyle = 0, ;
		Option3.Caption = "Membru grup", ;
		Option3.Height = 17, ;
		Option3.Left = 5, ;
		Option3.Name = "Option3", ;
		Option3.Top = 43, ;
		Option3.Width = 91
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="optiongroup" />

	ADD OBJECT 'txtFirma' AS _textbox WITH ;
		ControlSource = "porec.firma", ;
		Format = "!K", ;
		Height = 23, ;
		Left = 70, ;
		Name = "txtFirma", ;
		TabIndex = 1, ;
		Top = 48, ;
		Width = 327, ;
		ZOrderSet = 8
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'txtSchema' AS _textbox WITH ;
		ControlSource = "porec.schema", ;
		Format = "!K", ;
		Height = 23, ;
		Left = 70, ;
		Name = "txtSchema", ;
		TabIndex = 2, ;
		Top = 74, ;
		Width = 233, ;
		ZOrderSet = 8
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />
	
	PROCEDURE Destroy
		USE IN (SELECT('crsScheme'))
		USE IN (SELECT('crsGrupuri'))
	ENDPROC

	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		LOCAL llModificare
		llModificare = (This.cus_odata_firme_mini1.cactiune = 'UPDATE')
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		If !Isnull(poRec.id_mama) && membra grup => schema = schema mama
			lcSchema = Alltrim(crsGrupuri.schema)
		Else
			lcSchema = Strtran(Left(poRec.schema,30),' ','')
		Endif
		poRec.schema = m.lcSchema
		
		AddProperty(poRec,"tip_modificare", 0)
		poRec.e_mama = Iif(Thisform.optGrup.Value = 2, 1, 0)
		
		
		Do Case
			Case Empty(poRec.firma)
				aMessagebox('Nu ati completat numele firmei!',0+48,"Atentie")
				Thisform.clb_firma.text_simplu1.SetFocus()
				PLRETURN=.F.
			Case Empty(poRec.schema)
				aMessagebox('Nu ati completat numele schemei!',0+48,"Atentie")
				Thisform.txtSchema.SetFocus()
				PLRETURN=.F.
			CASE !m.llModificare AND Thisform.Verificaschema()
				AMESSAGEBOX('Schema ' + ALLTRIM(poRec.Schema) + ' exista pe server! Incercati alt nume de schema.',0+64, _screen.Caption)
				Thisform.txtSchema.SetFocus()
				PLRETURN=.F.
			Case poRec.e_mama = 1 And Nvl(poRec.id_mama,0) <> 0
				aMessagebox('O firma nu poate face parte dintr-un grup parinte si sa fie si grup!', 0+48,'Atentie')
				poRec.e_mama = 0
				This.CHKMama.Refresh()
				PLRETURN=.F.
			Case Empty(Nvl(poRec.tip_modificare,0)) And gcNumeProgram = [ROADEF]
				aMessagebox("Nu ati ales tipul operatiei pentru registrul electronic al salariatilor!",48,"Atentie")
				Thisform.cb_tx_operatie._cbbase1.SetFocus()
			Otherwise
				*!*		&& DACA SUNT IN ROASTART (CONTAFIN_ORACLE) - NU AM NOMENCLATOARELE DE JUDETE, LOCALITATI
				*!*		&& LE FAC NULL, IAR IN PROCEDURA DE MODIFICARE NU LE MODIFIC DACA SUNT NULL
				*!*		IF !this.ct_clb_localitate.Visible
				*!*			THIS.OREC.ID_LOC = NULL
				*!*
				*!*		ENDIF
		
				PLRETURN=Thisform.cus_odata_firme_mini1.salvare(This.OREC,This.NID)
		
		Endcase
		Return PLRETURN
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		Local lcLista, lnAn
		DoDefault()
		This.orec= toRec
		This.nid = tnId
		This.cus_odata_firme_mini1.cactiune = tcActiune
		IF UPPER(tcActiune) = 'UPDATE'
			THIS.lblLunaInitializare.Visible = .F.
			this.cboLuna.Visible = .F.
			This.cboAn.Visible = .F.
			this.txtSchema.ReadOnly = .T.
			this.lb_titlu_alb_b121.Caption = 'MODIFICARE FIRMA'
		ENDIF 
		lcLista = '2000'
		FOR lnAn = 2001 TO YEAR(DATE())
			lcLista = lcLista + ',' + ALLTRIM(STR(m.lnAn))
		ENDFOR 
		this.cboAn.RowSource = m.lcLista 
	ENDPROC

	PROCEDURE Load
		*!* populez cursorul cu grupuri parinte
		CREATE CURSOR crsGrupuri (id_firma i null, firma c(100), schema c(100))
		INSERT INTO crsGrupuri (id_firma, firma, schema) VALUES (NULL, "", "")
		
		CREATE CURSOR crsScheme (schema c(30))
		SELECT crsScheme
		INDEX on schema TAG schema 
		
		lcSql = [select id_firma, firma, schema from syn_v_nom_firme where id_firma <> ] + ALLTRIM(STR(poRec.id_firma)) + [ and e_mama = 1 ORDER BY firma]
		llSucces = goExecutor.oExecuta(m.lcSql, "crsGrupuriTemp")
		IF m.llSucces 
			SELECT crsGrupuri	
			APPEND FROM DBF('crsGrupuriTemp')
		ENDIF 
		
		USE IN (SELECT('crsGrupuriTemp'))
		
		
		lcSql = [select rpad(UPPER(username), 30, ' ') as schema from all_users order by username]
		
		llSucces = goExecutor.oExecuta(lcSql, "crsSchemeTemp")
		IF m.llSucces
			SELECT crsScheme
			APPEND FROM DBF('crsSchemeTemp')
		ENDIF 
		
		USE IN (SELECT('crsSchemeTemp'))
	ENDPROC

	PROCEDURE sucursala
	ENDPROC

	PROCEDURE verificaschema
		Local lcSchema
		lcSchema = ALLTRIM(UPPER(poRec.schema))
		
		RETURN Seek(m.lcSchema, 'crsScheme', 'schema')
	ENDPROC

	PROCEDURE cboGrupParinte.Init
		IF !ISNULL(poRec.id_mama)
			SELECT crsGrupuri
			LOCATE FOR id_firma = poRec.id_mama
			IF FOUND()
				this.Value = firma
			ELSE
				GO TOP 
				poRec.id_mama = NULL
				THIS.Value = ""
			ENDIF 
		ENDIF 
	ENDPROC

	PROCEDURE cboGrupParinte.Valid
		poRec.id_mama = crsGrupuri.id_firma
		IF !ISNULL(poRec.id_mama)
			poRec.e_mama = 0
		ENDIF
	ENDPROC

	PROCEDURE optGrup.Valid
		LOCAL llMembruGrup, llInitializare
		
		llMembruGrup = (this.value = 3)
		llInitializare = Thisform.cus_odata_firme_mini1.cactiune = 'INSERT' AND !llMembruGrup
		
		thisform.lblGrupParinte.Visible = m.llMembruGrup
		thisform.cboGrupParinte.Visible = m.llMembruGrup
		thisform.lblLunaInitializare.Visible = m.llInitializare
		thisform.cboLuna.Visible = m.llInitializare
		thisform.cboAn.Visible = m.llInitializare
		
		thisform.txtSchema.Visible = !m.llMembruGrup
		IF !m.llMembruGrup
			poRec.id_mama = NULL
		ENDIF 
		THISFORM.Refresh()
	ENDPROC

	PROCEDURE txtFirma.Valid
		Local lcCaracter, lcSchema, i
		
		If Empty(poRec.schema)
			lcSchema = Upper(Alltrim(Strtran(poRec.firma, ' ')))
		
			For i = 1 To Len(m.lcSchema)
				lcCaracter = Left(m.lcSchema, 1)
				If Inlist(m.lcCaracter, '/', '\', ':', '*', '?', '<', '>', '"', '|', '&')
					lcSchema = Strtran(m.lcSchema, m.lcCaracter, '')
				Endif
			Endfor
			poRec.schema = m.lcSchema
			Thisform.txtSchema.Refresh
		Endif
		
	ENDPROC

	PROCEDURE txtSchema.Valid
		IF Thisform.Verificaschema()
			AMESSAGEBOX('Schema ' + ALLTRIM(poRec.schema) + ' exista pe server! Incercati alt nume de schema.',0+64, _screen.Caption)
			RETURN 0
		ENDIF 	
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_firme_nou 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="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cod_fiscal" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_reg_comert" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_banca1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont_banca1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_banca2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont_banca2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_banca3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont_banca3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cod_firma" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_capsocvar" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_email" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_caen" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_codang" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nume" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_prenume" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_telefon" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_telefon2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_telefon3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_capsocsub" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_oasp" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ed_adresa" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_firme1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ed_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu10" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu11" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_tx_categorie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_schema" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ct_clb_formaj" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ct_clb_nivel" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ct_clb_organizare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ct_clb_proprietate" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_itm" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_tx_operatie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkMama" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_tx_mama" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_declarant" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_functie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ct_localitate1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_tx_caen_revizie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_banca4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont_banca4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_banca5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont_banca5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_banca6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont_banca6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_banca7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont_banca7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_banca8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont_banca8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_banca9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont_banca9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_banca10" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont_banca10" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: alege_fj
		*m: alege_judet
		*m: alege_localitate
		*m: alege_mama
		*m: alege_nivel
		*m: alege_organizare
		*m: alege_proprietate
		*m: sucursala
		*p: id_judet
		*p: jcategorie
		*p: nid
		*p: orec
		*p: parenta
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 3
		Desktop = .T.
		DoCreate = .T.
		Height = 550
		id_judet = 0
		jcategorie = 1
		Name = "frm_firme_nou"
		nid = 
		orec = 
		parenta = 0
		ScrollBars = 2
		Width = 867
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 836
		_SHAPE2.Height = 29
		_SHAPE2.Left = 764
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		_SHAPE2.Visible = .T.
		_SHAPE2.Width = 72
		LB_TITLU_ALB_B121.Caption = "FIRMA"
		LB_TITLU_ALB_B121.FontBold = .T.
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		LB_TITLU_ALB_B121.TabIndex = 60
		BUT_TERMIN1.Left = 803
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 55
		BUT_TERMIN1.Top = 1
		Gridsort1.Left = 20
		Gridsort1.Name = "Gridsort1"
		Gridsort1.Top = 214
	*</PropValue>

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

	ADD OBJECT 'Cb_tx_caen_revizie' AS cb_tx_simplu WITH ;
		Height = 29, ;
		Left = 201, ;
		Name = "Cb_tx_caen_revizie", ;
		TabIndex = 5, ;
		Top = 120, ;
		Width = 125, ;
		_cbbase1.BoundTo = .T., ;
		_cbbase1.ColumnCount = 1, ;
		_cbbase1.ColumnLines = .F., ;
		_cbbase1.ControlSource = "poRec.caen_revizie", ;
		_cbbase1.Height = 23, ;
		_cbbase1.Left = 54, ;
		_cbbase1.Name = "_cbbase1", ;
		_cbbase1.RowSource = "1,2,3,4", ;
		_cbbase1.RowSourceType = 1, ;
		_cbbase1.Top = 3, ;
		_cbbase1.Width = 66, ;
		_lbbase1.Caption = "Revizie", ;
		_lbbase1.Name = "_lbbase1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cb_tx_categorie' AS cb_tx_simplu WITH ;
		Height = 29, ;
		Left = 12, ;
		Name = "Cb_tx_categorie", ;
		TabIndex = 8, ;
		Top = 204, ;
		Width = 314, ;
		_cbbase1.BoundColumn = 2, ;
		_cbbase1.BoundTo = .T., ;
		_cbbase1.ColumnCount = 2, ;
		_cbbase1.ControlSource = "thisform.jcategorie", ;
		_cbbase1.Height = 23, ;
		_cbbase1.Left = 90, ;
		_cbbase1.Name = "_cbbase1", ;
		_cbbase1.RowSource = "Persoana juridica,1,Persoana fizica,2", ;
		_cbbase1.RowSourceType = 1, ;
		_cbbase1.Top = 3, ;
		_cbbase1.Width = 220, ;
		_lbbase1.Caption = "Categorie", ;
		_lbbase1.Name = "_lbbase1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cb_tx_mama' AS cb_tx_simplu WITH ;
		Height = 29, ;
		Left = 12, ;
		Name = "Cb_tx_mama", ;
		TabIndex = 58, ;
		Top = 774, ;
		Width = 314, ;
		_CBBASE1.ColumnCount = 2, ;
		_CBBASE1.ColumnLines = .F., ;
		_CBBASE1.ColumnWidths = "200,50", ;
		_CBBASE1.Height = 23, ;
		_CBBASE1.Left = 80, ;
		_CBBASE1.Name = "_CBBASE1", ;
		_CBBASE1.RowSource = "crsGrupuri.firma", ;
		_CBBASE1.RowSourceType = 6, ;
		_CBBASE1.TabIndex = 1, ;
		_CBBASE1.Top = 3, ;
		_CBBASE1.Width = 230, ;
		_LBBASE1.Caption = "Grup părinte", ;
		_LBBASE1.Name = "_LBBASE1", ;
		_LBBASE1.TabIndex = 2
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cb_tx_operatie' AS cb_tx_simplu WITH ;
		BackColor = 252,253,208, ;
		BackStyle = 1, ;
		Height = 29, ;
		Left = 356, ;
		Name = "Cb_tx_operatie", ;
		TabIndex = 54, ;
		Top = 727, ;
		Width = 314, ;
		_cbbase1.BoundColumn = 2, ;
		_cbbase1.BoundTo = .T., ;
		_cbbase1.ColumnCount = 2, ;
		_cbbase1.ColumnLines = .F., ;
		_cbbase1.ColumnWidths = "200,50", ;
		_cbbase1.Height = 23, ;
		_cbbase1.Left = 75, ;
		_cbbase1.Name = "_cbbase1", ;
		_cbbase1.RowSource = "Fara scriere,1,Corectie,2,Modificare,3", ;
		_cbbase1.RowSourceType = 1, ;
		_cbbase1.Top = 3, ;
		_cbbase1.Width = 232, ;
		_lbbase1.Caption = "Operație", ;
		_lbbase1.Name = "_lbbase1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'chkMama' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Este grup", ;
		ControlSource = "poRec.e_mama", ;
		Left = 251, ;
		Name = "chkMama", ;
		TabIndex = 59, ;
		Top = 807
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Clb_banca1' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 625, ;
		Name = "Clb_banca1", ;
		TabIndex = 23, ;
		Top = 36, ;
		Width = 217, ;
		TEXT_SIMPLU1.ControlSource = "porec.banca1", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 50, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 160, ;
		LB_SIMPLU1.Caption = "Banca", ;
		LB_SIMPLU1.FontBold = .T., ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_banca10' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 625, ;
		Name = "Clb_banca10", ;
		TabIndex = 41, ;
		Top = 288, ;
		Width = 217, ;
		Text_simplu1.ControlSource = "porec.banca10", ;
		Text_simplu1.Left = 50, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Width = 160, ;
		Lb_simplu1.Caption = "Banca", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_banca2' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 625, ;
		Name = "Clb_banca2", ;
		TabIndex = 25, ;
		Top = 64, ;
		Width = 217, ;
		TEXT_SIMPLU1.ControlSource = "porec.banca2", ;
		TEXT_SIMPLU1.Left = 50, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Width = 160, ;
		LB_SIMPLU1.Caption = "Banca", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_banca3' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 625, ;
		Name = "Clb_banca3", ;
		TabIndex = 27, ;
		Top = 92, ;
		Width = 217, ;
		TEXT_SIMPLU1.ControlSource = "porec.banca3", ;
		TEXT_SIMPLU1.Left = 50, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Width = 160, ;
		LB_SIMPLU1.Caption = "Banca", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_banca4' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 625, ;
		Name = "Clb_banca4", ;
		TabIndex = 29, ;
		Top = 120, ;
		Width = 217, ;
		Text_simplu1.ControlSource = "porec.banca4", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 50, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 160, ;
		Lb_simplu1.Caption = "Banca", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_banca5' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 625, ;
		Name = "Clb_banca5", ;
		TabIndex = 31, ;
		Top = 148, ;
		Width = 217, ;
		Text_simplu1.ControlSource = "porec.banca5", ;
		Text_simplu1.Left = 50, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Width = 160, ;
		Lb_simplu1.Caption = "Banca", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_banca6' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 625, ;
		Name = "Clb_banca6", ;
		TabIndex = 33, ;
		Top = 176, ;
		Width = 217, ;
		Text_simplu1.ControlSource = "porec.banca6", ;
		Text_simplu1.Left = 50, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Width = 160, ;
		Lb_simplu1.Caption = "Banca", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_banca7' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 625, ;
		Name = "Clb_banca7", ;
		TabIndex = 35, ;
		Top = 204, ;
		Width = 217, ;
		Text_simplu1.ControlSource = "porec.banca7", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 50, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 160, ;
		Lb_simplu1.Caption = "Banca", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_banca8' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 625, ;
		Name = "Clb_banca8", ;
		TabIndex = 37, ;
		Top = 232, ;
		Width = 217, ;
		Text_simplu1.ControlSource = "porec.banca8", ;
		Text_simplu1.Left = 50, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Width = 160, ;
		Lb_simplu1.Caption = "Banca", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_banca9' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 625, ;
		Name = "Clb_banca9", ;
		TabIndex = 39, ;
		Top = 260, ;
		Width = 217, ;
		Text_simplu1.ControlSource = "porec.banca9", ;
		Text_simplu1.Left = 50, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Width = 160, ;
		Lb_simplu1.Caption = "Banca", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_caen' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 12, ;
		Name = "Clb_caen", ;
		TabIndex = 4, ;
		Top = 120, ;
		Width = 190, ;
		TEXT_SIMPLU1.ControlSource = "porec.caen", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 90, ;
		TEXT_SIMPLU1.MaxLength = 4, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 94, ;
		LB_SIMPLU1.Caption = "CAEN", ;
		LB_SIMPLU1.FontBold = .T., ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_capsocsub' AS clb_tx_simplu WITH ;
		Left = 12, ;
		Name = "Clb_capsocsub", ;
		TabIndex = 7, ;
		Top = 176, ;
		Width = 314, ;
		TEXT_SIMPLU1.ControlSource = "porec.capital_soc_sub", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Width = 209, ;
		LB_SIMPLU1.Caption = "Capital soc. sub.", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_capsocvar' AS clb_tx_simplu WITH ;
		Left = 12, ;
		Name = "Clb_capsocvar", ;
		TabIndex = 6, ;
		Top = 148, ;
		Width = 314, ;
		TEXT_SIMPLU1.ControlSource = "porec.capital_soc_var", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Width = 209, ;
		LB_SIMPLU1.Caption = "Capital soc. văr.", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cod_firma' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 365, ;
		Name = "Clb_cod_firma", ;
		TabIndex = 51, ;
		Top = 618, ;
		Width = 290, ;
		TEXT_SIMPLU1.ControlSource = "porec.cod_firma", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Cod firmă", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cod_fiscal' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 12, ;
		Name = "Clb_cod_fiscal", ;
		TabIndex = 2, ;
		Top = 64, ;
		Width = 314, ;
		Text_simplu1.ControlSource = "porec.cod_fiscal", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 90, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 220, ;
		Lb_simplu1.Caption = "Cod fiscal", ;
		Lb_simplu1.FontBold = .T., ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_codang' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 365, ;
		Name = "Clb_codang", ;
		TabIndex = 48, ;
		Top = 534, ;
		Width = 290, ;
		TEXT_SIMPLU1.ControlSource = "porec.codang", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Cod angajator", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont_banca1' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_cont_banca1", ;
		TabIndex = 22, ;
		Top = 36, ;
		Width = 258, ;
		TEXT_SIMPLU1.ControlSource = "porec.cont_banca1", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 55, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 200, ;
		LB_SIMPLU1.Caption = "Cont 1", ;
		LB_SIMPLU1.FontBold = .T., ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont_banca10' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_cont_banca10", ;
		TabIndex = 40, ;
		Top = 288, ;
		Width = 258, ;
		Text_simplu1.ControlSource = "porec.cont_banca10", ;
		Text_simplu1.Left = 55, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Width = 200, ;
		Lb_simplu1.Caption = "Cont 10", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont_banca2' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_cont_banca2", ;
		TabIndex = 24, ;
		Top = 64, ;
		Width = 258, ;
		TEXT_SIMPLU1.ControlSource = "porec.cont_banca2", ;
		TEXT_SIMPLU1.Left = 55, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Width = 200, ;
		LB_SIMPLU1.Caption = "Cont 2", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont_banca3' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_cont_banca3", ;
		TabIndex = 26, ;
		Top = 92, ;
		Width = 258, ;
		TEXT_SIMPLU1.ControlSource = "porec.cont_banca3", ;
		TEXT_SIMPLU1.Left = 55, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Width = 200, ;
		LB_SIMPLU1.Caption = "Cont 3", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont_banca4' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_cont_banca4", ;
		TabIndex = 28, ;
		Top = 120, ;
		Width = 258, ;
		Text_simplu1.ControlSource = "porec.cont_banca4", ;
		Text_simplu1.Left = 55, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 200, ;
		Lb_simplu1.Caption = "Cont 4", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont_banca5' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_cont_banca5", ;
		TabIndex = 30, ;
		Top = 148, ;
		Width = 258, ;
		Text_simplu1.ControlSource = "porec.cont_banca5", ;
		Text_simplu1.Left = 55, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Width = 200, ;
		Lb_simplu1.Caption = "Cont 5", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont_banca6' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_cont_banca6", ;
		TabIndex = 32, ;
		Top = 176, ;
		Width = 258, ;
		Text_simplu1.ControlSource = "porec.cont_banca6", ;
		Text_simplu1.Left = 55, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Width = 200, ;
		Lb_simplu1.Caption = "Cont 6", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont_banca7' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_cont_banca7", ;
		TabIndex = 34, ;
		Top = 204, ;
		Width = 258, ;
		Text_simplu1.ControlSource = "porec.cont_banca7", ;
		Text_simplu1.Left = 55, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 200, ;
		Lb_simplu1.Caption = "Cont 7", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont_banca8' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_cont_banca8", ;
		TabIndex = 36, ;
		Top = 232, ;
		Width = 258, ;
		Text_simplu1.ControlSource = "porec.cont_banca8", ;
		Text_simplu1.Left = 55, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Width = 200, ;
		Lb_simplu1.Caption = "Cont 8", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont_banca9' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_cont_banca9", ;
		TabIndex = 38, ;
		Top = 260, ;
		Width = 258, ;
		Text_simplu1.ControlSource = "porec.cont_banca9", ;
		Text_simplu1.Left = 55, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Width = 200, ;
		Lb_simplu1.Caption = "Cont 9", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_declarant' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 365, ;
		Name = "Clb_declarant", ;
		TabIndex = 52, ;
		Top = 646, ;
		Width = 290, ;
		Text_simplu1.ControlSource = "porec.declarant", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Declarant", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_email' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 545, ;
		Name = "Clb_email", ;
		TabIndex = 45, ;
		Top = 324, ;
		Width = 284, ;
		TEXT_SIMPLU1.ControlSource = "porec.email", ;
		TEXT_SIMPLU1.Format = "K", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 65, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 214, ;
		LB_SIMPLU1.Caption = "E-mail", ;
		LB_SIMPLU1.FontBold = .T., ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_functie' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 365, ;
		Name = "Clb_functie", ;
		TabIndex = 53, ;
		Top = 674, ;
		Width = 290, ;
		Text_simplu1.ControlSource = "porec.functie", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Funcție/calitate", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_itm' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 365, ;
		Name = "Clb_itm", ;
		TabIndex = 50, ;
		Top = 590, ;
		Width = 290, ;
		Text_simplu1.ControlSource = "porec.indicativ", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Lb_simplu1.Caption = "ITM", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nume' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 365, ;
		Name = "Clb_nume", ;
		TabIndex = 46, ;
		Top = 478, ;
		Width = 290, ;
		TEXT_SIMPLU1.ControlSource = "porec.nume", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Nume", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_oasp' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 365, ;
		Name = "Clb_oasp", ;
		TabIndex = 49, ;
		Top = 562, ;
		Width = 290, ;
		TEXT_SIMPLU1.ControlSource = "porec.oasp", ;
		TEXT_SIMPLU1.MaxLength = 3, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "OASP", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_prenume' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 365, ;
		Name = "Clb_prenume", ;
		TabIndex = 47, ;
		Top = 506, ;
		Width = 290, ;
		TEXT_SIMPLU1.ControlSource = "porec.prenume", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Prenume", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_reg_comert' AS clb_tx_simplu WITH ;
		Left = 12, ;
		Name = "Clb_reg_comert", ;
		TabIndex = 3, ;
		Top = 92, ;
		Width = 314, ;
		TEXT_SIMPLU1.ControlSource = "porec.reg_comert", ;
		TEXT_SIMPLU1.Left = 90, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Width = 220, ;
		LB_SIMPLU1.Caption = "Reg. comerț", ;
		LB_SIMPLU1.FontBold = .T., ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_schema' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 12, ;
		Name = "Clb_schema", ;
		TabIndex = 57, ;
		Top = 746, ;
		Width = 314, ;
		Text_simplu1.ControlSource = "porec.schema", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 80, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 230, ;
		Lb_simplu1.Caption = "Schema", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_telefon' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 365, ;
		Name = "Clb_telefon", ;
		TabIndex = 42, ;
		Top = 324, ;
		Width = 181, ;
		TEXT_SIMPLU1.ControlSource = "porec.telefon", ;
		TEXT_SIMPLU1.Left = 65, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Width = 110, ;
		LB_SIMPLU1.Caption = "Telefon", ;
		LB_SIMPLU1.FontBold = .T., ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_telefon2' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 365, ;
		Name = "Clb_telefon2", ;
		TabIndex = 43, ;
		Top = 352, ;
		Width = 181, ;
		TEXT_SIMPLU1.ControlSource = "porec.telefon2", ;
		TEXT_SIMPLU1.Left = 65, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Width = 110, ;
		LB_SIMPLU1.Caption = "Telefon 2", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_telefon3' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 545, ;
		Name = "Clb_telefon3", ;
		TabIndex = 44, ;
		Top = 352, ;
		Width = 181, ;
		TEXT_SIMPLU1.ControlSource = "porec.telefon3", ;
		TEXT_SIMPLU1.Left = 65, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Width = 110, ;
		LB_SIMPLU1.Caption = "Telefon 3", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 12, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 36, ;
		Width = 314, ;
		Text_simplu1.ControlSource = "porec.firma", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 90, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 220, ;
		Lb_simplu1.Caption = "Firma", ;
		Lb_simplu1.FontBold = .T., ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu10' AS clb_tx_simplu WITH ;
		Left = 12, ;
		Name = "Clb_tx_simplu10", ;
		TabIndex = 20, ;
		Top = 674, ;
		Width = 314, ;
		Text_simplu1.ControlSource = "porec.apart", ;
		Text_simplu1.Left = 80, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Width = 230, ;
		Lb_simplu1.Caption = "Apartament", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu11' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 12, ;
		Name = "Clb_tx_simplu11", ;
		TabIndex = 21, ;
		Top = 702, ;
		Width = 314, ;
		Text_simplu1.ControlSource = "porec.cod_postal", ;
		Text_simplu1.Left = 80, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Width = 230, ;
		Lb_simplu1.Caption = "Cod poștal", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu6' AS clb_tx_simplu WITH ;
		Left = 12, ;
		Name = "Clb_tx_simplu6", ;
		TabIndex = 16, ;
		Top = 562, ;
		Width = 314, ;
		Text_simplu1.ControlSource = "porec.strada", ;
		Text_simplu1.Left = 80, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Width = 230, ;
		Lb_simplu1.Caption = "Strada", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu7' AS clb_tx_simplu WITH ;
		Left = 12, ;
		Name = "Clb_tx_simplu7", ;
		TabIndex = 17, ;
		Top = 590, ;
		Width = 314, ;
		Text_simplu1.ControlSource = "porec.numar", ;
		Text_simplu1.Left = 80, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Width = 230, ;
		Lb_simplu1.Caption = "Număr", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu8' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 12, ;
		Name = "Clb_tx_simplu8", ;
		TabIndex = 18, ;
		Top = 618, ;
		Width = 314, ;
		Text_simplu1.ControlSource = "porec.bloc", ;
		Text_simplu1.Left = 80, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 230, ;
		Lb_simplu1.Caption = "Bloc", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu9' AS clb_tx_simplu WITH ;
		Left = 12, ;
		Name = "Clb_tx_simplu9", ;
		TabIndex = 19, ;
		Top = 646, ;
		Width = 314, ;
		Text_simplu1.ControlSource = "porec.scara", ;
		Text_simplu1.Left = 80, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Width = 230, ;
		Lb_simplu1.Caption = "Scara", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Ct_clb_formaj' AS ct_clb_cautare WITH ;
		cconditie = empty(nvl(porec.forma_juridica,''))=.t., ;
		cprocedura = thisform.alege_fj, ;
		cvar_afisata = porec.forma_juridica, ;
		Left = 11, ;
		Name = "Ct_clb_formaj", ;
		TabIndex = 10, ;
		Top = 259, ;
		img_cautare.Name = "img_cautare", ;
		clb_tx_cautare.Lb_simplu1.Caption = "Formă juridică", ;
		clb_tx_cautare.Lb_simplu1.Name = "Lb_simplu1", ;
		clb_tx_cautare.Name = "clb_tx_cautare", ;
		clb_tx_cautare.Text_simplu1.Left = 90, ;
		clb_tx_cautare.Text_simplu1.Name = "Text_simplu1", ;
		clb_tx_cautare.Text_simplu1.Width = 220
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="container" />

	ADD OBJECT 'Ct_clb_nivel' AS ct_clb_cautare WITH ;
		cconditie = empty(nvl(porec.tip_societate,''))=.t., ;
		cprocedura = thisform.alege_nivel, ;
		cvar_afisata = porec.tip_societate, ;
		Left = 11, ;
		Name = "Ct_clb_nivel", ;
		TabIndex = 12, ;
		Top = 315, ;
		img_cautare.Name = "img_cautare", ;
		clb_tx_cautare.Lb_simplu1.Caption = "Nivel", ;
		clb_tx_cautare.Lb_simplu1.Name = "Lb_simplu1", ;
		clb_tx_cautare.Name = "clb_tx_cautare", ;
		clb_tx_cautare.Text_simplu1.Left = 90, ;
		clb_tx_cautare.Text_simplu1.Name = "Text_simplu1", ;
		clb_tx_cautare.Text_simplu1.Width = 220
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="container" />

	ADD OBJECT 'Ct_clb_organizare' AS ct_clb_cautare WITH ;
		cconditie = empty(nvl(porec.forma_organizare,''))=.t., ;
		cprocedura = thisform.alege_organizare, ;
		cvar_afisata = porec.forma_organizare, ;
		Left = 11, ;
		Name = "Ct_clb_organizare", ;
		TabIndex = 11, ;
		Top = 287, ;
		img_cautare.Name = "img_cautare", ;
		clb_tx_cautare.Lb_simplu1.Caption = "Organizare", ;
		clb_tx_cautare.Lb_simplu1.Name = "Lb_simplu1", ;
		clb_tx_cautare.Name = "clb_tx_cautare", ;
		clb_tx_cautare.Text_simplu1.Height = 23, ;
		clb_tx_cautare.Text_simplu1.Left = 90, ;
		clb_tx_cautare.Text_simplu1.Name = "Text_simplu1", ;
		clb_tx_cautare.Text_simplu1.Top = 3, ;
		clb_tx_cautare.Text_simplu1.Width = 220
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="container" />

	ADD OBJECT 'Ct_clb_proprietate' AS ct_clb_cautare WITH ;
		cconditie = empty(nvl(porec.forma_proprietate,''))=.t., ;
		cprocedura = thisform.alege_proprietate, ;
		cvar_afisata = porec.forma_proprietate, ;
		Left = 11, ;
		Name = "Ct_clb_proprietate", ;
		TabIndex = 9, ;
		Top = 231, ;
		img_cautare.Name = "img_cautare", ;
		clb_tx_cautare.Lb_simplu1.Caption = "Proprietate", ;
		clb_tx_cautare.Lb_simplu1.Name = "Lb_simplu1", ;
		clb_tx_cautare.Name = "clb_tx_cautare", ;
		clb_tx_cautare.Text_simplu1.Left = 90, ;
		clb_tx_cautare.Text_simplu1.Name = "Text_simplu1", ;
		clb_tx_cautare.Text_simplu1.Width = 220
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="container" />

	ADD OBJECT 'Ct_localitate1' AS ct_localitate WITH ;
		cdate = porec, ;
		Left = 12, ;
		Name = "Ct_localitate1", ;
		TabIndex = 15, ;
		Top = 478, ;
		Width = 314, ;
		CB_LOCALITATE_AF.img_atentie.Name = "img_atentie", ;
		CB_LOCALITATE_AF.Name = "CB_LOCALITATE_AF", ;
		CB_LOCALITATE_AF._CBAUTOFILL1.Name = "_CBAUTOFILL1", ;
		CB_LOCALITATE_AF._LBBASE1.FontBold = .T., ;
		CB_LOCALITATE_AF._LBBASE1.Name = "_LBBASE1", ;
		CB_TARA.Name = "CB_TARA", ;
		CB_TARA._CBBASE1.Name = "_CBBASE1", ;
		CB_TARA._LBBASE1.FontBold = .T., ;
		CB_TARA._LBBASE1.Name = "_LBBASE1", ;
		CB_JUDET.Name = "CB_JUDET", ;
		CB_JUDET._CBBASE1.Name = "_CBBASE1", ;
		CB_JUDET._LBBASE1.FontBold = .T., ;
		CB_JUDET._LBBASE1.Name = "_LBBASE1"
		*< END OBJECT: ClassLib="onomenclatoare.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_firme1' AS cus_odata_firme WITH ;
		Left = 322, ;
		Name = "Cus_odata_firme1", ;
		Top = 672
		*< END OBJECT: ClassLib="ofirma.vcx" BaseClass="custom" />

	ADD OBJECT 'Ed_adresa' AS ed_tx_simplu WITH ;
		Height = 45, ;
		Left = 14, ;
		Name = "Ed_adresa", ;
		TabIndex = 14, ;
		Top = 428, ;
		Width = 814, ;
		_edbase1.ControlSource = "porec.adresa", ;
		_edbase1.Height = 41, ;
		_edbase1.Left = 102, ;
		_edbase1.Name = "_edbase1", ;
		_edbase1.Top = 2, ;
		_edbase1.Width = 703, ;
		_LBBASE1.Caption = "Adresă", ;
		_LBBASE1.FontBold = .T., ;
		_LBBASE1.Name = "_LBBASE1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Ed_tx_simplu1' AS ed_tx_simplu WITH ;
		Height = 40, ;
		Left = 14, ;
		Name = "Ed_tx_simplu1", ;
		TabIndex = 13, ;
		Top = 389, ;
		Width = 814, ;
		_EDBASE1.ControlSource = "porec.antet", ;
		_EDBASE1.Height = 36, ;
		_EDBASE1.Left = 102, ;
		_EDBASE1.Name = "_EDBASE1", ;
		_EDBASE1.Top = 2, ;
		_EDBASE1.Width = 700, ;
		_LBBASE1.Caption = "Antet", ;
		_LBBASE1.FontBold = .T., ;
		_LBBASE1.Name = "_LBBASE1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />
	
	PROCEDURE alege_fj
		buton=2 
		lnidstaresoc = thisform.jcategorie 
		pcselect = [select id_forma_juridica,denumire from syn_nom_forme_juridice]
		pcFiltru = []
		pcFiltruOrig = [id_staresoc=?lnidstaresoc]
		pcschema = ['']
		pcorder = [ordine]
		pccoloane = [denumire]
		pcTitlu = [Categorie]
		pcTitluColoane = [Categorie]
		locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,[],.F.,pcFiltruOrig)
		
		*!*		Parameters tcselect,tcfiltru,tcschema,tcorder,tccoloana,tcTitlu,tcTitluColoana,tcNume_Proc,tl_AllInList,tcFiltruOriginal
		
		IF buton # 2
			porec.forma_juridica = locauta.denumire
			porec.id_forma_juridica = locauta.id_forma_juridica
		ENDIF
		
		
	ENDPROC

	PROCEDURE alege_judet
		*!*	modificare v 2.1.3
		*!*	buton=2
		*!*	pcselect = [select id_judet,judet,indicativ from syn_vnom_judete]
		*!*	pcfiltru = [inactiv=0]
		*!*	pcFiltruOriginal = [inactiv=0]
		*!*	pcschema = ['']
		*!*	pcorder = [judet]
		*!*	pccoloane = [judet,indicativ]
		*!*	pcTitlu = [Judete]
		*!*	pcTitluColoane = [Judet,Indicativ]
		*!*	locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,[],.F.,pcFiltruOriginal)
		
		*!*	*!*		Parameters tcselect,tcfiltru,tcschema,tcorder,tccoloana,tcTitlu,tcTitluColoana,tcNume_Proc,tl_AllInList,tcFiltruOriginal
		
		*!*	IF buton # 2
		*!*		porec.judet = locauta.judet
		*!*		thisform.id_judet = locauta.id_judet
		*!*		porec.indicativ=locauta.indicativ
		*!*		thisform.clb_itm.Refresh 
		*!*	ENDIF
		*!*	modificare v 2.1.3	^
	ENDPROC

	PROCEDURE alege_localitate
		*!*	modificare v 2.1.3
		*!*	If Empty(Thisform.id_judet)
		*!*		aMESSAGEBOX('Alegeti judetul!',48,"Atentie")
		*!*		porec.id_localitate=0
		*!*		Return
		*!*	Endif
		*!*	*!*	modificare	ROADEF v 2.0.23
		*!*	*!*	lnid_jud = thisform.id_judet
		*!*	*!*	pcselect = [select id_loc,localitate from nom_localitati]
		*!*	*!*	pcFiltru = [sters = 0 and id_judet=?lnid_jud]
		*!*	*!*	pcFiltruOrig = pcFiltru
		*!*	*!*	pcschema = ['']
		*!*	*!*	pcorder = [localitate]
		*!*	*!*	pccoloane = [localitate]
		*!*	*!*	pcTitlu = [Localitate]
		*!*	*!*	pcTitluColoane = [Localitate]
		*!*	*!*	locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,[],.F.,pcFiltruOrig)
		*!*	*!*	*!*		Parameters tcselect,tcfiltru,tcschema,tcorder,tccoloana,tcTitlu,tcTitluColoana,tcNume_Proc,tl_AllInList,tcFiltruOriginal
		*!*	*!*	IF buton # 2
		*!*	*!*		porec.localitate = locauta.localitate
		*!*	*!*		porec.id_loc = locauta.id_loc
		*!*	*!*	ENDIF
		*!*	loCauta = caut_localitate(Thisform.id_judet)
		*!*	If buton # 2
		*!*		porec.localitate = loCauta.localitate
		*!*		porec.id_loc = loCauta.id_loc
		*!*		porec.siruta = loCauta.siruta
		*!*	Endif
		*!*	*!*	modificare	ROADEF v 2.0.23	^
		*!*	modificare v 2.1.3	^
	ENDPROC

	PROCEDURE alege_mama
		buton=2
		lcSelect = [select id_firma, firma from syn_v_nom_firme where e_mama = 1]
		lcFiltru = []
		lcSchema = []
		lcOrder = [firma]
		lcColoane = [firma,id_firma]
		lcTitlu = [Grup parinte]
		lcTitluColoane = [Firma, Id]
		lcNumeProc = []
		llToateIreg = .F.
		lcFiltruOriginal = []
		
		loCauta = cauta_alfa(lcSelect, lcFiltru, lcSchema, lcOrder, lccoloane, lcTitlu, lcTitluColoane, lcNumeProc, llToateIreg, lcFiltruOriginal)		&& 11.07.2007
		
		If buton # 2 AND !EMPTY(loCauta.id_firma)
			porec.id_mama = locauta.id_firma
			porec.mama = locauta.firma
			poRec.e_mama = 0
		Endif
		
		
	ENDPROC

	PROCEDURE alege_nivel
		buton=2 
		pcselect = [select id_tip_soc,denumire,parent from syn_nom_tip_societate]
		pcfiltru = [2=2]
		pcschema = ['']
		pcorder = [denumire]
		pccoloane = [denumire]
		pcTitlu = [Nivel infiintare]
		pcTitluColoane = [Nivel]
		locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane)
		
		*!*		Parameters tcselect,tcfiltru,tcschema,tcorder,tccoloana,tcTitlu,tcTitluColoana,tcNume_Proc,tl_AllInList,tcFiltruOriginal
		
		IF buton # 2
			porec.tip_societate = locauta.denumire
			porec.id_tip_soc = locauta.id_tip_soc 
			thisform.ParentA = locauta.parent
			thisform.sucursala()
		ENDIF
		
		
	ENDPROC

	PROCEDURE alege_organizare
		IF EMPTY(NVL(porec.id_forma_juridica,''))
			aMESSAGEBOX("Completati forma juridica!",0+48,"Atentie")
			porec.id_forma_organizare=0
			RETURN 
		ENDIF 	
			
		buton=2	
		pcselect = [select id_forma_organizare,abreviere,denumire from syn_nom_forme_organizare]
		pcFiltru = [id_forma_juridica=?porec.id_forma_juridica]
		pcFiltruOriginal = pcFiltru
		pcschema = ['']
		pcorder = [denumire]
		pccoloane = [denumire,abreviere]
		pcTitlu = [Forma Organizare]
		pcTitluColoane = [Forma organizare,Abreviere]
		locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,[],.F.,pcFiltruOriginal)
		
		*!*		Parameters tcselect,tcfiltru,tcschema,tcorder,tccoloana,tcTitlu,tcTitluColoana,tcNume_Proc,tl_AllInList,tcFiltruOriginal
		
		IF buton # 2
			porec.forma_organizare = locauta.denumire
			porec.id_forma_organizare = locauta.id_forma_organizare
		ENDIF
		
		
	ENDPROC

	PROCEDURE alege_proprietate
		buton=2 
		pcselect = [select id_forma_prop,forma_proprietate from syn_nom_forme_proprietate]
		pcfiltru = [2=2]
		pcschema = ['']
		pcorder = [forma_proprietate]
		pccoloane = [forma_proprietate]
		pcTitlu = [Forma proprietate]
		pcTitluColoane = [Forma proprietate]
		locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane)
		
		*!*		Parameters tcselect,tcfiltru,tcschema,tcorder,tccoloana,tcTitlu,tcTitluColoana,tcNume_Proc,tl_AllInList,tcFiltruOriginal
		
		IF buton # 2
			porec.forma_proprietate = locauta.forma_proprietate 
			porec.id_forma_prop= locauta.id_forma_prop
		ENDIF
		
	ENDPROC

	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		*!*	modificare	v 2.1.515.04.2015 - dadea eroare pentru ca nu exista proprietatea tip_modificare pentru scrieregistru = 0
		*!*	AddProperty(porec,"tip_modificare",Val(Thisform.cb_tx_operatie._cbbase1.Value))
		porec.tip_modificare = Val(Thisform.cb_tx_operatie._cbbase1.Value)
		*!*	modificare	v 2.1.5 15.04.2015 ^
		Do Case
		Case Empty(porec.firma)
			aMessagebox('Nu ati completat numele firmei!',0+48,"Atentie")
			Thisform.clb_firma.text_simplu1.SetFocus()
			PLRETURN=.F.
		Case Empty(porec.schema)
			aMessagebox('Nu ati completat numele schemei!',0+48,"Atentie")
			Thisform.clb_schema.text_simplu1.SetFocus()
			PLRETURN=.F.
		Case porec.e_mama = 1 And Nvl(porec.id_mama,0) <> 0
			aMessagebox('O firma nu poate face parte dintr-un grup parinte si sa fie si grup!', 0+48,'Atentie')
			porec.e_mama = 0
			This.CHKMama.Refresh()
			PLRETURN=.F.
		*!*	modificare	ROADEF v 2.0.23
		Case Empty(Nvl(porec.caen,[])) And gcNumeProgram = [ROADEF] And IIF(TYPE("gnScrieRegistru")="U",0,gnScrieRegistru) = 1
			aMessagebox("Nu ati completat codul CAEN!",48,"Atentie")
			Thisform.clb_caen.text_simplu1.SetFocus()
		Case Empty(Nvl(porec.adresa,[])) And gcNumeProgram = [ROADEF] And IIF(TYPE("gnScrieRegistru")="U",0,gnScrieRegistru) = 1
			aMessagebox("Nu ati completat adresa!",48,"Atentie")
			Thisform.ed_adresa._edbase1.SetFocus()
		Case Empty(Nvl(porec.localitate,[])) And gcNumeProgram = [ROADEF] And IIF(TYPE("gnScrieRegistru")="U",0,gnScrieRegistru) = 1
			aMessagebox("Nu ati ales localitatea!",48,"Atentie")
			Thisform.ct_clb_localitate.SetFocus()
		*!*	modificare v 2.1.3
		*!*	Case Empty(Nvl(porec.siruta,0)) And gcNumeProgram = [ROADEF] And IIF(TYPE("gnScrieRegistru")="U",0,gnScrieRegistru) = 1
		*!*		aMessagebox("Localitatea aleasa nu are completat codul SIRUTA!"+Chr(13)+Chr(10)+;
		*!*			"Mai deschideti o instanta a programului 'Definirea companiei' si completati codul SIRUTA pentru localitatea "+Alltrim(porec.localitate)+" din 'Liste nomenclatoare > Localitati'!",48,"Atentie")
		*!*		Thisform.ct_clb_localitate.SetFocus()
		*!*	modificare v 2.1.3	^
		Case Empty(Nvl(porec.declarant,[])) And gcNumeProgram = [ROADEF] And IIF(TYPE("gnScrieRegistru")="U",0,gnScrieRegistru) = 1
			aMessagebox("Nu ati completat reprezentantul legal (declarant) !",48,"Atentie")
			Thisform.clb_declarant.text_simplu1.SetFocus()
		*!*	modificare	ROADEF v 2.0.23	^
		*!*	modificare	ROADEF v 2.0.23
		*!*		CASE EMPTY(NVL(porec.tip_modificare,0)) AND gcNumeProgram = [ROADEF]
		Case Empty(Nvl(porec.tip_modificare,0)) And gcNumeProgram = [ROADEF] And IIF(TYPE("gnScrieRegistru")="U",0,gnScrieRegistru) = 1
		*!*	modificare	ROADEF v 2.0.23	^
			aMessagebox("Nu ati ales tipul operatiei pentru registrul electronic al salariatilor!",48,"Atentie")
			Thisform.cb_tx_operatie._cbbase1.SetFocus()
		Otherwise
		*!*		&& DACA SUNT IN ROASTART (CONTAFIN_ORACLE) - NU AM NOMENCLATOARELE DE JUDETE, LOCALITATI
		*!*		&& LE FAC NULL, IAR IN PROCEDURA DE MODIFICARE NU LE MODIFIC DACA SUNT NULL
		*!*		IF !this.ct_clb_localitate.Visible
		*!*			THIS.OREC.ID_LOC = NULL
		*!*
		*!*		ENDIF
		
			PLRETURN=Thisform.cus_odata_firme1.salvare(This.OREC,This.NID)
		
		Endcase
		Return PLRETURN
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		Local lnWidth
		DoDefault()
		*!*	modificare	v 2.1.5 15.04.2015 - dadea eroare pentru ca nu exista proprietatea tip_modificare pentru scrieregistru = 0
		AddProperty(porec,"tip_modificare",1)
		*!*	modificare	v 2.1.5 15.04.2015 ^
		
		*!*	modificare	v 2.0.23
		IF gnScrieRegistru = 0
			Thisform.cb_tx_operatie.Visible = .F.
			porec.tip_modificare = 1
		ENDIF
		*!*	modificare	v 2.0.23	^
		This.orec= toRec
		This.nid = tnId
		This.cus_odata_firme1.cactiune = tcActiune
		Do Case
			Case tcActiune="INSERT"
				Thisform.lb_titlu_alb_b121.Caption="ADĂUGARE FIRMĂ"
			Case tcActiune="UPDATE"
				If Type("toRec.modificare_schema")<>"U"
					Thisform.clb_schema.text_simplu1.Enabled=Iif(toRec.modificare_schema==0,.F.,.T.)
				Endif
		*!*			Thisform.lb_titlu_alb_b121.Caption="MODIFICARE FIRMĂ"
				Thisform.jcategorie=porec.persoana_juridica
		
				&& DACA SUNT PE ROASTART - CONTAFIN_ORACLE NU AM VNOM_LOCALITATI SI VNOM_JUDETE
				IF !(TYPE('gcS') = 'U' OR EMPTY(gcS) OR UPPER(gcs) = 'CONTAFIN_ORACLE')
					Thisform.lb_titlu_alb_b121.Caption="MODIFICARE DATE FIRMĂ"
		*!*	modificare	ROADEF v 2.1.2
		*!*				lcSelect = [select id_judet,indicativ from vnom_localitati where id_loc=?porec.id_loc]
		*!*				lcCursor = [crsId_jud]
		*!*				lnSucces = goExecutor.oExecute(lcSelect,lcCursor)
		*!*				If lnSucces < 0
		*!*					Messagebox(goExecutor.cEroare)
		*!*				Else
		*!*					Select crsId_jud
		*!*					Thisform.id_judet = id_judet
		*!*					Use In crsId_jud
		*!*				ENDIF
					Thisform.id_judet = toRec.id_judet
		*!*	modificare	ROADEF v 2.1.2	^
					*!* sa nu modifice din alte programe decat roastart id_mama si e_mama
					this.cb_tx_mama.Visible = .F.
					this.chkMama.Visible = .F.
					this.clb_schema.Visible = .F.
					*!* sa nu modifice din alte programe decat roastart id_mama si e_mama ^			
				ELSE 
					*!*	modificare ROADEF v 2.0.22
		*!*				*!* nu am informatii suficiente in roastart / nu am formularul de cautare alfa_form si nu l-am mai inclus
		*!*				*!* asa ca nu mai modific toate datele in roastart
		*!*				this.ct_clb_judet.Visible = .F.	
		*!*				this.ct_clb_localitate.Visible = .F.			
		*!*				this.ct_clb_proprietate.Visible = .F.
		*!*				this.ct_clb_organizare.Visible = .F.
		*!*				this.ct_clb_nivel.Visible = .F. 
		*!*				this.ct_clb_formaj.Visible = .F. 
		*!*				this.clb_itm.Visible = .F.
		*!*				this.cb_tx_categorie.Visible = .F.
		*!*				this.clb_caen.Visible = .F.
		*!*				this.cb_tx_operatie.Visible = .F.
		*!*				*!* nu am informatii suficiente in roastart / nu am formularul de cautare alfa_form si nu l-am mai inclus ^			
					Thisform.lb_titlu_alb_b121.Caption="FIRMĂ - CÂMPURILE INACTIVE SE MODIFICĂ DIN DEFINIREA COMPANIEI"
					Thisform.ct_clb_formaj.do_dezactiveaza()
					Thisform.ct_clb_judet.do_dezactiveaza()
					Thisform.ct_clb_localitate.do_dezactiveaza()
					Thisform.ct_clb_nivel.do_dezactiveaza()
					Thisform.ct_clb_organizare.do_dezactiveaza()
					Thisform.ct_clb_proprietate.do_dezactiveaza()
					Thisform.cb_tx_categorie._cbbase1.Enabled = .F.
					Thisform.cb_tx_operatie._cbbase1.Enabled = .F.
					Thisform.ed_adresa._edbase1.ReadOnly = .T.
					Thisform.ed_tx_simplu1._edbase1.ReadOnly = .T.
					Thisform.clb_banca1.text_simplu1.ReadOnly = .T.
					Thisform.clb_banca2.text_simplu1.ReadOnly = .T.
					Thisform.clb_banca3.text_simplu1.ReadOnly = .T.
					Thisform.clb_caen.text_simplu1.ReadOnly = .T.
					Thisform.clb_capsocsub.text_simplu1.ReadOnly = .T.
					Thisform.clb_capsocvar.text_simplu1.ReadOnly = .T.
					Thisform.clb_codang.text_simplu1.ReadOnly = .T.
					Thisform.clb_cod_firma.text_simplu1.ReadOnly = .T.
					Thisform.clb_cod_fiscal.text_simplu1.ReadOnly = .T.
					Thisform.clb_cont_banca1.text_simplu1.ReadOnly = .T.
					Thisform.clb_cont_banca2.text_simplu1.ReadOnly = .T.
					Thisform.clb_cont_banca3.text_simplu1.ReadOnly = .T.
					Thisform.clb_declarant.text_simplu1.ReadOnly = .T.
					Thisform.clb_email.text_simplu1.ReadOnly = .T.
					Thisform.clb_fax.text_simplu1.ReadOnly = .T.
					Thisform.clb_functie.text_simplu1.ReadOnly = .T.
					Thisform.clb_itm.text_simplu1.ReadOnly = .T.
					Thisform.clb_nume.text_simplu1.ReadOnly = .T.
					Thisform.clb_oasp.text_simplu1.ReadOnly = .T.
					Thisform.clb_prenume.text_simplu1.ReadOnly = .T.
					Thisform.clb_reg_comert.text_simplu1.ReadOnly = .T.
					Thisform.clb_telefon.text_simplu1.ReadOnly = .T.
					Thisform.clb_telefon2.text_simplu1.ReadOnly = .T.
					Thisform.clb_telefon3.text_simplu1.ReadOnly = .T.
					Thisform.clb_tx_simplu1.text_simplu1.ReadOnly = .T.
					Thisform.clb_tx_simplu10.text_simplu1.ReadOnly = .T.
					Thisform.clb_tx_simplu11.text_simplu1.ReadOnly = .T.
					Thisform.clb_tx_simplu6.text_simplu1.ReadOnly = .T.
					Thisform.clb_tx_simplu7.text_simplu1.ReadOnly = .T.
					Thisform.clb_tx_simplu8.text_simplu1.ReadOnly = .T.
					Thisform.clb_tx_simplu9.text_simplu1.ReadOnly = .T.
					*!*	modificare ROADEF v 2.0.22	^			
				ENDIF 	
		Endcase
		*!* modificare	ROADEF v 2.1.2
		Thisform.ct_localitate1.initializeaza()
		*!* modificare	ROADEF v 2.1.2	^
		this.cb_tx_operatie._cbbase1.Value = "1"
		
	ENDPROC

	PROCEDURE Load
		*!* populez cursorul cu grupuri parinte
		CREATE CURSOR crsGrupuri (id_firma i null, firma c(100))
		INSERT INTO crsGrupuri (id_firma, firma) VALUES (NULL, "")
		
		lcSql = [select id_firma, firma from syn_v_nom_firme where id_firma <> ] + ALLTRIM(STR(poRec.id_firma)) + [ and e_mama = 1 ORDER BY firma]
		lnSucces = goExecutor.oExecute(lcSql, "crsGrupuriTemp")
		IF lnSucces < 0
			MESSAGEBOX(goExecutor.cEroare, 0+16, 'Eroare')
		ELSE
			SELECT crsGrupuri	
			APPEND FROM DBF('crsGrupuriTemp')
		ENDIF 
		
		USE IN (SELECT('crsGrupuriTemp'))
	ENDPROC

	PROCEDURE sucursala
	ENDPROC

	PROCEDURE Cb_tx_categorie._cbbase1.InteractiveChange
		porec.persoana_juridica=this.value
		thisform.jcategorie=this.Value
	ENDPROC

	PROCEDURE Cb_tx_mama._CBBASE1.Init
		IF !ISNULL(poRec.id_mama)
			SELECT crsGrupuri
			LOCATE FOR id_firma = poRec.id_mama
			IF FOUND()
				this.Value = firma
			ELSE
				GO TOP 
				poRec.id_mama = NULL
				THIS.Value = ""
			ENDIF 
		ENDIF 
	ENDPROC

	PROCEDURE Cb_tx_mama._CBBASE1.Valid
		poRec.id_mama = crsGrupuri.id_firma
		IF !ISNULL(poRec.id_mama)
			poRec.e_mama = 0
			thisform.chkMama.Refresh()
		ENDIF
	ENDPROC

	PROCEDURE chkMama.Valid
		IF poRec.e_mama = 1
			poRec.id_mama = NULL
			thisform.cb_tx_mama._CBBASE1.Value = ""
			THISform.cb_tx_mama.Refresh()
		ENDIF 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_firme_nou_desktopf AS frm_firme_nou OF "ofirma.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu4" UniqueID="" Timestamp="" />

	*<PropValue>
		Desktop = .F.
		DoCreate = .T.
		Height = 550
		Name = "frm_firme_nou_desktopf"
		Width = 867
		_SHAPE1.Anchor = 10
		_SHAPE1.Height = 29
		_SHAPE1.Left = 0
		_SHAPE1.Name = "_SHAPE1"
		_SHAPE1.Top = 0
		_SHAPE1.Width = 850
		_SHAPE1.ZOrderSet = 1
		_SHAPE2.Anchor = 8
		_SHAPE2.Left = 780
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		_SHAPE2.ZOrderSet = 2
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		LB_TITLU_ALB_B121.ZOrderSet = 3
		BUT_TERMIN1.Anchor = 8
		BUT_TERMIN1.Left = 819
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		BUT_TERMIN1.ZOrderSet = 4
		GRIDSORT1.Name = "GRIDSORT1"
		BUT_RENUNT1.Anchor = 8
		BUT_RENUNT1.Left = 785
		BUT_RENUNT1.Name = "BUT_RENUNT1"
		BUT_RENUNT1.Top = 1
		BUT_RENUNT1.ZOrderSet = 6
		Clb_cod_fiscal.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_cod_fiscal.Name = "Clb_cod_fiscal"
		Clb_cod_fiscal.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_cod_fiscal.ZOrderSet = 7
		Clb_reg_comert.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_reg_comert.Name = "Clb_reg_comert"
		Clb_reg_comert.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_reg_comert.ZOrderSet = 8
		Clb_banca1.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_banca1.Name = "Clb_banca1"
		Clb_banca1.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_banca1.TEXT_SIMPLU1.Top = 3
		Clb_banca1.ZOrderSet = 9
		Clb_cont_banca1.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_cont_banca1.Name = "Clb_cont_banca1"
		Clb_cont_banca1.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_cont_banca1.ZOrderSet = 10
		Clb_banca2.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_banca2.Name = "Clb_banca2"
		Clb_banca2.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_banca2.ZOrderSet = 11
		Clb_cont_banca2.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_cont_banca2.Name = "Clb_cont_banca2"
		Clb_cont_banca2.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_cont_banca2.ZOrderSet = 12
		Clb_banca3.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_banca3.Name = "Clb_banca3"
		Clb_banca3.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_banca3.ZOrderSet = 13
		Clb_cont_banca3.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_cont_banca3.Name = "Clb_cont_banca3"
		Clb_cont_banca3.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_cont_banca3.ZOrderSet = 14
		Clb_cod_firma.Anchor = 10
		Clb_cod_firma.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_cod_firma.Left = 365
		Clb_cod_firma.Name = "Clb_cod_firma"
		Clb_cod_firma.TEXT_SIMPLU1.Anchor = 10
		Clb_cod_firma.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_cod_firma.Top = 646
		Clb_cod_firma.ZOrderSet = 15
		Clb_capsocvar.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_capsocvar.Name = "Clb_capsocvar"
		Clb_capsocvar.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_capsocvar.ZOrderSet = 16
		Clb_email.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_email.Name = "Clb_email"
		Clb_email.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_email.ZOrderSet = 18
		Clb_caen.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_caen.Name = "Clb_caen"
		Clb_caen.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_caen.ZOrderSet = 19
		Clb_codang.Anchor = 10
		Clb_codang.Height = 29
		Clb_codang.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_codang.Left = 365
		Clb_codang.Name = "Clb_codang"
		Clb_codang.TEXT_SIMPLU1.Anchor = 10
		Clb_codang.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_codang.Top = 534
		Clb_codang.Width = 290
		Clb_codang.ZOrderSet = 20
		Clb_nume.Anchor = 10
		Clb_nume.Height = 29
		Clb_nume.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_nume.Left = 365
		Clb_nume.Name = "Clb_nume"
		Clb_nume.TEXT_SIMPLU1.Anchor = 10
		Clb_nume.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_nume.Top = 478
		Clb_nume.Width = 290
		Clb_nume.ZOrderSet = 21
		Clb_prenume.Anchor = 10
		Clb_prenume.Height = 29
		Clb_prenume.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_prenume.Left = 365
		Clb_prenume.Name = "Clb_prenume"
		Clb_prenume.TEXT_SIMPLU1.Anchor = 10
		Clb_prenume.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_prenume.Top = 506
		Clb_prenume.Width = 290
		Clb_prenume.ZOrderSet = 22
		Clb_telefon.Height = 29
		Clb_telefon.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_telefon.Name = "Clb_telefon"
		Clb_telefon.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_telefon.Width = 181
		Clb_telefon.ZOrderSet = 23
		Clb_telefon2.Height = 29
		Clb_telefon2.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_telefon2.Left = 365
		Clb_telefon2.Name = "Clb_telefon2"
		Clb_telefon2.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_telefon2.Top = 352
		Clb_telefon2.Width = 181
		Clb_telefon2.ZOrderSet = 24
		Clb_telefon3.Height = 29
		Clb_telefon3.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_telefon3.Left = 545
		Clb_telefon3.Name = "Clb_telefon3"
		Clb_telefon3.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_telefon3.Top = 352
		Clb_telefon3.ZOrderSet = 25
		Clb_capsocsub.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_capsocsub.Name = "Clb_capsocsub"
		Clb_capsocsub.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_capsocsub.ZOrderSet = 26
		Clb_oasp.Anchor = 10
		Clb_oasp.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_oasp.Name = "Clb_oasp"
		Clb_oasp.TEXT_SIMPLU1.Anchor = 10
		Clb_oasp.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_oasp.ZOrderSet = 27
		Ed_adresa.Name = "Ed_adresa"
		Ed_adresa.ZOrderSet = 28
		Ed_adresa._EDBASE1.Left = 102
		Ed_adresa._EDBASE1.Name = "_EDBASE1"
		Ed_adresa._EDBASE1.Top = 2
		Ed_adresa._LBBASE1.Name = "_LBBASE1"
		Cus_odata_firme1.Left = 311
		Cus_odata_firme1.Name = "Cus_odata_firme1"
		Cus_odata_firme1.Top = 806
		Ed_tx_simplu1.Name = "Ed_tx_simplu1"
		Ed_tx_simplu1.ZOrderSet = 30
		Ed_tx_simplu1._EDBASE1.Left = 102
		Ed_tx_simplu1._EDBASE1.Name = "_EDBASE1"
		Ed_tx_simplu1._EDBASE1.Top = 2
		Ed_tx_simplu1._LBBASE1.Name = "_LBBASE1"
		Clb_tx_simplu6.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_tx_simplu6.Name = "Clb_tx_simplu6"
		Clb_tx_simplu6.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_tx_simplu6.ZOrderSet = 31
		Clb_tx_simplu7.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_tx_simplu7.Name = "Clb_tx_simplu7"
		Clb_tx_simplu7.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_tx_simplu7.ZOrderSet = 32
		Clb_tx_simplu8.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_tx_simplu8.Name = "Clb_tx_simplu8"
		Clb_tx_simplu8.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_tx_simplu8.ZOrderSet = 33
		Clb_tx_simplu9.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_tx_simplu9.Name = "Clb_tx_simplu9"
		Clb_tx_simplu9.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_tx_simplu9.ZOrderSet = 34
		Clb_tx_simplu10.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_tx_simplu10.Name = "Clb_tx_simplu10"
		Clb_tx_simplu10.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_tx_simplu10.ZOrderSet = 35
		Clb_tx_simplu11.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_tx_simplu11.Name = "Clb_tx_simplu11"
		Clb_tx_simplu11.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_tx_simplu11.ZOrderSet = 36
		Clb_tx_simplu1.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_tx_simplu1.Name = "Clb_tx_simplu1"
		Clb_tx_simplu1.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_tx_simplu1.ZOrderSet = 37
		Cb_tx_categorie.Name = "Cb_tx_categorie"
		Cb_tx_categorie.ZOrderSet = 38
		Cb_tx_categorie._CBBASE1.Name = "_CBBASE1"
		Cb_tx_categorie._LBBASE1.Name = "_LBBASE1"
		Clb_schema.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_schema.Name = "Clb_schema"
		Clb_schema.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_schema.ZOrderSet = 0
		Ct_clb_formaj.CLB_TX_CAUTARE.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Ct_clb_formaj.CLB_TX_CAUTARE.Name = "CLB_TX_CAUTARE"
		Ct_clb_formaj.CLB_TX_CAUTARE.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Ct_clb_formaj.IMG_CAUTARE.Name = "IMG_CAUTARE"
		Ct_clb_formaj.Name = "Ct_clb_formaj"
		Ct_clb_formaj.ZOrderSet = 39
		Ct_clb_nivel.CLB_TX_CAUTARE.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Ct_clb_nivel.CLB_TX_CAUTARE.Name = "CLB_TX_CAUTARE"
		Ct_clb_nivel.CLB_TX_CAUTARE.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Ct_clb_nivel.IMG_CAUTARE.Name = "IMG_CAUTARE"
		Ct_clb_nivel.Name = "Ct_clb_nivel"
		Ct_clb_nivel.ZOrderSet = 40
		Ct_clb_organizare.CLB_TX_CAUTARE.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Ct_clb_organizare.CLB_TX_CAUTARE.Name = "CLB_TX_CAUTARE"
		Ct_clb_organizare.CLB_TX_CAUTARE.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Ct_clb_organizare.IMG_CAUTARE.Name = "IMG_CAUTARE"
		Ct_clb_organizare.Name = "Ct_clb_organizare"
		Ct_clb_organizare.ZOrderSet = 41
		Ct_clb_proprietate.CLB_TX_CAUTARE.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Ct_clb_proprietate.CLB_TX_CAUTARE.Name = "CLB_TX_CAUTARE"
		Ct_clb_proprietate.CLB_TX_CAUTARE.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Ct_clb_proprietate.IMG_CAUTARE.Name = "IMG_CAUTARE"
		Ct_clb_proprietate.Name = "Ct_clb_proprietate"
		Ct_clb_proprietate.ZOrderSet = 42
		Clb_itm.Anchor = 10
		Clb_itm.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_itm.Name = "Clb_itm"
		Clb_itm.TEXT_SIMPLU1.Anchor = 10
		Clb_itm.TEXT_SIMPLU1.Left = 105
		Clb_itm.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_itm.TEXT_SIMPLU1.Top = 4
		Clb_itm.ZOrderSet = 45
		Cb_tx_operatie.Anchor = 10
		Cb_tx_operatie.Left = 353
		Cb_tx_operatie.Name = "Cb_tx_operatie"
		Cb_tx_operatie.Top = 756
		Cb_tx_operatie.ZOrderSet = 46
		Cb_tx_operatie._CBBASE1.Anchor = 10
		Cb_tx_operatie._CBBASE1.Name = "_CBBASE1"
		Cb_tx_operatie._LBBASE1.Name = "_LBBASE1"
		chkMama.Alignment = 0
		chkMama.Name = "chkMama"
		chkMama.ZOrderSet = 47
		Cb_tx_mama.Name = "Cb_tx_mama"
		Cb_tx_mama.ZOrderSet = 48
		Cb_tx_mama._CBBASE1.Name = "_CBBASE1"
		Cb_tx_mama._LBBASE1.Name = "_LBBASE1"
		Clb_declarant.Anchor = 10
		Clb_declarant.Lb_simplu1.Name = "Lb_simplu1"
		Clb_declarant.Left = 365
		Clb_declarant.Name = "Clb_declarant"
		Clb_declarant.Text_simplu1.Anchor = 10
		Clb_declarant.Text_simplu1.Name = "Text_simplu1"
		Clb_declarant.Top = 674
		Clb_declarant.ZOrderSet = 49
		Clb_functie.Anchor = 10
		Clb_functie.Lb_simplu1.Name = "Lb_simplu1"
		Clb_functie.Left = 365
		Clb_functie.Name = "Clb_functie"
		Clb_functie.Text_simplu1.Anchor = 10
		Clb_functie.Text_simplu1.Name = "Text_simplu1"
		Clb_functie.Top = 702
		Clb_functie.ZOrderSet = 50
		Ct_localitate1.CB_JUDET.Name = "CB_JUDET"
		Ct_localitate1.CB_JUDET._CBBASE1.Name = "_CBBASE1"
		Ct_localitate1.CB_JUDET._LBBASE1.Name = "_LBBASE1"
		Ct_localitate1.CB_LOCALITATE_AF.img_atentie.Name = "img_atentie"
		Ct_localitate1.CB_LOCALITATE_AF.Name = "CB_LOCALITATE_AF"
		Ct_localitate1.CB_LOCALITATE_AF._CBAUTOFILL1.Name = "_CBAUTOFILL1"
		Ct_localitate1.CB_LOCALITATE_AF._LBBASE1.Name = "_LBBASE1"
		Ct_localitate1.CB_TARA.Name = "CB_TARA"
		Ct_localitate1.CB_TARA._CBBASE1.Name = "_CBBASE1"
		Ct_localitate1.CB_TARA._LBBASE1.Name = "_LBBASE1"
		Ct_localitate1.Name = "Ct_localitate1"
		Cb_tx_caen_revizie.Name = "Cb_tx_caen_revizie"
		Cb_tx_caen_revizie._CBBASE1.Name = "_CBBASE1"
		Cb_tx_caen_revizie._LBBASE1.Name = "_LBBASE1"
		Clb_banca4.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_banca4.Name = "Clb_banca4"
		Clb_banca4.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_cont_banca4.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_cont_banca4.Name = "Clb_cont_banca4"
		Clb_cont_banca4.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_banca5.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_banca5.Name = "Clb_banca5"
		Clb_banca5.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_cont_banca5.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_cont_banca5.Name = "Clb_cont_banca5"
		Clb_cont_banca5.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_banca6.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_banca6.Name = "Clb_banca6"
		Clb_banca6.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_cont_banca6.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_cont_banca6.Name = "Clb_cont_banca6"
		Clb_cont_banca6.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_banca7.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_banca7.Name = "Clb_banca7"
		Clb_banca7.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_cont_banca7.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_cont_banca7.Name = "Clb_cont_banca7"
		Clb_cont_banca7.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_banca8.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_banca8.Name = "Clb_banca8"
		Clb_banca8.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_cont_banca8.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_cont_banca8.Name = "Clb_cont_banca8"
		Clb_cont_banca8.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_banca9.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_banca9.Name = "Clb_banca9"
		Clb_banca9.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_cont_banca9.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_cont_banca9.Name = "Clb_cont_banca9"
		Clb_cont_banca9.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_banca10.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_banca10.Name = "Clb_banca10"
		Clb_banca10.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
		Clb_cont_banca10.LB_SIMPLU1.Name = "LB_SIMPLU1"
		Clb_cont_banca10.Name = "Clb_cont_banca10"
		Clb_cont_banca10.TEXT_SIMPLU1.Name = "TEXT_SIMPLU1"
	*</PropValue>

	ADD OBJECT 'Clb_tx_simplu4' AS clb_tx_simplu WITH ;
		Anchor = 10, ;
		Left = 365, ;
		Name = "Clb_tx_simplu4", ;
		Top = 618, ;
		Text_simplu1.Anchor = 10, ;
		Text_simplu1.ControlSource = "poRec.indice_itm", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Indice_itm", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />
	
	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DODEFAULT(toRec, tnId, tcActiune)
		this.Height = INT(0.8*_screen.Height)
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_firme_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="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cFirma.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cFirma.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cSchema.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cSchema.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCod_Fiscal.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCod_Fiscal.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCont_Banca1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCont_Banca1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cBanca1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cBanca1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cBanca2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cBanca2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCont_Banca2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCont_Banca2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cBanca3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cBanca3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCont_Banca3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCont_Banca3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cAdresa.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cAdresa.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCod_Firma.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCod_Firma.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cPersoanaJuridica.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cPersoanaJuridica.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCodAng.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCodAng.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cNume.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cNume.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cPrenume.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cPrenume.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCapital_soc_sub.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCapital_soc_sub.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCapital_soc_var.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCapital_soc_var.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCaen.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cCaen.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cPunctLucru.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cPunctLucru.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cOasp.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cOasp.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cTelefon.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cTelefon.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cTelefon2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cTelefon2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cTelefon3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cTelefon3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cFax.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cFax.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cEmail.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cEmail.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cReg_Comert.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cReg_Comert.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cSucursala.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_firme.cSucursala.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cod_fiscal" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_reg_comert" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_banca1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont_banca1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cod_firma" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_fax" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_email" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_telefon" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_telefon2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_telefon3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ed_adresa" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: do_refresh_date
	*</DefinedPropArrayMethod>

	*<PropValue>
		cbuton3 = but_modifica1
		cbuton4 = but_sterge1
		cgridsortlist = grd_firme
		Desktop = .T.
		DoCreate = .T.
		Height = 515
		lactiv3 = .T.
		lactiv4 = .T.
		Name = "frm_firme_old"
		Width = 791
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 792
		_SHAPE2.Height = 29
		_SHAPE2.Left = 648
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		_SHAPE2.Width = 144
		LB_TITLU_ALB_B121.Caption = "FIRME"
		LB_TITLU_ALB_B121.FontBold = .T.
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		LB_TITLU_ALB_B121.TabIndex = 9
		BUT_TERMIN1.Left = 756
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 2
		BUT_TERMIN1.Top = 1
		GRIDSORT1.Name = "GRIDSORT1"
	*</PropValue>

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

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Left = 655, ;
		Name = "But_nou1", ;
		TabIndex = 5, ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Left = 723, ;
		Name = "But_sterge1", ;
		TabIndex = 3, ;
		Top = 1, ;
		Visible = .T.
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Clb_banca1' AS clb_tx_simplu WITH ;
		Left = 466, ;
		Name = "Clb_banca1", ;
		TabIndex = 10, ;
		TabStop = .F., ;
		Top = 244, ;
		TEXT_SIMPLU1.ControlSource = "porec.banca1", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		LB_SIMPLU1.Caption = "Banca 1", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cod_firma' AS clb_tx_simplu WITH ;
		Left = 466, ;
		Name = "Clb_cod_firma", ;
		TabIndex = 12, ;
		TabStop = .F., ;
		Top = 300, ;
		TEXT_SIMPLU1.ControlSource = "porec.cod_firma", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		LB_SIMPLU1.Caption = "Cod firma", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cod_fiscal' AS clb_tx_simplu WITH ;
		Left = 466, ;
		Name = "Clb_cod_fiscal", ;
		TabIndex = 7, ;
		TabStop = .F., ;
		Top = 188, ;
		Width = 290, ;
		TEXT_SIMPLU1.ControlSource = "porec.cod_fiscal", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		LB_SIMPLU1.Caption = "Cod fiscal", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont_banca1' AS clb_tx_simplu WITH ;
		Left = 466, ;
		Name = "Clb_cont_banca1", ;
		TabIndex = 11, ;
		TabStop = .F., ;
		Top = 272, ;
		TEXT_SIMPLU1.ControlSource = "porec.cont_banca1", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		LB_SIMPLU1.Caption = "Cont banca 1", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_email' AS clb_tx_simplu WITH ;
		Left = 466, ;
		Name = "Clb_email", ;
		TabIndex = 17, ;
		TabStop = .F., ;
		Top = 440, ;
		TEXT_SIMPLU1.ControlSource = "porec.email", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		LB_SIMPLU1.Caption = "E-mail", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_fax' AS clb_tx_simplu WITH ;
		Left = 466, ;
		Name = "Clb_fax", ;
		TabIndex = 16, ;
		TabStop = .F., ;
		Top = 412, ;
		TEXT_SIMPLU1.ControlSource = "porec.fax", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		LB_SIMPLU1.Caption = "Fax", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_reg_comert' AS clb_tx_simplu WITH ;
		Left = 466, ;
		Name = "Clb_reg_comert", ;
		TabIndex = 8, ;
		TabStop = .F., ;
		Top = 216, ;
		TEXT_SIMPLU1.ControlSource = "porec.reg_comert", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		LB_SIMPLU1.Caption = "Reg. comer_", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_telefon' AS clb_tx_simplu WITH ;
		Left = 466, ;
		Name = "Clb_telefon", ;
		TabIndex = 13, ;
		TabStop = .F., ;
		Top = 328, ;
		TEXT_SIMPLU1.ControlSource = "porec.telefon", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		LB_SIMPLU1.Caption = "Telefon", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_telefon2' AS clb_tx_simplu WITH ;
		Left = 466, ;
		Name = "Clb_telefon2", ;
		TabIndex = 14, ;
		TabStop = .F., ;
		Top = 356, ;
		TEXT_SIMPLU1.ControlSource = "porec.telefon2", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		LB_SIMPLU1.Caption = "Telefon 2", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_telefon3' AS clb_tx_simplu WITH ;
		Left = 466, ;
		Name = "Clb_telefon3", ;
		TabIndex = 15, ;
		TabStop = .F., ;
		Top = 384, ;
		TEXT_SIMPLU1.ControlSource = "porec.telefon3", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		LB_SIMPLU1.Caption = "Telefon 3", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Ed_adresa' AS ed_tx_simplu WITH ;
		Height = 124, ;
		Left = 466, ;
		Name = "Ed_adresa", ;
		TabIndex = 6, ;
		TabStop = .F., ;
		Top = 65, ;
		Width = 290, ;
		_edbase1.ControlSource = "porec.adresa", ;
		_edbase1.Height = 118, ;
		_edbase1.Left = 58, ;
		_edbase1.Name = "_edbase1", ;
		_edbase1.ReadOnly = .T., ;
		_edbase1.Top = 2, ;
		_edbase1.Width = 228, ;
		_LBBASE1.Caption = "Adresa", ;
		_LBBASE1.Name = "_LBBASE1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'grd_firme' AS _grdrow WITH ;
		ColumnCount = 27, ;
		DeleteMark = .F., ;
		Height = 444, ;
		Left = 36, ;
		Name = "grd_firme", ;
		Panel = 1, ;
		RecordSource = "v_firme", ;
		TabIndex = 1, ;
		Top = 48, ;
		Width = 396, ;
		Column1.ControlSource = "firma", ;
		Column1.Name = "cFirma", ;
		Column1.Width = 155, ;
		Column2.ColumnOrder = 27, ;
		Column2.ControlSource = "schema", ;
		Column2.Name = "cSchema", ;
		Column2.Width = 120, ;
		Column3.ColumnOrder = 2, ;
		Column3.ControlSource = "cod_fiscal", ;
		Column3.Name = "cCod_Fiscal", ;
		Column3.Width = 120, ;
		Column4.ColumnOrder = 6, ;
		Column4.ControlSource = "cont_banca1", ;
		Column4.Name = "cCont_Banca1", ;
		Column4.Width = 161, ;
		Column5.ColumnOrder = 5, ;
		Column5.ControlSource = "banca1", ;
		Column5.Name = "cBanca1", ;
		Column5.Width = 121, ;
		Column6.ColumnOrder = 7, ;
		Column6.ControlSource = "banca2", ;
		Column6.Name = "cBanca2", ;
		Column6.Width = 131, ;
		Column7.ColumnOrder = 8, ;
		Column7.ControlSource = "cont_banca2", ;
		Column7.Name = "cCont_Banca2", ;
		Column7.Width = 149, ;
		Column8.ColumnOrder = 9, ;
		Column8.ControlSource = "banca3", ;
		Column8.Name = "cBanca3", ;
		Column8.Width = 148, ;
		Column9.ColumnOrder = 10, ;
		Column9.ControlSource = "cont_banca3", ;
		Column9.Name = "cCont_Banca3", ;
		Column9.Width = 141, ;
		Column10.ColumnOrder = 11, ;
		Column10.ControlSource = "adresa", ;
		Column10.Name = "cAdresa", ;
		Column10.Width = 174, ;
		Column11.ColumnOrder = 12, ;
		Column11.ControlSource = "cod_firma", ;
		Column11.Name = "cCod_Firma", ;
		Column11.Width = 98, ;
		Column12.ColumnOrder = 18, ;
		Column12.ControlSource = "persoana_juridica", ;
		Column12.Name = "cPersoanaJuridica", ;
		Column12.Sparse = .F., ;
		Column12.Width = 99, ;
		Column13.ColumnOrder = 19, ;
		Column13.ControlSource = "codang", ;
		Column13.Name = "cCodAng", ;
		Column13.Width = 130, ;
		Column14.ColumnOrder = 20, ;
		Column14.ControlSource = "nume", ;
		Column14.Name = "cNume", ;
		Column14.Width = 119, ;
		Column15.ColumnOrder = 21, ;
		Column15.ControlSource = "prenume", ;
		Column15.Name = "cPrenume", ;
		Column15.Width = 132, ;
		Column16.ColumnOrder = 23, ;
		Column16.ControlSource = "capital_soc_sub", ;
		Column16.Name = "cCapital_soc_sub", ;
		Column16.Width = 134, ;
		Column17.ColumnOrder = 24, ;
		Column17.ControlSource = "capital_soc_var", ;
		Column17.Name = "cCapital_soc_var", ;
		Column17.Width = 116, ;
		Column18.ColumnOrder = 26, ;
		Column18.ControlSource = "caen", ;
		Column18.Name = "cCaen", ;
		Column18.Width = 129, ;
		Column19.ColumnOrder = 25, ;
		Column19.ControlSource = "punct_luc", ;
		Column19.Name = "cPunctLucru", ;
		Column19.Width = 107, ;
		Column20.ColumnOrder = 22, ;
		Column20.ControlSource = "oasp", ;
		Column20.Name = "cOasp", ;
		Column20.Width = 112, ;
		Column21.ColumnOrder = 13, ;
		Column21.ControlSource = "telefon", ;
		Column21.Name = "cTelefon", ;
		Column21.Width = 103, ;
		Column22.ColumnOrder = 14, ;
		Column22.ControlSource = "telefon2", ;
		Column22.Name = "cTelefon2", ;
		Column22.Width = 115, ;
		Column23.ColumnOrder = 15, ;
		Column23.ControlSource = "telefon3", ;
		Column23.Name = "cTelefon3", ;
		Column23.Width = 125, ;
		Column24.ColumnOrder = 16, ;
		Column24.ControlSource = "fax", ;
		Column24.Name = "cFax", ;
		Column24.Width = 118, ;
		Column25.ColumnOrder = 17, ;
		Column25.ControlSource = "email", ;
		Column25.Name = "cEmail", ;
		Column25.Width = 122, ;
		Column26.ColumnOrder = 3, ;
		Column26.ControlSource = "reg_comert", ;
		Column26.Name = "cReg_Comert", ;
		Column26.Width = 147, ;
		Column27.ColumnOrder = 4, ;
		Column27.ControlSource = "sucursala", ;
		Column27.Name = "cSucursala", ;
		Column27.Width = 122
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

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

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

	ADD OBJECT 'grd_firme.cBanca1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Banca 1", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_firme.cBanca2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Banca 2", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_firme.cBanca3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Banca 3", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_firme.cCaen.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "CAEN", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_firme.cCapital_soc_sub.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Capital social subscris", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_firme.cCapital_soc_var.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Capital social varsat", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

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

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

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

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

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

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

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

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

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

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

	ADD OBJECT 'grd_firme.cEmail.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "E-mail", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

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

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

	ADD OBJECT 'grd_firme.cNume.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nume", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_firme.cOasp.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Oasp", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_firme.cPersoanaJuridica.Check1' AS checkbox WITH ;
		Alignment = 2, ;
		BackStyle = 0, ;
		Caption = "", ;
		Centered = .T., ;
		Height = 17, ;
		Left = 47, ;
		Name = "Check1", ;
		Top = 35, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'grd_firme.cPersoanaJuridica.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Persoana juridica", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grd_firme.cPrenume.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Prenume", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_firme.cPunctLucru.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Punct de lucru", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

	ADD OBJECT 'grd_firme.cSchema.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Schema", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

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

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

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

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

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

	ADD OBJECT 'grd_firme.cTelefon3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE actualizeaza_grid1
		Lparameters pcFiltru
		Local lcFiltru
		lcFiltru=pcFiltru
		If Empty(lcFiltru)
			lcFiltru=pofirme.ca_baza1.cfiltru
		Endif
		save_grid_tag(Thisform.grd_firme)
		pofirme.ca_baza1.cfiltru=lcFiltru
		pofirme.ca_baza1.afisare()
		restore_grid_tag(Thisform.grd_firme)
		Thisform.grd_firme.SetFocus()
		
	ENDPROC

	PROCEDURE Destroy
		If Used('v_firme')
			Use In v_firme
		Endif
	ENDPROC

	PROCEDURE do_adauga
		Local lcSql, llSucces, loRec
		Private pcSchema, pnLuna, pnAn
		*:Global gnButon
		gnButon=1
		Select v_firme
		Scatter Name loRec Blank
		
		Do Adauga_Modifica_Inregistrare With "firme",loRec,,"INSERT"
		
		If gnButon=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_modifica
		If Reccount('v_firme')>0
			gnButon=1
			Select v_firme
			Scatter Name loRec
			Do Adauga_Modifica_Inregistrare With "firme",loRec,loRec.Id_firma,"UPDATE"
			If gnButon=1
				This.actualizeaza_grid1()
			Endif
		Endif
	ENDPROC

	PROCEDURE do_refresh_date
		Thisform.ed_adresa.Refresh()
		Thisform.clb_banca1.Refresh()
		Thisform.clb_cod_firma.Refresh()
		Thisform.clb_cod_fiscal.Refresh()
		Thisform.clb_cont_banca1.Refresh()
		Thisform.clb_email.Refresh()
		Thisform.clb_fax.Refresh()
		Thisform.clb_reg_comert.Refresh()
		Thisform.clb_telefon.Refresh()
		Thisform.clb_telefon2.Refresh()
		Thisform.clb_telefon3.Refresh()
	ENDPROC

	PROCEDURE do_sterge
		If Reccount('v_firme')>0
			gnButon=1
			Select v_firme
			Scatter Name loRec
			Do STERGE_INREGISTRARE With "firme",loRec.Id_firma
			If gnButon=1
				This.actualizeaza_grid1()
			Endif
		Endif
	ENDPROC

	PROCEDURE grd_firme.AfterRowColChange
		Lparameters nColIndex
		If Inlist(This.RowColChange,0,1,3)
			Select v_firme
			Scatter Name poRec
			Thisform.do_refresh_date()
		Endif
		
	ENDPROC

	PROCEDURE grd_firme.Init
		*!* MAMA : ALBASTRU DESCHIS
		*!* SUCURSALA : GALBEN PAI
		*!* FIRMA INDEPENDENTA : ALB
		THIS.SetAll("dynamicbackcolor","iif(e_mama = 1, RGB(255,255,225), IIF(NVL(id_mama,0) <> 0, RGB(240,241,255), RGB(255,255,255)))","Column")
	ENDPROC

ENDDEFINE
