*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="frm_schimb_dns_o.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="Shape3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label11" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label25" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="t21" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="RENUNT1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txtNorma_min" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txtNorma_max" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label10" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label14" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label12" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txtDataEval" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txtDR" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txtUzuraPrec" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txtDRani" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: ddataeval
		*p: ndns
		*p: ndnsani
		*p: ndr
		*p: ndrani
		*p: nlim_max
		*p: nlim_min
		*p: nuzuraprec
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 3
		ddataeval = 01/01/2005
		DoCreate = .T.
		Height = 292
		Name = "FORMTERMIN12"
		ndns = 0
		ndnsani = 0.00
		ndr = 0
		ndrani = 0.00
		nlim_max = 0
		nlim_min = 0
		nuzuraprec = 0
		Width = 414
		SHAPE1.Height = 35
		SHAPE1.Left = 0
		SHAPE1.Name = "SHAPE1"
		SHAPE1.Top = 0
		SHAPE1.Width = 351
		SHAPE1.ZOrderSet = 2
		TERMINAT1.COMMAND1.Name = "COMMAND1"
		TERMINAT1.IMBUTON1.Height = 27
		TERMINAT1.IMBUTON1.Name = "IMBUTON1"
		TERMINAT1.IMBUTON1.Width = 30
		TERMINAT1.Left = 382
		TERMINAT1.Name = "TERMINAT1"
		TERMINAT1.TabIndex = 11
		TERMINAT1.Top = 3
		TERMINAT1.ZOrderSet = 3
		TITLUFRUMOS1.Caption = "Schimbare DNS de calcul"
		TITLUFRUMOS1.Height = 30
		TITLUFRUMOS1.Left = 7
		TITLUFRUMOS1.Name = "TITLUFRUMOS1"
		TITLUFRUMOS1.TabIndex = 15
		TITLUFRUMOS1.Top = 6
		TITLUFRUMOS1.Width = 332
		TITLUFRUMOS1.ZOrderSet = 4
	*</PropValue>

	ADD OBJECT 'Label1' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Durata normala de serviciu (DNS de calcul)", ;
		FontBold = .F., ;
		FontItalic = .F., ;
		FontName = "Arial Narrow", ;
		FontShadow = .F., ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Height = 18, ;
		Left = 8, ;
		Name = "Label1", ;
		TabIndex = 16, ;
		Top = 75, ;
		Width = 207, ;
		ZOrderSet = 12
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label10' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Limitele DNS:", ;
		FontBold = .F., ;
		FontItalic = .F., ;
		FontName = "Arial Narrow", ;
		FontShadow = .F., ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Height = 18, ;
		Left = 151, ;
		Name = "Label10", ;
		TabIndex = 17, ;
		Top = 134, ;
		Width = 65, ;
		ZOrderSet = 8
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label11' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Durata normala de serviciu schimbata (DNS)", ;
		FontBold = .F., ;
		FontItalic = .F., ;
		FontName = "Arial Narrow", ;
		FontShadow = .F., ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Height = 18, ;
		Left = 8, ;
		Name = "Label11", ;
		TabIndex = 17, ;
		Top = 159, ;
		Width = 212, ;
		ZOrderSet = 8
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label12' AS label WITH ;
		AutoSize = .F., ;
		BackStyle = 0, ;
		Caption = "ani =                   luni", ;
		FontBold = .T., ;
		ForeColor = 0,0,187, ;
		Height = 17, ;
		Left = 264, ;
		Name = "Label12", ;
		TabIndex = 25, ;
		Top = 214, ;
		Width = 106, ;
		ZOrderSet = 9
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label14' AS label WITH ;
		BackStyle = 0, ;
		Caption = "ani", ;
		Height = 17, ;
		Left = 300, ;
		Name = "Label14", ;
		TabIndex = 25, ;
		Top = 135, ;
		Width = 19, ;
		ZOrderSet = 9
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label2' AS label WITH ;
		AutoSize = .F., ;
		BackStyle = 0, ;
		Caption = "ani =                   luni", ;
		Height = 17, ;
		Left = 264, ;
		Name = "Label2", ;
		TabIndex = 20, ;
		Top = 76, ;
		Width = 106, ;
		ZOrderSet = 13
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label25' AS label WITH ;
		AutoSize = .F., ;
		BackStyle = 0, ;
		Caption = "ani =                   luni", ;
		Height = 17, ;
		Left = 264, ;
		Name = "Label25", ;
		TabIndex = 25, ;
		Top = 160, ;
		Width = 106, ;
		ZOrderSet = 9
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label3' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Cod vechi", ;
		FontBold = .F., ;
		FontName = "Arial", ;
		FontShadow = .F., ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Height = 18, ;
		Left = 8, ;
		Name = "Label3", ;
		TabIndex = 19, ;
		Top = 50, ;
		Width = 58, ;
		ZOrderSet = 15
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label4' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Durata ramasa la ianuarie 2005", ;
		FontBold = .T., ;
		ForeColor = 0,0,187, ;
		Height = 17, ;
		Left = 8, ;
		Name = "Label4", ;
		TabIndex = 23, ;
		Top = 214, ;
		Width = 180
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label5' AS label WITH ;
		AutoSize = .T., ;
		BackColor = 0,0,187, ;
		BackStyle = 0, ;
		Caption = "Data schimbarii duratei ramase", ;
		Height = 17, ;
		Left = 8, ;
		Name = "Label5", ;
		TabIndex = 21, ;
		Top = 189, ;
		Width = 176
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label6' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Uzura precedenta", ;
		Height = 17, ;
		Left = 8, ;
		Name = "Label6", ;
		TabIndex = 22, ;
		Top = 239, ;
		Width = 99
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label7' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Amortizarea precedenta", ;
		Height = 17, ;
		Left = 8, ;
		Name = "Label7", ;
		TabIndex = 24, ;
		Top = 264, ;
		Width = 132
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label8' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "-", ;
		Height = 17, ;
		Left = 257, ;
		Name = "Label8", ;
		Top = 135, ;
		Width = 6
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label9' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Cod nou", ;
		FontBold = .F., ;
		FontName = "Arial", ;
		FontShadow = .F., ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Height = 18, ;
		Left = 8, ;
		Name = "Label9", ;
		TabIndex = 18, ;
		Top = 111, ;
		Width = 50, ;
		ZOrderSet = 6
		*< END OBJECT: BaseClass="label" />

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

	ADD OBJECT 'Shape2' AS shape WITH ;
		BackStyle = 0, ;
		BorderColor = 128,128,128, ;
		Height = 61, ;
		Left = 5, ;
		Name = "Shape2", ;
		Top = 41, ;
		Width = 405, ;
		ZOrderSet = 1
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape3' AS shape WITH ;
		BackStyle = 0, ;
		BorderColor = 128,128,128, ;
		Height = 76, ;
		Left = 5, ;
		Name = "Shape3", ;
		Top = 105, ;
		Width = 405, ;
		ZOrderSet = 0
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 't21' AS textbox WITH ;
		Alignment = 3, ;
		ControlSource = "thisform.nDNS", ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		Format = "rk", ;
		Height = 22, ;
		InputMask = "9999", ;
		Left = 300, ;
		Name = "t21", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 6, ;
		Top = 155, ;
		Width = 39, ;
		ZOrderSet = 10
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text1' AS textbox WITH ;
		Alignment = 3, ;
		ControlSource = "omf.normat2", ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		Format = "k", ;
		Height = 22, ;
		InputMask = "999.999", ;
		Left = 222, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SpecialEffect = 2, ;
		TabIndex = 2, ;
		TabStop = .F., ;
		Top = 73, ;
		Width = 37, ;
		ZOrderSet = 11
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text2' AS textbox WITH ;
		Alignment = 3, ;
		ControlSource = "omf.normat2lun", ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		Format = "k", ;
		Height = 22, ;
		Left = 300, ;
		Name = "Text2", ;
		ReadOnly = .T., ;
		SpecialEffect = 2, ;
		TabIndex = 3, ;
		TabStop = .F., ;
		Top = 73, ;
		Width = 36, ;
		ZOrderSet = 14
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text3' AS textbox WITH ;
		ControlSource = "omf.codmf", ;
		FontName = "Arial Narrow", ;
		Height = 22, ;
		Left = 222, ;
		Name = "Text3", ;
		ReadOnly = .T., ;
		SpecialEffect = 2, ;
		TabIndex = 1, ;
		Top = 48, ;
		Width = 180, ;
		ZOrderSet = 17
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text7' AS textbox WITH ;
		Alignment = 3, ;
		ControlSource = "m.codmf", ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		Format = "k", ;
		Height = 22, ;
		Left = 222, ;
		Name = "Text7", ;
		ReadOnly = .T., ;
		SpecialEffect = 2, ;
		TabIndex = 4, ;
		Top = 109, ;
		Width = 180, ;
		ZOrderSet = 5
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text8' AS textbox WITH ;
		Alignment = 3, ;
		ControlSource = "thisform.nDNSani", ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		Format = "k", ;
		Height = 22, ;
		InputMask = "99.99", ;
		Left = 222, ;
		Name = "Text8", ;
		ReadOnly = .F., ;
		SpecialEffect = 1, ;
		TabIndex = 5, ;
		Top = 155, ;
		Width = 40, ;
		ZOrderSet = 7
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text9' AS textbox WITH ;
		ControlSource = "omf.amortprec", ;
		FontName = "Arial Narrow", ;
		Format = "", ;
		Height = 23, ;
		InputMask = (GET_MASK(14,gnZ)), ;
		Left = 222, ;
		Name = "Text9", ;
		ReadOnly = .F., ;
		SpecialEffect = 1, ;
		TabIndex = 10, ;
		Top = 261, ;
		Width = 102
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'txtDataEval' AS textbox WITH ;
		ControlSource = "thisform.dDataEval", ;
		FontName = "Arial Narrow", ;
		Format = "", ;
		Height = 23, ;
		Left = 222, ;
		Name = "txtDataEval", ;
		ReadOnly = .F., ;
		SpecialEffect = 1, ;
		TabIndex = 7, ;
		Top = 186, ;
		Width = 66
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'txtDR' AS textbox WITH ;
		ControlSource = "thisform.nDR", ;
		FontName = "Arial Narrow", ;
		Format = "", ;
		Height = 23, ;
		InputMask = "999 999", ;
		Left = 300, ;
		Name = "txtDR", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 8, ;
		Top = 211, ;
		Width = 38
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'txtDRani' AS textbox WITH ;
		ControlSource = "thisform.nDRani", ;
		FontName = "Arial Narrow", ;
		Format = "", ;
		Height = 23, ;
		InputMask = "99.99", ;
		Left = 222, ;
		Name = "txtDRani", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 8, ;
		Top = 211, ;
		Width = 38
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'txtNorma_max' AS textbox WITH ;
		Alignment = 3, ;
		ControlSource = "m.norma_max", ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		Format = "k", ;
		Height = 20, ;
		InputMask = "999", ;
		Left = 265, ;
		Name = "txtNorma_max", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 14, ;
		TabStop = .F., ;
		Top = 133, ;
		Width = 32, ;
		ZOrderSet = 7
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'txtNorma_min' AS textbox WITH ;
		Alignment = 3, ;
		ControlSource = "m.norma_min", ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		Format = "k", ;
		Height = 20, ;
		InputMask = "999", ;
		Left = 222, ;
		Name = "txtNorma_min", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 13, ;
		TabStop = .F., ;
		Top = 133, ;
		Width = 32, ;
		ZOrderSet = 7
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'txtUzuraPrec' AS textbox WITH ;
		ControlSource = "thisform.nUzuraPrec", ;
		FontName = "Arial Narrow", ;
		Format = "", ;
		Height = 23, ;
		InputMask = "999 999", ;
		Left = 222, ;
		Name = "txtUzuraPrec", ;
		SpecialEffect = 1, ;
		TabIndex = 9, ;
		Top = 236, ;
		Width = 66
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE inainte_de_do_termin
		IF (m.norma_min <= thisform.nDNSani AND thisform.nDNSani <= m.norma_max)
		ELSE
			DO mesaj WITH "Durata normala de serviciu schimbata (DNS)","nu este din interval"
			RETURN .F.
		ENDIF 
	ENDPROC

	PROCEDURE Text7.GotFocus
		LOCAL den
		den=m.denumire
		
		LOCAL SALV1,SALV2,salv3
		SALV1=M.NORMAT
		SALV2=M.NORMAAN
		salv3=m.codmf
		
		OCA=CREATEOBJECT("NORMATREE_2005")
		OCA.SHOW(1)
		
		IF buton=2
			IF TYPE('M.NORMAT')='C'
				m.NORMAT=STR(SALV1)
				m.NORMAAN=STR(SALV2)
				m.codmf=salv3
			ENDIF
			RETURN
		ENDIF
		
		SELE norma_2005
		SCAT MEMV
		
		THISFORM.txtNorma_min.REFRESH
		THISFORM.txtNorma_max.REFRESH
		
		
		
	ENDPROC

	PROCEDURE Text8.LostFocus
		LOCAL lnUzura 
		lnUzura = 0
		thisform.nDNS = this.Value*12  
		  
		DO CASE && aici calculez DR !!!
		CASE omf.dataeval = omf.datapif
			lnUzura = omf.uzura - (VAL(m.an)*12+VAL(m.nl) - 2005*12+1) - 1
		OTHERWISE  && uzura = datacrt - dataeval
			lnUzura = (VAL(m.an)*12+VAL(m.nl)) - (YEAR(dataeval)*12+MONTH(dataeval))
		ENDCASE 
		
		thisform.nDR = (1-lnUzura/omf.normat2lun) * this.Value * 12
		thisform.nDRani = thisform.nDR/12
		
		thisform.nUzuraPrec = (VAL(m.an)*12+VAL(m.nl) - (2005*12+1))
		thisform.Refresh 
		
		
	ENDPROC

	PROCEDURE Text8.Valid
		IF (m.norma_min <= this.Value AND this.Value <= m.norma_max)
		ELSE
			DO mesaj WITH "Durata introdusa nu este din interval",""
			RETURN 0
		ENDIF 
	ENDPROC

	PROCEDURE Text9.Valid
		*!*	IF !EMPTY(omf.dataeval)
		*!*		LnUzura=(YEAR(m.dataeval)*12+MONTH(m.dataeval))-(YEAR(omf.dataeval)*12+MONTH(omf.dataeval))
		*!*		m.normat2lun= m.normat2lun-LnUzura-omf.uzuraprec
		*!*	ENDIF 
		*!*	m.normat2=ROUND(m.normat2lun/12,2)
		
	ENDPROC

	PROCEDURE txtDataEval.Init
		LOCAL lcData, ldUltimaZi 
		
		lcData = "01/"+m.nl+"/"+m.an
		ldUltimaZi = GOMONTH(CTOD(lcData),1)-1
		
		thisform.dDataeval = ldUltimaZi 
		this.Refresh 
		
	ENDPROC

	PROCEDURE txtDataEval.LostFocus
		thisform.nUzuraPrec = (YEAR(thisform.dDataEval)*12+MONTH(thisform.dDataEval)-(2005*12+1))
		thisform.txtUzuraPrec.Refresh 
	ENDPROC

	PROCEDURE txtDataEval.Valid
		*!*	IF !EMPTY(omf.dataeval)
		*!*		LnUzura=(YEAR(m.dataeval)*12+MONTH(m.dataeval))-(YEAR(omf.dataeval)*12+MONTH(omf.dataeval))
		*!*		m.normat2lun= m.normat2lun-LnUzura-omf.uzuraprec
		*!*	ENDIF 
		*!*	m.normat2=ROUND(m.normat2lun/12,2)
		
	ENDPROC

	PROCEDURE txtDR.Valid
		*!*	IF !EMPTY(omf.dataeval)
		*!*		LnUzura=(YEAR(m.dataeval)*12+MONTH(m.dataeval))-(YEAR(omf.dataeval)*12+MONTH(omf.dataeval))
		*!*		m.normat2lun= m.normat2lun-LnUzura-omf.uzuraprec
		*!*	ENDIF 
		*!*	m.normat2=ROUND(m.normat2lun/12,2)
		
	ENDPROC

	PROCEDURE txtDRani.Valid
		*!*	IF !EMPTY(omf.dataeval)
		*!*		LnUzura=(YEAR(m.dataeval)*12+MONTH(m.dataeval))-(YEAR(omf.dataeval)*12+MONTH(omf.dataeval))
		*!*		m.normat2lun= m.normat2lun-LnUzura-omf.uzuraprec
		*!*	ENDIF 
		*!*	m.normat2=ROUND(m.normat2lun/12,2)
		
	ENDPROC

ENDDEFINE
