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

	*<PropValue>
		Name = "cus_odata_config_analitice"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		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))
		Endif
		
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcCont = Nvl(STRTRAN(Alltrim(toRec.cont),['],['']),"")
			lcTabelPrefix = Nvl(STRTRAN(Alltrim(toRec.tabel_prefix),['],['']),"")
			lcColPrefix = Nvl(STRTRAN(Alltrim(toRec.col_prefix),['],['']),"")
			lcTabelSufix = Nvl(STRTRAN(Alltrim(toRec.tabel_sufix),['],['']),"")
			lcColSufix = Nvl(STRTRAN(Alltrim(toRec.col_sufix),['],['']),"")
			lcCampLegPrefix = Nvl(STRTRAN(Alltrim(toRec.camp_leg_prefix),['],['']),"")
			lcCampLegSufix = Nvl(STRTRAN(Alltrim(toRec.camp_leg_sufix),['],['']),"")	
			lcPozStartPrefix = Nvl(TRANSFORM(toRec.poz_start_prefix),"0")	
			lcPozStartSufix = Nvl(TRANSFORM(toRec.poz_start_sufix),"0")		
			lcNrReturnPrefix = Nvl(TRANSFORM(toRec.nr_return_prefix),"0")		
			lcNrReturnSufix = Nvl(TRANSFORM(toRec.nr_return_sufix),"0")			
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.config_analitice (cont, tabel_prefix, col_prefix, tabel_sufix, col_sufix, camp_leg_prefix, camp_leg_sufix, poz_start_prefix, nr_return_prefix, poz_start_sufix, nr_return_sufix)]  + ;
				 [ VALUES ('] + lcCont + [','] + lcTabelPrefix + [','] + lcColPrefix + [','] + lcTabelSufix + [','] + lcColSufix + [','] + lcCampLegPrefix + ;
				 [','] + lcCampLegSufix + [',] + lcPozStartPrefix + [,] + lcNrReturnPrefix + [,] + lcPozStartSufix + [,] + lcNrReturnSufix + [)]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE ] + gcS + [.config_analitice SET cont = '] + lcCont + ;
				[',tabel_prefix = '] + lcTabelPrefix + [',tabel_sufix = '] + lcTabelSufix + [',col_prefix = '] + lcColPrefix + [',col_sufix = '] + lcColSufix + ;
				[',camp_leg_prefix = '] + lcCampLegPrefix + [',camp_leg_sufix = '] + lcCampLegSufix + [',poz_start_prefix = ] + lcPozStartPrefix + [,nr_return_prefix = ] + lcNrReturnPrefix + ;
				[,poz_start_sufix = ] + lcPozStartSufix + [,nr_return_sufix = ] + lcNrReturnSufix + ;
				[ where id_config_ana = ] + lcId
		
			Case lcActiune = "DELETE"
				
				lcSql = [delete from ] + gcS + [.config_analitice where id_config_ana =] + lcId		
		ENDCASE
				
		This.csql = lcSql
		
	ENDPROC

	PROCEDURE salvare
		Lparameters toRec,tnId
		
		Private llSucces, lnSucces
		
		llSucces = .T.
		lnSucces = -1
		lcActiune = Upper(Alltrim(This.cactiune))
		lcMesaj1 = ''
		lcTitlu = ''
		Do Case
		Case lcActiune = "INSERT"
			lcMesaj1 = "Doriti sa adaugati inregistrarea?"
			lcTitlu = "Adaugare"
			*lnOptiuni = 4 + 32
		Case lcActiune = "UPDATE"
			lcMesaj1 = "Doriti sa salvati modificarile?"
			lcTitlu = "Modificare"
			*lnOptiuni = 4 + 32
		Case lcActiune = "DELETE"
			lcMesaj1 = "Doriti sa stergeti inregistrarea?"
			lcTitlu = "Stergere"
			*lnOptiuni = 4 + 32 + 512
		Endcase
		
		
		IF AMESSAGEBOX(lcMesaj1,0+4,lcTitlu) = 6
			BUTON = 1
			PNIESIRE=1
			If This.validare()
		
				This.make_sql(toRec,tnId)
		
				lcSql = Upper(Alltrim(This.csql))
		
				llConditie = 'INSERT'$lcSql Or 'UPDATE'$lcSql Or 'DELETE'$lcSql Or 'BEGIN'$lcSql
		
				If llConditie
					lnSucces = goExecutor.oExecute(lcSql)
					If lnSucces < 0
		
						lcTextEroare = goExecutor.cEroare
		
						Do Case
						Case "ORA-20000"$lcTextEroare
							lnPozi=At("ORA-20000",lcTextEroare)+11
							lnPozf=At("ORA",lcTextEroare,2)
							lcMesaj=Substr(lcTextEroare,lnPozi,lnPozf-lnPozi)
							lcTitlu="Eroare"
						Case lcActiune = "INSERT"
							lcMesaj = "Inregistrarea nu a fost adaugata." + Chr(13) + Chr(10) + lcTextEroare
							lcTitlu = "Adaugare"
						Case lcActiune = "UPDATE"
							lcMesaj = "Inregistrarea nu a fost modificata." + Chr(13) + Chr(10) + lcTextEroare
							lcTitlu = "Modificare"
						Case lcActiune = "DELETE"
							lcMesaj = "Inregistrarea nu a fost stearsa." + Chr(13) + Chr(10) + lcTextEroare
							lcTitlu = "Stergere"
						Endcase
						
		
						AMESSAGEBOX(lcMesaj,0+16,lcTitlu)
						llSucces = .F.
					Endif
		
					If lnSucces >=1 And lcActiune = "DELETE"
						lcMesaj = "Inregistrarea a fost stearsa."
						lcTitlu = "Stergere"
						lcimagine = [info_c.ico]
						lctip = [Informare]
						ofrm_mesaj = CREATEOBJECT([frm_mesaj],lcTitlu,lcimagine,lctip,lcMesaj)
						ofrm_mesaj.show(1)
						RELEASE ofrm_mesaj
					Endif
				Endif
		
			Endif
		
		Else
			BUTON = 2
			PNIESIRE=2
		Endif
		
		
		Return llSucces
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_config_gruputil_analitice AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_config_gruputil_analitice"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		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))
		Endif
		
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcIdGrup = Iif(!IsNull(toRec.id_grup), Alltrim(Str(toRec.id_grup)),"")
			lcCont = Nvl(STRTRAN(Alltrim(toRec.cont),['],['']),"")
			lcAcont = Nvl(STRTRAN(Alltrim(toRec.acont),['],['']),"")
			lcIdUtil = Alltrim(Str(gnIdUtil))
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO config_gruputil_analitice (id_grup, cont, acont, id_util, dataora)]  + ;
				 [ VALUES (] + lcIdGrup + [,'] + lcCont + [','] + lcAcont + [',] + lcIdUtil + [,SYSDATE] + [)]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE config_gruputil_analitice SET acont = '] + lcAcont + [', id_util = ] + lcIdUtil + [, dataora = SYSDATE] + ;
				[ where id_grup = ] + lcIdGrup + [ and cont = '] + lcCont + [']
		
			Case lcActiune = "DELETE"
				
				lcSql = [delete from config_gruputil_analitice where id_grup = ] + lcIdGrup + [ and cont = '] + lcCont + [']
		ENDCASE
				
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_config_tva_analitice AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_config_tva_analitice"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		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))
		Endif
		
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcIdSucursala = Iif(!EMPTY(NVL(toRec.id_sucursala,0)), Alltrim(Str(toRec.id_sucursala)),"NULL")
			lcIdGrup = Iif(!EMPTY(NVL(toRec.id_grup,0)), Alltrim(Str(toRec.id_grup)),"NULL")
			lcIdExplicatieTVA = Iif(!IsNull(toRec.id_jtva_coloana), Alltrim(Str(toRec.id_jtva_coloana)),"NULL")		
			lcCont = Nvl(STRTRAN(Alltrim(toRec.cont),['],['']),"NULL")
			lcAcont = Nvl(STRTRAN(Alltrim(toRec.acont),['],['']),"NULL")
			lcIdUtil = Alltrim(Str(gnIdUtil))
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO CONFIG_TVA_ANALITICE (id_sucursala, id_grup, id_jtva_coloana, cont, acont, id_util, dataora)]  + ;
				 [ VALUES (] + lcIdSucursala + [,] + lcIdGrup + [,] + lcIdExplicatieTVA + [,'] + lcCont + [','] + lcAcont + [',] + lcIdUtil + [,SYSDATE] + [)]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE CONFIG_TVA_ANALITICE SET acont = '] + lcAcont + [', id_util = ] + lcIdUtil + [, dataora = SYSDATE] + ;
				[ where id = ] + m.lcId
		
			Case lcActiune = "DELETE"
				
				lcSql = [delete from CONFIG_TVA_ANALITICE where id = ] + m.lcId
		ENDCASE
				
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_note_contabile AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_note_contabile"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		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))
		Endif
		
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcexplicatie = Nvl(STRTRAN(Alltrim(Upper(toRec.explicatie)),['],['']),"")
			lcscd = Nvl(STRTRAN(Alltrim(toRec.scd),['],['']),"")
			lcascd = Nvl(STRTRAN(Alltrim(toRec.ascd),['],['']),"")
			lcscc = Nvl(STRTRAN(Alltrim(toRec.scc),['],['']),"")
			lcascc = Nvl(STRTRAN(Alltrim(toRec.ascc),['],['']),"")
			lcordine = Nvl(ALLTRIM(STR(toRec.ordine)),"0")	
			lccu_TVA = Nvl(ALLTRIM(STR(toRec.cu_TVA)),"0")
			lcpTVA = Nvl(ALLTRIM(STR(toRec.pTVA)),"0")
			lcid_set = Nvl(ALLTRIM(STR(toRec.id_set)),"0")
			lcInValuta = Nvl(ALLTRIM(STR(toRec.in_valuta)),"0")
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.note_contabile (explicatie,scd,ascd,scc,ascc,ordine,cu_tva,ptva,id_set,in_valuta)]  + ;
				 [ VALUES ('] + lcexplicatie + [','] + lcscd + [','] + lcascd + [','] + lcscc + [','] + lcascc + [',] + lcordine + ;
				 [,] + lccu_tva + [,] + lcptva + [,] + lcid_set + [,] + lcInValuta + [)]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE ] + gcS + [.note_contabile SET explicatie = '] + lcexplicatie + ;
				[',scd = '] + lcscd + [',ascd = '] + lcascd + [',scc = '] + lcscc + [',ascc = '] + lcascc + [',ordine = ] + lcordine + [,cu_tva = ] + ;
				lccu_tva + [,ptva = ] + lcptva + [,id_set = ] + lcid_set + [,in_valuta = ] + lcInValuta + ;
				[ where id_note = ] + lcId
		
			Case lcActiune = "DELETE"
				
				lcSql = [delete from ] + gcS + [.note_contabile where id_note=] + lcId		
		ENDCASE
				
		This.csql = lcSql
		
	ENDPROC

	PROCEDURE salvare
		Lparameters toRec,tnId
		
		Private llSucces, lnSucces
		
		llSucces = .T.
		lnSucces = -1
		lcActiune = Upper(Alltrim(This.cactiune))
		lcMesaj1 = ''
		lcTitlu = ''
		Do Case
		Case lcActiune = "INSERT"
			lcMesaj1 = "Doriti sa adaugati inregistrarea?"
			lcTitlu = "Adaugare"
			*lnOptiuni = 4 + 32
		Case lcActiune = "UPDATE"
			lcMesaj1 = "Doriti sa salvati modificarile?"
			lcTitlu = "Modificare"
			*lnOptiuni = 4 + 32
		Case lcActiune = "DELETE"
			lcMesaj1 = "Doriti sa stergeti inregistrarea?"
			lcTitlu = "Stergere"
			*lnOptiuni = 4 + 32 + 512
		Endcase
		
		lcimagine = [intreb.ico]
		lctip = [Intrebare]
		ofrm_conf = CREATEOBJECT('frm_mesaj',lctitlu,lcimagine,lctip,lcmesaj1)
		ofrm_conf.show(1)
		RELEASE ofrm_conf
		
		IF buton = 1
			PNIESIRE=1
			If This.validare()
		
				This.make_sql(toRec,tnId)
		
				lcSql = Upper(Alltrim(This.csql))
		
				llConditie = 'INSERT'$lcSql Or 'UPDATE'$lcSql Or 'DELETE'$lcSql Or 'BEGIN'$lcSql
		
				If llConditie
					lnSucces = goExecutor.oExecute(lcSql)
					If lnSucces < 0
		
						lcTextEroare = goExecutor.cEroare
		
						Do Case
						Case "ORA-20000"$lcTextEroare
							lnPozi=At("ORA-20000",lcTextEroare)+11
							lnPozf=At("ORA",lcTextEroare,2)
							lcMesaj=Substr(lcTextEroare,lnPozi,lnPozf-lnPozi)
							lcTitlu="Eroare"
						Case lcActiune = "INSERT"
							lcMesaj = "Inregistrarea nu a fost adaugata." + Chr(13) + Chr(10) + lcTextEroare
							lcTitlu = "Adaugare"
						Case lcActiune = "UPDATE"
							lcMesaj = "Inregistrarea nu a fost modificata." + Chr(13) + Chr(10) + lcTextEroare
							lcTitlu = "Modificare"
						Case lcActiune = "DELETE"
							lcMesaj = "Inregistrarea nu a fost stearsa." + Chr(13) + Chr(10) + lcTextEroare
							lcTitlu = "Stergere"
						Endcase
						
						lcimagine = [info_c.ico]
						lctip = [Informare]
						ofrm_mesaj = CREATEOBJECT([frm_mesaj],lcTitlu,lcimagine,lctip,lcMesaj)
						ofrm_mesaj.show(1)
						RELEASE ofrm_mesaj	
						*Messagebox(lcMesaj,0+48,lcTitlu)
						llSucces = .F.
					Endif
		
					If lnSucces >=1 And lcActiune = "DELETE"
						lcMesaj = "Inregistrarea a fost stearsa."
						lcTitlu = "Stergere"
						lcimagine = [info_c.ico]
						lctip = [Informare]
						ofrm_mesaj = CREATEOBJECT([frm_mesaj],lcTitlu,lcimagine,lctip,lcMesaj)
						ofrm_mesaj.show(1)
						RELEASE ofrm_mesaj
						*Messagebox(lcMesaj,0+64,lcTitlu)
					Endif
				Endif
		
			Endif
		
		Else
			PNIESIRE=2
		Endif
		
		
		Return llSucces
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_note_contabile2007 AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<DefinedPropArrayMethod>
		*p: _memberdata		&& XML Metadata for customizable properties
	*</DefinedPropArrayMethod>

	*<PropValue>
		Name = "cus_odata_note_contabile2007"
		_memberdata = <VFPData>

		</VFPData>
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		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))
		Endif
		
		lcNumeColoana = IIF(gnNeplatitoare_tva=1,[ID_JTVA_NEPL],[ID_JTVA_COLOANA])
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcexplicatie = Nvl(STRTRAN(Alltrim(Upper(toRec.explicatie)),['],['']),"")
			lcscd = Nvl(STRTRAN(Alltrim(toRec.scd),['],['']),"")
			lcascd = Nvl(STRTRAN(Alltrim(toRec.ascd),['],['']),"")
			lcscc = Nvl(STRTRAN(Alltrim(toRec.scc),['],['']),"")
			lcascc = Nvl(STRTRAN(Alltrim(toRec.ascc),['],['']),"")
			lcordine = Nvl(ALLTRIM(STR(toRec.ordine)),"0")	
			lccu_TVA = Nvl(ALLTRIM(STR(toRec.cu_TVA)),"0")
			lcpTVA = Nvl(ALLTRIM(STR(toRec.pTVA)),"0")
			lcIdJtvaColoana = NVL(ALLTRIM(STR(toRec.id_jtva_coloana)),"NULL")
			lcid_set = Nvl(ALLTRIM(STR(toRec.id_set)),"0")
			lcInValuta = Nvl(ALLTRIM(STR(toRec.in_valuta)),"0")
			lcIdPartD = IIF(!EMPTY(NVL(toRec.id_partd,0)),ALLTRIM(STR(toRec.id_partd)), "NULL")
			lcIdPartC = IIF(!EMPTY(NVL(toRec.id_partc,0)),ALLTRIM(STR(toRec.id_partc)), "NULL")
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.note_contabile (explicatie,scd,ascd,scc,ascc,ordine,cu_tva,ptva,id_set,in_valuta,]+lcNumeColoana +[,id_partd,id_partc)]  + ;
				 [ VALUES ('] + lcexplicatie + [','] + lcscd + [','] + lcascd + [','] + lcscc + [','] + lcascc + [',] + lcordine + ;
				 [,] + lccu_tva + [,] + lcptva + [,] + lcid_set + [,] + lcInValuta + [,] + lcIdJtvaColoana + [,] + lcIdPartD + [,] + lcIdPartC + [)]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE ] + gcS + [.note_contabile SET explicatie = '] + lcexplicatie + ;
				[',scd = '] + lcscd + [',ascd = '] + lcascd + [',scc = '] + lcscc + [',ascc = '] + lcascc + [',ordine = ] + lcordine + [,cu_tva = ] + ;
				lccu_tva + [,ptva = ] + lcptva + [,id_set = ] + lcid_set + [,in_valuta = ] + lcInValuta + [,] + lcNumeColoana + [ = ] + lcIdJtvaColoana +  ;
				[, id_partd = ] + lcIdPartD + [, id_partc = ] + lcIdPartC + ;
				[ where id_note = ] + lcId
		
			Case lcActiune = "DELETE"
				
				lcSql = [delete from ] + gcS + [.note_contabile where id_note=] + lcId		
		ENDCASE
				
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_note_crm AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_note_crm"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		lcId_util = Alltrim(Str(gnIdUtil))
		
		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))
		Endif
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcDenumire = Strtran(Alltrim(toRec.denumire),['],[''])
			lcId_sectie = IIF(toRec.id_sectie = 0 or ISNULL(toRec.id_sectie),'NULL',ALLTRIM(STR(toRec.id_sectie)))
			lcId_venchelt = IIF(toRec.id_venchelt = 0 or ISNULL(toRec.id_venchelt),'NULL',ALLTRIM(STR(toRec.id_venchelt)))
		ENDIF
		
		
		Do Case
		Case lcActiune = "INSERT"
			lcSql = [begin pack_preturi.adauga_nota_vanzari(']+Alltrim(gcS)+[',']+lcDenumire + [',]+lcId_sectie+[,]+lcId_venchelt+[,]+lcId_util+[); end;]
		
		Case lcActiune = "UPDATE"
			lcSql = [begin pack_preturi.modifica_nota_vanzari(']+Alltrim(gcS)+[',]+lcId+[,']+lcDenumire +[',]+;
				lcId_sectie+[,]+lcId_venchelt+ [,] +lcId_util +[); end;]
		
		Case lcActiune = "DELETE"
			lcSql = [begin pack_preturi.sterge_nota_vanzari(']+Alltrim(gcS)+[',]+lcId+[,]+lcId_util+[); end;]
		
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_config_analitice AS frm_termin OF "_frm_child.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_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cCont.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cCont.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cTabel_Prefix.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cTabel_Prefix.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cCol_Prefix.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cCol_Prefix.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cCol_Sufix.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cCol_Sufix.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cCamp_Leg_Sufix.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cCamp_Leg_Sufix.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cTabel_sufix.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cTabel_sufix.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cCamp_Leg_Prefix.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cCamp_Leg_Prefix.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cPoz_Start_Prefix.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cPoz_Start_Prefix.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cNr_Return_Prefix.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cNr_Return_Prefix.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cpoz_start_sufix.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cpoz_start_sufix.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cNr_return_sufix.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cNr_return_sufix.Text1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: actual_afisare
		*m: do_adauga_ireg
		*m: do_modifica_ireg
		*m: do_sterge_ireg
		*m: refacere_tabel
		*p: lcrm
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 359
		lcrm = .F.
		Name = "frm_config_analitice"
		Width = 574
		_SHAPE1.Anchor = 10
		_SHAPE1.Height = 29
		_SHAPE1.Left = 0
		_SHAPE1.Name = "_SHAPE1"
		_SHAPE1.Top = 0
		_SHAPE1.Width = 792
		_SHAPE2.Anchor = 8
		_SHAPE2.Height = 29
		_SHAPE2.Left = 444
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		_SHAPE2.Width = 131
		LB_TITLU_ALB_B121.Caption = "Configurare analitice"
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		BUT_TERMIN1.Anchor = 8
		BUT_TERMIN1.Left = 541
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		GRIDSORT1.Left = -2
		GRIDSORT1.Name = "GRIDSORT1"
		GRIDSORT1.Top = 33
	*</PropValue>

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

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

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 8, ;
		Left = 511, ;
		Name = "But_sterge1", ;
		TabIndex = 5, ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'gridInregistrari' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 11, ;
		DeleteMark = .F., ;
		FontName = "Arial", ;
		HeaderHeight = 50, ;
		Height = 311, ;
		Left = 12, ;
		Name = "gridInregistrari", ;
		Panel = 1, ;
		RecordSource = "crsConfigAnalitice", ;
		Top = 40, ;
		Width = 552, ;
		Column1.ControlSource = "cont", ;
		Column1.FontName = "Arial", ;
		Column1.Name = "cCont", ;
		Column1.Width = 54, ;
		Column2.ControlSource = "tabel_prefix", ;
		Column2.FontName = "Arial", ;
		Column2.Name = "cTabel_Prefix", ;
		Column2.Width = 100, ;
		Column3.ControlSource = "col_prefix", ;
		Column3.FontName = "Arial", ;
		Column3.Name = "cCol_Prefix", ;
		Column3.Width = 84, ;
		Column4.ColumnOrder = 6, ;
		Column4.ControlSource = "col_sufix", ;
		Column4.FontName = "Arial", ;
		Column4.Name = "cCol_Sufix", ;
		Column4.Width = 85, ;
		Column5.ColumnOrder = 7, ;
		Column5.ControlSource = "camp_leg_sufix", ;
		Column5.FontName = "Arial", ;
		Column5.Name = "cCamp_Leg_Sufix", ;
		Column5.Width = 59, ;
		Column6.ColumnOrder = 5, ;
		Column6.ControlSource = "tabel_sufix", ;
		Column6.FontName = "Arial", ;
		Column6.Name = "cTabel_sufix", ;
		Column6.Width = 85, ;
		Column7.ColumnOrder = 4, ;
		Column7.ControlSource = "camp_leg_prefix", ;
		Column7.FontName = "Arial", ;
		Column7.Name = "cCamp_Leg_Prefix", ;
		Column7.Width = 75, ;
		Column8.ControlSource = "poz_start_prefix", ;
		Column8.FontName = "Arial", ;
		Column8.Name = "cPoz_Start_Prefix", ;
		Column8.Width = 43, ;
		Column9.ControlSource = "nr_return_prefix", ;
		Column9.FontName = "Arial", ;
		Column9.Name = "cNr_Return_Prefix", ;
		Column9.Width = 53, ;
		Column10.ControlSource = "poz_start_sufix", ;
		Column10.FontName = "Arial", ;
		Column10.Name = "cpoz_start_sufix", ;
		Column10.Width = 43, ;
		Column11.ControlSource = "nr_return_sufix", ;
		Column11.FontName = "Arial", ;
		Column11.Name = "cNr_return_sufix", ;
		Column11.Width = 54
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'gridInregistrari.cCamp_Leg_Prefix.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Camp legatura prefix", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'gridInregistrari.cCamp_Leg_Sufix.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Camp legatura sufix", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'gridInregistrari.cCol_Prefix.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Coloana prefix", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'gridInregistrari.cCol_Sufix.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Coloana sufix", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

	ADD OBJECT 'gridInregistrari.cNr_Return_Prefix.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr caractere prefix", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'gridInregistrari.cNr_return_sufix.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr caractere sufix", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'gridInregistrari.cPoz_Start_Prefix.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Poz. start prefix", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'gridInregistrari.cpoz_start_sufix.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Poz. start sufix", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'gridInregistrari.cTabel_Prefix.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Tabel prefix", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'gridInregistrari.cTabel_sufix.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Tabel sufix", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'gridInregistrari.cTabel_sufix.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		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 = poConfig.ca_baza1.cfiltru
		ENDIF
		
		save_grid_tag(thisform.gridInregistrari)
		poConfig.ca_baza1.cfiltru = lcFiltru
		poConfig.ca_baza1.afisare()
		restore_grid_tag(thisform.gridInregistrari)
		thisform.gridInregistrari.refresh
		
		
	ENDPROC

	PROCEDURE actual_afisare
	ENDPROC

	PROCEDURE do_adauga
		SELECT crsConfigAnalitice
		SCATTER NAME loRec
		
		DO Adauga_Modifica_Inregistrare WITH "config_analitice",loRec,,"INSERT"
		THIS.actualizeaza_grid1()
		
		THISFORM.gridInregistrari.SETFOCUS()
		
		
		
		
	ENDPROC

	PROCEDURE do_adauga_ireg
	ENDPROC

	PROCEDURE do_modifica
		SELECT crsConfigAnalitice
		IF RECCOUNT() > 0
			SCATTER NAME loRec
		
			DO Adauga_Modifica_Inregistrare WITH "config_analitice",loRec,loRec.id_config_ana,"UPDATE"
			THIS.actualizeaza_grid1()
			SELECT crsConfigAnalitice
			LOCATE FOR id_config_ana = loRec.id_config_ana
			THISFORM.gridInregistrari.SETFOCUS()
		
		ENDIF
		
	ENDPROC

	PROCEDURE do_modifica_ireg
	ENDPROC

	PROCEDURE do_sterge
		If Reccount('crsConfigAnalitice')>0
			SELECT crsConfigAnalitice
			Scatter Name loRec
			Do STERGE_INREGISTRARE With "config_analitice",loRec.id_config_ana
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_sterge_ireg
	ENDPROC

	PROCEDURE Init
		this.WindowState = 2
		DODEFAULT()
	ENDPROC

	PROCEDURE refacere_tabel
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_config_analitice_gruputil AS frm_termin OF "_frm_child.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_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cCont.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cCont.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cGrupUtil.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cGrupUtil.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cAcont.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cAcont.Text1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: actual_afisare
		*m: do_adauga_ireg
		*m: do_modifica_ireg
		*m: do_sterge_ireg
		*m: refacere_tabel
		*p: lcrm
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 359
		lcrm = .F.
		Name = "frm_config_analitice_gruputil"
		Width = 446
		_SHAPE1.Anchor = 10
		_SHAPE1.Height = 29
		_SHAPE1.Left = 0
		_SHAPE1.Name = "_SHAPE1"
		_SHAPE1.Top = 0
		_SHAPE1.Width = 792
		_SHAPE2.Anchor = 8
		_SHAPE2.Height = 29
		_SHAPE2.Left = 317
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		_SHAPE2.Width = 131
		LB_TITLU_ALB_B121.Caption = "Configurare analitice pe grupuri utilizatori"
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		BUT_TERMIN1.Anchor = 8
		BUT_TERMIN1.Left = 414
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		GRIDSORT1.Left = -2
		GRIDSORT1.Name = "GRIDSORT1"
		GRIDSORT1.Top = 33
	*</PropValue>

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

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

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 8, ;
		Left = 384, ;
		Name = "But_sterge1", ;
		TabIndex = 5, ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'gridInregistrari' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 3, ;
		DeleteMark = .F., ;
		FontName = "Arial", ;
		HeaderHeight = 20, ;
		Height = 311, ;
		Left = 12, ;
		Name = "gridInregistrari", ;
		Panel = 1, ;
		RecordSource = "crsConfigAnalitice", ;
		Top = 40, ;
		Width = 428, ;
		Column1.ColumnOrder = 2, ;
		Column1.ControlSource = "cont", ;
		Column1.FontName = "Arial", ;
		Column1.Name = "cCont", ;
		Column1.Width = 57, ;
		Column2.ColumnOrder = 1, ;
		Column2.ControlSource = "denumire_grup", ;
		Column2.FontName = "Arial", ;
		Column2.Name = "cGrupUtil", ;
		Column2.Width = 281, ;
		Column3.ControlSource = "acont", ;
		Column3.FontName = "Arial", ;
		Column3.Name = "cAcont", ;
		Column3.Width = 55
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'gridInregistrari.cAcont.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Analitic", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

	ADD OBJECT 'gridInregistrari.cGrupUtil.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Grup utilizatori", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'gridInregistrari.cGrupUtil.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		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 = poConfig.ca_baza1.cfiltru
		ENDIF
		
		save_grid_tag(thisform.gridInregistrari)
		poConfig.ca_baza1.cfiltru = lcFiltru
		poConfig.ca_baza1.afisare()
		restore_grid_tag(thisform.gridInregistrari)
		thisform.gridInregistrari.refresh
		
		
	ENDPROC

	PROCEDURE actual_afisare
	ENDPROC

	PROCEDURE do_adauga
		SELECT crsConfigAnalitice
		SCATTER NAME loRec
		
		DO Adauga_Modifica_Inregistrare WITH "config_analitice_gruputil",loRec,,"INSERT"
		THIS.actualizeaza_grid1()
		
		THISFORM.gridInregistrari.SETFOCUS()
		
		
		
		
	ENDPROC

	PROCEDURE do_adauga_ireg
	ENDPROC

	PROCEDURE do_modifica
		SELECT crsConfigAnalitice
		IF RECCOUNT() > 0
			SCATTER NAME loRec
		
			DO Adauga_Modifica_Inregistrare WITH "config_analitice_gruputil",loRec,loRec.id_grup,"UPDATE"
			THIS.actualizeaza_grid1()
			SELECT crsConfigAnalitice
			LOCATE FOR id_grup = loRec.id_grup and cont = loRec.cont
			THISFORM.gridInregistrari.SETFOCUS()
		
		ENDIF
		
	ENDPROC

	PROCEDURE do_modifica_ireg
	ENDPROC

	PROCEDURE do_sterge
		If Reccount('crsConfigAnalitice')>0
			If aMessageBox('Doriti sa stergeti inregistrarea?',4+32,'Configurare') <> 6
				Return
			EndIf 
			
			SELECT crsConfigAnalitice
			Scatter Name loRec
		*!*		Do STERGE_INREGISTRARE With "config_analitice",loRec.id_grup
			lcSql = [delete from config_gruputil_analitice where id_grup =] + Alltrim(Str(loRec.id_grup)) + [ and cont = '] + Alltrim(loRec.cont) + [']
			lnSucces = goExecutor.oExecute(lcSql)
			If lnSucces < 0
				aMessageBox(goExecutor.cEroare,0+16,'Eroare')
			Else 
				This.actualizeaza_grid1()
			EndIf 	
		Endif
	ENDPROC

	PROCEDURE do_sterge_ireg
	ENDPROC

	PROCEDURE refacere_tabel
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_config_analitice_gruputil_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_renunt2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_cont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_acont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cnt_grup" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_config_gruputil_analitice1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: do_alege_grup
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 144
		Name = "frm_config_analitice_gruputil_nou"
		Width = 345
		_shape1.Name = "_shape1"
		_shape1.ZOrderSet = 1
		_shape2.Height = 29
		_shape2.Left = 284
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 62
		_shape2.ZOrderSet = 0
		Lb_titlu_alb_b121.Caption = "Configurare analitice"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 7
		Lb_titlu_alb_b121.ZOrderSet = 4
		BUT_TERMIN1.Left = 315
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 4
		BUT_TERMIN1.Top = 1
		BUT_TERMIN1.ZOrderSet = 10
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

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

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

	ADD OBJECT 'Clb_tx_acont' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 25, ;
		Name = "Clb_tx_acont", ;
		TabIndex = 3, ;
		Top = 105, ;
		Width = 156, ;
		ZOrderSet = 7, ;
		Text_simplu1.ControlSource = "poRec.acont", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 94, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 52, ;
		Lb_simplu1.Caption = "Analitic", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_cont' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 25, ;
		Name = "Clb_tx_cont", ;
		TabIndex = 2, ;
		Top = 77, ;
		Width = 156, ;
		ZOrderSet = 5, ;
		Text_simplu1.ControlSource = "poRec.cont", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 94, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 52, ;
		Lb_simplu1.Caption = "Cont", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'cnt_grup' AS ct_clb_cautare_var WITH ;
		cconditie = EMPTY(NVL(poRec.denumire_grup,'')), ;
		cprocedura = thisform.do_alege_grup(), ;
		cvar_afisata = porec.denumire_grup, ;
		Height = 31, ;
		Left = 24, ;
		Name = "cnt_grup", ;
		TabIndex = 1, ;
		Top = 48, ;
		Width = 317, ;
		ZOrderSet = 8, ;
		shape_cautare.Height = 29, ;
		shape_cautare.Left = 1, ;
		shape_cautare.Name = "shape_cautare", ;
		shape_cautare.Top = 1, ;
		shape_cautare.Width = 283, ;
		img_cautare.Left = 293, ;
		img_cautare.Name = "img_cautare", ;
		img_cautare.Top = 5, ;
		lb_cautare.Caption = "Grup utilizatori", ;
		lb_cautare.Name = "lb_cautare", ;
		tx_cautare.Left = 95, ;
		tx_cautare.Name = "tx_cautare", ;
		tx_cautare.Top = 4
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_config_gruputil_analitice1' AS cus_odata_config_gruputil_analitice WITH ;
		Left = 286, ;
		Name = "Cus_odata_config_gruputil_analitice1", ;
		Top = 96
		*< END OBJECT: ClassLib="onote_contabile.vcx" BaseClass="custom" />
	
	PROCEDURE do_alege_grup
		Local lcCont, loHash, loGrup
		lcCont = ""
		If Upper(this.cus_odata_config_gruputil_analitice1.cactiune) = 'UPDATE'
			Return
		EndIf 
		loGrup = caut_gruputilizatori()
		
		If !Empty(Nvl(loGrup.id_grup,0))
			poRec.id_grup = loGrup.id_grup
			poRec.denumire_grup = loGrup.denumire_grup
		Endif
		
	ENDPROC

	PROCEDURE inainte_de_do_termin
		If Empty(Nvl(poRec.id_grup,0))
			AMESSAGEBOX('Nu ati ales grupul de utilizatori!')
			this.cnt_grup.tx_cautare.SetFocus()
			RETURN .F.
		EndIf 
		IF EMPTY(POREC.CONT)
			AMESSAGEBOX('Nu ati completat contul!')
			THIS.Clb_tx_cont.text_simplu1.SetFocus()
			RETURN .F.
		ENDIF 	
		IF EMPTY(POREC.ACONT)
			AMESSAGEBOX('Nu ati completat analiticul!')
			THIS.Clb_tx_Acont.text_simplu1.SetFocus()
			RETURN .F.
		ENDIF 	
		
		RETURN THIS.cus_odata_config_gruputil_analitice1.salvare(THIS.OREC,THIS.NID)
		
		
		
		
	ENDPROC

	PROCEDURE Init
		LPARAMETERS toRec, tnId, tcActiune
		
		this.orec= toRec
		this.nid = tnId
		this.cus_odata_config_gruputil_analitice1.cactiune = tcActiune
		
		If Upper(tcActiune) = 'UPDATE'
			THIS.cnt_grup.Enabled = .F.
			this.clb_tx_cont.text_simplu1.ReadOnly = .T.
			this.clb_tx_acont.text_simplu1.SetFocus()
		Else 
			this.clb_tx_cont.text_simplu1.SetFocus()	
		EndIf 	
		
		DODEFAULT()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_config_analitice_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_renunt2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_config_analitice1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_cont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" 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="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 387
		Name = "frm_config_analitice_nou"
		Width = 345
		_shape1.Name = "_shape1"
		_shape1.ZOrderSet = 4
		_shape2.Height = 29
		_shape2.Left = 284
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 62
		_shape2.ZOrderSet = 5
		Lb_titlu_alb_b121.Caption = "Configurare analitice"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 15
		Lb_titlu_alb_b121.ZOrderSet = 6
		BUT_TERMIN1.Left = 315
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 12
		BUT_TERMIN1.Top = 1
		BUT_TERMIN1.ZOrderSet = 12
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

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

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

	ADD OBJECT 'Clb_tx_cont' AS clb_tx_simplu WITH ;
		Left = 24, ;
		Name = "Clb_tx_cont", ;
		TabIndex = 1, ;
		Top = 48, ;
		Text_simplu1.ControlSource = "poRec.cont", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Cont", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu10' AS clb_tx_simplu WITH ;
		Left = 24, ;
		Name = "Clb_tx_simplu10", ;
		TabIndex = 10, ;
		Top = 322, ;
		Text_simplu1.ControlSource = "poRec.poz_start_sufix", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Poz. start sufix", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu11' AS clb_tx_simplu WITH ;
		Left = 24, ;
		Name = "Clb_tx_simplu11", ;
		TabIndex = 11, ;
		Top = 350, ;
		Text_simplu1.ControlSource = "poRec.nr_return_sufix", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Nr. car. sufix", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 24, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 2, ;
		Top = 87, ;
		Text_simplu1.ControlSource = "poRec.tabel_prefix", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Tabel prefix", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu3' AS clb_tx_simplu WITH ;
		Left = 24, ;
		Name = "Clb_tx_simplu3", ;
		TabIndex = 3, ;
		Top = 115, ;
		Text_simplu1.ControlSource = "poRec.col_prefix", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Coloanã prefix", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu4' AS clb_tx_simplu WITH ;
		Left = 24, ;
		Name = "Clb_tx_simplu4", ;
		TabIndex = 7, ;
		Top = 238, ;
		Text_simplu1.ControlSource = "poRec.tabel_sufix", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Tabel sufix", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu5' AS clb_tx_simplu WITH ;
		Left = 24, ;
		Name = "Clb_tx_simplu5", ;
		TabIndex = 8, ;
		Top = 266, ;
		Text_simplu1.ControlSource = "poRec.col_sufix", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Coloanã sufix", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu6' AS clb_tx_simplu WITH ;
		Left = 24, ;
		Name = "Clb_tx_simplu6", ;
		TabIndex = 4, ;
		Top = 143, ;
		Text_simplu1.ControlSource = "poRec.camp_leg_prefix", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Câmp leg. prefix", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu7' AS clb_tx_simplu WITH ;
		Left = 24, ;
		Name = "Clb_tx_simplu7", ;
		TabIndex = 9, ;
		Top = 294, ;
		Text_simplu1.ControlSource = "poRec.camp_leg_sufix", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Câmp leg. sufix", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu8' AS clb_tx_simplu WITH ;
		Left = 24, ;
		Name = "Clb_tx_simplu8", ;
		TabIndex = 5, ;
		Top = 171, ;
		Text_simplu1.ControlSource = "poRec.poz_start_prefix", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Poz. start prefix", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu9' AS clb_tx_simplu WITH ;
		Left = 24, ;
		Name = "Clb_tx_simplu9", ;
		TabIndex = 6, ;
		Top = 199, ;
		Text_simplu1.ControlSource = "poRec.nr_return_prefix", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Nr. car. prefix", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_config_analitice1' AS cus_odata_config_analitice WITH ;
		Left = 324, ;
		Name = "Cus_odata_config_analitice1", ;
		Top = 24
		*< END OBJECT: ClassLib="onote_contabile.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		IF EMPTY(POREC.CONT)
			AMESSAGEBOX('Nu ati completat contul')
			THIS.Clb_tx_cont.text_simplu1.SetFocus()
			RETURN 
		ENDIF 	
		RETURN THIS.cus_odata_config_analitice1.salvare(THIS.OREC,THIS.NID)
		
		
		
		
	ENDPROC

	PROCEDURE Init
		LPARAMETERS toRec, tnId, tcActiune
		
		this.orec= toRec
		this.nid = tnId
		this.cus_odata_config_analitice1.cactiune = tcActiune
		
		DODEFAULT()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_config_analitice_tva AS frm_termin OF "_frm_child.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_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cCont.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cCont.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cGrupUtil.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cGrupUtil.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cAcont.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cAcont.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cSucursala.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cSucursala.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cExplicatieTVA.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="gridInregistrari.cExplicatieTVA.Text1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: actual_afisare
		*m: do_adauga_ireg
		*m: do_modifica_ireg
		*m: do_sterge_ireg
		*m: refacere_tabel
		*p: lcrm
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 359
		lcrm = .F.
		Name = "frm_config_analitice_tva"
		Width = 699
		_SHAPE1.Anchor = 10
		_SHAPE1.Height = 29
		_SHAPE1.Left = 0
		_SHAPE1.Name = "_SHAPE1"
		_SHAPE1.Top = 0
		_SHAPE1.Width = 792
		_SHAPE2.Anchor = 8
		_SHAPE2.Height = 29
		_SHAPE2.Left = 569
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		_SHAPE2.Width = 131
		LB_TITLU_ALB_B121.Caption = "Configurare analitice conturi TVA"
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		BUT_TERMIN1.Anchor = 8
		BUT_TERMIN1.Left = 666
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		GRIDSORT1.Left = -2
		GRIDSORT1.Name = "GRIDSORT1"
		GRIDSORT1.Top = 33
	*</PropValue>

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 8, ;
		Left = 605, ;
		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 = 8, ;
		Left = 573, ;
		Name = "But_nou1", ;
		TabIndex = 3, ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

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

	ADD OBJECT 'gridInregistrari' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 5, ;
		DeleteMark = .F., ;
		FontName = "Arial", ;
		HeaderHeight = 20, ;
		Height = 311, ;
		Left = 12, ;
		Name = "gridInregistrari", ;
		Panel = 1, ;
		RecordSource = "crsConfigAnalitice", ;
		Top = 40, ;
		Width = 679, ;
		Column1.ColumnOrder = 4, ;
		Column1.ControlSource = "cont", ;
		Column1.FontName = "Arial", ;
		Column1.Name = "cCont", ;
		Column1.Width = 57, ;
		Column2.ColumnOrder = 2, ;
		Column2.ControlSource = "denumire_grup", ;
		Column2.FontName = "Arial", ;
		Column2.Name = "cGrupUtil", ;
		Column2.Width = 157, ;
		Column3.ColumnOrder = 5, ;
		Column3.ControlSource = "acont", ;
		Column3.FontName = "Arial", ;
		Column3.Name = "cAcont", ;
		Column3.Width = 55, ;
		Column4.ColumnOrder = 1, ;
		Column4.ControlSource = "sucursala", ;
		Column4.FontName = "Arial", ;
		Column4.Name = "cSucursala", ;
		Column4.Width = 193, ;
		Column5.ColumnOrder = 3, ;
		Column5.ControlSource = "explicatie_tva", ;
		Column5.FontName = "Arial", ;
		Column5.Name = "cExplicatieTVA", ;
		Column5.Width = 176
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'gridInregistrari.cAcont.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Analitic", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

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

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

	ADD OBJECT 'gridInregistrari.cGrupUtil.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Grup utilizatori", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

	ADD OBJECT 'gridInregistrari.cSucursala.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 = poConfig.ca_baza1.cfiltru
		ENDIF
		
		save_grid_tag(thisform.gridInregistrari)
		poConfig.ca_baza1.cfiltru = lcFiltru
		poConfig.ca_baza1.afisare()
		restore_grid_tag(thisform.gridInregistrari)
		thisform.gridInregistrari.refresh
		
		
	ENDPROC

	PROCEDURE actual_afisare
	ENDPROC

	PROCEDURE do_adauga
		SELECT crsConfigAnalitice
		SCATTER NAME loRec
		
		DO Adauga_Modifica_Inregistrare WITH "config_analitice_tva",loRec,,"INSERT"
		THIS.actualizeaza_grid1()
		
		THISFORM.gridInregistrari.SETFOCUS()
		
		
		
		
	ENDPROC

	PROCEDURE do_adauga_ireg
	ENDPROC

	PROCEDURE do_modifica
		SELECT crsConfigAnalitice
		IF RECCOUNT() > 0
			SCATTER NAME loRec
		
			DO Adauga_Modifica_Inregistrare WITH "config_analitice_tva",loRec,loRec.id,"UPDATE"
			THIS.actualizeaza_grid1()
			SELECT crsConfigAnalitice
			LOCATE FOR id = lorec.id
			THISFORM.gridInregistrari.SETFOCUS()
		
		ENDIF
		
	ENDPROC

	PROCEDURE do_modifica_ireg
	ENDPROC

	PROCEDURE do_sterge
		If Reccount('crsConfigAnalitice')>0
			If aMessageBox('Doriti sa stergeti inregistrarea?',4+32,'Configurare') <> 6
				Return
			EndIf 
		
			SELECT crsConfigAnalitice
			Scatter Name loRec
			Do STERGE_INREGISTRARE With "config_tva_analitice",loRec.id
			THIS.actualizeaza_grid1()
		*!*		lcSql = [delete from CONFIG_TVA_ANALITICE where id =] + Alltrim(Str(loRec.id)) + [']
		*!*		lnSucces = goExecutor.oExecute(lcSql)
		*!*		If lnSucces < 0
		*!*			aMessageBox(goExecutor.cEroare,0+16,'Eroare')
		*!*		Else 
		*!*			This.actualizeaza_grid1()
		*!*		EndIf 	
		Endif
	ENDPROC

	PROCEDURE do_sterge_ireg
	ENDPROC

	PROCEDURE refacere_tabel
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_config_analitice_tva_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="Clb_tx_cont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_acont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cnt_explicatietva" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cnt_sucursala" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cnt_grup" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_config_tva_analitice1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: do_alege_explicatietva
		*m: do_alege_grup
		*m: do_alege_sucursala
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 190
		Name = "frm_config_analitice_tva_nou"
		Width = 411
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 420
		_shape1.ZOrderSet = 1
		_shape2.Height = 29
		_shape2.Left = 284
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 62
		_shape2.ZOrderSet = 0
		Lb_titlu_alb_b121.Caption = "Configurare analitice"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 9
		Lb_titlu_alb_b121.ZOrderSet = 4
		BUT_TERMIN1.Left = 380
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 6
		BUT_TERMIN1.Top = 1
		BUT_TERMIN1.ZOrderSet = 10
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

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

	ADD OBJECT 'Clb_tx_acont' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 25, ;
		Name = "Clb_tx_acont", ;
		TabIndex = 5, ;
		Top = 154, ;
		Width = 156, ;
		ZOrderSet = 7, ;
		Text_simplu1.ControlSource = "poRec.acont", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 94, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 52, ;
		Lb_simplu1.Caption = "Analitic", ;
		Lb_simplu1.FontBold = .T., ;
		Lb_simplu1.Left = 6, ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_cont' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 25, ;
		Name = "Clb_tx_cont", ;
		TabIndex = 4, ;
		Top = 126, ;
		Width = 156, ;
		ZOrderSet = 5, ;
		Text_simplu1.ControlSource = "poRec.cont", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 94, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 52, ;
		Lb_simplu1.Caption = "Cont", ;
		Lb_simplu1.FontBold = .T., ;
		Lb_simplu1.Left = 6, ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'cnt_explicatietva' AS ct_clb_cautare_var WITH ;
		cconditie = EMPTY(NVL(poRec.id_jtva_coloana,0)), ;
		cprocedura = thisform.do_alege_explicatietva(), ;
		cvar_afisata = porec.explicatie_tva, ;
		Height = 31, ;
		Left = 24, ;
		Name = "cnt_explicatietva", ;
		TabIndex = 3, ;
		Top = 97, ;
		Width = 390, ;
		ZOrderSet = 8, ;
		shape_cautare.Height = 29, ;
		shape_cautare.Left = 1, ;
		shape_cautare.Name = "shape_cautare", ;
		shape_cautare.Top = 1, ;
		shape_cautare.Width = 359, ;
		img_cautare.Left = 364, ;
		img_cautare.Name = "img_cautare", ;
		img_cautare.Top = 5, ;
		lb_cautare.Caption = "Explicatie TVA", ;
		lb_cautare.FontBold = .T., ;
		lb_cautare.Name = "lb_cautare", ;
		tx_cautare.Height = 23, ;
		tx_cautare.Left = 95, ;
		tx_cautare.Name = "tx_cautare", ;
		tx_cautare.Top = 4, ;
		tx_cautare.Width = 260
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="container" />

	ADD OBJECT 'cnt_grup' AS ct_clb_cautare_var WITH ;
		cconditie = 1=2, ;
		cprocedura = thisform.do_alege_grup(), ;
		cvar_afisata = porec.denumire_grup, ;
		Height = 31, ;
		Left = 24, ;
		Name = "cnt_grup", ;
		TabIndex = 2, ;
		Top = 69, ;
		Width = 390, ;
		ZOrderSet = 8, ;
		shape_cautare.Height = 29, ;
		shape_cautare.Left = 1, ;
		shape_cautare.Name = "shape_cautare", ;
		shape_cautare.Top = 1, ;
		shape_cautare.Width = 283, ;
		img_cautare.Left = 293, ;
		img_cautare.Name = "img_cautare", ;
		img_cautare.Top = 5, ;
		lb_cautare.Caption = "Grup utilizatori", ;
		lb_cautare.Name = "lb_cautare", ;
		tx_cautare.Left = 95, ;
		tx_cautare.Name = "tx_cautare", ;
		tx_cautare.Top = 4
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="container" />

	ADD OBJECT 'cnt_sucursala' AS ct_clb_cautare_var WITH ;
		cconditie = 1=2, ;
		cprocedura = thisform.do_alege_sucursala(), ;
		cvar_afisata = porec.sucursala, ;
		Height = 31, ;
		Left = 24, ;
		Name = "cnt_sucursala", ;
		TabIndex = 1, ;
		Top = 41, ;
		Width = 390, ;
		ZOrderSet = 8, ;
		shape_cautare.Height = 29, ;
		shape_cautare.Left = 1, ;
		shape_cautare.Name = "shape_cautare", ;
		shape_cautare.Top = 1, ;
		shape_cautare.Width = 283, ;
		img_cautare.Left = 293, ;
		img_cautare.Name = "img_cautare", ;
		img_cautare.Top = 5, ;
		lb_cautare.Caption = "Sucursala", ;
		lb_cautare.Name = "lb_cautare", ;
		tx_cautare.Left = 95, ;
		tx_cautare.Name = "tx_cautare", ;
		tx_cautare.Top = 4
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_config_tva_analitice1' AS cus_odata_config_tva_analitice WITH ;
		Left = 2, ;
		Name = "Cus_odata_config_tva_analitice1", ;
		Top = 74
		*< END OBJECT: ClassLib="onote_contabile.vcx" BaseClass="custom" />
	
	PROCEDURE do_alege_explicatietva
		Local loCauta
		
		If Upper(This.cus_odata_config_tva_analitice1.cactiune) = 'UPDATE'
			Return
		Endif
		loCauta = caut_explicatie_tva()
		
		If !Isnull(loCauta)
			If !Empty(Nvl(loCauta.id_jtva_coloana,0))
				poRec.id_jtva_coloana = loCauta.id_jtva_coloana
				poRec.explicatie_tva = ALLTRIM(loCauta.denumire)
			Endif
		Endif
		
	ENDPROC

	PROCEDURE do_alege_grup
		Local lcCont, loHash, loGrup
		lcCont = ""
		If Upper(this.cus_odata_config_tva_analitice1.cactiune) = 'UPDATE'
			Return
		EndIf 
		loGrup = caut_gruputilizatori()
		
		If !Empty(Nvl(loGrup.id_grup,0))
			poRec.id_grup = loGrup.id_grup
			poRec.denumire_grup = loGrup.denumire_grup
		Endif
		
	ENDPROC

	PROCEDURE do_alege_sucursala
		Local loCauta
		
		If Upper(this.cus_odata_config_tva_analitice1.cactiune) = 'UPDATE'
			Return
		EndIf 
		
		loCauta = caut_sucursala()
		If !Isnull(loCauta)
			poRec.id_sucursala = loCauta.id_sucursala
			poRec.sucursala = loCauta.sucursala
		Else
			poRec.id_sucursala = Null
			poRec.sucursala = []
		Endif
		
		
		
		
	ENDPROC

	PROCEDURE inainte_de_do_termin
		If Empty(Nvl(poRec.id_jtva_coloana,0))
			AMESSAGEBOX('Nu ati ales Explicatia TVA!')
			this.cnt_explicatietva.tx_cautare.SetFocus()
			RETURN .F.
		EndIf 
		IF EMPTY(POREC.CONT)
			AMESSAGEBOX('Nu ati completat contul!')
			THIS.Clb_tx_cont.text_simplu1.SetFocus()
			RETURN .F.
		ENDIF 	
		IF EMPTY(POREC.ACONT)
			AMESSAGEBOX('Nu ati completat analiticul!')
			THIS.Clb_tx_Acont.text_simplu1.SetFocus()
			RETURN .F.
		ENDIF 	
		
		RETURN THIS.cus_odata_config_tva_analitice1.salvare(THIS.OREC,THIS.NID)
		
		
		
		
	ENDPROC

	PROCEDURE Init
		LPARAMETERS toRec, tnId, tcActiune
		
		this.orec= toRec
		this.nid = tnId
		this.cus_odata_config_tva_analitice1.cactiune = tcActiune
		
		If Upper(tcActiune) = 'UPDATE'
			this.cnt_sucursala.Enabled = .F.
			THIS.cnt_grup.Enabled = .F.
			this.cnt_explicatietva.Enabled = .F.
			this.clb_tx_cont.text_simplu1.ReadOnly = .T.
			this.clb_tx_acont.text_simplu1.SetFocus()
		Else 
			this.clb_tx_cont.text_simplu1.SetFocus()	
		EndIf 	
		
		DODEFAULT()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_config_note_contabile AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_pageframe1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.But_reface1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.But_nou2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.But_sterge2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.But_modifica2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cOrdine.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cOrdine.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cExplicatie.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cExplicatie.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cScd.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cScd.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cScc.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cScc.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cCu_tva.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cCu_tva.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cptva.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cptva.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cin_valuta.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cin_valuta.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cAscd.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cAscd.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cAscc.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cAscc.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.Column10.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.Column10.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.Column11.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.Column11.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUSets" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUSets.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUSets.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUSets.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUSets.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUCategorii" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUCategorii.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUCategorii.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUCategorii.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUCategorii.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUCategorii.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUCategorii.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2._label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2._label2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.txtCategorie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.spnOrdine" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.lblCategorie2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.lblCategorie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.lblOrdine" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.txtSet" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.lblSet" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_salveaza1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_salveaza2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_renunt2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_modifica2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_sterge2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_nou2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_copiaza2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_editeazaset" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.cboCategorii" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_renunt3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_modifica1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: actual_afisare
		*m: do_adauga_ireg
		*m: do_modifica_ireg
		*m: do_sterge_ireg
		*m: refacere_tabel
		*p: lcrm
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 466
		lcrm = .F.
		Name = "frm_config_note_contabile"
		Width = 794
		_SHAPE1.Height = 29
		_SHAPE1.Left = 0
		_SHAPE1.Name = "_SHAPE1"
		_SHAPE1.Top = 0
		_SHAPE1.Width = 792
		_SHAPE2.Height = 29
		_SHAPE2.Left = 719
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		_SHAPE2.Width = 73
		LB_TITLU_ALB_B121.Caption = "Configurare note"
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		BUT_TERMIN1.Anchor = 8
		BUT_TERMIN1.Left = 758
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		GRIDSORT1.Left = 9
		GRIDSORT1.Name = "GRIDSORT1"
		GRIDSORT1.Top = 39
	*</PropValue>

	ADD OBJECT '_pageframe1' AS _pageframe WITH ;
		Anchor = 15, ;
		ErasePage = .T., ;
		Height = 421, ;
		Left = 12, ;
		Name = "_pageframe1", ;
		Top = 40, ;
		Width = 782, ;
		Page1.Caption = "Note predefinite", ;
		Page1.FontSize = 10, ;
		Page1.Name = "Page1", ;
		Page2.Caption = "Note definite de utilizatori", ;
		Page2.Name = "Page2"
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\_baza.vcx" BaseClass="pageframe" />

	ADD OBJECT '_pageframe1.Page1.But_modifica1' AS but_modifica WITH ;
		Anchor = 8, ;
		caction = do_modifica_ireg, ;
		Left = 687, ;
		Name = "But_modifica1", ;
		TabIndex = 4, ;
		Top = 2, ;
		Visible = .T.
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page1.But_modifica2' AS but_modifica WITH ;
		Anchor = 8, ;
		Left = 261, ;
		Name = "But_modifica2", ;
		TabIndex = 4, ;
		Top = 2, ;
		Visible = .T.
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page1.But_nou1' AS but_nou WITH ;
		Anchor = 8, ;
		caction = do_adauga_ireg, ;
		Left = 658, ;
		Name = "But_nou1", ;
		TabIndex = 3, ;
		Top = 2
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page1.But_nou2' AS but_nou WITH ;
		Anchor = 8, ;
		Left = 233, ;
		Name = "But_nou2", ;
		TabIndex = 3, ;
		Top = 2
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page1.But_reface1' AS but_reface WITH ;
		Anchor = 8, ;
		Left = 743, ;
		lvizibil = .F., ;
		Name = "But_reface1", ;
		Top = 2, ;
		Visible = .F.
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page1.But_sterge1' AS but_sterge WITH ;
		Anchor = 8, ;
		caction = do_sterge_ireg, ;
		Left = 715, ;
		Name = "But_sterge1", ;
		TabIndex = 5, ;
		Top = 2, ;
		Visible = .T.
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page1.But_sterge2' AS but_sterge WITH ;
		Anchor = 8, ;
		Left = 289, ;
		Name = "But_sterge2", ;
		TabIndex = 5, ;
		Top = 2, ;
		Visible = .T.
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari' AS _grdrow WITH ;
		ColumnCount = 11, ;
		DeleteMark = .F., ;
		HeaderHeight = 38, ;
		Height = 350, ;
		Left = 325, ;
		Name = "gridInregistrari", ;
		Panel = 1, ;
		RecordSource = "cnote_contab", ;
		Top = 31, ;
		Width = 448, ;
		Column1.ColumnOrder = 1, ;
		Column1.ControlSource = "cnote_contab.ordine", ;
		Column1.FontName = "Arial", ;
		Column1.Name = "cOrdine", ;
		Column1.Width = 41, ;
		Column2.ColumnOrder = 2, ;
		Column2.ControlSource = "cnote_contab.explicatie", ;
		Column2.FontName = "Arial", ;
		Column2.Name = "cExplicatie", ;
		Column2.Width = 181, ;
		Column3.ColumnOrder = 3, ;
		Column3.ControlSource = "cnote_contab.scd", ;
		Column3.FontName = "Arial", ;
		Column3.Name = "cScd", ;
		Column3.Width = 54, ;
		Column4.ColumnOrder = 5, ;
		Column4.ControlSource = "cnote_contab.scc", ;
		Column4.FontName = "Arial", ;
		Column4.Name = "cScc", ;
		Column4.Width = 57, ;
		Column5.ColumnOrder = 7, ;
		Column5.ControlSource = "cnote_contab.cu_tva", ;
		Column5.FontName = "Arial", ;
		Column5.Name = "cCu_tva", ;
		Column5.Sparse = .F., ;
		Column5.Width = 39, ;
		Column6.ColumnOrder = 8, ;
		Column6.ControlSource = "cnote_contab.ptva", ;
		Column6.FontName = "Arial", ;
		Column6.Name = "cptva", ;
		Column6.Width = 53, ;
		Column7.ColumnOrder = 9, ;
		Column7.ControlSource = "cnote_contab.in_valuta", ;
		Column7.FontName = "Arial", ;
		Column7.Name = "cin_valuta", ;
		Column7.Sparse = .F., ;
		Column7.Width = 95, ;
		Column8.ColumnOrder = 4, ;
		Column8.ControlSource = "cnote_contab.ascd", ;
		Column8.FontName = "Arial", ;
		Column8.Name = "cAscd", ;
		Column8.Width = 84, ;
		Column9.ColumnOrder = 6, ;
		Column9.ControlSource = "cnote_contab.ascc", ;
		Column9.FontName = "Arial", ;
		Column9.Name = "cAscc", ;
		Column9.Width = 87, ;
		Column10.ColumnOrder = 10, ;
		Column10.FontName = "Arial", ;
		Column10.Name = "Column10", ;
		Column10.Width = 129, ;
		Column11.ColumnOrder = 11, ;
		Column11.FontName = "Arial", ;
		Column11.Name = "Column11", ;
		Column11.Width = 117
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cAscc.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Analitic creditor", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cAscd.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Analitic debitor", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cCu_tva.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		FontName = "Arial", ;
		Height = 17, ;
		Left = 27, ;
		Name = "Check1", ;
		SpecialEffect = 1, ;
		Top = 47, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cCu_tva.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cu TVA", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cExplicatie.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatie", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cExplicatie.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cin_valuta.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		FontName = "Arial", ;
		Height = 17, ;
		Left = 36, ;
		Name = "Check1", ;
		SpecialEffect = 1, ;
		Top = 71, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cin_valuta.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Se inregistreaza suma in valuta", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.Column10.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Partener debit", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.Column11.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Partener credit", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.Column11.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cOrdine.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ordine", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cOrdine.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cptva.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Proc TVA", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cptva.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cScc.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont cred", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cScc.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cScd.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont deb", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cScd.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridNote' AS grid WITH ;
		ColumnCount = 4, ;
		DeleteMark = .F., ;
		FontSize = 10, ;
		Height = 350, ;
		Left = 8, ;
		Name = "gridNote", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "nom_meniu", ;
		RowHeight = 19, ;
		TabIndex = 1, ;
		Top = 31, ;
		Width = 311, ;
		ZOrderSet = 6, ;
		Column1.ControlSource = "MENIU", ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 10, ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 226, ;
		Column2.ControlSource = "ID_SET", ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 10, ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 54, ;
		Column3.ControlSource = "sectie", ;
		Column3.FontName = "Arial", ;
		Column3.FontSize = 10, ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column4.ControlSource = "explicatie", ;
		Column4.FontName = "Arial", ;
		Column4.FontSize = 10, ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 105
		*< END OBJECT: BaseClass="grid" />

	ADD OBJECT '_pageframe1.Page1.gridNote.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Element meniu", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page1.gridNote.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page1.gridNote.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sectie", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridNote.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridNote.Column4.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Venituri/Cheltuieli", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridNote.Column4.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2._label1' AS _label WITH ;
		Caption = "Categorii", ;
		FontBold = .T., ;
		FontSize = 10, ;
		Left = 17, ;
		Name = "_label1", ;
		TabIndex = 19, ;
		Top = 19, ;
		ZOrderSet = 2
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\_baza.vcx" BaseClass="label" />

	ADD OBJECT '_pageframe1.Page2._label2' AS _label WITH ;
		Caption = "Set note", ;
		FontBold = .T., ;
		FontSize = 10, ;
		Left = 364, ;
		Name = "_label2", ;
		TabIndex = 20, ;
		Top = 19, ;
		ZOrderSet = 3
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\_baza.vcx" BaseClass="label" />

	ADD OBJECT '_pageframe1.Page2.But_copiaza2' AS but_copiaza WITH ;
		Anchor = 8, ;
		caction = do_copie_set, ;
		Left = 637, ;
		Name = "But_copiaza2", ;
		TabIndex = 10, ;
		ToolTipText = "Copiere set", ;
		Top = 14, ;
		ZOrderSet = 19
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_editeazaset' AS but_modiparam WITH ;
		Anchor = 8, ;
		caction = do_editeaza_set, ;
		Left = 738, ;
		Name = "But_editeazaset", ;
		TabIndex = 13, ;
		ToolTipText = "Editare set note", ;
		Top = 14, ;
		ZOrderSet = 20
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_modifica1' AS but_modifica WITH ;
		Anchor = 3, ;
		caction = do_modifica_categorie, ;
		Left = 283, ;
		Name = "But_modifica1", ;
		TabIndex = 2, ;
		ToolTipText = "Modificare categorie", ;
		Top = 14, ;
		Visible = .T., ;
		ZOrderSet = 23
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_modifica2' AS but_modifica WITH ;
		Anchor = 8, ;
		caction = do_modifica_set, ;
		Left = 665, ;
		Name = "But_modifica2", ;
		TabIndex = 11, ;
		ToolTipText = "Modificare set", ;
		Top = 14, ;
		Visible = .T., ;
		ZOrderSet = 15
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_nou1' AS but_nou WITH ;
		Anchor = 3, ;
		caction = do_adauga_categorie, ;
		Left = 254, ;
		Name = "But_nou1", ;
		TabIndex = 1, ;
		ToolTipText = "Adaugare categorie", ;
		Top = 14, ;
		ZOrderSet = 18
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_nou2' AS but_nou WITH ;
		Anchor = 8, ;
		caction = do_adauga_set, ;
		Left = 609, ;
		Name = "But_nou2", ;
		TabIndex = 9, ;
		ToolTipText = "Adaugare set", ;
		Top = 14, ;
		ZOrderSet = 17
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_renunt2' AS but_renunt WITH ;
		Anchor = 8, ;
		Left = 665, ;
		Name = "But_renunt2", ;
		TabIndex = 18, ;
		ToolTipText = "Renuntare editare set", ;
		Top = 14, ;
		Visible = .F., ;
		ZOrderSet = 14
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_renunt3' AS but_renunt WITH ;
		Anchor = 3, ;
		Left = 283, ;
		Name = "But_renunt3", ;
		TabIndex = 8, ;
		ToolTipText = "Renuntare editare categorie", ;
		Top = 14, ;
		Visible = .F., ;
		ZOrderSet = 22
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_salveaza1' AS but_salveaza WITH ;
		Anchor = 3, ;
		Left = 312, ;
		Name = "But_salveaza1", ;
		TabIndex = 7, ;
		ToolTipText = "Salvare categorie", ;
		Top = 14, ;
		Visible = .F., ;
		ZOrderSet = 11
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_salveaza2' AS but_salveaza WITH ;
		Anchor = 8, ;
		Left = 694, ;
		Name = "But_salveaza2", ;
		TabIndex = 17, ;
		ToolTipText = "Salvare set", ;
		Top = 14, ;
		Visible = .F., ;
		ZOrderSet = 13
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_sterge1' AS but_sterge WITH ;
		Anchor = 3, ;
		caction = do_sterge_categorie, ;
		Left = 312, ;
		Name = "But_sterge1", ;
		TabIndex = 3, ;
		ToolTipText = "Stergere categorie", ;
		Top = 14, ;
		Visible = .T., ;
		ZOrderSet = 12
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_sterge2' AS but_sterge WITH ;
		Anchor = 8, ;
		caction = do_sterge_set, ;
		Left = 694, ;
		Name = "But_sterge2", ;
		TabIndex = 12, ;
		ToolTipText = "Stergere set", ;
		Top = 14, ;
		Visible = .T., ;
		ZOrderSet = 16
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.cboCategorii' AS _combobox WITH ;
		Anchor = 4, ;
		ControlSource = "Thisform.oSet.cat_id", ;
		Enabled = .F., ;
		FontSize = 10, ;
		Height = 24, ;
		Left = 429, ;
		Name = "cboCategorii", ;
		TabIndex = 16, ;
		Top = 352, ;
		Width = 224, ;
		ZOrderSet = 21
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\_baza.vcx" BaseClass="combobox" />

	ADD OBJECT '_pageframe1.Page2.grdUCategorii' AS grid WITH ;
		Anchor = 5, ;
		ColumnCount = 3, ;
		DeleteMark = .F., ;
		FontSize = 10, ;
		Height = 260, ;
		HighlightBackColor = 60,115,200, ;
		HighlightStyle = 2, ;
		Left = 16, ;
		Name = "grdUCategorii", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "crsUCATEGORII", ;
		RowHeight = 19, ;
		TabIndex = 4, ;
		Top = 50, ;
		Width = 327, ;
		ZOrderSet = 1, ;
		Column1.ControlSource = "nume", ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 10, ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 207, ;
		Column2.ColumnOrder = 3, ;
		Column2.ControlSource = "id", ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 10, ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 48, ;
		Column3.ColumnOrder = 2, ;
		Column3.ControlSource = "ordine", ;
		Column3.FontName = "Arial", ;
		Column3.FontSize = 10, ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 35
		*< END OBJECT: BaseClass="grid" />

	ADD OBJECT '_pageframe1.Page2.grdUCategorii.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nume", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page2.grdUCategorii.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page2.grdUCategorii.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ordine", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdUCategorii.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdUSets' AS grid WITH ;
		Anchor = 15, ;
		ColumnCount = 2, ;
		DeleteMark = .F., ;
		FontSize = 10, ;
		Height = 259, ;
		HighlightBackColor = 60,115,200, ;
		HighlightStyle = 2, ;
		Left = 364, ;
		Name = "grdUSets", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "usets", ;
		RowHeight = 19, ;
		TabIndex = 14, ;
		Top = 50, ;
		Width = 404, ;
		ZOrderSet = 0, ;
		Column1.ControlSource = "nume", ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 10, ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 299, ;
		Column2.ControlSource = "id", ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 10, ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 69
		*< END OBJECT: BaseClass="grid" />

	ADD OBJECT '_pageframe1.Page2.grdUSets.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nume", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page2.grdUSets.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page2.lblCategorie' AS _label WITH ;
		Anchor = 6, ;
		Caption = "Categorie", ;
		FontBold = .T., ;
		FontSize = 10, ;
		Left = 17, ;
		Name = "lblCategorie", ;
		TabIndex = 22, ;
		Top = 325, ;
		ZOrderSet = 7
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\_baza.vcx" BaseClass="label" />

	ADD OBJECT '_pageframe1.Page2.lblCategorie2' AS _label WITH ;
		Anchor = 4, ;
		Caption = "Categorie", ;
		FontBold = .T., ;
		FontSize = 10, ;
		Left = 364, ;
		Name = "lblCategorie2", ;
		TabIndex = 21, ;
		Top = 355, ;
		ZOrderSet = 6
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\_baza.vcx" BaseClass="label" />

	ADD OBJECT '_pageframe1.Page2.lblOrdine' AS _label WITH ;
		Anchor = 6, ;
		Caption = "Ordine", ;
		FontBold = .T., ;
		FontSize = 10, ;
		Left = 17, ;
		Name = "lblOrdine", ;
		TabIndex = 23, ;
		Top = 355, ;
		ZOrderSet = 8
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\_baza.vcx" BaseClass="label" />

	ADD OBJECT '_pageframe1.Page2.lblSet' AS _label WITH ;
		Anchor = 4, ;
		Caption = "Set", ;
		FontBold = .T., ;
		FontSize = 10, ;
		Left = 364, ;
		Name = "lblSet", ;
		TabIndex = 24, ;
		Top = 325, ;
		ZOrderSet = 10
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\_baza.vcx" BaseClass="label" />

	ADD OBJECT '_pageframe1.Page2.spnOrdine' AS _spinner WITH ;
		Anchor = 6, ;
		FontSize = 10, ;
		Height = 24, ;
		Left = 83, ;
		Name = "spnOrdine", ;
		ReadOnly = .T., ;
		TabIndex = 6, ;
		Top = 351, ;
		Width = 63, ;
		ZOrderSet = 5
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\_baza.vcx" BaseClass="spinner" />

	ADD OBJECT '_pageframe1.Page2.txtCategorie' AS _textbox WITH ;
		Anchor = 6, ;
		FontSize = 10, ;
		Format = "K", ;
		Height = 23, ;
		Left = 83, ;
		Name = "txtCategorie", ;
		ReadOnly = .T., ;
		TabIndex = 5, ;
		Top = 322, ;
		Width = 260, ;
		ZOrderSet = 4
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\_baza.vcx" BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.txtSet' AS _textbox WITH ;
		Anchor = 4, ;
		FontSize = 10, ;
		Format = "K", ;
		Height = 23, ;
		Left = 429, ;
		Name = "txtSet", ;
		ReadOnly = .T., ;
		TabIndex = 15, ;
		Top = 322, ;
		Width = 339, ;
		ZOrderSet = 9
		*< END OBJECT: ClassLib="..\..\..\..\contafin\comun\clase\_baza.vcx" BaseClass="textbox" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		
		LOCAL lcFiltru
		lcFiltru = pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru = poNote_vanzari.ca_baza1.cfiltru
		ENDIF
		
		save_grid_tag(thisform.gridNote)
		poNote_vanzari.ca_baza1.cfiltru = lcFiltru
		poNote_vanzari.ca_baza1.afisare()
		restore_grid_tag(thisform.gridNote)
		thisform.gridNote.refresh
		
		
	ENDPROC

	PROCEDURE actualizeaza_grid2
		LPARAMETERS pcFiltru
		
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru = ponote_contab.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform.gridInregistrari)
		ponote_contab.ca_baza1.cfiltru=lcFiltru
		ponote_contab.ca_baza1.afisare()
		restore_grid_tag(thisform.gridInregistrari)
		thisform.gridInregistrari.refresh
	ENDPROC

	PROCEDURE actual_afisare
		SELECT nom_meniu
		SCATTER NAME poset
		
		*SELECT cnote_contab
		*SET FILTER TO id_set = poset.id_set
		save_grid_tag(thisform.gridInregistrari)
		ponote_contab.ca_baza1.cfiltru = [ id_set = ] + ALLTRIM(STR(NVL(poset.id_set,0)))
		ponote_contab.ca_baza1.afisare()
		restore_grid_tag(thisform.gridInregistrari)
		
		GO TOP 
		thisform.gridInregistrari.Refresh 
	ENDPROC

	PROCEDURE do_adauga
		If Thisform.lcrm
			Select nom_meniu
			Scatter Name loRec Blank
		
			Do Adauga_Modifica_Inregistrare With "note_crm",loRec,,"INSERT"
			If gnButon = 1
				This.actualizeaza_grid1()
				Select nom_meniu
				Locate For meniu = loRec.meniu
			Endif
			Thisform.gridNote.SetFocus()
			Thisform.gridNote.Refresh
		Endif
	ENDPROC

	PROCEDURE do_adauga_ireg
		Local lcTabel
		lcTabel = Thisform.gridNote.RecordSource
		Select (lcTabel)
		Scatter Name poNotaIdSet
		
		Select cnote_contab
		Go Bottom
		Scatter Name loUltRec
		Scatter Name loRec Memo Blank
		loRec.ordine = loUltRec.ordine + 1
		* loRec.id_set = loUltRec.id_set
		loRec.id_set = poNotaIdSet.id_set
		loRec.cu_tva = 1
		loRec.in_valuta = 0
		Store .Null. To loRec.ptva
		*!*	loRec.ptva = (pnctvam*100)-100
		Release loUltRec
		
		Do Adauga_Modifica_Inregistrare With "note_contabile",loRec,,"INSERT"
		If gnButon = 1
			This.actualizeaza_grid2()
		Endif
	ENDPROC

	PROCEDURE do_modifica_ireg
		Select cnote_contab
		Scatter Name loRec
		
		Do Adauga_Modifica_Inregistrare With "note_contabile",loRec,loRec.Id_note,"UPDATE"
		If gnButon = 1
			Thisform.actualizeaza_grid2()
		Endif
	ENDPROC

	PROCEDURE do_reface
		RETURN
		
		lctitlu = [Refacere]
		lcimagine = [intreb.ico]
		lctip = [Intrebare]
		lcmesaj1 = [Aceasta operatie va sterge configuratia actuala ]
		lcmesaj2 = [a notelor contabile! Doriti sa continuati?]
		
		ofrm_mesaj = CREATEOBJECT([frm_mesaj],lctitlu,lcimagine,lctip,lcmesaj1,lcmesaj2)
		ofrm_mesaj.show(1)
		RELEASE ofrm_mesaj
		
		IF buton=2
			RETURN 
		ENDIF 
		
		lcComanda1 = [delete from ] + gcS + [.note_contabile]
		lnSucces1 = goExecutor.oExecute(lcComanda1)
		IF lnSucces1 < 0
			aMESSAGEBOX('Delete from note_contabile:'+goExecutor.cEroare,0+16,'Eroare')
			RETURN	
		ENDIF
		
		lcComanda2 = [insert into ] + gcS + [.note_contabile (explicatie,scd,ascd,scc,ascc,in_valuta,cu_tva,id_set,ordine,ptva)  (select explicatie,scd,ascd,scc,ascc,in_valuta,cu_tva,id_set,ordine,ptva from note_contabile)]
		lnSucces2 = goExecutor.oExecute(lcComanda2)
		IF lnSucces2 < 0
			aMESSAGEBOX('Insert into note_contabile:' + goExecutor.cEroare,0+16,'Eroare')
			RETURN	
		ENDIF
		
		SELECT ctva
		LOCATE FOR 'STANDARD' $ UPPER(TVA)
		IF FOUND()
			lnProcent = ptva
			lcComanda2 = [UPDATE ] + gcS + [.note_contabile set ptva = ?lnProcent]
			lnSucces2 = goExecutor.oExecute(lcComanda2)
			IF lnSucces2 < 0
				aMESSAGEBOX('Update note_contabile:'+goExecutor.cEroare,0+16,'Eroare')
			ENDIF
		ENDIF 
		
		lctitlu = [Refacere]
		lcimagine = [info_c.ico]
		lctip = [Informare]
		lcmesaj1 = [Actualizarea s-a terminat!]
		
		ofrm_mesaj = CREATEOBJECT([frm_mesaj],lctitlu,lcimagine,lctip,lcmesaj1)
		ofrm_mesaj.show(1)
		RELEASE ofrm_mesaj
		*DO mesaj WITH 'Actualizarea s-a terminat!',''
		
		this.actualizeaza_grid2
		
	ENDPROC

	PROCEDURE do_sterge_ireg
		SELECT cnote_contab
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "note_contabile",loRec.id_note
		IF gnButon = 1
			this.actualizeaza_grid2()
		endif
		
		
	ENDPROC

	PROCEDURE inainte_de_do_modifica
		If Reccount('nom_meniu')>0
			Select nom_meniu
			Scatter Name loRec
		
			Do Adauga_Modifica_Inregistrare With "note_crm",loRec,loRec.id_nota,"UPDATE"
			If gnButon = 1
				This.actualizeaza_grid1()
				Select nom_meniu
				Locate For id_nota = loRec.id_nota
			Endif
			Thisform.gridNote.SetFocus()
		Endif
		
	ENDPROC

	PROCEDURE inainte_de_do_sterge
		If Reccount('nom_meniu')>0
			Select nom_meniu
			Scatter Name loRec
			Do STERGE_INREGISTRARE With "note_crm",loRec.id_nota
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE Init
		PARAMETERS tlCRM
		DODEFAULT()
		
		thisform.lCRM = tlCRM
		
		IF thisform.lCRM
			thisform.but_reface1.Visible = .F.
		ELSE
			thisform.but_nou2.Visible = .F.
			thisform.but_modifica2.Visible = .F.
			thisform.but_sterge2.Visible = .F.
		ENDIF 
		
		thisform.actual_afisare
	ENDPROC

	PROCEDURE refacere_tabel
		*!*	lctitlu = [Refacere]
		*!*	lcimagine = [intreb.ico]
		*!*	lctip = [Intrebare]
		*!*	lcmesaj1 = [Aceasta operatie va sterge configuratia actuala ]
		*!*	lcmesaj2 = [a notelor contabile!Doriti sa continuati?]
		
		*!*	ofrm_mesaj = CREATEOBJECT([frm_mesaj],lctitlu,lcimagine,lctip,lcmesaj1,lcmesaj2)
		*!*	ofrm_mesaj.show(1)
		*!*	RELEASE ofrm_mesaj
		
		*!*	IF buton=2
		*!*		RETURN 
		*!*	ENDIF 
		
		*!*	lcComanda1 = [delete from ] + gcS + [.note_contabile]
		*!*	lnSucces1 = goExecutor.oExecute(lcComanda1)
		*!*	IF lnSucces1 < 0
		*!*		MESSAGEBOX(goExecutor.cEroare,0+16,'Eroare')
		*!*		RETURN	
		*!*	ENDIF
		
		*!*	lcComanda2 = [insert into ] + gcS + [.note_contabile  (select * from note_contabile)]
		*!*	lnSucces2 = goExecutor.oExecute(lcComanda2)
		*!*	IF lnSucces2 < 0
		*!*		MESSAGEBOX(goExecutor.cEroare,0+16,'Eroare')
		*!*		RETURN	
		*!*	ENDIF
		
		*!*	SELECT ctva
		*!*	LOCATE FOR 'STANDARD' $ UPPER(TVA)
		*!*	IF FOUND()
		*!*		lnProcent = ptva
		*!*		lcComanda2 = [UPDATE ] + gcS + [.note_contabile set ptva = ?lnProcent]
		*!*		lnSucces2 = goExecutor.oExecute(lcComanda2)
		*!*		IF lnSucces2 < 0
		*!*			MESSAGEBOX(goExecutor.cEroare,0+16,'Eroare')
		*!*		ENDIF
		*!*	ENDIF 
		
		*!*	lctitlu = [Refacere]
		*!*	lcimagine = [info_c.ico]
		*!*	lctip = [Informare]
		*!*	lcmesaj1 = [Actualizarea s-a terminat!]
		
		*!*	ofrm_mesaj = CREATEOBJECT([frm_mesaj],lctitlu,lcimagine,lctip,lcmesaj1)
		*!*	ofrm_mesaj.show(1)
		*!*	RELEASE ofrm_mesaj
		*!*	*DO mesaj WITH 'Actualizarea s-a terminat!',''
		
		*!*	this.actualizeaza_grid2
		
	ENDPROC

	PROCEDURE _pageframe1.Page1.gridNote.AfterRowColChange
		LPARAMETERS nColIndex
		
		thisform.actual_afisare
	ENDPROC

	PROCEDURE _pageframe1.Page2.But_renunt2.Click
		Thisform.lEditModeSeturi = .F.
	ENDPROC

	PROCEDURE _pageframe1.Page2.But_renunt3.Click
		Thisform.lEditModeCategorii = .F.
	ENDPROC

	PROCEDURE _pageframe1.Page2.But_salveaza1.Click
		LOCAL loCategorie, llCategorieNoua, lcSelect
		LOCAL loEx as Exception 
		Local llSucces
		lcSelect = SELECT()
		loCategorie = Thisform.oCategorie
		llCategorieNoua = .F.
		IF NVL(loCategorie.ID, 0) = 0
			loCategorie.ID = NEW_ID("UCATEGORII", "ID", "ID")
			llCategorieNoua = .T.
		ENDIF 
		
		llSucces = .T.
		TRY 
			IF m.llCategorieNoua	
				INSERT INTO ucategorii FROM NAME loCategorie
				INSERT INTO crsUcategorii FROM NAME loCategorie	
			ELSE 
				UPDATE ucategorii SET nume = loCategorie.nume, ordine = loCategorie.ordine, utilm_id = m.gnIdUtil, dataoram = DATETIME() WHERE id = loCategorie.id
				replace nume with loCategorie.nume, ordine with loCategorie.ordine IN crsUCategorii
			ENDIF 	
		CATCH TO loEx
			llSucces = .F.	
			AMESSAGEBOX(TRANSFORM(loEx.ErrorNo) + " " + loEx.Message, 0+48, _screen.Caption) 
		ENDTRY 
			
		SELECT (m.lcSelect)
		IF m.llSucces
			Thisform.lEditModeCategorii = .F.
		ENDIF 
			 
	ENDPROC

	PROCEDURE _pageframe1.Page2.But_salveaza2.Click
		Local loSet, llNou, lcSelect
		Local llSucces, loEx as Exception 
		lcSelect = SELECT()
		loSet = Thisform.oSet
		llNou = .F.
		If Nvl(loSet.Id, 0) = 0
			llNou = .T.
			loSet.Id = NEW_ID("USETS", "ID", "ID", 1000000)
		Endif
		
		llSucces = .T.
		TRY
			loSet.cat_id = IIF(NVL(loSet.cat_id, 0) = 0, NULL, loSet.cat_id)
			If m.llNou
				Insert Into usets (id, nume, cat_id, util_id, dataora) VALUES (loSet.id, loSet.nume, loSet.cat_id, m.gnIdUtil, DATETIME())
			Else
				Update usets Set nume = loSet.nume, cat_id = loSet.cat_id, utilm_id = m.gnIdUtil, dataoram = DATETIME() Where Id = loSet.Id
			Endif
		Catch To loEx
			llSucces = .F.
			AMESSAGEBOX(Transform(loEx.ErrorNo) + " " + loEx.Message, 0+48, _Screen.Caption)
		Endtry
		
		Select (m.lcSelect)
		If m.llSucces
			Thisform.lEditModeSeturi = .F.
		Endif
		
		 
	ENDPROC

	PROCEDURE _pageframe1.Page2.grdUCategorii.AfterRowColChange
		LPARAMETERS nColIndex
		LOCAL loCategorie
		Local lcFilter
		
		SELECT crsUCategorii
		SCATTER NAME loCategorie
		Thisform.oCategorie = loCategorie
		
		lcFilter = [NVL(cat_id, 0) = ] + STR(NVL(Thisform.oCategorie.id, 0))
		
		SET FILTER TO &lcFilter IN usets
		GO TOP IN usets 
		
		this.Parent.grdUsets.Refresh()
		This.Parent.grdUsets.AfterRowColChange()
		This.Parent.txtCategorie.Refresh()
		This.Parent.spnOrdine.Refresh() 
	ENDPROC

	PROCEDURE _pageframe1.Page2.grdUSets.AfterRowColChange
		LPARAMETERS nColIndex
		
		SELECT usets
		*!*	IF !EOF()
			SCATTER NAME Thisform.oSet
			this.parent.txtSet.Refresh()
			This.parent.cboCategorii.Refresh()
		*!*	ENDIF 	
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_config_note_contabile2007 AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_pageframe1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.But_nou2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.But_sterge2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridNote.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.But_modifica2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cOrdine.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cOrdine.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cExplicatie.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cExplicatie.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cScd.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cScd.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cScc.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cScc.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cCu_tva.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cCu_tva.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cptva.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cptva.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cin_valuta.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cin_valuta.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cAscd.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cAscd.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cAscc.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cAscc.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cExplicatieTVA.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cExplicatieTVA.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cPartd.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cPartd.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cPartc.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page1.gridInregistrari.cPartc.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUSets" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUSets.cNumeSet.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUSets.cNumeSet.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUSets.cIdSet.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUSets.cIdSet.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUCategorii" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUCategorii.cCategorie.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUCategorii.cCategorie.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUCategorii.cIdCategorie.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUCategorii.cIdCategorie.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUCategorii.cOrdine.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdUCategorii.cOrdine.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.lblCategorii" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.lblRequest" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.lblSets" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.txtCategorie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.spnOrdine" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.lblCategorie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.lblOrdine" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column2.Header2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column3.Header3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column4.Header4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column5.Header5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column6.Header6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column7.Header7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column7.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column8.Header8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column8.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column9.Header9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column9.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column10.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column10.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column11.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column11.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column12.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column12.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column13.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column13.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column14.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column14.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column15.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column15.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column16.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column16.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column17.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column17.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column18.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column18.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column19.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column19.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column20.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column20.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column21.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column21.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column22.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column22.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column23.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column23.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column24.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column24.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column25.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column25.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column26.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column26.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column27.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column27.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column28.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column28.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column29.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column29.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column30.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column30.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column31.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column31.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column32.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column32.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column33.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column33.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column34.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column34.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column35.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column35.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column36.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column36._CHECKBOX1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column37.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column37.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column38.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column38.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column39.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column39.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column40.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.Column40.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.cAles.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.cAles.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdNote.cAles._CHECKBOX1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.lblNote" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_salveaza1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_renunt3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_modifica2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_sterge2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_nou2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_copiaza2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdRequest" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdRequest.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdRequest.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdRequest.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.grdRequest.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_pageframe1.Page2.But_editeazaset" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: creeaza_cursor
		*m: do_actualizeaza_gridcategorii
		*m: do_actualizeaza_gridnote
		*m: do_actualizeaza_gridrequest
		*m: do_actualizeaza_gridset
		*m: do_adauga_categorie
		*m: do_adauga_ireg
		*m: do_adauga_set
		*m: do_copie_set
		*m: do_editeaza_set
		*m: do_modifica_categorie
		*m: do_modifica_ireg
		*m: do_modifica_set
		*m: do_sterge_categorie
		*m: do_sterge_ireg
		*m: do_sterge_set
		*m: leditmodecategorii_assign
		*m: leditmodeseturi_assign
		*m: refacere_tabel
		*m: refreshdata
		*p: lcrm
		*p: leditmodecategorii
		*p: leditmodeseturi
		*p: ocategorie
		*p: oset
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 3
		Caption = "Form"
		cgridsortlist = 
		DoCreate = .T.
		Height = 466
		lcrm = .F.
		leditmodecategorii = .F.
		leditmodeseturi = .F.
		Name = "frm_config_note_contabile2007"
		ocategorie = NULL
		oset = NULL
		Width = 843
		_SHAPE1.Anchor = 10
		_SHAPE1.Height = 29
		_SHAPE1.Left = 0
		_SHAPE1.Name = "_SHAPE1"
		_SHAPE1.Top = 0
		_SHAPE1.Width = 852
		_SHAPE2.Anchor = 8
		_SHAPE2.Height = 29
		_SHAPE2.Left = 809
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		_SHAPE2.Width = 35
		LB_TITLU_ALB_B121.Caption = "Configurare note"
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		BUT_TERMIN1.Anchor = 8
		BUT_TERMIN1.Left = 813
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		GRIDSORT1.Left = 9
		GRIDSORT1.Name = "GRIDSORT1"
		GRIDSORT1.Top = 39
	*</PropValue>

	ADD OBJECT '_pageframe1' AS _pageframe WITH ;
		Anchor = 15, ;
		ErasePage = .T., ;
		Height = 419, ;
		Left = 0, ;
		Name = "_pageframe1", ;
		Top = 34, ;
		Width = 846, ;
		Page1.Caption = "Note predefinite", ;
		Page1.Name = "Page1", ;
		Page2.Caption = "Note definite de utilizatori", ;
		Page2.Name = "Page2"
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="pageframe" />

	ADD OBJECT '_pageframe1.Page1.But_modifica1' AS but_modifica WITH ;
		Height = 26, ;
		Left = 261, ;
		Name = "But_modifica1", ;
		TabIndex = 4, ;
		Top = 5, ;
		Width = 29
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page1.But_modifica2' AS but_modifica WITH ;
		Anchor = 8, ;
		caction = do_modifica_ireg, ;
		Left = 769, ;
		Name = "But_modifica2", ;
		TabIndex = 4, ;
		Top = 5, ;
		Visible = .T.
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page1.But_nou1' AS but_nou WITH ;
		Height = 26, ;
		Left = 234, ;
		Name = "But_nou1", ;
		TabIndex = 3, ;
		Top = 5, ;
		Width = 29
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page1.But_nou2' AS but_nou WITH ;
		Anchor = 8, ;
		caction = do_adauga_ireg, ;
		Left = 741, ;
		Name = "But_nou2", ;
		TabIndex = 3, ;
		Top = 5
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page1.But_sterge1' AS but_sterge WITH ;
		Height = 26, ;
		Left = 289, ;
		Name = "But_sterge1", ;
		TabIndex = 5, ;
		Top = 5, ;
		Width = 29
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page1.But_sterge2' AS but_sterge WITH ;
		Anchor = 8, ;
		caction = do_sterge_ireg, ;
		Left = 797, ;
		Name = "But_sterge2", ;
		TabIndex = 5, ;
		Top = 5, ;
		Visible = .T.
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 12, ;
		DeleteMark = .F., ;
		HeaderHeight = 38, ;
		Height = 346, ;
		Left = 324, ;
		Name = "gridInregistrari", ;
		Panel = 1, ;
		RecordSource = "cnote_contab", ;
		Top = 34, ;
		Width = 503, ;
		Column1.ControlSource = "cnote_contab.ordine", ;
		Column1.FontName = "Arial", ;
		Column1.Name = "cOrdine", ;
		Column1.Width = 32, ;
		Column2.ControlSource = "cnote_contab.explicatie", ;
		Column2.FontName = "Arial", ;
		Column2.Name = "cExplicatie", ;
		Column2.Width = 181, ;
		Column3.ControlSource = "cnote_contab.scd", ;
		Column3.FontName = "Arial", ;
		Column3.Name = "cScd", ;
		Column3.Width = 33, ;
		Column4.ColumnOrder = 5, ;
		Column4.ControlSource = "cnote_contab.scc", ;
		Column4.FontName = "Arial", ;
		Column4.Name = "cScc", ;
		Column4.Width = 33, ;
		Column5.ColumnOrder = 7, ;
		Column5.ControlSource = "cnote_contab.cu_tva", ;
		Column5.FontName = "Arial", ;
		Column5.Name = "cCu_tva", ;
		Column5.Sparse = .F., ;
		Column5.Width = 30, ;
		Column6.ColumnOrder = 8, ;
		Column6.ControlSource = "cnote_contab.ptva", ;
		Column6.FontName = "Arial", ;
		Column6.InputMask = "99.99", ;
		Column6.Name = "cptva", ;
		Column6.Width = 27, ;
		Column7.ColumnOrder = 10, ;
		Column7.ControlSource = "cnote_contab.in_valuta", ;
		Column7.FontName = "Arial", ;
		Column7.Name = "cin_valuta", ;
		Column7.Sparse = .F., ;
		Column8.ColumnOrder = 4, ;
		Column8.ControlSource = "cnote_contab.ascd", ;
		Column8.FontName = "Arial", ;
		Column8.Name = "cAscd", ;
		Column8.Width = 37, ;
		Column9.ColumnOrder = 6, ;
		Column9.ControlSource = "cnote_contab.ascc", ;
		Column9.FontName = "Arial", ;
		Column9.Name = "cAscc", ;
		Column9.Width = 36, ;
		Column10.ColumnOrder = 9, ;
		Column10.ControlSource = "explicatie_tva", ;
		Column10.FontName = "Arial", ;
		Column10.Name = "cExplicatieTVA", ;
		Column10.Width = 95, ;
		Column11.ControlSource = "partd", ;
		Column11.FontName = "Arial", ;
		Column11.Name = "cPartd", ;
		Column11.Width = 131, ;
		Column12.ControlSource = "partc", ;
		Column12.FontName = "Arial", ;
		Column12.Name = "cPartc", ;
		Column12.Width = 113
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cAscc.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Analitic creditor", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cAscd.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Analitic debitor", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cCu_tva.Check1' AS checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Centered = .T., ;
		FontName = "Arial", ;
		Height = 17, ;
		Left = 27, ;
		Name = "Check1", ;
		SpecialEffect = 1, ;
		Top = 47, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cCu_tva.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cu TVA", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cExplicatie.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatie", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cExplicatie.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cExplicatieTVA.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatie TVA", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cExplicatieTVA.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cin_valuta.Check1' AS checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Centered = .T., ;
		FontName = "Arial", ;
		Height = 17, ;
		Left = 36, ;
		Name = "Check1", ;
		SpecialEffect = 1, ;
		Top = 71, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cin_valuta.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Se inregistreaza suma in valuta", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cOrdine.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ordine", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cOrdine.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cPartc.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Partener credit", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cPartc.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cPartd.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Partener debit", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cPartd.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cptva.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Proc TVA", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cptva.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cScc.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont cred", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cScc.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cScd.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont deb", ;
		FontName = "Arial", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridInregistrari.cScd.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridNote' AS grid WITH ;
		Anchor = 5, ;
		ColumnCount = 4, ;
		DeleteMark = .F., ;
		FontSize = 10, ;
		Height = 346, ;
		Left = 7, ;
		Name = "gridNote", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "nom_meniu", ;
		RowHeight = 19, ;
		TabIndex = 1, ;
		Top = 34, ;
		Width = 311, ;
		ZOrderSet = 6, ;
		Column1.ControlSource = "MENIU", ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 10, ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 226, ;
		Column2.ControlSource = "ID_SET", ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 10, ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 54, ;
		Column3.ControlSource = "sectie", ;
		Column3.FontName = "Arial", ;
		Column3.FontSize = 10, ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column4.ControlSource = "explicatie", ;
		Column4.FontName = "Arial", ;
		Column4.FontSize = 10, ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 105
		*< END OBJECT: BaseClass="grid" />

	ADD OBJECT '_pageframe1.Page1.gridNote.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Element meniu", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page1.gridNote.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page1.gridNote.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sectie", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridNote.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page1.gridNote.Column4.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Venituri/Cheltuieli", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page1.gridNote.Column4.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.But_copiaza2' AS but_copiaza WITH ;
		Anchor = 8, ;
		caction = do_copie_set, ;
		Left = 488, ;
		Name = "But_copiaza2", ;
		TabIndex = 10, ;
		ToolTipText = "Copiere set", ;
		Top = 14, ;
		ZOrderSet = 19
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_editeazaset' AS but_modiparam WITH ;
		Anchor = 12, ;
		caction = do_editeaza_set, ;
		Height = 27, ;
		Left = 806, ;
		Name = "But_editeazaset", ;
		TabIndex = 13, ;
		ToolTipText = "Editare set note", ;
		Top = 240, ;
		Width = 30, ;
		ZOrderSet = 20
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_modifica1' AS but_modifica WITH ;
		Anchor = 3, ;
		caction = do_modifica_categorie, ;
		Left = 283, ;
		Name = "But_modifica1", ;
		TabIndex = 2, ;
		ToolTipText = "Modificare categorie", ;
		Top = 14, ;
		Visible = .T., ;
		ZOrderSet = 23
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_modifica2' AS but_modifica WITH ;
		Anchor = 8, ;
		caction = do_modifica_set, ;
		Left = 516, ;
		Name = "But_modifica2", ;
		TabIndex = 11, ;
		ToolTipText = "Modificare set", ;
		Top = 14, ;
		Visible = .T., ;
		ZOrderSet = 15
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_nou1' AS but_nou WITH ;
		Anchor = 3, ;
		caction = do_adauga_categorie, ;
		Left = 254, ;
		Name = "But_nou1", ;
		TabIndex = 1, ;
		ToolTipText = "Adaugare categorie", ;
		Top = 14, ;
		ZOrderSet = 18
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_nou2' AS but_nou WITH ;
		Anchor = 8, ;
		caction = do_adauga_set, ;
		Left = 460, ;
		Name = "But_nou2", ;
		TabIndex = 9, ;
		ToolTipText = "Adaugare set", ;
		Top = 14, ;
		ZOrderSet = 17
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_renunt3' AS but_renunt WITH ;
		Anchor = 3, ;
		Left = 283, ;
		Name = "But_renunt3", ;
		TabIndex = 8, ;
		ToolTipText = "Renuntare editare categorie", ;
		Top = 14, ;
		Visible = .F., ;
		ZOrderSet = 22
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_salveaza1' AS but_salveaza WITH ;
		Anchor = 3, ;
		Left = 312, ;
		Name = "But_salveaza1", ;
		TabIndex = 7, ;
		ToolTipText = "Salvare categorie", ;
		Top = 14, ;
		Visible = .F., ;
		ZOrderSet = 11
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_sterge1' AS but_sterge WITH ;
		Anchor = 3, ;
		caction = do_sterge_categorie, ;
		Left = 312, ;
		Name = "But_sterge1", ;
		TabIndex = 3, ;
		ToolTipText = "Stergere categorie", ;
		Top = 14, ;
		Visible = .T., ;
		ZOrderSet = 12
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.But_sterge2' AS but_sterge WITH ;
		Anchor = 8, ;
		caction = do_sterge_set, ;
		Left = 545, ;
		Name = "But_sterge2", ;
		TabIndex = 12, ;
		ToolTipText = "Stergere set", ;
		Top = 14, ;
		Visible = .T., ;
		ZOrderSet = 16
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT '_pageframe1.Page2.grdNote' AS grid WITH ;
		Anchor = 14, ;
		BackColor = 244,250,255, ;
		ColumnCount = 41, ;
		DeleteMark = .F., ;
		FontSize = 10, ;
		GridLineColor = 128,128,128, ;
		Height = 111, ;
		HighlightBackColor = 0,64,128, ;
		HighlightStyle = 2, ;
		Left = 361, ;
		Name = "grdNote", ;
		Panel = 1, ;
		ReadOnly = .F., ;
		RecordSource = "crsENote", ;
		RowHeight = 19, ;
		SelectedItemBackColor = 49,106,197, ;
		TabIndex = 1, ;
		Top = 267, ;
		Width = 475, ;
		ZOrderSet = 3, ;
		Column1.Alignment = 1, ;
		Column1.BackColor = 244,250,255, ;
		Column1.ColumnOrder = 1, ;
		Column1.ControlSource = "NRCRT()", ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 10, ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .F., ;
		Column1.Width = 29, ;
		Column2.Alignment = 0, ;
		Column2.BackColor = 244,250,255, ;
		Column2.ColumnOrder = 3, ;
		Column2.ControlSource = "dataireg", ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 10, ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .F., ;
		Column2.Width = 49, ;
		Column3.Alignment = 0, ;
		Column3.BackColor = 244,250,255, ;
		Column3.ColumnOrder = 15, ;
		Column3.ControlSource = "fdoc", ;
		Column3.FontName = "Arial", ;
		Column3.FontSize = 10, ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .F., ;
		Column3.Width = 88, ;
		Column4.Alignment = 0, ;
		Column4.BackColor = 244,250,255, ;
		Column4.ColumnOrder = 4, ;
		Column4.ControlSource = "dataact", ;
		Column4.FontName = "Arial", ;
		Column4.FontSize = 10, ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .F., ;
		Column4.Width = 51, ;
		Column5.Alignment = 1, ;
		Column5.BackColor = 244,250,255, ;
		Column5.ColumnOrder = 6, ;
		Column5.ControlSource = "nract", ;
		Column5.FontName = "Arial", ;
		Column5.FontSize = 10, ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .F., ;
		Column5.Width = 53, ;
		Column6.Alignment = 0, ;
		Column6.BackColor = 244,250,255, ;
		Column6.ColumnOrder = 7, ;
		Column6.ControlSource = "partd", ;
		Column6.FontName = "Arial", ;
		Column6.FontSize = 10, ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .F., ;
		Column6.Width = 87, ;
		Column7.Alignment = 1, ;
		Column7.BackColor = 244,250,255, ;
		Column7.ColumnOrder = 10, ;
		Column7.ControlSource = "scd", ;
		Column7.FontName = "Arial", ;
		Column7.FontSize = 10, ;
		Column7.Name = "Column7", ;
		Column7.ReadOnly = .F., ;
		Column7.Width = 44, ;
		Column8.Alignment = 1, ;
		Column8.BackColor = 244,250,255, ;
		Column8.ColumnOrder = 12, ;
		Column8.ControlSource = "scc", ;
		Column8.FontName = "Arial", ;
		Column8.FontSize = 10, ;
		Column8.Name = "Column8", ;
		Column8.ReadOnly = .F., ;
		Column8.Width = 48, ;
		Column9.Alignment = 1, ;
		Column9.BackColor = 244,250,255, ;
		Column9.ColumnOrder = 14, ;
		Column9.ControlSource = "suma", ;
		Column9.DynamicForeColor = "IIF(SUMA>=0, RGB(0,0,0), RGB(255,0,0))", ;
		Column9.FontName = "Arial", ;
		Column9.FontSize = 10, ;
		Column9.Format = "r", ;
		Column9.InputMask = (get_mask(12,gnPa)), ;
		Column9.Name = "Column9", ;
		Column9.ReadOnly = .F., ;
		Column9.Width = 93, ;
		Column10.Alignment = 0, ;
		Column10.BackColor = 244,250,255, ;
		Column10.ColumnOrder = 8, ;
		Column10.ControlSource = "partc", ;
		Column10.FontName = "Arial", ;
		Column10.FontSize = 10, ;
		Column10.Name = "Column10", ;
		Column10.ReadOnly = .F., ;
		Column10.Width = 79, ;
		Column11.Alignment = 0, ;
		Column11.BackColor = 244,250,255, ;
		Column11.ColumnOrder = 9, ;
		Column11.ControlSource = "explicatia", ;
		Column11.FontName = "Arial", ;
		Column11.FontSize = 10, ;
		Column11.Name = "Column11", ;
		Column11.ReadOnly = .F., ;
		Column11.Width = 77, ;
		Column12.BackColor = 244,250,255, ;
		Column12.ColumnOrder = 35, ;
		Column12.ControlSource = "cod", ;
		Column12.FontName = "Arial", ;
		Column12.FontSize = 10, ;
		Column12.Name = "Column12", ;
		Column12.ReadOnly = .T., ;
		Column12.Width = 52, ;
		Column13.BackColor = 244,250,255, ;
		Column13.ColumnOrder = 16, ;
		Column13.ControlSource = "pereched", ;
		Column13.FontName = "Arial", ;
		Column13.FontSize = 10, ;
		Column13.Name = "Column13", ;
		Column13.ReadOnly = .F., ;
		Column13.Width = 65, ;
		Column14.BackColor = 244,250,255, ;
		Column14.ColumnOrder = 29, ;
		Column14.ControlSource = "explicatia4", ;
		Column14.FontName = "Arial", ;
		Column14.FontSize = 10, ;
		Column14.Name = "Column14", ;
		Column14.ReadOnly = .F., ;
		Column15.BackColor = 244,250,255, ;
		Column15.ColumnOrder = 22, ;
		Column15.ControlSource = "nrord", ;
		Column15.FontName = "Arial", ;
		Column15.FontSize = 10, ;
		Column15.Name = "Column15", ;
		Column15.ReadOnly = .F., ;
		Column16.BackColor = 244,250,255, ;
		Column16.ColumnOrder = 24, ;
		Column16.ControlSource = "nresp", ;
		Column16.FontName = "Arial", ;
		Column16.FontSize = 10, ;
		Column16.Format = "", ;
		Column16.InputMask = "", ;
		Column16.Name = "Column16", ;
		Column16.ReadOnly = .F., ;
		Column17.BackColor = 244,250,255, ;
		Column17.ColumnOrder = 25, ;
		Column17.ControlSource = "dst_chlt", ;
		Column17.FontName = "Arial", ;
		Column17.FontSize = 10, ;
		Column17.Format = "", ;
		Column17.InputMask = "", ;
		Column17.Name = "Column17", ;
		Column17.ReadOnly = .F., ;
		Column18.BackColor = 244,250,255, ;
		Column18.ColumnOrder = 30, ;
		Column18.ControlSource = "explicatia5", ;
		Column18.FontName = "Arial", ;
		Column18.FontSize = 10, ;
		Column18.Name = "Column18", ;
		Column18.ReadOnly = .F., ;
		Column19.BackColor = 244,250,255, ;
		Column19.ColumnOrder = 21, ;
		Column19.ControlSource = "datascad", ;
		Column19.FontName = "Arial", ;
		Column19.FontSize = 10, ;
		Column19.Name = "Column19", ;
		Column19.ReadOnly = .F., ;
		Column19.Visible = .T., ;
		Column20.BackColor = 244,250,255, ;
		Column20.ColumnOrder = 26, ;
		Column20.ControlSource = "suma_val", ;
		Column20.FontName = "Arial", ;
		Column20.FontSize = 10, ;
		Column20.InputMask = (get_mask(12,gnPa)), ;
		Column20.Name = "Column20", ;
		Column20.ReadOnly = .F., ;
		Column21.BackColor = 244,250,255, ;
		Column21.ColumnOrder = 28, ;
		Column21.ControlSource = "curs", ;
		Column21.FontName = "Arial", ;
		Column21.FontSize = 10, ;
		Column21.InputMask = (get_mask(12,gnPcurs)), ;
		Column21.Name = "Column21", ;
		Column21.ReadOnly = .F., ;
		Column21.Width = 61, ;
		Column22.BackColor = 244,250,255, ;
		Column22.ColumnOrder = 31, ;
		Column22.ControlSource = "gestin", ;
		Column22.FontName = "Arial", ;
		Column22.FontSize = 10, ;
		Column22.Name = "Column22", ;
		Column22.ReadOnly = .F., ;
		Column22.Width = 87, ;
		Column23.BackColor = 244,250,255, ;
		Column23.ColumnOrder = 11, ;
		Column23.ControlSource = "ascd", ;
		Column23.FontName = "Arial", ;
		Column23.FontSize = 10, ;
		Column23.Name = "Column23", ;
		Column23.ReadOnly = .F., ;
		Column23.Width = 33, ;
		Column24.BackColor = 244,250,255, ;
		Column24.ColumnOrder = 13, ;
		Column24.ControlSource = "ascc", ;
		Column24.FontName = "Arial", ;
		Column24.FontSize = 10, ;
		Column24.Name = "Column24", ;
		Column24.ReadOnly = .F., ;
		Column24.Width = 33, ;
		Column25.BackColor = 244,250,255, ;
		Column25.ColumnOrder = 36, ;
		Column25.ControlSource = "id_set", ;
		Column25.FontName = "Arial", ;
		Column25.FontSize = 10, ;
		Column25.Name = "Column25", ;
		Column25.ReadOnly = .T., ;
		Column25.Width = 52, ;
		Column26.BackColor = 244,250,255, ;
		Column26.ColumnOrder = 19, ;
		Column26.ControlSource = "proc_tva", ;
		Column26.FontName = "Arial", ;
		Column26.FontSize = 10, ;
		Column26.Name = "Column26", ;
		Column26.ReadOnly = .T., ;
		Column26.Width = 45, ;
		Column27.BackColor = 244,250,255, ;
		Column27.ColumnOrder = 17, ;
		Column27.ControlSource = "perechec", ;
		Column27.FontName = "Arial", ;
		Column27.FontSize = 10, ;
		Column27.Name = "Column27", ;
		Column27.ReadOnly = .F., ;
		Column27.Width = 64, ;
		Column28.BackColor = 244,250,255, ;
		Column28.ColumnOrder = 33, ;
		Column28.ControlSource = "sectie", ;
		Column28.FontName = "Arial", ;
		Column28.FontSize = 10, ;
		Column28.Name = "Column28", ;
		Column28.ReadOnly = .F., ;
		Column28.Width = 88, ;
		Column29.BackColor = 244,250,255, ;
		Column29.ColumnOrder = 27, ;
		Column29.ControlSource = "nume_val", ;
		Column29.FontName = "Arial", ;
		Column29.FontSize = 10, ;
		Column29.Name = "Column29", ;
		Column29.ReadOnly = .F., ;
		Column29.Width = 61, ;
		Column30.BackColor = 244,250,255, ;
		Column30.ColumnOrder = 37, ;
		Column30.ControlSource = "id_partd", ;
		Column30.FontName = "Arial", ;
		Column30.FontSize = 10, ;
		Column30.Name = "Column30", ;
		Column30.ReadOnly = .T., ;
		Column30.Width = 45, ;
		Column31.BackColor = 244,250,255, ;
		Column31.ColumnOrder = 38, ;
		Column31.ControlSource = "id_partc", ;
		Column31.FontName = "Arial", ;
		Column31.FontSize = 10, ;
		Column31.Name = "Column31", ;
		Column31.ReadOnly = .T., ;
		Column31.Width = 43, ;
		Column32.BackColor = 244,250,255, ;
		Column32.ColumnOrder = 32, ;
		Column32.ControlSource = "gestout", ;
		Column32.FontName = "Arial", ;
		Column32.FontSize = 10, ;
		Column32.Name = "Column32", ;
		Column32.ReadOnly = .F., ;
		Column32.Width = 89, ;
		Column33.BackColor = 244,250,255, ;
		Column33.ColumnOrder = 34, ;
		Column33.ControlSource = "sucursala", ;
		Column33.FontName = "Arial", ;
		Column33.FontSize = 10, ;
		Column33.Name = "Column33", ;
		Column33.ReadOnly = .F., ;
		Column33.Width = 121, ;
		Column34.BackColor = 244,250,255, ;
		Column34.ColumnOrder = 23, ;
		Column34.ControlSource = "contract", ;
		Column34.FontName = "Arial", ;
		Column34.FontSize = 10, ;
		Column34.Name = "Column34", ;
		Column34.ReadOnly = .T., ;
		Column34.Width = 65, ;
		Column35.BackColor = 244,250,255, ;
		Column35.ColumnOrder = 20, ;
		Column35.ControlSource = "explicatie_tva", ;
		Column35.FontName = "Arial", ;
		Column35.FontSize = 10, ;
		Column35.Name = "Column35", ;
		Column35.ReadOnly = .F., ;
		Column35.Width = 75, ;
		Column36.BackColor = 244,250,255, ;
		Column36.ColumnOrder = 18, ;
		Column36.ControlSource = "cu_tva", ;
		Column36.FontName = "Arial", ;
		Column36.FontSize = 10, ;
		Column36.Name = "Column36", ;
		Column36.ReadOnly = .F., ;
		Column36.Sparse = .F., ;
		Column36.Width = 40, ;
		Column37.BackColor = 244,250,255, ;
		Column37.ColumnOrder = 5, ;
		Column37.ControlSource = "serie_act", ;
		Column37.FontName = "Arial", ;
		Column37.FontSize = 10, ;
		Column37.Format = "!", ;
		Column37.Name = "Column37", ;
		Column37.ReadOnly = .F., ;
		Column37.Width = 49, ;
		Column38.BackColor = 244,250,255, ;
		Column38.ColumnOrder = 39, ;
		Column38.ControlSource = "id_fact", ;
		Column38.FontName = "Arial", ;
		Column38.FontSize = 10, ;
		Column38.Name = "Column38", ;
		Column38.ReadOnly = .T., ;
		Column39.BackColor = 244,250,255, ;
		Column39.ColumnOrder = 40, ;
		Column39.ControlSource = "id_factd", ;
		Column39.FontName = "Arial", ;
		Column39.FontSize = 10, ;
		Column39.Name = "Column39", ;
		Column39.ReadOnly = .T., ;
		Column40.BackColor = 244,250,255, ;
		Column40.ColumnOrder = 41, ;
		Column40.ControlSource = "id_factc", ;
		Column40.FontName = "Arial", ;
		Column40.FontSize = 10, ;
		Column40.Name = "Column40", ;
		Column40.ReadOnly = .T., ;
		Column41.BackColor = 244,250,255, ;
		Column41.ColumnOrder = 2, ;
		Column41.ControlSource = "ales", ;
		Column41.CurrentControl = "_CHECKBOX1", ;
		Column41.FontName = "Arial", ;
		Column41.FontSize = 10, ;
		Column41.Name = "cAles", ;
		Column41.ReadOnly = .F., ;
		Column41.Sparse = .F., ;
		Column41.Width = 22
		*< END OBJECT: BaseClass="grid" />

	ADD OBJECT '_pageframe1.Page2.grdNote.cAles._CHECKBOX1' AS _checkbox WITH ;
		Alignment = 2, ;
		BackColor = 255,255,255, ;
		Caption = "", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Left = 9, ;
		Name = "_CHECKBOX1", ;
		ReadOnly = .F., ;
		Top = 79
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

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

	ADD OBJECT '_pageframe1.Page2.grdNote.cAles.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "NrCrt", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column1.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column10.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatie C", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column10.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column11.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Expl.3", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column11.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column12.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "COD", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column12.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column13.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.doc.platit", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column13.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

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

	ADD OBJECT '_pageframe1.Page2.grdNote.Column14.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column15.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Lucrarea", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column15.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

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

	ADD OBJECT '_pageframe1.Page2.grdNote.Column16.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column17.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cheltuiala", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column17.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

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

	ADD OBJECT '_pageframe1.Page2.grdNote.Column18.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column19.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data scadenta", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column19.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197, ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column2.Header2' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data Inreg.", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header2"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column2.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column20.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Suma in valuta", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column20.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column21.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Curs valutar", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column21.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column22.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Gestiune destinatie", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column22.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column23.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "AnalitD", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column23.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column24.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "AnalitC", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column24.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column25.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Tip operatie", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column25.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column26.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cota TVA", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column26.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column27.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.doc.incasat", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column27.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column28.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sectia", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column28.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column29.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nume Valuta", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column29.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column3.Header3' AS header WITH ;
		Alignment = 2, ;
		Caption = "Fel Doc.", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header3"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column3.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column30.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id Part D", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column30.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column31.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id Part C", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column31.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column32.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Gestiune sursa", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column32.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

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

	ADD OBJECT '_pageframe1.Page2.grdNote.Column33.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

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

	ADD OBJECT '_pageframe1.Page2.grdNote.Column34.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column35.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatie TVA", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column35.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column36._CHECKBOX1' AS _checkbox WITH ;
		Alignment = 2, ;
		AutoSize = .F., ;
		Caption = "", ;
		Centered = .T., ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Left = 19, ;
		Name = "_CHECKBOX1", ;
		Top = 31
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column36.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cu TVA", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column37.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Serie doc.", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column37.Text1' AS textbox WITH ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column38.Header1' AS header WITH ;
		Caption = "Id factura", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column38.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column39.Header1' AS header WITH ;
		Caption = "Id Factura d", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column39.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column4.Header4' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data Act", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header4"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column4.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column40.Header1' AS header WITH ;
		Caption = "Id Factura c", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column40.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column5.Header5' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.Doc.", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header5"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column5.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column6.Header6' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatie D", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header6"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column6.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 244,250,255, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column7.Header7' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont Deb.", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header7"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column7.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column8.Header8' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont Cred.", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header8"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column8.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column9.Header9' AS header WITH ;
		Alignment = 2, ;
		Caption = "Suma", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header9"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdNote.Column9.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 244,250,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 49,106,197
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdRequest' AS _grdbase WITH ;
		Anchor = 13, ;
		ColumnCount = 2, ;
		DeleteMark = .F., ;
		Height = 183, ;
		Left = 579, ;
		Name = "grdRequest", ;
		Panel = 1, ;
		ReadOnly = .F., ;
		RecordSource = "crsERequest", ;
		Top = 50, ;
		Width = 260, ;
		Column1.ControlSource = "label_item", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .F., ;
		Column1.Width = 123, ;
		Column2.ControlSource = "valoare_default_text", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .F., ;
		Column2.Width = 104
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

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

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

	ADD OBJECT '_pageframe1.Page2.grdRequest.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Valoare implicita", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page2.grdUCategorii' AS grid WITH ;
		Anchor = 5, ;
		ColumnCount = 3, ;
		DeleteMark = .F., ;
		FontSize = 10, ;
		Height = 260, ;
		HighlightBackColor = 60,115,200, ;
		HighlightStyle = 2, ;
		Left = 16, ;
		Name = "grdUCategorii", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "crsECategorii", ;
		RowHeight = 19, ;
		TabIndex = 4, ;
		Top = 50, ;
		Width = 327, ;
		ZOrderSet = 1, ;
		Column1.ControlSource = "categorie", ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 10, ;
		Column1.Name = "cCategorie", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 207, ;
		Column2.ColumnOrder = 3, ;
		Column2.ControlSource = "id_categorie", ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 10, ;
		Column2.Format = "R", ;
		Column2.InputMask = "99999999", ;
		Column2.Name = "cIdCategorie", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 48, ;
		Column3.ColumnOrder = 2, ;
		Column3.ControlSource = "ordine", ;
		Column3.FontName = "Arial", ;
		Column3.FontSize = 10, ;
		Column3.Format = "RK", ;
		Column3.InputMask = "999999", ;
		Column3.Name = "cOrdine", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 35
		*< END OBJECT: BaseClass="grid" />

	ADD OBJECT '_pageframe1.Page2.grdUCategorii.cCategorie.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nume", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page2.grdUCategorii.cIdCategorie.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page2.grdUCategorii.cOrdine.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ordine", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_pageframe1.Page2.grdUCategorii.cOrdine.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_pageframe1.Page2.grdUSets' AS grid WITH ;
		Anchor = 15, ;
		ColumnCount = 2, ;
		DeleteMark = .F., ;
		FontSize = 10, ;
		Height = 183, ;
		HighlightBackColor = 60,115,200, ;
		HighlightStyle = 2, ;
		Left = 364, ;
		Name = "grdUSets", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "crsESets", ;
		RowHeight = 19, ;
		TabIndex = 14, ;
		Top = 50, ;
		Width = 211, ;
		ZOrderSet = 0, ;
		Column1.ControlSource = "nume_set", ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 10, ;
		Column1.Name = "cNumeSet", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 299, ;
		Column2.ControlSource = "id_set", ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 10, ;
		Column2.Format = "R", ;
		Column2.InputMask = "99999999", ;
		Column2.Name = "cIdSet", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 69
		*< END OBJECT: BaseClass="grid" />

	ADD OBJECT '_pageframe1.Page2.grdUSets.cIdSet.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page2.grdUSets.cNumeSet.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nume", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_pageframe1.Page2.lblCategorie' AS _label WITH ;
		Anchor = 6, ;
		Caption = "Categorie", ;
		FontBold = .T., ;
		Left = 17, ;
		Name = "lblCategorie", ;
		TabIndex = 22, ;
		Top = 325, ;
		ZOrderSet = 7
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT '_pageframe1.Page2.lblCategorii' AS _label WITH ;
		Caption = "Categorii", ;
		FontBold = .T., ;
		Left = 17, ;
		Name = "lblCategorii", ;
		TabIndex = 19, ;
		Top = 19, ;
		ZOrderSet = 2
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT '_pageframe1.Page2.lblNote' AS _label WITH ;
		Anchor = 6, ;
		Caption = "Note", ;
		FontBold = .T., ;
		Height = 18, ;
		Left = 364, ;
		Name = "lblNote", ;
		TabIndex = 20, ;
		Top = 245, ;
		Width = 31, ;
		ZOrderSet = 3
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT '_pageframe1.Page2.lblOrdine' AS _label WITH ;
		Anchor = 6, ;
		Caption = "Ordine", ;
		FontBold = .T., ;
		Left = 17, ;
		Name = "lblOrdine", ;
		TabIndex = 23, ;
		Top = 355, ;
		ZOrderSet = 8
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT '_pageframe1.Page2.lblRequest' AS _label WITH ;
		Anchor = 8, ;
		AutoSize = .F., ;
		Caption = "Cerere date", ;
		FontBold = .T., ;
		Height = 17, ;
		Left = 579, ;
		Name = "lblRequest", ;
		TabIndex = 20, ;
		Top = 19, ;
		Width = 260, ;
		ZOrderSet = 3
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT '_pageframe1.Page2.lblSets' AS _label WITH ;
		Caption = "Seturi", ;
		FontBold = .T., ;
		Left = 364, ;
		Name = "lblSets", ;
		TabIndex = 20, ;
		Top = 19, ;
		ZOrderSet = 3
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="label" />

	ADD OBJECT '_pageframe1.Page2.spnOrdine' AS _spinner WITH ;
		Anchor = 6, ;
		Format = "R", ;
		Height = 24, ;
		Increment =   1.00, ;
		InputMask = "999999", ;
		KeyboardHighValue = 100000, ;
		KeyboardLowValue = 1, ;
		Left = 79, ;
		Name = "spnOrdine", ;
		ReadOnly = .T., ;
		SpinnerHighValue = 1000000.00, ;
		SpinnerLowValue =   1.00, ;
		TabIndex = 6, ;
		Top = 351, ;
		Width = 63, ;
		ZOrderSet = 5
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="spinner" />

	ADD OBJECT '_pageframe1.Page2.txtCategorie' AS _textbox WITH ;
		Anchor = 6, ;
		Format = "!K", ;
		Height = 23, ;
		Left = 79, ;
		Name = "txtCategorie", ;
		ReadOnly = .T., ;
		TabIndex = 5, ;
		Top = 322, ;
		Width = 264, ;
		ZOrderSet = 4
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="textbox" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		
		LOCAL lcFiltru
		lcFiltru = pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru = poNote_vanzari.ca_baza1.cfiltru
		ENDIF
		
		save_grid_tag(thisform._pageframe1.page1.gridNote)
		poNote_vanzari.ca_baza1.cfiltru = lcFiltru
		poNote_vanzari.ca_baza1.afisare()
		restore_grid_tag(thisform._pageframe1.page1.gridNote)
		thisform._pageframe1.page1.gridNote.refresh
		
		
	ENDPROC

	PROCEDURE actualizeaza_grid2
		LPARAMETERS pcFiltru
		
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru = ponote_contab.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._pageframe1.page1.gridInregistrari)
		ponote_contab.ca_baza1.cfiltru=lcFiltru
		ponote_contab.ca_baza1.afisare()
		restore_grid_tag(thisform._pageframe1.page1.gridInregistrari)
		thisform._pageframe1.page1.gridInregistrari.refresh
	ENDPROC

	PROCEDURE creeaza_cursor
		If Used('crscoloane')
			Use In crscoloane
		Endif
		lcSql = [select id_jtva_coloana,denumire as explicatie_tva,cota_tva ] + ;
			[from ] + gcS + [.vjtva_coloane where id_jtva_coloana > 0 order by ordine]
		lnSucces = goExecutor.oExecute(lcSql,[crscoloane])
		If lnSucces < 0
			amessagebox(goExecutor.cEroare,0+64,"Eroare")
		Endif
	ENDPROC

	PROCEDURE do_actualizeaza_gridcategorii
		save_grid_tag(Thisform._pageframe1.page2.grdUCategorii)
		poCategorii.ca_baza1.cfiltru = ""
		poCategorii.ca_baza1.afisare()
		restore_grid_tag(Thisform._pageframe1.page2.grdUCategorii)
	ENDPROC

	PROCEDURE do_actualizeaza_gridnote
		Local lcfiltru, loSet
		loSet = Thisform.oSet
		
		lcfiltru = [a.id_set = ] + Alltrim(Str(m.loSet.id_set))
		save_grid_tag(Thisform._pageframe1.page2.grdNote)
		
		poNote.ca_baza1.cfiltru = m.lcfiltru
		poNote.ca_baza1.afisare()
		restore_grid_tag(Thisform._pageframe1.page2.grdNote)
		
		Go Top In crsENote
	ENDPROC

	PROCEDURE do_actualizeaza_gridrequest
		Local lcfiltru, loSet
		loSet = Thisform.oSet
		
		lcfiltru = [r.id_set = ] + Alltrim(Str(m.loSet.id_set))
		save_grid_tag(Thisform._pageframe1.page2.grdRequest)
		
		poRequest.ca_baza1.cfiltru = m.lcfiltru
		poRequest.ca_baza1.afisare()
		restore_grid_tag(Thisform._pageframe1.page2.grdRequest)
		
		Go Top In crsERequest
	ENDPROC

	PROCEDURE do_actualizeaza_gridset
		Local lcfiltru, lnIdCategorie
		lnIdCategorie = Thisform.oCategorie.id_categorie
		lcfiltru = [NVL(id_categorie, 0) = ] + Str(Nvl(Thisform.oCategorie.id_categorie, 0))
		
		save_grid_tag(Thisform._pageframe1.page2.grdUSets)
		
		poSets.ca_baza1.cfiltru = m.lcfiltru
		poSets.ca_baza1.afisare()
		restore_grid_tag(Thisform._pageframe1.page2.grdUSets)
		
		Go Top In crsESets
		
	ENDPROC

	PROCEDURE do_adauga
		If Thisform.lcrm
			Select nom_meniu
			Scatter Name loRec Blank
		
			Do Adauga_Modifica_Inregistrare With "note_crm",loRec,,"INSERT"
			If gnButon = 1
				This.actualizeaza_grid1()
				Select nom_meniu
				Locate For meniu = loRec.meniu
			Endif
			Thisform._pageframe1.page1.gridNote.SetFocus()
			Thisform._pageframe1.page1.gridNote.Refresh
		Endif
	ENDPROC

	PROCEDURE do_adauga_categorie
		Local loCategorie, lnOrdine
		
		SELECT crsECategorii
		SCATTER NAME loCategorie BLANK 
		loCategorie.categorie = "Categorie noua..."
		CALCULATE MAX(ordine) TO loCategorie.ordine IN crsECategorii
		loCategorie.ordine = loCategorie.ordine + 1
		
		Thisform.oCategorie = loCategorie
		Thisform.lEditModeCategorii = .T.  
	ENDPROC

	PROCEDURE do_adauga_ireg
		Local lcTabel
		
		lcTabel = Thisform._pageframe1.page1.gridNote.RecordSource
		Select (lcTabel)
		Scatter Name poNotaIdSet
		
		Select cnote_contab
		Go Bottom
		Scatter Name loUltRec
		Scatter Name loRec Memo Blank
		loRec.ordine = loUltRec.ordine + 1
		loRec.id_set = poNotaIdSet.id_set
		loRec.cu_tva = 1
		loRec.in_valuta = 0
		Store .Null. To loRec.ptva
		
		Release loUltRec
		
		Thisform.creeaza_cursor()
		Do Adauga_Modifica_Inregistrare With "note_contabile2007",loRec,,"INSERT"
		If Used('crscoloane')
			Use In crscoloane
		Endif
		If gnButon = 1
			This.actualizeaza_grid2()
		ENDIF
		
	ENDPROC

	PROCEDURE do_adauga_set
		Local loxSet As "oxSet"
		Local llSucces, lnIdSet
		
		loxSet = Createobject("oxSet") && ocont2003.prg
		llSucces = loxSet.Edit()
		lnIdSet = loxSet.nIdSet
		
		If m.llSucces
			This.RefreshData('SET', m.lnIdSet)
		Endif
	ENDPROC

	PROCEDURE do_copie_set
		Local lcSql, llSucces
		Private pnIdSet, pnIdSetNou
		pnIdSet = This.oSet.id_set
		pnIdSetNou = 0
		
		lcSql = [begin pack_seturi.copie_set(?pnIdSet, ?@pnIdSetNou, ?gnIdUtil); end;]
		llSucces = goExecutor.oExecuta(m.lcSql)
		If m.llSucces
			This.do_Actualizeaza_gridset()
		Endif
	ENDPROC

	PROCEDURE do_editeaza_set
		IF !PEMSTATUS(this.oSet, "lEditare", 5)
			ADDPROPERTY(this.oset, "lEditare", .T.)
		
		this.oSet.lEditare = .T.	
		
		ENDIF 
		
		DO note_fara_predefinire WITH This.oSet.id_set, This.oSet IN ocont2003.prg
		This.RefreshData('NOTE')
		
		
		
	ENDPROC

	PROCEDURE do_modifica
		If Reccount('nom_meniu')>0
			Select nom_meniu
			Scatter Name loRec
		
			Do Adauga_Modifica_Inregistrare With "note_crm",loRec,loRec.id_nota,"UPDATE"
			If gnButon = 1
				This.actualizeaza_grid1()
				Select nom_meniu
				Locate For id_nota = loRec.id_nota
			Endif
			Thisform._pageframe1.page1.gridNote.SetFocus()
		Else
			amessagebox("Nu sunt inregistrari de modificat!",0+48,"Atentie")
		Endif
		
	ENDPROC

	PROCEDURE do_modifica_categorie
		*** nu se modifica categoria virtuala FARA CATEGORIE
		IF NVL(This.oCategorie.id_categorie, 0) = 0
			RETURN
		ENDIF 
		Thisform.lEditModeCategorii = .T. 
	ENDPROC

	PROCEDURE do_modifica_ireg
		If Reccount('cnote_contab')>0
			Select cnote_contab
			Scatter Name loRec
		
			Thisform.creeaza_cursor()
			Do Adauga_Modifica_Inregistrare With "note_contabile2007",loRec,loRec.Id_note,"UPDATE"
			If Used('crscoloane')
				Use In crscoloane
			Endif
			If gnButon = 1
				Thisform.actualizeaza_grid2()
			Endif
		Else
			amessagebox("Nu sunt inregistrari de modificat!",0+48,"Atentie")
		Endif
		
	ENDPROC

	PROCEDURE do_modifica_set
		*!*	Thisform.lEditModeSeturi = .T. 
		Local loxSet As "oxSet"
		Local lcSql, llSucces, lnIdSet, loSet
		
		loSet = This.oSet
		lnIdSet = m.loSet.id_set
		
		SET STEP ON 
		loxSet = Createobject("oxSet", m.lnIdSet) && ocont2003.prg
		llSucces = loxSet.Edit()
		
		If m.llSucces
			IF loxSet.nIdSet = m.lnIdSet
				This.RefreshData('SET', m.lnIdSet)
			ELSE
				This.RefreshData('CATEGORIE', loxSet.nIdSet)
			ENDIF 	
		Endif
	ENDPROC

	PROCEDURE do_reface
		*!*	If aMESSAGEBOX("Aceasta operatie va sterge configuratia actuala a notelor contabile!" + ;
		*!*			CHR(13) + Chr(10) + "Doriti sa continuati?",4+32,"Refacere") = 6
		
		*!*		lcComanda1 = [delete from ] + gcS + [.note_contabile]
		*!*		lnSucces1 = goExecutor.oExecute(lcComanda1)
		*!*		If lnSucces1 < 0
		*!*			aMESSAGEBOX('Delete from note_contabile:'+goExecutor.cEroare,0+16,'Eroare')
		*!*			Return
		*!*		Endif
		
		*!*		lcComanda2 = [insert into ] + gcS + [.note_contabile (explicatie,scd,ascd,scc,ascc,in_valuta,cu_tva,id_set,ordine,ptva)  (select explicatie,scd,ascd,scc,ascc,in_valuta,cu_tva,id_set,ordine,ptva from note_contabile)]
		*!*		lnSucces2 = goExecutor.oExecute(lcComanda2)
		*!*		If lnSucces2 < 0
		*!*			aMESSAGEBOX('Insert into note_contabile:' + goExecutor.cEroare,0+16,'Eroare')
		*!*			Return
		*!*		Endif
		
		*!*		Select ctva
		*!*		Locate For 'STANDARD' $ Upper(TVA)
		*!*		If Found()
		*!*			lnProcent = ptva
		*!*			lcComanda2 = [UPDATE ] + gcS + [.note_contabile set ptva = ?lnProcent]
		*!*			lnSucces2 = goExecutor.oExecute(lcComanda2)
		*!*			If lnSucces2 < 0
		*!*				aMESSAGEBOX('Update note_contabile:'+goExecutor.cEroare,0+16,'Eroare')
		*!*			Endif
		*!*		Endif
		
		*!*		lctitlu = [Refacere]
		*!*		lcimagine = [info_c.ico]
		*!*		lctip = [Informare]
		*!*		lcmesaj1 = [Actualizarea s-a terminat!]
		
		*!*		ofrm_mesaj = Createobject([frm_mesaj],lctitlu,lcimagine,lctip,lcmesaj1)
		*!*		ofrm_mesaj.Show(1)
		*!*		Release ofrm_mesaj
		*!*	*DO mesaj WITH 'Actualizarea s-a terminat!',''
		
		*!*		This.actualizeaza_grid2
		*!*	Endif
	ENDPROC

	PROCEDURE do_sterge
		If Reccount('nom_meniu')>0
			Select nom_meniu
			Scatter Name loRec
			Do STERGE_INREGISTRARE With "note_crm",loRec.id_nota
			This.actualizeaza_grid1()
		Else
			amessagebox("Nu sunt inregistrari de sters!",0+48,"Atentie")
		Endif
	ENDPROC

	PROCEDURE do_sterge_categorie
		PRIVATE pnIdCategorie
		Local lcCategorie, llCategorieUtilizata, lnCategorieId, lnRaspuns, lcSelect
		lcSelect = SELECT()
		pnIdCategorie = This.oCategorie.id_categorie
		lcCategorie = ALLTRIM(This.oCategorie.categorie)
		lnRaspuns = 6
		
		SELECT COUNT(*) as nr FROM crsESets WHERE id_categorie = m.pnIdCategorie INTO CURSOR crsESetsTemp
		llCategorieUtilizata = (NVL(crsESetsTemp.nr, 0) > 0)
		USE IN (SELECT("crsESetsTemp"))
		IF m.llCategorieUtilizata
			lnRaspuns = AMESSAGEBOX("Categoria " + m.lcCategorie + " are asociate seturi." + CHR(13) + CHR(10) + ;
				"Doriti sa o stergeti?",4+32, _screen.Caption)
		ELSE
			lnRaspuns = AMESSAGEBOX("Doriti sa stergeti categoria " + m.lcCategorie + "?",4+32, _screen.Caption)
		ENDIF 		
		IF m.lnRaspuns = 6
			lcSql = [begin pack_seturi.sterge_categorie(?pnIdCategorie, ?gnIdUtil); end;]
			llSucces = goExecutor.oExecuta(m.lcSql)
			IF m.llSucces 
				SELECT crsECategorii
				DELETE
				LOCATE && nu se facea refresh la inregistrarile sterse
				
				save_grid_tag(thisform._pageframe1.page2.grdUSets)
				poSets.ca_baza1.afisare() 
				restore_grid_tag(thisform._pageframe1.page2.grdUSets)
				
				This._pageframe1.page2.grdUCategorii.SetFocus()				
			ENDIF 	
		ENDIF 
		
		SELECT (m.lcSelect)
	ENDPROC

	PROCEDURE do_sterge_ireg
		If Reccount('cnote_contab')>0
			Select cnote_contab
			Scatter Name lorec
		
			Do STERGE_INREGISTRARE With "note_contabile2007",lorec.id_note
			If gnButon = 1
				This.actualizeaza_grid2()
			Endif
		Else
			amessagebox("Nu sunt inregistrari de sters!",0+48,"Atentie")
		Endif
		
	ENDPROC

	PROCEDURE do_sterge_set
		Local lcSelect, lcSet, lnRaspuns
		Local lcSql, llSucces, lnIdSet
		
		lcSelect = Select()
		lnIdSet = This.oSet.id_set
		lcSet = Alltrim(This.oSet.nume_set)
		lnRaspuns = 6
		
		lnRaspuns = AMESSAGEBOX([Doriti sa stergeti setul de note "] + m.lcSet + ["?], 4 + 32, _Screen.Caption)
		
		If m.lnRaspuns = 6
			loxSet = Createobject("oxSet", m.lnIdSet, .T.) && ocont2003.prg
			llSucces = loxSet.Delete()
		
			If m.llSucces
				This.RefreshData('SET', m.lnIdSet)
			Endif
		
		Endif
		
		
		Select (m.lcSelect)
	ENDPROC

	PROCEDURE Init
		Parameters tlCRM
		DoDefault()
		
		Thisform.lCRM = tlCRM
		Thisform.lactiv3 = Thisform.lCRM
		Thisform.lactiv4 = Thisform.lCRM
		Thisform._pageframe1.page2.Enabled = !Thisform.lCRM
		Thisform._pageframe1.page1.but_nou1.Visible = Thisform.lCRM
		Thisform._pageframe1.page1.but_modifica1.Visible = Thisform.lCRM
		Thisform._pageframe1.page1.but_sterge1.Visible = Thisform.lCRM
		
		Thisform._pageframe1.page1.gridNote.SetFocus()
		
		
		This.RefreshData()
		With This._pageframe1.page2
			.txtCategorie.ControlSource = "Thisform.oCategorie.categorie"
			.spnOrdine.ControlSource = "Thisform.oCategorie.ordine"
		
		
			.grdUCategorii.SetFocus()
		ENDWITH
		
		this.WindowState = 2 
	ENDPROC

	PROCEDURE leditmodecategorii_assign
		lparameters tlEditModeCategorii
		This.lEditModeCategorii = tlEditModeCategorii
		WITH This._pageframe1.page2
			.txtCategorie.ReadOnly = !m.tlEditModeCategorii
			.spnOrdine.ReadOnly = !m.tlEditModeCategorii	
			.grdUCategorii.enabled = !m.tlEditModeCategorii
			.but_nou1.Visible = !m.tlEditModeCategorii
			.but_modifica1.Visible = !m.tlEditModeCategorii	
			.but_sterge1.Visible = !m.tlEditModeCategorii		
			.but_salveaza1.Visible = m.tlEditModeCategorii	
			.but_renunt3.Visible = m.tlEditModeCategorii		
			IF m.tlEditModeCategorii	
				.spnOrdine.Refresh()
				.txtCategorie.SetFocus()
			ELSE
				.grdUCategorii.SetFocus()
			ENDIF 	
			.grdUCategorii.Refresh()
		ENDWITH
		
	ENDPROC

	PROCEDURE leditmodeseturi_assign
		lparameters tlEditModeSeturi
		This.lEditModeSeturi = tlEditModeSeturi
		WITH This._pageframe1.page2
			.grdUsets.enabled = !m.tlEditModeSeturi
			.but_nou2.Visible = !m.tlEditModeSeturi
			.but_copiaza2.Visible = !m.tlEditModeSeturi	
			.but_modifica2.Visible = !m.tlEditModeSeturi	
			.but_sterge2.Visible = !m.tlEditModeSeturi		
			.but_editeazaset.Visible = !m.tlEditModeSeturi			
			.but_salveaza2.Visible = m.tlEditModeSeturi	
			.but_renunt2.Visible = m.tlEditModeSeturi			
			IF m.tlEditModeSeturi	
				.txtSet.SetFocus()
			ELSE
				.grdUsets.SetFocus()	
			ENDIF 	
			.grdUsets.Refresh()
		ENDWITH
	ENDPROC

	PROCEDURE refacere_tabel
	ENDPROC

	PROCEDURE refreshdata
		Lparameters tcTip, tnIdTip
		*** tcTip: CATEGORIE/SET
		*** tnIdTip: ID_CATEGORIE/ID_SET
		
		Local loCategorie, lcFilter
		lcSelect = Select()
		loPage2 = this._pageframe1.page2
		lcTip = IIF(TYPE('tcTip') = 'C', UPPER(ALLTRIM(m.tcTip)), 'CATEGORIE')
		
		Do Case
			Case m.lcTip = 'SET'
				llCategorie = .F.
				llSet = .T.
				llNote = .T.
			Case m.lcTip = 'CATEGORIE'
				llCategorie = .T.
				llSet = .T.
				llNote = .T.
			Otherwise && NOTE
				llCategorie = .F.
				llSet = .F.
				llNote = .T.
		ENDCASE
		
		If m.llCategorie
			Thisform.do_actualizeaza_gridcategorii()
		
			Select crsECategorii
			If Type('tnIdTip') = 'N'
				Locate For id_categorie = m.tnIdTip
				If !Found()
					Go Top
				Endif
			Else
				Go Top
			Endif
		ENDIF 
		
		Select crsECategorii
		Scatter Name Thisform.oCategorie
		lcCategorie = ALLTRIM(NVL(categorie, ''))
		
		*loPage2.lblSets.Caption = 'Seturi ' + m.lcCategorie
		loPage2.txtCategorie.Refresh()
		loPage2.spnOrdine.Refresh()
		
		
		If m.llSet
			Thisform.do_actualizeaza_gridset()
		
			Select crsESets
			If Type('tnIdTip') = 'N'
				Locate For id_SET = m.tnIdTip
				If !Found()
					Go Top
				Endif
			Else
				Go Top
			ENDIF
		
			Select crsESets
			Scatter Name Thisform.oSet	
			
			Thisform.do_actualizeaza_gridrequest()
		ENDIF
		
		Select crsESets
		Scatter Name Thisform.oSet
		lcSet = ALLTRIM(NVL(nume_set, ''))
		*loPage2.lblNote.Caption = 'Note ' + m.lcSet
		*loPage2.lblRequest.Caption = 'Cerere date ' + m.lcSet 
		
		If m.llNote
			Thisform.do_actualizeaza_gridnote()
			Thisform.do_actualizeaza_gridrequest()
		ENDIF 
		
		Select (m.lcSelect)
		
	ENDPROC

	PROCEDURE _pageframe1.Page1.gridInregistrari.Init
		DoDefault()
		This.SetAll("ReadOnly",.T.,"Column")
	ENDPROC

	PROCEDURE _pageframe1.Page1.gridNote.AfterRowColChange
		Lparameters nColIndex
		If This.RowColChange <> 3
			Select nom_meniu
			lcFiltru = [ id_set = ] + Alltrim(Str(Nvl(id_set,0)))
			Thisform.actualizeaza_grid2(lcFiltru)
		Endif
		
	ENDPROC

	PROCEDURE _pageframe1.Page1.gridNote.Init
		This.SetAll("ReadOnly",.T.,"Column")
	ENDPROC

	PROCEDURE _pageframe1.Page2.But_renunt3.Click
		Thisform.lEditModeCategorii = .F.
	ENDPROC

	PROCEDURE _pageframe1.Page2.But_salveaza1.Click
		PRIVATE pcCategorie, pnOrdine, pnIdCategorie
		Local lcSelect, lcSql, llSucces, loCategorie
		
		lcSelect = SELECT()
		loCategorie = Thisform.oCategorie
		
		pcCategorie = ALLTRIM(Thisform.oCategorie.categorie)
		pnOrdine = Thisform.oCategorie.ordine
		pnIdCategorie = Thisform.oCategorie.id_categorie
		
		lcSql = [begin pack_seturi.modifica_categorie(?@pnIdCategorie, ?pcCategorie, ?pnOrdine, ?gnIdUtil); end;]
		llSucces = goExecutor.oExecuta(m.lcSql)
			
		SELECT (m.lcSelect)
		IF m.llSucces
			Thisform.RefreshData('CATEGORIE', m.pnIdCategorie)
			Thisform.lEditModeCategorii = .F.
		ENDIF 
			   
	ENDPROC

	PROCEDURE _pageframe1.Page2.grdUCategorii.AfterRowColChange
		LPARAMETERS nColIndex
		IF INLIST(This.RowColChange, 1, 3)
			Thisform.RefreshData('SET')
		ENDIF 	
	ENDPROC

	PROCEDURE _pageframe1.Page2.grdUSets.AfterRowColChange
		LPARAMETERS nColIndex
		
		IF INLIST(This.RowColChange, 1, 3)
			Thisform.RefreshData('NOTE')
		ENDIF
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_note_contabile2007_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="Shape4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lbl_text2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txt_explicatie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txt_scd" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txt_scc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chk_cu_tva" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cbo_ptva" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txt_ascc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txt_ascd" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_note_contabile20071" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ct_clb_cautare_var1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ct_clb_cautare_var2" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: cont_are_partener
		*m: do_alege_partener
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		DataSession = 1
		DoCreate = .T.
		Height = 282
		Name = "frm_note_contabile2007_nou"
		Width = 345
		_shape1.Name = "_shape1"
		_shape1.ZOrderSet = 4
		_shape2.Height = 29
		_shape2.Left = 284
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 62
		_shape2.ZOrderSet = 5
		Lb_titlu_alb_b121.Caption = "Note contabile"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 15
		Lb_titlu_alb_b121.ZOrderSet = 6
		BUT_TERMIN1.Left = 315
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 11
		BUT_TERMIN1.Top = 1
		BUT_TERMIN1.ZOrderSet = 12
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Se înregistreazã suma în valutã", ;
		ControlSource = "porec.in_valuta", ;
		Left = 18, ;
		Name = "_checkbox1", ;
		TabIndex = 10, ;
		Top = 246, ;
		ZOrderSet = 15
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_lbbase1' AS _lbbase WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 0, ;
		Caption = "Cont debitor:", ;
		FontName = "Arial", ;
		FontSize = 9, ;
		Height = 18, ;
		Left = 15, ;
		Name = "_lbbase1", ;
		TabIndex = 17, ;
		Top = 77, ;
		Width = 80, ;
		ZOrderSet = 8
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase3' AS _lbbase WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 0, ;
		Caption = "Cont creditor:", ;
		FontName = "Arial", ;
		FontSize = 9, ;
		Height = 18, ;
		Left = 16, ;
		Name = "_lbbase3", ;
		TabIndex = 19, ;
		Top = 109, ;
		Width = 80, ;
		ZOrderSet = 9
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase4' AS _lbbase WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 0, ;
		Caption = "Explicaþie TVA", ;
		FontName = "Arial", ;
		FontSize = 9, ;
		Height = 18, ;
		Left = 84, ;
		Name = "_lbbase4", ;
		TabIndex = 13, ;
		Top = 216, ;
		Width = 86, ;
		ZOrderSet = 8
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase5' AS _lbbase WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 0, ;
		Caption = "Analitic cred.:", ;
		FontName = "Arial", ;
		FontSize = 9, ;
		Height = 18, ;
		Left = 177, ;
		Name = "_lbbase5", ;
		TabIndex = 18, ;
		Top = 109, ;
		Width = 86, ;
		ZOrderSet = 9
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase6' AS _lbbase WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 0, ;
		Caption = "Analitic deb.:", ;
		FontName = "Arial", ;
		FontSize = 9, ;
		Height = 18, ;
		Left = 177, ;
		Name = "_lbbase6", ;
		TabIndex = 20, ;
		Top = 79, ;
		Width = 80, ;
		ZOrderSet = 9
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

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

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

	ADD OBJECT 'cbo_ptva' AS _combobox WITH ;
		BoundColumn = 1, ;
		BoundTo = .T., ;
		ColumnCount = 2, ;
		ColumnLines = .F., ;
		ColumnWidths = "300,20,0", ;
		ControlSource = "porec.explicatie_tva", ;
		Height = 23, ;
		Left = 173, ;
		Name = "cbo_ptva", ;
		RowSource = "crscoloane.explicatie_tva,cota_tva,id_jtva_coloana", ;
		RowSourceType = 2, ;
		TabIndex = 9, ;
		Top = 213, ;
		Width = 157, ;
		ZOrderSet = 16
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'chk_cu_tva' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Cu TVA", ;
		ControlSource = "porec.cu_tva", ;
		Left = 18, ;
		Name = "chk_cu_tva", ;
		TabIndex = 8, ;
		Top = 215, ;
		ZOrderSet = 15
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ct_clb_cautare_var1' AS ct_clb_cautare_var WITH ;
		cconditie = 1=2, ;
		cprocedura = thisform.do_alege_partener(1), ;
		cvar_afisata = porec.partd, ;
		Height = 31, ;
		Left = 11, ;
		Name = "Ct_clb_cautare_var1", ;
		TabIndex = 6, ;
		Top = 142, ;
		Width = 327, ;
		shape_cautare.Height = 29, ;
		shape_cautare.Left = 1, ;
		shape_cautare.Name = "shape_cautare", ;
		shape_cautare.Top = 1, ;
		shape_cautare.Width = 283, ;
		img_cautare.Left = 301, ;
		img_cautare.Name = "img_cautare", ;
		img_cautare.Top = 5, ;
		lb_cautare.Caption = "Partener debit", ;
		lb_cautare.Name = "lb_cautare", ;
		tx_cautare.Left = 95, ;
		tx_cautare.Name = "tx_cautare", ;
		tx_cautare.Top = 4
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="container" />

	ADD OBJECT 'Ct_clb_cautare_var2' AS ct_clb_cautare_var WITH ;
		cconditie = 1=2, ;
		cprocedura = thisform.do_alege_partener(2), ;
		cvar_afisata = porec.partc, ;
		Height = 31, ;
		Left = 11, ;
		Name = "Ct_clb_cautare_var2", ;
		TabIndex = 7, ;
		Top = 170, ;
		Width = 327, ;
		shape_cautare.Height = 29, ;
		shape_cautare.Left = 1, ;
		shape_cautare.Name = "shape_cautare", ;
		shape_cautare.Top = 1, ;
		shape_cautare.Width = 283, ;
		img_cautare.Left = 301, ;
		img_cautare.Name = "img_cautare", ;
		img_cautare.Top = 5, ;
		lb_cautare.Caption = "Partener credit", ;
		lb_cautare.Name = "lb_cautare", ;
		tx_cautare.Left = 95, ;
		tx_cautare.Name = "tx_cautare", ;
		tx_cautare.Top = 4
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_note_contabile20071' AS cus_odata_note_contabile2007 WITH ;
		Left = 36, ;
		Name = "Cus_odata_note_contabile20071", ;
		Top = 24
		*< END OBJECT: ClassLib="onote_contabile.vcx" BaseClass="custom" />

	ADD OBJECT 'lbl_text2' AS _lbbase WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 0, ;
		Caption = "Explicaþie:", ;
		FontName = "Arial", ;
		FontSize = 9, ;
		Height = 18, ;
		Left = 14, ;
		Name = "lbl_text2", ;
		TabIndex = 16, ;
		Top = 50, ;
		Width = 80, ;
		ZOrderSet = 7
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT 'Shape1' AS shape WITH ;
		BackStyle = 0, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 1, ;
		Height = 31, ;
		Left = 11, ;
		Name = "Shape1", ;
		Top = 42, ;
		Width = 323, ;
		ZOrderSet = 1
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape2' AS shape WITH ;
		BackStyle = 0, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 1, ;
		Height = 31, ;
		Left = 11, ;
		Name = "Shape2", ;
		Top = 72, ;
		Width = 162, ;
		ZOrderSet = 2
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape3' AS shape WITH ;
		BackStyle = 0, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 1, ;
		Height = 31, ;
		Left = 11, ;
		Name = "Shape3", ;
		Top = 102, ;
		Width = 162, ;
		ZOrderSet = 3
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape4' AS shape WITH ;
		BackStyle = 0, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 1, ;
		BorderWidth = 1, ;
		Height = 63, ;
		Left = 11, ;
		Name = "Shape4", ;
		Top = 209, ;
		Width = 323, ;
		ZOrderSet = 0
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape5' AS shape WITH ;
		BackStyle = 0, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 1, ;
		Height = 31, ;
		Left = 172, ;
		Name = "Shape5", ;
		Top = 102, ;
		Width = 162, ;
		ZOrderSet = 3
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape6' AS shape WITH ;
		BackStyle = 0, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 1, ;
		Height = 31, ;
		Left = 172, ;
		Name = "Shape6", ;
		Top = 72, ;
		Width = 162, ;
		ZOrderSet = 3
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'txt_ascc' AS textbox WITH ;
		ControlSource = "porec.ascc", ;
		FontSize = 9, ;
		Format = "k!", ;
		Height = 23, ;
		Left = 260, ;
		Name = "txt_ascc", ;
		TabIndex = 5, ;
		Top = 106, ;
		Width = 70, ;
		ZOrderSet = 13
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'txt_ascd' AS textbox WITH ;
		ControlSource = "porec.ascd", ;
		FontSize = 9, ;
		Format = "k!", ;
		Height = 23, ;
		Left = 260, ;
		Name = "txt_ascd", ;
		TabIndex = 3, ;
		Top = 76, ;
		Width = 70, ;
		ZOrderSet = 13
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'txt_explicatie' AS textbox WITH ;
		Comment = "", ;
		ControlSource = "porec.explicatie", ;
		FontSize = 9, ;
		Format = "k!", ;
		Height = 23, ;
		Left = 97, ;
		Name = "txt_explicatie", ;
		TabIndex = 1, ;
		Top = 46, ;
		Width = 234, ;
		ZOrderSet = 10
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'txt_scc' AS textbox WITH ;
		ControlSource = "porec.scc", ;
		FontSize = 9, ;
		Format = "k!", ;
		Height = 23, ;
		Left = 99, ;
		Name = "txt_scc", ;
		TabIndex = 4, ;
		Top = 106, ;
		Width = 70, ;
		ZOrderSet = 13
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'txt_scd' AS textbox WITH ;
		ControlSource = "porec.scd", ;
		FontSize = 9, ;
		Format = "k!", ;
		Height = 23, ;
		Left = 98, ;
		Name = "txt_scd", ;
		TabIndex = 2, ;
		Top = 76, ;
		Width = 70, ;
		ZOrderSet = 11
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE cont_are_partener
		LPARAMETERS tcCont
		*!* verific daca contul are partener
		LOCAL lnCount
		PRIVATE pcCont
		
		
		lnCount = 0
		pcCont = ALLTRIM(NVL(tcCont,''))
		
		lcSql = [select COUNT(*) from config_cont_ireg where cont = ?pcCont]
		lnSucces = goExecutor.oSelect2Value(lcSql,@lnCount)
		
		RETURN lnCount > 0
		
		
	ENDPROC

	PROCEDURE do_alege_partener
		LPARAMETERS tnTip
		* tnTip: 1=partener debit; 2=partener credit
		LOCAL lcCont, loHash, loPartener
		lcCont = ""
		
		IF EMPTY(tnTip)
			tnTip = 1
		ENDIF
		IF tnTip = 1
			lcCont = poRec.scd
		ELSE
			lcCont = poRec.scc
		ENDIF 	
		
		loHash = GetHash()
		WITH loHash
			.SetValue("cTitlu", "Alegeþi partenerul")
			.SetValue("cCont", lcCont)	
			.SetValue("lVerificaANAF", .T.)	&& 26.07.2026 claude - verificare ANAF la alegerea partenerului
		ENDWITH
		loPartener = CautPartenerContabilitate(loHash)
		
		IF !EMPTY(loPartener.id_part)
			IF tnTip = 1
				poRec.partD = loPartener.nume
				poRec.id_partd = loPartener.id_part
			ELSE
				poRec.partC = loPartener.nume
				poRec.id_partc = loPartener.id_part	
			ENDIF 
			
		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
		
		lctip = [Avertizare]
		lcimagine = [exclam.ico]
		
		If Empty(porec.scd)	AND !INLIST(LEFT(NVL(porec.scc,''),1), '8', '9')
			amessagebox("Nu ati completat contul debitor!",0+48,"Atentie")
			This.txt_scd.SetFocus()
			Return .F.
		Endif
		
		If !Empty(porec.scd)
			Select cplcont
			Locate For Alltrim(Cont) = Alltrim(porec.scd)
			If !Found()
				amessagebox("Contul debitor completat nu exista in planul de conturi!",0+48,"Atentie")
				This.txt_scd.SetFocus()
				Return .F.
			Endif
		Endif
		
		If !Empty(porec.ascd) And !Isnull(porec.ascd)
			Select cplcont
			Locate For Alltrim(Cont) = Alltrim(porec.scd) And Alltrim(ACONT) = Alltrim(porec.ascd)
			If !Found()
				amessagebox("Contul analitic debitor completat nu exista in planul de conturi!",0+48,"Atentie")
				This.txt_ascd.SetFocus()
				Return .F.
			Endif
		Endif
		
		If Empty(porec.scc)	AND !INLIST(LEFT(NVL(porec.scd,''),1), '8', '9')
			amessagebox("Nu ati completat contul creditor!",0+48,"Atentie")
			This.txt_scc.SetFocus()
			Return .F.
		Endif
		
		If !Empty(porec.scc)
			Select cplcont
			Locate For Alltrim(Cont) = Alltrim(porec.scc)
			If !Found()
				amessagebox("Contul creditor completat nu exista in planul de conturi!",0+48,"Atentie")
				This.txt_scc.SetFocus()
				Return .F.
			Endif
		Endif
		
		
		
		If !Empty(porec.ascc) And !Isnull(porec.ascc)
			Select cplcont
			Locate For Alltrim(Cont) = Alltrim(porec.scc) And Alltrim(ACONT) = Alltrim(porec.ascc)
			If !Found()
				amessagebox("Contul analitic creditor completat nu exista in planul de conturi!",0+48,"Atentie")
				This.txt_ascc.SetFocus()
				Return .F.
			Endif
		Endif
		
		If porec.cu_tva = 1 And Isnull(porec.id_jtva_coloana) And Isnull(porec.ptva)
			amessagebox("Nu ati completat explicatia TVA!",0+48,"Atentie")
			Release ofrm_mesaj
		Endif
		 
		Return This.cus_odata_note_contabile20071.salvare(This.OREC,This.NID)
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		DoDefault()
		
		Do Case
		Case Upper(Alltrim(tcActiune)) = [INSERT]
			This.lb_titlu_alb_b121.Caption = [Notã contabilã - Adãugare]
		Case Upper(Alltrim(tcActiune)) = [UPDATE]
			This.lb_titlu_alb_b121.Caption = [Notã contabilã - Modificare]
		Endcase
		
		If This.chk_cu_tva.Value = 0
			This.cbo_ptva.Enabled = .F.
			poRec.id_jtva_coloana = Null
			poRec.ptva = 0
		Else
			This.cbo_ptva.Enabled = .T.
		Endif
		
		This.orec= toRec
		This.nid = tnId
		This.cus_odata_note_contabile20071.cactiune = tcActiune
	ENDPROC

	PROCEDURE cbo_ptva.InteractiveChange
		SELECT crscoloane
		poRec.ptva = cota_tva
		poRec.id_jtva_coloana = id_jtva_coloana
	ENDPROC

	PROCEDURE chk_cu_tva.Valid
		If This.Value = 0
			Store .Null. To porec.ptva
			Thisform.cbo_ptva.Enabled = .F.
			Thisform.cbo_ptva.Refresh
			porec.id_jtva_coloana = Null
			porec.ptva = 0
		Else
			Thisform.cbo_ptva.Enabled = .T.
		Endif
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_note_contabile_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="Shape4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lbl_text2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txt_explicatie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txt_ascd" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txt_scd" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txt_ascc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txt_scc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chk_cu_tva" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cbo_ptva" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_note_contabile1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt2" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		DataSession = 1
		Desktop = .T.
		DoCreate = .T.
		Height = 215
		Name = "frm_note_contabile_nou"
		Width = 345
		_shape1.Name = "_shape1"
		_shape1.ZOrderSet = 4
		_shape2.Height = 29
		_shape2.Left = 284
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 62
		_shape2.ZOrderSet = 5
		Lb_titlu_alb_b121.Caption = "Note contabile"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 11
		Lb_titlu_alb_b121.ZOrderSet = 6
		BUT_TERMIN1.Left = 315
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 9
		BUT_TERMIN1.Top = 1
		BUT_TERMIN1.ZOrderSet = 12
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Se înregistreazã suma în valutã", ;
		ControlSource = "porec.in_valuta", ;
		Left = 18, ;
		Name = "_checkbox1", ;
		TabIndex = 8, ;
		Top = 177, ;
		ZOrderSet = 15
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_lbbase1' AS _lbbase WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 0, ;
		Caption = "Cont debitor:", ;
		FontName = "Arial", ;
		FontSize = 9, ;
		Height = 18, ;
		Left = 15, ;
		Name = "_lbbase1", ;
		TabIndex = 13, ;
		Top = 77, ;
		Width = 80, ;
		ZOrderSet = 8
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase3' AS _lbbase WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 0, ;
		Caption = "Cont creditor:", ;
		FontName = "Arial", ;
		FontSize = 9, ;
		Height = 18, ;
		Left = 16, ;
		Name = "_lbbase3", ;
		TabIndex = 15, ;
		Top = 109, ;
		Width = 80, ;
		ZOrderSet = 9
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase4' AS _lbbase WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 0, ;
		Caption = "Procent TVA:", ;
		FontName = "Arial", ;
		FontSize = 9, ;
		Height = 18, ;
		Left = 97, ;
		Name = "_lbbase4", ;
		TabIndex = 17, ;
		Top = 147, ;
		Width = 74, ;
		ZOrderSet = 8
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase5' AS _lbbase WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 0, ;
		Caption = "Analitic cred.:", ;
		FontName = "Arial", ;
		FontSize = 9, ;
		Height = 18, ;
		Left = 177, ;
		Name = "_lbbase5", ;
		TabIndex = 14, ;
		Top = 109, ;
		Width = 86, ;
		ZOrderSet = 9
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase6' AS _lbbase WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 0, ;
		Caption = "Analitic deb.:", ;
		FontName = "Arial", ;
		FontSize = 9, ;
		Height = 18, ;
		Left = 177, ;
		Name = "_lbbase6", ;
		TabIndex = 16, ;
		Top = 79, ;
		Width = 80, ;
		ZOrderSet = 9
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

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

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

	ADD OBJECT 'cbo_ptva' AS _combobox WITH ;
		BoundColumn = 2, ;
		BoundTo = .T., ;
		ColumnCount = 2, ;
		ColumnLines = .F., ;
		ColumnWidths = "150,20", ;
		ControlSource = "porec.ptva", ;
		Height = 23, ;
		Left = 173, ;
		Name = "cbo_ptva", ;
		RowSource = "ctva.tva,ptva", ;
		RowSourceType = 2, ;
		TabIndex = 7, ;
		Top = 144, ;
		Width = 157, ;
		ZOrderSet = 16
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'chk_cu_tva' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Cu TVA", ;
		ControlSource = "porec.cu_tva", ;
		Left = 18, ;
		Name = "chk_cu_tva", ;
		TabIndex = 6, ;
		Top = 146, ;
		ZOrderSet = 15
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Cus_odata_note_contabile1' AS cus_odata_note_contabile WITH ;
		Left = 300, ;
		Name = "Cus_odata_note_contabile1", ;
		Top = 170
		*< END OBJECT: ClassLib="onote_contabile.vcx" BaseClass="custom" />

	ADD OBJECT 'lbl_text2' AS _lbbase WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 0, ;
		Caption = "Explicaþie:", ;
		FontName = "Arial", ;
		FontSize = 9, ;
		Height = 18, ;
		Left = 14, ;
		Name = "lbl_text2", ;
		TabIndex = 12, ;
		Top = 50, ;
		Width = 80, ;
		ZOrderSet = 7
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT 'Shape1' AS shape WITH ;
		BackStyle = 0, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 1, ;
		Height = 31, ;
		Left = 11, ;
		Name = "Shape1", ;
		Top = 42, ;
		Width = 323, ;
		ZOrderSet = 1
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape2' AS shape WITH ;
		BackStyle = 0, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 1, ;
		Height = 31, ;
		Left = 11, ;
		Name = "Shape2", ;
		Top = 72, ;
		Width = 162, ;
		ZOrderSet = 2
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape3' AS shape WITH ;
		BackStyle = 0, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 1, ;
		Height = 31, ;
		Left = 11, ;
		Name = "Shape3", ;
		Top = 102, ;
		Width = 162, ;
		ZOrderSet = 3
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape4' AS shape WITH ;
		BackStyle = 0, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 1, ;
		BorderWidth = 1, ;
		Height = 63, ;
		Left = 11, ;
		Name = "Shape4", ;
		Top = 140, ;
		Width = 323, ;
		ZOrderSet = 0
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape5' AS shape WITH ;
		BackStyle = 0, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 1, ;
		Height = 31, ;
		Left = 172, ;
		Name = "Shape5", ;
		Top = 102, ;
		Width = 162, ;
		ZOrderSet = 3
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape6' AS shape WITH ;
		BackStyle = 0, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 1, ;
		Height = 31, ;
		Left = 172, ;
		Name = "Shape6", ;
		Top = 72, ;
		Width = 162, ;
		ZOrderSet = 3
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'txt_ascc' AS textbox WITH ;
		ControlSource = "porec.ascc", ;
		FontSize = 9, ;
		Format = "k!", ;
		Height = 23, ;
		Left = 260, ;
		Name = "txt_ascc", ;
		TabIndex = 5, ;
		Top = 106, ;
		Width = 70, ;
		ZOrderSet = 13
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'txt_ascd' AS textbox WITH ;
		ControlSource = "porec.ascd", ;
		FontSize = 9, ;
		Format = "k!", ;
		Height = 23, ;
		Left = 260, ;
		Name = "txt_ascd", ;
		TabIndex = 3, ;
		Top = 76, ;
		Width = 70, ;
		ZOrderSet = 13
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'txt_explicatie' AS textbox WITH ;
		Comment = "", ;
		ControlSource = "porec.explicatie", ;
		FontSize = 9, ;
		Format = "k!", ;
		Height = 23, ;
		Left = 97, ;
		Name = "txt_explicatie", ;
		TabIndex = 1, ;
		Top = 46, ;
		Width = 234, ;
		ZOrderSet = 10
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'txt_scc' AS textbox WITH ;
		ControlSource = "porec.scc", ;
		FontSize = 9, ;
		Format = "k!", ;
		Height = 23, ;
		Left = 99, ;
		Name = "txt_scc", ;
		TabIndex = 4, ;
		Top = 106, ;
		Width = 70, ;
		ZOrderSet = 13
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'txt_scd' AS textbox WITH ;
		ControlSource = "porec.scd", ;
		FontSize = 9, ;
		Format = "k!", ;
		Height = 23, ;
		Left = 98, ;
		Name = "txt_scd", ;
		TabIndex = 2, ;
		Top = 76, ;
		Width = 70, ;
		ZOrderSet = 11
		*< END OBJECT: BaseClass="textbox" />
	
	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
		
		lctip = [Avertizare]  
		lcimagine = [exclam.ico]
		
		IF EMPTY(porec.scd)	AND !INLIST(LEFT(NVL(porec.scc,''),1), '8', '9')
			lctitlu = [Cont debitor]
			lcmesaj = [Nu ati completat contul debitor!]		
			ofrm_mesaj = CREATEOBJECT('frm_mesaj',lctitlu,lcimagine,lctip,lcmesaj)
			ofrm_mesaj.show(1)
			*MESSAGEBOX('Nu ati completat contul debitor!',0+48,"Atentie")
			THIS.txt_scd.SETFOCUS()
			RELEASE ofrm_mesaj
			RETURN .F.
		ENDIF
		
		IF !EMPTY(porec.scd)
			SELECT cplcont
			LOCATE FOR ALLTRIM(CONT) = ALLTRIM(porec.scd)
			IF !FOUND()	
				lctitlu = [Cont debitor]	
				lcmesaj1 = [Contul debitor completat ]
				lcmesaj2 = [nu exista in planul de conturi!]
				ofrm_mesaj = CREATEOBJECT('frm_mesaj',lctitlu,lcimagine,lctip,lcmesaj1,lcmesaj2)
				ofrm_mesaj.show(1)
				*MESSAGEBOX('Contul debitor completat nu exista in planul de conturi!',0+48,"Atentie")
				THIS.txt_scd.SETFOCUS()
				RELEASE ofrm_mesaj
				RETURN .F.
			ENDIF
		ENDIF
		
		IF !EMPTY(porec.ascd) AND !ISNULL(porec.ascd)
			SELECT cplcont
			LOCATE FOR ALLTRIM(CONT) = ALLTRIM(porec.scd) AND ALLTRIM(ACONT) = ALLTRIM(porec.ascd)
			IF !FOUND()	
				lctitlu = [Analitic debitor]	
				lcmesaj1 = [Contul analitic debitor completat ]
				lcmesaj2 = [nu exista in planul de conturi!]
				ofrm_mesaj = CREATEOBJECT('frm_mesaj',lctitlu,lcimagine,lctip,lcmesaj1,lcmesaj2)
				ofrm_mesaj.show(1)
				*MESSAGEBOX('Contul debitor completat nu exista in planul de conturi!',0+48,"Atentie")
				THIS.txt_ascd.SETFOCUS()
				RELEASE ofrm_mesaj
				RETURN .F.
			ENDIF
		ENDIF
		
		IF EMPTY(porec.scc)	AND !INLIST(LEFT(NVL(porec.scd,''),1), '8', '9')
			lctitlu = [Cont creditor]
			lcmesaj = [Nu ati completat contul creditor!]
			ofrm_mesaj = CREATEOBJECT('frm_mesaj',lctitlu,lcimagine,lctip,lcmesaj)
			ofrm_mesaj.show(1)	
			*MESSAGEBOX('Nu ati completat contul creditor!',0+48,"Atentie")
			THIS.txt_scc.SETFOCUS()
			RELEASE ofrm_mesaj
			RETURN .F.
		ENDIF
		
		IF !EMPTY(porec.scc)
			SELECT cplcont
			LOCATE FOR ALLTRIM(CONT) = ALLTRIM(porec.scc)
			IF !FOUND()
				lctitlu = [Cont creditor]
				lcmesaj1 = [Contul creditor completat ]
				lcmesaj2 = [nu exista in planul de conturi!]
				ofrm_mesaj = CREATEOBJECT('frm_mesaj',lctitlu,lcimagine,lctip,lcmesaj1,lcmesaj2)
				ofrm_mesaj.show(1)		
				*MESSAGEBOX('Contul creditor completat nu exista in planul de conturi!',0+48,"Atentie")
				THIS.txt_scc.SETFOCUS()
				RELEASE ofrm_mesaj
				RETURN .F.
			ENDIF
		ENDIF
		
		
		
		IF !EMPTY(porec.ascc) AND !ISNULL(porec.ascc)
			SELECT cplcont
			LOCATE FOR ALLTRIM(CONT) = ALLTRIM(porec.scc) AND ALLTRIM(ACONT) = ALLTRIM(porec.ascc)
			IF !FOUND()	
				lctitlu = [Analitic creditor]	
				lcmesaj1 = [Contul analitic creditor completat ]
				lcmesaj2 = [nu exista in planul de conturi!]
				ofrm_mesaj = CREATEOBJECT('frm_mesaj',lctitlu,lcimagine,lctip,lcmesaj1,lcmesaj2)
				ofrm_mesaj.show(1)
				*MESSAGEBOX('Contul debitor completat nu exista in planul de conturi!',0+48,"Atentie")
				THIS.txt_ascc.SETFOCUS()
				RELEASE ofrm_mesaj
				RETURN .F.
			ENDIF
		ENDIF
		
		IF porec.cu_tva = 1 AND ISNULL(porec.ptva)
		 	lctitlu = [Procent de TVA]
			lcmesaj = [Nu ati selectat procentul de TVA!]
			ofrm_mesaj = CREATEOBJECT('frm_mesaj',lctitlu,lcimagine,lctip,lcmesaj)
			ofrm_mesaj.show(1)		
			*MESSAGEBOX('Nu ati selectat procentul de TVA!',0+48,"Atentie")
			THIS.cbo_ptva.SETFOCUS()
			RELEASE ofrm_mesaj
			RETURN .F.
		ENDIF
		
		RETURN THIS.cus_odata_note_contabile1.salvare(THIS.OREC,THIS.NID)
		
		
		
		
	ENDPROC

	PROCEDURE Init
		LPARAMETERS toRec, tnId, tcActiune
		
		DODEFAULT()
		
		DO CASE
			CASE UPPER(ALLTRIM(tcActiune)) = [INSERT]
				this.lb_titlu_alb_b121.Caption = [Notã contabilã - Adãugare]
			CASE UPPER(ALLTRIM(tcActiune)) = [UPDATE]
				this.lb_titlu_alb_b121.Caption = [Notã contabilã - Modificare]				
		ENDCASE		
		
		IF this.chk_cu_tva.Value = 0
			this.cbo_ptva.Enabled = .f.	
		ELSE
			this.cbo_ptva.Enabled = .t.	
		ENDIF
		
		this.orec= toRec
		this.nid = tnId
		this.cus_odata_note_contabile1.cactiune = tcActiune
	ENDPROC

	PROCEDURE cbo_ptva.Valid
		porec.ptva = ctva.ptva
	ENDPROC

	PROCEDURE chk_cu_tva.Valid
		IF this.Value = 0
			STORE .null. to porec.ptva
			thisform.cbo_ptva.Enabled = .f.
			thisform.cbo_ptva.refresh
		ELSE 
			thisform.cbo_ptva.Enabled = .t.
		ENDIF
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_note_crm_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="Clb_denumire" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_note_crm1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ct_clb_sectie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ct_clb_venchelt" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: do_alege_sectie
		*m: do_alege_venchelt
		*p: cnumevechi
		*p: nid
		*p: nnivelmodificare		&& - 1 daca utilizatorul are voie sa modifice toate datele ; 0 daca are voie sa modifice doar nr. de telefon
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		cnumevechi = 
		DoCreate = .T.
		Height = 154
		Name = "frm_note_crm_nou"
		nnivelmodificare = -1
		Width = 385
		_shape1.Anchor = 9
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 708
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 318
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 69
		Lb_titlu_alb_b121.Caption = "NOTÃ VÂNZÃRI"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 6
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Height = 27
		BUT_TERMIN1.Left = 355
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 4
		BUT_TERMIN1.Top = 1
		BUT_TERMIN1.Width = 30
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT 'But_renunt1' AS but_renunt WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 323, ;
		Name = "But_renunt1", ;
		TabIndex = 5, ;
		Top = 1, ;
		Width = 30
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Clb_denumire' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 23, ;
		Name = "Clb_denumire", ;
		TabIndex = 1, ;
		Top = 46, ;
		Width = 301, ;
		Text_simplu1.ControlSource = "porec.denumire", ;
		Text_simplu1.Left = 113, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Denumire", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Ct_clb_sectie' AS ct_clb_cautare_var WITH ;
		cconditie = EMPTY(NVL(porec.id_sectie,0)), ;
		cprocedura = thisform.do_alege_sectie, ;
		cvar_afisata = porec.sectie, ;
		Height = 31, ;
		Left = 22, ;
		Name = "Ct_clb_sectie", ;
		TabIndex = 2, ;
		Top = 73, ;
		Width = 350, ;
		shape_cautare.Height = 29, ;
		shape_cautare.Left = 1, ;
		shape_cautare.Name = "shape_cautare", ;
		shape_cautare.Top = 1, ;
		shape_cautare.Width = 301, ;
		img_cautare.Left = 317, ;
		img_cautare.Name = "img_cautare", ;
		img_cautare.Top = 5, ;
		lb_cautare.Caption = "Secþie", ;
		lb_cautare.Left = 8, ;
		lb_cautare.Name = "lb_cautare", ;
		lb_cautare.Top = 7, ;
		tx_cautare.Left = 113, ;
		tx_cautare.Name = "tx_cautare", ;
		tx_cautare.Top = 3
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="container" />

	ADD OBJECT 'Ct_clb_venchelt' AS ct_clb_cautare_var WITH ;
		cconditie = EMPTY(NVL(porec.id_venchelt,0)), ;
		cprocedura = thisform.do_alege_venchelt, ;
		cvar_afisata = porec.explicatie, ;
		Height = 31, ;
		Left = 22, ;
		Name = "Ct_clb_venchelt", ;
		TabIndex = 3, ;
		Top = 101, ;
		Width = 350, ;
		shape_cautare.Height = 29, ;
		shape_cautare.Left = 1, ;
		shape_cautare.Name = "shape_cautare", ;
		shape_cautare.Top = 1, ;
		shape_cautare.Width = 301, ;
		img_cautare.Left = 318, ;
		img_cautare.Name = "img_cautare", ;
		img_cautare.Top = 5, ;
		lb_cautare.Caption = "Venituri / cheltuieli", ;
		lb_cautare.Left = 7, ;
		lb_cautare.Name = "lb_cautare", ;
		lb_cautare.Top = 7, ;
		tx_cautare.Left = 112, ;
		tx_cautare.Name = "tx_cautare", ;
		tx_cautare.Top = 3
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_note_crm1' AS cus_odata_note_crm WITH ;
		Left = 345, ;
		Name = "Cus_odata_note_crm1", ;
		Top = 45
		*< END OBJECT: ClassLib="onote_contabile.vcx" BaseClass="custom" />
	
	PROCEDURE do_adauga
		PRIVATE poNoteContab
		STORE '' TO poNoteContab
		
		LOCAL lcSchema1, lcSelect1, lcOrder1, lcFiltru1, llAfiseaza
		lcSchema1 = []
		lcSelect1 = [select nc.*, 0 as ales from note_contabile nc]
		lcOrder1 = []
		lcgroup = []
		lcFiltru1 = []
		lcFiltruOriginal = []
		llModParam = .T.
		llAfiseaza = .F.
		
		gencursor('poNoteContab','crsNoteContab', lcSelect1, lcFiltru1, lcSchema1, lcOrder1, llAfiseaza,  lcgroup, llModParam, lcFiltruOriginal)
		poNoteContab.ca_baza1.afisare()
		
		lfan = CREATEOBJECT("frm_alege_nota")
		lfan.SHOW(1)
		
		IF buton = 2
			RETURN
		ENDIF
		
		SELECT * FROM crsNoteContab WITH (BUFFERING = .T.) WHERE ales = 1 INTO CURSOR cNoteAlese
		
		SELECT crsNoteIreg_curente 
		*!*	BROWSE
		
		*!*	lcTabel = THISFORM.grd_inregistrari.RECORDSOURCE
		*!*	SELECT (lcTabel)
		APPEND FROM DBF("cNoteAlese")
		
		RELEASE poNoteContab
		IF USED("crsNoteContab")
			USE IN crsNoteContab
		ENDIF
		
		IF USED("cNoteAlese")
			USE IN cNoteAlese
		ENDIF
		
		THISFORM.grd_inregistrari.Refresh 
		
	ENDPROC

	PROCEDURE do_alege_sectie
		Local loCauta, llDesktop
		*!*	llDesktop = .T.
		llDesktop = .F.
		loCauta = caut_sectie(6, llDesktop)
		If buton=1
			poRec.id_sectie = Iif(!Empty(loCauta.id_sectie), loCauta.id_sectie, 0)
			poRec.sectie = Iif(!Empty(loCauta.sectie), loCauta.sectie, "")
		
			Thisform.ct_clb_sectie.Refresh()
		Endif
		Thisform.ct_clb_venchelt.SetFocus()
		
	ENDPROC

	PROCEDURE do_alege_venchelt
		*!*	LOCAL lcselect, lcfiltru, lcschema, lcorder, lccoloane, lcTitlu, lcTitluColoane, lcFiltruOriginal, lcNumeProc
		*!*	lcselect = [select v.id_venchelt, v.explicatie, (case v.tip_venchelt when 1 then 'C' else 'V' end) as tip_venchelt FROM vnom_venchel v]
		*!*	lcfiltru = [1=2]
		*!*	lcschema = []
		*!*	lcorder = [v.explicatie]
		*!*	lccoloane = [explicatie,tip_venchelt]
		*!*	lcTitlu = [Alegeti tipul de venit/cheltuiala]
		*!*	lcTitluColoane = [Explicatia, Tip]
		*!*	lcFiltruOriginal = [inactiv=0]
		*!*	lcNumeProc = ""
		*!*	locauta = cauta_alfa(lcselect, lcfiltru, lcschema, lcorder, lccoloane, lcTitlu, lcTitluColoane, lcNumeProc, .F., lcFiltruOriginal)
		
		Local loCauta, lnPornire, llDesktop
		
		lnPornire = 6 && 1-incepe cu..., 6-toate
		*!*	llDesktop = .T.
		llDesktop = .F.
		loCauta = caut_venchelt(lnPornire, llDesktop)
		*!*	modificare migrare v 1.0	>	v 2.0
		*!*	If buton=1
		*!*		poRec.id_venchelt = Iif(!Empty(loCauta.id_venchelt), loCauta.id_venchelt, 0)
		*!*		poRec.explicatie = Iif(!Empty(loCauta.explicatie), loCauta.explicatie, "")
		*!*		Thisform.ct_clb_venchelt.Refresh()
		*!*	Endif
		If gnButon=1
			poRec.id_venchelt = Iif(!Empty(loCauta.id_venchelt), loCauta.id_venchelt, 0)
			poRec.explicatie = Iif(!Empty(loCauta.explicatie), loCauta.explicatie, "")
		Else
			poRec.id_venchelt = Null
			poRec.explicatie = []
		EndIf
		Thisform.ct_clb_venchelt.Refresh()
		*!*	modificare migrare v 1.0	>	v 2.0	^
		Thisform.but_termin1.SetFocus()
	ENDPROC

	PROCEDURE inainte_de_do_sterge
		lnRaspuns = AMESSAGEBOX("Doriti sa stergeti ?",0+48,_screen.Caption)
		IF lnRaspuns = 7
			RETURN
		ENDIF 
		
		SELECT crsNoteIreg_curente 
		DELETE 
		
		thisform.grd_inregistrari.Refresh
		
	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
		
		Do Case
		Case Empty(porec.denumire)
			aMessagebox('Nu ati completat denumirea notei!',0+48,"Atentie")
			This.clb_denumire.text_simplu1.SetFocus()
			PLRETURN=.F.
		*!*	Case Empty(porec.scd)
		*!*		Messagebox('Nu ati completat contul debitor!',0+48,"Atentie")
		*!*		This.clb_scd.text_simplu1.SetFocus()
		*!*		PLRETURN=.F.
		*!*	Case Empty(porec.scc)
		*!*		Messagebox('Nu ati completat contul creditor!',0+48,"Atentie")
		*!*		This.clb_scc.text_simplu1.SetFocus()
		*!*		PLRETURN=.F.			
		OTHERWISE 
			PLRETURN=This.cus_odata_note_crm1.salvare(This.OREC,This.NID)
		ENDCASE 
		
		Return PLRETURN
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		*!*	Local lnid_prospect
		DoDefault()
		This.orec= toRec
		This.nid = tnId
		This.cus_odata_note_crm1.cactiune = tcActiune
		
		If tcActiune = 'UPDATE'
		*!*		Select v_zone
		*!*		Locate For id_zona=toRec.id_zona
		*!*		If Found()
		*!*			Thisform.cb_zona._cbbase1.Value=zona
		*!*			Thisform.cb_zona._cbbase1.Refresh
		*!*		Endif
			Thisform.nNivelModificare=0
		Endif
	ENDPROC

	PROCEDURE Release
		IF USED("crsNoteIreg_curente")
			USE IN crsNoteIreg_curente
		ENDIF 
	ENDPROC

ENDDEFINE
