*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="frm_sch_valoare.scx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS dataenvironment AS dataenvironment 
 	*< CLASSDATA: Baseclass="dataenvironment" Timestamp="" Scale="" Uniqueid="" ClassIcon="1" />

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

ENDDEFINE

DEFINE CLASS formtermin12 AS formtermin OF "..\..\comun\clase\baza.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="RENUNT1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Line1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label10" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text10" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label11" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text11" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label12" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label13" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label14" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text12" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label15" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: avertizare
		*p: normat2lun
		*p: uzura
		*p: valoare
		*p: valram
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		DataSession = 1
		DoCreate = .T.
		Height = 352
		Name = "FORMTERMIN12"
		normat2lun = 0
		uzura = 0
		valoare = 0
		valram = 0
		Width = 359
		SHAPE1.Height = 35
		SHAPE1.Left = 0
		SHAPE1.Name = "SHAPE1"
		SHAPE1.Top = 0
		SHAPE1.Width = 288
		TERMINAT1.COMMAND1.Name = "COMMAND1"
		TERMINAT1.IMBUTON1.Height = 27
		TERMINAT1.IMBUTON1.Name = "IMBUTON1"
		TERMINAT1.IMBUTON1.Width = 30
		TERMINAT1.Left = 323
		TERMINAT1.Name = "TERMINAT1"
		TERMINAT1.TabIndex = 8
		TERMINAT1.Top = 3
		TITLUFRUMOS1.Caption = "Reevaluare"
		TITLUFRUMOS1.Height = 32
		TITLUFRUMOS1.Left = 7
		TITLUFRUMOS1.Name = "TITLUFRUMOS1"
		TITLUFRUMOS1.TabIndex = 15
		TITLUFRUMOS1.Top = 5
		TITLUFRUMOS1.Width = 184
	*</PropValue>

	ADD OBJECT 'Label1' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Valoarea de calcul", ;
		Height = 17, ;
		Left = 24, ;
		Name = "Label1", ;
		TabIndex = 27, ;
		Top = 76, ;
		Width = 103
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label10' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "luni", ;
		Height = 17, ;
		Left = 328, ;
		Name = "Label10", ;
		TabIndex = 22, ;
		Top = 265, ;
		Visible = .T., ;
		Width = 22
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label11' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "DNS de calcul actual", ;
		Height = 17, ;
		Left = 24, ;
		Name = "Label11", ;
		TabIndex = 23, ;
		Top = 195, ;
		Visible = .T., ;
		Width = 116
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label12' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "ani=", ;
		Height = 17, ;
		Left = 256, ;
		Name = "Label12", ;
		TabIndex = 19, ;
		Top = 193, ;
		Visible = .T., ;
		Width = 26
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label13' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "luni", ;
		Height = 17, ;
		Left = 328, ;
		Name = "Label13", ;
		TabIndex = 16, ;
		Top = 193, ;
		Visible = .T., ;
		Width = 22
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label14' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Uzura pana la data reevaluarii", ;
		Height = 17, ;
		Left = 24, ;
		Name = "Label14", ;
		TabIndex = 24, ;
		Top = 220, ;
		Visible = .T., ;
		Width = 165
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label15' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "luni", ;
		Height = 17, ;
		Left = 328, ;
		Name = "Label15", ;
		TabIndex = 20, ;
		Top = 218, ;
		Visible = .T., ;
		Width = 22
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label2' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Valoarea adaugata (majorare)", ;
		Height = 17, ;
		Left = 24, ;
		Name = "Label2", ;
		TabIndex = 29, ;
		Top = 166, ;
		Width = 167
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label3' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Noua valuare de calcul", ;
		Height = 17, ;
		Left = 24, ;
		Name = "Label3", ;
		TabIndex = 30, ;
		Top = 316, ;
		Visible = .T., ;
		Width = 127
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label4' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Noua valoare de intrare", ;
		Height = 17, ;
		Left = 24, ;
		Name = "Label4", ;
		TabIndex = 18, ;
		Top = 293, ;
		Visible = .T., ;
		Width = 130
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label5' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Data reevaluare", ;
		Height = 17, ;
		Left = 24, ;
		Name = "Label5", ;
		TabIndex = 28, ;
		Top = 103, ;
		Width = 89
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label6' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Valoarea de intrare veche", ;
		Height = 17, ;
		Left = 24, ;
		Name = "Label6", ;
		TabIndex = 26, ;
		Top = 48, ;
		Width = 141
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label7' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Valoarea ramasa de amortizat la data reevaluarii", ;
		Height = 32, ;
		Left = 24, ;
		Name = "Label7", ;
		TabIndex = 25, ;
		Top = 126, ;
		Width = 180, ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label8' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Noul DNS de calcul", ;
		Height = 17, ;
		Left = 24, ;
		Name = "Label8", ;
		TabIndex = 17, ;
		Top = 267, ;
		Visible = .T., ;
		Width = 109
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label9' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "ani=", ;
		Height = 17, ;
		Left = 256, ;
		Name = "Label9", ;
		TabIndex = 21, ;
		Top = 265, ;
		Visible = .T., ;
		Width = 26
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Line1' AS line WITH ;
		Height = 0, ;
		Left = 20, ;
		Name = "Line1", ;
		Top = 248, ;
		Width = 328
		*< END OBJECT: BaseClass="line" />

	ADD OBJECT 'RENUNT1' AS renunt WITH ;
		Left = 292, ;
		Name = "RENUNT1", ;
		TabIndex = 9, ;
		Top = 3, ;
		IMBUTON1.Height = 27, ;
		IMBUTON1.Name = "IMBUTON1", ;
		IMBUTON1.Width = 30, ;
		COMMAND1.Name = "COMMAND1"
		*< END OBJECT: ClassLib="..\..\comun\clase\baza.vcx" BaseClass="container" />

	ADD OBJECT 'Text1' AS textbox WITH ;
		ControlSource = "omf.valramasa", ;
		Format = "", ;
		Height = 23, ;
		InputMask = "99 999 999 999 999", ;
		Left = 215, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 13, ;
		Top = 73, ;
		Width = 117
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text10' AS textbox WITH ;
		ControlSource = "omf.normat2", ;
		Height = 23, ;
		InputMask = "999.99", ;
		Left = 215, ;
		Name = "Text10", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 12, ;
		Top = 190, ;
		Visible = .T., ;
		Width = 40
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text11' AS textbox WITH ;
		ControlSource = "omf.normat2lun", ;
		Height = 23, ;
		InputMask = "99999", ;
		Left = 285, ;
		Name = "Text11", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 10, ;
		Top = 190, ;
		Visible = .T., ;
		Width = 40
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text12' AS textbox WITH ;
		ControlSource = "thisform.uzura", ;
		Height = 23, ;
		InputMask = "99999", ;
		Left = 285, ;
		Name = "Text12", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 11, ;
		Top = 215, ;
		Visible = .T., ;
		Width = 40
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text2' AS textbox WITH ;
		ControlSource = "m.valin", ;
		Height = 23, ;
		InputMask = "99 999 999 999 999", ;
		Left = 215, ;
		Name = "Text2", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 6, ;
		Top = 288, ;
		Visible = .T., ;
		Width = 117
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text3' AS textbox WITH ;
		ControlSource = "thisform.valoare", ;
		Format = "k", ;
		Height = 23, ;
		InputMask = "99 999 999 999 999", ;
		Left = 215, ;
		Name = "Text3", ;
		SpecialEffect = 1, ;
		TabIndex = 3, ;
		Top = 163, ;
		Width = 117
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text4' AS textbox WITH ;
		ControlSource = "m.valramasa", ;
		Format = "", ;
		Height = 23, ;
		InputMask = "99 999 999 999 999", ;
		Left = 215, ;
		Name = "Text4", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 7, ;
		Top = 316, ;
		Visible = .T., ;
		Width = 117
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text5' AS textbox WITH ;
		ControlSource = "m.dataeval", ;
		Format = "", ;
		Height = 23, ;
		InputMask = "99 999 999 999 999", ;
		Left = 215, ;
		Name = "Text5", ;
		ReadOnly = .F., ;
		SpecialEffect = 1, ;
		TabIndex = 1, ;
		Top = 100, ;
		Width = 117
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text6' AS textbox WITH ;
		ControlSource = "omf.valin", ;
		Format = "", ;
		Height = 23, ;
		InputMask = "99 999 999 999 999", ;
		Left = 215, ;
		Name = "Text6", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 14, ;
		Top = 45, ;
		Width = 117
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text7' AS textbox WITH ;
		ControlSource = "thisform.valram", ;
		Format = "", ;
		Height = 23, ;
		InputMask = "99 999 999 999 999", ;
		Left = 215, ;
		Name = "Text7", ;
		ReadOnly = .F., ;
		SpecialEffect = 1, ;
		TabIndex = 2, ;
		Top = 131, ;
		Width = 117
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text8' AS textbox WITH ;
		ControlSource = "m.normat2", ;
		Height = 23, ;
		InputMask = "999.99", ;
		Left = 215, ;
		Name = "Text8", ;
		ReadOnly = .F., ;
		SpecialEffect = 1, ;
		TabIndex = 4, ;
		Top = 262, ;
		Visible = .T., ;
		Width = 40
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text9' AS textbox WITH ;
		ControlSource = "m.normat2lun", ;
		Height = 23, ;
		InputMask = "99999", ;
		Left = 285, ;
		Name = "Text9", ;
		ReadOnly = .F., ;
		SpecialEffect = 1, ;
		TabIndex = 5, ;
		Top = 262, ;
		Visible = .T., ;
		Width = 40
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE avertizare
		otext=CREATEOBJECT('textr')
		otext.label2.caption='Noua valoare de calcul este '+ALLTRIM(STR(m.valramasa))+' !'
		otext.label3.caption='Noul DNS calculat este de '+ALLTRIM(STR(ROUND(m.normat2,0)))+' ani !'
		otext.show(1)
		
		IF buton=2
			RETURN
		ELSE 
			thisform.Release 
		ENDIF 
		
		
	ENDPROC

	PROCEDURE Load
		thisform.valram=omf.valin-omf.amortprec-omf.valrez
		thisform.normat2lun=m.normat2lun
		*thisform.Height=thisform.line1.Top 
		
		
	ENDPROC

	PROCEDURE TERMINAT1.COMMAND1.Click
		thisform.avertizare
	ENDPROC

	PROCEDURE Text3.Valid
		m.valramasa=THISFORM.VALRAM + thisform.valoare
		m.valin=omf.valin+thisform.valoare
		*m.valramasa= m.valin - omf.amortprec - omf.valrez
		
		
		*!*	thisform.label3.Visible=.t.
		*!*	thisform.label4.Visible=.t.
		*!*	thisform.text2.Visible=.t.
		*!*	thisform.text4.Visible=.t.
		
		thisform.Height=thisform.text4.Top+30
		thisform.text2.refresh
		thisform.text4.refresh
		
		
	ENDPROC

	PROCEDURE Text5.Valid
		IF !EMPTY(omf.dataeval)
			LnUzura=(YEAR(m.dataeval)*12+MONTH(m.dataeval))-(YEAR(omf.dataeval)*12+MONTH(omf.dataeval))
			m.normat2lun= thisform.normat2lun-LnUzura
			m.normat2=ROUND(m.normat2lun/12,2)
		ENDIF 
		thisform.text8.refresh
		thisform.text9.refresh
		thisform.text12.refresh
	ENDPROC

ENDDEFINE
