*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="inchideri_sal.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS frm_alege_neridicati 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="_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.Column7.Check1" 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="Ck_nume" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_prenume" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_sectie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_formatie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_marca" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmd_cauta1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_txbase1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_txbase2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_txbase3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: do_totaluri
		*p: lsalvat
		*p: nan
		*p: nluna
		*p: noptiune
		*p: nsumainit
		*p: nsumamodif
		*p: ntotsuma
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 445
		lsalvat = .F.
		Name = "frm_alege_neridicati"
		nan = 0
		nluna = 0
		noptiune = 0
		nsumainit = .F.
		nsumamodif = .F.
		ntotsuma = .F.
		Width = 655
		_SHAPE1.Height = 29
		_SHAPE1.Left = 0
		_SHAPE1.Name = "_SHAPE1"
		_SHAPE1.Top = 0
		_SHAPE1.Width = 684
		_shape2.Left = 581
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		Lb_titlu_alb_b121.Caption = "Salariati"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 7
		BUT_TERMIN1.Left = 623
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 5
		BUT_TERMIN1.Top = 1
		Gridsort1.Left = 216
		Gridsort1.Name = "Gridsort1"
		Gridsort1.Top = 4
		But_renunt1.Left = 594
		But_renunt1.Name = "But_renunt1"
		But_renunt1.TabIndex = 8
		But_renunt1.Top = 1
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		ColumnCount = 10, ;
		DeleteMark = .F., ;
		Height = 325, ;
		Left = 12, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		RecordSource = "crsState", ;
		TabIndex = 4, ;
		Top = 85, ;
		Width = 624, ;
		Column1.ControlSource = "marca", ;
		Column1.Name = "Column1", ;
		Column1.Width = 37, ;
		Column2.ControlSource = "nume", ;
		Column2.Name = "Column2", ;
		Column3.ControlSource = "prenume", ;
		Column3.Name = "Column3", ;
		Column4.ControlSource = "formatia", ;
		Column4.Name = "Column4", ;
		Column5.ControlSource = "sectie", ;
		Column5.Name = "Column5", ;
		Column6.ControlSource = "lichidare", ;
		Column6.Name = "Column6", ;
		Column7.ControlSource = "BIFA", ;
		Column7.CurrentControl = "Check1", ;
		Column7.Name = "Column7", ;
		Column7.Sparse = .F., ;
		Column7.Width = 35, ;
		Column8.ControlSource = "sumalicnerid", ;
		Column8.Name = "Column8", ;
		Column8.ReadOnly = .F., ;
		Column8.Width = 94, ;
		Column9.ControlSource = "an", ;
		Column9.Name = "Column9", ;
		Column9.Width = 34, ;
		Column10.ControlSource = "luna", ;
		Column10.Name = "Column10", ;
		Column10.Width = 32
		*< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Caption = "Marca", ;
		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"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column10.Header1' AS header WITH ;
		Caption = "Luna", ;
		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"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Caption = "Nume", ;
		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"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Caption = "Prenume", ;
		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"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column4.Header1' AS header WITH ;
		Caption = "Formatie", ;
		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"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column5.Header1' AS header WITH ;
		Caption = "Sectie", ;
		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"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column6.Header1' AS header WITH ;
		Caption = "Lichidare", ;
		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"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column7.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 15, ;
		Name = "Check1", ;
		Top = 71, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column7.Header1' AS header WITH ;
		Caption = "Alege", ;
		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"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column8.Header1' AS header WITH ;
		Caption = "Suma neridicata", ;
		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", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column9.Header1' AS header WITH ;
		Caption = "An", ;
		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"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_txbase1' AS _txbase WITH ;
		ControlSource = "thisform.nluna", ;
		Format = "k", ;
		Height = 23, ;
		Left = 367, ;
		Name = "_txbase1", ;
		TabIndex = 1, ;
		Top = 40, ;
		Width = 35
		*< END OBJECT: ClassLib="..\comun\clase\_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT '_txbase2' AS _txbase WITH ;
		ControlSource = "thisform.nan", ;
		Format = "k", ;
		Height = 23, ;
		Left = 413, ;
		Name = "_txbase2", ;
		TabIndex = 2, ;
		Top = 40, ;
		Width = 48
		*< END OBJECT: ClassLib="..\comun\clase\_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT '_txbase3' AS _txbase WITH ;
		Alignment = 1, ;
		ControlSource = "thisform.ntotsuma", ;
		Height = 23, ;
		InputMask = (get_mask(12,gnPA)), ;
		Left = 509, ;
		Name = "_txbase3", ;
		ReadOnly = .T., ;
		TabIndex = 6, ;
		Top = 417, ;
		Width = 94
		*< END OBJECT: ClassLib="..\comun\clase\_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'ck_formatie' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		camp_nume = formatia, ;
		Caption = "Formatie", ;
		Height = 18, ;
		Left = 95, ;
		Name = "ck_formatie", ;
		TabIndex = 12, ;
		Top = 60, ;
		Width = 54
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_marca' AS ck_filtru_numar WITH ;
		Alignment = 0, ;
		camp_nume = marca, ;
		Caption = "Marca", ;
		Left = 167, ;
		Name = "ck_marca", ;
		TabIndex = 13, ;
		Top = 36
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Ck_nume' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		camp_nume = nume, ;
		Caption = "Nume", ;
		Height = 18, ;
		Left = 23, ;
		Name = "Ck_nume", ;
		TabIndex = 9, ;
		Top = 36, ;
		Width = 44
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_prenume' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		camp_nume = prenume, ;
		Caption = "Prenume", ;
		Height = 18, ;
		Left = 23, ;
		Name = "ck_prenume", ;
		TabIndex = 10, ;
		Top = 60, ;
		Width = 56
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_sectie' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		camp_nume = sectie, ;
		Caption = "Sectie", ;
		Height = 18, ;
		Left = 95, ;
		Name = "ck_sectie", ;
		TabIndex = 11, ;
		Top = 36, ;
		Width = 44
		*< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Cmd_cauta1' AS cmd_cauta WITH ;
		Left = 546, ;
		Name = "Cmd_cauta1", ;
		TabIndex = 3, ;
		Top = 52
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Label1' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "/", ;
		Height = 17, ;
		Left = 406, ;
		Name = "Label1", ;
		TabIndex = 14, ;
		Top = 43, ;
		Width = 5
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label2' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Luna / An:", ;
		Height = 17, ;
		Left = 309, ;
		Name = "Label2", ;
		TabIndex = 15, ;
		Top = 43, ;
		Width = 56
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label3' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Total:", ;
		Height = 17, ;
		Left = 467, ;
		Name = "Label3", ;
		TabIndex = 16, ;
		Top = 420, ;
		Width = 32
		*< END OBJECT: BaseClass="label" />
	
	PROCEDURE actualizeaza_grid1
		Lparameters tcFiltru
		Local lcFiltru
		If Empty(tcFiltru)
			lcFiltru = postat.ca_baza1.cfiltru
		Else
			lcFiltru = tcFiltru
		Endif
		
		Thisform.MousePointer= 11
		Thisform.LockScreen=.T.
		save_grid_tag(Thisform._grdrow1)
		postat.ca_baza1.cfiltru=lcFiltru
		postat.ca_baza1.afisare()
		restore_grid_tag(Thisform._grdrow1)
		Thisform.LockScreen=.F.
		Thisform.MousePointer= 0
		thisform.do_totaluri 
		Select crsState
		*!*	CALCULATE sum(totctva),sum(neimpozab),sum(totftvam),sum(tvam),sum(totftvai),sum(tvai) TO ;
		*!*		pntotctva,pnneimpozab,pntotftvam,pntvam,pntotftvai,pntvai
		Go Top
		Thisform.Refresh
		
	ENDPROC

	PROCEDURE Destroy
		IF TYPE('pnSumaBifata') = 'N'
			pnSumaBifata = thisform.ntotsuma
		ENDIF 
		DODEFAULT()
	ENDPROC

	PROCEDURE do_cauta
		Local lcFiltru
		Store '' To lcFiltru
		DO CASE 
			CASE thisform.noptiune = 0
				lcFiltru = [ and lichidare > 0 and BIFALICNERID = 0 and an = ]+Alltrim(Str(thisform.nan))+[ and luna = ]+Alltrim(Str(thisform.nluna))
			CASE thisform.noptiune = 1 
				lcFiltru = [ and id_fact_lic = ] +ALLTRIM(STR(oireg.id_fact))
			CASE thisform.noptiune = 3
				lcFiltru = [ and avans > 0 and BIFAAVNERID = 0 and an = ]+Alltrim(Str(thisform.nan))+[ and luna = ]+Alltrim(Str(thisform.nluna))
			CASE thisform.noptiune = 4 
				lcFiltru = [ and id_fact_av = ] +ALLTRIM(STR(oireg.id_fact))		
		ENDCASE 
		If Thisform.ck_nume.Value=1
			lcFiltru = lcFiltru + Thisform.ck_nume.filtru
		Endif
		
		If Thisform.ck_sectie.Value=1
			lcFiltru = lcFiltru + Thisform.ck_sectie.filtru 
		ENDIF
		
		If Thisform.ck_formatie.Value=1
			lcFiltru = lcFiltru + Thisform.ck_formatie.filtru
		ENDIF
		
		If Thisform.ck_marca.Value=1
			lcFiltru = lcFiltru + Thisform.ck_marca.filtru
		ENDIF
		
		If thisform.ck_prenume.Value=1
			lcFiltru = lcFiltru + thisform.ck_prenume.filtru 
		ENDIF
		
		
		
		IF !EMPTY(lcFiltru)
			lcFiltru = SUBSTR(lcFiltru,5)
			ELSE 
			lcFiltru = '1=1'
		ENDIF
		
		
		
		thisform.actualizeaza_grid1(lcFiltru)
		
		*!*	SELECT v_avans
		*!*	SET FILTER TO &lcFiltru
		*!*	thisform.do_calcul
		
		GO TOP 
		thisform.Refresh 
	ENDPROC

	PROCEDURE do_totaluri
		
		LOCAL lnNrReg
		Select crsState
		IF RECCOUNT() < 1
			thisform.ntotsuma = 0
			RETURN 
		ENDIF 
		lnNrReg = RECNO()
		IF INLIST(thisform.noptiune, 2, 5)
			SUM sumalicnerid TO thisform.ntotsuma FOR bifa = 1
		ELSE 
			SUM sumalicnerid TO thisform.ntotsuma 
		ENDIF 
		SELECT crsState
		GOTO lnNrReg
		thisform._txbase3.Refresh()
	ENDPROC

	PROCEDURE Init
		DODEFAULT()
		thisform.do_totaluri 
	ENDPROC

	PROCEDURE Show
		LPARAMETERS nStyle
		IF gnluna = 1
			thisform.nan = gnAn - 1
			thisform.nluna = 12
		ELSE 
			thisform.nan = gnAn 
			thisform.nluna = gnLuna - 1	
		ENDIF 
		DO CASE 
			CASE  thisform.noptiune = 0  && trecerea lichidarii in drepturi neridicare 
			
				thisform._grdrow1.column8.ReadOnly= .F.&&suma neridicata
				thisform._grdrow1.column7.Visible = .t. &&bifa
				thisform.label1.Visible = .t.
				thisform.label2.Visible = .t.
				thisform._txbase1.Visible = .t.&&luna
				thisform._txbase2.Visible = .t.	&&an	
				thisform.but_renunt1.Visible = .t.
				
			CASE  thisform.noptiune = 1&& pentru lichidare neridicata
			
				thisform._grdrow1.column8.ReadOnly= .T.&&suma neridicata
				thisform._grdrow1.column7.Visible = .t.&&bifa
				thisform._grdrow1.column7.heADER1.Caption = 'Achitat' &&bifa
				thisform._grdrow1.column7.ReadOnly = .t.&&bifa
				thisform.label1.Visible = .f.
				thisform.label2.Visible = .f.
				thisform._txbase1.Visible = .f.&&luna
				thisform._txbase2.Visible = .f.&&an
				thisform.but_renunt1.Visible = .f.
				
			CASE  thisform.noptiune = 2&& pentru achitarea lichidarii neridicate
			
				thisform._grdrow1.column8.ReadOnly= .T.&&suma neridicata
				thisform._grdrow1.column7.Visible = .t.&&bifa
				thisform._grdrow1.column6.Visible = .f.&&lichidare
				thisform.label1.Visible = .f.
				thisform.label2.Visible = .f.
				thisform._txbase1.Visible = .f.&&luna
				thisform._txbase2.Visible = .f.&&an
				thisform.but_renunt1.Visible = .f.	
				thisform.ntotsuma=0
				
			CASE  thisform.noptiune = 3  && trecerea avansului in drepturi neridicare
			
				thisform._grdrow1.column8.ReadOnly= .F.&&suma neridicata
				thisform._grdrow1.column7.Visible = .t. &&bifa
				thisform._grdrow1.column6.hEADER1.Caption=[Avans]
				thisform.label1.Visible = .t.
				thisform.label2.Visible = .t.
				thisform._txbase1.Visible = .t.&&luna
				thisform._txbase2.Visible = .t.	&&an	
				thisform.but_renunt1.Visible = .t.		
		
			CASE  thisform.noptiune = 4&& pentru avans neridicat
			
				thisform._grdrow1.column8.ReadOnly= .T.&&suma neridicata
				thisform._grdrow1.column7.Visible = .t.&&bifa
				thisform._grdrow1.column7.heADER1.Caption = 'Achitat' &&bifa
				thisform._grdrow1.column7.ReadOnly = .t.&&bifa
				thisform._grdrow1.column6.hEADER1.Caption = [Avans]
				thisform.label1.Visible = .f.
				thisform.label2.Visible = .f.
				thisform._txbase1.Visible = .f.&&luna
				thisform._txbase2.Visible = .f.&&an
				thisform.but_renunt1.Visible = .f.
				
			CASE  thisform.noptiune = 5&& pentru achitarea avansului neridicat
			
		*!*			thisform._grdrow1.column8.ReadOnly= .T.&&suma neridicata
				thisform._grdrow1.column8.hEADER1.Caption=[Avans]
				thisform._grdrow1.column7.Visible = .t.&&bifa
				thisform._grdrow1.column6.Visible = .f.&&lichidare
				thisform.label1.Visible = .f.
				thisform.label2.Visible = .f.
				thisform._txbase1.Visible = .f.&&luna
				thisform._txbase2.Visible = .f.&&an
				thisform.but_renunt1.Visible = .f.	
				thisform.ntotsuma=0		
						
		ENDCASE 
		
		
		
	ENDPROC

	PROCEDURE _grdrow1.Column7.Check1.Click
		IF this.ReadOnly = .f.
			IF !INLIST(thisform.noptiune,2,5)
		
				IF this.Value = 1
					SELECT crsState
					REPLACE sumalicnerid WITH lichidare
				ELSE 
					SELECT crsState
					REPLACE sumalicnerid WITH 0
				ENDIF
			ENDIF 
		ENDIF 
		thisform.do_totaluri
		thisform._grdrow1.column8.Refresh()
		
	ENDPROC

	PROCEDURE _grdrow1.Column7.Header1.DblClick
		REPLACE ALL bifa WITH 1
	ENDPROC

	PROCEDURE _grdrow1.Column8.Text1.InteractiveChange
		
		
	ENDPROC

	PROCEDURE _grdrow1.Column8.Text1.LostFocus
		thisform.do_totaluri
	ENDPROC

ENDDEFINE
