*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="oimobilizari.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS capplication AS wzapplication OF "..\comun\clase\appwiz.vcx" 		&& Application class.
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		clastcaption = Microsoft Visual FoxPro
		clasticon = 
		Name = "capplication"
		nformcount = 0
	*</PropValue>

ENDDEFINE

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

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="grd_curs" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_curs.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_curs.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_curs.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_curs.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_curs.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_curs.Column3.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_curs.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_curs.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: calcul_total
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 272
		Name = "frm_alege"
		Width = 532
		_shape1.Height = 29
		_shape1.Left = 2
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 530
		_shape2.Height = 29
		_shape2.Left = 464
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 68
		Lb_titlu_alb_b121.Caption = "Alegeti imobilizarile care se transforma in mijloc fix"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 4
		BUT_TERMIN1.Height = 27
		BUT_TERMIN1.Left = 499
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 2
		BUT_TERMIN1.Top = 0
		BUT_TERMIN1.Width = 31
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT 'But_renunt1' AS but_renunt WITH ;
		Height = 27, ;
		Left = 467, ;
		Name = "But_renunt1", ;
		TabIndex = 3, ;
		Top = 0, ;
		Width = 31
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 213, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 5, ;
		Top = 240, ;
		Width = 314, ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(16,gnPa)), ;
		Text_simplu1.Left = 143, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 163, ;
		Lb_simplu1.Caption = "Total valoare retinuta", ;
		Lb_simplu1.Left = 19, ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		Lb_simplu1.Top = 6
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'grd_curs' AS _grdbase WITH ;
		ColumnCount = 4, ;
		DeleteMark = .F., ;
		Height = 200, ;
		Left = 0, ;
		Name = "grd_curs", ;
		Panel = 1, ;
		ReadOnly = .F., ;
		RecordSource = "crslista2", ;
		ScrollBars = 2, ;
		TabIndex = 1, ;
		Top = 36, ;
		Width = 528, ;
		Column1.ControlSource = "denumire", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 240, ;
		Column2.ControlSource = "valoare", ;
		Column2.InputMask = (get_mask(16,gnPa)), ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 116, ;
		Column3.Alignment = 2, ;
		Column3.ColumnOrder = 4, ;
		Column3.ControlSource = "alege", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .F., ;
		Column3.Sparse = .F., ;
		Column3.Width = 31, ;
		Column4.ColumnOrder = 3, ;
		Column4.ControlSource = "valoareretinuta", ;
		Column4.InputMask = (get_mask(16,gnPa)), ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .F., ;
		Column4.Width = 102
		*< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" />

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

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

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

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

	ADD OBJECT 'grd_curs.Column3.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Centered = .T., ;
		Height = 17, ;
		Left = 24, ;
		Name = "Check1", ;
		ReadOnly = .F., ;
		Top = 62, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

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

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

	ADD OBJECT 'grd_curs.Column4.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		InputMask = "999 999 999.99", ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE calcul_total
		
		SELECT SUM(valoareretinuta) as suma FROM crsLista2 WITH (BUFFERING = .T.) WHERE alege INTO CURSOR crsSumaTemp
		thisform.clb_tx_simplu1.text_simplu1.Value = crsSumaTemp.suma
		USE IN ('crsSumaTemp')
		this.clb_tx_simplu1.text_simplu1.Refresh()
		
		SELECT crslista2
	ENDPROC

	PROCEDURE Init
		thisform.calcul_total()
		DODEFAULT()
		
		
	ENDPROC

	PROCEDURE BUT_TERMIN1.Click
		Select crsLista2
		Locate For alege
		If Found()
			DoDefault()
		Else
			Thisform.do_renunt
		Endif
	ENDPROC

	PROCEDURE grd_curs.Column3.Check1.InteractiveChange
		THISFORM.CLB_tx_simplu1.TExt_simplu1.SetFocus()
		thisform.calcul_total()
		THIS.SetFocus()
	ENDPROC

	PROCEDURE grd_curs.Column4.Text1.Valid
		SELECT crslista2
		IF  valoareretinuta  > valoare
			mesaj="Valoarea transformata este mai mare decat valoarea initiala!"
		
			aMESSAGEBOX(mesaj,16+0,"Eroare")
		
			RETURN .F.
		ENDIF 
		thisform.calcul_total()
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_alegoper AS _frmbase OF "..\comun\clase\_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="ogOperatiuni" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Lb_simplu1" UniqueID="" Timestamp="" />

	*<PropValue>
		BorderStyle = 2
		DoCreate = .T.
		Height = 202
		Name = "frm_alegoper"
		Width = 278
		_shape1.Name = "_shape1"
		_shape1.Width = 278
		_shape2.Height = 29
		_shape2.Left = 210
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 69
		Lb_titlu_alb_b121.Caption = "ALEGETI OPERATIUNEA"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 4
		BUT_TERMIN1.Left = 247
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 2
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

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

	ADD OBJECT 'Lb_simplu1' AS lb_simplu WITH ;
		Caption = "Operatiuni cu istoric", ;
		Left = 15, ;
		Name = "Lb_simplu1", ;
		TabIndex = 5, ;
		Top = 40
		*< END OBJECT: ClassLib="..\comun\clase\lb.vcx" BaseClass="label" />

	ADD OBJECT 'ogOperatiuni' AS _optiongrup WITH ;
		AutoSize = .F., ;
		ButtonCount = 6, ;
		Height = 124, ;
		Left = 30, ;
		Name = "ogOperatiuni", ;
		TabIndex = 1, ;
		Top = 64, ;
		Width = 221, ;
		Option1.AutoSize = .T., ;
		Option1.Caption = "majorarea valorii de intrare", ;
		Option1.Left = 5, ;
		Option1.Name = "Option1", ;
		Option1.Top = 5, ;
		Option2.AutoSize = .T., ;
		Option2.Caption = "reevaluarea valorii de intrare", ;
		Option2.Left = 5, ;
		Option2.Name = "Option2", ;
		Option2.Top = 24, ;
		Option3.AutoSize = .T., ;
		Option3.BackStyle = 0, ;
		Option3.Caption = "conservare", ;
		Option3.Height = 17, ;
		Option3.Left = 5, ;
		Option3.Name = "Option3", ;
		Option3.Top = 43, ;
		Option3.Width = 79, ;
		Option4.AutoSize = .T., ;
		Option4.BackStyle = 0, ;
		Option4.Caption = "schimbare DNS", ;
		Option4.Height = 17, ;
		Option4.Left = 5, ;
		Option4.Name = "Option4", ;
		Option4.Top = 62, ;
		Option4.Width = 106, ;
		Option5.AutoSize = .T., ;
		Option5.BackStyle = 0, ;
		Option5.Caption = "schimbare DNS + reevaluare", ;
		Option5.Height = 17, ;
		Option5.Left = 5, ;
		Option5.Name = "Option5", ;
		Option5.Top = 81, ;
		Option5.Width = 177, ;
		Option6.AutoSize = .T., ;
		Option6.BackStyle = 0, ;
		Option6.Caption = "iesire din gestiune", ;
		Option6.Height = 17, ;
		Option6.Left = 5, ;
		Option6.Name = "Option6", ;
		Option6.Top = 100, ;
		Option6.Width = 120
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="optiongroup" />
	
	PROCEDURE Destroy
		pnTipOperatiune = thisform.ogOperatiuni.Value 
	ENDPROC

	PROCEDURE Init
		Parameters tlConservat,tlCasat
		DoDefault()
		If tlConservat
			With Thisform.ogOperatiuni
				.opTION1.Enabled=.F.
				.opTION2.Enabled=.F.
				.opTION3.Enabled=.T.
				.option3.Caption=[scoatere din conservare]
				.opTION4.Enabled=.F.
				.opTION5.Enabled=.F.
				.opTION6.Enabled=.T. && intrare/iesire din gestiune
				.Value=3
			Endwith
		Endif
		If tlCasat
			With Thisform.ogOperatiuni
				.opTION1.Enabled=.F.
				.opTION2.Enabled=.F.
				.option3.Enabled=.F.
				.opTION4.Enabled=.F.
				.opTION5.Enabled=.F.
				.opTION6.Enabled=.T. && intrare/iesire din gestiune
				.option6.Caption=[intrare in gestiune]		
				.value=6
			Endwith
		Endif
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_analitice1 AS _frmbase OF "..\comun\clase\_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_excel1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdbase1" UniqueID="" Timestamp="" />

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 242
		Name = "frm_analitice1"
		Width = 373
		WindowState = 2
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 306
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 70
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdbase1' AS _grdbase WITH ;
		Anchor = 15, ;
		DeleteMark = .F., ;
		Height = 200, ;
		Left = 6, ;
		Name = "_grdbase1", ;
		RecordSource = "rulaje", ;
		Top = 36, ;
		Width = 360
		*< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'But_excel1' AS but_excel WITH ;
		Anchor = 9, ;
		Left = 311, ;
		Name = "But_excel1", ;
		Top = 1
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE do_excel
		DO ExportExcelXml WITH this._grdbase1, 'rulaje_amortizari.xls', 'Rulaje amortizari', .T.
		
		*!*		
		*!*	LOCAL i,xlsheet,XLApp,tmpsheet
		*!*	exista_excel=.t.
		
		*!*	p2='AN'
		*!*	SELECT RULAJE
		*!*	FOR J=2 TO FCOUNT()
		*!*	T=FIELD(J)
		*!*	p2=p2+','+T
		*!*	ENDFOR 
		*!*	*WAIT WINDOW p2
		*!*	p1=p2
		*!*	ON ERROR do exportare with 'rulaje',p1,p2
		*!*							   
		*!*	tmpsheet = GetObject('','excel.sheet')
		*!*	ON ERROR
		
		*!*	IF exista_excel
		*!*	WAIT WINDOW "Se deschide Excel..." NOWAIT 
		
		*!*	XLApp = tmpsheet.application
		
		*!*	XLApp.Visible = .t.
		*!*	XLApp.WorkBooks.Add()
		*!*	XLSheet = XLApp.ActiveSheet
		
		*!*	SELECT RULAJE
		*!*	FOR J=1 TO FCOUNT()
		*!*	T=FIELD(J)
		*!*	XLSheet.Cells(1,J).Value = T
		*!*	*XLSheet.Cells(1,2).Value = "Data Act"
		*!*	NEXT
		
		*!*	i=1
		*!*	sele RULAJE
		*!*	scan
		*!*		i=i+1
		*!*		FOR J=1 TO FCOUNT()
		*!*		T=FIELD(J)
		*!*		XLSheet.Cells(i,J).Value =&T
		*!*		NEXT
		*!*	*	XLSheet.Cells(i,2).Value =dataact
		
		*!*	endscan
		*!*	ENDIF 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_bunuri_capital AS frm_termin OF "..\comun\clase\_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="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column6.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column7.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column7.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column8.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column8.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column9.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column9.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column10.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column10.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column11.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column11.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column12.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column12.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column13.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column13.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column14.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column14.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column15.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column15.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_start_criterii1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_reset_criterii1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_excel1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Gridextra1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: e_ultima_operatie
	*</DefinedPropArrayMethod>

	*<PropValue>
		BackColor = 255,255,255
		BorderStyle = 3
		cgridsortlist = _grdrow1
		DoCreate = .T.
		Height = 545
		Name = "frm_bunuri_capital"
		Width = 800
		WindowState = 2
		_shape1.Anchor = 10
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 900
		_shape2.Left = 744
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		Lb_titlu_alb_b121.Caption = "Registrul bunurilor de capital"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 764
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Left = 9
		Gridsort1.Name = "Gridsort1"
		Gridsort1.Top = 26
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 15, ;
		DeleteMark = .F., ;
		Height = 502, ;
		Left = 5, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		RecordSource = "crsBunCapital", ;
		Top = 36, ;
		Width = 790, ;
		Column1.ColumnOrder = 4, ;
		Column1.ControlSource = "nrdoc", ;
		Column1.Name = "Column1", ;
		Column2.ColumnOrder = 5, ;
		Column2.ControlSource = "ttod(datadoc)", ;
		Column2.Name = "Column2", ;
		Column3.ColumnOrder = 6, ;
		Column3.ControlSource = "denumire", ;
		Column3.Name = "Column3", ;
		Column3.Width = 238, ;
		Column4.ColumnOrder = 7, ;
		Column4.ControlSource = "explicatia", ;
		Column4.Name = "Column4", ;
		Column4.Width = 197, ;
		Column5.ColumnOrder = 8, ;
		Column5.ControlSource = "bazatva", ;
		Column5.InputMask = (get_mask(14,gnPa)), ;
		Column5.Name = "Column5", ;
		Column6.ColumnOrder = 10, ;
		Column6.ControlSource = "TVA", ;
		Column6.InputMask = (get_mask(14,gnPa)), ;
		Column6.Name = "Column6", ;
		Column6.Width = 81, ;
		Column7.ColumnOrder = 12, ;
		Column7.ControlSource = "Ajustare", ;
		Column7.InputMask = (get_mask(14,gnPa)), ;
		Column7.Name = "Column7", ;
		Column8.ColumnOrder = 15, ;
		Column8.ControlSource = "utilizator", ;
		Column8.Name = "Column8", ;
		Column9.ColumnOrder = 1, ;
		Column9.ControlSource = "nr_inventar", ;
		Column9.InputMask = (get_mask(14,0)), ;
		Column9.Name = "Column9", ;
		Column10.ColumnOrder = 2, ;
		Column10.ControlSource = "nr_pif", ;
		Column10.Name = "Column10", ;
		Column11.ColumnOrder = 3, ;
		Column11.ControlSource = "ttod(data_pif)", ;
		Column11.Name = "Column11", ;
		Column12.ColumnOrder = 14, ;
		Column12.ControlSource = "tipoperatie", ;
		Column12.Name = "Column12", ;
		Column12.Width = 139, ;
		Column13.ColumnOrder = 13, ;
		Column13.ControlSource = "valreev", ;
		Column13.InputMask = (get_mask(14,gnPa)), ;
		Column13.Name = "Column13", ;
		Column13.Width = 106, ;
		Column14.ColumnOrder = 11, ;
		Column14.ControlSource = "tva_datorat", ;
		Column14.Name = "Column14", ;
		Column15.ColumnOrder = 9, ;
		Column15.ControlSource = "proratatva", ;
		Column15.Name = "Column15"
		*< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Caption = "Nr. Doc.", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdrow1.Column10.Header1' AS header WITH ;
		Caption = "Nr. PIF", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdrow1.Column11.Header1' AS header WITH ;
		Caption = "Data PIF", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdrow1.Column12.Header1' AS header WITH ;
		Caption = "Tip operatie", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdrow1.Column13.Header1' AS header WITH ;
		Caption = "Valoare reevaluata", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdrow1.Column14.Header1' AS header WITH ;
		Caption = "TVA datorat", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdrow1.Column15.Header1' AS header WITH ;
		Caption = "Prorata TVA", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Caption = "Data Doc.", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Caption = "Denumire", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdrow1.Column4.Header1' AS header WITH ;
		Caption = "Explicatie", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdrow1.Column5.Header1' AS header WITH ;
		Caption = "Baza TVA", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdrow1.Column6.Header1' AS header WITH ;
		Caption = "TVA deductibil", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdrow1.Column7.Header1' AS header WITH ;
		Caption = "Ajustare", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdrow1.Column8.Header1' AS header WITH ;
		Caption = "Utilizator", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT '_grdrow1.Column9.Header1' AS header WITH ;
		Caption = "Nr inventar", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'But_excel1' AS but_excel WITH ;
		Anchor = 8, ;
		Left = 648, ;
		Name = "But_excel1", ;
		TabIndex = 6, ;
		Top = 1, ;
		ZOrderSet = 46
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 706, ;
		lvizibil = .F., ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

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

	ADD OBJECT 'But_reset_criterii1' AS but_reset_criterii WITH ;
		Anchor = 9, ;
		Left = 589, ;
		Name = "But_reset_criterii1", ;
		Top = 1, ;
		Visible = .T.
		*< END OBJECT: ClassLib="..\..\roacont\comun\clase\ocriterii.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_start_criterii1' AS but_start_criterii WITH ;
		Anchor = 9, ;
		Comment = "*:OnResize=RT", ;
		Left = 618, ;
		Name = "But_start_criterii1", ;
		Top = 1
		*< END OBJECT: ClassLib="..\..\roacont\comun\clase\ocriterii.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 736, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Gridextra1' AS gridextra WITH ;
		allowgridpreferences = .F., ;
		companyname = ROMFAST, ;
		gridexpression = Thisform._grdrow1, ;
		Height = 17, ;
		Left = 200, ;
		Name = "Gridextra1", ;
		productname = ROAIMOB, ;
		Top = 140, ;
		Width = 22
		*< END OBJECT: ClassLib="..\comun\utile\gridextras\gridextras.vcx" BaseClass="custom" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		
		LOCAL lcFiltru
		
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=poBunCapital.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		poBunCapital.ca_baza1.cfiltru=lcFiltru
		poBunCapital.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		
		*!*	thisform.do_calcul 
		
		*!*	IF RECCOUNT('v_delegati')>0
		
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		=update_cote_TVA()
		
		oadaug = CreateObject('frm_bunuri_capital_nou')
		oadaug.show(1)
		
		If gnButon =1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_cauta
		LOCAL lcFiltru
		lcFiltru = ""
		lcFiltru = [ STERS=0] + lcFiltru
		IF LEN(THISFORM.filtru_pretty)>0
			filtrutext=THISFORM.filtru_pretty
			IF AT("AND",filtrutext)=1
				filtrutext=RIGHT(filtrutext,LEN(filtrutext)-4)
			ENDIF
		
			lcFiltru=lcFiltru+" and ("+ALLTRIM(filtrutext)+")"
		ENDIF
		
		IF (THIS.filtru_pretty#"none")
			THISFORM.actualizeaza_grid1(lcFiltru)
			IF RECCOUNT('crsBunCapital')=0
				aMessagebox("Cautarea nu a intors rezultate!",0+48,"Info cautare")
			ENDIF
		ENDIF
		THISFORM.but_start_criterii1.SETFOCUS
		
	ENDPROC

	PROCEDURE do_excel
		Local lcAlias, lcFiltru, lcColumnList, lcHeaderList, lcSelect, lcOutput, lcFrom, lcWhere, lcOrder
		lcAlias = this._grdrow1.RecordSource 
		lcFiltru = FILTER(lcAlias)
		IF EMPTY(lcFiltru)
			lcFiltru = '.T.'
		ENDIF 
		
		exista_excel=.T.
		lcColumnList = ''
		lcHeaderList = ''
		lcSelect = ''
		llSelect = .T.
		lcType = 'CURSOR'
		lcFrom = lcAlias
		lcWhere = lcFiltru
		lcOrder = 'datadoc,nrdoc'
		lcOutput = SYS(2015)
		
		get_schema_grid(this._grdrow1,@lcColumnList, @lcHeaderList, @lcSelect, llSelect, lcType, lcFrom, lcWhere, lcOrder, lcOutput)
		&lcSelect
		IF USED(lcOutput)
			DO export_xls WITH lcOutput IN oproceduri_comune.prg
			USE IN (lcOutput)
		ENDIF 
	ENDPROC

	PROCEDURE do_sterge
		Select crsBunCapital
		Scatter name poRBC
		IF !this.e_ultima_operatie(poRBC.datadoc,poRBC.id_mf)
			RETURN 
		ENDIF 
		
		
		lnButon = amessagebox('Stergeti Miscarea ' + ALLTRIM(poRBC.denumire) + ' din data ' + ALLTRIM(DTOC(poRBC.datadoc)) + '?',4)
		IF lnButon = 6
			lcSql = [begin pack_imob.sterge_buncapital(?poRBC.id_regbc);end;] 
			lnSucces = goExecutor.oExecute(lcSql)
			IF lnSucces < 0
				amessagebox(goExecutor.cEroare,0+16,"Eroare")
			ENDIF
			this.LockScreen = .T.
			this.actualizeaza_grid1
			this.LockScreen = .F.
		ENDIF
	ENDPROC

	PROCEDURE e_ultima_operatie
		PARAMETERS tdDataOperatie ,tnId_mf
		Local llRet,lcSql,ldData 
		llRet = .T.
		lcSql = [SELECT MAX(datadoc) as data_max FROM imob_vbunuricapital where id_mf = ]+Alltrim(Str(tnId_mf))
			lnSucces = goExecutor.oExecute(lcSql, "crsMaxDatadoc")
			If lnSucces < 0
				aMESSAGEBOX(goExecutor.cEroare,0+16, "Eroare")
				Return
			Endif
		
		
		SELECT crsMaxDatadoc
		LOCATE 
		ldData = data_max
		USE IN crsMaxDatadoc
		
		IF tdDataOperatie < ldData
			aMESSAGEBOX('Nu puteti sterge decat ultima operatie din lista!')
			llRet = .F.
		ENDIF 
		
		RETURN llRet
		 
	ENDPROC

	PROCEDURE Show
		LPARAMETERS nStyle
		
		this.gridextra1.setup()
		
	ENDPROC

	PROCEDURE But_start_criterii1.loadcriterii
		
		PARAMETERS tacriterii
		EXTERNAL ARRAY tacriterii
		#DEFINE crlf CHR(13)+CHR(10)
		
		lcStringCriterii="Numar doc.\NRDOC\N\none\" + crlf + ;
			"Data doc.\dataact\D\none\" + crlf + ;
			"Numar PIF\NRpif\N\none\" + crlf + ;
			"Data PIF\datapif\D\none\" + crlf + ;
			"Numar inventar\NR_inventar\N\none\" + crlf + ;
			"Denumire\denumire\T\none\" + crlf + ;
			"Explicatie\explicatia\T\none\" + crlf + ;
			"Baza TVA\bazatva\N|get_mask(12,gnPA)\none\" + crlf + ;
			"TVA deductibil\tva\N|get_mask(12,gnPA)\none\" + crlf + ;
			"TVA datorat\tva_datorat\N|get_mask(12,gnPA)\none\" + crlf + ;
			"Ajustare\ajustare\N|get_mask(12,gnPA)\none\" + crlf + ;
			"Val reevaluata\valreev\N|get_mask(12,gnPA)\none\" + crlf + ;
			"Tip operatie\tipoperatie\T\none\" + crlf + ;
			"Utilizator\utilizator\T\none\" 
			
			
			
			
			
			
			
			
			
			
		*!*		
		*!*		"Data inreg.\dataIREG\D\none\" + crlf + ;
		*!*		"Tip doc.\fdoc\T\id_fdoc\nom_feldoc"+ crlf + ;
		*!*		"Explicatie D\partD\T\ID_PARTD\nom_parteneri"+ crlf + ;
		*!*		"Explicatie C\partC\T\ID_PARTC\nom_parteneri"+ crlf + ;
		*!*		"Explicatie\explicatia\T\none\"+ crlf + ;
		*!*		"Explicatia 4\explicatia4\T\none\"+ crlf + ;
		*!*		"Explicatia 5\explicatia5\T\none\"+ crlf + ;
		*!*		"Explicatii\partD,partC,explicatia,explicatia4,explicatia5,fdoc,gestin,gestout,nrord,contract,nresp,dst_chlt,sectie,sucursala\T\none\"+ crlf + ;
		*!*		"Gestiune destinatie\gestin\T\ID_GESTIN\nom_gestiune"+ crlf + ;
		*!*		"Gestiune sursa\gestout\T\ID_GESTOUT\nom_gestiune" + crlf + ;
		*!*		"Lucrare/Comanda\nrord\T\ID_LUCRARE\nom_lucrare" + crlf + ;
		*!*		"Contract\contract\T\none\" + crlf + ;
		*!*		"Cont debitor\scd\T\none\" + crlf + ;
		*!*		"Cont debitor analitic\ascd\T\none\" + crlf + ;
		*!*		"Cont creditor\scc\T\none\" + crlf + ;
		*!*		"Cont creditor analitic\ascc\T\none\" + crlf + ;
		*!*		"Suma\suma\N|get_mask(12,gnPA)\none\" + crlf + ;
		*!*		"Suma valuta\suma_val\N|get_mask(12,gnPval)\none\" + crlf + ;
		*!*		"Nr document incasat\perecheC\N\none\" + crlf + ;
		*!*		"Nr document platit\perecheD\N\none\" + crlf + ;
		*!*		"Nr. NIR/bon\nnir\N\none\" + crlf + ;
		*!*		"Responsabil\nresp\T\ID_RESPONSABIL\nom_parteneri" + crlf + ;
		*!*		"Cheltuieli/Venituri\dst_chlt\T\ ID_VENCHELT\nom_venchel" + crlf + ;
		*!*		"Sectie\sectie\T\ID_SECTIE\nom_sectie" + crlf + ;
		*!*		"Cod\cod\N\none\" + crlf + ;
		*!*		"Tip operatie\id_set\N\none\" + crlf + ;
		*!*		"Valuta\nume_val\T\ID_VALUTA\nom_valuta" + crlf + ;
		*!*		"Cota TVA\proc_tva\N\none\" + crlf + ;
		*!*		"Explicatie TVA\explicatie_tva\T\none\" + crlf + ;
		*!*		"Data introducerii\trunc(dataora)\D\none\" + crlf + ;
		*!*		"Operator introducere\util\T\ID_UTIL\nom_utilizator" + crlf + ;
		*!*		"Validate\nofiled\E\(validat = 1)\" + crlf + ;
		*!*		"Nevalidate\nofiled\E\(validat = 0)\" + crlf + ;	
		*!*		"Data validarii\trunc(dataorav)\D\none\" + crlf + ;
		*!*		"Operator validare\utilv\T\ID_UTILv\nom_utilizator" + crlf + ;
		*!*		IIF(glEMama, "Sucursala\sucursala\T\ID_SUCURSALA\nom_sucursala"+ crlf, "")  + ;	&& aleg sucursale doar daca sunt pe mama
		*!*		"Perioada\an*12+luna\D1\none\" + crlf + ;
		*!*		"Sterse\nofiled\E\(1=1)\"
		
		DODEFAULT()
		
	ENDPROC

	PROCEDURE Gridextra1.applyfilter
		DODEFAULT()
		Thisform._grdfooter1.calcTotal()
	ENDPROC

	PROCEDURE Gridextra1.clearfilter
		DODEFAULT()
		Thisform._grdfooter1.calcTotal()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_bunuri_capital_nou AS frm_termin_renunt OF "..\comun\clase\_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="Clb_mf" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_BazaTVA" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_cotaTva" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_TVA" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nract" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dataact" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_prorataTva" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: id_mf
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 287
		id_mf = 
		Name = "frm_bunuri_capital_nou"
		Width = 375
		_shape1.Name = "_shape1"
		_shape2.Name = "_shape2"
		Lb_titlu_alb_b121.Caption = "Bun de capital"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 10
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 8
		Gridsort1.Name = "Gridsort1"
		But_renunt1.Name = "But_renunt1"
		But_renunt1.TabIndex = 9
	*</PropValue>

	ADD OBJECT 'Cb_cotaTva' AS cb_tx_simplu WITH ;
		Left = 31, ;
		Name = "Cb_cotaTva", ;
		TabIndex = 5, ;
		Top = 178, ;
		Width = 312, ;
		_cbbase1.ColumnCount = 3, ;
		_cbbase1.ColumnLines = .F., ;
		_cbbase1.ColumnWidths = "30,175,0", ;
		_cbbase1.Height = 23, ;
		_cbbase1.Left = 131, ;
		_cbbase1.Name = "_cbbase1", ;
		_cbbase1.RowSource = "cote_TVA.proc_tva,descriere,id_proc_tva", ;
		_cbbase1.RowSourceType = 2, ;
		_cbbase1.TabIndex = 1, ;
		_cbbase1.Top = 3, ;
		_cbbase1.Width = 176, ;
		_lbbase1.Caption = "Cota TVA", ;
		_lbbase1.Name = "_lbbase1", ;
		_lbbase1.TabIndex = 2
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_BazaTVA' AS clb_tx_simplu WITH ;
		Left = 31, ;
		Name = "Clb_BazaTVA", ;
		TabIndex = 4, ;
		Top = 144, ;
		Width = 312, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 131, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Baza TVA", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_dataact' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 31, ;
		Name = "Clb_dataact", ;
		TabIndex = 2, ;
		Top = 73, ;
		Width = 312, ;
		Text_simplu1.Alignment = 1, ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = {}, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Data doc. achizitie", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_mf' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 31, ;
		Name = "Clb_mf", ;
		TabIndex = 3, ;
		Top = 109, ;
		Width = 312, ;
		Text_simplu1.ControlSource = "", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Dublu click pentru modificare", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 174, ;
		Lb_simplu1.Caption = "Mijloc fix", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nract' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 31, ;
		Name = "Clb_nract", ;
		TabIndex = 1, ;
		Top = 39, ;
		Width = 312, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Nr. doc. achizitie", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_prorataTva' AS clb_tx_simplu WITH ;
		Left = 31, ;
		Name = "Clb_prorataTva", ;
		TabIndex = 7, ;
		Top = 244, ;
		Width = 312, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 131, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 178, ;
		Lb_simplu1.Caption = "Prorata TVA", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_TVA' AS clb_tx_simplu WITH ;
		Left = 31, ;
		Name = "Clb_TVA", ;
		TabIndex = 6, ;
		Top = 212, ;
		Width = 312, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 131, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "TVA", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />
	
	PROCEDURE inainte_de_do_termin
		Local lcIdMf ,lcNrDoc ,ldDataDoc ,lcBazaTva ,lcTva ,lcIdCotaTva
		lcIdMf = Alltrim(Transform(thisform.id_mf))
		lcNrDoc = Alltrim(Transform(Thisform.clb_nract.text_simplu1.Value))
		ldDataDoc =Thisform.clb_dataact.text_simplu1.Value
		lcBazaTva = Alltrim(Transform(Thisform.clb_BazaTVA.text_simplu1.Value))
		lcTva = Alltrim(Transform(Thisform.clb_TVA.text_simplu1.Value))
		lcIdCotaTva = Alltrim(Transform(cote_tva.id_proc_tva))
		lcProrataTva = Alltrim(Transform(thisform.clb_prorataTva.text_simplu1.Value))
		lcsql = [begin ]+;
			[pack_imob.adauga_buncapital(]+Alltrim(lcIdMf)+[,]+Alltrim(lcNrDoc)+[,to_date(']+Dtos(ldDataDoc)+[','YYYYMMDD'),]+;
			lcBazaTva+[,]+lcTva +[,]+lcIdCotaTva +[,0,1,0,]+lcProrataTva+[); end;]
		
		
		lnSucces = goExecutor.oExecute(lcsql)
		If lnSucces < 0
			aMESSAGEBOX(goExecutor.cEroare,0+16,"Eroare")
		Endif
		
		
	ENDPROC

	PROCEDURE Cb_cotaTva._cbbase1.LostFocus
		thisform.clb_TVA.text_simplu1.Value = Round((cote_tva.proc_tva-1)*thisform.clb_bazaTVA.text_simplu1.Value,gnPa)
		thisform.clb_TVA.text_simplu1.Refresh 
	ENDPROC

	PROCEDURE Clb_mf.Text_simplu1.DblClick
		Private pdDataI ,pdDataF ,pcCond ,pnFiscala 
		
		pdDataI = Date(gnAn,gnLuna,1)
		pdDataF = pdDataI
		*pcCond = [id_tip_imobilizare = ] + ALLTRIM(STR(tnTip)) && merge fffff greu
		pcCond = [2=2]
		pnFiscala = 0
		lcSel = [{call pack_imob.CALCUL_SITUATIE_LUNARA(?pdDataI,?pdDataF,?pcCond,?pnFiscala,?gnIdSucursala)}]
		
		
		lcSchema = ['']  &&['ceck n(1),totdebit n(16,gnPa),totcredit n(16,gnPa),id_fact n(10),id_part n(10),nume c(50),dataact D,dataireg D,nract n(14),datascad D,cont c(4),acont c(4)']
		lcCursor = 'crslistamf'
		
		lnSucces = goExecutor.oExecute(lcSel,lcCursor)
		
		If lnSucces < 0
			aMESSAGEBOX(goExecutor.cEroare,0+16,"Eroare")
			Return
		Endif
		
		Select crsListaMf
		*!*	Scatter name ocrMf
		Local  lcCont,loCauta
		
		Store "" To loCauta
		
		pcselect = [select * from crsListaMf]
		pcfiltru = [1=2]
		pcschema = []
		pcorder = [denumire, nr_inventar,nract]
		pccoloane = [denumire,nr_inventar,nract] 
		pcTitlu = [Alegeti Imobilizarea!]
		pcTitluColoane = [Denumire, Nr inventar, Nr act]
		pcFiltruOriginal = [0 = 0]
		lcNumeProc = []
		llToateIreg = .F.
		
		loCauta = cauta_alfa_vfp(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane, lcNumeProc , llToateIreg, pcFiltruOriginal)		&& 11.07.2007
		
		this.Value = Alltrim(loCauta.denumire)
		thisform.id_mf = locauta.id_mf
		this.Refresh()
		
		*!*	Local loCauta
		*!*	Store "" To locauta
		*!*	locauta = caut_gestiune(,gnIdUtil)
		
		*!*	If !Empty(locauta.nume_gestiune)
		*!*		Thisform.nid_gestiune=locauta.id_gestiune
		*!*		This.Value=Alltrim(locauta.nume_gestiune)
		*!*	Endif
		
	ENDPROC

	PROCEDURE Clb_mf.Text_simplu1.GotFocus
		If Empty(This.Value)
			this.DblClick()
		Endif
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_bunuri_capital_tip AS frm_termin_renunt OF "..\comun\clase\_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		DoCreate = .T.
		Name = "frm_bunuri_capital_tip"
		_shape1.Name = "_shape1"
		_shape2.Name = "_shape2"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		Gridsort1.Name = "Gridsort1"
		But_renunt1.Name = "But_renunt1"
	*</PropValue>

ENDDEFINE

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

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nract" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dataact" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nrpif" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nr_inventar" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_valoare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cod" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dns" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dns.lb_luni" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_sectie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_lucrare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_gestiune" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_responsabil" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_tip_amortizare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_procent" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont.txtAcont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_datapif" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_uzura" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_sucursala" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_amort_prec" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_coeficient" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ed_denumire" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_expl_mf" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_expl_op" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_buncapital" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_BazaTVA" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_cotaTva" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_cotaTva.Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_TVA" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_prorataTVA" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_amort_max_deductibil" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_valoare_reziduala" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: ndns_max
		*p: ndns_min
		*p: nidtipdocinventar
		*p: nid_gestiune
		*p: nid_lucrare
		*p: nid_responsabil
		*p: nid_sectie
		*p: nid_sucursala
		*p: ntipmodificare
		*p: ntip_imobilizare
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 3
		DoCreate = .T.
		Height = 539
		Name = "frm_introducere"
		ndns_max = 0
		ndns_min = 0
		nidtipdocinventar = 18
		nid_gestiune = 0
		nid_lucrare = 0
		nid_responsabil = 0
		nid_sectie = 0
		nid_sucursala = 0
		ntipmodificare = 1
		ntip_imobilizare = 0
		Width = 672
		_memberdata = <VFPData>
			<memberdata name="nidtipdocinventar" type="property" display="nIdTipDocInventar"/>
		</VFPData>
		_shape1.Anchor = 10
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 708
		_shape2.Height = 29
		_shape2.Left = 597
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 76
		Lb_titlu_alb_b121.Caption = "INTRODUCERE IMOBILIZARI"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 32
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 639
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 30
		BUT_TERMIN1.Top = 1
		GRIDSORT1.Name = "GRIDSORT1"
	*</PropValue>

	ADD OBJECT 'But_renunt1' AS but_renunt WITH ;
		Anchor = 9, ;
		Left = 606, ;
		Name = "But_renunt1", ;
		TabIndex = 31, ;
		Top = 1
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Cb_coeficient' AS cb_tx_simplu WITH ;
		Height = 29, ;
		Left = 345, ;
		Name = "Cb_coeficient", ;
		TabIndex = 16, ;
		Top = 147, ;
		Width = 312, ;
		_CBBASE1.Enabled = .F., ;
		_CBBASE1.Height = 23, ;
		_CBBASE1.Left = 195, ;
		_CBBASE1.Name = "_CBBASE1", ;
		_CBBASE1.RowSource = "1.5,2,2.5", ;
		_CBBASE1.RowSourceType = 1, ;
		_CBBASE1.Top = 3, ;
		_CBBASE1.Width = 113, ;
		_LBBASE1.Caption = "Coeficient", ;
		_LBBASE1.Name = "_LBBASE1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cb_cotaTva' AS cb_tx_simplu WITH ;
		Enabled = .F., ;
		Left = 18, ;
		Name = "Cb_cotaTva", ;
		TabIndex = 27, ;
		Top = 448, ;
		_CBBASE1.ColumnCount = 3, ;
		_CBBASE1.ColumnLines = .F., ;
		_CBBASE1.ColumnWidths = "30,175,0", ;
		_CBBASE1.Height = 23, ;
		_CBBASE1.Left = 101, ;
		_CBBASE1.Name = "_CBBASE1", ;
		_CBBASE1.RowSource = "cote_TVA.procent,descriere,id_proc_tva", ;
		_CBBASE1.RowSourceType = 2, ;
		_CBBASE1.TabIndex = 1, ;
		_CBBASE1.Top = 3, ;
		_CBBASE1.Width = 162, ;
		_LBBASE1.Caption = "Cota TVA", ;
		_LBBASE1.Name = "_LBBASE1", ;
		_LBBASE1.TabIndex = 2
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cb_cotaTva.Label1' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "%", ;
		Height = 17, ;
		Left = 268, ;
		Name = "Label1", ;
		Top = 7, ;
		Width = 13
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Cb_tip_amortizare' AS cb_tx_simplu WITH ;
		Left = 345, ;
		Name = "Cb_tip_amortizare", ;
		TabIndex = 14, ;
		Top = 91, ;
		Width = 312, ;
		_CBBASE1.ColumnCount = 2, ;
		_CBBASE1.ColumnLines = .F., ;
		_CBBASE1.ColumnWidths = "172,0", ;
		_CBBASE1.Height = 23, ;
		_CBBASE1.Left = 132, ;
		_CBBASE1.Name = "_CBBASE1", ;
		_CBBASE1.RowSource = "v_tipuri_amort.denumire,id_tip_amortizare", ;
		_CBBASE1.RowSourceType = 6, ;
		_CBBASE1.Top = 3, ;
		_CBBASE1.Width = 176, ;
		_LBBASE1.Caption = "Tip amortizare", ;
		_LBBASE1.Name = "_LBBASE1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'ck_buncapital' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Bun de capital", ;
		Left = 24, ;
		Name = "ck_buncapital", ;
		TabIndex = 25, ;
		TabStop = .F., ;
		Top = 399
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Clb_amort_max_deductibil' AS clb_tx_simplu WITH ;
		Enabled = .T., ;
		Left = 345, ;
		Name = "Clb_amort_max_deductibil", ;
		TabIndex = 17, ;
		Top = 175, ;
		Width = 312, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 195, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 113, ;
		Lb_simplu1.Caption = "Amort. max. deductibil", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_amort_prec' AS clb_tx_simplu WITH ;
		Left = 345, ;
		Name = "Clb_amort_prec", ;
		TabIndex = 13, ;
		Top = 63, ;
		Width = 312, ;
		TEXT_SIMPLU1.Alignment = 3, ;
		TEXT_SIMPLU1.Format = "KR", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.InputMask = (get_mask(14,gnPa)), ;
		TEXT_SIMPLU1.Left = 195, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Value = 0, ;
		TEXT_SIMPLU1.Width = 113, ;
		LB_SIMPLU1.Caption = "Amortizare prec (valoare):", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_BazaTVA' AS clb_tx_simplu WITH ;
		Enabled = .F., ;
		Left = 18, ;
		Name = "Clb_BazaTVA", ;
		TabIndex = 26, ;
		Top = 420, ;
		TEXT_SIMPLU1.Alignment = 3, ;
		TEXT_SIMPLU1.Format = "KR", ;
		TEXT_SIMPLU1.InputMask = (get_mask(14,gnPa)), ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Value = 0, ;
		LB_SIMPLU1.Caption = "Baza TVA", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cod' AS clb_tx_simplu WITH ;
		Left = 18, ;
		Name = "Clb_cod", ;
		TabIndex = 9, ;
		Top = 287, ;
		Width = 312, ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 132, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 176, ;
		LB_SIMPLU1.Caption = "Cod", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont' AS clb_tx_simplu WITH ;
		Left = 345, ;
		Name = "Clb_cont", ;
		TabIndex = 19, ;
		Top = 259, ;
		Width = 312, ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 172, ;
		TEXT_SIMPLU1.MaxLength = 4, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 65, ;
		LB_SIMPLU1.Caption = "Cont", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont.txtAcont' AS _textbox WITH ;
		Format = "!K", ;
		Height = 23, ;
		Left = 242, ;
		MaxLength = 4, ;
		Name = "txtAcont", ;
		Top = 2, ;
		Width = 65
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Clb_dataact' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 18, ;
		Name = "Clb_dataact", ;
		TabIndex = 2, ;
		Top = 63, ;
		Width = 312, ;
		TEXT_SIMPLU1.Alignment = 1, ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 132, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Value = {}, ;
		TEXT_SIMPLU1.Width = 176, ;
		LB_SIMPLU1.Caption = "Data doc. achizitie", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_datapif' AS clb_tx_simplu WITH ;
		Left = 18, ;
		Name = "Clb_datapif", ;
		TabIndex = 7, ;
		Top = 231, ;
		Width = 312, ;
		TEXT_SIMPLU1.Alignment = 1, ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 132, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Value = {}, ;
		TEXT_SIMPLU1.Width = 176, ;
		LB_SIMPLU1.Caption = "Data p.i.f.", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_dns' AS clb_tx_simplu WITH ;
		Height = 42, ;
		Left = 18, ;
		Name = "Clb_dns", ;
		TabIndex = 10, ;
		Top = 315, ;
		Width = 312, ;
		TEXT_SIMPLU1.Alignment = 3, ;
		TEXT_SIMPLU1.Format = "K", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 239, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Value = 0, ;
		TEXT_SIMPLU1.Width = 69, ;
		LB_SIMPLU1.Caption = "Durata normala de serviciu (luni)", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_dns.lb_luni' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "(luni)", ;
		FontBold = .T., ;
		Height = 17, ;
		Left = 72, ;
		Name = "lb_luni", ;
		Top = 21, ;
		Width = 30
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Clb_expl_mf' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 18, ;
		Name = "Clb_expl_mf", ;
		TabIndex = 4, ;
		Top = 147, ;
		Width = 312, ;
		TEXT_SIMPLU1.Format = "!K", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 84, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 224, ;
		LB_SIMPLU1.AutoSize = .T., ;
		LB_SIMPLU1.Caption = "Descriere", ;
		LB_SIMPLU1.Height = 18, ;
		LB_SIMPLU1.Left = 8, ;
		LB_SIMPLU1.Name = "LB_SIMPLU1", ;
		LB_SIMPLU1.Top = 6, ;
		LB_SIMPLU1.Width = 57
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_expl_op' AS clb_tx_simplu WITH ;
		Height = 36, ;
		Left = 18, ;
		Name = "Clb_expl_op", ;
		TabIndex = 11, ;
		Top = 356, ;
		Width = 312, ;
		TEXT_SIMPLU1.Format = "!K", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 84, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 7, ;
		TEXT_SIMPLU1.Width = 224, ;
		LB_SIMPLU1.Caption = "Descriere operatie", ;
		LB_SIMPLU1.Left = 8, ;
		LB_SIMPLU1.Name = "LB_SIMPLU1", ;
		LB_SIMPLU1.Top = 4, ;
		LB_SIMPLU1.WordWrap = .T.
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_gestiune' AS clb_tx_simplu WITH ;
		Left = 345, ;
		Name = "Clb_gestiune", ;
		TabIndex = 20, ;
		Top = 287, ;
		Width = 312, ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 132, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 176, ;
		LB_SIMPLU1.Caption = "Gestiune", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_lucrare' AS clb_tx_simplu WITH ;
		Left = 345, ;
		Name = "Clb_lucrare", ;
		TabIndex = 23, ;
		Top = 371, ;
		Width = 312, ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 132, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 176, ;
		LB_SIMPLU1.Caption = "Lucrare", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nr_inventar' AS clb_tx_simplu WITH ;
		Left = 18, ;
		Name = "Clb_nr_inventar", ;
		TabIndex = 8, ;
		Top = 259, ;
		Width = 312, ;
		TEXT_SIMPLU1.Alignment = 3, ;
		TEXT_SIMPLU1.Format = "K", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 132, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Value = 0, ;
		TEXT_SIMPLU1.Width = 176, ;
		LB_SIMPLU1.Caption = "Nr. inventar", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nract' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 18, ;
		Name = "Clb_nract", ;
		TabIndex = 1, ;
		Top = 35, ;
		Width = 312, ;
		TEXT_SIMPLU1.Alignment = 3, ;
		TEXT_SIMPLU1.Format = "K", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 132, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Value = 0, ;
		TEXT_SIMPLU1.Width = 176, ;
		LB_SIMPLU1.Caption = "Nr. doc. achizitie", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nrpif' AS clb_tx_simplu WITH ;
		Left = 18, ;
		Name = "Clb_nrpif", ;
		TabIndex = 6, ;
		Top = 203, ;
		Width = 312, ;
		TEXT_SIMPLU1.Alignment = 3, ;
		TEXT_SIMPLU1.Format = "K", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 132, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Value = 0, ;
		TEXT_SIMPLU1.Width = 176, ;
		LB_SIMPLU1.Caption = "Nr. p.i.f.", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_procent' AS clb_tx_simplu WITH ;
		Left = 345, ;
		Name = "Clb_procent", ;
		TabIndex = 15, ;
		Top = 119, ;
		Width = 312, ;
		TEXT_SIMPLU1.Alignment = 3, ;
		TEXT_SIMPLU1.Enabled = .F., ;
		TEXT_SIMPLU1.Format = "KR", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.InputMask = "99.99", ;
		TEXT_SIMPLU1.Left = 195, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Value = 0, ;
		TEXT_SIMPLU1.Width = 113, ;
		LB_SIMPLU1.Caption = "Procent", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_prorataTVA' AS clb_tx_simplu WITH ;
		Enabled = .F., ;
		Left = 18, ;
		Name = "Clb_prorataTVA", ;
		TabIndex = 29, ;
		Top = 504, ;
		TEXT_SIMPLU1.Alignment = 3, ;
		TEXT_SIMPLU1.Format = "KR", ;
		TEXT_SIMPLU1.InputMask = (get_mask(14,gnPa)), ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Value = 0, ;
		LB_SIMPLU1.Caption = "Prorata TVA", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_responsabil' AS clb_tx_simplu WITH ;
		Left = 345, ;
		Name = "Clb_responsabil", ;
		TabIndex = 21, ;
		Top = 315, ;
		Width = 312, ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 132, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 176, ;
		LB_SIMPLU1.Caption = "Responsabil", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_sectie' AS clb_tx_simplu WITH ;
		Left = 345, ;
		Name = "Clb_sectie", ;
		TabIndex = 22, ;
		Top = 343, ;
		Width = 312, ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 132, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 176, ;
		LB_SIMPLU1.Caption = "Sectie", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_sucursala' AS clb_tx_simplu WITH ;
		Left = 345, ;
		Name = "Clb_sucursala", ;
		TabIndex = 24, ;
		ToolTipText = "Dublu click pentru modificare", ;
		Top = 399, ;
		Width = 312, ;
		ZOrderSet = 23, ;
		Text_simplu1.ControlSource = "", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Dublu click pentru modificare", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Sucursala", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_TVA' AS clb_tx_simplu WITH ;
		Enabled = .F., ;
		Left = 18, ;
		Name = "Clb_TVA", ;
		TabIndex = 28, ;
		Top = 476, ;
		TEXT_SIMPLU1.Alignment = 3, ;
		TEXT_SIMPLU1.Format = "KR", ;
		TEXT_SIMPLU1.InputMask = (get_mask(14,gnPa)), ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Value = 0, ;
		LB_SIMPLU1.Caption = "TVA", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_uzura' AS clb_tx_simplu WITH ;
		Left = 345, ;
		Name = "Clb_uzura", ;
		TabIndex = 12, ;
		Top = 35, ;
		Width = 312, ;
		TEXT_SIMPLU1.Alignment = 3, ;
		TEXT_SIMPLU1.Format = "KR", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.InputMask = "9 999", ;
		TEXT_SIMPLU1.Left = 195, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Value = 0, ;
		TEXT_SIMPLU1.Width = 113, ;
		LB_SIMPLU1.Caption = "Uzura precedenta (luni)", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_valoare' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 18, ;
		Name = "Clb_valoare", ;
		TabIndex = 5, ;
		Top = 175, ;
		Width = 312, ;
		TEXT_SIMPLU1.Alignment = 3, ;
		TEXT_SIMPLU1.Format = "KR", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.InputMask = (get_mask(14,gnPa)), ;
		TEXT_SIMPLU1.Left = 132, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Value = 0, ;
		TEXT_SIMPLU1.Width = 176, ;
		LB_SIMPLU1.Caption = "Valoare de achizitie", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_valoare_reziduala' AS clb_tx_simplu WITH ;
		Enabled = .T., ;
		Left = 345, ;
		Name = "clb_valoare_reziduala", ;
		TabIndex = 18, ;
		Top = 203, ;
		Width = 312, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 195, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 113, ;
		Lb_simplu1.Caption = "Valoare reziduala", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Ed_denumire' AS ed_tx_simplu WITH ;
		Height = 57, ;
		Left = 18, ;
		Name = "Ed_denumire", ;
		TabIndex = 3, ;
		Top = 91, ;
		Width = 312, ;
		_EDBASE1.Format = "!K", ;
		_EDBASE1.Height = 48, ;
		_EDBASE1.Left = 68, ;
		_EDBASE1.MaxLength = 100, ;
		_EDBASE1.Name = "_EDBASE1", ;
		_EDBASE1.Top = 2, ;
		_EDBASE1.Width = 240, ;
		_LBBASE1.Caption = "Denumire", ;
		_LBBASE1.Name = "_LBBASE1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />
	
	PROCEDURE inainte_de_do_termin
		*!* 11.11.2009
		*!* marius.mutu
		*!* dezaloc numarul de inventar generat, dar suprascris
		
		*!* 20.06.2014
		*!* marius.mutu
		*!* pack_imob.schimba_mf + parametru pnAmortMaxDeductibil
		
		*!*	********************************************
		*!* 19.02.2026
		*!*	Adaugat functia de verificare numar duplicat 
		*!**********************************************
		
		
		&& verificari procent si coeficient
		
		** tnTip:
		** 1) imob.corporale
		** 2) imob.necorporale
		******************************
		** tnTipModificare
		** 1) introducere
		** 4) transformare in mf
		******************************
		
		
		Local lcAcontC, lcBazatva, lcBunCapital, lcContC, lcExplicatiaC, lcIdGestiuneC, lcIdLucrareC, lcIdMf
		Local lcIdResponsabilC, lcIdSectieC, lcIdSucursalaC, lcIdTipAmortizareC, lcIdTipImobilizareC
		Local lcId_cotatva, lcProrataTVA, lcTva, lc_id_mf_vechi, lcsql, lcvaloare, llSucces, llSucces2
		Local lnAmortizarePrecedenta, lnValoare
		Local llNrInventarDuplicat, lnDNSRamas, lnValoareRamasa, lnValoareRetinuta
		
		Private pcExplicMf, pcExplicOp, pcacont, pccod, pccont, pcdenumire, pctip_amortizare
		Private pdDataOperatie, pddataact, pddatapif, plReturn, pnAmortMaxDeductibil, pnIdMf, pnNouaValoare
		Private pnTipOperatie, pnamort_prec, pncoeficient, pndns, pnid_gestiune, pnid_lucrare
		Private pnid_responsabil, pnid_sectie, pnid_sucursala, pnid_tip_amortizare, pnid_tip_imobilizare
		Private pnnr_inventar, pnnract, pnnrpif, pnprocent, pnuzura, pnvaloare, pnValoareReziduala
		plReturn = .F.
		
		pnTipOperatie = 1 && introducere
		pnIdMf = 0
		
		pccont = []
		pcacont = []
		
		pnid_tip_imobilizare = Thisform.ntip_imobilizare
		
		pnnract = Thisform.clb_nract.text_simplu1.Value
		pddataact = Thisform.clb_dataact.text_simplu1.Value
		pcdenumire = Strtran(Thisform.ed_denumire._edbase1.Value, ['], ["])
		pnvaloare = Thisform.clb_valoare.text_simplu1.Value
		pddatapif = Thisform.clb_datapif.text_simplu1.Value
		pnnrpif = Thisform.clb_nrpif.text_simplu1.Value
		pnnr_inventar = Thisform.clb_nr_inventar.text_simplu1.Value
		pndns = Thisform.clb_dns.text_simplu1.Value
		pnuzura = Thisform.clb_uzura.text_simplu1.Value
		pnamort_prec = Thisform.clb_amort_prec.text_simplu1.Value
		pccod = Thisform.clb_cod.text_simplu1.Value
		pctip_amortizare = Thisform.cb_tip_amortizare._cbbase1.Value
		pnid_tip_amortizare = v_tipuri_amort.id_tip_amortizare
		pnTipOperatie = 1
		
		pnprocent = Thisform.clb_procent.text_simplu1.Value
		pncoeficient = Nvl(Thisform.cb_coeficient._cbbase1.Value, 0)
		
		pnid_gestiune = Thisform.nid_gestiune
		pnid_responsabil = Thisform.nid_responsabil
		pnid_lucrare = Thisform.nid_lucrare
		pnid_sectie = Thisform.nid_sectie
		pnid_sucursala = Thisform.nid_sucursala
		
		pccont = Thisform.clb_cont.text_simplu1.Value
		pcacont = Thisform.clb_cont.txtAcont.Value
		pdDataOperatie = Date(gnAn, gnLuna, 1)
		pcExplicMf = Alltrim(Thisform.clb_expl_mf.text_simplu1.Value)
		pcExplicOp = Alltrim(Thisform.clb_expl_op.text_simplu1.Value)
		lcBazatva = Alltrim(Transform(Thisform.clb_BazaTVA.text_simplu1.Value))
		lcTva = Alltrim(Transform(Thisform.clb_TVA.text_simplu1.Value))
		lcId_cotatva	= Alltrim(Transform(cote_tva.id_proc_tva))
		lcBunCapital = Alltrim(Transform(Thisform.ck_buncapital.Value))
		lcProrataTVA = Alltrim(Transform(Thisform.clb_prorataTVA.text_simplu1.Value))
		
		pnAmortMaxDeductibil = Thisform.clb_amort_max_deductibil.text_simplu1.Value
		pnValoareReziduala = Thisform.clb_valoare_reziduala.text_simplu1.Value
		
		If Thisform.ntipmodificare = 4
			pnTipOperatie = 3
			pcExplicOp = 'TRANSFORMARE IN MF'
		Endif
		
		
		
		llNrInventarDuplicat = VerificaNumarInventar(pnnr_inventar, pnid_tip_imobilizare)
		
		IF llNrInventarDuplicat 
			IF AMESSAGEBOX("Numarul de inventar este duplicat!" + CHR(10) + CHR(13) + "Doriti sa continuati?" , 4+32) = 6
				llNrInventarDuplicat = .F.
			ENDIF 	
		Endif	
		
		Do Case
			CASE llNrInventarDuplicat
				plReturn = .F.
			Case pnnract < 0
				aMESSAGEBOX("Numarul documentului nu poate fi negativ!", 0 + 48, "Atentie")
				Thisform.clb_nract.text_simplu1.SetFocus()
				plReturn = .F.
			Case pnnrpif < 0
				aMESSAGEBOX("Numarul p.i.f. nu poate fi negativ!", 0 + 48, "Atentie")
				Thisform.clb_nrpif.text_simplu1.SetFocus()
				plReturn = .F.
			Case Empty(pddatapif)
				aMESSAGEBOX("Nu ati completat data p.i.f.!", 0 + 48, "Atentie")
				Thisform.clb_datapif.text_simplu1.SetFocus()
				plReturn = .F.
			Case Empty(pcdenumire)
				aMESSAGEBOX("Nu ati completat denumirea!", 0 + 48, "Atentie")
				Thisform.ed_denumire._edbase1.SetFocus()
				plReturn = .F.
			Case Empty(pnvaloare)
				aMESSAGEBOX("Nu ati completat valoarea de intrare!", 0 + 48, "Atentie")
				Thisform.clb_valoare.text_simplu1.SetFocus()
				plReturn = .F.
			Case pnvaloare < 0
				aMESSAGEBOX("Valoarea de intrare nu poate fi negativa!", 0 + 48, "Atentie")
				Thisform.clb_valoare.text_simplu1.SetFocus()
				plReturn = .F.
			Case pnValoareReziduala > pnValoare
				aMESSAGEBOX("Valoarea reziduala nu poate fi mai mare decat valoare de intrare!", 0 + 48, "Atentie")
				Thisform.clb_valoare_reziduala.text_simplu1.SetFocus()
				plReturn = .F.
			Case Empty(pccod) And Thisform.ntip_imobilizare = 1
				aMESSAGEBOX("Nu ati ales codul!", 0 + 48, "Atentie")
				Thisform.clb_cod.text_simplu1.SetFocus()
				plReturn = .F.
			Case Empty(pndns) And Thisform.ndns_min > 0
				aMESSAGEBOX("Nu ati completat durata normala de serviciu!", 0 + 48, "Atentie")
				Thisform.clb_dns.text_simplu1.SetFocus()
				plReturn = .F.
				*!* 23.03.2012
				*!*		Case !Between(pndns,Thisform.ndns_min*12,Thisform.ndns_max*12) And Thisform.ndns_min<>0 And Thisform.ndns_max<>0 And tnTip=1
				*!*			lcMesaj="Durata normala de serviciu trebuie sa fie intre "+Chr(10)+Chr(13)+;
				*!*				THISFORM.clb_dns.lb_luni.Caption+" !"
				*!*			aMESSAGEBOX(format_msg(lcMesaj,40),0+48,"Atentie")
				*!*			Thisform.clb_dns.text_simplu1.SetFocus()
				*!*			plReturn=.F.
				*!* 23.03.2012 ^
			Case pnuzura > pndns
				aMESSAGEBOX("Uzura trebuie sa fie mai mica decat durata normala de serviciu!", 0 + 48, "Atentie")
				Thisform.clb_uzura.text_simplu1.SetFocus()
				plReturn = .F.
			Case pnamort_prec > pnvaloare
				aMESSAGEBOX("Amortizarea precedenta trebuie sa fie mai mica decat valoarea de intrare!", 0 + 48, "Atentie")
				Thisform.clb_amort_prec.text_simplu1.SetFocus()
				plReturn = .F.
			Case Empty(pctip_amortizare)
				aMESSAGEBOX("Nu ati ales tipul amortizarii!", 0 + 48, "Atentie")
				Thisform.cb_tip_amortizare._cbbase1.SetFocus()
				plReturn = .F.
			Case pctip_amortizare = 'ACCELERATA' And !Between(pnprocent, 0, 50)
				aMESSAGEBOX("Procentul trebuie sa fie in intervalul 0 - 50% !", 0 + 48, "Atentie")
				Thisform.clb_procent.text_simplu1.SetFocus()
				plReturn = .F.
			Case Empty(pccont)
				aMESSAGEBOX("Nu ati introdus contul!", 0 + 48, "Atentie")
				Thisform.clb_cont.text_simplu1.SetFocus()
				plReturn = .F.
			Otherwise
				llSucces = .T.
				llSucces2 = .T.
				llSucces = goConn.BeginManualTransaction()
				
				
				
		
				If m.llSucces
					* Introducere mijloc fix
					lcsql = [begin ] + ;
						[pack_imob.adauga_mf(?@pnIdMf,'] + m.gcS + [',?pdDataOperatie,] + Alltrim(Str(m.pnnract,20)) + [,to_date('] + Dtos(m.pddataact) + [','YYYYMMDD'),] + ;
						['] + Upper(Alltrim(m.pcdenumire)) + [',?pcExplicMf,] + Alltrim(Str(m.pnvaloare, 14, gnPa)) + [,] + Alltrim(Str(m.pnValoareReziduala, 14, gnPa)) + [,] + ;
						[to_date('] + Dtos(m.pddatapif) + [','YYYYMMDD'),] + Alltrim(Str(m.pnnrpif,14)) + [,] + ;
						ALLTRIM(Str(m.pnnr_inventar)) + [,'] + Alltrim(m.pccod) + [',] + ;
						ALLTRIM(Str(m.pndns)) + [,] + Alltrim(Str(m.pnuzura)) + [,] + Alltrim(Str(m.pnamort_prec, 14, gnPa)) + [,] + ;
						IIF(m.pnid_gestiune <> 0, Alltrim(Str(m.pnid_gestiune)), 'NULL') + [,] + ;
						IIF(m.pnid_responsabil <> 0, Alltrim(Str(m.pnid_responsabil)), 'NULL') + [,] + ;
						IIF(m.pnid_sectie <> 0, Alltrim(Str(m.pnid_sectie)), 'NULL') + [,] + ;
						IIF(m.pnid_lucrare <> 0, Alltrim(Str(m.pnid_lucrare)), 'NULL') + [,] + ;
						IIF(Nvl(m.pnid_sucursala, 0) = 0, 'NULL', Alltrim(Str(m.pnid_sucursala))) + [,] + ;
						ALLTRIM(Str(m.pnid_tip_amortizare)) + [,] + Alltrim(Str(m.pnprocent, 6, 2)) + [,] + Iif(Type('pncoeficient') = 'N', Alltrim(Str(m.pncoeficient, 6, 2)), 'NULL') + [,] + ;
						ALLTRIM(Str(m.pnid_tip_imobilizare)) + [,'] + Alltrim(m.pccont) + [',] + ;
						['] + Nvl(Alltrim(m.pcacont), []) + [',] + Alltrim(Str(m.gnIdUtil)) + [,] + Alltrim(Str(m.pnAmortMaxDeductibil, 14, m.gnPC)) + ;
						[,0,?pnTipOperatie,?pcExplicOp,] + m.lcBunCapital + [,] + m.lcBazatva + [,] + m.lcTva + [,] + m.lcId_cotatva + [,] + m.lcProrataTVA + [); end;]
		
					llSucces = goExecutor.oExecuta(lcsql)
					If Nvl(m.pnIdMf, 0) = 0
						aMESSAGEBOX('Eroare adaugare mijloc fix (ID = 0)', 0 + 16, _Screen.Caption)
						llSucces = .F.
					Endif
				Endif
		
				If m.llSucces And Thisform.ntipmodificare = 4 && TRANSFORMARE IN MF
					* ADAUG OPERATIE TRANSFORMARE MIJLOC FIX PE FIECARE IMOBILIZARE IN CURS
					Select crslista3
					Go Top
					Scan
						lcIdMf = Alltrim(Str(id_mf))
						lcIdGestiuneC = Iif(Nvl(id_gestiune, 0) = 0, 'NULL', Alltrim(Transform(id_gestiune)))
						lcIdResponsabilC = Iif(Nvl(id_responsabil, 0) = 0, 'NULL', Alltrim(Transform(id_responsabil)))
						lcIdSectieC = Iif(Nvl(id_sectie, 0) = 0, 'NULL', Alltrim(Transform(id_sectie)))
						lcIdLucrareC = Iif(Nvl(id_lucrare, 0) = 0, 'NULL', Alltrim(Transform(id_lucrare)))
						lcIdSucursalaC = Iif(Nvl(id_sucursala, 0) = 0, 'NULL', Alltrim(Transform(id_sucursala)))
						lcContC = Alltrim(Nvl(Cont, ''))
						lcAcontC = Alltrim(Nvl(acont, ''))
						lcExplicatiaC = Upper(Alltrim(Nvl(explicatia, '')))
						lcIdTipAmortizareC = [1] && liniar
						lcIdTipImobilizareC = [3] && in curs
						lnDNSRamas = 0
						lnValoareRamasa = (valoare_ramasa - valoareretinuta)
						lnValoareRetinuta = valoareretinuta
						lnValoare = valoare
		
						lcsql = [begin pack_imob.inreg_transformare_in_mf('] + m.gcS + [',] + lcIdMf + [,?pnIdMf, to_date('] + Dtos(pdDataOperatie) + [','YYYYMMDD'),] + Alltrim(Str(nract,20)) + [,to_date('] + Dtos(data_achizitie) + [','YYYYMMDD'),] + ;
							['] + Upper(Alltrim(denumire)) + [','] + lcExplicatiaC + [',] + Alltrim(Str(m.lnValoare, 14, gnPa)) + [,] + ;
							[to_date('] + Dtos(data_achizitie) + [','YYYYMMDD'),] + Alltrim(Str(nr_inventar)) + [,] + ;
							ALLTRIM(Str(nr_inventar)) + [,NULL,0,0,] + ALLTRIM(STR(m.lnDnsRamas)) + [,] + Alltrim(Str(m.lnValoareRamasa, 14, gnPa)) + [,] + Alltrim(Str(m.lnValoareRetinuta, 14, gnPa)) + [,]+ ;
							lcIdGestiuneC + [,] + ;
							lcIdResponsabilC + [,] + ;
							lcIdSectieC + [,] + ;
							lcIdLucrareC + [,] + ;
							lcIdSucursalaC + [,] + ;
							lcIdTipAmortizareC + [,0,NULL,] + ;
							lcIdTipImobilizareC + [,'] + lcContC + [',] + ;
							['] + lcAcontC + [',] + Alltrim(Str(gnIdUtil)) + [,0,0, to_date('] + Dtos(pddataact) + [','YYYYMMDD'),] + Alltrim(Str(pnnract,20)) + [,3); end;]
						
						
		
						llSucces = goExecutor.oExecuta(lcsql)
						If !m.llSucces
							Exit
						Endif
					Endscan
		
					Use In (Select('crslista3'))
				Endif && llSucces and Thisform.ntipmodificare = 4
		
				llSucces2 = goConn.EndManualTransaction(Iif(m.llSucces, 'COMMIT', 'ROLLBACK'))
		
				plReturn = m.llSucces And m.llSucces2
		Endcase
		
		*!* 11.11.2009
		*!* dezaloc numarul de inventar generat, dar suprascris
		If m.plReturn And Type('poGeneratorNumere') = 'O'
			poGeneratorNumere.verifica_numar(This.nIdTipDocInventar, m.pnnr_inventar)
		Endif
		*!* 11.11.2009 ^
		
		Return m.plReturn
		
		 
	ENDPROC

	PROCEDURE Init
		*!* 11.11.2009
		*!* marius.mutu
		*!* alocare numar inventar pentru introducere, transformare in mf
		
		*!* 16.11.2009
		*!* marius.mutu
		*!* preluare din contabilitate - explicatia = explicatia3
		
		*!* 25.03.2013
		*!* marius.mutu
		*!* adaugat amort_max_deductibil - pentru inchiderea de amortizare (suma maxima din amortizare care este deductibila; ex: 02/2013 auto 9 scaune maxim 1500 lei)
		*!* art. 24 din Codul fiscal 2013, modificari ce vor intra in vigoare incepand cu data de 1 februarie 2013.
		
		Parameters tnTip,tnTipModificare, toMF
		******************************
		** tnTip:
		** 1) imob.corporale
		** 2) imob.necorporale
		******************************
		** tnTipModificare
		** 1) introducere
		** 2) modificare cu istoric - nu mai este folosit
		** 3) modificare fara istoric - nu mai este folosit
		** 4) transformare in mf
		******************************
		
		
		DoDefault()
		
		If tnTipModificare>1
			Thisform.lb_titlu_alb_b121.Caption="FISA MIJLOCULUI FIX - IMOBILIZARI"
		
			Thisform.clb_nract.text_simplu1.Value=poDetaliiMf.nract
			Thisform.clb_dataact.text_simplu1.Value=Iif(Type('poDetaliiMf.data_achizitie')='D',poDetaliiMf.data_achizitie,Ttod(poDetaliiMf.data_achizitie))
			Thisform.ed_denumire._edbase1.Value=poDetaliiMf.denumire
			Thisform.clb_valoare.text_simplu1.Value=poDetaliiMf.valoare
			Thisform.clb_nr_inventar.text_simplu1.Value=poDetaliiMf.nr_inventar
			Thisform.clb_gestiune.text_simplu1.Value=poDetaliiMf.gestiune
			Thisform.clb_responsabil.text_simplu1.Value=poDetaliiMf.responsabil
			Thisform.clb_lucrare.text_simplu1.Value=poDetaliiMf.nrord
			Thisform.clb_sectie.text_simplu1.Value=poDetaliiMf.sectie
			Thisform.clb_cont.text_simplu1.Value=poDetaliiMf.Cont
		
			Thisform.clb_sucursala.text_simplu1.Value=poDetaliiMf.sucursala
			
			Thisform.nid_gestiune= poDetaliiMf.id_gestiune
			Thisform.nid_responsabil=poDetaliiMf.id_responsabil
			Thisform.nid_lucrare=poDetaliiMf.id_lucrare
			Thisform.nid_sectie=poDetaliiMf.id_sectie
			Thisform.nid_sucursala = poDetaliiMf.id_sucursala
		
			If tnTipModificare!=4
				Thisform.clb_datapif.text_simplu1.Value=Iif(Type('poDetaliiMf.data_pif')='D',poDetaliiMf.data_pif,Ttod(poDetaliiMf.data_pif))
				Thisform.clb_nrpif.text_simplu1.Value=poDetaliiMf.nr_pif
				Thisform.clb_dns.text_simplu1.Value=poDetaliiMf.dns_luni
				Thisform.clb_uzura.text_simplu1.Value=poDetaliiMf.uzura
				Thisform.clb_amort_prec.text_simplu1.Value=poDetaliiMf.amort_prec
				Thisform.clb_cod.text_simplu1.Value=poDetaliiMf.cod_mf
				Select v_tipuri_amort
				Locate For Upper(Alltrim(denumire))=Upper(Alltrim(poDetaliiMf.tip_amortizare))
				If Found()
					Thisform.cb_tip_amortizare._cbbase1.Value=Upper(Alltrim(denumire))
				Endif
				Thisform.clb_cont.txtAcont.Value=poDetaliiMf.acont
		
				Thisform.clb_amort_max_deductibil.Value=poDetaliiMf.amort_max_deductibil
		
			Else && la transformare in mf - mf-ul trebuie sa aiba sucursala curenta (sau sucursala imobilizarii in curs?)
				Thisform.nid_sucursala = gnIdSucursala	
			Endif
		Else
			pddataazi=get_prima_zi()
		
			Thisform.clb_dataact.text_simplu1.Value=pddataazi
			Thisform.clb_datapif.text_simplu1.Value=pddataazi
		
			Thisform.nid_sucursala = gnIdSucursala
			If Type('toMF') = 'O'
				Thisform.clb_nract.text_simplu1.Value = toMF.nract
				Thisform.clb_dataact.text_simplu1.Value = toMF.dataact
				Thisform.clb_valoare.text_simplu1.Value = toMF.valoare
				THISFORM.clb_cont.text_SIMPLU1.Value = toMF.cont
				*!* 16.11.2009
				thisform.clb_expl_mf.text_simplu1.Value = ALLTRIM(NVL(toMF.explicatia,''))
				thisform.ed_denumire._edbase1.Value = ALLTRIM(NVL(toMF.explicatia,''))		
				*!* 16.11.2009				
			EndIf 
		Endif
		
		If tnTip=1
			Thisform.lb_titlu_alb_b121.Caption=Thisform.lb_titlu_alb_b121.Caption+" CORPORALE"
			thisform.ck_buncapital.Visible = .t.
		Else
			Thisform.lb_titlu_alb_b121.Caption=Thisform.lb_titlu_alb_b121.Caption+" NECORPORALE"
			This.clb_cod.Enabled = .F.
			thisform.ck_buncapital.Visible = .f.
		Endif
		
		*!* 08.04.2008
		THIS.clb_Sucursala.Visible = glEMama
		*!* 08.04.2008 ^
		
		Thisform.ntip_imobilizare=tnTip
		Thisform.ntipmodificare=tnTipModificare
		thisform.Height = 417
		
		
		*!* 11.11.2009
		IF INLIST(tnTipModificare, 1, 4) && introducere, transformare in mf
			LOCAL lnNrInventar
			lnNrInventar = poGeneratorNumere.aloca_numar(this.nIdTipDocInventar, tnTip)
			lnNrInventar = ROUND(m.lnNrInventar, 0)
			this.clb_nr_inventar.text_simplu1.Value = m.lnNrInventar
		ENDIF 	
		*!* 11.11.2009
	ENDPROC

	PROCEDURE Cb_cotaTva._CBBASE1.LostFocus
		thisform.clb_TVA.text_simplu1.Value = Round((cote_tva.proc_tva-1)*thisform.clb_bazaTVA.text_simplu1.Value,gnPa)
		thisform.clb_TVA.text_simplu1.Refresh 
	ENDPROC

	PROCEDURE Cb_tip_amortizare._CBBASE1.Init
		SELECT v_tipuri_amort
		GO TOP 
		this.Value = ALLTRIM(v_tipuri_amort.denumire)
	ENDPROC

	PROCEDURE Cb_tip_amortizare._CBBASE1.InteractiveChange
		If ALLTRIM(This.Value)='ACCELERATA'
			Thisform.clb_procent.text_simplu1.Enabled=.T.
		Else
			Thisform.clb_procent.text_simplu1.Enabled=.F.
		Endif
		If ALLTRIM(This.Value)='DEGRESIVA'
			Thisform.cb_coeficient._CBBASE1.Enabled=.T.
			lnDns=Thisform.clb_dns.text_simplu1.Value
			Do Case
			Case Between(lnDns,24,60)
				Thisform.cb_coeficient._CBBASE1.Value=1
			Case Between(lnDns,61,120)
				Thisform.cb_coeficient._CBBASE1.Value=2
			Case lnDns>120
				Thisform.cb_coeficient._CBBASE1.Value=3
			Endcase
			Thisform.cb_coeficient._CBBASE1.Refresh
		Else
			Thisform.cb_coeficient._CBBASE1.Enabled=.F.
		Endif
	ENDPROC

	PROCEDURE ck_buncapital.Click
		If this.Value = 1 
			thisform.Height=539
			thisform.clb_BazaTVA.Enabled= .T.
			thisform.cb_cotaTva.Enabled= .T.
			thisform.clb_tvA.Enabled= .T.
			thisform.clb_prorataTva.Enabled= .T.
		Else 
			thisform.Height = 417
			thisform.clb_BazaTVA.Enabled= .F.
			thisform.cb_cotaTva.Enabled= .F.
			thisform.clb_tvA.Enabled= .F.
			thisform.clb_prorataTva.Enabled= .F.	
		EndIf 
	ENDPROC

	PROCEDURE Clb_cod.TEXT_SIMPLU1.DblClick
		Private pccod,pnnorma_min,pnnorma_max
		Store 0 To pnnorma_min,pnnorma_max
		Store '' To pccod_mf
		Store '' To ofrmnorme
		=ccnorme()
		ofrmnorme=Createobject('frm_norme')
		ofrmnorme.Show(1)
		Release ofrmnorme
		If !Empty(pccod_mf)
			Thisform.clb_cod.text_simplu1.Value=Alltrim(pccod_mf)
			Thisform.ndns_min=pnnorma_min
			Thisform.ndns_max=pnnorma_max
			lnNormaMinLuni=pnnorma_min*12
			lnNormaMaxLuni=pnnorma_max*12
			Thisform.clb_dns.lb_luni.Caption=Alltrim(Str(pnnorma_min))+"-"+Alltrim(Str(pnnorma_max))+" ani ( "+;
				ALLTRIM(Str(lnNormaMinLuni))+"-"+Alltrim(Str(lnNormaMaxLuni))+" luni )"
			Thisform.clb_dns.text_simplu1.Value=lnNormaMinLuni
		
			Do Case
			Case Left(Alltrim(pccod_mf),2) = [1.]
				lcCont = '212 '
			Case Left(Alltrim(pccod_mf),2) = [2.]
				If Left(Alltrim(pccod_mf),3) # [2.5]
					lcCont = '213' + Substr(Alltrim(pccod_mf),3,1)
				Else
					lcCont = '213'
				Endif
			Case Left(Alltrim(pccod_mf),2) = [3.]
				lcCont= '214'
			Case Left(Alltrim(pccod_mf),2) = [0.]
				lcCont= '2111'		
			Otherwise
				lcCont = ''
			Endcase
		
			Thisform.clb_cont.text_simplu1.Value=lcCont
			Thisform.clb_dns.text_simplu1.SetFocus()
		Endif
	ENDPROC

	PROCEDURE Clb_cod.TEXT_SIMPLU1.GotFocus
		IF EMPTY(THIS.VALUE)
			PRIVATE pccod,pnnorma_min,pnnorma_max
			STORE 0 TO pnnorma_min,pnnorma_max
			STORE '' TO pccod_mf
			STORE '' TO ofrmnorme
			=ccnorme()
			ofrmnorme=CREATEOBJECT('frm_norme')
			ofrmnorme.SHOW(1)
			RELEASE ofrmnorme
			IF !EMPTY(pccod_mf)
				THISFORM.clb_cod.text_simplu1.VALUE=ALLTRIM(pccod_mf)
				THISFORM.ndns_min=pnnorma_min
				THISFORM.ndns_max=pnnorma_max
				lnNormaMinLuni=pnnorma_min*12
				lnNormaMaxLuni=pnnorma_max*12
				THISFORM.clb_dns.lb_luni.CAPTION=ALLTRIM(STR(pnnorma_min))+"-"+ALLTRIM(STR(pnnorma_max))+" ani ( "+;
					ALLTRIM(STR(lnNormaMinLuni))+"-"+ALLTRIM(STR(lnNormaMaxLuni))+" luni )"
				THISFORM.clb_dns.text_simplu1.VALUE=lnNormaMinLuni
		
				DO CASE
					CASE LEFT(ALLTRIM(pccod_mf),2) = [1.]
						lcCont = '212 '
					CASE LEFT(ALLTRIM(pccod_mf),2) = [2.]
						IF LEFT(ALLTRIM(pccod_mf),3) # [2.5]
							lcCont = '213' + SUBSTR(ALLTRIM(pccod_mf),3,1)
						ELSE
							lcCont = '213'
						ENDIF
					CASE LEFT(ALLTRIM(pccod_mf),2) = [3.]
						lcCont= '214'
					CASE LEFT(ALLTRIM(pccod_mf),2) = [0.]
						lcCont= '2111'
					OTHERWISE
						lcCont = ''
				ENDCASE
		
				THISFORM.clb_cont.text_simplu1.VALUE=lcCont
				THISFORM.clb_dns.text_simplu1.SETFOCUS()
			ENDIF
		ENDIF
		
	ENDPROC

	PROCEDURE Clb_dataact.TEXT_SIMPLU1.Valid
		Thisform.clb_datapif.text_simplu1.Value=this.Value 
	ENDPROC

	PROCEDURE Clb_dns.TEXT_SIMPLU1.Valid
		lnDNS = this.value
		IF !Between(m.lnDNS,Thisform.ndns_min*12,Thisform.ndns_max*12) And Thisform.ndns_min<>0 And Thisform.ndns_max<>0 And tnTip=1
			lcMesaj="Durata normala de serviciu trebuie sa fie intre "+Chr(10)+Chr(13)+;
				THISFORM.clb_dns.lb_luni.Caption+" !"
			aMESSAGEBOX(format_msg(lcMesaj,40),0+48,"Atentie")
		ENDIF 
	ENDPROC

	PROCEDURE Clb_gestiune.TEXT_SIMPLU1.DblClick
		Local loCauta
		Store "" To locauta
		locauta = caut_gestiune(,gnIdUtil)
		*If !Empty(locauta.id_gestiune)
			Thisform.nid_gestiune=NVL(locauta.id_gestiune,0)
			This.Value=Alltrim(NVL(locauta.nume_gestiune,''))
		*Endif
		
	ENDPROC

	PROCEDURE Clb_gestiune.TEXT_SIMPLU1.GotFocus
		If Empty(This.Value)
			this.DblClick()
		Endif
	ENDPROC

	PROCEDURE Clb_lucrare.TEXT_SIMPLU1.DblClick
		Store "" To locauta
		pcselect = ['select nrord,id_lucrare FROM ] + gcs + [.vnom_lucrari where inactiv=0']
		pcfiltru = [1=2]
		pcschema = ['']
		pcorder = [nrord]
		pccoloane = [nrord]
		pcTitlu = [Alegeti lucrarea]
		pcTitluColoane = [Lucrare]
		locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,"nom_lucrari")
		*If !Empty(locauta.nrord)
			Thisform.nid_lucrare=NVL(locauta.id_lucrare,0)
			This.Value=Alltrim(NVL(locauta.nrord,''))
		*Endif
		
		
	ENDPROC

	PROCEDURE Clb_lucrare.TEXT_SIMPLU1.GotFocus
		If Empty(This.Value)
			Local loCauta
			Store "" To locauta
			locauta = caut_lucrare()
			If !Empty(locauta.nrord)
				Thisform.nid_lucrare=locauta.id_lucrare
				This.Value=Alltrim(locauta.nrord)
			Endif
		Endif
	ENDPROC

	PROCEDURE Clb_responsabil.TEXT_SIMPLU1.DblClick
		Store "" To locauta
		pcselect = ['select nume,id_responsabil FROM ] + gcs + [.vnom_responsabili where inactiv=0']
		pcfiltru = [1=2]
		pcschema = ['']
		pcorder = [nume]
		pccoloane = [nume]
		pcTitlu = [Alegeti responsabilul]
		pcTitluColoane = [Responsabil]
		locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,"")
		*If !Empty(locauta.nume)
			Thisform.nid_responsabil=NVL(locauta.id_responsabil,0)
			This.Value=Alltrim(NVL(locauta.nume,''))
		*Endif
	ENDPROC

	PROCEDURE Clb_responsabil.TEXT_SIMPLU1.GotFocus
		If Empty(This.Value)
			Local loCauta
			Store "" To locauta
			locauta = caut_responsabil()
			If !Empty(locauta.nume)
				Thisform.nid_responsabil=locauta.id_responsabil
				This.Value=Alltrim(locauta.nume)
			Endif
		Endif
	ENDPROC

	PROCEDURE Clb_sectie.TEXT_SIMPLU1.DblClick
		Local loCauta
		Store "" To locauta
		locauta = caut_sectie()
		*If !Empty(locauta.sectie)
			Thisform.nid_sectie=NVL(locauta.id_sectie,0)
			This.Value=Alltrim(NVL(locauta.sectie,''))
		*Endif
	ENDPROC

	PROCEDURE Clb_sectie.TEXT_SIMPLU1.GotFocus
		If Empty(This.Value)
			Local loCauta
			Store "" To locauta
			locauta = caut_sectie()
			If !Empty(locauta.sectie)
				Thisform.nid_sectie=locauta.id_sectie
				This.Value=Alltrim(locauta.sectie)
			Endif
		Endif
	ENDPROC

	PROCEDURE Clb_sucursala.Text_simplu1.DblClick
		Local llBlank, llNou, llToateIreg, loSucursala
		
		llBlank = .T.
		llNou = .F.
		llToateIreg = .F.
		loSucursala = caut_sucursala(llToateIreg, llNou, llBlank)
		Thisform.nid_sucursala = loSucursala.id_sucursala
		This.Value = Alltrim(loSucursala.sucursala)
		
	ENDPROC

	PROCEDURE Clb_valoare.TEXT_SIMPLU1.LostFocus
		thisform.clb_BazaTVA.text_simplu1.Value = this.Value
		
	ENDPROC

	PROCEDURE Ed_denumire._EDBASE1.KeyPress
		LPARAMETERS nKeyCode, nShiftAltCtrl
		If nKeyCode = 13 && sa nu mai adauge CRLF la numele imobilizarii
			NoDefault 
			thisform.clb_valoare.texT_SIMPLU1.SetFocus()
		EndIf 
	ENDPROC

ENDDEFINE

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

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nract" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dataact" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nr_inventar" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_valoare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_sectie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_lucrare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_gestiune" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_responsabil" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ed_denumire" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_expl_op" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_sucursala" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_acont" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: cacont
		*p: ccont
		*p: nidtipdocinventar
		*p: nid_gestiune
		*p: nid_lista_mf
		*p: nid_lucrare
		*p: nid_mf
		*p: nid_operatie		&& 0
		*p: nid_responsabil
		*p: nid_sectie
		*p: nid_sucursala
		*p: tipmodificare
	*</DefinedPropArrayMethod>

	*<PropValue>
		AutoCenter = .T.
		BorderStyle = 1
		cacont = 
		ccont = 
		DoCreate = .T.
		Height = 436
		Name = "frm_introducere_curs"
		nidtipdocinventar = 18
		nid_gestiune = 0
		nid_lista_mf = 0
		nid_lucrare = 0
		nid_mf = 0
		nid_operatie = nid_operatie
		nid_responsabil = 0
		nid_sectie = 0
		nid_sucursala = 0
		tipmodificare = 
		Width = 381
		_memberdata = <VFPData>
			<memberdata name="nidtipdocinventar" type="property" display="nIdTipDocInventar"/>
		</VFPData>
		_shape1.Height = 29
		_shape1.Left = 1
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 708
		_shape2.Height = 29
		_shape2.Left = 309
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 73
		Lb_titlu_alb_b121.Caption = "INTRODUCERE IMOBILIZARI IN CURS"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.FontName = "Arial Narrow"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 16
		BUT_TERMIN1.Left = 348
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 14
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

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

	ADD OBJECT 'Clb_acont' AS clb_tx_simplu WITH ;
		Left = 24, ;
		Name = "Clb_acont", ;
		TabIndex = 7, ;
		Top = 230, ;
		Width = 348, ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 132, ;
		TEXT_SIMPLU1.MaxLength = 4, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 176, ;
		LB_SIMPLU1.Caption = "Cont analitic", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont' AS clb_tx_simplu WITH ;
		Left = 24, ;
		Name = "Clb_cont", ;
		TabIndex = 6, ;
		Top = 202, ;
		Width = 348, ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 132, ;
		TEXT_SIMPLU1.MaxLength = 4, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 176, ;
		LB_SIMPLU1.Caption = "Cont", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_dataact' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 24, ;
		Name = "Clb_dataact", ;
		TabIndex = 2, ;
		Top = 73, ;
		Width = 348, ;
		Text_simplu1.Alignment = 1, ;
		Text_simplu1.ControlSource = "", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = {}, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Data doc. achizitie", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_expl_op' AS clb_tx_simplu WITH ;
		Height = 31, ;
		Left = 24, ;
		Name = "Clb_expl_op", ;
		TabIndex = 13, ;
		Top = 398, ;
		Width = 348, ;
		Text_simplu1.Height = 22, ;
		Text_simplu1.Left = 131, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 4, ;
		Text_simplu1.Width = 212, ;
		Lb_simplu1.AutoSize = .T., ;
		Lb_simplu1.Caption = "Explicatie miscare", ;
		Lb_simplu1.Left = 8, ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		Lb_simplu1.Top = 7
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_gestiune' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 24, ;
		Name = "Clb_gestiune", ;
		TabIndex = 8, ;
		Top = 258, ;
		Width = 348, ;
		Text_simplu1.ControlSource = "", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Dublu click pentru modificare", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Gestiune", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_lucrare' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 24, ;
		Name = "Clb_lucrare", ;
		TabIndex = 11, ;
		Top = 342, ;
		Width = 348, ;
		Text_simplu1.ControlSource = "", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Dublu click pentru modificare", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Lucrare", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nr_inventar' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 24, ;
		Name = "Clb_nr_inventar", ;
		TabIndex = 5, ;
		Top = 174, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "", ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.MaxLength = 14, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Nr. inventar", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nract' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 24, ;
		Name = "Clb_nract", ;
		TabIndex = 1, ;
		Top = 45, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "", ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.MaxLength = 14, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Nr. doc. achizitie", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_responsabil' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 24, ;
		Name = "Clb_responsabil", ;
		TabIndex = 9, ;
		Top = 286, ;
		Width = 348, ;
		Text_simplu1.ControlSource = "", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Dublu click pentru modificare", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Responsabil", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_sectie' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 24, ;
		Name = "Clb_sectie", ;
		TabIndex = 10, ;
		Top = 314, ;
		Width = 348, ;
		Text_simplu1.ControlSource = "", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Dublu click pentru modificare", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Sectie", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_sucursala' AS clb_tx_simplu WITH ;
		Left = 24, ;
		Name = "Clb_sucursala", ;
		TabIndex = 12, ;
		ToolTipText = "Dublu click pentru modificare", ;
		Top = 370, ;
		Width = 348, ;
		ZOrderSet = 23, ;
		Text_simplu1.ControlSource = "", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Dublu click pentru modificare", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Sucursala", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_valoare' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 24, ;
		Name = "Clb_valoare", ;
		TabIndex = 4, ;
		Top = 146, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Valoare de achizitie", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Ed_denumire' AS ed_tx_simplu WITH ;
		Height = 46, ;
		Left = 24, ;
		Name = "Ed_denumire", ;
		TabIndex = 3, ;
		Top = 101, ;
		Width = 348, ;
		_edbase1.ControlSource = "", ;
		_edbase1.Format = "!K", ;
		_edbase1.Height = 41, ;
		_edbase1.Left = 68, ;
		_edbase1.MaxLength = 100, ;
		_edbase1.Name = "_edbase1", ;
		_edbase1.Top = 2, ;
		_edbase1.Width = 268, ;
		_lbbase1.Caption = "Denumire", ;
		_lbbase1.Name = "_lbbase1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />
	
	PROCEDURE inainte_de_do_termin
		*!* 16.11.2009
		*!* marius.mutu
		*!* am inlocuit allt(str(pnnr_inventar)) cu ?pnNrInventar - pentru 14 cifre aparea 1.12 + e14
		*!* pcExplicatie in loc de pcExplicatia
		
		*!* 12.04.2013
		*!* marius.mutu
		*!* adauga_mf, schimba_mf + parametru v_amort_max_deductibil = 0
		
		*!*	********************************************
		*!* 19.02.2026
		*!*	Adaugat functia de verificare numar duplicat 
		*!* Adaugat nrdoc si datadoc in schimba_mf cu valoarea null
		*!**********************************************
		
		
		
		Local lcSql, llNrInventarDuplicat, lnSucces, lnValoareReziduala
		*:Global pcExplicatie, pcacont, pccont, pcdenumire, pcexplicatia, pdDataOperatie, pddataact
		*:Global plReturn, pnid_gestiune, pnid_lista_mf, pnid_lucrare, pnid_mf, pnid_operatie
		*:Global pnid_responsabil, pnid_sectie, pnid_sucursala, pnid_tip_amortizare, pnid_tip_imobilizare
		*:Global pnnr_inventar, pnnract, pnvaloare
		
		pnid_tip_imobilizare=3	&&	in curs
		pnid_tip_amortizare=0
		pcexplicatia=[]
		
		pnnract=Thisform.clb_nract.text_simplu1.Value
		pddataact=Thisform.clb_dataact.text_simplu1.Value
		pcdenumire=Thisform.ed_denumire._edbase1.Value
		pnvaloare=Thisform.clb_valoare.text_simplu1.Value
		pnnr_inventar=Thisform.clb_nr_inventar.text_simplu1.Value
		
		pnid_gestiune=Nvl(Thisform.nid_gestiune, 0)
		pnid_responsabil=Nvl(Thisform.nid_responsabil, 0)
		pnid_lucrare=Nvl(Thisform.nid_lucrare, 0)
		pnid_sectie=Nvl(Thisform.nid_sectie, 0)
		pnid_sucursala = Nvl(Thisform.nid_sucursala,0)
		pnid_mf=Thisform.nid_mf
		pnid_operatie=Thisform.nid_operatie
		pnid_lista_mf=Thisform.nid_lista_mf
		
		pdDataOperatie = Date(gnAn,gnLuna,1)
		
		pcExplicatie = Alltrim(Thisform.clb_expl_op.text_simplu1.Value)
		pccont = Alltrim(Nvl(Thisform.clb_cont.text_simplu1.Value, ''))
		pcacont = Alltrim(Nvl(Thisform.clb_acont.text_simplu1.Value, ''))
		*!*	MESSAGEBOX("Nract: "+ALLTRIM(STR(pnnract))+CHR(13)+;
		*!*	"Dataact: "+ALLTRIM(dtoc(pddataact))+CHR(13)+;
		*!*	"Denumire: "+ALLTRIM(pcdenumire)+CHR(13)+;
		*!*	"Valoarea: "+ALLTRIM(STR(pnvaloare))+CHR(13)+;
		*!*	"Nr inventar: "+ALLTRIM(STR(pnnr_inventar))+CHR(13)+;
		*!*	"ID_Gestiune: "+ALLTRIM(STR(pnid_gestiune))+CHR(13)+;
		*!*	"ID_responsabil: "+ALLTRIM(STR(pnid_responsabil))+CHR(13)+;
		*!*	"ID_lucrare: "+ALLTRIM(STR(pnid_lucrare))+CHR(13)+;
		*!*	"ID_sectie: "+ALLTRIM(STR(pnid_sectie)))
		
		lnValoareReziduala = 0
		llNrInventarDuplicat = VerificaNumarInventar(pnnr_inventar, pnid_tip_imobilizare)
		
		IF llNrInventarDuplicat 
			IF AMESSAGEBOX("Numarul de invantar este duplicat" + CHR(10) + CHR(13) + "Doriti sa continuati" , 4+32) = 6
				llNrInventarDuplicat = .F.
			ENDIF 	
		Endif	
		
		
		
		Do Case
			CASE llNrInventarDuplicat
				plReturn = .F.
			Case Empty(pnnract)
				amessagebox("Nu ati completat numarul documentului!",0+48,"Atentie")
				Thisform.clb_nract.text_simplu1.SetFocus()
				plreturn=.F.
			Case pnnract<0
				amessagebox("Numarul documentului nu poate fi negativ!",0+48,"Atentie")
				Thisform.clb_nract.text_simplu1.SetFocus()
				plreturn=.F.
			Case Empty(pddataact)
				amessagebox("Nu ati completat data documentului!",0+48,"Atentie")
				Thisform.clb_dataact.text_simplu1.SetFocus()
				plreturn=.F.
			Case Empty(pcdenumire)
				amessagebox("Nu ati completat denumirea!",0+48,"Atentie")
				Thisform.ed_denumire._edbase1.SetFocus()
				plreturn=.F.
			Case Empty(pnvaloare)
				amessagebox("Nu ati completat valoarea de achizitie!",0+48,"Atentie")
				Thisform.clb_valoare.text_simplu1.SetFocus()
				plreturn=.F.
		*!*		Case pnvaloare<0
		*!*			amessagebox("Valoarea de achizitie nu poate fi negativa!",0+48,"Atentie")
		*!*			Thisform.clb_valoare.text_simplu1.SetFocus()
		*!*			plreturn=.F.
			Case Empty(pnnr_inventar)
				amessagebox("Nu ati completat numarul de inventar!",0+48,"Atentie")
				Thisform.clb_nr_inventar.text_simplu1.SetFocus()
				plreturn=.F.
			Case Empty(pccont)
				amessagebox("Nu ati introdus contul!",0+48,"Atentie")
				Thisform.clb_cont.text_simplu1.SetFocus()
				plreturn=.F.
				*!*	Case Empty(pnid_gestiune)
				*!*		amessagebox("Nu ati ales gestiunea!",0+48,"Atentie")
				*!*		Thisform.clb_gestiune.text_simplu1.SetFocus()
				*!*		plreturn=.F.
				*!*	Case Empty(pnid_lucrare)
				*!*		amessagebox("Nu ati ales lucrarea!",0+48,"Atentie")
				*!*		Thisform.clb_lucrare.text_simplu1.SetFocus()
				*!*		plreturn=.F.
				*!*	Case Empty(pnid_responsabil)
				*!*		amessagebox("Nu ati ales responsabilul!",0+48,"Atentie")
				*!*		Thisform.clb_responsabil.text_simplu1.SetFocus()
				*!*		plreturn=.F.
				*!*	Case Empty(pnid_sectie)
				*!*		amessagebox("Nu ati ales sectia!",0+48,"Atentie")
				*!*		Thisform.clb_sectie.text_simplu1.SetFocus()
				*!*		plreturn=.F.
		
			Otherwise
		
				*adaugare
				If Thisform.tipmodificare =.F.
					*!* 16.11.2009
					lcSql=[begin pack_imob.adauga_mf(']+gcS+[',?pdDataOperatie,?pnnract,to_date(']+Dtos(pddataact)+[','YYYYMMDD'),]+;
						[']+Upper(Alltrim(pcdenumire))+[',']+Upper(Alltrim(pcexplicatie))+[',]+Alltrim(Str(pnvaloare,14,gnPa))+[,]+;
						[to_date('','YYYYMMDD'),0,?pnnr_inventar,'',0,0,0,]+;
						IIF(pnid_gestiune<>0,Alltrim(Str(pnid_gestiune)),'NULL')+[,]+;
						IIF(Nvl(pnid_responsabil,0)<>0,Alltrim(Str(pnid_responsabil)),'NULL')+[,]+;
						IIF(Nvl(pnid_sectie,0)<>0,Alltrim(Str(pnid_sectie)),'NULL')+[,]+;
						IIF(Nvl(pnid_lucrare,0)<>0,Alltrim(Str(pnid_lucrare)),'NULL')+[,] + ;
						IIF(Nvl(pnid_sucursala,0)<>0,Alltrim(Str(pnid_sucursala)),'NULL') + [,NULL,0,0,]+;
						Alltrim(Str(pnid_tip_imobilizare))+[,']+Alltrim(pccont)+[',]+;
						[']+Nvl(Alltrim(pcacont),[])+[',]+Alltrim(Str(gnIdUtil))+[,0,0,1,'] + pcExplicatie + [',0,0,0,0,0); end;]
					*!* 16.11.2009 ^
		
				Else &&modificare
		
					*!* 12.09.2006
					*!* marius.mutu
					*!*			lcsql=[begin pack_imob.schimba_mf(']+gcS+[',]+ALLTRIM(STR(pnid_mf))+[,]+ALLTRIM(STR(pnnract))+;
					*!*				  [,to_date(']+DTOs(pddataact)+[','yyyymmdd'),']+upper(ALLTRIM(pcdenumire))+[',]+ALLTRIM(STR(pnid_operatie))+;
					*!*				  [,]+ALLTRIM(STR(pnvaloare))+[,]+ALLTRIM(STR(pnnr_inventar))+[,]+ALLTRIM(STR(pnid_gestiune))+;
					*!*				  [,]+ALLTRIM(STR(pnid_responsabil))+[,]+ALLTRIM(STR(pnid_sectie))+[,]+ALLTRIM(STR(pnid_lucrare))+;
					*!*				  [,3,]+ALLTRIM(STR(pnid_lista_mf))+[); end;]
		
					*!* 16.11.2009
					lcSql=[begin pack_imob.schimba_mf(]+Alltrim(Str(pnid_mf))+[,?pnnract ] + ;
						[,to_date(']+Dtos(pddataact)+[','yyyymmdd'),']+Upper(Alltrim(pcdenumire))+[',']+;
						UPPER(Alltrim(pcexplicatie))+[',]+[to_date(']+Dtos(pddataact)+[','yyyymmdd'),]+;
						ALLTRIM(Str(pnnract,20))+ [,0,0,1,3,] + Alltrim(Str(pnid_lista_mf)) + [,0, NULL,'] + Alltrim(pccont) + [','] + Alltrim(pcacont) + [',]+;
						[?pnnr_inventar,] + ;
						IIF(pnid_gestiune<>0,Alltrim(Str(pnid_gestiune)),'NULL')+[,]+;
						IIF(pnid_responsabil<>0,Alltrim(Str(pnid_responsabil)),'NULL')+[,]+;
						IIF(pnid_sectie<>0,Alltrim(Str(pnid_sectie)),'NULL')+[,]+;
						IIF(pnid_lucrare<>0,Alltrim(Str(pnid_lucrare)),'NULL')+ [,] + ;
						IIF(pnid_sucursala<>0,Alltrim(Str(pnid_sucursala)),'NULL') + [,'] + ;
						PADL(Month(pddataact),2,'0') + Alltrim(Str(Year(pddataact))) + [','] + Padl(Month(pddataact),2,'0') + Alltrim(Str(Year(pddataact))) + [',] +;
						ALLTRIM(Str(pnid_operatie)) + [,3,] + Transform(pnvaloare) + [,] + Transform(pnvaloare) +  [,] + ;
						[0,] + ALLTRIM(STR(lnValoareReziduala)) + [, TO_DATE('] + Dtos(pddataact) + [', 'YYYYMMDD'),' ] + Upper(Alltrim(pcExplicatie))+[',]+;
						[0, NULL,'] + Padl(Month(pddataact),2,'0') + Alltrim(Str(Year(pddataact))) + [','] + Padl(Month(pddataact),2,'0') + Alltrim(Str(Year(pddataact))) + [',] +;
						[0,0,0,0,NULL,0, ] + Alltrim(Str(gnIdUtil)) + [,0, NULL, NULL); end;]
					*!* 16.11.2009 ^
				Endif
				*!*		STRTOFILE(lcsql,'c:\1.txt')
				lnSucces = goExecutor.oExecute(lcSql)
				If lnSucces < 0
					amessagebox(goExecutor.cEroare,0+16,"Eroare")
				Endif
				plreturn=.T.
		Endcase
		
		*!* 11.11.2009
		*!* dezaloc numarul de inventar generat, dar suprascris
		IF plReturn AND TYPE('poGeneratorNumere') = 'O'
			poGeneratorNumere.verifica_numar(this.nIdTipDocInventar, m.pnnr_inventar)
		ENDIF 
		*!* 11.11.2009 ^
		
		Return plreturn
		 
	ENDPROC

	PROCEDURE Init
		*!* 11.11.2009
		*!* marius.mutu
		*!* generator numere inventar
		
		*!* 16.11.2009
		*!* marius.mutu
		*!* preluare din contabilitate denumire = nume furnizor, explicatia = explicatia3
		
		Parameters tlModificare, toMF
		
		DoDefault()
		Thisform.tipmodificare=tlModificare
		
		If !tlModificare && adaugare
			pddataazi=get_prima_zi()
			Thisform.clb_dataact.text_simplu1.Value = pddataazi
			Thisform.nid_sucursala = gnIdSucursala
			
			If Type('toMF') = 'O'
				Thisform.clb_nract.text_simplu1.Value = toMF.nract
				Thisform.clb_dataact.text_simplu1.Value = toMF.dataact
				Thisform.clb_valoare.text_simplu1.Value = toMF.valoare
				THISFORM.clb_cont.text_SIMPLU1.Value = toMF.cont	
				*!* 16.11.2009
				thisform.clb_expl_op.text_simplu1.Value = ALLTRIM(NVL(toMF.explicatia,''))
				thisform.ed_denumire._edbase1.Value = ALLTRIM(NVL(toMF.part,''))
				*!* 16.11.2009		
			EndIf 
				
		Else && modificare
			Private pocurs
			Select crslista
			*brow
			Scatter Name pocurs
			Thisform.lb_titlu_alb_b121.Caption="MODIFICARE IN CURS"
		
			Thisform.nid_gestiune= pocurs.id_gestiune
			Thisform.nid_lucrare=pocurs.id_lucrare
			Thisform.nid_responsabil=pocurs.id_responsabil
			Thisform.nid_sectie=pocurs.id_sectie
			Thisform.nid_sucursala=pocurs.id_sucursala
			Thisform.nid_lista_mf=pocurs.id_lista_mf
		
			Thisform.clb_nract.text_simplu1.Value		= pocurs.nract
			Thisform.clb_dataact.text_simplu1.Value 	= Iif(Type('pocurs.data_achizitie') = 'D',pocurs.data_achizitie, Ttod(pocurs.data_achizitie))
			Thisform.ed_denumire._edbase1.Value			= Alltrim(pocurs.denumire)
			Thisform.clb_valoare.text_simplu1.Value		= pocurs.valoare
			Thisform.clb_nr_inventar.text_simplu1.Value	= pocurs.nr_inventar
			Thisform.clb_gestiune.text_simplu1.Value	= pocurs.cgest
			Thisform.clb_responsabil.text_simplu1.Value	= Alltrim(pocurs.responsabil)
			Thisform.clb_sectie.text_simplu1.Value		= Alltrim(pocurs.sectie)
			Thisform.clb_lucrare.text_simplu1.Value		= Alltrim(pocurs.nrord)
			Thisform.clb_sucursala.text_simplu1.Value	= Alltrim(pocurs.sucursala)
			Thisform.nid_mf	= pocurs.id_mf
			Thisform.nid_operatie =pocurs.id_operatie_mf
			Thisform.CLB_Cont.TEXT_SIMPLU1.Value = Alltrim(pocurs.Cont)
			Thisform.CLB_ACont.TEXT_SIMPLU1.Value = Alltrim(pocurs.acont)
		
		
		Endif
		
		*!* 08.04.2008
		This.clb_sucursala.Visible = glEMama
		*!* 08.04.2008 ^
		
		*!* 11.11.2009
		IF !tlModificare && introducere
			LOCAL lnNrInventar, lnTip
			lnTip = 3
			lnNrInventar = poGeneratorNumere.aloca_numar(this.nIdTipDocInventar, m.lnTip)
			lnNrInventar = ROUND(m.lnNrInventar, 0)
			this.clb_nr_inventar.text_simplu1.Value = m.lnNrInventar
		ENDIF 	
		*!* 11.11.2009
	ENDPROC

	PROCEDURE Clb_gestiune.Text_simplu1.DblClick
		Local loCauta
		Store "" To locauta
		locauta = caut_gestiune(,gnIdUtil)
		
		If !Empty(locauta.nume_gestiune)
			Thisform.nid_gestiune=locauta.id_gestiune
			This.Value=Alltrim(locauta.nume_gestiune)
		Endif
		
	ENDPROC

	PROCEDURE Clb_gestiune.Text_simplu1.GotFocus
		If Empty(This.Value)
			this.DblClick()
		Endif
	ENDPROC

	PROCEDURE Clb_lucrare.Text_simplu1.DblClick
		Local loCauta
		Store "" To loCauta
		loCauta = caut_lucrare()
		If !Empty(loCauta.nrord)
			Thisform.nid_lucrare=loCauta.id_lucrare
			This.Value=Alltrim(loCauta.nrord)
		Endif
		
	ENDPROC

	PROCEDURE Clb_lucrare.Text_simplu1.GotFocus
		If Empty(This.Value)
			this.DblClick()
		Endif
	ENDPROC

	PROCEDURE Clb_responsabil.Text_simplu1.DblClick
		Local loCauta
		Store "" To loCauta
		loCauta = caut_responsabil()
		If !Empty(loCauta.nume)
			Thisform.nid_responsabil=loCauta.id_responsabil
			This.Value=Alltrim(loCauta.nume)
		Endif
		
	ENDPROC

	PROCEDURE Clb_responsabil.Text_simplu1.GotFocus
		If Empty(This.Value)
			this.DblClick()
		Endif
	ENDPROC

	PROCEDURE Clb_sectie.Text_simplu1.DblClick
		Local loCauta
		Store "" To loCauta
		loCauta = caut_sectie()
		If !Empty(loCauta.sectie)
			Thisform.nid_sectie=loCauta.id_sectie
			This.Value=Alltrim(loCauta.sectie)
		Endif
		
	ENDPROC

	PROCEDURE Clb_sectie.Text_simplu1.GotFocus
		If Empty(This.Value)
			this.DblClick()
		Endif
		
	ENDPROC

	PROCEDURE Clb_sucursala.Text_simplu1.DblClick
		Local llBlank, llNou, llToateIreg, loSucursala
		
		llBlank = .T.
		llNou = .F.
		llToateIreg = .F.
		loSucursala = caut_sucursala(llToateIreg, llNou, llBlank)
		Thisform.nid_sucursala = loSucursala.id_sucursala
		This.Value = Alltrim(loSucursala.sucursala)
		
	ENDPROC

	PROCEDURE Ed_denumire._edbase1.KeyPress
		LPARAMETERS nKeyCode, nShiftAltCtrl
		
		If nKeyCode = 13 && sa nu mai adauge CRLF la numele imobilizarii
			NoDefault 	
			thisform.clb_valoare.texT_SIMPLU1.SetFocus()
		EndIf 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_jurnal AS _frmbase OF "..\comun\clase\_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_listare1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrAct.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrAct.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataAct.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataAct.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataPIF.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataPIF.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrInventar.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrInventar.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDenumire.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDenumire.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValoare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValoare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValoareRamasa.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValoareRamasa.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cCodMF.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cCodMF.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDNS.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDNS.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDNSCalcul.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDNSCalcul.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cUzura.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cUzura.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cCota_luna.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cCota_luna.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cTipAmortizare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cTipAmortizare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cAmortisment.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cAmortisment.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cTotalAmortisment.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cTotalAmortisment.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataUltimaEv.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataUltimaEv.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrGest.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrGest.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cResponsabil.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cResponsabil.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cContDebitor.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cContDebitor.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cUtilizator.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cUtilizator.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataora.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataora.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrPIF.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrPIF.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cCota_an.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cCota_an.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.Column29.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.Column29.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.Column25.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.Column25.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataoraOpSters.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataoraOpSters.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cUtilizatorOpSters.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cUtilizatorOpSters.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataoraOp.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataoraOp.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cUtilizatorOp.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cUtilizatorOp.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.Column30.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.Column30.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nr_inreg" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Gridextra1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_excel1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_start_criterii1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_reset_criterii1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: do_calcul_sume
		*m: do_coloreaza_grid
		*p: filtru
	*</DefinedPropArrayMethod>

	*<PropValue>
		Caption = "Form"
		DoCreate = .T.
		filtru = 
		FontCharSet = 238
		Height = 582
		Name = "frm_jurnal"
		Width = 793
		WindowState = 2
		_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 = 725
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = -1
		_SHAPE2.Width = 69
		LB_TITLU_ALB_B121.Caption = "JURNAL"
		LB_TITLU_ALB_B121.FontBold = .T.
		LB_TITLU_ALB_B121.FontCharSet = 238
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		BUT_TERMIN1.Anchor = 8
		BUT_TERMIN1.Left = 762
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 0
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT 'But_excel1' AS but_excel WITH ;
		Anchor = 8, ;
		Left = 702, ;
		Name = "But_excel1", ;
		Top = 0, ;
		Visible = .T., ;
		ZOrderSet = 27
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_listare1' AS but_listare WITH ;
		Anchor = 8, ;
		Caption = "", ;
		Left = 732, ;
		Name = "But_listare1", ;
		Top = 0
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_reset_criterii1' AS but_reset_criterii WITH ;
		Anchor = 8, ;
		Left = 642, ;
		Name = "But_reset_criterii1", ;
		Top = 0, ;
		Visible = .T.
		*< END OBJECT: ClassLib="..\comun\clase\ocriterii.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_start_criterii1' AS but_start_criterii WITH ;
		Anchor = 8, ;
		Left = 672, ;
		Name = "But_start_criterii1", ;
		Top = 0, ;
		Visible = .T.
		*< END OBJECT: ClassLib="..\comun\clase\ocriterii.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Clb_nr_inreg' AS clb_tx_simplu WITH ;
		Anchor = 12, ;
		Left = 491, ;
		Name = "Clb_nr_inreg", ;
		Top = 548, ;
		Text_simplu1.Alignment = 1, ;
		Text_simplu1.InputMask = "999 999 999", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Nr. inregistrari", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'grd_jurnal' AS _grdbase WITH ;
		Anchor = 15, ;
		ColumnCount = 30, ;
		DeleteMark = .F., ;
		FontSize = 10, ;
		HeaderHeight = 36, ;
		Height = 504, ;
		Left = 12, ;
		Name = "grd_jurnal", ;
		Panel = 1, ;
		RecordSource = "crsjurnal", ;
		RowHeight = 19, ;
		Top = 36, ;
		Width = 768, ;
		Column1.ColumnOrder = 3, ;
		Column1.ControlSource = "nract", ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 10, ;
		Column1.Name = "cNrAct", ;
		Column1.Width = 77, ;
		Column2.ColumnOrder = 4, ;
		Column2.ControlSource = "TTOD(data_achizitie)", ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 10, ;
		Column2.Name = "cDataAct", ;
		Column2.Width = 75, ;
		Column3.ColumnOrder = 6, ;
		Column3.ControlSource = "TTOD(data_pif)", ;
		Column3.FontName = "Arial", ;
		Column3.FontSize = 10, ;
		Column3.Name = "cDataPIF", ;
		Column3.Width = 83, ;
		Column4.ColumnOrder = 7, ;
		Column4.ControlSource = "nr_inventar", ;
		Column4.FontName = "Arial", ;
		Column4.FontSize = 10, ;
		Column4.Name = "cNrInventar", ;
		Column4.Width = 94, ;
		Column5.ColumnOrder = 8, ;
		Column5.ControlSource = "denumire", ;
		Column5.FontName = "Arial", ;
		Column5.FontSize = 10, ;
		Column5.Name = "cDenumire", ;
		Column5.Width = 225, ;
		Column6.ColumnOrder = 9, ;
		Column6.ControlSource = "valoare", ;
		Column6.FontName = "Arial", ;
		Column6.FontSize = 10, ;
		Column6.InputMask = (get_mask(14,gnPa)), ;
		Column6.Name = "cValoare", ;
		Column7.ColumnOrder = 10, ;
		Column7.ControlSource = "valoare_ramasa", ;
		Column7.FontName = "Arial", ;
		Column7.FontSize = 10, ;
		Column7.InputMask = (get_mask(14,gnPa)), ;
		Column7.Name = "cValoareRamasa", ;
		Column7.Width = 97, ;
		Column8.ColumnOrder = 11, ;
		Column8.ControlSource = "cod_mf", ;
		Column8.FontName = "Arial", ;
		Column8.FontSize = 10, ;
		Column8.Name = "cCodMF", ;
		Column8.Width = 60, ;
		Column9.ColumnOrder = 12, ;
		Column9.ControlSource = "dns_luni", ;
		Column9.FontName = "Arial", ;
		Column9.FontSize = 10, ;
		Column9.InputMask = "999 999", ;
		Column9.Name = "cDNS", ;
		Column9.Width = 58, ;
		Column10.ColumnOrder = 13, ;
		Column10.ControlSource = "dns_ramas", ;
		Column10.FontName = "Arial", ;
		Column10.FontSize = 10, ;
		Column10.InputMask = "999 999", ;
		Column10.Name = "cDNSCalcul", ;
		Column10.Width = 54, ;
		Column11.ColumnOrder = 14, ;
		Column11.ControlSource = "uzura_prec", ;
		Column11.FontName = "Arial", ;
		Column11.FontSize = 10, ;
		Column11.InputMask = "999 999", ;
		Column11.Name = "cUzura", ;
		Column11.Width = 55, ;
		Column12.ColumnOrder = 15, ;
		Column12.ControlSource = "cota_luna", ;
		Column12.FontName = "Arial", ;
		Column12.FontSize = 10, ;
		Column12.InputMask = "999.99", ;
		Column12.Name = "cCota_luna", ;
		Column12.Width = 62, ;
		Column13.ColumnOrder = 17, ;
		Column13.ControlSource = "tip_amortizare", ;
		Column13.FontName = "Arial", ;
		Column13.FontSize = 10, ;
		Column13.Name = "cTipAmortizare", ;
		Column13.Width = 86, ;
		Column14.ColumnOrder = 18, ;
		Column14.ControlSource = "rata", ;
		Column14.FontName = "Arial", ;
		Column14.FontSize = 10, ;
		Column14.InputMask = (get_mask(14,gnPa)), ;
		Column14.Name = "cAmortisment", ;
		Column14.Width = 78, ;
		Column15.ColumnOrder = 19, ;
		Column15.ControlSource = "amort_prec+rata", ;
		Column15.FontName = "Arial", ;
		Column15.FontSize = 10, ;
		Column15.InputMask = (get_mask(14,gnPa)), ;
		Column15.Name = "cTotalAmortisment", ;
		Column15.Width = 97, ;
		Column16.ColumnOrder = 2, ;
		Column16.ControlSource = "TTOD(data_operatie)", ;
		Column16.FontName = "Arial", ;
		Column16.FontSize = 10, ;
		Column16.Name = "cDataUltimaEv", ;
		Column16.Width = 76, ;
		Column17.ColumnOrder = 20, ;
		Column17.ControlSource = "cgest", ;
		Column17.FontName = "Arial", ;
		Column17.FontSize = 10, ;
		Column17.Name = "cNrGest", ;
		Column17.Width = 54, ;
		Column18.ColumnOrder = 21, ;
		Column18.ControlSource = "responsabil", ;
		Column18.FontName = "Arial", ;
		Column18.FontSize = 10, ;
		Column18.Name = "cResponsabil", ;
		Column18.Width = 124, ;
		Column19.ColumnOrder = 22, ;
		Column19.ControlSource = "cont", ;
		Column19.FontName = "Arial", ;
		Column19.FontSize = 10, ;
		Column19.Name = "cContDebitor", ;
		Column19.Width = 56, ;
		Column20.ColumnOrder = 24, ;
		Column20.ControlSource = "utilizator", ;
		Column20.FontName = "Arial", ;
		Column20.FontSize = 10, ;
		Column20.Name = "cUtilizator", ;
		Column20.Width = 112, ;
		Column21.ColumnOrder = 25, ;
		Column21.ControlSource = "dataora", ;
		Column21.FontName = "Arial", ;
		Column21.FontSize = 10, ;
		Column21.Name = "cDataora", ;
		Column21.Width = 81, ;
		Column22.ColumnOrder = 5, ;
		Column22.ControlSource = "nr_pif", ;
		Column22.FontName = "Arial", ;
		Column22.FontSize = 10, ;
		Column22.Name = "cNrPIF", ;
		Column22.Width = 75, ;
		Column23.ColumnOrder = 16, ;
		Column23.ControlSource = "cota_an", ;
		Column23.FontName = "Arial", ;
		Column23.FontSize = 10, ;
		Column23.InputMask = "999.99", ;
		Column23.Name = "cCota_an", ;
		Column23.Width = 59, ;
		Column24.ColumnOrder = 1, ;
		Column24.ControlSource = "numeoperatie", ;
		Column24.FontName = "Arial", ;
		Column24.FontSize = 10, ;
		Column24.Name = "Column29", ;
		Column24.Width = 153, ;
		Column25.ColumnOrder = 23, ;
		Column25.ControlSource = "acont", ;
		Column25.FontName = "Arial", ;
		Column25.FontSize = 10, ;
		Column25.Name = "Column25", ;
		Column25.Width = 46, ;
		Column26.ColumnOrder = 29, ;
		Column26.ControlSource = "dataoraop_sters", ;
		Column26.FontName = "Arial", ;
		Column26.FontSize = 10, ;
		Column26.Name = "cDataoraOpSters", ;
		Column26.Width = 93, ;
		Column27.ColumnOrder = 28, ;
		Column27.ControlSource = "utilizatorop_sters", ;
		Column27.FontName = "Arial", ;
		Column27.FontSize = 10, ;
		Column27.Name = "cUtilizatorOpSters", ;
		Column27.Width = 115, ;
		Column28.ColumnOrder = 27, ;
		Column28.ControlSource = "dataoraop", ;
		Column28.FontName = "Arial", ;
		Column28.FontSize = 10, ;
		Column28.Name = "cDataoraOp", ;
		Column28.Width = 106, ;
		Column29.ColumnOrder = 26, ;
		Column29.ControlSource = "utilizatorop", ;
		Column29.FontName = "Arial", ;
		Column29.FontSize = 10, ;
		Column29.Name = "cUtilizatorOp", ;
		Column29.Width = 122, ;
		Column30.ColumnOrder = 30, ;
		Column30.ControlSource = "stersop", ;
		Column30.FontName = "Arial", ;
		Column30.FontSize = 10, ;
		Column30.Name = "Column30", ;
		Column30.Width = 43
		*< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" />

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

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

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

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

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

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

	ADD OBJECT 'grd_jurnal.cCota_an.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cota (an)", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cCota_luna.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cota (luna)", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

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

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

	ADD OBJECT 'grd_jurnal.cDataoraOp.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Dataora adaugare", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cDataoraOpSters.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Dataora sters", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

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

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

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

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

	ADD OBJECT 'grd_jurnal.cDNS.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "DNS (luni)", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cDNSCalcul.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "DNS ramas", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	ADD OBJECT 'grd_jurnal.cTipAmortizare.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Tip amortizare", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cTotalAmortisment.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Total Amortisment", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

	ADD OBJECT 'grd_jurnal.cUtilizatorOp.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Utilizator adaugare", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cUtilizatorOpSters.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Utilizator sters", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cUzura.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Uzura prec. (luni)", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

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

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

	ADD OBJECT 'grd_jurnal.cValoareRamasa.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Valoare ramasa de amortizat", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Gridextra1' AS gridextra WITH ;
		gridexpression = Thisform.grd_jurnal, ;
		Height = 17, ;
		Left = 0, ;
		Name = "Gridextra1", ;
		Top = 84, ;
		Width = 21
		*< END OBJECT: ClassLib="..\comun\utile\gridextras\gridextras.vcx" BaseClass="custom" />
	
	PROCEDURE actualizeaza_grid1
		*!* 19.11.2014
		*!* marius.mutu
		*!* Schimb view-ul sursa sa includ si inregistrarile sterse, daca este cazul
		Parameters tcFiltru, tlSters
		
		Local lcFiltru
		Local lcSelect, llSterse
		If Empty(tcFiltru)
			lcFiltru = poLista.ca_baza1.cfiltru
		Else
			lcFiltru = tcFiltru
		Endif
		
		Thisform.LockScreen = .T.
		Thisform.MousePointer = 11
		
		save_grid_tag(Thisform.grd_jurnal)
		
		* Schimb view-ul sursa sa includ si inregistrarile sterse, daca este cazul
		llSterse = m.tlSters
		lcSelect = poLista.ca_baza1.cSelect
		lcSelect = Strtran(m.lcSelect, Iif(m.llSterse, 'imob_vjurnal2', 'imob_vjurnal2_tot'), Iif(m.llSterse, 'imob_vjurnal2_tot', 'imob_vjurnal2'), 1, 1, 1)
		poLista.ca_baza1.cSelect = m.lcSelect
		
		poLista.ca_baza1.cfiltru = lcFiltru
		poLista.ca_baza1.afisare()
		restore_grid_tag(Thisform.grd_jurnal)
		
		Thisform.do_calcul_sume()
		Thisform.do_coloreaza_grid()
		
		Thisform.MousePointer = 0
		Thisform.LockScreen = .F.
		
		Thisform.grd_jurnal.SetFocus()
		
		
		Thisform.clb_nr_inreg.text_simplu1.Value = Reccount('crsjurnal')
	ENDPROC

	PROCEDURE do_calcul_sume
		thisform.clb_nr_inreg.text_simplu1.Value=RECCOUNT('crsjurnal')
	ENDPROC

	PROCEDURE do_cauta
		Local lcFiltru, llSters
		llSters = .F.
		lcFiltru = [ and 2=2]
		
		If !Isnull(m.gnIdSucursala) And !'SUCURSALA' $ Upper(Thisform.filtru_pretty)
			lcFiltru = m.lcFiltru + [ AND ID_SUCURSALA = ] + Alltrim(Str(m.gnIdSucursala))
		Endif
		
		If Len(Thisform.filtru_pretty) > 0
			lcFiltru = m.lcFiltru + " and (" + Alltrim(Thisform.filtru_pretty) + ")"
		Endif
		
		If '*EXPIRAT*' $ Upper(m.lcFiltru)
			lcFiltru = Strtran(m.lcFiltruOra, '*EXPIRAT*', [TRUNC(data_expirare) < TO_DATE('] + Dtos(Date(gnAn, gnLuna, 1)) + [','YYYYMMDD')]	)
		Endif
		
		If '*STERS*' $ Upper(m.lcFiltru)
			lcFiltru = Strtran(m.lcFiltruOra, '*STERS*', []	)
			llSters = .T.
		Endif
		
		lcFiltru = Substr(lcFiltru, 6)
		Thisform.filtru = lcFiltru
		
		Thisform.actualizeaza_grid1(lcFiltru, m.llSters)
		
		If Reccount('crsJurnal') = 0
			aMessagebox('Cautarea nu a intors rezultate!', 0 + 48, 'Info cautare')
			Thisform.ck_nract.SetFocus()
		Endif
		
	ENDPROC

	PROCEDURE do_coloreaza_grid
		Thisform.grd_jurnal.SetAll('DynamicForeColor','IIF(NVL(stersop,0) = 1, RGB(255,0,0), IIF(ISNULL(ultima_operatie),RGB(0,128,0),RGB(0,0,0)))','Column')
	ENDPROC

	PROCEDURE do_excel
		Local lcAlias, lcFiltru, lcColumnList, lcHeaderList, lcSelect, lcOutput, lcFrom, lcWhere, lcOrder
		lcAlias = this.grd_jurnal.RecordSource
		lcFiltru = FILTER(lcAlias)
		IF EMPTY(lcFiltru)
			lcFiltru = '.T.'
		ENDIF 
		
		exista_excel=.T.
		lcColumnList = ''
		lcHeaderList = ''
		lcSelect = ''
		llSelect = .T.
		lcType = 'CURSOR'
		lcFrom = lcAlias
		lcWhere = lcFiltru
		lcOrder = 'denumire,id_mf,id_operatie_mf'
		lcOutput = SYS(2015)
		
		get_schema_grid(this.grd_jurnal,@lcColumnList, @lcHeaderList, @lcSelect, llSelect, lcType, lcFrom, lcWhere, lcOrder, lcOutput)
		&lcSelect
		IF USED(lcOutput)
			DO export_xls WITH lcOutput IN oproceduri_comune.prg
			USE IN (SELECT(lcOutput))
		ENDIF 
	ENDPROC

	PROCEDURE do_listare
		Private pnOptiune ,pnbuton,pcDataOra
		Local lcRaport, lcSql, lcfiltru, lnOptiune, lnSucces
		Local loExport as "oExportConfig"
		Store "" To pcDataOra
		
		pnbuton=1
		Thisform.AlwaysOnTop = .F.
		lcfiltru=""
		
		
		
		*----------------------------
		lnOptiune = xmenu("Listare \<selectie;Listare \<Operatii;Listare Operatii si \<Amortizare")
		If !Inlist(m.lnOptiune,1,2,3)
			Return
		Endif
		
		
		If !Empty(Thisform.filtru)
			lcfiltru=[ and ]+Alltrim(Thisform.filtru)
		Endif
		
		If Inlist(m.lnOptiune,1,3)
			If lnOptiune = 1
				lcRaport = "jurnal"
			Else
				lcRaport = "amortizare"
			Endif
			lcSql=[select * from imob_vjurnal2 where 2=2 ] + Alltrim(lcfiltru) + [ order by denumire, nract, data_pif, id_mf, data_operatie, id_operatie_mf]
		Else
			lcRaport = "rap_operatii"
			TEXT TO lcSql TEXTMERGE NOSHOW
		select nr_inventar,
		       denumire,
		       cod_mf,
		       data_pif,
		       data_operatie,
		       numeoperatie,
		       valoare,
		       valoare - lag(valoare) over(partition by id_mf order by id_operatie_mf) as valoare_diferenta,
		       valoare_ramasa,
		       valoare_ramasa - lag(valoare_ramasa) over(partition by id_mf order by id_operatie_mf) as valoare_ramasa_diferenta,
		       dns_ramas,
		       explicatiaoperatie
		  from imob_vjurnal2
		 where <<"2=2 " + Alltrim(m.lcFiltru)>>
		 order by denumire, nract, data_pif, id_mf, data_operatie, id_operatie_mf
			ENDTEXT
		Endif
		
		lnSucces=goExecutor.oExecute(lcSql,'crsjurnal2')
		If lnSucces < 0
			aMessagebox('Eroare la selectia din jurnal! ' + goExecutor.cEroare,0+16,"ROA IMOB")
			Return
		Endif
		goExecutor.oReset()
		If Reccount('crsjurnal2')>0
			pcDataOra = get_ora(2)
			Select crsjurnal2
			If pnbuton==1
				*!*			Report Form (m.lcRaport) To Printer Prompt Preview
				loExport = Createobject("oExportConfig")
				loExport.export2frx([crsjurnal2], m.lcRaport, , , , , , .T.)
			Endif
		Else
			aMessagebox("Nu exista inregistrari pentru listare!",48,"Atentie")
		Endif
		
		Thisform.AlwaysOnTop = .T.
		
		 
	ENDPROC

	PROCEDURE do_reset
		DODEFAULT()
		thisform.filtru=""
	ENDPROC

	PROCEDURE do_sterge
		PRIVATE pnButon
		
		pnButon=1
		lnid_operatie=0
		lnid_operatie_prec=0
		lnsterge=0
		SELECT crsjurnal
		IF RECCOUNT()=0
			mesaj=CHR(13)+CHR(13)+CHR(13)+"Nu exista inregistrari pe care le puteti sterge"
			losterge=CREATEOBJECT('frm_mesaj','Stergere','pericol.ico','AVERTIZARE',mesaj,' ')
			losterge.show(1)
			RETURN
		ENDIF 
		
		lnid_operatie=id_operatie_mf
		lnsterge=IIF(!ISNULL(ultima_operatie),1,0)
		lnid_operatie_prec=NVL(id_operatie_prec,0)
		lnid_calcul_rate=id_calcul_rate
		lnid_tip_operatie=id_tip_operatie
		
		IF lnsterge=0
				lcmesaj=CHR(13)+CHR(13)+" Nu se poate sterge aceasta operatie "+CHR(13)+" pentru ca nu este ultima operatie !"
				losterge=CREATEOBJECT('frm_mesaj','Stergere','pericol.ico','AVERTIZARE',lcmesaj,'    ')
				losterge.show(1)
			return
		ENDIF 
			
			
		SELECT crsjurnal
		lcNumeOp = ALLTRIM(NVL(numeoperatie,''))
		lnNrInventar = NVL(nr_inventar,0)
		lcDenumire = ALLTRIM(NVL(denumire,''))
		lcmesaj=CHR(13)+"Se elimina operatia "+lcNumeOp +CHR(13)+;
				"  Cu numar de inventar: "+iif(!EMPTY(lnNrInventar),ALLTRIM(STR(lnNrInventar)),"Fara nr. de inv.")+CHR(13)+;
				"     Denumirea: "+lcDenumire 
		losterge=CREATEOBJECT('frm_mesaj','Stergere','pericol.ico','INTREBARE',lcmesaj,'    ')
		losterge.show(1)
		
		IF pnButon=1
			lcsql=[begin pack_imob.sterge_jurnal(']+gcS+[',]+ALLTRIM(STR(lnid_operatie))+[,]+ALLTRIM(STR(lnid_operatie_prec))+[,]+ALLTRIM(STR(lnid_tip_operatie))+[,0); end;] && Stergere
				*STRTOFILE(lcsql,'c:\sterge_jurnal.txt')
				lnSucces = goExecutor.oExecute(lcSql)
					If lnSucces < 0
						IF [ORA-20000] $ goExecutor.cEroare
							lcMesaj = STREXTRACT(goExecutor.cEroare, '*', '*',1)
							lcmesaj=CHR(13)+CHR(13)+ lcMesaj
				            losterge=CREATEOBJECT('frm_mesaj','Stergere','pericol.ico','AVERTIZARE',lcmesaj,'    ')
							losterge.show(1)
						ENDIF 
					Endif	
					
				Thisform.actualizeaza_grid1()
		
		
		ENDIF 
	ENDPROC

	PROCEDURE Init
		DODEFAULT()
		thisform.do_coloreaza_grid 
		thisform.do_calcul_sume 
		
		this.gridextra1.setup()
	ENDPROC

	PROCEDURE But_start_criterii1.loadcriterii
		PARAMETERS tacriterii
		EXTERNAL ARRAY tacriterii
		#DEFINE crlf CHR(13)+CHR(10)
		
		lcStringCriterii="Numar document\nract\N\none\" + crlf + ;
			"Data document\data_achizitie\D\none\" + crlf + ;
			"Data operatie\data_operatie\D\none\" + crlf + ;	
			"Denumire\denumire\T\none\"+ crlf + ;
			"Numar inventar\nr_inventar\N\none\" + crlf + ;
			"Numar PIF\nr_pif\N\none\" + crlf + ;	
			"Data PIF\data_pif\D\none\" + crlf + ;
			"Cont\cont\T\none\" + crlf + ;
			"Cont analitic\cont\T\none\" + crlf + ;	
			"Data expirare\data_expirare\D\none\" + crlf + ;
			"Expirat\nofiled\E\*EXPIRAT*\" + crlf + ;		
			"Gestiune\gestiune\T\id_gestiune\nom_gestiune"+ crlf + ;
			"Sectie\sectie\T\id_sectie\nom_sectie" + crlf + ;
			"Responsabil\responsabil\T\id_responsabil\nom_parteneri" + crlf + ;
			"Lucrare\nrord\T\id_lucrare\nom_lucrare" + crlf + ;			
			"Valoare\valoare\N|get_mask(14,gnPA)\none\" + crlf + ;
			"Valoare achizitie\valoare_achizitie\N|get_mask(14,gnPA)\none\" + crlf + ;
			"Valoare majorare\(valoare-valoare_achizitie)\N|get_mask(14,gnPA)\none\" + crlf + ;	
			"Valoare justa\valoare_ramasa\N|get_mask(14,gnPA)\none\" + crlf + ;
			"Amortisment\rata\N|get_mask(14,gnPA)\none\" + crlf + ;	
			"Amort. max. ded.\amort_max_deductibil\N|get_mask(14,gnPA)\none\" + crlf + ;
			"Iesit din gestiune\nofiled\E\(iesit_din_gest = 1)\" + crlf + ;
			"Explicatia\explicatia\T\none\"+ crlf + ;				
			"Ultima miscare\ultima_operatie\T\none\"+ crlf + ;				
			"Data ultima misc.\data_operatie\D\none\" + crlf + ;	
			"Cauza ultima misc.\cauza\T\none\" + crlf + ;
			"Sterse\nofiled\E\*STERS*\"
		*
		DODEFAULT()
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_jurnal_total AS _frmbase OF "..\comun\clase\_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_listare1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrAct.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrAct.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataAct.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataAct.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataPIF.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataPIF.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrInventar.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrInventar.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDenumire.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDenumire.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cExplicatia.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cExplicatia.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValAchizitie.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValAchizitie.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValIntrare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValIntrare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValCalcul.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValCalcul.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValReziduala.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValReziduala.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValMajorare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValMajorare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cCodMF.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cCodMF.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDNS.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDNS.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDNSCalcul.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDNSCalcul.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cUzura.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cUzura.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cCota.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cCota.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cTipAmortizare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cTipAmortizare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cAmortisment.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cAmortisment.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cTotalAmortisment.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cTotalAmortisment.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cAmortizareAnuala.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cAmortizareAnuala.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValoareRamasa.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cValoareRamasa.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataUltimaEv.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataUltimaEv.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrGest.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrGest.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cResponsabil.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cResponsabil.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cContDebitor.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cContDebitor.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cIesitGest.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cIesitGest.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cCauza.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cCauza.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cUtilizator.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cUtilizator.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataora.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cDataora.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cCod.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cCod.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrPIF.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_jurnal.cNrPIF.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_shape3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_nract" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_denumire" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_valach" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_valinv" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_scd" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_nrinv" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_dataact" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_datapif" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_explicatia" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_utilizator" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_responsabil" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_gestiune" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmd_reset1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmd_cauta1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		FontCharSet = 238
		Height = 582
		Name = "frm_jurnal_total"
		Width = 793
		WindowState = 2
		_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 = 723
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = -1
		_SHAPE2.Width = 74
		LB_TITLU_ALB_B121.Caption = "JURNAL"
		LB_TITLU_ALB_B121.FontBold = .T.
		LB_TITLU_ALB_B121.FontCharSet = 238
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		BUT_TERMIN1.Anchor = 8
		BUT_TERMIN1.Left = 762
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 0
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_shape3' AS _shape WITH ;
		Anchor = 10, ;
		BackStyle = 0, ;
		Height = 60, ;
		Left = 12, ;
		Name = "_shape3", ;
		Top = 36, ;
		Width = 768
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="shape" />

	ADD OBJECT 'But_listare1' AS but_listare WITH ;
		Anchor = 8, ;
		Caption = "", ;
		Left = 730, ;
		Name = "But_listare1", ;
		Top = 0
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Ck_dataact' AS ck_filtru_luna WITH ;
		Alignment = 0, ;
		Caption = "Data document", ;
		FontCharSet = 238, ;
		Left = 328, ;
		Name = "Ck_dataact", ;
		Top = 46
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_datapif' AS ck_filtru_luna WITH ;
		Alignment = 0, ;
		Caption = "Data pif", ;
		FontCharSet = 238, ;
		Left = 328, ;
		Name = "Ck_datapif", ;
		Top = 69
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_denumire' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Caption = "Denumire", ;
		FontCharSet = 238, ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		Left = 36, ;
		Name = "ck_denumire", ;
		Top = 69
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_explicatia' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Caption = "Explicatia", ;
		FontCharSet = 238, ;
		FontName = "Arial Narrow", ;
		Left = 424, ;
		Name = "Ck_explicatia", ;
		Top = 46
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_gestiune' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Caption = "Gestiune", ;
		FontCharSet = 238, ;
		FontName = "Arial Narrow", ;
		Left = 495, ;
		Name = "ck_gestiune", ;
		Top = 70
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_nract' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Caption = "Nr.document", ;
		FontCharSet = 238, ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		Left = 36, ;
		Name = "Ck_nract", ;
		Top = 46
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_nrinv' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Caption = "Nr. inventar", ;
		FontCharSet = 238, ;
		FontName = "Arial Narrow", ;
		Left = 241, ;
		Name = "ck_nrinv", ;
		Top = 70
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_responsabil' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Caption = "Responsabil", ;
		FontCharSet = 238, ;
		FontName = "Arial Narrow", ;
		Left = 495, ;
		Name = "ck_responsabil", ;
		Top = 46
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_scd' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Caption = "Cont debitor", ;
		FontCharSet = 238, ;
		FontName = "Arial Narrow", ;
		Left = 241, ;
		Name = "ck_scd", ;
		Top = 46
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_utilizator' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Caption = "Utilizator", ;
		FontCharSet = 238, ;
		FontName = "Arial Narrow", ;
		Left = 424, ;
		Name = "ck_utilizator", ;
		Top = 70
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_valach' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Caption = "Valoare de achizitie", ;
		FontCharSet = 238, ;
		FontName = "Arial Narrow", ;
		Left = 122, ;
		Name = "ck_valach", ;
		Top = 46
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_valinv' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Caption = "Valoare de inventar", ;
		FontCharSet = 238, ;
		FontName = "Arial Narrow", ;
		Left = 122, ;
		Name = "Ck_valinv", ;
		Top = 70
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Cmd_cauta1' AS cmd_cauta WITH ;
		Anchor = 8, ;
		Left = 662, ;
		Name = "Cmd_cauta1", ;
		Top = 38
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Cmd_reset1' AS cmd_reset WITH ;
		Anchor = 8, ;
		Left = 662, ;
		Name = "Cmd_reset1", ;
		Top = 66
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'grd_jurnal' AS _grdbase WITH ;
		Anchor = 15, ;
		ColumnCount = 31, ;
		DeleteMark = .F., ;
		Height = 468, ;
		Left = 12, ;
		Name = "grd_jurnal", ;
		Top = 108, ;
		Width = 768, ;
		Column1.ColumnOrder = 1, ;
		Column1.Name = "cNrAct", ;
		Column2.ColumnOrder = 2, ;
		Column2.Name = "cDataAct", ;
		Column3.ColumnOrder = 4, ;
		Column3.Name = "cDataPIF", ;
		Column4.ColumnOrder = 5, ;
		Column4.Name = "cNrInventar", ;
		Column5.ColumnOrder = 6, ;
		Column5.Name = "cDenumire", ;
		Column6.ColumnOrder = 7, ;
		Column6.Name = "cExplicatia", ;
		Column7.ColumnOrder = 8, ;
		Column7.Name = "cValAchizitie", ;
		Column8.ColumnOrder = 9, ;
		Column8.Name = "cValIntrare", ;
		Column9.ColumnOrder = 10, ;
		Column9.Name = "cValCalcul", ;
		Column10.ColumnOrder = 11, ;
		Column10.Name = "cValReziduala", ;
		Column11.ColumnOrder = 12, ;
		Column11.Name = "cValMajorare", ;
		Column12.ColumnOrder = 13, ;
		Column12.Name = "cCodMF", ;
		Column13.ColumnOrder = 14, ;
		Column13.Name = "cDNS", ;
		Column14.ColumnOrder = 15, ;
		Column14.Name = "cDNSCalcul", ;
		Column15.ColumnOrder = 16, ;
		Column15.Name = "cUzura", ;
		Column16.ColumnOrder = 17, ;
		Column16.Name = "cCota", ;
		Column17.ColumnOrder = 18, ;
		Column17.Name = "cTipAmortizare", ;
		Column18.ColumnOrder = 19, ;
		Column18.Name = "cAmortisment", ;
		Column19.ColumnOrder = 20, ;
		Column19.Name = "cTotalAmortisment", ;
		Column20.ColumnOrder = 21, ;
		Column20.Name = "cAmortizareAnuala", ;
		Column21.ColumnOrder = 22, ;
		Column21.Name = "cValoareRamasa", ;
		Column22.ColumnOrder = 23, ;
		Column22.Name = "cDataUltimaEv", ;
		Column23.ColumnOrder = 24, ;
		Column23.Name = "cNrGest", ;
		Column24.ColumnOrder = 25, ;
		Column24.Name = "cResponsabil", ;
		Column25.ColumnOrder = 26, ;
		Column25.Name = "cContDebitor", ;
		Column26.ColumnOrder = 27, ;
		Column26.Name = "cIesitGest", ;
		Column27.ColumnOrder = 28, ;
		Column27.Name = "cCauza", ;
		Column28.ColumnOrder = 29, ;
		Column28.Name = "cUtilizator", ;
		Column29.ColumnOrder = 30, ;
		Column29.Name = "cDataora", ;
		Column30.ColumnOrder = 31, ;
		Column30.Name = "cCod", ;
		Column31.ColumnOrder = 3, ;
		Column31.Name = "cNrPIF"
		*< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'grd_jurnal.cAmortisment.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Amortisment", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cAmortizareAnuala.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Amortizare anuala", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cCauza.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cauza iesirii", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cCod.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cCodMF.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod MF", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

	ADD OBJECT 'grd_jurnal.cCota.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cota", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cDataAct.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data act", ;
		FontCharSet = 238, ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cDataora.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data ora", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cDataPIF.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data PIF", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cDataUltimaEv.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data ultimei evaluari", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cDenumire.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Denumire", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cDNS.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "DNS (luni)", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cDNSCalcul.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "DNS calcul", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

	ADD OBJECT 'grd_jurnal.cIesitGest.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Iesit din gestiune", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cNrAct.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.act", ;
		FontCharSet = 238, ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cNrGest.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr. gest.", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cNrInventar.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr. inventar", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cNrPIF.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr. PIF", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cResponsabil.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Responsabil", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cTipAmortizare.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Tip amortizare", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cTotalAmortisment.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Total Amortisment", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cUtilizator.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Utilizator", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cUzura.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Uzura (luni)", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cValAchizitie.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Val. de achizitie", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cValCalcul.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Val. de calcul", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cValIntrare.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Val. de intrare", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cValMajorare.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Val. majorare", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cValoareRamasa.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Valoare ramasa de amortizat", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_jurnal.cValReziduala.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Val. reziduala", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

ENDDEFINE

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

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="grd_lista" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cNract.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cNract.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDataact.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDataact.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cnrPIF.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cnrPIF.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDataPif.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDataPif.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cNrInventar.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cNrInventar.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDenumire.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDenumire.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cExplicatia.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cExplicatia.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cCodMf.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cCodMf.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cCont.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cCont.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAnalitic.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAnalitic.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDnsLuni.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDnsLuni.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cUzura.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cUzura.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cCotaAn.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cCotaAn.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cTipAmortizare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cTipAmortizare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAmortPrec.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAmortPrec.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cRata.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cRata.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAmortTot.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAmortTot.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoareRamasaAmort.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoareRamasaAmort.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDataAmort.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDataAmort.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cUltimaOperatie.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cUltimaOperatie.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDataOperatie.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDataOperatie.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cCauza.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cCauza.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoareRamasa.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoareRamasa.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDNSRamas.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDNSRamas.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cGestiune.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cGestiune.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cResponsabil.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cResponsabil.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cLucrare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cLucrare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cSectie.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cSectie.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cIdMf.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cIdMf.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cUltimaRata.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cUltimaRata.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cSucursala.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cSucursala.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoareMajorare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoareMajorare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoareAchizitie.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoareAchizitie.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAmortMaxDed.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAmortMaxDed.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAmortDed.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAmortDed.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAmortNeded.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAmortNeded.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cTipIesire.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cTipIesire.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoareReziduala.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoareReziduala.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDurataRamasa.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDurataRamasa.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_listare1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_nract" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_datareeval" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_dataexpirare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_datapif" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_explicatia_ultima_op" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_explicatia" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_dataact" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_denumire" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_ultima_op" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_valach" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_valmaj" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_valachiz" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_cont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_nrinv" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_responsabil" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_gestiune" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmd_reset1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmd_cauta1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_sectie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_excel1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_lucrare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_acont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_valoare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_amort_max_ded" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmd_executa1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cmd_executa2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_amortisment" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_expirat" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ck_iesit" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_verifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Gridextra1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdfooter1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_start_criterii1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_reset_criterii1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: afisactual
		*m: do_calcul_sume
		*m: do_cauta_ora
		*m: do_coloreaza_grid
		*m: lexperimental_assign
		*p: cnumecursor
		*p: filtru
		*p: filtruora
		*p: lexperimental
		*p: lexperimentalinit
		*p: nfiscal
		*p: ntip
	*</DefinedPropArrayMethod>

	*<PropValue>
		Caption = "Form"
		cbuton3 = but_modifica1;cmd_executa1;cmd_executa2
		cgridsortlist = grd_lista
		cnumecursor = 
		DoCreate = .T.
		filtru = 
		filtruora = 
		FontCharSet = 238
		Height = 582
		lexperimental = .F.
		lexperimentalinit = .F.
		Name = "frm_lista"
		nfiscal = 0
		ntip = 0
		Width = 793
		WindowState = 2
		_memberdata = <VFPData>
			<memberdata name="lexperimental" display="lExperimental"/>
			<memberdata name="lexperimental_assign" display="lExperimental_Assign"/>
		</VFPData>
		_SHAPE1.Anchor = 10
		_SHAPE1.Height = 29
		_SHAPE1.Left = -1
		_SHAPE1.Name = "_SHAPE1"
		_SHAPE1.Top = 0
		_SHAPE1.Width = 792
		_SHAPE1.ZOrderSet = 1
		_SHAPE2.Anchor = 8
		_SHAPE2.Height = 29
		_SHAPE2.Left = 628
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = -1
		_SHAPE2.Width = 166
		_SHAPE2.ZOrderSet = 2
		LB_TITLU_ALB_B121.Caption = "SITUATIA IMOBILIZARILOR"
		LB_TITLU_ALB_B121.FontBold = .T.
		LB_TITLU_ALB_B121.FontCharSet = 238
		LB_TITLU_ALB_B121.Left = 5
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		LB_TITLU_ALB_B121.TabIndex = 35
		LB_TITLU_ALB_B121.Top = 6
		LB_TITLU_ALB_B121.ZOrderSet = 3
		BUT_TERMIN1.Anchor = 8
		BUT_TERMIN1.Left = 762
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 22
		BUT_TERMIN1.Top = 0
		BUT_TERMIN1.ZOrderSet = 5
		GRIDSORT1.Left = 0
		GRIDSORT1.Name = "GRIDSORT1"
		GRIDSORT1.Top = 516
	*</PropValue>

	ADD OBJECT '_grdfooter1' AS _grdfooter WITH ;
		Anchor = 14, ;
		ccolwithlabel = cDenumire, ;
		csourcegrdalias = crsLista, ;
		csourcegrid = grd_lista, ;
		csumcolumns = cValoare,cValoareAchizitie,cValoareMajorare,cAmortPrec,cRata,cAmortTot,cValoareRamasaAmort,cValoareRamasa,cValoareReziduala,cAmortDed,cAmortNeded, ;
		FontSize = 10, ;
		Height = 25, ;
		Left = 108, ;
		Name = "_grdfooter1", ;
		RowHeight = 19, ;
		Top = 552, ;
		Width = 770, ;
		ZOrderSet = 40
		*< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'But_excel1' AS but_excel WITH ;
		Anchor = 8, ;
		Left = 644, ;
		Name = "But_excel1", ;
		Top = 0, ;
		ZOrderSet = 27
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_listare1' AS but_listare WITH ;
		Anchor = 8, ;
		Caption = "", ;
		Left = 674, ;
		Name = "But_listare1", ;
		TabIndex = 25, ;
		Top = 0, ;
		ZOrderSet = 6
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 8, ;
		Left = 732, ;
		Name = "But_modifica1", ;
		TabIndex = 23, ;
		Top = 0, ;
		ZOrderSet = 33
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_reset_criterii1' AS but_reset_criterii WITH ;
		Anchor = 8, ;
		Left = 554, ;
		Name = "But_reset_criterii1", ;
		Top = 0, ;
		Visible = .F.
		*< END OBJECT: ClassLib="..\comun\clase\ocriterii.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_start_criterii1' AS but_start_criterii WITH ;
		Anchor = 8, ;
		Left = 584, ;
		Name = "But_start_criterii1", ;
		Top = 0, ;
		Visible = .F.
		*< END OBJECT: ClassLib="..\comun\clase\ocriterii.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 8, ;
		Left = 703, ;
		Name = "But_sterge1", ;
		TabIndex = 24, ;
		Top = 0, ;
		ZOrderSet = 36
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_verifica1' AS but_verifica WITH ;
		Anchor = 8, ;
		Left = 614, ;
		Name = "But_verifica1", ;
		Top = 0, ;
		ZOrderSet = 38
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Ck_acont' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = acont, ;
		Caption = "Cont analitic", ;
		FontCharSet = 1, ;
		Left = 11, ;
		Name = "Ck_acont", ;
		TabIndex = 7, ;
		Top = 123, ;
		ZOrderSet = 29
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_amort_max_ded' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = amort_max_deductibil, ;
		Caption = "Amort. max. ded.", ;
		FontCharSet = 1, ;
		Left = 389, ;
		mask = (get_mask(14,gnPa)), ;
		Name = "ck_amort_max_ded", ;
		nrzec = (gnPa), ;
		TabIndex = 16, ;
		Top = 49, ;
		ZOrderSet = 31
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_amortisment' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = rata, ;
		Caption = "Amortisment", ;
		FontCharSet = 1, ;
		Left = 247, ;
		mask = (get_mask(14,gnPa)), ;
		Name = "Ck_amortisment", ;
		nrzec = (gnPa), ;
		TabIndex = 17, ;
		Top = 49, ;
		ZOrderSet = 34
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_cont' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = cont, ;
		Caption = "Cont", ;
		FontCharSet = 1, ;
		Left = 11, ;
		Name = "ck_cont", ;
		TabIndex = 6, ;
		Top = 108, ;
		ZOrderSet = 19
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_dataact' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = data_achizitie, ;
		Caption = "Data document", ;
		FontCharSet = 1, ;
		Left = 11, ;
		Name = "Ck_dataact", ;
		TabIndex = 2, ;
		tip = D, ;
		Top = 49, ;
		ZOrderSet = 13
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_dataexpirare' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = data_expirare, ;
		Caption = "Data expirarii", ;
		FontCharSet = 1, ;
		Left = 121, ;
		Name = "Ck_dataexpirare", ;
		TabIndex = 8, ;
		tip = D, ;
		Top = 34, ;
		ZOrderSet = 9
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_datapif' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = data_pif, ;
		Caption = "Data pif", ;
		FontCharSet = 1, ;
		Left = 11, ;
		Name = "Ck_datapif", ;
		TabIndex = 5, ;
		tip = D, ;
		Top = 93, ;
		ZOrderSet = 10
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_datareeval' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = data_operatie, ;
		Caption = "Data ultima misc.", ;
		FontCharSet = 1, ;
		Left = 121, ;
		Name = "Ck_datareeval", ;
		TabIndex = 10, ;
		tip = D, ;
		Top = 63, ;
		ZOrderSet = 8
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_denumire' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = denumire, ;
		Caption = "Denumire", ;
		FontCharSet = 1, ;
		Left = 11, ;
		Name = "ck_denumire", ;
		TabIndex = 3, ;
		Top = 63, ;
		ZOrderSet = 14
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_expirat' AS ck_simplu WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		Caption = "Expirat", ;
		FontCharSet = 1, ;
		Left = 121, ;
		Name = "Ck_expirat", ;
		TabIndex = 9, ;
		Top = 49, ;
		ZOrderSet = 35
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_explicatia' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = explicatia, ;
		Caption = "Explicatia", ;
		FontCharSet = 1, ;
		Left = 247, ;
		Name = "Ck_explicatia", ;
		TabIndex = 3, ;
		Top = 123, ;
		ZOrderSet = 12
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_explicatia_ultima_op' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = cauza, ;
		Caption = "Explicatia ultima miscare", ;
		FontCharSet = 1, ;
		Left = 389, ;
		Name = "ck_explicatia_ultima_op", ;
		TabIndex = 3, ;
		Top = 34, ;
		ZOrderSet = 11
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_gestiune' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = gestiune, ;
		Caption = "Gestiune", ;
		FontCharSet = 1, ;
		Left = 121, ;
		Name = "ck_gestiune", ;
		TabIndex = 11, ;
		Top = 77, ;
		ZOrderSet = 22
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_iesit' AS ck_simplu WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		Caption = "Iesit din gestiune", ;
		FontCharSet = 1, ;
		Left = 247, ;
		Name = "Ck_iesit", ;
		TabIndex = 18, ;
		Top = 108, ;
		ZOrderSet = 37
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_lucrare' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = nrord, ;
		Caption = "Lucrare", ;
		FontCharSet = 1, ;
		Left = 121, ;
		Name = "Ck_lucrare", ;
		TabIndex = 14, ;
		Top = 123, ;
		ZOrderSet = 28
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_nract' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = nract, ;
		Caption = "Nr.document", ;
		FontCharSet = 1, ;
		Left = 11, ;
		Name = "Ck_nract", ;
		TabIndex = 1, ;
		Top = 34, ;
		ZOrderSet = 7
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_nrinv' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = nr_inventar, ;
		Caption = "Nr. inventar", ;
		FontCharSet = 1, ;
		Left = 11, ;
		Name = "ck_nrinv", ;
		TabIndex = 4, ;
		Top = 77, ;
		ZOrderSet = 20
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_responsabil' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = responsabil, ;
		Caption = "Responsabil", ;
		FontCharSet = 1, ;
		Left = 121, ;
		Name = "ck_responsabil", ;
		TabIndex = 13, ;
		Top = 108, ;
		ZOrderSet = 21
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_sectie' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = sectie, ;
		Caption = "Sectie", ;
		FontCharSet = 1, ;
		Left = 121, ;
		Name = "Ck_sectie", ;
		TabIndex = 12, ;
		Top = 93, ;
		ZOrderSet = 26
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_ultima_op' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = ultima_operatie, ;
		Caption = "Ultima miscare", ;
		FontCharSet = 1, ;
		Left = 247, ;
		Name = "Ck_ultima_op", ;
		TabIndex = 3, ;
		Top = 137, ;
		ZOrderSet = 15
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_valach' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = valoare_ramasa, ;
		Caption = "Valoare Justa", ;
		FontCharSet = 1, ;
		Left = 247, ;
		mask = (get_mask(14,gnPa)), ;
		Name = "ck_valach", ;
		nrzec = (gnPa), ;
		TabIndex = 15, ;
		Top = 93, ;
		ZOrderSet = 16
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_valachiz' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = valoare_achizitie, ;
		Caption = "Valoare de achizitie", ;
		FontCharSet = 1, ;
		Left = 247, ;
		mask = (get_mask(14,gnPa)), ;
		Name = "Ck_valachiz", ;
		nrzec = (gnPa), ;
		TabIndex = 15, ;
		Top = 63, ;
		ZOrderSet = 18
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_valmaj' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = valoare-valoare_achizitie, ;
		Caption = "Valoare majorare", ;
		FontCharSet = 1, ;
		Left = 247, ;
		mask = (get_mask(14,gnPa)), ;
		Name = "Ck_valmaj", ;
		nrzec = (gnPa), ;
		TabIndex = 15, ;
		Top = 77, ;
		ZOrderSet = 17
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_valoare' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		Anchor = 3, ;
		camp_nume = valoare, ;
		Caption = "Valoare", ;
		FontCharSet = 1, ;
		Left = 247, ;
		mask = (get_mask(14,gnPa)), ;
		Name = "Ck_valoare", ;
		nrzec = (gnPa), ;
		TabIndex = 16, ;
		Top = 34, ;
		ZOrderSet = 30
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Cmd_cauta1' AS cmd_cauta WITH ;
		Anchor = 9, ;
		caction = do_cauta, ;
		Left = 684, ;
		Name = "Cmd_cauta1", ;
		TabIndex = 19, ;
		Top = 34, ;
		Width = 94, ;
		ZOrderSet = 24
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Cmd_executa1' AS cmd_executa WITH ;
		Anchor = 9, ;
		Caption = "\<Operatiuni", ;
		Height = 27, ;
		Left = 588, ;
		Name = "Cmd_executa1", ;
		TabIndex = 21, ;
		Top = 34, ;
		Visible = .F., ;
		Width = 94, ;
		ZOrderSet = 32
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'cmd_executa2' AS cmd_executa WITH ;
		Anchor = 9, ;
		Caption = "\<Istoric Miscari", ;
		Height = 27, ;
		Left = 588, ;
		Name = "cmd_executa2", ;
		TabIndex = 21, ;
		Top = 62, ;
		Visible = .F., ;
		Width = 94, ;
		ZOrderSet = 32
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Cmd_reset1' AS cmd_reset WITH ;
		Anchor = 9, ;
		Left = 684, ;
		Name = "Cmd_reset1", ;
		TabIndex = 32, ;
		Top = 62, ;
		Width = 94, ;
		ZOrderSet = 23
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'grd_lista' AS _grdbase WITH ;
		Anchor = 15, ;
		ColumnCount = 40, ;
		DeleteMark = .F., ;
		HeaderHeight = 36, ;
		Height = 394, ;
		HighlightBackColor = 109,125,167, ;
		HighlightStyle = 2, ;
		Left = 12, ;
		Name = "grd_lista", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "crslista", ;
		RowHeight = 19, ;
		Top = 156, ;
		Width = 770, ;
		ZOrderSet = 0, ;
		Column1.ColumnOrder = 1, ;
		Column1.ControlSource = "nract", ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 10, ;
		Column1.Name = "cNract", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 98, ;
		Column2.ColumnOrder = 2, ;
		Column2.ControlSource = "TTOD(data_achizitie)", ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 10, ;
		Column2.Name = "cDataact", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 77, ;
		Column3.ColumnOrder = 3, ;
		Column3.ControlSource = "nr_pif", ;
		Column3.FontName = "Arial", ;
		Column3.FontSize = 10, ;
		Column3.Name = "cnrPIF", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 79, ;
		Column4.ColumnOrder = 4, ;
		Column4.ControlSource = "TTOD(data_pif)", ;
		Column4.FontName = "Arial", ;
		Column4.FontSize = 10, ;
		Column4.Name = "cDataPif", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 83, ;
		Column5.ColumnOrder = 5, ;
		Column5.ControlSource = "nr_inventar", ;
		Column5.FontName = "Arial", ;
		Column5.FontSize = 10, ;
		Column5.Name = "cNrInventar", ;
		Column5.ReadOnly = .T., ;
		Column5.Width = 96, ;
		Column6.ColumnOrder = 6, ;
		Column6.ControlSource = "denumire", ;
		Column6.FontName = "Arial", ;
		Column6.FontSize = 10, ;
		Column6.Name = "cDenumire", ;
		Column6.ReadOnly = .T., ;
		Column6.Width = 197, ;
		Column7.ColumnOrder = 7, ;
		Column7.ControlSource = "explicatia", ;
		Column7.FontName = "Arial", ;
		Column7.FontSize = 10, ;
		Column7.Name = "cExplicatia", ;
		Column7.ReadOnly = .T., ;
		Column7.Width = 133, ;
		Column8.ColumnOrder = 8, ;
		Column8.ControlSource = "valoare", ;
		Column8.FontName = "Arial", ;
		Column8.FontSize = 10, ;
		Column8.InputMask = (get_mask(12,gnPa)), ;
		Column8.Name = "cValoare", ;
		Column8.ReadOnly = .T., ;
		Column8.Width = 114, ;
		Column9.ColumnOrder = 11, ;
		Column9.ControlSource = "cod_mf", ;
		Column9.FontName = "Arial", ;
		Column9.FontSize = 10, ;
		Column9.Name = "cCodMf", ;
		Column9.ReadOnly = .T., ;
		Column9.Width = 50, ;
		Column10.ColumnOrder = 12, ;
		Column10.ControlSource = "cont", ;
		Column10.FontName = "Arial", ;
		Column10.FontSize = 10, ;
		Column10.Name = "cCont", ;
		Column10.ReadOnly = .T., ;
		Column10.Width = 51, ;
		Column11.ColumnOrder = 13, ;
		Column11.ControlSource = "acont", ;
		Column11.FontName = "Arial", ;
		Column11.FontSize = 10, ;
		Column11.Name = "cAnalitic", ;
		Column11.ReadOnly = .T., ;
		Column11.Width = 47, ;
		Column12.ColumnOrder = 14, ;
		Column12.ControlSource = "dns_luni", ;
		Column12.FontName = "Arial", ;
		Column12.FontSize = 10, ;
		Column12.Format = "KR", ;
		Column12.InputMask = "99999", ;
		Column12.Name = "cDnsLuni", ;
		Column12.ReadOnly = .T., ;
		Column12.Width = 49, ;
		Column13.ColumnOrder = 15, ;
		Column13.ControlSource = "uzura", ;
		Column13.FontName = "Arial", ;
		Column13.FontSize = 10, ;
		Column13.Format = "KR", ;
		Column13.InputMask = "99999", ;
		Column13.Name = "cUzura", ;
		Column13.ReadOnly = .T., ;
		Column13.Width = 50, ;
		Column14.ColumnOrder = 17, ;
		Column14.ControlSource = "cota_an", ;
		Column14.FontName = "Arial", ;
		Column14.FontSize = 10, ;
		Column14.InputMask = "9999.99", ;
		Column14.Name = "cCotaAn", ;
		Column14.ReadOnly = .T., ;
		Column14.Width = 39, ;
		Column15.ColumnOrder = 18, ;
		Column15.ControlSource = "tip_amortizare", ;
		Column15.FontName = "Arial", ;
		Column15.FontSize = 10, ;
		Column15.Name = "cTipAmortizare", ;
		Column15.ReadOnly = .T., ;
		Column15.Width = 63, ;
		Column16.ColumnOrder = 19, ;
		Column16.ControlSource = "amort_prec", ;
		Column16.FontName = "Arial", ;
		Column16.FontSize = 10, ;
		Column16.InputMask = (get_mask(12,gnPa)), ;
		Column16.Name = "cAmortPrec", ;
		Column16.ReadOnly = .T., ;
		Column16.Width = 103, ;
		Column17.ColumnOrder = 20, ;
		Column17.ControlSource = "rata", ;
		Column17.FontName = "Arial", ;
		Column17.FontSize = 10, ;
		Column17.InputMask = (get_mask(12,gnPa)), ;
		Column17.Name = "cRata", ;
		Column17.ReadOnly = .T., ;
		Column17.Width = 90, ;
		Column18.ColumnOrder = 21, ;
		Column18.ControlSource = "amort_prec+rata", ;
		Column18.FontName = "Arial", ;
		Column18.FontSize = 10, ;
		Column18.InputMask = (get_mask(12,gnPa)), ;
		Column18.Name = "cAmortTot", ;
		Column18.ReadOnly = .T., ;
		Column18.Width = 92, ;
		Column19.ColumnOrder = 22, ;
		Column19.ControlSource = "valoare-amort_prec-rata-valoare_reziduala", ;
		Column19.FontName = "Arial", ;
		Column19.FontSize = 10, ;
		Column19.InputMask = (get_mask(12,gnPa)), ;
		Column19.Name = "cValoareRamasaAmort", ;
		Column19.ReadOnly = .T., ;
		Column19.Width = 112, ;
		Column20.Alignment = 1, ;
		Column20.ColumnOrder = 24, ;
		Column20.ControlSource = 'allt(str(month(data_expirare)))+" / "+allt(str(year(data_expirare)))', ;
		Column20.FontName = "Arial", ;
		Column20.FontSize = 10, ;
		Column20.Name = "cDataAmort", ;
		Column20.ReadOnly = .T., ;
		Column20.Width = 92, ;
		Column21.ColumnOrder = 26, ;
		Column21.ControlSource = "ultima_operatie", ;
		Column21.FontName = "Arial", ;
		Column21.FontSize = 10, ;
		Column21.Name = "cUltimaOperatie", ;
		Column21.ReadOnly = .T., ;
		Column21.Width = 91, ;
		Column22.ColumnOrder = 27, ;
		Column22.ControlSource = "TTOD(data_operatie)", ;
		Column22.FontName = "Arial", ;
		Column22.FontSize = 10, ;
		Column22.Name = "cDataOperatie", ;
		Column22.ReadOnly = .T., ;
		Column22.Width = 88, ;
		Column23.ColumnOrder = 28, ;
		Column23.ControlSource = "cauza", ;
		Column23.FontName = "Arial", ;
		Column23.FontSize = 10, ;
		Column23.Name = "cCauza", ;
		Column23.ReadOnly = .T., ;
		Column23.Width = 111, ;
		Column24.ColumnOrder = 29, ;
		Column24.ControlSource = "valoare_ramasa", ;
		Column24.FontName = "Arial", ;
		Column24.FontSize = 10, ;
		Column24.InputMask = (get_mask(12,gnPa)), ;
		Column24.Name = "cValoareRamasa", ;
		Column24.ReadOnly = .T., ;
		Column24.Width = 86, ;
		Column25.ColumnOrder = 30, ;
		Column25.ControlSource = "dns_ramas", ;
		Column25.FontName = "Arial", ;
		Column25.FontSize = 10, ;
		Column25.Name = "cDNSRamas", ;
		Column25.ReadOnly = .T., ;
		Column25.Width = 74, ;
		Column26.ColumnOrder = 35, ;
		Column26.ControlSource = "gestiune", ;
		Column26.FontName = "Arial", ;
		Column26.FontSize = 10, ;
		Column26.Name = "cGestiune", ;
		Column26.ReadOnly = .T., ;
		Column26.Width = 121, ;
		Column27.ColumnOrder = 36, ;
		Column27.ControlSource = "responsabil", ;
		Column27.FontName = "Arial", ;
		Column27.FontSize = 10, ;
		Column27.Name = "cResponsabil", ;
		Column27.ReadOnly = .T., ;
		Column27.Width = 112, ;
		Column28.ColumnOrder = 37, ;
		Column28.ControlSource = "nrord", ;
		Column28.FontName = "Arial", ;
		Column28.FontSize = 10, ;
		Column28.Name = "cLucrare", ;
		Column28.ReadOnly = .T., ;
		Column28.Width = 116, ;
		Column29.ColumnOrder = 38, ;
		Column29.ControlSource = "sectie", ;
		Column29.FontName = "Arial", ;
		Column29.FontSize = 10, ;
		Column29.Name = "cSectie", ;
		Column29.ReadOnly = .T., ;
		Column29.Width = 118, ;
		Column30.ColumnOrder = 40, ;
		Column30.ControlSource = "id_mf", ;
		Column30.FontName = "Arial", ;
		Column30.FontSize = 10, ;
		Column30.InputMask = "999999", ;
		Column30.Name = "cIdMf", ;
		Column30.ReadOnly = .T., ;
		Column30.Width = 88, ;
		Column31.ColumnOrder = 25, ;
		Column31.ControlSource = "ultima_rata", ;
		Column31.FontName = "Arial", ;
		Column31.FontSize = 10, ;
		Column31.InputMask = (get_mask(12,gnPa)), ;
		Column31.Name = "cUltimaRata", ;
		Column31.ReadOnly = .T., ;
		Column31.Width = 91, ;
		Column32.ColumnOrder = 39, ;
		Column32.ControlSource = "sucursala", ;
		Column32.FontName = "Arial", ;
		Column32.FontSize = 10, ;
		Column32.Name = "cSucursala", ;
		Column32.ReadOnly = .T., ;
		Column32.Width = 126, ;
		Column33.ColumnOrder = 10, ;
		Column33.ControlSource = "valoare-valoare_achizitie", ;
		Column33.FontName = "Arial", ;
		Column33.FontSize = 10, ;
		Column33.Format = "RK", ;
		Column33.InputMask = (get_mask(12,gnPa)), ;
		Column33.Name = "cValoareMajorare", ;
		Column33.ReadOnly = .T., ;
		Column33.Width = 105, ;
		Column34.ColumnOrder = 9, ;
		Column34.ControlSource = "valoare_achizitie", ;
		Column34.FontName = "Arial", ;
		Column34.FontSize = 10, ;
		Column34.Format = "RK", ;
		Column34.InputMask = (get_mask(12,gnPa)), ;
		Column34.Name = "cValoareAchizitie", ;
		Column34.ReadOnly = .T., ;
		Column34.Width = 100, ;
		Column35.ColumnOrder = 31, ;
		Column35.ControlSource = "amort_max_deductibil", ;
		Column35.FontName = "Arial", ;
		Column35.FontSize = 10, ;
		Column35.InputMask = (get_mask(12,gnPa)), ;
		Column35.Name = "cAmortMaxDed", ;
		Column35.ReadOnly = .T., ;
		Column35.Width = 108, ;
		Column36.ColumnOrder = 32, ;
		Column36.ControlSource = "IIF(ISNULL(amort_max_deductibil), rata, IIF(amort_max_deductibil > 0, IIF(rata < amort_max_deductibil, rata, amort_max_deductibil), 0))", ;
		Column36.FontName = "Arial", ;
		Column36.FontSize = 10, ;
		Column36.Format = "R", ;
		Column36.InputMask = (get_mask(12,gnPa)), ;
		Column36.Name = "cAmortDed", ;
		Column36.ReadOnly = .T., ;
		Column36.Width = 93, ;
		Column37.ColumnOrder = 33, ;
		Column37.ControlSource = "iif(ISNULL(amort_max_deductibil), 0, IIF(amort_max_deductibil = 0, rata, IIF(rata > amort_max_deductibil, rata - amort_max_deductibil, 0)))", ;
		Column37.FontName = "Arial", ;
		Column37.FontSize = 10, ;
		Column37.Format = "R", ;
		Column37.InputMask = (get_mask(12,gnPa)), ;
		Column37.Name = "cAmortNeded", ;
		Column37.ReadOnly = .T., ;
		Column37.Width = 84, ;
		Column38.ColumnOrder = 34, ;
		Column38.ControlSource = "tip_iesire", ;
		Column38.FontName = "Arial", ;
		Column38.FontSize = 10, ;
		Column38.Name = "cTipIesire", ;
		Column38.ReadOnly = .T., ;
		Column38.Width = 99, ;
		Column39.ColumnOrder = 23, ;
		Column39.ControlSource = "valoare_reziduala", ;
		Column39.Format = "RK", ;
		Column39.InputMask = (get_mask(12,gnPa)), ;
		Column39.Name = "cValoareReziduala", ;
		Column39.ReadOnly = .T., ;
		Column39.Width = 90, ;
		Column40.ColumnOrder = 16, ;
		Column40.ControlSource = "durata_ramasa", ;
		Column40.Format = "RK", ;
		Column40.InputMask = "99999", ;
		Column40.Name = "cDurataRamasa", ;
		Column40.ReadOnly = .T.
		*< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'grd_lista.cAmortDed.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Amortizment deductibil", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cAmortMaxDed.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Amortizment maxim deductibil", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cAmortNeded.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Amortizment nedeductibil", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cAmortPrec.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Amortizare precedenta", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cAmortTot.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Total amortizat", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

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

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

	ADD OBJECT 'grd_lista.cCauza.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatie miscare", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

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

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

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

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

	ADD OBJECT 'grd_lista.cCotaAn.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cota (%)", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

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

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

	ADD OBJECT 'grd_lista.cDataAmort.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data amortizare completa", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cDataOperatie.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data ultima miscare", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

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

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

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

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

	ADD OBJECT 'grd_lista.cDnsLuni.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "DNS (luni)", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cDNSRamas.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Durata de calcul", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cDurataRamasa.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Durata ramasa (luni)", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	ADD OBJECT 'grd_lista.cRata.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Amortizment lunar", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

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

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

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

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

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

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

	ADD OBJECT 'grd_lista.cTipAmortizare.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Tip amortizare", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cTipIesire.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Tip iesire din gestiune", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cUltimaOperatie.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ultima miscare", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cUltimaRata.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ultima Rata", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cUzura.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Uzura (luni)", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

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

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

	ADD OBJECT 'grd_lista.cValoareAchizitie.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Valoare achizitie", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cValoareMajorare.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Valoare majorare", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cValoareRamasa.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Valoare de calcul", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cValoareRamasaAmort.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Valoare ramasa de amortizat", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cValoareReziduala.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Valoare reziduala", ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Gridextra1' AS gridextra WITH ;
		allowgridpreferences = .F., ;
		gridexpression = Thisform.grd_lista, ;
		Height = 17, ;
		Left = 660, ;
		Name = "Gridextra1", ;
		productname = ROA, ;
		Top = 348, ;
		Width = 22
		*< END OBJECT: ClassLib="..\comun\utile\gridextras\gridextras.vcx" BaseClass="custom" />
	
	PROCEDURE actualizeaza_grid1
		Parameters tcFiltru
		
		Local lcFiltru, lcCursor, lcSchema, lcSel, llSucces, llExperimental
		Private pcCond, pdDataF, pdDataI, pnFiscala
		
		If Empty(tcFiltru)
			lcFiltru = [1=1]
		Else
			lcFiltru = tcFiltru
		Endif
		
		llExperimental = this.lExperimental
		
		Thisform.LockScreen = .T.
		Thisform.MousePointer = 11
		
		lcCursor = This.cnumecursor
		Select (lcCursor)
		Local lnIdMfOld
		lnIdMfOld = id_mf
		
		save_grid_comment(Thisform.grd_lista)
		pdDataI = Date(gnAn, gnLuna, 1)
		pdDataF = pdDataI
		*pcCond = [id_tip_imobilizare = ] + ALLTRIM(STR(tnTip)) && merge fffff greu
		pcCond = [1=1]
		pnFiscala = This.nfiscal
		lcSchema = ['']  &&['ceck n(1),totdebit n(16,gnPa),totcredit n(16,gnPa),id_fact n(10),id_part n(10),nume c(50),dataact D,dataireg D,nract n(14),datascad D,cont c(4),acont c(4)']
		
		If m.llExperimental
			* EXPERIMENTAL SELECTIE DIN IMOB_VSITUATIE_LUNARA IN LOC DE PACK_IMOB.CALCUL_SITUATIE_LUNARA()
			* Setez luna pentru view
			llSucces = goExecutor.oExecuta('begin pack_imob.setlunacurenta(?pdDataI); end;')
			IF m.llSucces
				lcSel = [SELECT * FROM ] + IIF(m.pnFiscala = 0, [imob_vsituatie_lunara], [imobf_vsituatie_lunara]) + [ WHERE ] + m.lcFiltru + [ order by data_pif, nr_inventar]
				llSucces = goExecutor.oExecuta(lcSel, lcCursor)		
			ENDIF 
		Else
		
			lcSel = [{call pack_imob.CALCUL_SITUATIE_LUNARA(?pdDataI,?pdDataF,?pcCond,?pnFiscala,?gnIdSucursala)}]
			llSucces = goExecutor.oExecuta(lcSel, lcCursor)
		
			If m.llSucces
				Select (lcCursor)
				Index On Dtos(data_PIF) + Str(nr_inventar) Tag ordine
				Set Filter To &lcFiltru
			Endif
		
		Endif && llExperimental
		
		restore_grid_comment(Thisform.grd_lista)
		
		Thisform._grdfooter1.calcTotal
		
		
		Thisform.do_coloreaza_grid()
		
		Select (lcCursor)
		Locate For id_mf = lnIdMfOld
		If !Found()
			Locate
		Endif
		
		Thisform.MousePointer = 0
		Thisform.LockScreen = .F.
		
		Thisform.grd_lista.SetFocus()
		
	ENDPROC

	PROCEDURE afisactual
		*!*	Store ".T." To Tden,Tsuma,Tgest,tscd,tnract,tnrinv,tresp,tamort,tdata,tdatpif,t1,tdataexp,t14,tdataout
		
		*!*	LOCAL lcFiltre
		*!*	lcFiltre =""
		
		*!*	IF this.ck_nract.Value = 1
		*!*		lcFiltre = lcFiltre + " " + this.ck_nract.filtru + " "
		*!*	ENDIF 
		
		*!*	IF this.ck_dataact.Value = 1
		*!*		lcFiltre = lcFiltre + " " + this.ck_dataact.filtru + " "
		*!*	ENDIF 
		*!*	IF this.ck_denumire.Value = 1
		*!*		lcFiltre = lcFiltre +  " " + this.ck_denumire.filtru + " "
		*!*	ENDIF 
		*!*	IF this.ck_nrinv.Value = 1
		*!*		lcFiltre = lcFiltre + " " + this.ck_nrinv.filtru + " "
		*!*	ENDIF 
		
		*!*	IF this.ck_datapif.Value = 1
		*!*		lcFiltre = lcFiltre +  " " + this.ck_datapif.filtru + " "
		*!*	ENDIF 
		
		*!*	IF this.ck_cont.Value = 1
		*!*		lcFiltre = lcFiltre +  " " + this.ck_cont.filtru + " "
		*!*	ENDIF 
		
		*!*	IF this.ck_acont.Value = 1
		*!*		lcFiltre = lcFiltre +  " " + this.ck_acont.filtru + " "
		*!*	ENDIF 
		
		*!*	IF this.ck_dataexpirare.Value = 1
		*!*		lcFiltre = lcFiltre +  " " + this.ck_dataexpirare.filtru + " "
		*!*	ENDIF 
		
		*!*	IF this.ck_expirat.Value = 1
		*!*		lcFiltre = lcFiltre +  " " + this.Ck_expirat.filtru + " "
		*!*	ENDIF 
		
		*!*	IF this.ck_datareeval.Value = 1
		*!*		lcFiltre = lcFiltre + " "+this.ck_datareeval.filtru +" "
		*!*	ENDIF 
		
		*!*	IF this.ck_gestiune.Value = 1
		*!*		lcFiltre = lcFiltre + " "+this.ck_gestiune.filtru +" "
		*!*	ENDIF 
		
		*!*	IF this.ck_sectie.Value = 1
		*!*		lcFiltre = lcFiltre + " "+this.ck_sectie.filtru +" "
		*!*	ENDIF 
		
		*!*	IF this.ck_responsabil.Value = 1
		*!*		lcFiltre = lcFiltre + " "+this.ck_responsabil.filtru +" "
		*!*	ENDIF 
		
		*!*	IF this.ck_lucrare.Value = 1
		*!*		lcFiltre = lcFiltre + " "+this.ck_lucrare.filtru +" "
		*!*	ENDIF 
		
		*!*	IF this.ck_valach.Value = 1
		*!*		lcFiltre = lcFiltre + " "+this.ck_valach.filtru +" "
		*!*	ENDIF 
		
		*!*	IF this.ck_valoare.Value = 1
		*!*		lcFiltre = lcFiltre + " "+this.ck_valoare.filtru +" "
		*!*	ENDIF 
		
		*!*	IF this.ck_amortisment.Value = 1
		*!*		lcFiltre = lcFiltre + " "+this.ck_amortisment.filtru +" "
		*!*	ENDIF 
		
		*!*	IF this.ck_iesit.Value = 1
		*!*		lcFiltre = lcFiltre + " "+this.ck_iesit.filtru +" "
		*!*	ENDIF
		*!*	lcFiltre = SUBSTR(lcFiltre,6,LEN(lcFiltre)-4)
		*!*	MESSAGEBOX(lcFiltre )
		*!*	SELECT crslista
		
		*!*	*STRTOFILE(lcFiltre,'c:\t.txt')
		*!*	SET FILTER TO &lcFiltre 
		
		
		*!*	SELECT  crslista
		*!*	Go Top
		*!*	thisform.do_calcul_sume
		*!*	thisform.do_coloreaza_grid
		*!*	*!*	Thisform.grd_lista.Refresh
		*!*	*!*	thisform.grd_lista.SetFocus 
		*!*	this.ct_grid_order1._GRID1.SetFocus 
		
		
	ENDPROC

	PROCEDURE do_calcul_sume
		PARAMETERS tcFiltru
		*lcFiltru = this.ct_grid_order1.cfiltru 
		IF EMPTY(tcFiltru)
			lcFiltru = [.T.]
		ELSE 
			lcFiltru = tcFiltru
		ENDIF 
		lcCrs = this.cnumecursor 
		SELECT (lcCrs)
		
		*lnNrRecords = Reccount('crslista')
		*!*	CALCULATE CNT() FOR &lcFiltru TO lnNrRecords
		*!*	Thisform.clb_nr_inreg.text_simplu1.Value = lnNrRecords
		
		*!*	If Reccount('crslista')>0
		*!*		Select crslista
		*!*		Calculate Sum(rata),Sum(amort_prec+rata),Sum(valoare),Sum(valoare-amort_prec-rata) FOR &lcFiltru ;
		*!*			TO Thisform.text1.Value,Thisform.text2.Value,Thisform.text3.Value,thisform.text4.Value
		*!*		Go Top
		*!*	Else
		*!*		Thisform.text1.Value=0
		*!*		Thisform.text2.Value=0
		*!*		Thisform.text3.Value=0
		*!*		thisform.text4.Value=0
		*!*	ENDIF
		lcCrs = this.cnumecursor 
		SELECT (lcCrs)
		LOCATE 
	ENDPROC

	PROCEDURE do_cauta
		Local lcFiltru, lcFiltruOra, lnTip, llExperimental
		llExperimental = this.lExperimental
		
		If m.llExperimental
			* EXPERIMENTAL SELECTIE DIN IMOB_VSITUATIE_LUNARA IN LOC DE PACK_IMOB.CALCUL_SITUATIE_LUNARA()
			
			*******************************************
			* ALTERNATIV BUT_CRITERII
			* Aduc toate inregistrarile si pun filtru
		
			lcFiltru = [id_tip_imobilizare = ] + Alltrim(Str(Thisform.ntip))
		
			If !'IESIT_DIN_GEST' $ Upper(Thisform.filtru_pretty)
				lcFiltru = m.lcFiltru + [ AND IESIT_DIN_GEST = 0]
			Endif
		
			If !ISNULL(m.gnIdSucursala) AND !'SUCURSALA' $ Upper(Thisform.filtru_pretty)
				lcFiltru = m.lcFiltru + [ AND ID_SUCURSALA = ] + ALLTRIM(STR(m.gnIdSucursala))
			Endif
		
		
			If Len(Thisform.filtru_pretty) > 0
				lcFiltru = m.lcFiltru + " and (" + Alltrim(Thisform.filtru_pretty) + ")"
			Endif
		
			lcFiltruOra = m.lcFiltru
		
			If '*EXPIRAT*' $ Upper(m.lcFiltru)
				lcFiltru = Strtran(m.lcFiltruOra, '*EXPIRAT*', [TRUNC(data_expirare) < TO_DATE('] + Dtos(Date(gnAn, gnLuna, 1)) + [','YYYYMMDD')]	)
				lcFiltruOra = Strtran(m.lcFiltru, '*EXPIRAT*', [ and data_expirare < DATE(m.gnAn, m.gnLuna, 1)])
			Endif
		
			Thisform.filtru = m.lcFiltru
			Thisform.filtruOra = m.lcFiltruOra
			Thisform.actualizeaza_grid1(m.lcFiltru)
		
			If Reccount('crsLista') = 0
				aMessagebox('Cautarea nu a intors rezultate!', 0 + 48, 'Info cautare')
			Endif
		
		Else
			lcFiltru = [id_tip_imobilizare=]+Alltrim(Str(Thisform.ntip))+;
				[ and iesit_din_gest=]+Alltrim(Str(Thisform.ck_iesit.Value))
			lcFiltruOra = lcFiltru
			*!*	this.ct_grid_order1.cfiltruoriginal = lcFiltru && se schimba in functie de iesit_din_gest
		
			If Thisform.ck_nract.Value=1
				lcFiltru=lcFiltru+Thisform.ck_nract.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_nract.filtru
			Endif
		
			If Thisform.ck_dataact.Value=1
				lcFiltru=lcFiltru+Thisform.ck_dataact.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_dataact.filtru
			Endif
		
			If Thisform.ck_acont.Value=1
				lcFiltru=lcFiltru+Thisform.ck_acont.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_acont.filtru
			Endif
		
			If Thisform.ck_amortisment.Value=1
				lcFiltru=lcFiltru+Thisform.ck_amortisment.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_amortisment.filtru
			Endif
		
			If Thisform.ck_cont.Value=1
				lcFiltru=lcFiltru+Thisform.ck_cont.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_cont.filtru
			Endif
		
			If Thisform.ck_dataexpirare.Value=1
				lcFiltru=lcFiltru+Thisform.ck_dataexpirare.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_dataexpirare.filtru
			Endif
		
			If Thisform.ck_datapif.Value=1
				lcFiltru=lcFiltru+Thisform.ck_datapif.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_datapif.filtru
			Endif
		
			If Thisform.ck_datareeval.Value=1
				lcFiltru=lcFiltru+Thisform.ck_datareeval.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_datareeval.filtru
			Endif
		
			If Thisform.ck_denumire.Value=1
				lcFiltru=lcFiltru+Thisform.ck_denumire.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_denumire.filtru
			Endif
		
			If Thisform.Ck_ultima_op.Value=1
				lcFiltru=lcFiltru+Thisform.Ck_ultima_op.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.Ck_ultima_op.filtru
			Endif
		
			If Thisform.ck_explicatia_ultima_op.Value=1
				lcFiltru=lcFiltru + Thisform.ck_explicatia_ultima_op.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_explicatia_ultima_op.filtru
			Endif
		
			If Thisform.ck_explicatia.Value=1
				lcFiltru=lcFiltru+Thisform.ck_explicatia.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_explicatia.filtru
			Endif
		
			If Thisform.ck_expirat.Value=1
				*lcFiltru=lcFiltru+[ and data_expirare<to_date(]+DTOS(get_prima_zi())+[,'YYYYMMDD')]
				lcFiltru=lcFiltru+[ and data_expirare<get_prima_zi()] &&+ DTOC(get_prima_zi())
				lcFiltruOra = lcFiltruOra + [and trunc(data_expirare) < TO_DATE('] + Dtos(Date(gnAn, gnLuna, 1)) + [','YYYYMMDD')]
			Endif
		
			If Thisform.ck_gestiune.Value=1
				lcFiltru=lcFiltru+Thisform.ck_gestiune.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_gestiune.filtru
			Endif
		
			If Thisform.ck_lucrare.Value=1
				lcFiltru=lcFiltru+Thisform.ck_lucrare.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_lucrare.filtru
			Endif
		
			If Thisform.ck_nrinv.Value=1
				lcFiltru=lcFiltru+Thisform.ck_nrinv.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_nrinv.filtru
			Endif
		
			If Thisform.ck_responsabil.Value=1
				lcFiltru=lcFiltru+Thisform.ck_responsabil.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_responsabil.filtru
			Endif
		
			If Thisform.ck_sectie.Value=1
				lcFiltru=lcFiltru+Thisform.ck_sectie.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_sectie.filtru
			Endif
		
			If Thisform.ck_valach.Value=1
				lcFiltru=lcFiltru+Thisform.ck_valach.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_valach.filtru
			Endif
		
			If Thisform.ck_valoare.Value=1
				lcFiltru=lcFiltru+Thisform.ck_valoare.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_valoare.filtru
			Endif
		
			If Thisform.ck_valachiz.Value=1
				lcFiltru=lcFiltru+Thisform.ck_valachiz.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_valachiz.filtru
			Endif
		
			If Thisform.ck_valmaj.Value=1
				lcFiltru=lcFiltru+Thisform.ck_valmaj.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_valmaj.filtru
			Endif
		
		
			If Thisform.ck_amort_max_ded.Value=1
				lcFiltru=lcFiltru+Thisform.ck_amort_max_ded.filtru_vfp
				lcFiltruOra = lcFiltruOra + Thisform.ck_amort_max_ded.filtru
			Endif
		
			Thisform.filtru = lcFiltru
			Thisform.filtruOra = lcFiltruOra
			Thisform.actualizeaza_grid1(lcFiltru)
			*thisform.ct_grid_order1.actualizeaza_grid(lcFiltru)
		
			If Reccount('crslista')=0
				aMessagebox('Cautarea nu a intors rezultate!',0+48,'Info cautare')
			Endif
		
			*this.do_calcul_sume
			*this.ct_grid_order1._GRID1.SetFocus
		
		ENDIF && This.but_start_criterii1.Visible
	ENDPROC

	PROCEDURE do_cauta_ora
		
		lcFiltru = [id_tip_imobilizare=]+ALLTRIM(STR(thisform.ntip))+ [ AND ] +;
			IIF(Thisform.ck_iesit.Value = 1, [id_tip_operatie = 4], [id_tip_operatie <> 4])
		
		If Thisform.ck_nract.Value=1
			lcFiltru=lcFiltru+Thisform.ck_nract.filtru
		Endif
		
		If Thisform.ck_dataact.Value=1
			lcFiltru=lcFiltru+Thisform.ck_dataact.filtru
		Endif
		
		If Thisform.ck_acont.Value=1
			lcFiltru=lcFiltru+Thisform.ck_acont.filtru
		Endif
		
		If Thisform.ck_amortisment.Value=1
			lcFiltru=lcFiltru+Thisform.ck_amortisment.filtru
		Endif
		
		If Thisform.ck_cont.Value=1
			lcFiltru=lcFiltru+Thisform.ck_cont.filtru
		Endif
		
		If Thisform.ck_dataexpirare.Value=1
			lcFiltru=lcFiltru+Thisform.ck_dataexpirare.filtru
		Endif
		
		If Thisform.ck_datapif.Value=1
			lcFiltru=lcFiltru+Thisform.ck_datapif.filtru
		Endif
		
		If Thisform.ck_datareeval.Value=1
			lcFiltru=lcFiltru+Thisform.ck_datareeval.filtru
		Endif
		
		If Thisform.ck_denumire.Value=1
			lcFiltru=lcFiltru+Thisform.ck_denumire.filtru
		Endif
		
		If Thisform.ck_explicatia.Value=1
			lcFiltru=lcFiltru+Thisform.ck_explicatia.filtru
		ENDIF
		
		If Thisform.ck_expirat.Value=1
			lcFiltru=lcFiltru+[ and data_expirare<to_date(]+DTOS(get_prima_zi())+[,'YYYYMMDD')]
		Endif
		
		If Thisform.ck_gestiune.Value=1
			lcFiltru=lcFiltru+Thisform.ck_gestiune.filtru
		Endif
		
		If Thisform.ck_lucrare.Value=1
			lcFiltru=lcFiltru+Thisform.ck_lucrare.filtru
		Endif
		
		If Thisform.ck_nrinv.Value=1
			lcFiltru=lcFiltru+Thisform.ck_nrinv.filtru
		Endif
		
		If Thisform.ck_responsabil.Value=1
			lcFiltru=lcFiltru+Thisform.ck_responsabil.filtru
		Endif
		
		If Thisform.ck_sectie.Value=1
			lcFiltru=lcFiltru+Thisform.ck_sectie.filtru
		Endif
		
		If Thisform.ck_valach.Value=1
			lcFiltru=lcFiltru+Thisform.ck_valach.filtru
		Endif
		
		If Thisform.ck_valoare.Value=1
			lcFiltru=lcFiltru+Thisform.ck_valoare.filtru
		Endif
		
		RETURN lcFiltru
	ENDPROC

	PROCEDURE do_coloreaza_grid
		Thisform.grd_lista.SetAll('DynamicForeColor','IIF(iesit_din_gest=0,IIF(data_expirare<DATE(gnAn,gnLuna,1), RGB(0,0,255),RGB(0,0,0)),RGB(255,0,0))','Column')
			
		*!*	* Data expirare eronata	
		*!*	thisform.grd_lista.cDataAmort.DynamicBackColor = [IIF(YEAR(data_expirare)*12+MONTH(data_expirare)<> m.gnAn*12+m.gnLuna + dns_luni-uzura, RGB(200,200,200), RGB(255,255,255))]
	ENDPROC

	PROCEDURE do_excel
		Local lcAlias, lcFiltru, lcColumnList, lcHeaderList, lcSelect, lcOutput, lcFrom, lcWhere, lcOrder
		lcAlias = this.grd_lista.RecordSource 
		lcFiltru = FILTER(lcAlias)
		IF EMPTY(lcFiltru)
			lcFiltru = '.T.'
		ENDIF 
		
		exista_excel=.T.
		lcColumnList = ''
		lcHeaderList = ''
		lcSelect = ''
		llSelect = .T.
		lcType = 'CURSOR'
		lcFrom = lcAlias
		lcWhere = lcFiltru
		lcOrder = 'nr_inventar'
		lcOutput = 'crsIMOB'
		
		get_schema_grid(this.grd_lista,@lcColumnList, @lcHeaderList, @lcSelect, llSelect, lcType, lcFrom, lcWhere, lcOrder, lcOutput)
		&lcSelect
		IF USED(lcOutput)
			DO export_xls WITH lcOutput IN oproceduri_comune.prg
			USE IN (lcOutput)
		ENDIF 
	ENDPROC

	PROCEDURE do_executa
		If Reccount('crslista')>0
			Select crslista
			*If inactiv=0
			Private pnTipOperatiune,pnButon,plConservat,plCasat,poDetaliiMf
			Store '' To ofrmoperatiuni
			Store .F. To plConservat,plCasat
		
			pnTipOperatiune=0
			pnButon=1
			Do Case
				Case id_tip_operatie = 10			&& scoatere din conservare
					plConservat=.T.
				Case id_tip_operatie = 4			&& scoatere din gestiune
					plCasat=.T.
			Endcase
			ofrmoperatiuni=Createobject('frm_alegoper',plConservat,plCasat)
			ofrmoperatiuni.Show(1)
			Release ofrmoperatiuni
		
			If pnButon==1
				Select crslista
				Scatter Name poDetaliiMf
				Do Case
					Case pnTipOperatiune=1	&& majorarea valorii de intrare
						op_majorare(Thisform.ntip)
					Case pnTipOperatiune=2	&& reevaluarea valorii de intrare
						op_reevaluare(Thisform.ntip)
					Case pnTipOperatiune=3	&& conservare
						op_conservare(Thisform.ntip,plConservat)
					Case pnTipOperatiune=4	&& schimbare DNS
						op_schimbaredns()
					Case pnTipOperatiune=5	&& schimbare DNS + reevaluarea valorii de intrare
						op_schimbaredns_reevaluare(Thisform.ntip)				
					Case pnTipOperatiune=6	&& iesire/intrare din/in gestiune
						op_gest(Thisform.ntip,plCasat)
				Endcase
		
				If pnButon==1
					This.LockScreen = .T.
					*!*					this.ct_grid_order1.initializare()
					*!*					this.ct_grid_order1._GRID1.SetAll('DynamicForeColor','IIF(iesit_din_gest=0,IIF(data_expirare<DATE(gnAn,gnLuna,1),'+;
					*!*					'RGB(0,0,255),RGB(0,0,0)),RGB(255,0,0))','Column')
					*!*					this.ct_grid_order1._GRID1.RecordMark = .T.
					This.do_cauta
					This.LockScreen = .F.
				Endif
			Endif
			*	Endif
		Endif
		
	ENDPROC

	PROCEDURE do_listare
		*!* 25.09.2013
		*!* marius.mutu
		*!* Amortizari lunare nu tinea cont de filtru (corporale/necorporale)
		
		Private pnOptiune, pnbuton, pcDataOra
		Local alegluna As "frm_sel_luna"
		Local lcCursor, lcSchema, lcSel, lcfiltru, lnOptiune, lnSucces, loLuna, lcFiltruGrid, lcSelect, lnRecno
		Local lcCursorTemp, lcIds, lcSqlIds, llExperimental, llSucces, lnAn, lnLuna, lnNrLuni, lnNrLuniF, lnNrLuniI, lnIdTipMajorare
		PRIVATE pdData
		PRIVATE cnc, nc, pcFiltru, pcTitlu, pcdurata, pcgestiune, pdDataF, pdDataI, pnFiscala, pcIds
		PRIVATE plGrupGestiune, plGrupCont
		
		plGrupGestiune = .F.
		plGrupCont = .F.		
		pcDataOra = ""
		pnOptiune = 0
		pnbuton	  = 1
		nc		  = Thisform.ntip
		cnc		  = Iif(nc = 1, " CORPORALE ", " NECORPORALE ")
		lnIdTipMajorare = 6
		
		lcFiltruGrid = FILTER('crsLista') && filtru din gridextra
		lcFiltru = Thisform.filtru
		lcFiltru  = IIF(!EMPTY(m.lcFiltru), IIF(!EMPTY(m.lcFiltruGrid), m.lcFiltru + ' and (' + m.lcFiltruGrid + ')', m.lcFiltru), IIF(!EMPTY(m.lcFiltruGrid), m.lcFiltruGrid, '1=1'))
		
		lnOptiune = xmenu("Amortizari lunare;Amortizare luna curenta;Amortizare luna curenta - grupat pe gestiune si cont;" + ;
			"Amortizare luna curenta - grupat pe cont;\-;Lista fiselor;Lista de inventar" + ;
				IIF(This.nfiscal = 1, "", ";\-;Situatia reevaluarilor - imobilizarile selectate;Situatia reevaluarilor - imobilizarile " + ;
				IIF(nc = 1, "corporale","necorporale") + ";\-;Situatia majorarilor - imobilizarile selectate;Situatia majorarilor - imobilizarile " + ;
				IIF(nc = 1, "corporale","necorporale") + ";\-;Situatia modificarilor - imobilizarile selectate;Situatia modificarilor - imobilizarile " + ;
				IIF(nc = 1, "corporale","necorporale")))
		
		If Empty(m.lnOptiune)
			Return
		Endif
		
		lcSelect = SELECT()
		lnRecno = RECNO()
		
		lcIds = []
		lcSel	 = This.cnumecursor
		Select (m.lcSel)
		Scan
			lcIds = m.lcIds + [,] + Alltrim(Str(id_mf))
		Endscan
		
		
		Do Case
			Case m.lnOptiune = 1
				lnSucces = update_calendar()
		
				loLuna = myScatter('blank')
		
				alegluna = Createobject("frm_sel_luna")
				With m.alegluna
					If Empty(.cboLuna.RowSource)
						.cboLuna.RowSource = "calendar.nl,an"
					Endif
					.oLuna = m.loLuna
					If Empty(.cAlias)
						.cAlias = Left(.cboLuna.RowSource, At(".", .cboLuna.RowSource) - 1)
					Endif
				Endwith
				m.alegluna.Show(1)
		
				Release m.alegluna
		
				Thisform.AlwaysOnTop = .F.
		
				*****
				pcIds = []
				lcSel	 = This.cnumecursor
				Select (m.lcSel)
				Scan
					pcIds = m.pcIds + [,] + Alltrim(Str(id_mf))
				Endscan
				*!* 29.11.2006
				*!* marius.mutu
				*!* erau probleme cu selectia id_mf in (1,2,3,...) daca erau mai mult de 1000 de id-uri
		
				* Da eroare daca sunt prea multe id-uri - string too long
				* lcSqlIds = [(SELECT *  FROM table(cast(CHARN2COLLECTION('] + Alltrim(Substr(m.lcSqlIds, 2)) + [', ',') as num_tab)))]
				* ORA-01489 SQL limit of 4000 bytes, 	ORA-01460 daca trimit o variabila > 4000 bytes, 
				lcSqlIds = [(SELECT *  FROM table(cast(CHARN2COLLECTION('] + m.pcIds + [', ',') as num_tab)))]
				
				*!*		pcFiltru = ALLTRIM(thisform.filtruOra)
		
				pdDataI	  = Ctod("01/" + m.loLuna.nl + "/" + m.loLuna.an)
				pdDataF	  = Ctod('01/' + Padl(Alltrim(Str(gnLuna)), 2, '0') + '/' + Alltrim(Str(gnAn)))
				pnFiscala = This.nfiscal
				lcSchema = ['']
				lcCursor = 'crslist'
		
				llExperimental = .T. && 25.11.2021 llExperimental = (goApp.nExperimental = 1)
				If m.llExperimental
					lnNrLuniI = YEAR(m.pdDataI) * 12 + MONTH(m.pdDataI)
					lnNrLuniF = YEAR(m.pdDataF) * 12 + MONTH(m.pdDataF)
		
					For lnNrLuni = m.lnNrLuniI To m.lnNrLuniF
						lnAn = INT(m.lnNrLuni/12)
						lnLuna = MOD(m.lnNrLuni, 12)
						IF m.lnLuna = 0
							lnLuna = 12
							lnAn = lnAn - 1
						ENDIF 	
						WAIT WINDOW 'Luna ' + PADL(m.lnLuna,2,'0') + '/' + ALLTRIM(STR(m.lnAn)) NOWAIT 
						pdData = DATE(m.lnAn, m.lnLuna, 1)
						llSucces = goExecutor.oExecuta('begin pack_imob.setlunacurenta(?pdData); end;')
						If m.llSucces
							* where id_mf in select from table(charn2collection)) da eroare in Oracle 10.2.0.4. Nu am verificat in alte versiuni
							* lcSel = [SELECT * FROM ] + Iif(m.pnFiscala = 0, [imob_vsituatie_lunara], [imobf_vsituatie_lunara]) + [ WHERE ] + m.pcFiltru
							* daca sqlIds > 4000 bytes da eroare in Oracle * ORA-01489 SQL limit of 4000 bytes, 	ORA-01460 daca trimit o variabila > 4000 bytes, 
							IF LEN(m.pcIds) <= 3900
								lcSel = [SELECT * FROM ] + Iif(m.pnFiscala = 0, [imob_vsituatie_lunara], [imobf_vsituatie_lunara]) + [ S1 JOIN ] + m.lcSqlIds + [ S2 ON S1.ID_MF = S2.X]
							ELSE
								* Pun filtu ulterior pe cursor in foxpro
								lcSel = [SELECT * FROM ] + Iif(m.pnFiscala = 0, [imob_vsituatie_lunara], [imobf_vsituatie_lunara])
							ENDIF 
							
							lcCursorTemp = Sys(2015)
							llSucces = goExecutor.oExecuta(m.lcSel, m.lcCursorTemp)
							If !Used(m.lcCursor)
								Select * From (m.lcCursorTemp) Into Cursor (m.lcCursor) Readwrite
							Else
								Select (m.lcCursor)
								Append From Dbf(m.lcCursorTemp)
							Endif
							Use In (Select(m.lcCursorTemp))
						Endif
					Endfor		
				ELSE
					lcSel	 = [{call pack_imob.CALCUL_SITUATIE_LUNARA(?pdDataI,?pdDataF,?pcCond,?pnFiscala,?gnIdSucursala)}]
					llSucces = goExecutor.oExecuta(m.lcSel, m.lcCursor)
		
					If !m.llSucces
						Return
					ENDIF
				ENDIF 	
		
				Select a.*, a.data_test As luna_rata From crslist a Where &lcfiltru Order By a.denumire, a.id_mf, a.data_test Into Cursor crsamortizarelunara
		
				If Reccount('crsamortizarelunara') > 0
					pcdurata  = Dtoc(pdDataI) + " - " + Dtoc(pdDataF)
					pcDataOra = get_ora(2)
					Select crsamortizarelunara
		*!*				Report Form amortanaliz_grup To Printer Prompt Preview
					goExport.export2frx([crsamortizarelunara], "amortanaliz_grup", , , , , , .T.)
					
					goExecutor.oReset()
				Else
					aMessagebox("Nu exista inregistrari pentru listare!", 48, "Atentie")
				Endif
				If Used('crsamortizarelunara')
					Use In crsamortizarelunara
				Endif
				If Used('crslist')
					Use In crslist
				Endif
				Thisform.AlwaysOnTop = .T.
		
			Case m.lnOptiune = 2
				* Amortizare lunara
				plGrupGestiune = .F.
				plGrupCont = .F.
				If Reccount('crslista') > 0
					pcDataOra			 = get_ora(2)
					Thisform.AlwaysOnTop = .F.
					pcgestiune			 = "Toate gestiunile"
		*!*				Use In (SELECT('crslistimob'))
		
		*!*				Select * From crslista Where &lcfiltru Order By data_achizitie, nr_inventar Into Cursor crslistaimob
		
					pcTitlu				 = "LISTA IMOBILIZARILOR" + cnc + "IN LUNA"
					Thisform.AlwaysOnTop = .F.
					goExport.export2frx([crslista], "listmfcota", , , , , , .T.)
		
		*!*				Use In (SELECT('crslistaimob'))
					Thisform.AlwaysOnTop = .T.
				Else
					aMessagebox("Nu exista inregistrari pentru listare!", 48, "Atentie")
				endif
		
			Case m.lnOptiune = 3
				* Amortizare lunara grupat dupa gestiune, cont
				plGrupGestiune = .T.
				plGrupCont = .T.
				If Reccount('crslista') > 0
					pcDataOra			 = get_ora(2)
					Thisform.AlwaysOnTop = .F.
					pcgestiune			 = "Toate gestiunile"
					If Used('crslistimob')
						Use In crslistimob
					Endif
					Select * From crslista Where &lcfiltru Order By gestiune, Cont, data_achizitie, nr_inventar Into Cursor crslistaimob
		
					pcTitlu				 = "LISTA IMOBILIZARILOR" + cnc + "IN LUNA"
					Thisform.AlwaysOnTop = .F.
					goExport.export2frx([crslistaimob], "listmfcota", , , , , , .T.)
		
					Use In (SELECT('crslistaimob'))
					Thisform.AlwaysOnTop = .T.
				Else
					aMessagebox("Nu exista inregistrari pentru listare!", 48, "Atentie")
				ENDIF
				
			Case m.lnOptiune = 4
				* Amortizare lunara grupat dupa cont
				plGrupGestiune = .F.
				plGrupCont = .T.
				If Reccount('crslista') > 0
					pcDataOra			 = get_ora(2)
					Thisform.AlwaysOnTop = .F.
					pcgestiune			 = "Toate gestiunile"
					If Used('crslistimob')
						Use In crslistimob
					Endif
					Select * From crslista Where &lcfiltru Order By Cont, data_achizitie, nr_inventar Into Cursor crslistaimob
		
					pcTitlu				 = "LISTA IMOBILIZARILOR" + cnc + "IN LUNA"
					Thisform.AlwaysOnTop = .F.
					goExport.export2frx([crslistaimob], "listmfcota", , , , , , .T.)
		
					Use In (SELECT('crslistaimob'))
					Thisform.AlwaysOnTop = .T.
				Else
					aMessagebox("Nu exista inregistrari pentru listare!", 48, "Atentie")
				ENDIF
										
			case m.lnOptiune = 6
				private pdDataI, pdDataF, pcCond, pnFiscala
				pdDataI = DATE(gnAn,gnLuna,1)
				pdDataF = pdDataI
				pcCond = [1=1]
				pnFiscala = Thisform.nFiscal
		
				IF Thisform.ntip =1
					goExport.export2frx([crslista], "fisa_mf_istoric", , , , , , .T.)
				ELSE
					goExport.export2frx([crslista], "fisa_mf2", , , , , , .T.)	
				ENDIF		
				
			CASE m.lnOptiune = 7
				Do Form rap_lista_inventar With Thisform.ntip, This.nfiscal, "crsLista"
					
			CASE m.lnOptiune = 9
				do list_situatie_reevaluare with Thisform.ntip, m.lcIds  in oproceduri_listari.prg
		
			CASE m.lnOptiune = 10
				do list_situatie_reevaluare with Thisform.ntip in oproceduri_listari.prg
						
			CASE m.lnOptiune = 12
				do list_situatie_modificari with Thisform.ntip, m.lcIds, m.lnIdTipMajorare  in oproceduri_listari.prg
		
			CASE m.lnOptiune = 13
				do list_situatie_modificari with Thisform.ntip, m.lnIdTipMajorare in oproceduri_listari.prg
		
			CASE m.lnOptiune = 15
				do list_situatie_modificari with Thisform.ntip, m.lcIds  in oproceduri_listari.prg
		
			CASE m.lnOptiune = 16
				do list_situatie_modificari with Thisform.ntip in oproceduri_listari.prg
		
			OTHERWISE 
				* Nu mai fac raportul concordanta
				* DO raport_concordanta_experimental WITH Thisform.ntip IN oproceduri_listari.prg
		Endcase
		 
		SELECT (m.lcSelect)
		TRY 
			GOTO m.lnRecno
		CATCH 
			GO TOP 
		ENDTRY 
	ENDPROC

	PROCEDURE do_modifica
		Private pnButon
		pnButon=1
		Store '' To lomodifica
		*!*	SELECT crslista
		*!*	SCATTER NAME poDetaliiMf
		*!*	=cctipuri_amort()
		
		*!*	lntip_imob=thisform.ntip
		
		*!*	lomodifica=CREATEOBJECT('frm_introducere',lntip_imob,3)
		*!*	lomodifica.show(1)
		*!*	Release lomodifica
		*!*	If pnButon=1
		*!*		Thisform.actualizeaza_grid1()
		*!*	Endif
		
		Select (This.cnumecursor)
		Scatter Name poMf
		Scatter Name poMfOriginal
		poMf.data_Achizitie = Ttod(poMf.data_Achizitie)
		poMf.data_pif = Ttod(poMf.data_pif)
		poMf.data_operatie = Ttod(poMf.data_operatie)
		poMf.data_expirare = Ttod(poMf.data_expirare)
		
		IF TYPE('poMf.nrdoc') = 'U'
			ADDPROPERTY(poMf, 'nrdoc', NULL)
		ENDIF 
		
		IF TYPE('poMf.datadoc') = 'U'
			ADDPROPERTY(poMf, 'datadoc', NULL)
		ENDIF
		
		=cctipuri_amort()
		=cctipuri_imob()
		lomodifica=Createobject('frm_modificare')
		lomodifica.Show(1)
		Release lomodifica
		If gnButon = 1
			With poMf
				.denumire = Alltrim(Nvl(.denumire,''))
				.explicatia = Alltrim(Nvl(.explicatia,''))
				.cod_mf = Alltrim(Nvl(.cod_mf,''))
				.Cont = Alltrim(Nvl(.Cont,''))
				.acont = Alltrim(Nvl(.acont,''))
		*!*			.amort_max_deductibil = NVL(.amort_max_deductibil, 0)		
				.dns_luni = NVL(.dns_luni, 0)		
				.nr_inventar = NVL(.nr_inventar, 0)
			Endwith
		
			&& luna de inceput pentru lista mf
			AddProperty(poMf, "cPerIn", poMf.lper_in)
			&& daca s-a modificat una din atributele listei, atunci luna modificarii este luna curenta, altfel se pastreaza valabilitatea
		
			*!* 03.04.2008
			*!* sucursala
			If NVL(poMf.NR_INVENTAR, 0) <> NVL(poMfOriginal.NR_INVENTAR,0) Or ;
					NVL(poMf.id_lucrare, 0)  <> NVL(poMfOriginal.id_lucrare, 0) Or ;
					NVL(poMf.id_gestiune, 0) <> poMfOriginal.id_gestiune Or ;
					Nvl(poMf.id_sucursala,0) <> Nvl(poMfOriginal.id_sucursala,0) Or ;
					NVL(poMf.id_sectie, 0)   <> NVL(poMfOriginal.id_sectie, 0) Or ;
					NVL(poMf.id_responsabil, 0) <> NVL(poMfOriginal.id_responsabil, 0) Or ;
					NVL(poMf.dns_luni, 0)  <> NVL(poMfOriginal.dns_luni, 0) Or ;
					NVL(poMf.cod_mf, '')   <> NVL(poMfOriginal.cod_mf, '') Or ;
					NVL(poMf.Cont, '')     <> NVL(poMfOriginal.Cont, '') Or ;
					NVL(poMf.acont, '')    <> NVL(poMfOriginal.acont, '') or ;
					NVL(poMF.amort_max_deductibil, -1) <> NVL(poMFOriginal.amort_max_deductibil, -1)
				* vreau sa prind si schimbarile (amort_max_deductibil, 0, NULL)
				
				poMf.cPerIn = Padl(gnLuna, 2, '0') + Padl(gnAn, 4, '0')
			Endif
			
			If poMf.id_sucursala = 0
				poMf.id_sucursala = null
			EndIf 
			
			
		*!*		
		*!*	19.02.2026	
		*!*	*!* Adaugat nrdoc si datadoc in schimba_mf 
		
		
			lcSql = [begin pack_imob.schimba_mf(?poMf.id_mf,]+;
				[?poMf.nract,]+;
				[?poMf.data_achizitie,]+;
				[?poMf.denumire,]+;
				[?poMf.explicatia,]+;
				[?poMf.data_pif ,]+;
				[?poMf.nr_pif ,]+;
				[?poMf.procent,]+;
				[?poMf.coeficient,]+;
				[?poMf.id_tip_amortizare,]+;
				[?poMf.id_tip_imobilizare,]+;
				[?poMf.id_lista_mf,]+;
				[?poMf.dns_luni,]+;
				[?poMf.Cod_mf ,]+;
				[?poMf.cont,]+;
				[?poMf.acont,]+;
				[?poMf.nr_inventar,]+;
				[?poMf.id_gestiune,]+;
				[?poMf.id_responsabil,]+;
				[?poMf.id_sectie,]+;
				[?poMf.id_lucrare,]+;
				[?poMf.id_sucursala,]+;		
				[?poMf.cPerIn,]+;
				[?poMf.lper_fin,]+;
				[?poMf.id_operatie_mf,]+;
				[?poMf.id_tip_operatie,]+;
				[?poMf.valoare_rol,]+;
				[?poMf.valoare_ramasa_rol,]+;
				[?poMf.dns_ramas,]+;
				[?poMf.valoare_reziduala,]+;		
				[?poMf.data_operatie,]+;
				[?poMf.cauza,]+;
				[?poMf.uzura_prec,]+;
				[?poMf.id_calcul_rate,]+;
				[?poMf.rper_in ,]+;
				[?poMf.rper_fin,]+;
				[?poMf.rata_rol,]+;
				[?poMf.cota_an,]+;
				[?poMf.cota_luna,]+;
				[?poMf.ultima_rata_rol,]+;
				[?poMf.data_expirare,]+;
				[0, ?gnIdUtil,]+;
				[?poMf.amort_max_deductibil, ?poMF.nrdoc, ?poMF.datadoc); end;]
				
			*!* 03.04.2008 ^		
			lnSucces = goExecutor.oExecute(lcSql)
			If lnSucces < 0
				aMESSAGEBOX(goExecutor.cEroare,0+16,"Eroare")
			Endif
			This.LockScreen = .T.
			*!*		this.ct_grid_order1.initializare()
			*!*		this.ct_grid_order1._GRID1.SetAll('DynamicForeColor','IIF(iesit_din_gest=0,IIF(data_expirare<DATE(gnAn,gnLuna,1),'+;
			*!*		'RGB(0,0,255),RGB(0,0,0)),RGB(255,0,0))','Column')
			*!*		this.ct_grid_order1._GRID1.RecordMark = .T.
			This.do_cauta
			This.LockScreen = .F.
		
		Endif
		
	ENDPROC

	PROCEDURE do_reset
		If This.lExperimental
			DoDefault()
		Else
			With Thisform
				For i=1 To .Objects.Count
					If Upper(.Objects(i).BaseClass)='CHECKBOX'
						.Objects(i).Value=0
					Endif
				Endfor
			Endwith
		
			Thisform.filtru=""
		Endif
		****************************
		* ALTENATIV BUT_RESET
		
	ENDPROC

	PROCEDURE do_sterge
		Private pnIdMf
		Local lcsql, llSucces
		Select crslista
		pnIdMf = Nvl(id_mf, 0)
		If Empty(m.pnIdMf)
			AMESSAGEBOX("Nu exista inregistrari pe care le puteti sterge", 0 + 48, _Screen.Caption)
			Return
		Endif
		
		If AMESSAGEBOX("Se elimina mijlocul fix " + Chr(13) + ;
				  "Numar de inventar: " + Iif(!Empty(nr_inventar), Alltrim(Str(nr_inventar)), "Fara nr. de inv.") + Chr(13) + ;
				  "Denumire: " + Alltrim(denumire) + Chr(13) + ;
				  "Atentie! Operatia este ireversibila!", 4 + 32, _Screen.Caption) = 6
		
			lcsql = [begin pack_imob.sterge_mf(?pnIdMf,?gnIdUtil); end;]
			llSucces = goExecutor.oExecuta(lcsql)
			If m.llSucces
				Thisform.do_cauta()
			Endif
		Endif
	ENDPROC

	PROCEDURE do_verifica
		If This.nFiscal <> 0
			Return
		Endif
		
		Do verificare_balanta With This.nTip In oproceduri_imob.prg
		
		
	ENDPROC

	PROCEDURE Init
		Parameters tnTip, tnFiscala
		DoDefault()
		
		Thisform.ntip=tnTip
		Thisform.nFiscal=tnFiscala
		
		If tnTip=1
			lcCorporal = "CORPORALE"
			*Thisform.lb_titlu_alb_b121.Caption=Thisform.lb_titlu_alb_b121.Caption+" CORPORALE" 
		ELSE
			lcCorporal = "NECORPORALE"
			*Thisform.lb_titlu_alb_b121.Caption=Thisform.lb_titlu_alb_b121.Caption+" NECORPORALE"
		Endif
		If tnFiscala=0
			lcFiscal = "CONTABILA"
		ELSE
			lcFiscal = "FISCALA"
		ENDIF
		
		Thisform.lb_titlu_alb_b121.Caption=Thisform.lb_titlu_alb_b121.Caption + ' ' + lcCorporal + ' - ' + lcFiscal
		
		this.grd_lista.HeaderHeight = 36 && Nu stiu de ce se face headerheight = 19 (am verificat si fara gridextras si fara grdfooter)
		*!*	Thisform.do_calcul_sume()
		*!*	Thisform.do_coloreaza_grid()
		
		TEXT TO this.cmd_executa1.ToolTipText NOSHOW 
		1. Majorarea valorii de intrare
			Se majoreaza valoarea de intrare. 
		
			Valoarea ramasa = Valoarea de intrare noua  - Amortizarea totala
			Durata ramasa = Durata ramasa de la operatia precedenta - Uzura de la operatia precedenta
		
			Valoarea amortizabila = Valoarea ramasa - valoarea reziduala
			Rata anuala (%) = (12 / Durata ramasa) * 100
			Amortisment lunar = Valoarea amortizabila * (rata anuala % / 12)
		
		2. Reevaluarea valorii de intrare
			Se reevalueaza valoarea de intrare si amortizarea totala.
		
			Valoarea ramasa = Valoarea de intrare noua  - Amortizarea totala noua
			Durata ramasa = DNS - Uzura totala
		
			Valoarea amortizabila = Valoarea ramasa noua - Valoarea reziduala
			Rata anuala (%) = (12 / Durata ramasa) * 100
			Amortisment lunar = Valoarea amortizabila * (rata anuala % / 12)
		
		3. Conservare/Iesire din conservare
		
		4. Schimbare DNS
			Se schimba DNS si (optional) codul de clasificare.
		
			Valoarea ramasa = Valoarea de intrare - Amortizarea precedenta
			Durata ramasa = DNS nou * [1 - (Uzura totala - 1) / DNS vechi]
			Uzura precedenta = DNS nou - Durata ramasa noua
		
			Valoarea amortizabila = Valoarea ramasa - Valoarea reziduala
			Rata anuala (%) = (12 / Durata ramasa noua) * 100
			Amortisment lunar = Valoarea amortizabila * (rata anuala % / 12)
				
		5. Schimbare DNS + reevaluare
			Se reevalueaza valoarea de intrare, amortizarea totala, uzura totala. Se schimba DNS.
		
			Valoarea ramasa = Valoarea de intrare noua  - Amortizarea totala noua
			Durata ramasa = DNS nou - Uzura totala noua
			Uzura precedenta = Uzura totala noua
		
			Valoarea amortizabila = Valoarea ramasa - Valoarea reziduala
			Rata anuala (%) = (12 / Durata ramasa noua) * 100
			Amortisment lunar = Valoarea amortizabila * (rata anuala % / 12)
				
		6. Intrare/Iesire din gestiune
		ENDTEXT 
	ENDPROC

	PROCEDURE lexperimental_assign
		lparameters tlExperimental
		This.lExperimental = tlExperimental
		* In mod experimental ascund filtrele ck_filtru
		* fac vizibil but_start_criterii
		* maresc gridul
		
		this.but_start_criterii1.Visible = m.tlExperimental
		this.but_reset_criterii1.Visible = m.tlExperimental
		this.cmd_cauta1.Visible = !m.tlExperimental
		this.cmd_reset1.Visible = !m.tlExperimental
		
		FOR EACH loCtrl IN ThisForm.Controls
			IF LOWER(loCtrl.baseclass) = 'checkbox'
				loCtrl.visible = !m.tlExperimental
			ENDIF 
		ENDFOR 
		
		IF m.tlExperimental
			this.grd_lista.Height = thisform.height - 128
			this.grd_lista.Top = 93	
		ELSE 	
			this.grd_lista.Height = thisform.height - 188
			this.grd_lista.Top = 156	
		ENDIF 	
		
	ENDPROC

	PROCEDURE Show
		LPARAMETERS nStyle
		this.LockScreen = .F.
		
		IF This.nFiscal = 1
			this.cmd_executa1.Visible = .f.
			this.but_modifica1.Visible = .f.
			this.but_sterge1.Visible = .f.
		ENDIF 
		
		Thisform.lExperimental = .T. && 25.11.2021 Thisform.lExperimental = (goApp.nExperimental = 1)
		THIS._grdfooter1.attachtogrid(This.grd_lista)
		
		this.gridextra1.setup()
		this.grd_lista.HeaderHeight = 36
		IF TYPE('this.gridextra1.gridexportobject') = 'O'
			*** se suprapunea peste butonul bottom scrool al grid-ului (probabil din cauza ca nu mai exista scroll orizontal sau din cauza grdfooter)
			this.gridextra1.gridexportobject.Top = this.gridextra1.gridexportobject.Top + 18
		ENDIF 	
		
		this.do_cauta 
		this.WindowState = 2
		
		this.LockScreen = .F.
	ENDPROC

	PROCEDURE But_start_criterii1.loadcriterii
		PARAMETERS tacriterii
		EXTERNAL ARRAY tacriterii
		#DEFINE crlf CHR(13)+CHR(10)
		
		lcStringCriterii="Numar document\nract\N\none\" + crlf + ;
			"Data document\data_achizitie\D\none\" + crlf + ;
			"Denumire\denumire\T\none\"+ crlf + ;
			"Numar inventar\nr_inventar\N\none\" + crlf + ;
			"Numar PIF\nr_pif\N\none\" + crlf + ;	
			"Data PIF\data_pif\D\none\" + crlf + ;
			"Cont\cont\T\none\" + crlf + ;
			"Cont analitic\acont\T\none\" + crlf + ;	
			"Data expirare\data_expirare\D\none\" + crlf + ;
			"Expirat\nofiled\E\*EXPIRAT*\" + crlf + ;		
			"Gestiune\gestiune\T\id_gestiune\nom_gestiune"+ crlf + ;
			"Sectie\sectie\T\id_sectie\nom_sectie" + crlf + ;
			"Responsabil\responsabil\T\id_responsabil\nom_parteneri" + crlf + ;
			"Lucrare\nrord\T\id_lucrare\nom_lucrare" + crlf + ;			
			"Valoare\valoare\N|get_mask(14,gnPA)\none\" + crlf + ;
			"Valoare achizitie\valoare_achizitie\N|get_mask(14,gnPA)\none\" + crlf + ;
			"Valoare majorare\(valoare-valoare_achizitie)\N|get_mask(14,gnPA)\none\" + crlf + ;	
			"Valoare justa\valoare_ramasa\N|get_mask(14,gnPA)\none\" + crlf + ;
			"Amortisment\rata\N|get_mask(14,gnPA)\none\" + crlf + ;	
			"Amort. max. ded.\amort_max_deductibil\N|get_mask(14,gnPA)\none\" + crlf + ;
			"Iesit din gestiune\nofiled\E\(iesit_din_gest = 1)\" + crlf + ;
			"Explicatia\explicatia\T\none\"+ crlf + ;				
			"Ultima miscare\ultima_operatie\T\none\"+ crlf + ;				
			"Data ultima misc.\data_operatie\D\none\" + crlf + ;	
			"Cauza ultima misc.\cauza\T\none\"
		
		DODEFAULT()
		
	ENDPROC

	PROCEDURE cmd_executa2.Click
		SELECT (thisform.cnumecursor)
		SCATTER NAME loMf
		
		thisform.AlwaysOnTop = .F.
		DO modif_operatii_rate WITH thisform.ntip, thisform.nfiscal, loMF
		thisform.AlwaysOnTop = .T.
		thisform.do_cauta 
		
		
		
	ENDPROC

	PROCEDURE Gridextra1.applyfilter
		DODEFAULT()
		Thisform._grdfooter1.calcTotal()
	ENDPROC

	PROCEDURE Gridextra1.clearfilter
		DODEFAULT()
		Thisform._grdfooter1.calcTotal()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_lista_curs AS _frmbase OF "..\comun\clase\_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_listare1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cNrAct.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cNrAct.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDataAct.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDataAct.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cNrInventar.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cNrInventar.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDenumire.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDenumire.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cExplicatia.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cExplicatia.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cNrGest.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cNrGest.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cResponsabil.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cResponsabil.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cCont.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cCont.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cUtilizator.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cUtilizator.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDataora.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cDataora.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cLucrare.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cLucrare.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cSectie.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cSectie.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoareRamasa.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoareRamasa.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cSucursala.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cSucursala.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoareRetinuta.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cValoareRetinuta.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAles.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAles.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAles._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAcont.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grd_lista.cAcont.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmd_executa1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_excel1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdfooter1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_start_criterii1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_reset_criterii1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Gridextra1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmd_executa2" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: do_calcul_sume
		*m: do_majorare
		*p: filtru
		*p: ntip
	*</DefinedPropArrayMethod>

	*<PropValue>
		cbuton3 = but_modifica1;cmd_executa1;cmd_executa2
		cgridsortlist = grd_lista
		DoCreate = .T.
		filtru = 
		FontCharSet = 238
		Height = 582
		Name = "frm_lista_curs"
		ntip = 0
		Width = 793
		WindowState = 2
		_SHAPE1.Anchor = 10
		_SHAPE1.Height = 29
		_SHAPE1.Left = 0
		_SHAPE1.Name = "_SHAPE1"
		_SHAPE1.Top = 0
		_SHAPE1.Width = 792
		_SHAPE1.ZOrderSet = 0
		_SHAPE2.Anchor = 8
		_SHAPE2.Height = 29
		_SHAPE2.Left = 636
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = -1
		_SHAPE2.Width = 161
		_SHAPE2.ZOrderSet = 1
		LB_TITLU_ALB_B121.Caption = "LISTA IMOBILIZARILOR IN CURS"
		LB_TITLU_ALB_B121.FontBold = .T.
		LB_TITLU_ALB_B121.FontCharSet = 238
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		LB_TITLU_ALB_B121.TabIndex = 11
		LB_TITLU_ALB_B121.ZOrderSet = 4
		BUT_TERMIN1.Anchor = 8
		BUT_TERMIN1.Left = 762
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 10
		BUT_TERMIN1.Top = 0
		BUT_TERMIN1.ZOrderSet = 5
		Gridsort1.Left = 12
		Gridsort1.Name = "Gridsort1"
		Gridsort1.Top = 216
	*</PropValue>

	ADD OBJECT '_grdfooter1' AS _grdfooter WITH ;
		Anchor = 14, ;
		ccolwithlabel = cDenumire, ;
		csourcegrdalias = crsLista, ;
		csourcegrid = grd_lista, ;
		csumcolumns = cValoare,cValoareRamasa,cValoareRetinuta, ;
		FontSize = 10, ;
		Height = 25, ;
		Left = 15, ;
		Name = "_grdfooter1", ;
		RowHeight = 19, ;
		TabIndex = 12, ;
		Top = 550, ;
		Width = 770, ;
		ZOrderSet = 40
		*< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'But_excel1' AS but_excel WITH ;
		Anchor = 8, ;
		Left = 641, ;
		Name = "But_excel1", ;
		TabIndex = 6, ;
		Top = 0, ;
		ZOrderSet = 46
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_listare1' AS but_listare WITH ;
		Anchor = 8, ;
		Caption = "", ;
		Left = 671, ;
		Name = "But_listare1", ;
		TabIndex = 7, ;
		Top = 0, ;
		ZOrderSet = 6
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 8, ;
		Left = 732, ;
		Name = "But_modifica1", ;
		TabIndex = 9, ;
		Top = 0
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_reset_criterii1' AS but_reset_criterii WITH ;
		Anchor = 8, ;
		Left = 581, ;
		Name = "But_reset_criterii1", ;
		TabIndex = 4, ;
		Top = 0
		*< END OBJECT: ClassLib="..\comun\clase\ocriterii.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_start_criterii1' AS but_start_criterii WITH ;
		Anchor = 8, ;
		Left = 611, ;
		Name = "But_start_criterii1", ;
		TabIndex = 5, ;
		Top = 0
		*< END OBJECT: ClassLib="..\comun\clase\ocriterii.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 8, ;
		Left = 702, ;
		Name = "But_sterge1", ;
		TabIndex = 8, ;
		Top = 0
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Cmd_executa1' AS cmd_executa WITH ;
		Anchor = 8, ;
		Caption = "\<Operatiuni", ;
		Height = 27, ;
		Left = 672, ;
		Name = "Cmd_executa1", ;
		TabIndex = 2, ;
		Top = 36, ;
		Visible = .F., ;
		Width = 107, ;
		WordWrap = .T.
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Cmd_executa2' AS cmd_executa WITH ;
		Anchor = 8, ;
		Caption = "\<Istoric Miscari", ;
		Height = 27, ;
		Left = 558, ;
		Name = "Cmd_executa2", ;
		TabIndex = 2, ;
		Top = 36, ;
		Visible = .F., ;
		Width = 107, ;
		WordWrap = .T.
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'grd_lista' AS _grdbase WITH ;
		Anchor = 15, ;
		ColumnCount = 18, ;
		DeleteMark = .F., ;
		Height = 478, ;
		HighlightBackColor = 109,125,167, ;
		HighlightStyle = 2, ;
		lcamptextneeditabil = .F., ;
		Left = 12, ;
		Name = "grd_lista", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "crslista", ;
		RowHeight = 19, ;
		TabIndex = 1, ;
		Top = 72, ;
		Width = 768, ;
		ZOrderSet = 7, ;
		Column1.ColumnOrder = 1, ;
		Column1.ControlSource = "nract", ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 10, ;
		Column1.Name = "cNrAct", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 57, ;
		Column2.ColumnOrder = 2, ;
		Column2.ControlSource = "IIF(TYPE('data_achizitie')='D',data_achizitie,TTOD(data_achizitie))", ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 10, ;
		Column2.Name = "cDataAct", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 52, ;
		Column3.ColumnOrder = 3, ;
		Column3.ControlSource = "nr_inventar", ;
		Column3.FontName = "Arial", ;
		Column3.FontSize = 10, ;
		Column3.Name = "cNrInventar", ;
		Column3.ReadOnly = .T., ;
		Column4.ColumnOrder = 4, ;
		Column4.ControlSource = "denumire", ;
		Column4.FontName = "Arial", ;
		Column4.FontSize = 10, ;
		Column4.Name = "cDenumire", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 137, ;
		Column5.ColumnOrder = 11, ;
		Column5.ControlSource = "explicatia", ;
		Column5.FontName = "Arial", ;
		Column5.FontSize = 10, ;
		Column5.Name = "cExplicatia", ;
		Column5.ReadOnly = .T., ;
		Column5.Width = 137, ;
		Column6.ColumnOrder = 7, ;
		Column6.ControlSource = "valoare", ;
		Column6.FontName = "Arial", ;
		Column6.FontSize = 10, ;
		Column6.InputMask = (get_mask(14,gnPa)), ;
		Column6.Name = "cValoare", ;
		Column6.ReadOnly = .T., ;
		Column6.Width = 103, ;
		Column7.ColumnOrder = 13, ;
		Column7.ControlSource = "cgest", ;
		Column7.FontName = "Arial", ;
		Column7.FontSize = 10, ;
		Column7.Name = "cNrGest", ;
		Column7.ReadOnly = .T., ;
		Column7.Width = 137, ;
		Column8.ColumnOrder = 15, ;
		Column8.ControlSource = "responsabil", ;
		Column8.FontName = "Arial", ;
		Column8.FontSize = 10, ;
		Column8.Name = "cResponsabil", ;
		Column8.ReadOnly = .T., ;
		Column8.Width = 141, ;
		Column9.ColumnOrder = 5, ;
		Column9.ControlSource = "cont", ;
		Column9.FontName = "Arial", ;
		Column9.FontSize = 10, ;
		Column9.Name = "cCont", ;
		Column9.ReadOnly = .T., ;
		Column9.Width = 57, ;
		Column10.ColumnOrder = 16, ;
		Column10.ControlSource = "utilizator", ;
		Column10.FontName = "Arial", ;
		Column10.FontSize = 10, ;
		Column10.Name = "cUtilizator", ;
		Column10.ReadOnly = .T., ;
		Column10.Width = 135, ;
		Column11.ColumnOrder = 17, ;
		Column11.ControlSource = "dataora", ;
		Column11.FontName = "Arial", ;
		Column11.FontSize = 10, ;
		Column11.Name = "cDataora", ;
		Column11.ReadOnly = .T., ;
		Column11.Width = 100, ;
		Column12.ColumnOrder = 12, ;
		Column12.ControlSource = "nrord", ;
		Column12.FontName = "Arial", ;
		Column12.FontSize = 10, ;
		Column12.Name = "cLucrare", ;
		Column12.ReadOnly = .T., ;
		Column13.ColumnOrder = 14, ;
		Column13.ControlSource = "sectie", ;
		Column13.FontName = "Arial", ;
		Column13.FontSize = 10, ;
		Column13.Name = "cSectie", ;
		Column13.ReadOnly = .T., ;
		Column13.Width = 159, ;
		Column14.ColumnOrder = 8, ;
		Column14.ControlSource = "valoare_ramasa", ;
		Column14.FontName = "Arial", ;
		Column14.FontSize = 10, ;
		Column14.Format = "RK", ;
		Column14.InputMask = (get_mask(14,gnPa)), ;
		Column14.Name = "cValoareRamasa", ;
		Column14.ReadOnly = .T., ;
		Column14.Width = 95, ;
		Column15.ColumnOrder = 18, ;
		Column15.ControlSource = "sucursala", ;
		Column15.FontName = "Arial", ;
		Column15.FontSize = 10, ;
		Column15.Name = "cSucursala", ;
		Column15.ReadOnly = .T., ;
		Column15.Width = 165, ;
		Column16.ColumnOrder = 10, ;
		Column16.ControlSource = "valoareretinuta", ;
		Column16.DynamicBackColor = "RGB(200,225,255)", ;
		Column16.Format = "RK", ;
		Column16.InputMask = (get_mask(14,gnPa)), ;
		Column16.Name = "cValoareRetinuta", ;
		Column16.ReadOnly = .F., ;
		Column16.Visible = .T., ;
		Column16.Width = 99, ;
		Column17.ColumnOrder = 9, ;
		Column17.ControlSource = "ales", ;
		Column17.CurrentControl = "_checkbox1", ;
		Column17.DynamicBackColor = "RGB(200,225,255)", ;
		Column17.Name = "cAles", ;
		Column17.ReadOnly = .F., ;
		Column17.Sparse = .F., ;
		Column17.Width = 29, ;
		Column18.ColumnOrder = 6, ;
		Column18.ControlSource = "acont", ;
		Column18.Name = "cAcont", ;
		Column18.ReadOnly = .T., ;
		Column18.Width = 54
		*< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" />

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

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

	ADD OBJECT 'grd_lista.cAles._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		BackColor = 255,255,255, ;
		Caption = "", ;
		Centered = .T., ;
		ControlSource = "ales", ;
		Left = 36, ;
		Name = "_checkbox1", ;
		ReadOnly = .F., ;
		Top = 83
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="checkbox" />

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	ADD OBJECT 'grd_lista.cValoareRamasa.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Valoare ramasa", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grd_lista.cValoareRetinuta.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Valoare retinuta", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Gridextra1' AS gridextra WITH ;
		allowgridpreferences = .F., ;
		companyname = ROMFAST, ;
		gridexpression = Thisform.grd_lista, ;
		Height = 17, ;
		Left = 192, ;
		Name = "Gridextra1", ;
		productname = ROAIMOB, ;
		Top = 132, ;
		Width = 22
		*< END OBJECT: ClassLib="..\comun\utile\gridextras\gridextras.vcx" BaseClass="custom" />
	
	PROCEDURE actualizeaza_grid1
		Parameters tcFiltru
		Local lcFiltru
		If Empty(tcFiltru)
			lcFiltru=poLista.ca_baza1.cfiltru
		Else
			lcFiltru=tcFiltru
		Endif
		
		LOCAL lcCursor, lnIdMFOld
		
		lcCursor = Thisform.grd_lista.RecordSource 
		SELECT (lcCursor)
		lnIdMFOld = id_mf
		
		Thisform.LockScreen = .T.
		Thisform.MousePointer = 11
		
		save_grid_comment(Thisform.grd_lista)
		poLista.ca_baza1.cfiltru=lcFiltru
		poLista.ca_baza1.afisare()
		
		restore_grid_comment(Thisform.grd_lista)
		
		THISFORM._grdfooter1.calcTotal
		
		IF TYPE("THIS.gridsort1") = "O"
			THIS.gridsort1.gridsort()
		ENDIF 	
		
		SELECT (lcCursor)
		LOCATE FOR id_mf = lnIdMFOld
		IF !FOUND()
			LOCATE
		ENDIF 
		
		Thisform.MousePointer = 0
		Thisform.LockScreen = .F.
		
		Thisform.grd_lista.SetFocus()
		
	ENDPROC

	PROCEDURE do_calcul_sume
	ENDPROC

	PROCEDURE do_cauta
		Local lcFiltru
		
		
		* Implicit arat doar imobilizarile cu valoare ramasa <> 0
		IF !('transformat'$LOWER(Thisform.filtru_pretty_ro_full) OR 'toate'$LOWER(Thisform.filtru_pretty_ro_full))
			lcFiltru = '(valoare_ramasa <> 0)'
		ELSE 
			lcFiltru = "(1=1)"	
		ENDIF 
		
		If Len(Thisform.filtru_pretty) > 0
			lcFiltru = lcFiltru + ' and ' + Alltrim(Thisform.filtru_pretty)
		Endif
		
		Thisform.actualizeaza_grid1(m.lcFiltru)
		
		If Reccount('crsLista') = 0
			aMessagebox('Cautarea nu a intors rezultate!', 0 + 48, 'Info cautare')
		Endif
		
		
	ENDPROC

	PROCEDURE do_excel
		Local lcAlias, lcFiltru, lcColumnList, lcHeaderList, lcSelect, lcOutput, lcFrom, lcWhere, lcOrder
		lcAlias = this.grd_lista.RecordSource 
		lcFiltru = FILTER(lcAlias)
		IF EMPTY(lcFiltru)
			lcFiltru = '.T.'
		ENDIF 
		
		exista_excel=.T.
		lcColumnList = ''
		lcHeaderList = ''
		lcSelect = ''
		llSelect = .T.
		lcType = 'CURSOR'
		lcFrom = lcAlias
		lcWhere = lcFiltru
		lcOrder = 'data_achizitie,nr_inventar'
		lcOutput = 'crsIMOB'
		
		get_schema_grid(this.grd_lista,@lcColumnList, @lcHeaderList, @lcSelect, llSelect, lcType, lcFrom, lcWhere, lcOrder, lcOutput)
		&lcSelect
		IF USED(lcOutput)
			DO export_xls WITH lcOutput IN oproceduri_comune.prg
			USE IN (lcOutput)
		ENDIF 
	ENDPROC

	PROCEDURE do_executa
		If !verificare_luna_inchisa("Luna este blocata! Nu puteti face introduceri.")
			Return
		ENDIF
		
		Private poDetaliiMf
		Local llAles, lnRecno, lnTip, lnButon, lnOptiune
		
		lnOptiune = xmenu('\<Transformare in imobilizare corporala;T\<ransformare in imobilizare necorporala;\-;\<Adaugare la imobilizare corporala;A\<daugare la imobilizare necorporala')	
		IF EMPTY(m.lnOptiune)
			RETURN
		ENDIF 
		
		lnTip = IIF(INLIST(m.lnOptiune,1,4),1, 2) && 1 = corporale , 2 = necorporale
		
		Select crsLista
		lnRecno = Recno()
		Locate For ales = 1
		llAles = Found()
		If !m.llAles
			Try
				Goto m.lnRecno
			Catch
				Go Top
			Endtry
		Endif
		If !m.llAles
			AMESSAGEBOX('Alegeti imobilizarile in curs!', 0 + 48, _Screen.Caption)
			Return
		Endif
		
		Select * From crsLista With (Buffering = .T.) Where ales = 1 And valoareretinuta <> 0 Into Cursor crslista3 Readwrite
		
		Select crslista3
		Scatter Name poDetaliiMf
		
		Sum valoareretinuta To poDetaliiMf.valoare
		
		poDetaliiMf.nract = 0
		poDetaliiMf.data_achizitie = Date()
		poDetaliiMf.denumire = ''
		poDetaliiMf.nr_inventar = 0
		poDetaliiMf.gestiune = ''
		poDetaliiMf.responsabil = ''
		poDetaliiMf.nrord = ''
		poDetaliiMf.sectie = ''
		poDetaliiMf.Cont = ''
		poDetaliiMf.acont = ''
		
		poDetaliiMf.id_gestiune = 0
		poDetaliiMf.id_responsabil = 0
		poDetaliiMf.id_lucrare = 0
		poDetaliiMf.id_sectie = 0
		
		IF INLIST(m.lnOptiune, 1, 2)
			llSucces = op_transformare_mf(m.lnTip)
		ELSE 	
			llSucces = op_adaugare_la_mf(m.lnTip)
		ENDIF 	
		
		USE IN (SELECT('crsLista3'))
		SELECT crsLista
		If m.llSucces && daca am dat OK la introducerea MF
			Thisform.actualizeaza_grid1()
		ENDIF
		this.grd_lista.SetFocus()
		
	ENDPROC

	PROCEDURE do_listare
		PRIVATE pcDataOra, pcGrupDenumire, pcGrupId, pcGrupTitlu
		Local lnOptiune, lcFilter, lcCursor
		
		pcDataOra = ""
		pcGrupId = '1=1'
		pcGrupTitlu = ''
		pcGrupDenumire = 'nrord'
		lcCursor = 'crsLista'
		lcFilter = FILTER('crsLista')
		IF EMPTY(lcFilter)
			lcFilter = ".T."
		ENDIF 
		
		lnOptiune = xmenu('Listare simpla;Listare grupata pe lucrari')
		
		If lnOptiune = 2
			pcGrupId = 'id_lucrare'
			pcGrupTitlu = 'Lucrare'
			pcGrupDenumire = 'nrord'
		
			lcCursor = 'crsLista2'
			
			SELECT * FROM crsLista WHERE &lcFilter ORDER BY nrord, data_achizitie, nr_inventar INTO CURSOR (lcCursor)
		Endif
		
		If Reccount('crslista') > 0
			pcDataOra = get_ora(2)
			Thisform.AlwaysOnTop = .F.
			SELECT (m.lcCursor)
			*!*		Report Form listimobcurs To Printer Prompt Preview
			goExport.export2frx(m.lcCursor, "listimobcurs", , , , , , .T.)
		
			Thisform.AlwaysOnTop = .T.
		Else
			amessagebox("Nu exista inregistrari pentru listare!", 48, "Atentie")
		ENDIF
		
		USE IN (SELECT('crsLista2'))
		
		Release pcDataOra
	ENDPROC

	PROCEDURE do_majorare
	ENDPROC

	PROCEDURE do_modifica
		Private pnButon
		pnButon=1
		liic=CREATEOBJECT("frm_introducere_curs",.t.)
		liic.show(1)
		
		If pnButon=1
				Thisform.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_sterge
		Private pnIdMf
		Local lcsql, llSucces
		Select crslista
		pnIdMf = Nvl(id_mf, 0)
		If Empty(m.pnIdMf)
			AMESSAGEBOX("Nu exista inregistrari pe care le puteti sterge", 0 + 48, _Screen.Caption)
			Return
		Endif
		
		If AMESSAGEBOX("Se elimina mijlocul fix " + Chr(13) + ;
				  "Numar de inventar: " + Iif(!Empty(nr_inventar), Alltrim(Str(nr_inventar)), "Fara nr. de inv.") + Chr(13) + ;
				  "Denumire: " + Alltrim(denumire) + Chr(13) + ;
				  "Atentie! Operatia este ireversibila!", 4 + 32, _Screen.Caption) = 6
		
			lcsql = [begin pack_imob.sterge_mf(?pnIdMf); end;]
			llSucces = goExecutor.oExecuta(lcsql)
			If m.llSucces
				Thisform.do_cauta()
			Endif
		Endif
	ENDPROC

	PROCEDURE Show
		LPARAMETERS nStyle
		
		Thisform.grd_lista.SetAll('DynamicForeColor','IIF(valoare_ramasa = 0, RGB(0,0,255), IIF(valoare <> valoare_ramasa, RGB(0,150,0),RGB(0,0,0)))','Column')
			
		THIS._grdfooter1.attachtogrid(This.grd_lista)
		this.gridextra1.setup()
		
		this.do_cauta 
		
		this.WindowState = 2
	ENDPROC

	PROCEDURE But_start_criterii1.loadcriterii
		PARAMETERS tacriterii
		EXTERNAL ARRAY tacriterii
		#DEFINE crlf CHR(13)+CHR(10)
		
		lcStringCriterii="Numar document\nract\N\none\" + crlf + ;
			"Data document\data_achizitie\D\none\" + crlf + ;
			"Denumire\denumire\T\none\"+ crlf + ;
			"Numar inventar\nr_inventar\N\none\" + crlf + ;
			"Cont\cont\T\none\" + crlf + ;
			"Cont analitic\cont\T\none\" + crlf + ;	
			"Gestiune\gestiune\T\id_gestiune\nom_gestiune"+ crlf + ;
			"Sectie\sectie\T\id_sectie\nom_sectie" + crlf + ;
			"Responsabil\responsabil\T\id_responsabil\nom_parteneri" + crlf + ;
			"Lucrare\nrord\T\id_lucrare\nom_lucrare" + crlf + ;			
			"Valoare\valoare\N|get_mask(14,gnPA)\none\" + crlf + ;
			"Valoare ramasa\valoare_ramasa\N|get_mask(14,gnPA)\none\" + crlf + ;
			"Transformat partial\nofiled\E\(valoare <> valoare_ramasa)\" + crlf + ;
			"Transformat total\nofiled\E\(valoare_ramasa=0)\" + crlf + ;	
			"Netransformat\nofiled\E\(valoare = valoare_ramasa)\"+ crlf + ;	
			"Toate\nofiled\E\(1=1)\" 	
		DODEFAULT()
		
	ENDPROC

	PROCEDURE Cmd_executa2.Click
		Local loMf, lnTip, lnFiscal
		lnTip = thisform.nTip && 3=imobilizari in curs
		lnFiscal = 0
		
		Select crsLista
		Scatter Name loMf MEMO 
		
		
		lnLuna = MONTH(loMF.data_achizitie)
		lnAn = YEAR(loMf.data_achizitie)
		
		ADDPROPERTY(loMF, "dataact", loMF.data_achizitie)
		ADDPROPERTY(loMF, "data_pif", loMF.data_achizitie)
		ADDPROPERTY(loMF, "nr_pif", loMF.nr_inventar)		
		ADDPROPERTY(loMF, "id_tip_amortizare", 1) && liniar
		ADDPROPERTY(loMF, "id_tip_imobilizare", 3) && in curs
		ADDPROPERTY(loMF, "fiscala", 0) 
		ADDPROPERTY(loMF, "cod", NULL) 
		ADDPROPERTY(loMF, "cod_mf", NULL) 			
		ADDPROPERTY(loMF, "dns", 0) 
		ADDPROPERTY(loMF, "dns_luni", 0) 			
		ADDPROPERTY(loMF, "rata", 0) 						
		ADDPROPERTY(loMF, "uzura", 0) 
		ADDPROPERTY(loMF, "dns_ramas", 0) 	
		
		ADDPROPERTY(loMF, "lper_in", PADL(m.lnLuna, 2, '0') + ALLTRIM(STR(m.lnAn)))
		ADDPROPERTY(loMF, "lper_fin", PADL(m.lnLuna, 2, '0') + ALLTRIM(STR(m.lnAn)))
		ADDPROPERTY(loMF, "procent", 0) 
		ADDPROPERTY(loMF, "coeficient", 0) 
		ADDPROPERTY(loMF, "amort_prec", 0) 
		ADDPROPERTY(loMF, "valoare_reziduala", 0) 
		ADDPROPERTY(loMF, "amort_max_deductibil", 0) 
		ADDPROPERTY(loMF, "id_tip_operatie", 3) && transformare in imobilizare
					
		
		 			
		Thisform.AlwaysOnTop = .F.
		Do modif_operatii_rate With m.lnTip, m.lnFiscal, m.loMf
		
		Thisform.AlwaysOnTop = .T.
		Thisform.do_cauta()
		
		
		
	ENDPROC

	PROCEDURE grd_lista.cAles._checkbox1.Valid
		SELECT crsLista
		IF this.Value = 0
			REPLACE valoareretinuta WITH 0
		ELSE
			REPLACE valoareretinuta WITH valoare_ramasa
		ENDIF 		
		Thisform._grdfooter1.calcTotal()
		SELECT crsLista
	ENDPROC

	PROCEDURE grd_lista.cValoareRetinuta.Text1.Valid
		IF valoareretinuta > valoare_ramasa
			REPLACE valoareretinuta WITH valoare_ramasa 
			AMESSAGEBOX('Valoarea retinuta trebuie sa fie mai mica sau egala cu valoarea ramasa!',0+48,_screen.Caption)
		ENDIF 	
		Thisform._grdfooter1.calcTotal()
		SELECT crsLista
	ENDPROC

	PROCEDURE Gridextra1.applyfilter
		DODEFAULT()
		Thisform._grdfooter1.calcTotal()
	ENDPROC

	PROCEDURE Gridextra1.clearfilter
		DODEFAULT()
		Thisform._grdfooter1.calcTotal()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_modificare AS frm_termin_renunt OF "..\comun\clase\_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="Shape4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nract" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dataact" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nrpif" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_tip_amortizare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_procent" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_datapif" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_coeficient" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ed_denumire" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ed_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nr_inventar" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cod" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dns" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_sectie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_sucursala" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_lucrare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_gestiune" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_responsabil" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_data_ultima_rata" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_ultima_rata" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cota_an" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_rata" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dataop" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_valoare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_uzura" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_val_ramasa" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dns_ramas" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_lperioada_rata" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_luna_intre1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cont.txtAcont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_amort_max_deductibil" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chk_amort_max_deductibil" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: alegecod
		*p: ndns_max
		*p: ndns_min
		*p: ntip
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 542
		Name = "frm_modificare"
		ndns_max = 0
		ndns_min = 0
		ntip = 1
		Width = 703
		_shape1.Anchor = 10
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 788
		_shape1.ZOrderSet = 3
		_shape2.Anchor = 8
		_shape2.Left = 629
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.ZOrderSet = 4
		Lb_titlu_alb_b121.Caption = "Modificare"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 34
		Lb_titlu_alb_b121.ZOrderSet = 5
		BUT_TERMIN1.Anchor = 8
		BUT_TERMIN1.Left = 671
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 32
		BUT_TERMIN1.Top = 1
		BUT_TERMIN1.ZOrderSet = 6
		Gridsort1.Name = "Gridsort1"
		But_renunt1.Anchor = 8
		But_renunt1.Left = 642
		But_renunt1.Name = "But_renunt1"
		But_renunt1.TabIndex = 33
		But_renunt1.Top = 1
		But_renunt1.ZOrderSet = 16
	*</PropValue>

	ADD OBJECT 'Cb_coeficient' AS cb_tx_simplu WITH ;
		Left = 22, ;
		Name = "Cb_coeficient", ;
		TabIndex = 10, ;
		Top = 330, ;
		Width = 312, ;
		ZOrderSet = 13, ;
		_cbbase1.ControlSource = "poMf.coeficient", ;
		_cbbase1.Enabled = .F., ;
		_cbbase1.Height = 23, ;
		_cbbase1.Left = 132, ;
		_cbbase1.Name = "_cbbase1", ;
		_cbbase1.RowSource = "1.5,2,2.5", ;
		_cbbase1.RowSourceType = 1, ;
		_cbbase1.Top = 3, ;
		_cbbase1.Width = 176, ;
		_lbbase1.Caption = "Coeficient", ;
		_lbbase1.Name = "_lbbase1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cb_tip_amortizare' AS cb_tx_simplu WITH ;
		Left = 22, ;
		Name = "Cb_tip_amortizare", ;
		TabIndex = 8, ;
		Top = 274, ;
		Width = 312, ;
		ZOrderSet = 10, ;
		_cbbase1.ColumnCount = 2, ;
		_cbbase1.ColumnLines = .F., ;
		_cbbase1.ColumnWidths = "172,0", ;
		_cbbase1.ControlSource = "poMf.tip_amortizare", ;
		_cbbase1.Height = 23, ;
		_cbbase1.Left = 132, ;
		_cbbase1.Name = "_cbbase1", ;
		_cbbase1.RowSource = "v_tipuri_amort.denumire,id_tip_amortizare", ;
		_cbbase1.RowSourceType = 2, ;
		_cbbase1.Top = 3, ;
		_cbbase1.Width = 176, ;
		_lbbase1.Caption = "Tip amortizare", ;
		_lbbase1.Name = "_lbbase1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cb_tx_simplu1' AS cb_tx_simplu WITH ;
		Left = 22, ;
		Name = "Cb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 45, ;
		Width = 312, ;
		ZOrderSet = 10, ;
		_cbbase1.ColumnCount = 2, ;
		_cbbase1.ColumnLines = .F., ;
		_cbbase1.ColumnWidths = "172,0", ;
		_cbbase1.ControlSource = "poMf.tip_imobilizare", ;
		_cbbase1.Height = 23, ;
		_cbbase1.Left = 132, ;
		_cbbase1.Name = "_cbbase1", ;
		_cbbase1.RowSource = "v_tipuri_imob.denumire,id_tip_imobilizare", ;
		_cbbase1.RowSourceType = 2, ;
		_cbbase1.Top = 3, ;
		_cbbase1.Width = 176, ;
		_lbbase1.Caption = "Fel Imobilizare", ;
		_lbbase1.Name = "_lbbase1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'chk_amort_max_deductibil' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Left = 543, ;
		Name = "chk_amort_max_deductibil", ;
		Top = 164, ;
		Value = .F.
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Clb_amort_max_deductibil' AS clb_tx_simplu WITH ;
		Anchor = 9, ;
		Enabled = .T., ;
		Left = 368, ;
		Name = "Clb_amort_max_deductibil", ;
		TabIndex = 20, ;
		Top = 159, ;
		Width = 312, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poMF.amort_max_deductibil", ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 199, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 108, ;
		Lb_simplu1.Caption = "Amort. max. deductibil", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cod' AS clb_tx_simplu WITH ;
		Anchor = 9, ;
		Left = 368, ;
		Name = "Clb_cod", ;
		TabIndex = 18, ;
		ToolTipText = "Dublu click pentru modificare", ;
		Top = 106, ;
		Width = 312, ;
		ZOrderSet = 20, ;
		Text_simplu1.ControlSource = "poMf.cod_mf", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Dublu click pentru modificare", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Cod", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont' AS clb_tx_simplu WITH ;
		Anchor = 9, ;
		Left = 368, ;
		Name = "Clb_cont", ;
		TabIndex = 21, ;
		Top = 187, ;
		Width = 312, ;
		Text_simplu1.ControlSource = "poMF.cont", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 172, ;
		Text_simplu1.MaxLength = 4, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 65, ;
		Lb_simplu1.Caption = "Cont", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cont.txtAcont' AS _textbox WITH ;
		ControlSource = "poMF.acont", ;
		Format = "!K", ;
		Height = 23, ;
		Left = 242, ;
		MaxLength = 4, ;
		Name = "txtAcont", ;
		Top = 2, ;
		Width = 65
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Clb_cota_an' AS clb_tx_simplu WITH ;
		Anchor = 12, ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_cota_an", ;
		TabIndex = 28, ;
		Top = 413, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poMf.cota_An", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Cota an (%)", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_data_ultima_rata' AS clb_tx_simplu WITH ;
		Anchor = 12, ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_data_ultima_rata", ;
		TabIndex = 31, ;
		Top = 497, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 1, ;
		Text_simplu1.ControlSource = "poMf.data_expirare", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = {}, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Data ultima rata", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_dataact' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 22, ;
		Name = "Clb_dataact", ;
		TabIndex = 3, ;
		Top = 101, ;
		Width = 312, ;
		ZOrderSet = 8, ;
		Text_simplu1.Alignment = 1, ;
		Text_simplu1.ControlSource = "poMf.data_achizitie", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = {}, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Data doc. achizitie", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_dataop' AS clb_tx_simplu WITH ;
		Anchor = 4, ;
		Height = 29, ;
		Left = 24, ;
		Name = "Clb_dataop", ;
		TabIndex = 11, ;
		Top = 385, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 1, ;
		Text_simplu1.ControlSource = "poMf.data_operatie", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = {}, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Data miscare", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_datapif' AS clb_tx_simplu WITH ;
		Left = 22, ;
		Name = "Clb_datapif", ;
		TabIndex = 7, ;
		Top = 246, ;
		Width = 312, ;
		ZOrderSet = 12, ;
		Text_simplu1.Alignment = 1, ;
		Text_simplu1.ControlSource = "poMf.data_pif", ;
		Text_simplu1.Format = "!KD", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = {}, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Data p.i.f.", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_dns' AS clb_tx_simplu WITH ;
		Anchor = 9, ;
		Height = 26, ;
		Left = 368, ;
		Name = "Clb_dns", ;
		TabIndex = 19, ;
		Top = 134, ;
		Width = 312, ;
		ZOrderSet = 21, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poMf.dns_luni", ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 199, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 2, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 108, ;
		Lb_simplu1.Caption = "Durata normala de serviciu (luni)", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_dns_ramas' AS clb_tx_simplu WITH ;
		Anchor = 4, ;
		Left = 24, ;
		Name = "Clb_dns_ramas", ;
		TabIndex = 15, ;
		Top = 497, ;
		Width = 312, ;
		ZOrderSet = 31, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poMf.dns_ramas", ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = "9 999", ;
		Text_simplu1.Left = 239, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 69, ;
		Lb_simplu1.Caption = "Durata ramasa", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_gestiune' AS clb_tx_simplu WITH ;
		Anchor = 9, ;
		Left = 368, ;
		Name = "Clb_gestiune", ;
		TabIndex = 22, ;
		ToolTipText = "Dublu click pentru modificare", ;
		Top = 215, ;
		Width = 312, ;
		ZOrderSet = 24, ;
		Text_simplu1.ControlSource = "poMf.gestiune", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Dublu click pentru modificare", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Gestiune", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_lperioada_rata' AS clb_luna_intre WITH ;
		Anchor = 12, ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_lperioada_rata", ;
		TabIndex = 29, ;
		Top = 441, ;
		Width = 312, ;
		tx_n1.ControlSource = "poMf.rper_in", ;
		tx_n1.Left = 151, ;
		tx_n1.Name = "tx_n1", ;
		tx_n1.ReadOnly = .T., ;
		tx_n1.Top = 2, ;
		Lb_simplu1.Caption = "Perioada valabilitate", ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		tx_n2.ControlSource = "poMf.rper_fin", ;
		tx_n2.Left = 231, ;
		tx_n2.Name = "tx_n2", ;
		tx_n2.ReadOnly = .T., ;
		tx_n2.Top = 2
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_lucrare' AS clb_tx_simplu WITH ;
		Anchor = 9, ;
		Left = 368, ;
		Name = "Clb_lucrare", ;
		TabIndex = 25, ;
		ToolTipText = "Dublu click pentru modificare", ;
		Top = 299, ;
		Width = 312, ;
		ZOrderSet = 23, ;
		Text_simplu1.ControlSource = "poMf.nrord", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Dublu click pentru modificare", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Lucrare", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_luna_intre1' AS clb_luna_intre WITH ;
		Anchor = 9, ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_luna_intre1", ;
		TabIndex = 16, ;
		Top = 50, ;
		Width = 312, ;
		tx_n1.ControlSource = "poMf.lper_in", ;
		tx_n1.Enabled = .F., ;
		tx_n1.Left = 151, ;
		tx_n1.Name = "tx_n1", ;
		tx_n1.Top = 2, ;
		Lb_simplu1.Caption = "Perioada valabilitate", ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		tx_n2.ControlSource = "poMf.lper_fin", ;
		tx_n2.Enabled = .F., ;
		tx_n2.Left = 231, ;
		tx_n2.Name = "tx_n2", ;
		tx_n2.Top = 2
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nr_inventar' AS clb_tx_simplu WITH ;
		Anchor = 9, ;
		Left = 368, ;
		Name = "Clb_nr_inventar", ;
		TabIndex = 17, ;
		Top = 78, ;
		Width = 312, ;
		ZOrderSet = 19, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poMf.nr_inventar", ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Nr. inventar", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nract' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 22, ;
		Name = "Clb_nract", ;
		TabIndex = 2, ;
		Top = 73, ;
		Width = 312, ;
		ZOrderSet = 7, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poMf.nract", ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Nr. doc. achizitie", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nrpif' AS clb_tx_simplu WITH ;
		Left = 22, ;
		Name = "Clb_nrpif", ;
		TabIndex = 6, ;
		Top = 218, ;
		Width = 312, ;
		ZOrderSet = 9, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poMf.nr_pif", ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Nr. p.i.f.", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_procent' AS clb_tx_simplu WITH ;
		Left = 22, ;
		Name = "Clb_procent", ;
		TabIndex = 9, ;
		Top = 302, ;
		Width = 312, ;
		ZOrderSet = 11, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poMf.procent", ;
		Text_simplu1.Enabled = .F., ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = "99.99", ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Procent", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_rata' AS clb_tx_simplu WITH ;
		Anchor = 12, ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_rata", ;
		TabIndex = 27, ;
		Top = 385, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poMf.rata_rol", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Rata", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_responsabil' AS clb_tx_simplu WITH ;
		Anchor = 9, ;
		Left = 368, ;
		Name = "Clb_responsabil", ;
		TabIndex = 23, ;
		ToolTipText = "Dublu click pentru modificare", ;
		Top = 243, ;
		Width = 312, ;
		ZOrderSet = 25, ;
		Text_simplu1.ControlSource = "poMf.responsabil", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Dublu click pentru modificare", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Responsabil", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_sectie' AS clb_tx_simplu WITH ;
		Anchor = 9, ;
		Left = 368, ;
		Name = "Clb_sectie", ;
		TabIndex = 24, ;
		Top = 271, ;
		Width = 312, ;
		ZOrderSet = 22, ;
		Text_simplu1.ControlSource = "poMf.sectie", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Dublu click pentru modificare", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Sectie", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_sucursala' AS clb_tx_simplu WITH ;
		Anchor = 9, ;
		Left = 368, ;
		Name = "Clb_sucursala", ;
		TabIndex = 26, ;
		ToolTipText = "Dublu click pentru modificare", ;
		Top = 327, ;
		Width = 312, ;
		ZOrderSet = 23, ;
		Text_simplu1.ControlSource = "poMf.sucursala", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Dublu click pentru modificare", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Sucursala", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_ultima_rata' AS clb_tx_simplu WITH ;
		Anchor = 12, ;
		Height = 29, ;
		Left = 368, ;
		Name = "Clb_ultima_rata", ;
		TabIndex = 30, ;
		Top = 469, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poMf.ultima_rata_rol", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Ultima rata", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_uzura' AS clb_tx_simplu WITH ;
		Anchor = 4, ;
		Left = 24, ;
		Name = "Clb_uzura", ;
		TabIndex = 13, ;
		Top = 441, ;
		Width = 312, ;
		ZOrderSet = 29, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poMf.uzura_prec", ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = "9 999", ;
		Text_simplu1.Left = 239, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 69, ;
		Lb_simplu1.Caption = "Uzura precedenta (luni)", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_val_ramasa' AS clb_tx_simplu WITH ;
		Anchor = 4, ;
		Height = 29, ;
		Left = 24, ;
		Name = "Clb_val_ramasa", ;
		TabIndex = 14, ;
		Top = 469, ;
		Width = 312, ;
		ZOrderSet = 30, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poMf.valoare_ramasa_rol", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Valoare ramasa", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_valoare' AS clb_tx_simplu WITH ;
		Anchor = 4, ;
		Height = 29, ;
		Left = 24, ;
		Name = "Clb_valoare", ;
		TabIndex = 12, ;
		Top = 413, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poMf.valoare_rol", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Valoare ", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Ed_denumire' AS ed_tx_simplu WITH ;
		Height = 44, ;
		Left = 22, ;
		Name = "Ed_denumire", ;
		TabIndex = 4, ;
		Top = 129, ;
		Width = 312, ;
		ZOrderSet = 14, ;
		_edbase1.ControlSource = "poMf.denumire", ;
		_edbase1.Height = 37, ;
		_edbase1.Left = 68, ;
		_edbase1.MaxLength = 100, ;
		_edbase1.Name = "_edbase1", ;
		_edbase1.Top = 2, ;
		_edbase1.Width = 240, ;
		_lbbase1.Caption = "Denumire", ;
		_lbbase1.Name = "_lbbase1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Ed_tx_simplu1' AS ed_tx_simplu WITH ;
		Height = 47, ;
		Left = 22, ;
		Name = "Ed_tx_simplu1", ;
		TabIndex = 5, ;
		Top = 172, ;
		Width = 312, ;
		ZOrderSet = 15, ;
		_edbase1.ControlSource = "poMf.explicatia", ;
		_edbase1.Height = 41, ;
		_edbase1.Left = 68, ;
		_edbase1.MaxLength = 100, ;
		_edbase1.Name = "_edbase1", ;
		_edbase1.Top = 2, ;
		_edbase1.Width = 240, ;
		_lbbase1.AutoSize = .F., ;
		_lbbase1.Caption = "Explicatie /Descriere", ;
		_lbbase1.Height = 44, ;
		_lbbase1.Left = 8, ;
		_lbbase1.Name = "_lbbase1", ;
		_lbbase1.Top = 6, ;
		_lbbase1.Width = 59, ;
		_lbbase1.WordWrap = .T.
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Label1' AS label WITH ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		Caption = "Nomenclator MF", ;
		Height = 17, ;
		Left = 24, ;
		Name = "Label1", ;
		TabIndex = 35, ;
		ToolTipText = "", ;
		Top = 29, ;
		Width = 92, ;
		ZOrderSet = 17
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label2' AS label WITH ;
		Anchor = 9, ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		Caption = "Lista MF", ;
		Height = 17, ;
		Left = 371, ;
		Name = "Label2", ;
		TabIndex = 36, ;
		ToolTipText = "Modificarile din Lista MF sunt valabile de la luna curenta pana la luna urmatoarei modificari", ;
		Top = 30, ;
		Width = 48, ;
		ZOrderSet = 18
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label3' AS label WITH ;
		Anchor = 4, ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		Caption = "Miscare MF", ;
		Height = 17, ;
		Left = 24, ;
		Name = "Label3", ;
		TabIndex = 37, ;
		Top = 367, ;
		Width = 64, ;
		ZOrderSet = 32
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label4' AS label WITH ;
		Anchor = 12, ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		Caption = "Rata MF", ;
		Height = 17, ;
		Left = 371, ;
		Name = "Label4", ;
		TabIndex = 38, ;
		Top = 367, ;
		Width = 47, ;
		ZOrderSet = 32
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Shape1' AS shape WITH ;
		BackStyle = 0, ;
		Curvature = 10, ;
		Height = 325, ;
		Left = 9, ;
		Name = "Shape1", ;
		Top = 40, ;
		Width = 338, ;
		ZOrderSet = 1
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape2' AS shape WITH ;
		Anchor = 9, ;
		BackStyle = 0, ;
		Curvature = 10, ;
		Height = 325, ;
		Left = 356, ;
		Name = "Shape2", ;
		Top = 40, ;
		Width = 338, ;
		ZOrderSet = 2
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape3' AS shape WITH ;
		Anchor = 4, ;
		BackStyle = 0, ;
		Curvature = 10, ;
		Height = 158, ;
		Left = 9, ;
		Name = "Shape3", ;
		Top = 376, ;
		Width = 338, ;
		ZOrderSet = 0
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape4' AS shape WITH ;
		Anchor = 12, ;
		BackStyle = 0, ;
		Curvature = 10, ;
		Height = 158, ;
		Left = 356, ;
		Name = "Shape4", ;
		Top = 376, ;
		Width = 338, ;
		ZOrderSet = 0
		*< END OBJECT: BaseClass="shape" />
	
	PROCEDURE alegecod
		Local lcCont, lnNormaMaxLuni, lnNormaMinLuni, lofrmnorme
		Private pccod_mf, pccod, pnnorma_min, pnnorma_max
		
		Store 0 To pnnorma_min, pnnorma_max
		Store '' To pccod_mf
		Store '' To ofrmnorme
		= ccnorme()
		lofrmnorme= Createobject('frm_norme')
		lofrmnorme.Show(1)
		Release lofrmnorme
		If !Empty(m.pccod_mf)
			Thisform.clb_cod.text_simplu1.Value = Alltrim(m.pccod_mf)
			Thisform.ndns_min = m.pnnorma_min
			Thisform.ndns_max = m.pnnorma_max
			lnNormaMinLuni = m.pnnorma_min * 12
			lnNormaMaxLuni = m.pnnorma_max * 12
			Thisform.clb_dns.lb_simplu1.Caption = Alltrim(Str(m.pnnorma_min)) + "-" + Alltrim(Str(m.pnnorma_max)) + " ani ( " + ;
				Alltrim(Str(m.lnNormaMinLuni)) + "-" + Alltrim(Str(m.lnNormaMaxLuni)) + " luni )"
			Thisform.clb_dns.text_simplu1.Value = m.lnNormaMinLuni
		
			lcCont = ''
			Do Case
				Case Left(Alltrim(m.pccod_mf), 2) = [1.]
					lcCont = '212 '
				Case Left(Alltrim(m.pccod_mf), 2) = [2.]
					If Left(Alltrim(m.pccod_mf), 3) # [2.5]
						lcCont = '213' + Substr(Alltrim(m.pccod_mf), 3, 1)
					Else
						lcCont = '213'
					Endif
				Case Left(Alltrim(m.pccod_mf), 2) = [3.]
					lcCont = '214'
			Endcase
		
			Thisform.clb_cont.text_simplu1.Value = m.lcCont
			Thisform.clb_dns.text_simplu1.SetFocus()
		Endif
		
	ENDPROC

	PROCEDURE inainte_de_do_termin
		*!* 14.11.2017
		*!* se cere completarea nr inventar, altfel da eroare. in baza de date nu poate fi NULL
		
		Private plReturn
		&& verificari procent si coeficient
		
		If aMESSAGEBOX("Doriti sa salvati modificarile?",4+32,"Confirmare")!=6
			Return .F.
		Endif
		
		Do Case
			Case Empty(poMf.data_pif)
				aMESSAGEBOX("Nu ati completat data p.i.f.!",0+48,"Atentie")
				Thisform.clb_datapif.text_simplu1.SetFocus()
				plReturn=.F.
			Case poMf.data_pif<poMf.data_achizitie
				plReturn = (AMESSAGEBOX("Data P.I.F. este mai mica decat data documentului de intrare! Continuati?", 4+32,_screen.Caption) = 6)
				IF !m.plReturn
					Thisform.clb_datapif.text_simplu1.SetFocus()
				ENDIF 	
				*plReturn=.F.
			Case Empty(poMf.denumire)
				aMESSAGEBOX("Nu ati completat denumirea!",0+48,"Atentie")
				Thisform.ed_denumire._edbase1.SetFocus()
				plReturn=.F.
		
			Case Empty(poMf.cod_mf) And Thisform.ntip=1
				aMESSAGEBOX("Nu ati ales codul!",0+48,"Atentie")
				Thisform.clb_cod.text_simplu1.SetFocus()
				plReturn=.F.
		
			Case Empty(NVL(poMf.nr_inventar,0))
				aMESSAGEBOX("Nu ati completat numarul de inventar!",0+48,"Atentie")
				Thisform.clb_nr_inventar.text_simplu1.SetFocus()
				plReturn=.F.		
		
				
				*!* 19.06.2006
				*!* marius.mutu
				*!* mf cu valoare intrare 0 - nu vreau sa se ceara valoarea intrarii, DNS etc
				*!*		CASE EMPTY(poMf.dns_luni)
				*!*			MESSAGEBOX("Nu ati completat durata normala de serviciu!",0+48,"Atentie")
				*!*			THISFORM.clb_dns.text_simplu1.SETFOCUS()
				*!*			plReturn=.F.
				*!*		CASE !BETWEEN(poMf.dns_luni,THISFORM.ndns_min*12,THISFORM.ndns_max*12) AND THISFORM.ndns_min<>0 AND THISFORM.ndns_max<>0 AND thisform.ntip=1
				*!*			lcMesaj="Durata normala de serviciu trebuie sa fie intre "+CHR(10)+CHR(13)+;
				*!*				THISFORM.clb_dns.lb_luni.CAPTION+" !"
				*!*			MESSAGEBOX(format_msg(lcMesaj,40),0+48,"Atentie")
				*!*			THISFORM.clb_dns.text_simplu1.SETFOCUS()
				*!*			plReturn=.F.
				*!*		CASE poMf.uzura_prec>poMf.dns_luni
				*!*			MESSAGEBOX("Uzura trebuie sa fie mai mica decat durata normala de serviciu!",0+48,"Atentie")
				*!*			THISFORM.clb_uzura.text_simplu1.SETFOCUS()
				*!*			plReturn=.F.
				*!*		CASE EMPTY(poMf.tip_amortizare)
				*!*			MESSAGEBOX("Nu ati ales tipul amortizarii!",0+48,"Atentie")
				*!*			THISFORM.cb_tip_amortizare._cbbase1.SETFOCUS()
				*!*			plReturn=.F.
				*!*		CASE poMf.tip_amortizare='ACCELERATA' AND !BETWEEN(poMf.procent,0,50)
				*!*			MESSAGEBOX("Procentul trebuie sa fie in intervalul 0 - 50% !",0+48,"Atentie")
				*!*			THISFORM.clb_procent.text_simplu1.SETFOCUS()
				*!*			plReturn=.F.
		
			Case Empty(poMf.Cont)
				aMESSAGEBOX("Nu ati introdus contul!",0+48,"Atentie")
				Thisform.clb_cont.text_simplu1.SetFocus()
				plReturn=.F.
			Otherwise
				plReturn = .T.
		Endcase
		Return plReturn
		
	ENDPROC

	PROCEDURE Init
		DoDefault()
		THIS.clb_Sucursala.Visible = glEMama
		
		* (Dez)activez amortizarea maxim deductibila daca este NULL
		Local llAmortMaxDeductibilIsNull
		* Bifez chk_amort_max_deductibil daca valoarea <> NULL
		llAmortMaxDeductibilIsNull = ISNULL(poMF.amort_max_deductibil)
		
		this.chk_amort_max_deductibil.Value = !m.llAmortMaxDeductibilIsNull
		this.clb_amort_max_deductibil.text_simplu1.ReadOnly = m.llAmortMaxDeductibilIsNull 
	ENDPROC

	PROCEDURE Cb_tip_amortizare._cbbase1.InteractiveChange
		If This.Value='ACCELERATA'
			Thisform.clb_procent.text_simplu1.Enabled=.T.
		Else
			Thisform.clb_procent.text_simplu1.Enabled=.F.
		Endif
		If This.Value='DEGRESIVA'
			Thisform.cb_coeficient._CBBASE1.Enabled=.T.
			lnDns=Thisform.clb_dns.text_simplu1.Value
			Do Case
			Case Between(lnDns,24,60)
				Thisform.cb_coeficient._CBBASE1.Value=1
			Case Between(lnDns,61,120)
				Thisform.cb_coeficient._CBBASE1.Value=2
			Case lnDns>120
				Thisform.cb_coeficient._CBBASE1.Value=3
			Endcase
			Thisform.cb_coeficient._CBBASE1.Refresh
		Else
			Thisform.cb_coeficient._CBBASE1.Enabled=.F.
		ENDIF
		poMf.id_tip_amortizare = v_tipuri_amort.id_tip_amortizare
	ENDPROC

	PROCEDURE Cb_tx_simplu1._cbbase1.InteractiveChange
		poMf.id_tip_imobilizare = v_tipuri_imob.id_tip_imobilizare
	ENDPROC

	PROCEDURE chk_amort_max_deductibil.Valid
		* (Dez)activez amortizarea maxim deductibila in functie de checkbox
		* poMF.amort_max_deductibil = NULL, inseamna ca toata amortizarea este deductibila
		* poMF.amort_max_deductibil >= 0, inseamna ca amortizarea deductibila = poMF.amort_max_deductibil, inclusiv 0, adica toata nedeductibila
		SET STEP ON 
		Thisform.clb_amort_max_deductibil.text_simplu1.ReadOnly = !This.Value 
		IF !This.value
			poMF.amort_max_deductibil = NULL
		ELSE
			poMF.amort_max_deductibil = 0
		ENDIF 	
		Thisform.clb_amort_max_deductibil.text_simplu1.Refresh()
	ENDPROC

	PROCEDURE Clb_cod.Text_simplu1.DblClick
		Thisform.AlegeCod()
	ENDPROC

	PROCEDURE Clb_cod.Text_simplu1.GotFocus
		If Empty(This.Value)
			Thisform.AlegeCod()
		ENDIF 	
	ENDPROC

	PROCEDURE Clb_dataact.Text_simplu1.Valid
		Thisform.clb_datapif.text_simplu1.Value=this.Value 
	ENDPROC

	PROCEDURE Clb_gestiune.Text_simplu1.DblClick
		STORE "" TO locauta
		pcselect = ['select nume_gestiune, cgest,id_gestiune FROM vnom_gestiuni where inactiv=0']
		pcfiltru = [1=2]
		pcschema = ['']
		pcorder = [nume_gestiune, cgest]
		pccoloane = [nume_gestiune,cgest,id_gestiune]
		pcTitlu = [Alegeti gestiunea]
		pcTitluColoane = [Gestiune,Cod,ID]
		locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,"")
		IF m.gnButon = 1
			IF !EMPTY(locauta.nume_gestiune)
				poMf.id_gestiune=locauta.id_gestiune
				poMf.gestiune = ALLTRIM(locauta.nume_gestiune)
			ELSE
				poMf.id_gestiune=NULL
				poMf.gestiune = ''
			ENDIF
		ENDIF
		
	ENDPROC

	PROCEDURE Clb_gestiune.Text_simplu1.GotFocus
		If Empty(This.Value)
			this.DblClick 
		Endif
	ENDPROC

	PROCEDURE Clb_lperioada_rata.tx_n1.Valid
		IF !empty(this.value)
			lcLuna=SUBSTR(ALLTRIM(this.Value),1,2)
			lcAn=SUBSTR(ALLTRIM(this.Value),3)
			IF TYPE("DATE(VAL(lcAn),VAL(lcLuna),1)")!="D"
				aMESSAGEBOX("Data invalida!",0+16,"Eroare")
				RETURN 0
			ENDIF
		*!*		this.Parent.tx_n2.Value=this.value
		*!*		this.Parent.tx_n2.Refresh
		ENDIF
	ENDPROC

	PROCEDURE Clb_lucrare.Text_simplu1.DblClick
		Store "" To locauta
		pcselect = ['select nrord,id_lucrare FROM ] + gcs + [.vnom_lucrari where inactiv=0']
		pcfiltru = [1=2]
		pcschema = ['']
		pcorder = [nrord]
		pccoloane = [nrord]
		pcTitlu = [Alegeti lucrarea]
		pcTitluColoane = [Lucrare]
		locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,"")
		IF m.gnButon = 1
			If !Empty(locauta.nrord)
				poMf.id_lucrare=locauta.id_lucrare
				poMf.nrord=Alltrim(locauta.nrord)
			ELSE
				poMf.id_lucrare=null
				poMf.nrord=''	
			ENDIF
		ENDIF 	
			
	ENDPROC

	PROCEDURE Clb_lucrare.Text_simplu1.GotFocus
		If Empty(This.Value)
			this.DblClick 
		Endif
	ENDPROC

	PROCEDURE Clb_luna_intre1.tx_n1.Valid
		IF !empty(this.value)
			lcLuna=SUBSTR(ALLTRIM(this.Value),1,2)
			lcAn=SUBSTR(ALLTRIM(this.Value),3)
			IF TYPE("DATE(VAL(lcAn),VAL(lcLuna),1)")!="D"
				aMESSAGEBOX("Data invalida!",0+16,"Eroare")
				RETURN 0
			ENDIF
		*!*		this.Parent.tx_n2.Value=this.value
		*!*		this.Parent.tx_n2.Refresh
		ENDIF
	ENDPROC

	PROCEDURE Clb_responsabil.Text_simplu1.DblClick
		Store "" To locauta
		pcselect = ['select nume,id_responsabil FROM vnom_responsabili where inactiv=0']
		pcfiltru = [1=2]
		pcschema = ['']
		pcorder = [nume]
		pccoloane = [nume]
		pcTitlu = [Alegeti responsabilul]
		pcTitluColoane = [Responsabil]
		locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,"")
		IF m.gnButon = 1
			If !Empty(locauta.nume)
				poMf.id_responsabil=locauta.id_responsabil
				poMf.responsabil=Alltrim(locauta.nume)
			ELSE 	
				poMf.id_responsabil=NULL
				poMf.responsabil=''
			ENDIF
		ENDIF 	
	ENDPROC

	PROCEDURE Clb_responsabil.Text_simplu1.GotFocus
		If Empty(This.Value)
			this.DblClick 
		Endif
	ENDPROC

	PROCEDURE Clb_sectie.Text_simplu1.DblClick
		Store "" To locauta
		pcselect = ['select sectie,id_sectie FROM vnom_sectii where inactiv=0']
		pcfiltru = [1=2]
		pcschema = ['']
		pcorder = [sectie]
		pccoloane = [sectie]
		pcTitlu = [Alegeti sectia]
		pcTitluColoane = [Sectie]
		locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,"")
		IF m.gnButon = 1
			If !Empty(locauta.sectie)
				poMf.id_sectie=locauta.id_sectie
				poMf.sectie=Alltrim(locauta.sectie)
			ELSE
				poMf.id_sectie=null
				poMf.sectie=''
			ENDIF
		ENDIF 
	ENDPROC

	PROCEDURE Clb_sectie.Text_simplu1.GotFocus
		If Empty(This.Value)
			this.DblClick 
		Endif
	ENDPROC

	PROCEDURE Clb_sucursala.Text_simplu1.DblClick
		llBlank = .T.
		llNou = .F.
		llToateIreg = .F.
		loSucursala = caut_sucursala(llToateIreg, llNou, llBlank)
		poMf.id_sucursala = loSucursala.id_sucursala
		poMf.sucursala = Alltrim(loSucursala.sucursala)
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_op_conservare AS _frmbase OF "..\comun\clase\_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="Ed_cauza" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_data_conservare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_amf" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_datadoc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nrdoc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_buncapital" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_BazaTVA" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_cotaTva" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_cotaTva.Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_TVA" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_prorataTva" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: lbuncapital
		*p: ntip
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 361
		lbuncapital = .F.
		Name = "frm_op_conservare"
		ntip = 0
		Width = 375
		_shape1.Name = "_shape1"
		_shape2.Height = 29
		_shape2.Left = 303
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 74
		Lb_titlu_alb_b121.Caption = "CONSERVARE"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 13
		BUT_TERMIN1.Left = 343
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 11
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

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

	ADD OBJECT 'Cb_cotaTva' AS cb_tx_simplu WITH ;
		Enabled = .F., ;
		Left = 42, ;
		Name = "Cb_cotaTva", ;
		TabIndex = 8, ;
		Top = 271, ;
		_cbbase1.ColumnCount = 3, ;
		_cbbase1.ColumnLines = .F., ;
		_cbbase1.ColumnWidths = "30,175,0", ;
		_cbbase1.Height = 23, ;
		_cbbase1.Left = 101, ;
		_cbbase1.Name = "_cbbase1", ;
		_cbbase1.RowSource = "cote_TVA.procent,descriere,id_proc_tva", ;
		_cbbase1.RowSourceType = 2, ;
		_cbbase1.TabIndex = 1, ;
		_cbbase1.Top = 3, ;
		_cbbase1.Width = 162, ;
		_lbbase1.Caption = "Cota TVA", ;
		_lbbase1.Name = "_lbbase1", ;
		_lbbase1.TabIndex = 2
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cb_cotaTva.Label1' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "%", ;
		Height = 17, ;
		Left = 268, ;
		Name = "Label1", ;
		Top = 7, ;
		Width = 13
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'ck_amf' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Se modifica amortizarea fiscala", ;
		Height = 17, ;
		Left = 16, ;
		Name = "ck_amf", ;
		TabIndex = 5, ;
		TabStop = .F., ;
		Top = 189, ;
		Value = 1, ;
		Width = 190
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'ck_buncapital' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Bun de capital", ;
		Left = 16, ;
		Name = "ck_buncapital", ;
		TabIndex = 6, ;
		TabStop = .F., ;
		Top = 216, ;
		Visible = .F.
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Clb_BazaTVA' AS clb_tx_simplu WITH ;
		Enabled = .F., ;
		Left = 42, ;
		Name = "Clb_BazaTVA", ;
		TabIndex = 7, ;
		Top = 243, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Baza TVA", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_data_conservare' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "Clb_data_conservare", ;
		TabIndex = 4, ;
		Top = 151, ;
		Width = 348, ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 151, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 193, ;
		Lb_simplu1.Caption = "Data intrarii in conservare", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_datadoc' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "Clb_datadoc", ;
		TabIndex = 1, ;
		Top = 38, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Data document", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nrdoc' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "Clb_nrdoc", ;
		TabIndex = 2, ;
		Top = 66, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Numar document", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_prorataTva' AS clb_tx_simplu WITH ;
		Enabled = .F., ;
		Left = 42, ;
		Name = "Clb_prorataTva", ;
		TabIndex = 10, ;
		Top = 327, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.InputMask = (get_mask(14,0)), ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Prorata TVA", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_TVA' AS clb_tx_simplu WITH ;
		Enabled = .F., ;
		Left = 42, ;
		Name = "Clb_TVA", ;
		TabIndex = 9, ;
		Top = 299, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "TVA", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Ed_cauza' AS ed_tx_simplu WITH ;
		Height = 58, ;
		Left = 13, ;
		Name = "Ed_cauza", ;
		TabIndex = 3, ;
		Top = 94, ;
		Width = 348, ;
		_edbase1.Format = "!K", ;
		_edbase1.Height = 53, ;
		_edbase1.Left = 68, ;
		_edbase1.Name = "_edbase1", ;
		_edbase1.Top = 2, ;
		_edbase1.Width = 278, ;
		_lbbase1.Caption = "Cauza", ;
		_lbbase1.Name = "_lbbase1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />
	
	PROCEDURE inainte_de_do_termin
		PRIVATE plReturn
		STORE .T. TO plReturn
		pddataconservare=THISFORM.clb_data_conservare.text_simplu1.VALUE
		pccauza=THISFORM.ed_cauza._EDBASE1.VALUE
		pnFiscala = THIS.ck_amf.VALUE
		pdDataDoc = thisform.clb_datadoc.text_simplu1.Value 
		pnNrDoc = thisform.clb_nrdoc.text_simplu1.Value 
		
		pnBunCapital = thisform.ck_buncapital.Value 
		pnBazaTva = thisform.clb_BazaTVA.text_simplu1.Value
		pnId_cota_tva = cote_tva.id_proc_tva
		pnTva = thisform.clb_TVA.text_simplu1.Value 
		
		DO CASE
			CASE pddataconservare<=poDetaliiMf.data_operatie
				aMESSAGEBOX(THISFORM.clb_data_conservare.lb_simplu1.CAPTION+" trebuie sa fie mai mare decat "+;
					DTOC(poDetaliiMf.data_operatie)+"!",48,"Atentie")
				THISFORM.clb_data_conservare.text_simplu1.SETFOCUS()
				plReturn=.F.
			CASE !BETWEEN(pddataconservare,get_prima_zi(),get_ultima_zi())
				aMESSAGEBOX(THISFORM.clb_data_conservare.lb_simplu1.CAPTION+" trebuie sa fie din luna "+;
					ALLTRIM(STR(gnLuna))+"/"+ALLTRIM(STR(gnAn))+" !",48,"Atentie")
				THISFORM.clb_data_conservare.text_simplu1.SETFOCUS()
				plReturn=.F.
			Case !Between(pdDataDoc ,get_prima_zi(),get_ultima_zi())
				aMessagebox("Data documentului trebuie sa fie din luna "+;
					ALLTRIM(Str(gnLuna))+"/"+Alltrim(Str(gnAn))+" !",48,"Atentie")
				Thisform.clb_datadoc.text_simplu1.SetFocus()
				plReturn=.F.			
		ENDCASE
		RETURN plReturn
		
	ENDPROC

	PROCEDURE Init
		Parameters tlConservat,tnTip,tlBunCapital 
		thisform.ntip = tnTip 
		thisform.lbuncapital =tlBunCapital 
		If thisform.ntip=1 and thisform.lbuncapital 
			thisform.ck_buncapital.Visible=.t.
		EndIf 
		
		DoDefault()
		pddataazi=get_ultima_zi()
		pdDatadoc = pddataazi
		
		If tlConservat
			Thisform.lb_titlu_alb_b121.Caption="IESIRE DIN CONSERVARE"
			Thisform.clb_data_conservare.lb_simplu1.Caption="Data repunerii in functiune"
		Endif
		Thisform.clb_data_conservare.text_simplu1.Value=pddataazi
		thisform.clb_datadoc.text_simplu1.Value = pdDatadoc
		thisform.clb_nrdoc.text_simplu1.Value = pnNrDoc
		thisform.Height = 240
	ENDPROC

	PROCEDURE Cb_cotaTva._cbbase1.LostFocus
		thisform.clb_TVA.text_simplu1.Value = Round((cote_tva.proc_tva-1)*thisform.clb_bazaTVA.text_simplu1.Value,gnPa)
		thisform.clb_TVA.text_simplu1.Refresh 
	ENDPROC

	PROCEDURE ck_buncapital.Click
		If this.Value = 1 
			thisform.Height=361
			thisform.clb_bazaTVA.Enabled= .t.
			thisform.cb_cotaTva.Enabled=.t.
			thisform.clb_tva.Enabled= .t.
			thisform.clb_prorataTva.Enabled= .t.		
		Else 
			thisform.Height = 240
			thisform.clb_bazaTVA.Enabled= .f.
			thisform.cb_cotaTva.Enabled=.f.
			thisform.clb_tva.Enabled= .f.
			thisform.clb_prorataTva.Enabled= .f.		
		EndIf 
	ENDPROC

	PROCEDURE Clb_datadoc.Text_simplu1.Valid
		Thisform.clb_data_conservare.text_simplu1.Value=this.Value 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_op_gest AS _frmbase OF "..\comun\clase\_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="Ed_cauza" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_data_gest" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_amf" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_datadoc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nrdoc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_buncapital" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_BazaTVA" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_cotaTva" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_cotaTva.Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_TVA" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_prorataTva" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cb_tip_iesire" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: lbuncapital
		*p: ntip
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 375
		lbuncapital = .F.
		Name = "frm_op_gest"
		ntip = 0
		Width = 375
		_shape1.Name = "_shape1"
		_shape2.Height = 29
		_shape2.Left = 303
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 74
		Lb_titlu_alb_b121.Caption = "IESIRE DIN GESTIUNE"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 14
		BUT_TERMIN1.Left = 343
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 12
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

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

	ADD OBJECT 'Cb_cotaTva' AS cb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Cb_cotaTva", ;
		TabIndex = 9, ;
		Top = 287, ;
		_cbbase1.ColumnCount = 3, ;
		_cbbase1.ColumnLines = .F., ;
		_cbbase1.ColumnWidths = "30,175,0", ;
		_cbbase1.Height = 23, ;
		_cbbase1.Left = 101, ;
		_cbbase1.Name = "_cbbase1", ;
		_cbbase1.RowSource = "cote_TVA.procent,descriere,id_proc_tva", ;
		_cbbase1.RowSourceType = 2, ;
		_cbbase1.TabIndex = 1, ;
		_cbbase1.Top = 3, ;
		_cbbase1.Width = 162, ;
		_lbbase1.Caption = "Cota TVA", ;
		_lbbase1.Name = "_lbbase1", ;
		_lbbase1.TabIndex = 2
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cb_cotaTva.Label1' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "%", ;
		Height = 17, ;
		Left = 268, ;
		Name = "Label1", ;
		Top = 7, ;
		Width = 13
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'cb_tip_iesire' AS cb_tx_simplu WITH ;
		Height = 29, ;
		Left = 12, ;
		Name = "cb_tip_iesire", ;
		TabIndex = 3, ;
		Top = 93, ;
		Width = 348, ;
		_cbbase1.Height = 23, ;
		_cbbase1.Left = 70, ;
		_cbbase1.Name = "_cbbase1", ;
		_cbbase1.RowSource = "crsTipuriIesire.tip,id", ;
		_cbbase1.RowSourceType = 2, ;
		_cbbase1.TabIndex = 1, ;
		_cbbase1.Top = 3, ;
		_cbbase1.Width = 275, ;
		_lbbase1.Caption = "Tip", ;
		_lbbase1.Name = "_lbbase1", ;
		_lbbase1.TabIndex = 2
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'ck_amf' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Se modifica amortizarea fiscala", ;
		Height = 17, ;
		Left = 11, ;
		Name = "ck_amf", ;
		TabIndex = 6, ;
		TabStop = .F., ;
		Top = 218, ;
		Value = 1, ;
		Width = 190
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'ck_buncapital' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Bun de capital", ;
		Left = 11, ;
		Name = "ck_buncapital", ;
		TabIndex = 7, ;
		TabStop = .F., ;
		Top = 237, ;
		Visible = .F.
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Clb_BazaTVA' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_BazaTVA", ;
		TabIndex = 8, ;
		Top = 259, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Baza TVA", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_data_gest' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 12, ;
		Name = "Clb_data_gest", ;
		TabIndex = 5, ;
		Top = 178, ;
		Width = 348, ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 151, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 194, ;
		Lb_simplu1.Caption = "Data iesirii din gestiune", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_datadoc' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 12, ;
		Name = "Clb_datadoc", ;
		TabIndex = 1, ;
		Top = 37, ;
		Width = 348, ;
		TEXT_SIMPLU1.Alignment = 3, ;
		TEXT_SIMPLU1.Format = "!KZ", ;
		TEXT_SIMPLU1.InputMask = (get_mask(14,gnPa)), ;
		TEXT_SIMPLU1.Left = 161, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Value = 0, ;
		LB_SIMPLU1.Caption = "Data document", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nrdoc' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 12, ;
		Name = "Clb_nrdoc", ;
		TabIndex = 2, ;
		Top = 65, ;
		Width = 348, ;
		TEXT_SIMPLU1.Alignment = 3, ;
		TEXT_SIMPLU1.Format = "!KZ", ;
		TEXT_SIMPLU1.Left = 161, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Value = 0, ;
		LB_SIMPLU1.Caption = "Numar document", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_prorataTva' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_prorataTva", ;
		TabIndex = 11, ;
		Top = 343, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.InputMask = (get_mask(14,0)), ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Prorata TVA", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_TVA' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_TVA", ;
		TabIndex = 10, ;
		Top = 315, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "TVA", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Ed_cauza' AS ed_tx_simplu WITH ;
		Left = 12, ;
		Name = "Ed_cauza", ;
		TabIndex = 4, ;
		Top = 121, ;
		Width = 348, ;
		_edbase1.Format = "!K", ;
		_edbase1.Height = 53, ;
		_edbase1.Left = 68, ;
		_edbase1.Name = "_edbase1", ;
		_edbase1.Top = 2, ;
		_edbase1.Width = 276, ;
		_lbbase1.Caption = "Explicatie", ;
		_lbbase1.Name = "_lbbase1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />
	
	PROCEDURE inainte_de_do_termin
		PRIVATE plReturn
		STORE .T. TO plReturn
		pddataschimbare=THISFORM.clb_data_gest.text_simplu1.VALUE
		pccauza=ALLTRIM(THISFORM.ed_cauza._EDBASE1.VALUE)
		pnFiscala = THIS.ck_amf.VALUE
		pdDataDoc = thisform.clb_datadoc.text_simplu1.Value 
		pnNrDoc = thisform.clb_nrdoc.text_simplu1.Value 
		
		pnBunCapital = thisform.ck_buncapital.Value 
		pnBazaTva = thisform.clb_BazaTVA.text_simplu1.Value
		pnId_cota_tva = cote_tva.id_proc_tva
		pnTva = thisform.clb_TVA.text_simplu1.Value 
		pnProrataTva = thisform.clb_prorataTva.text_simplu1.Value 
		
		pnIdTipIesire = crsTipuriIesire.id
		
		DO CASE
			CASE pddataschimbare<poDetaliiMf.data_operatie
				aMESSAGEBOX(THISFORM.clb_data_gest.lb_simplu1.CAPTION+" trebuie sa fie mai mare sau egala decat "+;
					DTOC(poDetaliiMf.data_operatie)+"!",48,"Atentie")
				THISFORM.clb_data_gest.text_simplu1.SETFOCUS()
				plReturn=.F.
			CASE !BETWEEN(pddataschimbare,get_prima_zi(),get_ultima_zi())
				aMESSAGEBOX(THISFORM.clb_data_gest.lb_simplu1.CAPTION+" trebuie sa fie din luna "+;
					ALLTRIM(STR(gnLuna))+"/"+ALLTRIM(STR(gnAn))+" !",48,"Atentie")
				THISFORM.clb_data_gest.text_simplu1.SETFOCUS()
				plReturn=.F.
			Case !Between(pdDataDoc ,get_prima_zi(),get_ultima_zi())
				aMessagebox("Data documentului trebuie sa fie din luna "+;
					ALLTRIM(Str(gnLuna))+"/"+Alltrim(Str(gnAn))+" !",48,"Atentie")
				Thisform.clb_datadoc.text_simplu1.SetFocus()
				plReturn=.F.			
		ENDCASE
		RETURN plReturn
		
	ENDPROC

	PROCEDURE Init
		Parameters tlConservat,tnTip,tlBunCapital 
		thisform.ntip = tnTip 
		thisform.lbuncapital=tlBunCapital 
		If thisform.ntip=1 and thisform.lbuncapital
			thisform.ck_buncapital.Visible=.t.
		EndIf 
		DoDefault()
		pddataazi=get_ultima_zi()
		pdDatadoc = pddataazi
		If tlConservat
			Thisform.lb_titlu_alb_b121.Caption="INTRARE IN GESTIUNE"
			Thisform.clb_data_gest.lb_simplu1.Caption="Data intrarii in gestiune"
			thisform.cb_tip_iesire.Visible = .F. && nu am tip iesire din gestiune	
		ENDIF
		
		Thisform.clb_data_gest.texT_SIMPLU1.Value=pddataazi
		thisform.clb_datadoc.text_simplu1.Value = pdDatadoc
		thisform.clb_nrdoc.text_simplu1.Value = pnNrDoc
		
		this.cb_tip_iesire._cbbase1.Value = crsTipuriIesire.tip
		thisform.Height=221
		
	ENDPROC

	PROCEDURE Cb_cotaTva._cbbase1.LostFocus
		thisform.clb_TVA.text_simplu1.Value = Round((cote_tva.proc_tva-1)*thisform.clb_bazaTVA.text_simplu1.Value,gnPa)
		thisform.clb_TVA.text_simplu1.Refresh 
	ENDPROC

	PROCEDURE ck_buncapital.Click
		If this.Value = 1 
			thisform.Height=347
			thisform.clb_bazaTVA.Enabled= .t.
			thisform.cb_cotaTva.Enabled=.t.
			thisform.clb_tva.Enabled= .t.
			thisform.clb_prorataTva.Enabled= .t.		
		Else 
			thisform.Height = 221
			thisform.clb_bazaTVA.Enabled= .f.
			thisform.cb_cotaTva.Enabled=.f.
			thisform.clb_tva.Enabled= .f.
			thisform.clb_prorataTva.Enabled= .f.		
		EndIf 
	ENDPROC

	PROCEDURE Clb_datadoc.TEXT_SIMPLU1.Valid
		Thisform.clb_data_gest.text_simplu1.Value=this.Value 
	ENDPROC

ENDDEFINE

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

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_valveche" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_majorar" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_valnoua" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_datareeval" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_expl_op" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_amf" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_datadoc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nrdoc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_buncapital" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_BazaTVA" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_cotaTva" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_cotaTva.Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_TVA" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_prorataTva" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: calculeaza
		*p: lbuncapital
		*p: ntip
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 421
		lbuncapital = .F.
		Name = "frm_op_majorare"
		ntip = 0
		Width = 375
		_memberdata = <VFPData>
			<memberdata name="calculeaza" display="Calculeaza"/>
		</VFPData>
		_shape1.Name = "_shape1"
		_shape2.Height = 29
		_shape2.Left = 301
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 74
		Lb_titlu_alb_b121.Caption = "MAJORAREA VALORII DE INTRARE"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 16
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 14
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

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

	ADD OBJECT 'Cb_cotaTva' AS cb_tx_simplu WITH ;
		Enabled = .F., ;
		Left = 42, ;
		Name = "Cb_cotaTva", ;
		TabIndex = 11, ;
		Top = 327, ;
		_CBBASE1.ColumnCount = 3, ;
		_CBBASE1.ColumnLines = .F., ;
		_CBBASE1.ColumnWidths = "30,175,0", ;
		_CBBASE1.Height = 23, ;
		_CBBASE1.Left = 101, ;
		_CBBASE1.Name = "_CBBASE1", ;
		_CBBASE1.RowSource = "cote_TVA.procent,descriere,id_proc_tva", ;
		_CBBASE1.RowSourceType = 2, ;
		_CBBASE1.TabIndex = 1, ;
		_CBBASE1.Top = 3, ;
		_CBBASE1.Width = 162, ;
		_LBBASE1.Caption = "Cota TVA", ;
		_LBBASE1.Name = "_LBBASE1", ;
		_LBBASE1.TabIndex = 2
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cb_cotaTva.Label1' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "%", ;
		Height = 17, ;
		Left = 268, ;
		Name = "Label1", ;
		Top = 7, ;
		Width = 13
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'ck_amf' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Se modifica amortizarea fiscala", ;
		ControlSource = "m.pnFiscala", ;
		Height = 17, ;
		Left = 24, ;
		Name = "ck_amf", ;
		TabIndex = 8, ;
		TabStop = .F., ;
		Top = 257, ;
		Value = 1, ;
		Width = 190
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'ck_buncapital' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Bun de capital", ;
		ControlSource = "m.pnBunCapital", ;
		Height = 17, ;
		Left = 24, ;
		Name = "ck_buncapital", ;
		TabIndex = 9, ;
		TabStop = .F., ;
		Top = 276, ;
		Visible = .F., ;
		Width = 96
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'Clb_BazaTVA' AS clb_tx_simplu WITH ;
		Enabled = .F., ;
		Left = 42, ;
		Name = "Clb_BazaTVA", ;
		TabIndex = 10, ;
		Top = 299, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "m.pnBazaTva", ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Baza TVA", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_datadoc' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "Clb_datadoc", ;
		TabIndex = 1, ;
		Top = 49, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "m.pdDataDoc", ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Data document", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_datareeval' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "Clb_datareeval", ;
		TabIndex = 6, ;
		Top = 189, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "m.pdDataReeval", ;
		Text_simplu1.Left = 160, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = {}, ;
		Lb_simplu1.Caption = "Data majorarii", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_expl_op' AS clb_tx_simplu WITH ;
		Height = 31, ;
		Left = 13, ;
		Name = "Clb_expl_op", ;
		TabIndex = 7, ;
		Top = 217, ;
		Width = 348, ;
		Text_simplu1.ControlSource = "m.pcExplicatie", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 120, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 4, ;
		Text_simplu1.Width = 224, ;
		Lb_simplu1.AutoSize = .T., ;
		Lb_simplu1.Caption = "Explicatie miscare", ;
		Lb_simplu1.Left = 8, ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		Lb_simplu1.Top = 7
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_majorar' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "Clb_majorar", ;
		TabIndex = 4, ;
		Top = 133, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "m.pnvaloaremaj", ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Majorare", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nrdoc' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "Clb_nrdoc", ;
		TabIndex = 2, ;
		Top = 77, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "m.pnNrDoc", ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Numar document", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_prorataTva' AS clb_tx_simplu WITH ;
		Enabled = .F., ;
		Left = 42, ;
		Name = "Clb_prorataTva", ;
		TabIndex = 13, ;
		Top = 383, ;
		TEXT_SIMPLU1.Alignment = 3, ;
		TEXT_SIMPLU1.ControlSource = "m.pnProrataTva", ;
		TEXT_SIMPLU1.Format = "KR", ;
		TEXT_SIMPLU1.InputMask = (get_mask(14,0)), ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Value = 0, ;
		LB_SIMPLU1.Caption = "Prorata TVA", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_TVA' AS clb_tx_simplu WITH ;
		Enabled = .F., ;
		Left = 42, ;
		Name = "Clb_TVA", ;
		TabIndex = 12, ;
		Top = 355, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "m.pnTva", ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "TVA", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_valnoua' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "Clb_valnoua", ;
		TabIndex = 5, ;
		TabStop = .F., ;
		Top = 161, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.TabStop = .F., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Valoarea noua de intrare", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_valveche' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "Clb_valveche", ;
		TabIndex = 3, ;
		TabStop = .F., ;
		Top = 105, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poDetaliiMf.valoare", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.TabStop = .F., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Valoare veche de intrare", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />
	
	PROCEDURE calculeaza
		Thisform.clb_valnoua.text_simplu1.Value=poDetaliiMf.valoare + m.pnValoareMaj
		thisform.clb_bazaTVA.text_simplu1.Value = m.pnValoareMaj
	ENDPROC

	PROCEDURE inainte_de_do_termin
		Private plReturn
		Store .T. To plReturn
		*pnvaloaremaj=Thisform.clb_majorar.text_simplu1.Value
		*pdDataReeval=Thisform.clb_datareeval.text_simplu1.Value
		*pcExplicatie = thisform.clb_expl_op.text_simplu1.Value 
		*pnFiscala = this.ck_amf.Value 
		*pdDataDoc = thisform.clb_datadoc.text_simplu1.Value 
		*pnNrDoc = thisform.clb_nrdoc.text_simplu1.Value 
		*pnBunCapital = thisform.ck_buncapital.Value 
		*pnBazaTva = thisform.clb_bazaTVA.text_simplu1.Value 
		*pnIdCotaTva = cote_tva.id_proc_tva
		*pnTva = thisform.clb_tva.text_simplu1.Value 
		*pnProrataTva = thisform.clb_prorataTVA.text_simplu1.Value 
		
		Do Case
		Case pddatareeval<=poDetaliiMf.data_operatie
			aMessagebox("Data majorarii trebuie sa fie mai mare decat "+;
				DTOC(poDetaliiMf.data_operatie)+"!",48,"Atentie")
			Thisform.clb_datareeval.text_simplu1.SetFocus()
			plReturn=.F.
		Case !Between(pddatareeval,get_prima_zi(),get_ultima_zi())
			aMessagebox("Data majorarii trebuie sa fie din luna "+;
				ALLTRIM(Str(gnLuna))+"/"+Alltrim(Str(gnAn))+" !",48,"Atentie")
			Thisform.clb_datareeval.text_simplu1.SetFocus()
			plReturn=.F.
		Case !Between(pdDataDoc ,get_prima_zi(),get_ultima_zi())
			aMessagebox("Data documentului trebuie sa fie din luna "+;
				ALLTRIM(Str(gnLuna))+"/"+Alltrim(Str(gnAn))+" !",48,"Atentie")
			Thisform.clb_datadoc.text_simplu1.SetFocus()
			plReturn=.F.	
		Endcase
		Return plReturn
	ENDPROC

	PROCEDURE Init
		Parameters tnTip,tlBunCapital
		
		* tnTip: tip imobilizare
		* tlBunCapital
		* tnMajorare: valoare majorare (daca se apeleaza din imobilizari in curs > modernizare)
		
		thisform.ntip = tnTip 
		thisform.lbuncapital = tlBunCapital 
		
		If thisform.ntip=1 and thisform.lbuncapital
			thisform.ck_buncapital.Visible=.t.
		EndIf 
		
		DoDefault()
		
		pddataazi=get_ultima_zi()
		pdDatadoc = pddataazi
		Thisform.clb_datareeval.text_simplu1.Value=pddataazi
		Thisform.clb_valnoua.text_simplu1.Value=poDetaliiMf.valoare
		thisform.clb_expl_op.text_simplu1.Value = pcExplicatie
		thisform.clb_datadoc.text_simplu1.Value = pdDatadoc
		thisform.clb_nrdoc.text_simplu1.Value = pnNrDoc
		thisform.ck_buncapital.ControlSource = pnBunCapital
		
		Thisform.Calculeaza() 
		
		thisform.Height=294
	ENDPROC

	PROCEDURE Cb_cotaTva._CBBASE1.LostFocus
		pnIdCotaTva = cote_tva.id_proc_tva
		pnTva = Round((cote_tva.proc_tva-1)*m.pnBazaTva, m.gnPa)
		thisform.clb_TVA.text_simplu1.Refresh 
	ENDPROC

	PROCEDURE ck_buncapital.Click
		If this.Value = 1 
			thisform.Height=421
			thisform.clb_bazaTVA.Enabled= .T.
			thisform.cb_cotaTva.Enabled=.t.
			thisform.clb_tva.Enabled= .T.
			thisform.clb_prorataTva.Enabled= .T.
		Else 
			thisform.Height = 294
			thisform.clb_bazaTVA.Enabled= .f.
			thisform.cb_cotaTva.Enabled=.f.
			thisform.clb_tva.Enabled= .f.
			thisform.clb_prorataTva.Enabled= .f.	
		EndIf 
	ENDPROC

	PROCEDURE Clb_datadoc.Text_simplu1.Valid
		Thisform.clb_datareeval.text_simplu1.Value=this.Value 
	ENDPROC

	PROCEDURE Clb_majorar.Text_simplu1.InteractiveChange
		Thisform.Calculeaza() 
	ENDPROC

ENDDEFINE

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

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_valveche" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_valnoua" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_amortveche" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_amortnoua" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_datarecalculare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dns_calculvechi" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dns_calcul_nou" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 275
		Name = "frm_op_recalculare"
		Width = 375
		_shape1.Name = "_shape1"
		_shape2.Height = 29
		_shape2.Left = 301
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 74
		Lb_titlu_alb_b121.Caption = "RECALCULAREA RATEI"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 10
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 8
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

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

	ADD OBJECT 'Clb_amortnoua' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "Clb_amortnoua", ;
		TabIndex = 4, ;
		Top = 136, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 160, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Amortizare noua", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_amortveche' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "Clb_amortveche", ;
		TabIndex = 3, ;
		TabStop = .F., ;
		Top = 108, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Amortizare veche", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_datarecalculare' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "Clb_datarecalculare", ;
		TabIndex = 7, ;
		Top = 220, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Left = 160, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = {}, ;
		Lb_simplu1.Caption = "Data recalculare rata", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_dns_calcul_nou' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "Clb_dns_calcul_nou", ;
		TabIndex = 6, ;
		Top = 192, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 160, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "DNS calcul nou", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_dns_calculvechi' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "Clb_dns_calculvechi", ;
		TabIndex = 5, ;
		TabStop = .F., ;
		Top = 164, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "DNS calcul vechi", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_valnoua' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "Clb_valnoua", ;
		TabIndex = 2, ;
		Top = 80, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Valoare de intrare noua", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_valveche' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "Clb_valveche", ;
		TabIndex = 1, ;
		TabStop = .F., ;
		Top = 52, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.TabStop = .F., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Valoare veche de intrare", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />
	
	PROCEDURE inainte_de_do_termin
		Private plReturn
		Store .T. To plReturn
		pnvaloarenoua=Thisform.clb_valnoua.text_simplu1.Value
		pnamortnoua=Thisform.clb_amortnoua.text_simplu1.Value
		pndnscalcul=Thisform.clb_dns_calcul_nou.text_simplu1.Value
		pddatarecalculare=Thisform.clb_datareeval.text_simplu1.Value
		Do Case
		Case pddatarecalculare<=poDetaliiMf.data_operatie
			aMessagebox("Data recalcularii ratei trebuie sa fie mai mare decat "+;
				DTOC(poDetaliiMf.data_operatie)+"!",48,"Atentie")
			Thisform.clb_datarecalculare.text_simplu1.SetFocus()
			plReturn=.F.
		Case !Between(pddatarecalculare,get_prima_zi(),get_ultima_zi())
			aMessagebox("Data recalcularii ratei trebuie sa fie din luna "+;
				ALLTRIM(Str(gnLuna))+"/"+Alltrim(Str(gnAn))+" !",48,"Atentie")
			Thisform.clb_datarecalculare.text_simplu1.SetFocus()
			plReturn=.F.
		Endcase
		Return plReturn
	ENDPROC

	PROCEDURE Init
		DoDefault()
		pddataazi=get_ultima_zi()
		Thisform.clb_datarecalculare.text_simplu1.Value=pddataazi
		Thisform.clb_valveche.text_simplu1.Value=poDetaliiMf.valoare
		Thisform.clb_valnoua.text_simplu1.Value=pnvaloarenoua
		Thisform.clb_amortveche.text_simplu1.Value=poDetaliiMf.valoare-poDetaliiMf.valoare_ramasa+poDetaliiMf.amort_prec+poDetaliiMf.rata
		Thisform.clb_amortnoua.text_simplu1.Value=pnamortnoua
		thisform.clb_dns_calculvechi.text_simplu1.Value=poDetaliiMf.dns_ramas
		thisform.clb_dns_calcul_nou.text_simplu1.Value=pndnscalcul
	ENDPROC

ENDDEFINE

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

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_valveche" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_valnoua" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_amortveche" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_amortnoua" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_datareeval" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_expl_op" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_amf" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_datadoc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nrdoc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_buncapital" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_BazaTVA" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: lbuncapital
		*p: ntip
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 365
		lbuncapital = .F.
		Name = "frm_op_reevaluare"
		ntip = 0
		Width = 375
		_shape1.Name = "_shape1"
		_shape2.Height = 29
		_shape2.Left = 301
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 74
		Lb_titlu_alb_b121.Caption = "REEVALUAREA VALORII DE INTRARE"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 14
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 12
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

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

	ADD OBJECT 'ck_amf' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Se modifica amortizarea fiscala", ;
		Height = 17, ;
		Left = 15, ;
		Name = "ck_amf", ;
		TabIndex = 9, ;
		TabStop = .F., ;
		Top = 283, ;
		Value = 0, ;
		Width = 190
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'ck_buncapital' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Bun de capital", ;
		Height = 17, ;
		Left = 15, ;
		Name = "ck_buncapital", ;
		TabIndex = 10, ;
		TabStop = .F., ;
		Top = 300, ;
		Visible = .F., ;
		Width = 96
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'Clb_amortnoua' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "Clb_amortnoua", ;
		TabIndex = 6, ;
		Top = 191, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 160, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Amortizare noua", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_amortveche' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "Clb_amortveche", ;
		TabIndex = 5, ;
		TabStop = .F., ;
		Top = 163, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Amortizare veche", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_BazaTVA' AS clb_tx_simplu WITH ;
		Enabled = .F., ;
		Height = 40, ;
		Left = 13, ;
		Name = "Clb_BazaTVA", ;
		TabIndex = 11, ;
		Top = 322, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 160, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Val. noua de intrare a bunului de capital", ;
		Lb_simplu1.Height = 32, ;
		Lb_simplu1.Left = 8, ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		Lb_simplu1.Top = 6, ;
		Lb_simplu1.Width = 118, ;
		Lb_simplu1.WordWrap = .T.
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_datadoc' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "Clb_datadoc", ;
		TabIndex = 1, ;
		Top = 51, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Data document", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_datareeval' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "Clb_datareeval", ;
		TabIndex = 7, ;
		Top = 219, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Left = 160, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = {}, ;
		Lb_simplu1.Caption = "Data reevaluare", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_expl_op' AS clb_tx_simplu WITH ;
		Height = 31, ;
		Left = 13, ;
		Name = "Clb_expl_op", ;
		TabIndex = 8, ;
		Top = 247, ;
		Width = 348, ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 120, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 4, ;
		Text_simplu1.Width = 224, ;
		Lb_simplu1.AutoSize = .T., ;
		Lb_simplu1.Caption = "Explicatie miscare", ;
		Lb_simplu1.Left = 8, ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		Lb_simplu1.Top = 7
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nrdoc' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "Clb_nrdoc", ;
		TabIndex = 2, ;
		Top = 79, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Numar document", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_valnoua' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "Clb_valnoua", ;
		TabIndex = 4, ;
		Top = 135, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Valoare de intrare noua", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_valveche' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "Clb_valveche", ;
		TabIndex = 3, ;
		TabStop = .F., ;
		Top = 107, ;
		Width = 348, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 161, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.TabStop = .F., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Valoare veche de intrare", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />
	
	PROCEDURE inainte_de_do_termin
		Private plReturn
		Store .T. To plReturn
		pnvaloarenoua=Thisform.clb_valnoua.text_simplu1.Value
		pnamortnoua=Thisform.clb_amortnoua.text_simplu1.Value
		pddatareeval=Thisform.clb_datareeval.text_simplu1.Value
		pcExplicatie = thisform.clb_expl_op.text_simplu1.Value 
		pnFiscala = this.ck_amf.Value 
		pdDataDoc = thisform.clb_datadoc.text_simplu1.Value 
		pnNrDoc = thisform.clb_nrdoc.text_simplu1.Value 
		pnBunCapital = thisform.ck_buncapital.Value
		pnValReev = thisform.clb_BazaTVA.text_simplu1.Value 
		
		Do Case
		Case pddatareeval<=poDetaliiMf.data_operatie
			aMessagebox("Data reevaluarii trebuie sa fie mai mare decat "+;
				DTOC(poDetaliiMf.data_operatie)+"!",48,"Atentie")
			Thisform.clb_datareeval.text_simplu1.SetFocus()
			plReturn=.F.
		Case !Between(pddatareeval,get_prima_zi(),get_ultima_zi())
			aMessagebox("Data reevaluarii trebuie sa fie din luna "+;
				ALLTRIM(Str(gnLuna))+"/"+Alltrim(Str(gnAn))+" !",48,"Atentie")
			Thisform.clb_datareeval.text_simplu1.SetFocus()
			plReturn=.F.
		Case !Between(pdDataDoc ,get_prima_zi(),get_ultima_zi())
			aMessagebox("Data documentului trebuie sa fie din luna "+;
				ALLTRIM(Str(gnLuna))+"/"+Alltrim(Str(gnAn))+" !",48,"Atentie")
			Thisform.clb_datadoc.text_simplu1.SetFocus()
			plReturn=.F.		
		Endcase
		Return plReturn
	ENDPROC

	PROCEDURE Init
		Parameters tnTip ,tlBunCapital 
		thisform.ntip = tnTip 
		thisform.lbuncapital =tlBunCapital 
		If thisform.ntip=1 and thisform.lbuncapital 
			thisform.ck_buncapital.Visible=.t.
		EndIf 
		
		DoDefault()
		
		pddataazi=get_ultima_zi()
		pdDatadoc = pddataazi
		Thisform.clb_datareeval.text_simplu1.Value=pddataazi
		Thisform.clb_valveche.text_simplu1.Value=poDetaliiMf.valoare
		Thisform.clb_valnoua.text_simplu1.Value=pnvaloarenoua
		Thisform.clb_amortveche.text_simplu1.Value=poDetaliiMf.amort_prec+poDetaliiMf.rata
		Thisform.clb_amortnoua.text_simplu1.Value=pnamortnoua
		thisform.clb_expl_op.text_simplu1.Value = pcExplicatie
		thisform.clb_datadoc.text_simplu1.Value = pdDatadoc
		thisform.clb_nrdoc.text_simplu1.Value = pnNrDoc
		thisform.Height=317
	ENDPROC

	PROCEDURE ck_buncapital.Click
		If this.Value = 1 
			thisform.Height=365
			thisform.clb_bazaTVA.Enabled= .T.
			
		Else 
			thisform.Height = 317
			thisform.clb_bazaTVA.Enabled= .F.
			
		EndIf 
	ENDPROC

	PROCEDURE Clb_datadoc.Text_simplu1.Valid
		Thisform.clb_datareeval.text_simplu1.Value=this.Value 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_op_schimb_dns AS _frmbase OF "..\comun\clase\_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_codvechi" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dnsvechi" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_codnou" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dnsnou" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dnsnou.lb_luni" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_uzura" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_data_reeval" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_expl_op" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_amf" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_datadoc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nrdoc" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: ndns_max
		*p: ndns_min
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 352
		Name = "frm_op_schimb_dns"
		ndns_max = 0
		ndns_min = 0
		Width = 377
		_shape1.Name = "_shape1"
		_shape2.Height = 29
		_shape2.Left = 305
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 79
		Lb_titlu_alb_b121.Caption = "SCHIMBARE DNS DE CALCUL"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 12
		BUT_TERMIN1.Left = 345
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 10
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

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

	ADD OBJECT 'ck_amf' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Se modifica amortizarea fiscala", ;
		Height = 17, ;
		Left = 32, ;
		Name = "ck_amf", ;
		TabIndex = 13, ;
		TabStop = .F., ;
		Top = 326, ;
		Value = 1, ;
		Width = 190
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'Clb_codnou' AS clb_tx_simplu WITH ;
		Left = 31, ;
		Name = "Clb_codnou", ;
		TabIndex = 5, ;
		Top = 147, ;
		Width = 312, ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Cod nou", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_codvechi' AS clb_tx_simplu WITH ;
		Left = 31, ;
		Name = "Clb_codvechi", ;
		TabIndex = 3, ;
		TabStop = .F., ;
		Top = 91, ;
		Width = 312, ;
		Text_simplu1.ControlSource = "poDetaliiMf.cod_mf", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 132, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 176, ;
		Lb_simplu1.Caption = "Cod vechi", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_data_reeval' AS clb_tx_simplu WITH ;
		Left = 31, ;
		Name = "Clb_data_reeval", ;
		TabIndex = 8, ;
		Top = 260, ;
		Width = 312, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Left = 124, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = {}, ;
		Lb_simplu1.Caption = "Data reevaluare", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_datadoc' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 31, ;
		Name = "Clb_datadoc", ;
		TabIndex = 1, ;
		Top = 35, ;
		Width = 312, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 123, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Data document", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_dnsnou' AS clb_tx_simplu WITH ;
		Height = 58, ;
		Left = 31, ;
		Name = "Clb_dnsnou", ;
		TabIndex = 6, ;
		Top = 175, ;
		Width = 312, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 239, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 31, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 69, ;
		Lb_simplu1.Caption = "Durata normala de serviciu schimbata (luni)", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_dnsnou.lb_luni' AS _label WITH ;
		Alignment = 2, ;
		AutoSize = .F., ;
		BackStyle = 0, ;
		Caption = "- (luni)", ;
		FontBold = .T., ;
		Height = 17, ;
		Left = 12, ;
		Name = "lb_luni", ;
		Top = 34, ;
		Width = 216
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="label" />

	ADD OBJECT 'Clb_dnsvechi' AS clb_tx_simplu WITH ;
		Left = 31, ;
		Name = "Clb_dnsvechi", ;
		TabIndex = 4, ;
		TabStop = .F., ;
		Top = 119, ;
		Width = 312, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poDetaliiMf.dns_luni", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = "9 999", ;
		Text_simplu1.Left = 239, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 69, ;
		Text_simplu1.ZOrderSet = 1, ;
		Lb_simplu1.AutoSize = .F., ;
		Lb_simplu1.Caption = "Durata normala de serviciu (luni)", ;
		Lb_simplu1.Height = 38, ;
		Lb_simplu1.Left = 8, ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		Lb_simplu1.Top = 6, ;
		Lb_simplu1.Width = 312, ;
		Lb_simplu1.WordWrap = .T., ;
		Lb_simplu1.ZOrderSet = 0
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_expl_op' AS clb_tx_simplu WITH ;
		Height = 31, ;
		Left = 31, ;
		Name = "Clb_expl_op", ;
		TabIndex = 9, ;
		Top = 288, ;
		Width = 312, ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 111, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 4, ;
		Text_simplu1.Width = 197, ;
		Lb_simplu1.AutoSize = .T., ;
		Lb_simplu1.Caption = "Explicatie miscare", ;
		Lb_simplu1.Left = 8, ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		Lb_simplu1.Top = 7
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nrdoc' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 31, ;
		Name = "Clb_nrdoc", ;
		TabIndex = 2, ;
		Top = 63, ;
		Width = 312, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 124, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Lb_simplu1.Caption = "Numar document", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_uzura' AS clb_tx_simplu WITH ;
		Left = 31, ;
		Name = "Clb_uzura", ;
		TabIndex = 7, ;
		TabStop = .F., ;
		Top = 232, ;
		Width = 312, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poDetaliiMf.uzura", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = "9 999", ;
		Text_simplu1.Left = 239, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.TabStop = .F., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 69, ;
		Lb_simplu1.Caption = "Uzura precedenta (luni)", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />
	
	PROCEDURE inainte_de_do_termin
		PRIVATE plReturn
		STORE .T. TO plReturn
		pddataschimbare=THISFORM.clb_data_reeval.text_simplu1.VALUE
		pndns=THISFORM.clb_dnsnou.text_simplu1.VALUE
		pccodnou=THISFORM.clb_codnou.text_simplu1.VALUE
		pcExplicatie = THISFORM.clb_expl_op.text_simplu1.VALUE
		pnFiscala = THIS.ck_amf.VALUE
		pdDataDoc = thisform.clb_datadoc.text_simplu1.Value 
		pnNrDoc = thisform.clb_nrdoc.text_simplu1.Value 
		
		DO CASE
			CASE pddataschimbare<=poDetaliiMf.data_operatie
				amessagebox("Data schimbarii DNS trebuie sa fie mai mare decat "+;
					DTOC(poDetaliiMf.data_operatie)+"!",48,"Atentie")
				THISFORM.clb_datareeval.text_simplu1.SETFOCUS()
				plReturn=.F.
				*!*	Case !Between(pddataschimbare,get_prima_zi(),get_ultima_zi())
				*!*		Messagebox("Data reevaluarii trebuie sa fie din luna "+;
				*!*			ALLTRIM(Str(gnLuna))+"/"+Alltrim(Str(gnAn))+" !",48,"Atentie")
				*!*		Thisform.clb_datareeval.text_simplu1.SetFocus()
				*!*		plReturn=.F.
		ENDCASE
		RETURN plReturn
		
	ENDPROC

	PROCEDURE Init
		DoDefault()
		pddataazi=get_ultima_zi()
		pdDatadoc = pddataazi
		
		Thisform.clb_data_reeval.text_simplu1.Value=pddataazi
		thisform.clb_expl_op.text_simplu1.Value = pcExplicatie
		thisform.clb_datadoc.text_simplu1.Value = pdDatadoc
		thisform.clb_nrdoc.text_simplu1.Value = pnNrDoc
	ENDPROC

	PROCEDURE Clb_codnou.Text_simplu1.DblClick
		Private pccod,pnnorma_min,pnnorma_max
		Store 0 To pnnorma_min,pnnorma_max
		Store '' To pccod_mf
		Store '' To ofrmnorme
		=ccnorme()
		ofrmnorme=Createobject('frm_norme')
		ofrmnorme.Show(1)
		Release ofrmnorme
		If !Empty(pccod_mf)
			Thisform.clb_codnou.text_simplu1.Value=Alltrim(pccod_mf)
			Thisform.ndns_min=pnnorma_min
			Thisform.ndns_max=pnnorma_max
			lnNormaMinLuni=pnnorma_min*12
			lnNormaMaxLuni=pnnorma_max*12
			Thisform.clb_dnsnou.lb_luni.Caption=Alltrim(Str(pnnorma_min))+"-"+Alltrim(Str(pnnorma_max))+" ani ( "+;
				ALLTRIM(Str(lnNormaMinLuni))+"-"+Alltrim(Str(lnNormaMaxLuni))+" luni )"
			Thisform.clb_dnsnou.text_simplu1.Value=lnNormaMinLuni
			Thisform.clb_dnsnou.text_simplu1.SetFocus()
		Endif
	ENDPROC

	PROCEDURE Clb_codnou.Text_simplu1.GotFocus
		*!*	If Empty(This.Value)
		*!*		Private pccod,pnnorma_min,pnnorma_max
		*!*		Store 0 To pnnorma_min,pnnorma_max
		*!*		Store '' To pccod_mf
		*!*		Store '' To ofrmnorme
		*!*		=ccnorme()
		*!*		ofrmnorme=Createobject('frm_norme')
		*!*		ofrmnorme.Show(1)
		*!*		Release ofrmnorme
		*!*		If !Empty(pccod_mf)
		*!*			Thisform.clb_codnou.text_simplu1.Value=Alltrim(pccod_mf)
		*!*			Thisform.ndns_min=pnnorma_min
		*!*			Thisform.ndns_max=pnnorma_max
		*!*			lnNormaMinLuni=pnnorma_min*12
		*!*			lnNormaMaxLuni=pnnorma_max*12
		*!*			Thisform.clb_dnsnou.lb_luni.Caption=Alltrim(Str(pnnorma_min))+"-"+Alltrim(Str(pnnorma_max))+" ani ( "+;
		*!*				ALLTRIM(Str(lnNormaMinLuni))+"-"+Alltrim(Str(lnNormaMaxLuni))+" luni )"
		*!*			Thisform.clb_dnsnou.text_simplu1.Value=lnNormaMinLuni
		*!*			Thisform.clb_dnsnou.text_simplu1.SetFocus()
		*!*		Endif
		*!*	Endif
	ENDPROC

ENDDEFINE

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

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_valoare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_valoare.txtNou" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_amortizare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_amortizare.txtNou" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_datareeval" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_expl_op" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_amf" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_datadoc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nrdoc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_buncapital" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_BazaTVA" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_uzura" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_uzura.txtNou" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_valoare_ramasa" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_valoare_ramasa.txtNou" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_dns" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_dns.txtNou" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_durata_ramasa" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_durata_ramasa.txtNou" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_valoare_reziduala" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_valoare_reziduala.txtNou" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_cod" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_cod.txtNou" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: recalculeaza
		*p: cdnsluni
		*p: lbuncapital
		*p: ndns_max
		*p: ndns_min
		*p: ntip
	*</DefinedPropArrayMethod>

	*<PropValue>
		cdnsluni = 
		DoCreate = .T.
		Height = 487
		lbuncapital = .F.
		Name = "frm_op_schimbdns_reevaluare"
		ndns_max = 0
		ndns_min = 0
		ntip = 0
		Width = 417
		_memberdata = <VFPData>
			<memberdata name="recalculeaza" display="Recalculeaza"/>
			<memberdata name="cdnsluni" display="cDNSLuni"/>
		</VFPData>
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 432
		_shape2.Height = 29
		_shape2.Left = 346
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 74
		Lb_titlu_alb_b121.Caption = "SCHIMBARE DNS SI REEVALUARE"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 18
		BUT_TERMIN1.Left = 387
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 16
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

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

	ADD OBJECT 'ck_amf' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Se modifica amortizarea fiscala", ;
		ControlSource = "pnFiscala", ;
		Height = 17, ;
		Left = 15, ;
		Name = "ck_amf", ;
		TabIndex = 13, ;
		TabStop = .F., ;
		Top = 411, ;
		Value = 0, ;
		Width = 190
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'ck_buncapital' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Bun de capital", ;
		ControlSource = "pnBunCapital", ;
		Height = 17, ;
		Left = 15, ;
		Name = "ck_buncapital", ;
		TabIndex = 14, ;
		TabStop = .F., ;
		Top = 428, ;
		Visible = .F., ;
		Width = 96
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'clb_amortizare' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "clb_amortizare", ;
		TabIndex = 4, ;
		Top = 141, ;
		Width = 396, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "pnAmortizare", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 120, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.TabStop = .F., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 133, ;
		Lb_simplu1.Caption = "Amortizare totala", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_amortizare.txtNou' AS _textbox WITH ;
		ControlSource = "pnAmortizareNoua", ;
		Format = "!KR", ;
		Height = 23, ;
		InputMask = (get_mask(14,gnPa)), ;
		Left = 257, ;
		Name = "txtNou", ;
		Top = 3, ;
		Width = 133
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Clb_BazaTVA' AS clb_tx_simplu WITH ;
		Enabled = .F., ;
		Height = 31, ;
		Left = 13, ;
		Name = "Clb_BazaTVA", ;
		TabIndex = 15, ;
		Top = 450, ;
		Width = 396, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "pnValReev", ;
		Text_simplu1.Enabled = .F., ;
		Text_simplu1.Format = "KR", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 257, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 4, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 133, ;
		Lb_simplu1.Caption = "Val. noua de intrare a bunului de capital", ;
		Lb_simplu1.Height = 18, ;
		Lb_simplu1.Left = 8, ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		Lb_simplu1.Top = 7, ;
		Lb_simplu1.Width = 228, ;
		Lb_simplu1.WordWrap = .T.
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_cod' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "clb_cod", ;
		TabIndex = 7, ;
		Top = 231, ;
		Width = 396, ;
		Text_simplu1.ControlSource = "poDetaliiMf.cod_mf", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 120, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.TabStop = .F., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 133, ;
		Lb_simplu1.Caption = "Cod", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_cod.txtNou' AS _textbox WITH ;
		ControlSource = "pcCodNou", ;
		Format = "!KR", ;
		Height = 23, ;
		Left = 257, ;
		Name = "txtNou", ;
		ReadOnly = .T., ;
		ToolTipText = "DblClick pentru modificare", ;
		Top = 3, ;
		Width = 133
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Clb_datadoc' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "Clb_datadoc", ;
		TabIndex = 1, ;
		Top = 51, ;
		Width = 257, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "pdDataDoc", ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 120, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 133, ;
		Lb_simplu1.Caption = "Data document", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_datareeval' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "Clb_datareeval", ;
		TabIndex = 11, ;
		Top = 347, ;
		Width = 396, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "pdDataReeval", ;
		Text_simplu1.Left = 257, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 133, ;
		Lb_simplu1.Caption = "Data reevaluare", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_dns' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "clb_dns", ;
		TabIndex = 8, ;
		Top = 259, ;
		Width = 396, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poDetaliiMf.dns_luni", ;
		Text_simplu1.InputMask = "999 999", ;
		Text_simplu1.Left = 120, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.TabStop = .F., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 133, ;
		Lb_simplu1.Caption = "DNS (luni)", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_dns.txtNou' AS _textbox WITH ;
		ControlSource = "pnDNSNou", ;
		Format = "!KR", ;
		Height = 23, ;
		InputMask = "999 999", ;
		Left = 257, ;
		Name = "txtNou", ;
		Top = 3, ;
		Width = 133
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'clb_durata_ramasa' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "clb_durata_ramasa", ;
		TabIndex = 10, ;
		Top = 315, ;
		Width = 396, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poDetaliiMf.durata_ramasa", ;
		Text_simplu1.InputMask = "999 999", ;
		Text_simplu1.Left = 120, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.TabStop = .F., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 133, ;
		Lb_simplu1.Caption = "Durata ramasa", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_durata_ramasa.txtNou' AS _textbox WITH ;
		ControlSource = "pnDurataRamasaNoua", ;
		Format = "!KR", ;
		Height = 23, ;
		InputMask = "999 999", ;
		Left = 257, ;
		Name = "txtNou", ;
		ReadOnly = .T., ;
		TabStop = .F., ;
		ToolTipText = "Durata ramasa = DNS - Uzura", ;
		Top = 3, ;
		Width = 133
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'Clb_expl_op' AS clb_tx_simplu WITH ;
		Height = 31, ;
		Left = 13, ;
		Name = "Clb_expl_op", ;
		TabIndex = 12, ;
		Top = 375, ;
		Width = 396, ;
		Text_simplu1.ControlSource = "pcExplicatie", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 120, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 4, ;
		Text_simplu1.Width = 270, ;
		Lb_simplu1.AutoSize = .T., ;
		Lb_simplu1.Caption = "Explicatie miscare", ;
		Lb_simplu1.Left = 8, ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		Lb_simplu1.Top = 7
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_nrdoc' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "Clb_nrdoc", ;
		TabIndex = 2, ;
		Top = 79, ;
		Width = 257, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "pnNrDoc", ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Left = 120, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 133, ;
		Lb_simplu1.Caption = "Numar document", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_uzura' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "clb_uzura", ;
		TabIndex = 9, ;
		Top = 287, ;
		Width = 396, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poDetaliiMf.uzura", ;
		Text_simplu1.InputMask = "999 999", ;
		Text_simplu1.Left = 120, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.TabStop = .F., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 133, ;
		Lb_simplu1.Caption = "Uzura (luni)", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_uzura.txtNou' AS _textbox WITH ;
		ControlSource = "pnUzuraNoua", ;
		Format = "!KR", ;
		Height = 23, ;
		InputMask = "999 999", ;
		Left = 257, ;
		Name = "txtNou", ;
		Top = 3, ;
		Width = 133
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'clb_valoare' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 13, ;
		Name = "clb_valoare", ;
		TabIndex = 3, ;
		Top = 113, ;
		Width = 396, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poDetaliiMf.valoare", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 120, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.TabStop = .F., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 133, ;
		Lb_simplu1.Caption = "Valoare de intrare", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_valoare.txtNou' AS _textbox WITH ;
		ControlSource = "pnValoareNoua", ;
		Format = "!KR", ;
		Height = 23, ;
		InputMask = (get_mask(14,gnPa)), ;
		Left = 257, ;
		Name = "txtNou", ;
		Top = 3, ;
		Width = 133
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'clb_valoare_ramasa' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "clb_valoare_ramasa", ;
		TabIndex = 5, ;
		Top = 169, ;
		Width = 396, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "pnValoareRamasa", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 120, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.TabStop = .F., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 133, ;
		Lb_simplu1.Caption = "Valoarea ramasa", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_valoare_ramasa.txtNou' AS _textbox WITH ;
		ControlSource = "pnValoareRamasaNoua", ;
		Format = "!KR", ;
		Height = 23, ;
		InputMask = (get_mask(14,gnPa)), ;
		Left = 257, ;
		Name = "txtNou", ;
		ReadOnly = .T., ;
		TabStop = .F., ;
		ToolTipText = "Valoarea ramasa = Valoarea de intrare - Amortizarea totala", ;
		Top = 3, ;
		Width = 133
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'clb_valoare_reziduala' AS clb_tx_simplu WITH ;
		Left = 13, ;
		Name = "clb_valoare_reziduala", ;
		TabIndex = 6, ;
		Top = 197, ;
		Width = 396, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poDetaliiMf.valoare_reziduala", ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 120, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.TabStop = .F., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 133, ;
		Lb_simplu1.Caption = "Valoare reziduala", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_valoare_reziduala.txtNou' AS _textbox WITH ;
		ControlSource = "pnValoareRezidualaNoua", ;
		Format = "!KR", ;
		Height = 23, ;
		InputMask = (get_mask(14,gnPa)), ;
		Left = 257, ;
		Name = "txtNou", ;
		Top = 3, ;
		Width = 133
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="textbox" />
	
	PROCEDURE inainte_de_do_termin
		Private plReturn
		Store .T. To plReturn
		
		Do Case
			Case pddatareeval <= poDetaliiMf.data_operatie
				aMessagebox("Data reevaluarii trebuie sa fie mai mare decat " + ;
					  Dtoc(poDetaliiMf.data_operatie) + "!", 48, "Atentie")
				Thisform.clb_datareeval.text_simplu1.SetFocus()
				plReturn = .F.
			Case !Between(pddatareeval, get_prima_zi(), get_ultima_zi())
				aMessagebox("Data reevaluarii trebuie sa fie din luna " + ;
					  Alltrim(Str(gnLuna)) + "/" + Alltrim(Str(gnAn)) + " !", 48, "Atentie")
				Thisform.clb_datareeval.text_simplu1.SetFocus()
				plReturn = .F.
			Case !Between(pdDataDoc, get_prima_zi(), get_ultima_zi())
				aMessagebox("Data documentului trebuie sa fie din luna " + ;
					  Alltrim(Str(gnLuna)) + "/" + Alltrim(Str(gnAn)) + " !", 48, "Atentie")
				Thisform.clb_datadoc.text_simplu1.SetFocus()
				plReturn = .F.
			Case !Between(m.pnDNSNou, This.ndns_min * 12, This.ndns_max * 12) And This.ndns_min <> 0 And This.ndns_max <> 0 And This.nTip = 1
				aMessagebox("Durata normala de serviciu trebuie sa fie intre " + Chr(10) + Chr(13) + ;
					  This.cDNSLuni + " !", 0 + 48, "Atentie")
				plReturn = .F.
		Endcase
		Return plReturn
	ENDPROC

	PROCEDURE Init
		Parameters tnTip, tlBunCapital
		
		Thisform.ntip = tnTip
		Thisform.lbuncapital = tlBunCapital
		Thisform.ck_buncapital.Visible = (m.tnTip = 1 And m.tlBunCapital)
		
		DoDefault()
		
		Thisform.Height = 448 && fara valoare noua de intrare a bunului de capital
	ENDPROC

	PROCEDURE recalculeaza
		pnValoareRamasaNoua = pnValoareNoua - pnAmortizareNoua
		this.clb_valoare_ramasa.txtNou.Refresh()
		
		pnDurataRamasaNoua = pnDNSNou - pnUzuraNoua
		this.clb_durata_ramasa.txtNou.Refresh()
	ENDPROC

	PROCEDURE ck_buncapital.Click
		If this.Value = 1 
			thisform.Height=487
			thisform.clb_bazaTVA.Enabled= .T.
			
		Else 
			thisform.Height = 448
			thisform.clb_bazaTVA.Enabled= .F.
			
		EndIf 
	ENDPROC

	PROCEDURE clb_amortizare.txtNou.LostFocus
		Thisform.Recalculeaza()
	ENDPROC

	PROCEDURE clb_cod.txtNou.DblClick
		Private pccod,pnnorma_min,pnnorma_max
		Store 0 To pnnorma_min,pnnorma_max
		Store '' To pccod_mf
		Store '' To ofrmnorme
		=ccnorme()
		ofrmnorme=Createobject('frm_norme')
		ofrmnorme.Show(1)
		Release ofrmnorme
		If !Empty(pccod_mf)
			Thisform.clb_cod.text_simplu1.Value=Alltrim(pccod_mf)
			Thisform.ndns_min=pnnorma_min
			Thisform.ndns_max=pnnorma_max
			lnNormaMinLuni=pnnorma_min*12
			lnNormaMaxLuni=pnnorma_max*12
			thisform.cDNSLuni = Alltrim(Str(pnnorma_min))+"-"+Alltrim(Str(pnnorma_max))+" ani ( "+;
					ALLTRIM(Str(lnNormaMinLuni))+"-"+Alltrim(Str(lnNormaMaxLuni))+" luni )"
			pnDNSNou = m.lnNormaMinLuni
			Thisform.Recalculeaza()
			Thisform.clb_dns.text_simplu1.SetFocus()
		Endif
	ENDPROC

	PROCEDURE Clb_datadoc.Text_simplu1.Valid
		Thisform.clb_datareeval.text_simplu1.Value=this.Value 
	ENDPROC

	PROCEDURE clb_dns.txtNou.LostFocus
		Thisform.Recalculeaza()
	ENDPROC

	PROCEDURE clb_uzura.txtNou.LostFocus
		Thisform.Recalculeaza()
	ENDPROC

	PROCEDURE clb_valoare.txtNou.LostFocus
		Thisform.Recalculeaza()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_operatii_rate AS frm_termin OF "..\comun\clase\_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="Grid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column6.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column7.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column7.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column8.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column8.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column9.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column9.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column10.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column10.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column11.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column11.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column12.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column12.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column13.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column13.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column14.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column14.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column15.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column15.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cValoareReziduala.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cValoareReziduala.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column6.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column7.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column7.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column8.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column8.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column9.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column9.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column10.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid2.Column10.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Gridextra1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Gridextra2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_excel1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_listare1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chkSterse" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: e_ultima_operatie
		*m: get_date_raport
		*p: nfiscala
		*p: omf
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 2
		DoCreate = .T.
		Height = 438
		Name = "frm_operatii_rate"
		nfiscala = 0
		omf = 
		Width = 792
		_shape1.Anchor = 10
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 794
		_shape2.Height = 29
		_shape2.Left = 630
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 165
		Lb_titlu_alb_b121.Caption = "Miscari MF - Rate "
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 761
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Left = 0
		Gridsort1.Name = "Gridsort1"
		Gridsort1.Top = 24
	*</PropValue>

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

	ADD OBJECT 'But_listare1' AS but_listare WITH ;
		Anchor = 9, ;
		Left = 732, ;
		Name = "But_listare1", ;
		Top = 1
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 643, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

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

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 674, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'chkSterse' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "\<Sterse", ;
		ForeColor = 255,0,0, ;
		Left = 13, ;
		Name = "chkSterse", ;
		Top = 30
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Grid1' AS grid WITH ;
		Anchor = 15, ;
		ColumnCount = 16, ;
		DeleteMark = .F., ;
		FontSize = 10, ;
		HeaderHeight = 33, ;
		Height = 216, ;
		Left = 10, ;
		Name = "Grid1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "crsOperatii", ;
		RowHeight = 19, ;
		Top = 48, ;
		Width = 775, ;
		Column1.ControlSource = "denumire", ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 9, ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 118, ;
		Column2.ColumnOrder = 3, ;
		Column2.ControlSource = "valoare_rol", ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 9, ;
		Column2.InputMask = (get_mask(12,gnPa)), ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 87, ;
		Column3.ColumnOrder = 4, ;
		Column3.ControlSource = "valoare_ramasa_rol", ;
		Column3.FontName = "Arial", ;
		Column3.FontSize = 9, ;
		Column3.InputMask = (get_mask(12,gnPa)), ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 97, ;
		Column4.ColumnOrder = 2, ;
		Column4.ControlSource = "ttoD(data_operatie)", ;
		Column4.FontName = "Arial", ;
		Column4.FontSize = 9, ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 80, ;
		Column5.ColumnOrder = 5, ;
		Column5.ControlSource = "dns_ramas", ;
		Column5.FontName = "Arial", ;
		Column5.FontSize = 9, ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T., ;
		Column5.Width = 41, ;
		Column6.ColumnOrder = 7, ;
		Column6.ControlSource = "explicatia", ;
		Column6.FontName = "Arial", ;
		Column6.FontSize = 9, ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .T., ;
		Column7.ColumnOrder = 10, ;
		Column7.ControlSource = "utilizator", ;
		Column7.FontName = "Arial", ;
		Column7.FontSize = 9, ;
		Column7.Name = "Column7", ;
		Column7.ReadOnly = .T., ;
		Column8.ColumnOrder = 12, ;
		Column8.ControlSource = "id_operatie_prec", ;
		Column8.FontName = "Arial", ;
		Column8.FontSize = 9, ;
		Column8.Name = "Column8", ;
		Column8.ReadOnly = .T., ;
		Column8.Width = 66, ;
		Column9.ColumnOrder = 11, ;
		Column9.ControlSource = "id_operatie_mf", ;
		Column9.FontName = "Arial", ;
		Column9.FontSize = 9, ;
		Column9.Name = "Column9", ;
		Column9.ReadOnly = .T., ;
		Column9.Width = 67, ;
		Column10.ColumnOrder = 13, ;
		Column10.ControlSource = "id_mf", ;
		Column10.FontName = "Arial", ;
		Column10.FontSize = 9, ;
		Column10.Name = "Column10", ;
		Column10.ReadOnly = .T., ;
		Column10.Width = 91, ;
		Column11.ColumnOrder = 8, ;
		Column11.ControlSource = "ttoD(datadoc)", ;
		Column11.FontName = "Arial", ;
		Column11.FontSize = 10, ;
		Column11.Name = "Column11", ;
		Column11.ReadOnly = .T., ;
		Column11.Sparse = .F., ;
		Column11.Width = 88, ;
		Column12.ColumnOrder = 9, ;
		Column12.ControlSource = "nrdoc", ;
		Column12.FontName = "Arial", ;
		Column12.FontSize = 10, ;
		Column12.Name = "Column12", ;
		Column12.ReadOnly = .T., ;
		Column12.Sparse = .F., ;
		Column12.Width = 102, ;
		Column13.ColumnOrder = 14, ;
		Column13.ControlSource = "dataora", ;
		Column13.FontName = "Arial", ;
		Column13.FontSize = 10, ;
		Column13.Name = "Column13", ;
		Column13.ReadOnly = .T., ;
		Column13.Width = 113, ;
		Column14.ColumnOrder = 15, ;
		Column14.ControlSource = "dataora_sters", ;
		Column14.FontName = "Arial", ;
		Column14.FontSize = 10, ;
		Column14.Name = "Column14", ;
		Column14.ReadOnly = .T., ;
		Column14.Width = 97, ;
		Column15.ColumnOrder = 16, ;
		Column15.ControlSource = "utilizators", ;
		Column15.FontName = "Arial", ;
		Column15.FontSize = 10, ;
		Column15.Name = "Column15", ;
		Column15.ReadOnly = .T., ;
		Column15.Width = 100, ;
		Column16.ColumnOrder = 6, ;
		Column16.ControlSource = "valoare_reziduala", ;
		Column16.FontSize = 10, ;
		Column16.Format = "RK", ;
		Column16.InputMask = (get_mask(12,gnPa)), ;
		Column16.Name = "cValoareReziduala", ;
		Column16.ReadOnly = .T., ;
		Column16.Width = 99
		*< END OBJECT: BaseClass="grid" />

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

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

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

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

	ADD OBJECT 'Grid1.Column11.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data doc.", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column11.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 'Grid1.Column12.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr. doc.", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column12.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 'Grid1.Column13.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Dataora introducere", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column13.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 'Grid1.Column14.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Dataora stergere", ;
		FontName = "Arial", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Grid1.Column15.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 'Grid1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Valoare MF", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

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

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

	ADD OBJECT 'Grid1.Column5.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "DR (luni)", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

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

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

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

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

	ADD OBJECT 'Grid1.Column8.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id Op Prec", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

	ADD OBJECT 'Grid1.cValoareReziduala.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Valoare reziduala", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Grid2' AS grid WITH ;
		Anchor = 14, ;
		ColumnCount = 10, ;
		DeleteMark = .F., ;
		FontSize = 10, ;
		HeaderHeight = 24, ;
		Height = 158, ;
		Left = 10, ;
		Name = "Grid2", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "crsRate", ;
		RowHeight = 19, ;
		Top = 272, ;
		Width = 775, ;
		Column1.ColumnOrder = 3, ;
		Column1.ControlSource = "rata_rol", ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 9, ;
		Column1.InputMask = (get_mask(12,gnPa)), ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 81, ;
		Column2.ColumnOrder = 4, ;
		Column2.ControlSource = "padl(crsrate.luna,2,'0')+'/'+allt(str(crsRate.an))", ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 9, ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 75, ;
		Column3.ColumnOrder = 5, ;
		Column3.ControlSource = "padl(crsrate.luna_exp,2,'0')+'/'+allt(str(crsRate.an_exp))", ;
		Column3.FontName = "Arial", ;
		Column3.FontSize = 9, ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 82, ;
		Column4.ColumnOrder = 6, ;
		Column4.ControlSource = "cota_an", ;
		Column4.FontName = "Arial", ;
		Column4.FontSize = 9, ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 53, ;
		Column5.ColumnOrder = 7, ;
		Column5.ControlSource = "cota_luna", ;
		Column5.FontName = "Arial", ;
		Column5.FontSize = 9, ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T., ;
		Column5.Width = 67, ;
		Column6.ColumnOrder = 8, ;
		Column6.ControlSource = "ultima_rata_rol", ;
		Column6.FontName = "Arial", ;
		Column6.FontSize = 9, ;
		Column6.InputMask = (get_mask(12,gnPa)), ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .T., ;
		Column6.Width = 83, ;
		Column7.ColumnOrder = 9, ;
		Column7.ControlSource = "ttod(crsrate.data_ultima_rata)", ;
		Column7.FontName = "Arial", ;
		Column7.FontSize = 9, ;
		Column7.Name = "Column7", ;
		Column7.ReadOnly = .T., ;
		Column7.Width = 94, ;
		Column8.ColumnOrder = 1, ;
		Column8.ControlSource = "uzura_prec", ;
		Column8.FontName = "Arial", ;
		Column8.FontSize = 9, ;
		Column8.Name = "Column8", ;
		Column8.ReadOnly = .T., ;
		Column8.Width = 83, ;
		Column9.ColumnOrder = 2, ;
		Column9.ControlSource = "amortizare_prec_rol", ;
		Column9.FontName = "Arial", ;
		Column9.FontSize = 9, ;
		Column9.InputMask = (get_mask(12,gnPa)), ;
		Column9.Name = "Column9", ;
		Column9.ReadOnly = .T., ;
		Column9.Width = 98, ;
		Column10.ColumnOrder = 10, ;
		Column10.ControlSource = "id_calcul_rate", ;
		Column10.FontName = "Arial", ;
		Column10.FontSize = 9, ;
		Column10.Name = "Column10", ;
		Column10.ReadOnly = .T., ;
		Column10.Width = 73
		*< END OBJECT: BaseClass="grid" />

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

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

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

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

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

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

	ADD OBJECT 'Grid2.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Luna/An Exp", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Grid2.Column4.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cota An", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid2.Column4.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		FontSize = 9, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid2.Column5.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cota luna", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Grid2.Column6.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ultima Rata", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

	ADD OBJECT 'Grid2.Column8.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Uzura Prec", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Grid2.Column9.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Amortiz Prec", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Gridextra1' AS gridextra WITH ;
		Height = 17, ;
		Left = 0, ;
		Name = "Gridextra1", ;
		Top = 48, ;
		Width = 16
		*< END OBJECT: ClassLib="..\comun\utile\gridextras\gridextras.vcx" BaseClass="custom" />

	ADD OBJECT 'Gridextra2' AS gridextra WITH ;
		gridexpression = Thisform.Grid2, ;
		Height = 17, ;
		Left = 0, ;
		Name = "Gridextra2", ;
		Top = 271, ;
		Width = 16
		*< END OBJECT: ClassLib="..\comun\utile\gridextras\gridextras.vcx" BaseClass="custom" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS tcFiltru
		LOCAL lcFiltru
		
		IF EMPTY(tcFiltru)
			lcFiltru = poOperatii.ca_baza1.cfiltru
		ELSE
			lcFiltru = tcFiltru
		ENDIF 
		
		save_grid_tag(this.grid1)
		poOperatii.ca_baza1.cfiltru=lcFiltru
		poOperatii.ca_baza1.afisare()
		restore_grid_tag(This.grid1)
		This.grid1.refresh
	ENDPROC

	PROCEDURE actualizeaza_grid2
		LPARAMETERS tcFiltru
		LOCAL lcFiltru
		
		IF EMPTY(tcFiltru)
			lcFiltru = poRate.ca_baza1.cfiltru
		ELSE
			lcFiltru = tcFiltru
		ENDIF 
		
		save_grid_tag(this.grid2)
		poRate.ca_baza1.cfiltru=lcFiltru
		poRate.ca_baza1.afisare()
		restore_grid_tag(This.grid2)
		This.grid2.refresh
	ENDPROC

	PROCEDURE do_adauga
		&& Atentie !!! toate variabilele private se folosesc in form-ul 'new_operatii_rate'
		
		Private poMf, poOper, poRata, pdDataRata, pnFiscala, pnIdTipIesire
		Local loModifica As 'new_operatii_rate'
		Local lcCrsOper, lcCrsRata, lcSql, llEultimaOperatie, lnSucces, lnSucces2, loPrec
		pnIdTipIesire = NULL
		
		poMf = This.omf
		lcCrsOper = This.grid1.RecordSource
		lcCrsRata = This.grid2.RecordSource
		
		Select (lcCrsOper)
		Scatter Name poOper Blank
		Select (lcCrsRata)
		Scatter Name poRata Blank
		
		Select * From (lcCrsOper) With (Buffering = .T.) Where data_operatie In (Select Max(data_operatie) From (lcCrsOper)) Into Cursor crsOpPrec
		Select crsOpPrec
		Locate
		Scatter Name loPrec
		Use In crsOpPrec
		
		lnSucces = cctipuri_operatie()
		If lnSucces < 0
			Return
		ENDIF
		
		SELECT v_tipuri_operatie
		LOCATE FOR id_tip_operatie  = 12 && modificare cu istoric
		IF !FOUND()
			GO TOP 
		ENDIF 
		
		poOper.data_operatie = GOMONTH(DATE(m.gnAn, m.gnLuna, 1),1) - 1
		pdDataRata = poOper.data_operatie + 1
		poRata.data_ultima_rata = {}
		poOper.datadoc = poOper.data_operatie
		
		poOper.valoare_rol = poMF.valoare
		poOper.valoare_ramasa_rol = poMF.valoare-poMF.amort_prec-poMF.rata
		poOper.valoare_reziduala = poMF.valoare_reziduala
		poOper.dns_ramas = poMF.dns_luni - poMF.uzura
		poOper.id_tip_operatie = v_tipuri_operatie.id_tip_operatie
		poOper.denumire = v_tipuri_operatie.denumire
		
		llEultimaOperatie = .T.
		loModifica = Createobject('new_operatii_rate', m.llEultimaOperatie)
		loModifica.oOperPrec = loPrec
		loModifica.nid_tip_operatie = v_tipuri_operatie.id_tip_operatie
		*!*	loModifica.clb_rata.text_simplu1.ReadOnly = .T.
		*!*	loModifica.clb_cota_an.text_simplu1.ReadOnly = .T.
		loModifica.lb_titlu_alb_b121.Caption = [Adaugare Operatie]
		* Recalculez valorile
		loModifica.Recalculare('operatie')
		
		loModifica.Show(1)
		Release loModifica
		
		If gnButon = 1
			Private pnIdOperatie
			pnIdOperatie = 0
		
			lnSucces = SQLSetprop(gnhandle, "Transactions", 2)
			pnFiscala = This.nfiscala
		
			&& adaugare operatie
			If lnSucces > 0
		
				lcSql = [begin ?@pnIdOperatie:= pack_imob.add_operatie_mf(] + ;
					[?poMf.id_mf,] + ;
					[?poOper.id_tip_operatie,] + ;
					[?poOper.valoare_rol,] + ;
					[?poOper.valoare_ramasa_rol,] + ;
					[?poOper.dns_ramas,] + ;
					[?poOper.valoare_reziduala,] + ;			
					[?poOper.data_operatie,] + ;
					[?poOper.explicatia,] + ;
					[?gnIdUtil,] + ;
					[?pnFiscala,] + ;
					[?poOper.datadoc,] + ;
					[?poOper.nrdoc,] + ;
					[?pnIdTipIesire) ;end;]
				lnSucces = goExecutor.oExecute(lcSql, 'pnIdOperatie')
				If lnSucces < 0
					amessagebox('Eroare la adaugare miscare' + '!' + CRLF + goExecutor.cEroare, 0 + 16, "ROA IMOB")
				Endif
			Endif
		
			&& adaugare rata
			If lnSucces > 0
				lcSql = [begin pack_imob.adauga_rata(] + ;
					[?gcs,] + ;
					[?pnIdOperatie,] + ;
					[?poOper.id_tip_operatie,] + ;
					[?poMf.id_mf,] + ;
					[?poOper.dns_ramas,] + ;
					[?pdDataRata,] + ;
					[?poOper.valoare_rol,] + ;
					[?poOper.valoare_ramasa_rol,] + ;
					[?poRata.uzura_prec,] + ;
					[?pnFiscala); end;]
				lnSucces = goExecutor.oExecute(lcSql)
				If lnSucces < 0
					amessagebox('Eroare la adaugare rata' + '!' + CRLF + goExecutor.cEroare, 0 + 16, "ROA IMOB")
				Endif
			Endif
			If lnSucces < 0
				lcSql = "ROLLBACK"
			Else
				lcSql = "COMMIT"
			Endif
			lnSucces2 = goExecutor.oExecute(lcSql)
		
			If lnSucces2 < 0
				amessagebox(lcSql + Chr(13) + goExecutor.cEroare, 0 + 16, "Eroare")
			Endif
		
			lnSucces2 = SQLSetprop(gnhandle, "Transactions", 1)
			If lnSucces2 < 0
				amessagebox('Programul nu a reusit sa treaca pe tranzactie automata. Iesiti din program si intrati din nou!', 0, 'Atentie!')
			Endif
		
			This.LockScreen = .T.
			This.actualizeaza_grid1
			This.actualizeaza_grid2
			This.LockScreen = .F.
		Endif
	ENDPROC

	PROCEDURE do_excel
		Local loExport as "oExportConfig"
		Local lcDenumire, llSucces, lnNrInventar
		Local lcSqlOperatii, lcSqlRate, llSucces, lnFiscala
		private pnIdMf
		
		lcDenumire = UPPER(ALLTRIM(This.oMF.denumire))
		lnNrInventar = This.oMF.nr_inventar
		lnFiscala = This.nFiscala
		pnIdMf = This.oMF.id_mf
		
		*!*	llSucces = This.Get_Date_Raport()
		*!*	IF !m.llSucces
		*!*		USE IN (SELECT("crsOperatiiRaport"))
		*!*		USE IN (SELECT("crsRateRaport"))
		*!*		RETURN 
		*!*	ENDIF 
		
		TEXT TO lcSqlOperatii TEXTMERGE NOSHOW 
		select denumire, data_operatie, valoare_rol as valoare, valoare_ramasa_rol as valoare_ramasa, dns_ramas, explicatia, datadoc, nrdoc
			from <<Iif(m.lnFiscala = 0, [imob_voperatii_mf],[imobf_voperatii_mf])>> 
			where id_mf = ?pnIdMF
			order by data_operatie
		ENDTEXT 
		
		TEXT TO lcSqlRate TEXTMERGE NOSHOW 	
		select uzura_prec as uzura_precedenta, amortizare_prec_rol as amortizare_precedenta, rata_rol as rata, an, luna, an_exp, luna_exp,
			cota_an as cota_anuala, cota_luna as cota_lunara, ultima_rata_rol as ultima_rata, data_ultima_rata
			from <<Iif(m.lnFiscala = 0, [imob_vcalcul_rate ],[imobf_vcalcul_rate ])>>
			where id_mf = ?pnIdMF
			order by id_calcul_rate
		ENDTEXT 
		
		llSucces = goExecutor.oExecuta(m.lcSqlOperatii, "crsOperatiiRaport")
		IF m.llSucces
			llSucces = goExecutor.oExecuta(m.lcSqlRate, "crsRateRaport")
		ENDIF 	
		
		loExport = Createobject("oExportConfig")
		loExport.export2html("crsOperatiiRaport,crsRateRaport", "Istoric_Operatii_" + m.lcDenumire + "_" + ALLTRIM(STR(m.lnNrInventar)) + ".xls", "Operatii,Rate", .F.) && oexport.prg
		
		USE IN (SELECT("crsOperatiiRaport"))
		USE IN (SELECT("crsRateRaport"))
		
		  
	ENDPROC

	PROCEDURE do_listare
		Private pnIdMf
		
		Local loExport As "oExportConfig"
		Local lcSql, llSucces, lcRaport
		Private pcCodMf, pcDenumire, pdDataPIF, pnFiscala, pnNrInventar
		
		pcDenumire = Upper(Alltrim(This.oMF.denumire))
		pnNrInventar = This.oMF.nr_inventar
		pnFiscala = This.nFiscala
		pnIdMf = This.oMF.id_mf
		pdDataPIF = This.oMF.data_pif
		pcCodMf = This.oMF.cod_mf
		lnFiscala = This.nFiscala
		
		lnOptiune = xmenu("Listare \<Operatii;Listare Operatii si \<Rate")
		If !Inlist(m.lnOptiune,1,2,3)
			Return
		Endif
		If m.lnOptiune = 1
			lcRaport = "rap_operatii"
			lcView = Iif(m.pnFiscala = 0, [imob_vjurnal_operatii],[imobf_vjurnal_operatii])
			
			TEXT TO lcSql TEXTMERGE NOSHOW 
		select nr_inventar,
		       denumire,
		       cod_mf,
		       data_pif,
		       data_operatie,
		       numeoperatie,
		       valoare,
		       valoare - lag(valoare) over(partition by id_mf order by data_operatie) as valoare_diferenta, 
		       valoare_ramasa,      
		       valoare_ramasa - lag(valoare_ramasa) over(partition by id_mf order by data_operatie) as valoare_ramasa_diferenta,       
		       dns_ramas,
		       explicatiaoperatie
		  from <<m.lcView>> 
		 where id_mf = ?pnIdMF
		 order by data_operatie
			ENDTEXT 
		
		ELSE
			lcRaport = "amortizare"
			lcView = Iif(m.pnFiscala = 0, [imob_vjurnal_rate],[imobf_vjurnal_rate])
				
			lcSql = [select * from ] + m.lcView + [ where id_mf = ?pnIdMF order by data_operatie]
		Endif
		
		llSucces = goExecutor.oExecuta(m.lcSql, "crsOperatiiRaport")
		SELECT crsOperatiiRaport
		
		If m.llSucces
			this.AlwaysOnTop = .F.
			goExport.export2frx([crsOperatiiRaport], m.lcRaport, , , , , , .T.)	
			this.AlwaysOnTop = .T.
			Use In (Select("crsOperatiiRaport"))
			*!*	USE IN (SELECT("crsRateRaport"))
		Endif
		
	ENDPROC

	PROCEDURE do_modifica
		*!* 17.11.2014
		*!* marius.mutu
		*!* permit modificarea ratelor anterioare, dar in formularul new_operatii_rate butonul "Terminat" este invizibil
		
		
		*!*	19.02.2026	
		*!*	*!* Adaugat nrdoc si datadoc in schimba_mf (poOper.nrdoc si poOper.datadoc)
		
		
		&& Atentie !!! toate variabilele private se folosesc in form-ul 'new_operatii_rate'
		
		Private poMf, poOper, poRata, pdDataRata, pcPerFin, pcPerIn, pnFiscala
		Local loModifica As 'new_operatii_rate'
		Local lcCrsOper, lcCrsRata, lcSql, llEUltimaOperatie, lnSucces, loPrec, llSters 
		
		poMf = This.omf
		lcCrsOper = This.grid1.RecordSource
		lcCrsRata = This.grid2.RecordSource
		
		Select (lcCrsOper)
		Scatter Name poOper
		Select (lcCrsRata)
		Scatter Name poRata
		
		llEUltimaOperatie = This.e_ultima_operatie(poOper.data_operatie)
		*!*	IF !this.e_ultima_operatie(poOper.data_operatie)
		*!*		RETURN 
		*!*	ENDIF 
		
		llLunaInchisa = is_luna_blocata(m.gcS, m.gnId_Prg_Owner, YEAR(poOper.data_operatie), MONTH(poOper.data_operatie))
		If m.llLunaInchisa
			aMESSAGEBOX("Nu puteti face modificari. Luna " + PADL(MONTH(poOper.data_operatie), 2, '0') + "/" + ALLTRIM(STR(YEAR(poOper.data_operatie))) + " este închisã!",0+48,_screen.Caption )
			llEUltimaOperatie = .F.
		ENDIF
		
		llSters = !EMPTY(NVL(poOper.sters,0))
		IF m.llSters
			AMESSAGEBOX("Nu puteti face modificari pe inregistrari sterse!",0+48, _screen.Caption )
			llEUltimaOperatie = .F.
		ENDIF 
		
		Select * From (lcCrsOper) With (Buffering = .T.) Where id_operatie_mf = poOper.id_operatie_prec Into Cursor crsOpPrec
		Select crsOpPrec
		Locate
		Scatter Name loPrec
		Use In crsOpPrec
		
		lnSucces = cctipuri_operatie()
		If lnSucces < 0
			Return
		Endif
		
		pdDataRata = Date(poRata.an, poRata.luna, 1)
		poOper.data_operatie = Ttod(poOper.data_operatie)
		poRata.data_ultima_rata = Ttod(poRata.data_ultima_rata)
		
		loModifica = Createobject('new_operatii_rate', m.llEUltimaOperatie)
		loModifica.oOperPrec = loPrec
		loModifica.lb_titlu_alb_b121.Caption = [Modificare Operatie]
		*!*	loModifica.Clb_tx_simplu2.text_simplu1.ReadOnly = .T.
		*!*	loModifica.Clb_tx_simplu1.text_simplu1.ReadOnly = .T.
		loModifica.Show(1)
		Release loModifica
		
		If gnButon = 1
			pnFiscala = This.nfiscala
			pcPerIn = Padl(poRata.luna, 2, '0') + Alltrim(Str(poRata.an))
			pcPerFin = Padl(poRata.luna_exp, 2, '0') + Alltrim(Str(poRata.an_exp))
		 
			lcSql = [begin pack_imob.schimba_mf(?poMf.id_mf,] + ;
				[?poMf.nract,] + ;
				[?poMf.data_achizitie,] + ;
				[?poMf.denumire,] + ;
				[?poMf.explicatia,] + ;
				[?poMf.data_pif ,] + ;
				[?poMf.nr_pif ,] + ;
				[?poMf.procent,] + ;
				[?poMf.coeficient,] + ;
				[?poMf.id_tip_amortizare,] + ;
				[?poMf.id_tip_imobilizare,] + ;
				[?poMf.id_lista_mf,] + ;
				[?poMf.dns_luni,] + ;
				[?poMf.Cod_mf ,] + ;
				[?poMf.cont,] + ;
				[?poMf.acont,] + ;
				[?poMf.nr_inventar,] + ;
				[?poMf.id_gestiune,] + ;
				[?poMf.id_responsabil,] + ;
				[?poMf.id_sectie,] + ;
				[?poMf.id_lucrare,] + ;
				[?poMf.id_sucursala,] + ;
				[?poMf.lper_in,] + ;
				[?poMf.lper_fin,] + ;
				[?poOper.id_operatie_mf,] + ;
				[?poOper.id_tip_operatie,] + ;
				[?poOper.valoare_rol,] + ;
				[?poOper.valoare_ramasa_rol,] + ;
				[?poOper.dns_ramas,] + ;
				[?poOper.valoare_reziduala,] + ;		
				[?poOper.data_operatie,] + ;
				[?poOper.explicatia,] + ;
				[?poRata.uzura_prec,] + ;
				[?poRata.id_calcul_rate,] + ;
				[?pcPerIn ,] + ;
				[?pcPerFin,] + ;
				[?poRata.rata_rol,] + ;
				[?poRata.cota_an,] + ;
				[?poRata.cota_luna,] + ;
				[?poRata.ultima_rata_rol,] + ;
				[?poRata.data_ultima_rata,] + ;
				[?pnFiscala, ?gnIdUtil, ?poMF.amort_max_deductibil, ?poOper.nrdoc, ?poOper.datadoc); end;]
			lnSucces = goExecutor.oExecute(lcSql)
			If lnSucces < 0
				amessagebox(goExecutor.cEroare, 0 + 16, "Eroare")
			Endif
			This.LockScreen = .T.
			This.actualizeaza_grid1
			This.actualizeaza_grid2
			This.LockScreen = .F.
		Endif
	ENDPROC

	PROCEDURE do_sterge
		&& Atentie !!! toate variabilele private se folosesc in form-ul 'new_operatii_rate'
		
		PRIVATE poMf, poOper, poRata, pdDataRata
		pomf = this.omf 
		lcCrsOper = this.grid1.RecordSource 
		lcCrsRata = this.grid2.RecordSource
		
		SELECT (lcCrsOper)
		SCATTER NAME poOper
		SELECT (lcCrsRata)
		SCATTER NAME poRata
		
		IF !this.e_ultima_operatie(poOper.data_operatie)
			RETURN 
		ENDIF 
		
		llLunaInchisa = is_luna_blocata(m.gcS, m.gnId_Prg_Owner, YEAR(poOper.data_operatie), MONTH(poOper.data_operatie))
		If m.llLunaInchisa
			AMESSAGEBOX("Nu puteti face modificari. Luna " + PADL(MONTH(poOper.data_operatie), 2, '0') + "/" + ALLTRIM(STR(YEAR(poOper.data_operatie))) + " este închisã!",0+48,_screen.Caption )
			RETURN 
		ENDIF
		
		llSters = !EMPTY(NVL(poOper.sters,0))
		IF m.llSters
			AMESSAGEBOX("Nu puteti sterge inregistrari sterse!",0+48, _screen.Caption )
			RETURN 
		ENDIF 
		
		lnButon = amessagebox('Stergeti Miscarea ' + ALLTRIM(poOPer.denumire) + ' din data ' + ALLTRIM(DTOC(poOper.data_operatie)) + '?',4)
		IF lnButon = 6
			pnFiscala = this.nfiscala
			lcSql = [begin pack_imob.sterge_operatie_mf(?poOper.id_operatie_mf,?poOper.ID_OPERATIE_PREC,?pnFiscala);end;] 
			lnSucces = goExecutor.oExecute(lcSql)
			IF lnSucces < 0
				amessagebox(goExecutor.cEroare,0+16,"Eroare")
			ENDIF
			this.LockScreen = .T.
			this.actualizeaza_grid1
			this.actualizeaza_grid2
			this.LockScreen = .F.
		ENDIF
	ENDPROC

	PROCEDURE e_ultima_operatie
		PARAMETERS tdDataOperatie
		
		llRet = .T.
		
		crsOperatii = this.grid1.RecordSource 
		SELECT MAX(data_operatie) as data_max FROM (crsOperatii) INTO CURSOR tRezultat
		SELECT tRezultat
		LOCATE 
		ldData = data_max
		USE IN tRezultat
		
		IF tdDataOperatie < ldData
			aMESSAGEBOX('Nu puteti face modificari decat pe ultima operatie din lista!')
			llRet = .F.
		ENDIF 
		
		RETURN llRet
		 
	ENDPROC

	PROCEDURE get_date_raport
		private pnIdMf
		Local lcSqlOperatii, lcSqlRate, llSucces, lnFiscala
		lnFiscala = This.nFiscala
		pnIdMf = This.oMF.id_mf
		
		TEXT TO lcSqlOperatii TEXTMERGE NOSHOW 
		select denumire, data_operatie, valoare_rol as valoare, valoare_ramasa_rol as valoare_ramasa, dns_ramas, explicatia, datadoc, nrdoc
			from <<Iif(m.lnFiscala = 0, [imob_voperatii_mf],[imobf_voperatii_mf])>> 
			where id_mf = ?pnIdMF
			order by data_operatie
		ENDTEXT 
		
		TEXT TO lcSqlRate TEXTMERGE NOSHOW 	
		select uzura_prec as uzura_precedenta, amortizare_prec_rol as amortizare_precedenta, rata_rol as rata, an, luna, an_exp, luna_exp,
			cota_an as cota_anuala, cota_luna as cota_lunara, ultima_rata_rol as ultima_rata, data_ultima_rata
			from <<Iif(m.lnFiscala = 0, [imob_vcalcul_rate ],[imobf_vcalcul_rate ])>>
			where id_mf = ?pnIdMF
			order by id_calcul_rate
		ENDTEXT 
		
		llSucces = goExecutor.oExecuta(m.lcSqlOperatii, "crsOperatiiRaport")
		IF m.llSucces
			llSucces = goExecutor.oExecuta(m.lcSqlRate, "crsRateRaport")
		ENDIF 	
		
		RETURN m.llSucces
		  
	ENDPROC

	PROCEDURE grid_sort_bind
		* NU STERGE
	ENDPROC

	PROCEDURE Init
		DODEFAULT()
		
		This.Height = INT(_screen.Height * 0.7)
		This.Width = INT(_screen.Width * 0.7)
		This.AutoCenter= .T.
		
		THIS.GRIDextra1.SETUP()
		THIS.GRIDextra2.SETUP()
		
		this.grid1.SetAll("dynamicforecolor",[IIF(sters <> 0, RGB(255,0,0),RGB(0,0,0))], "Column")
		this.grid2.SetAll("dynamicforecolor",[IIF(sters <> 0, RGB(255,0,0),RGB(0,0,0))], "Column")
	ENDPROC

	PROCEDURE chkSterse.Click
		Local lcSelectOperatii, lcSelectRate
		lcSelectOperatii = poOperatii.ca_baza1.SelectCmd
		lcSelectRate = poRate.ca_baza1.SelectCmd
		lcSelectOperatii = Strtran(m.lcSelectOperatii, Iif(This.Value = 1, 'imob_voperatii_mf', 'imob_voperatii_mf_tot'), Iif(This.Value = 1, 'imob_voperatii_mf_tot', 'imob_voperatii_mf'), 1, 1, 1)
		lcSelectOperatii = Strtran(m.lcSelectOperatii, Iif(This.Value = 1, 'imobf_voperatii_mf', 'imobf_voperatii_mf_tot'), Iif(This.Value = 1, 'imobf_voperatii_mf_tot', 'imobf_voperatii_mf'), 1, 1, 1)
		poOperatii.ca_baza1.SelectCmd = m.lcSelectOperatii
		
		lcSelectRate = Strtran(m.lcSelectRate, Iif(This.Value = 1, 'imob_vcalcul_rate', 'imob_vcalcul_rate_tot'), Iif(This.Value = 1, 'imob_vcalcul_rate_tot', 'imob_vcalcul_rate'), 1, 1, 1)
		lcSelectRate = Strtran(m.lcSelectRate, Iif(This.Value = 1, 'imobf_vcalcul_rate', 'imobf_vcalcul_rate_tot'), Iif(This.Value = 1, 'imobf_vcalcul_rate_tot', 'imobf_vcalcul_rate'), 1,1,1)
		poRate.ca_baza1.SelectCmd = m.lcSelectRate
		
		thisform.actualizeaza_grid1()
		thisform.actualizeaza_grid2()
		
		GO TOP IN crsOperatii
		thisform.grid1.Refresh()
		thisform.grid2.Refresh()
		
	ENDPROC

	PROCEDURE Grid1.AfterRowColChange
		LPARAMETERS nColIndex
		pnIdOperatie = id_operatie_mf
		thisform.actualizeaza_grid2
	ENDPROC

ENDDEFINE

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

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

	*<PropValue>
		DoCreate = .T.
		Height = 160
		Name = "frm_optiune"
		Width = 266
		_shape1.Name = "_shape1"
		_shape2.Height = 29
		_shape2.Left = 203
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 65
		Lb_titlu_alb_b121.Caption = "Titlu"
		Lb_titlu_alb_b121.FontBold = .T.
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Left = 237
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
	*</PropValue>

	ADD OBJECT 'But_renunt1' AS but_renunt WITH ;
		Left = 206, ;
		Name = "But_renunt1", ;
		Top = 1
		*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Lb_intrebare' AS lb_simplu WITH ;
		Caption = "Intrebare", ;
		Left = 11, ;
		Name = "Lb_intrebare", ;
		Top = 39
		*< END OBJECT: ClassLib="..\..\comun\clase\lb.vcx" BaseClass="label" />

	ADD OBJECT 'ogOptiuni' AS _optiongrup WITH ;
		AutoSize = .F., ;
		ButtonCount = 4, ;
		Height = 84, ;
		Left = 22, ;
		Name = "ogOptiuni", ;
		Top = 60, ;
		Width = 220, ;
		Option1.AutoSize = .T., ;
		Option1.Caption = "optiune 1", ;
		Option1.Left = 5, ;
		Option1.Name = "Option1", ;
		Option1.Top = 5, ;
		Option2.AutoSize = .T., ;
		Option2.Caption = "optiune 2", ;
		Option2.Left = 5, ;
		Option2.Name = "Option2", ;
		Option2.Top = 24, ;
		Option3.AutoSize = .T., ;
		Option3.BackStyle = 0, ;
		Option3.Caption = "optiune 3", ;
		Option3.Height = 17, ;
		Option3.Left = 5, ;
		Option3.Name = "Option3", ;
		Option3.Top = 43, ;
		Option3.Width = 69, ;
		Option4.AutoSize = .T., ;
		Option4.BackStyle = 0, ;
		Option4.Caption = "optiune 4", ;
		Option4.Height = 17, ;
		Option4.Left = 5, ;
		Option4.Name = "Option4", ;
		Option4.Top = 62, ;
		Option4.Width = 69
		*< END OBJECT: ClassLib="..\..\comun\clase\_baza.vcx" BaseClass="optiongroup" />
	
	PROCEDURE Destroy
		pnOptiune = Thisform.ogOptiuni.Value
	ENDPROC

	PROCEDURE Init
		Lparameters tcTitlu,tcIntrebare,tnNrOptiuni
		Thisform.lb_titlu_alb_b121.Caption=Upper(tcTitlu)
		Thisform.lb_intrebare.Caption=tcIntrebare
		Thisform.ogOptiuni.ButtonCount=tnNrOptiuni
		DO CASE 
		CASE tnNrOptiuni=2
			thisform.ogOptiuni.Height=48
		CASE tnNrOptiuni=3
			thisform.ogOptiuni.Height=60
		ENDCASE
		Thisform.Height=Thisform.ogOptiuni.Height+Thisform.ogOptiuni.Top+15
		Thisform.ogOptiuni.Left=Round((Thisform.Width-Thisform.ogOptiuni.Width)/2,0)
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_preluare AS _frmbase OF "..\comun\clase\_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="grdPreluare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cNrAct.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cNrAct.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cDataact.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cDataact.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cExplicatia.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cExplicatia.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cValoareAct.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cValoareAct.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cValoareImob.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cValoareImob.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cPart.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cPart.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cCont.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cCont.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cIntrodus.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cIntrodus.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdPreluare.cIntrodus.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lblInfo" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: ntip
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 3
		cgridsortlist = grdPreluare
		DoCreate = .T.
		Height = 409
		Name = "frm_preluare"
		ntip = 1
		Width = 691
		WindowState = 2
		_shape1.Anchor = 10
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 708
		_shape2.Left = 638
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		Lb_titlu_alb_b121.Caption = "Documente achizite"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 661
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

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

	ADD OBJECT 'grdPreluare' AS _grdbase WITH ;
		Anchor = 15, ;
		ColumnCount = 8, ;
		DeleteMark = .F., ;
		HeaderHeight = 19, ;
		Height = 336, ;
		HighlightStyle = 2, ;
		Left = 9, ;
		Name = "grdPreluare", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "crsPreluare", ;
		RowHeight = 19, ;
		Top = 41, ;
		Width = 674, ;
		Column1.ControlSource = "nract", ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 10, ;
		Column1.Name = "cNrAct", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 90, ;
		Column2.ControlSource = "dataact", ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 10, ;
		Column2.Name = "cDataact", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 82, ;
		Column3.ColumnOrder = 7, ;
		Column3.ControlSource = "explicatia", ;
		Column3.FontName = "Arial", ;
		Column3.FontSize = 10, ;
		Column3.Name = "cExplicatia", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 149, ;
		Column4.ColumnOrder = 5, ;
		Column4.ControlSource = "suma_act", ;
		Column4.FontName = "Arial", ;
		Column4.FontSize = 10, ;
		Column4.Format = "RK", ;
		Column4.InputMask = (GET_MASK(16,gnPA)), ;
		Column4.Name = "cValoareAct", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 122, ;
		Column5.ColumnOrder = 6, ;
		Column5.ControlSource = "suma_imob", ;
		Column5.FontName = "Arial", ;
		Column5.FontSize = 10, ;
		Column5.InputMask = (GET_MASK(16,gnPA)), ;
		Column5.Name = "cValoareImob", ;
		Column5.ReadOnly = .T., ;
		Column5.Width = 110, ;
		Column6.ColumnOrder = 3, ;
		Column6.ControlSource = "part", ;
		Column6.FontName = "Arial", ;
		Column6.FontSize = 10, ;
		Column6.Name = "cPart", ;
		Column6.ReadOnly = .T., ;
		Column6.Width = 134, ;
		Column7.ColumnOrder = 4, ;
		Column7.ControlSource = "cont", ;
		Column7.FontName = "Arial", ;
		Column7.FontSize = 10, ;
		Column7.Name = "cCont", ;
		Column7.ReadOnly = .T., ;
		Column7.Width = 58, ;
		Column8.ControlSource = "introdus", ;
		Column8.CurrentControl = "Check1", ;
		Column8.FontName = "Arial", ;
		Column8.FontSize = 10, ;
		Column8.Name = "cIntrodus", ;
		Column8.ReadOnly = .T., ;
		Column8.Sparse = .F., ;
		Column8.Width = 49
		*< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" />

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

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

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

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

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

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

	ADD OBJECT 'grdPreluare.cIntrodus.Check1' AS checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Height = 17, ;
		Left = 8, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 102, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'grdPreluare.cIntrodus.Header1' AS header WITH ;
		Caption = "Adaugat", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

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

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

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

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

	ADD OBJECT 'grdPreluare.cValoareAct.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Valoare contabilitate", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'grdPreluare.cValoareImob.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Valoare imobilizari", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1", ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'lblInfo' AS _label WITH ;
		Anchor = 14, ;
		AutoSize = .F., ;
		BackStyle = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 11, ;
		Name = "lblInfo", ;
		Top = 384, ;
		Width = 632
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="label" />
	
	PROCEDURE do_adauga
		Local loMf, lnButon
		lnButon = 2
		
		Select crsPreluare
		If nract <> 0
			Scatter Name loMf
		Else
			Scatter Name loMf Blank
		Endif
		
		AddProperty(loMf, 'valoare', crsPreluare.suma_act)
		
		Do Case
			Case crsPreluare.tip = 1
				lnButon = introducere_imob_corp(loMf) && in oproceduri_imob.prg
			Case crsPreluare.tip = 2
				lnButon = introducere_imob_necorp(loMf) && in oproceduri_imob.prg
			Case crsPreluare.tip = 3
				lnButon = introducere_imob_in_curs(loMf) && in oproceduri_imob.prg
		Endcase
		 SET STEP ON 
		If lnButon = 1
			Replace introdus With .T. In crsPreluare
		Endif
		This.grdPreluare.SetFocus()
		
	ENDPROC

	PROCEDURE Init
		DoDefault()
		&& SUMA_IMOB = 0 : ROSU; SUMA_IMOB = SUMA_ACT : NEGRU; SUMA_IMOB <> SUMA_ACT : ALBASTRU
		&& IMOBILIZARI ADAUGATE DIN FEREASTRA : GRI
		
		this.grdPreluare.SetAll("DynamicForeColor","IIF(crsPreluare.suma_imob == 0, RGB(166,0,0),IIF(crsPreluare.suma_act == crsPreluare.suma_imob, RGB(0,0,0), RGB(0,89,168)))","Column")
		this.grdPreluare.SetAll("DynamicBackColor","IIF(crsPreluare.introdus, RGB(64,64,64), RGB(255,255,255)))","Column")
		this.grdPreluare.SetFocus()
		THIS.WindowState = 2
	ENDPROC

	PROCEDURE grdPreluare.AfterRowColChange
		LPARAMETERS nColIndex
		
		&& SUMA_IMOB = 0 : ROSU; SUMA_IMOB = SUMA_ACT : NEGRU; SUMA_IMOB <> SUMA_ACT : ALBASTRU
		&& IMOBILIZARI ADAUGATE DIN FEREASTRA : GRI
		
		thisform.lblInfo.ForeColor = IIF(crsPreluare.suma_imob == 0, RGB(166,0,0),IIF(crsPreluare.suma_act == crsPreluare.suma_imob, RGB(0,0,0), RGB(0,89,168)))
		thisform.lblInfo.BackColor = IIF(crsPreluare.introdus, RGB(64,64,64), RGB(255,255,255))
		thisform.lblInfo.Caption = IIF(crsPreluare.suma_imob == 0 and !crsPreluare.introdus, 'Imobilizarea nu este introdusa!',IIF(crsPreluare.suma_act == crsPreluare.suma_imob or crsPreluare.introdus, 'Imobilizare este introdusa!', 'Imobilizarea este introdus partial!'))
	ENDPROC

ENDDEFINE

DEFINE CLASS new_operatii_rate AS frm_termin_renunt OF "..\comun\clase\_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="Shape3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_valoare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_uzura" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_val_ramasa" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dns_ramas" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_dataop" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_rata" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_cota_an" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_ultima_rata" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_data_ultima_rata" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_tip_amortizare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_amort_prec" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_data_rata" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_expl_op" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_val_reziduala" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_val_amortizabila" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: recalculare
		*p: leultimaoperatie		&& Daca este ultima operatie se pot salva modificarile
		*p: nid
		*p: nid_tip_operatie
		*p: nvaloareamortizabila
		*p: ooperprec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 588
		leultimaoperatie = .F.
		Name = "new_operatii_rate"
		nid = .F.
		nid_tip_operatie = 0
		nvaloareamortizabila = 0
		ooperprec = 
		Width = 356
		_memberdata = <VFPData>
			<memberdata name="leultimaoperatie" display="lEultimaOperatie"/>
			<memberdata name="recalculare" display="Recalculare"/>
			<memberdata name="nvaloareamortizabila" display="nValoareAmortizabila"/>
		</VFPData>
		_shape1.Name = "_shape1"
		_shape2.Height = 29
		_shape2.Left = 292
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 64
		Lb_titlu_alb_b121.Caption = "-"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 20
		BUT_TERMIN1.Left = 324
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 18
		BUT_TERMIN1.Top = 1
		Gridsort1.Left = 252
		Gridsort1.Name = "Gridsort1"
		Gridsort1.Top = 12
		BUT_RENUNT1.Left = 295
		BUT_RENUNT1.Name = "BUT_RENUNT1"
		BUT_RENUNT1.TabIndex = 19
		BUT_RENUNT1.Top = 1
	*</PropValue>

	ADD OBJECT 'Cb_tip_amortizare' AS cb_tx_simplu WITH ;
		Left = 23, ;
		Name = "Cb_tip_amortizare", ;
		TabIndex = 3, ;
		Top = 110, ;
		Width = 312, ;
		_CBBASE1.ColumnCount = 2, ;
		_CBBASE1.ColumnLines = .F., ;
		_CBBASE1.ColumnWidths = "250,0", ;
		_CBBASE1.Comment = "", ;
		_CBBASE1.ControlSource = "poOper.denumire", ;
		_CBBASE1.Height = 23, ;
		_CBBASE1.Left = 85, ;
		_CBBASE1.Name = "_CBBASE1", ;
		_CBBASE1.RowSource = "v_tipuri_operatie.denumire,id_tip_operatie", ;
		_CBBASE1.RowSourceType = 2, ;
		_CBBASE1.Top = 3, ;
		_CBBASE1.Width = 223, ;
		_LBBASE1.Caption = "Tip operatie", ;
		_LBBASE1.Name = "_LBBASE1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_amort_prec' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 23, ;
		Name = "Clb_amort_prec", ;
		TabIndex = 17, ;
		Top = 541, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poRata.amortizare_prec_rol", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 168, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Amortizare precedenta = Valoare inventar - Valoare de calcul", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 140, ;
		Lb_simplu1.Caption = "Amortizare precedenta", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_cota_an' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 23, ;
		Name = "Clb_cota_an", ;
		TabIndex = 13, ;
		Top = 429, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poRata.cota_An", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 168, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Cota an = 12/durata ramasa * 100", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 140, ;
		Lb_simplu1.Caption = "Cota an (%)", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_data_rata' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 23, ;
		Name = "Clb_data_rata", ;
		TabIndex = 5, ;
		Top = 166, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 1, ;
		Text_simplu1.ControlSource = "pdDataRata", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 168, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = {}, ;
		Text_simplu1.Width = 140, ;
		Lb_simplu1.Caption = "Data activare rata", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_data_ultima_rata' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 23, ;
		Name = "Clb_data_ultima_rata", ;
		TabIndex = 15, ;
		Top = 485, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 1, ;
		Text_simplu1.ControlSource = "poRata.data_ultima_rata", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 168, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = {}, ;
		Text_simplu1.Width = 140, ;
		Lb_simplu1.Caption = "Data ultima rata", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_dataop' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 23, ;
		Name = "Clb_dataop", ;
		TabIndex = 4, ;
		Top = 138, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 1, ;
		Text_simplu1.ControlSource = "poOper.data_operatie", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 168, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.TabIndex = 1, ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = {}, ;
		Text_simplu1.Width = 140, ;
		Lb_simplu1.Caption = "Data operatie", ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		Lb_simplu1.TabIndex = 2
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_dns_ramas' AS clb_tx_simplu WITH ;
		Left = 23, ;
		Name = "Clb_dns_ramas", ;
		TabIndex = 10, ;
		Top = 306, ;
		Width = 312, ;
		ZOrderSet = 31, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poOper.dns_ramas", ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = "9 999", ;
		Text_simplu1.Left = 239, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 69, ;
		Lb_simplu1.Caption = "Durata de calcul ramasa (luni)", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_expl_op' AS clb_tx_simplu WITH ;
		Height = 36, ;
		Left = 23, ;
		Name = "Clb_expl_op", ;
		TabIndex = 11, ;
		Top = 334, ;
		Width = 312, ;
		Text_simplu1.ControlSource = "poOper.explicatia", ;
		Text_simplu1.Format = "K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 84, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 7, ;
		Text_simplu1.Width = 224, ;
		Lb_simplu1.Caption = "Descriere operatie", ;
		Lb_simplu1.Left = 8, ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		Lb_simplu1.Top = 4, ;
		Lb_simplu1.WordWrap = .T.
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_rata' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 23, ;
		Name = "Clb_rata", ;
		TabIndex = 12, ;
		Top = 401, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poRata.rata_rol", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 168, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ToolTipText = "Rata = Valoarea amortizabila * cota an / 12", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 140, ;
		Lb_simplu1.Caption = "Rata", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 24, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 2, ;
		Top = 60, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 1, ;
		Text_simplu1.ControlSource = "poOper.datadoc", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 168, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.TabIndex = 1, ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = {}, ;
		Text_simplu1.Width = 140, ;
		Lb_simplu1.Caption = "Data document", ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		Lb_simplu1.TabIndex = 2
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 24, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 1, ;
		Top = 32, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 1, ;
		Text_simplu1.ControlSource = "poOper.nrdoc", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 168, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.TabIndex = 1, ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 140, ;
		Lb_simplu1.Caption = "Nr. document", ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		Lb_simplu1.TabIndex = 2
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_ultima_rata' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 23, ;
		Name = "Clb_ultima_rata", ;
		TabIndex = 14, ;
		Top = 457, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poRata.ultima_rata_rol", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 168, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Valoarea ultimei rate = Valoare amortizabila - rata * (durata de calcul ramasa - 1)", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 140, ;
		Lb_simplu1.Caption = "Ultima rata", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_uzura' AS clb_tx_simplu WITH ;
		Left = 23, ;
		Name = "Clb_uzura", ;
		TabIndex = 16, ;
		Top = 513, ;
		Width = 312, ;
		ZOrderSet = 29, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poRata.uzura_prec", ;
		Text_simplu1.Format = "!KZ", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = "9 999", ;
		Text_simplu1.Left = 168, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ReadOnly = .T., ;
		Text_simplu1.ToolTipText = "Uzura precedenta (luni) = DNS (luni) - durata ramasa (luni)", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 140, ;
		Lb_simplu1.Caption = "Uzura precedenta (luni)", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_val_amortizabila' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 23, ;
		Name = "clb_val_amortizabila", ;
		TabIndex = 9, ;
		Top = 278, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		TEXT_SIMPLU1.Alignment = 3, ;
		TEXT_SIMPLU1.ControlSource = "Thisform.nValoareAmortizabila", ;
		TEXT_SIMPLU1.Format = "!K", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.InputMask = (get_mask(14,gnPa)), ;
		TEXT_SIMPLU1.Left = 168, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.ReadOnly = .T., ;
		TEXT_SIMPLU1.ToolTipText = "Valoare amortizabila = Valoarea de calcul ramasa - Valoarea reziduala", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Value = 0, ;
		TEXT_SIMPLU1.Width = 140, ;
		LB_SIMPLU1.Caption = "Valoare amortizabila", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_val_ramasa' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 23, ;
		Name = "Clb_val_ramasa", ;
		TabIndex = 7, ;
		Top = 222, ;
		Width = 312, ;
		ZOrderSet = 30, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poOper.valoare_ramasa_rol", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 168, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.ToolTipText = "Inclusiv valoarea reziduala.", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 140, ;
		Lb_simplu1.AutoSize = .T., ;
		Lb_simplu1.Caption = "Valoare de calcul ramasa", ;
		Lb_simplu1.Height = 18, ;
		Lb_simplu1.Left = 8, ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		Lb_simplu1.Top = 6, ;
		Lb_simplu1.Width = 146, ;
		Lb_simplu1.WordWrap = .T.
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_val_reziduala' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 23, ;
		Name = "clb_val_reziduala", ;
		TabIndex = 8, ;
		Top = 250, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poOper.valoare_reziduala", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 168, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 140, ;
		Lb_simplu1.Caption = "Valoare reziduala", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_valoare' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 23, ;
		Name = "Clb_valoare", ;
		TabIndex = 6, ;
		Top = 194, ;
		Width = 312, ;
		ZOrderSet = 28, ;
		Text_simplu1.Alignment = 3, ;
		Text_simplu1.ControlSource = "poOper.valoare_rol", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = (get_mask(14,gnPa)), ;
		Text_simplu1.Left = 168, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Value = 0, ;
		Text_simplu1.Width = 140, ;
		Lb_simplu1.Caption = "Valoare de inventar", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Label3' AS label WITH ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		Caption = "Operatie", ;
		Height = 17, ;
		Left = 23, ;
		Name = "Label3", ;
		TabIndex = 21, ;
		Top = 89, ;
		Width = 49, ;
		ZOrderSet = 32
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label4' AS label WITH ;
		AutoSize = .T., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		Caption = "Rata", ;
		Height = 17, ;
		Left = 23, ;
		Name = "Label4", ;
		TabIndex = 22, ;
		Top = 383, ;
		Width = 28, ;
		ZOrderSet = 32
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Shape3' AS shape WITH ;
		BackStyle = 0, ;
		Curvature = 10, ;
		Height = 278, ;
		Left = 8, ;
		Name = "Shape3", ;
		Top = 98, ;
		Width = 338, ;
		ZOrderSet = 0
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape4' AS shape WITH ;
		BackStyle = 0, ;
		Curvature = 10, ;
		Height = 188, ;
		Left = 8, ;
		Name = "Shape4", ;
		Top = 392, ;
		Width = 338, ;
		ZOrderSet = 0
		*< END OBJECT: BaseClass="shape" />
	
	PROCEDURE inainte_de_do_termin
		Local llEUltimaOperatie, llLunaInchisa, llRet
		llRet = .T.
		
		* Recalculare automata, in caz ca nu s-a trecut prin campurile in care se facea recalcularea
		poRata.amortizare_prec_rol = poOper.valoare_rol - poOper.valoare_ramasa_rol
		
		
		llLunaInchisa = is_luna_blocata(m.gcS, m.gnId_Prg_Owner, Year(poOper.data_operatie), Month(poOper.data_operatie))
		
		Do Case
			Case  !This.lEultimaOperatie
				llRet = .F.
				* doar pentru precautie. nu ar trebui sa fie vizibil butonul de terminare daca nu modific ultima operatie
			CASE m.llLunaInchisa
				aMESSAGEBOX("Nu puteti inregistra operatia! Luna " + Padl(Month(poOper.data_operatie), 2, '0') + "/" + Alltrim(Str(Year(poOper.data_operatie))) + " este închisã!", 0 + 48, "Luna închisã")
				llRet = .F.
			Case  Empty(poOper.id_tip_operatie)
				aMESSAGEBOX('Completati Fel Miscare')
				llRet = .F.
		Endcase
		
		Return llRet
		
	ENDPROC

	PROCEDURE Init
		LPARAMETERS tlEUltimaOperatie
		
		DODEFAULT()
		
		IF PCOUNT() = 1
			this.lEultimaOperatie = tlEultimaOperatie
		ELSE
			this.lEultimaOperatie = .F.
		ENDIF 	
		
		this.but_terMIN1.Visible = this.lEultimaOperatie
		
		This.nValoareAmortizabila = poOper.valoare_ramasa_rol - poOper.valoare_reziduala
	ENDPROC

	PROCEDURE recalculare
		Lparameters tcVariabila
		* 20.01.2021
		* marius.mutu
		* rata, ultima_rata. se tine cont de valoarea reziduala 
		
		Local lcVariabila, lnAnRon, lnLunaRon, lnPrecizie, lnValoareAmortizabila
		lcVariabila = IIF(!EMPTY(m.tcVariabila), Lower(m.tcVariabila), 'operatie')
		
		lnValoareAmortizabila = poOper.valoare_ramasa_rol - poOper.valoare_reziduala
		This.nValoareAmortizabila = m.lnValoareAmortizabila
		
		Do Case
			Case m.lcVariabila = 'operatie'
				poRata.amortizare_prec_rol = poOper.valoare_rol - poOper.valoare_ramasa_rol
		
		
				poRata.uzura_prec = poMf.dns_luni - poOper.dns_ramas
				poRata.cota_an = IIF(EMPTY(NVL(poOper.dns_ramas,0)), 0, Round((1 / poOper.dns_ramas) * 100 * 12, 2))
				lnAnRon = Val(Substr(gcDataRon, 4, 4))
				lnLunaRon = Val(Substr(gcDataRon, 1, 2))
				lnPrecizie = Iif(poOper.data_operatie < Date(lnAnRon, lnLunaRon, 1), 0, gnPC)
				poRata.rata_rol = IIF(EMPTY(poRata.cota_an), 0, Round(m.lnValoareAmortizabila * poRata.cota_an / 12 / 100, m.lnPrecizie))
				poRata.data_ultima_rata = Gomonth(pdDataRata, poOper.dns_ramas - 1)
				poRata.an_exp = Year(poRata.data_ultima_rata)
				poRata.luna_exp = Month(poRata.data_ultima_rata)
				poRata.data_ultima_rata = Date(poRata.an_exp, poRata.luna_exp, 1) && sa fie 1 ale lunii
		
				If poOper.dns_ramas = 0 Or poOper.id_tip_operatie = 4 Or poOper.id_tip_operatie = 10
					poRata.ultima_rata_rol = 0
				Else
					*!*				  poRata.ultima_rata_rol = poRata.rata_rol + ;
					*!*				  	(m.lnValoareAmortizabila - poRata.rata_rol * (12 * poRata.an_exp + poRata.luna_exp -(12 * poRata.an + poRata.luna) + 1))
		
					poRata.ultima_rata_rol = m.lnValoareAmortizabila - poRata.rata_rol * (12 * poRata.an_exp + poRata.luna_exp - (12 * poRata.an + poRata.luna))
				Endif
				Thisform.clb_val_amortizabila.Refresh
				Thisform.clb_uzura.Refresh
				Thisform.clb_cota_an.Refresh
				Thisform.clb_rata.Refresh
				Thisform.clb_ultima_rata.Refresh
				Thisform.clb_data_ultima_rata.Refresh
				thisform.clb_amort_prec.Refresh
		
			Case m.lcVariabila = 'rata'
				If poOper.dns_ramas = 0 Or poOper.id_tip_operatie = 4 Or poOper.id_tip_operatie = 10
					poRata.ultima_rata_rol = 0
				Else
					*!*			  poRata.ultima_rata_rol = poRata.rata_rol + (m.lnValoareAmortizabila - poRata.rata_rol * (12 * poRata.an_exp + poRata.luna_exp -(12 * poRata.an + poRata.luna) + 1))
					poRata.ultima_rata_rol = m.lnValoareAmortizabila - poRata.rata_rol * (12 * poRata.an_exp + poRata.luna_exp - (12 * poRata.an + poRata.luna))
				Endif
		
				poRata.cota_an = Round(poRata.rata_rol * 100 * 12 / m.lnValoareAmortizabila, 2)
		
				Thisform.clb_ultima_rata.Refresh
				Thisform.clb_cota_an.Refresh
		Endcase
		
	ENDPROC

	PROCEDURE Cb_tip_amortizare._CBBASE1.Valid
		thisform.nid_tip_operatie = v_tipuri_operatie.id_tip_operatie
		poOper.id_tip_operatie = v_tipuri_operatie.id_tip_operatie
	ENDPROC

	PROCEDURE Clb_dataop.Text_simplu1.Valid
		*ldDataOper = this.Value 
		
		loPrec = thisform.ooperprec
		ldData_prec = NVL(TTOD(loPrec.data_operatie),DATE(1600,1,1))
		IF poOper.data_operatie < ldData_prec
			aMESSAGEBOX("Data operatiei trebuie sa fie mai mare sau egala decat data operatiei precedente!",0,"Atentie")
			RETURN 0
		ENDIF 
		
		pdDataRata = IIF(EMPTY(m.pdDataRata), GOMONTH(poOper.data_operatie,1), m.pdDataRata)
		poRata.an = YEAR(pdDataRata)
		poRata.luna = MONTH(pdDataRata)
		pdDataRata = DATE(poRata.an, poRata.luna, 1) && 1 ale lunii curente
		poRata.data_ultima_rata = GOMONTH(pdDataRata, poOper.dns_ramas-1)
		poRata.an_exp = YEAR(poRata.data_ultima_rata) 
		poRata.luna_exp = MONTH(poRata.data_ultima_rata)
		poRata.data_ultima_rata = DATE(poRata.an_exp,poRata.luna_exp,1)
		
		thisform.clb_data_ultima_rata.Refresh 
		thisform.clb_data_rata.Refresh 
	ENDPROC

	PROCEDURE Clb_data_rata.Text_simplu1.Valid
		IF MONTH(pdDataRata) + 12*YEAR(pddataRata) < MONTH(poOper.data_operatie) + YEAR(poOper.data_operatie)*12
			aMESSAGEBOX("Data ratei trebuie sa fie mai mare sau egala cu decat data operatiei!",0,"Atentie")
			RETURN 0
		ENDIF 
		poRata.an = YEAR(pdDataRata)
		poRata.luna = MONTH(pdDataRata)
		poRata.data_ultima_rata = GOMONTH(pdDataRata, poOper.dns_ramas-1)
		poRata.an_exp = YEAR(poRata.data_ultima_rata) 
		poRata.luna_exp = MONTH(poRata.data_ultima_rata)
		poRata.data_ultima_rata = DATE(poRata.an_exp,poRata.luna_exp,1)
		
		thisform.clb_data_ultima_rata.Refresh 
	ENDPROC

	PROCEDURE Clb_dns_ramas.Text_simplu1.Valid
		Thisform.Recalculare('operatie')
	ENDPROC

	PROCEDURE Clb_rata.Text_simplu1.Valid
		Thisform.Recalculare('rata')
	ENDPROC

	PROCEDURE Clb_valoare.Text_simplu1.Valid
		Thisform.Recalculare('operatie')
	ENDPROC

	PROCEDURE Clb_val_ramasa.Text_simplu1.Valid
		Thisform.Recalculare('operatie')
	ENDPROC

	PROCEDURE clb_val_reziduala.Text_simplu1.Valid
		Thisform.Recalculare('operatie')
	ENDPROC

ENDDEFINE
