*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="afisbal_ana.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>
		DataSource = .NULL.
		Height = 200
		Left = 45
		Name = "Dataenvironment"
		Top = 86
		Width = 520
	*</PropValue>

ENDDEFINE

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

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Shape2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Optiongroup1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_listare1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="oMenuShortcut" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.ccont.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.ccont.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cdenumire.Header2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cdenumire.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cprecdeb.Header3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cprecdeb.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cpreccred.Header4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cpreccred.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cruldeb.Header5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cruldeb.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.crulcred.Header6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.crulcred.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.ctotdeb.Header7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.ctotdeb.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.ctotcred.Header8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.ctotcred.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.csoldcred.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.csoldcred.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.csolddeb.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.csolddeb.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cacont.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cacont.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cprecdeb1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cprecdeb1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cpreccred1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.cpreccred1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_excel1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_reface1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.Shape1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.Label5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.Text7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.Text8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.Label2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.Label4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.txtprecdeb1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.Text2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.txtpreccred1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.Text3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.Text5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.Text4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.Text6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.Label8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.lblsld1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.lbldebit" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p1.lblcredit" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.P2.Shape1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.P2.cktotal4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.P2.ckanalitic" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.P2.cktotal2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.P2.cktotal1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.P2.cktotal3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.P2.cksold1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.P2.Ck_cont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p3.Shape1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.p3.Optiongroup1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.P4.Shape1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.P4.opt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="pf.P4.opt2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Resizer1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txtcont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ct1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Txtcont2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: adauga_linie
		*m: afisactual
		*m: butapend
		*m: butdrept
		*m: calculeaza
		*m: calculeaza_orizontal
		*m: calculeaza_vertical
		*m: cfield_assign
		*m: fisacont
		*m: in_bal
		*m: meniu_as
		*m: reconstruct
		*m: rulcred
		*m: ruldeb
		*m: ruldebcred
		*m: sterge_linie
		*m: totcred
		*m: totdeb
		*m: totdebcred
		*p: calias
		*p: ccont
		*p: cfield
		*p: nnewvalue
		*p: noldvalue
		*p: oafbalana
	*</DefinedPropArrayMethod>

	*<PropValue>
		AlwaysOnTop = .F.
		BackColor = 255,255,255
		BorderStyle = 1
		calias = TBALANTA
		cbuton1 = but_excel1
		cbuton2 = but_listare1
		cbuton3 = modifica1
		cbuton4 = but_reface1
		cfield = 
		DoCreate = .T.
		Height = 478
		lactiv1 = .F.
		lactiv2 = .F.
		lactiv3 = .F.
		lactiv4 = .F.
		Name = "Ffergen1"
		nnewvalue = 0
		noldvalue = 0
		ScrollBars = 0
		Width = 806
		WindowType = 1
		_shape1.BorderStyle = 0
		_shape1.Height = 35
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 377
		_shape2.Comment = "*:OnResize=RT"
		_shape2.Height = 36
		_shape2.Left = 648
		_shape2.Name = "_shape2"
		_shape2.Top = -1
		_shape2.Width = 153
		Lb_titlu_alb_b121.Caption = "Balanta de verificare"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Comment = "*:OnResize=RT"
		BUT_TERMIN1.Left = 768
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 4
	*</PropValue>

	ADD OBJECT 'But_excel1' AS but_excel WITH ;
		Comment = "*:OnResize=RT", ;
		Left = 739, ;
		Name = "But_excel1", ;
		Top = 4, ;
		Visible = .F.
		*< END OBJECT: ClassLib="..\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_listare1' AS but_listare WITH ;
		Comment = "*:OnResize=RT", ;
		Left = 709, ;
		Name = "But_listare1", ;
		Top = 4, ;
		Visible = .F.
		*< END OBJECT: ClassLib="..\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Comment = "*:OnResize=RT", ;
		Left = 679, ;
		Name = "But_modifica1", ;
		Top = 4
		*< END OBJECT: ClassLib="..\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_reface1' AS but_reface WITH ;
		Comment = "*:OnResize=RT", ;
		Left = 649, ;
		Name = "But_reface1", ;
		Top = 4, ;
		Visible = .F.
		*< END OBJECT: ClassLib="..\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Ct1' AS ct WITH ;
		Height = 23, ;
		Left = 67, ;
		Name = "Ct1", ;
		SpecialEffect = 0, ;
		TabIndex = 3, ;
		Top = 113, ;
		Width = 54, ;
		ZOrderSet = 16, ;
		Shape1.Name = "Shape1", ;
		Text1.Height = 21, ;
		Text1.Left = 1, ;
		Text1.Name = "Text1", ;
		Text1.Top = 1, ;
		Text1.Width = 13, ;
		Text2.Left = 14, ;
		Text2.Name = "Text2", ;
		Text2.Top = 1, ;
		Text3.Left = 26, ;
		Text3.Name = "Text3", ;
		Text3.Top = 1, ;
		Text4.Height = 21, ;
		Text4.Left = 39, ;
		Text4.Name = "Text4", ;
		Text4.Top = 1, ;
		Text4.Width = 14, ;
		Line1.Left = 14, ;
		Line1.Name = "Line1", ;
		Line1.Top = -9, ;
		Line2.Left = 26, ;
		Line2.Name = "Line2", ;
		Line2.Top = -9, ;
		Line3.Left = 39, ;
		Line3.Name = "Line3", ;
		Line3.Top = -9
		*< END OBJECT: ClassLib="..\clase\ferestre_cere_date.vcx" BaseClass="container" />

	ADD OBJECT 'Grid1' AS grid WITH ;
		BackColor = 255,255,255, ;
		ColumnCount = 13, ;
		Comment = "*:OnResize=SS", ;
		DeleteMark = .F., ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		GridLineColor = 192,192,192, ;
		Height = 322, ;
		Left = 0, ;
		Name = "Grid1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "TBALANTA", ;
		RowHeight = 19, ;
		TabIndex = 4, ;
		Top = 143, ;
		Width = 799, ;
		ZOrderSet = 9, ;
		Column1.Alignment = 0, ;
		Column1.BackColor = 255,255,255, ;
		Column1.ColumnOrder = 1, ;
		Column1.ControlSource = "CONT", ;
		Column1.FontName = "Arial Narrow", ;
		Column1.FontSize = 9, ;
		Column1.Format = "", ;
		Column1.InputMask = "", ;
		Column1.Name = "ccont", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 29, ;
		Column2.Alignment = 0, ;
		Column2.BackColor = 255,255,255, ;
		Column2.ColumnOrder = 3, ;
		Column2.ControlSource = "DENUMIRE", ;
		Column2.FontName = "Arial Narrow", ;
		Column2.FontSize = 9, ;
		Column2.Name = "cdenumire", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 141, ;
		Column3.Alignment = 1, ;
		Column3.BackColor = 187,235,255, ;
		Column3.ColumnOrder = 6, ;
		Column3.ControlSource = "PRECDEB", ;
		Column3.DynamicForeColor = "IIF(PRECDEB>=0, RGB(0,0,0), RGB(255,0,0))", ;
		Column3.FontName = "Arial Narrow", ;
		Column3.FontSize = 9, ;
		Column3.Format = "r", ;
		Column3.InputMask = (get_mask(16,gnPA)), ;
		Column3.Name = "cprecdeb", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 72, ;
		Column4.Alignment = 1, ;
		Column4.BackColor = 187,235,255, ;
		Column4.ColumnOrder = 7, ;
		Column4.ControlSource = "PRECCRED", ;
		Column4.DynamicForeColor = "IIF(PRECCRED>=0, RGB(0,0,0), RGB(255,0,0))", ;
		Column4.FontName = "Arial Narrow", ;
		Column4.FontSize = 9, ;
		Column4.Format = "r", ;
		Column4.InputMask = (get_mask(16,gnPA)), ;
		Column4.Name = "cpreccred", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 72, ;
		Column5.Alignment = 1, ;
		Column5.BackColor = 236,249,255, ;
		Column5.ColumnOrder = 8, ;
		Column5.ControlSource = "RULDEB", ;
		Column5.DynamicForeColor = "IIF(RULDEB>=0, RGB(0,0,0), RGB(255,0,0))", ;
		Column5.FontName = "Arial Narrow", ;
		Column5.FontSize = 9, ;
		Column5.Format = "R", ;
		Column5.InputMask = (get_mask(16,gnPA)), ;
		Column5.Name = "cruldeb", ;
		Column5.ReadOnly = .T., ;
		Column5.Width = 72, ;
		Column6.Alignment = 1, ;
		Column6.BackColor = 236,249,255, ;
		Column6.ColumnOrder = 9, ;
		Column6.ControlSource = "RULCRED", ;
		Column6.DynamicForeColor = "IIF(RULCRED>=0, RGB(0,0,0), RGB(255,0,0))", ;
		Column6.FontName = "Arial Narrow", ;
		Column6.FontSize = 9, ;
		Column6.Format = "R", ;
		Column6.InputMask = (get_mask(16,gnPA)), ;
		Column6.Name = "crulcred", ;
		Column6.ReadOnly = .T., ;
		Column6.Width = 73, ;
		Column7.Alignment = 1, ;
		Column7.BackColor = 187,235,255, ;
		Column7.ColumnOrder = 10, ;
		Column7.ControlSource = "TOTDEB", ;
		Column7.DynamicForeColor = "IIF(TOTDEB>=0, RGB(0,0,0), RGB(255,0,0))", ;
		Column7.FontName = "Arial Narrow", ;
		Column7.FontSize = 9, ;
		Column7.Format = "r", ;
		Column7.InputMask = (get_mask(16,gnPA)), ;
		Column7.Name = "ctotdeb", ;
		Column7.ReadOnly = .T., ;
		Column7.Width = 83, ;
		Column8.Alignment = 1, ;
		Column8.BackColor = 187,235,255, ;
		Column8.ColumnOrder = 11, ;
		Column8.ControlSource = "TOTCRED", ;
		Column8.DynamicForeColor = "IIF(TOTCRED>=0, RGB(0,0,0), RGB(255,0,0))", ;
		Column8.FontName = "Arial Narrow", ;
		Column8.FontSize = 9, ;
		Column8.Format = "r", ;
		Column8.InputMask = (get_mask(16,gnPA)), ;
		Column8.Name = "ctotcred", ;
		Column8.ReadOnly = .T., ;
		Column8.Width = 85, ;
		Column9.Alignment = 1, ;
		Column9.BackColor = 236,249,255, ;
		Column9.ColumnOrder = 13, ;
		Column9.ControlSource = "SOLDCRED", ;
		Column9.DynamicForeColor = "IIF(SOLDCRED>=0, RGB(0,0,0), RGB(255,0,0))", ;
		Column9.FontName = "Arial Narrow", ;
		Column9.FontSize = 9, ;
		Column9.Format = "r", ;
		Column9.InputMask = (get_mask(16,gnPA)), ;
		Column9.Name = "csoldcred", ;
		Column9.ReadOnly = .T., ;
		Column9.Width = 70, ;
		Column10.Alignment = 1, ;
		Column10.BackColor = 236,249,255, ;
		Column10.ColumnOrder = 12, ;
		Column10.ControlSource = "SOLDDEB", ;
		Column10.DynamicForeColor = "IIF(SOLDDEB>=0, RGB(0,0,0), RGB(255,0,0))", ;
		Column10.FontName = "Arial Narrow", ;
		Column10.FontSize = 9, ;
		Column10.Format = "r", ;
		Column10.InputMask = (get_mask(16,gnPA)), ;
		Column10.Name = "csolddeb", ;
		Column10.ReadOnly = .T., ;
		Column10.Width = 66, ;
		Column11.BackColor = 255,255,255, ;
		Column11.ColumnOrder = 2, ;
		Column11.ControlSource = "ACONT", ;
		Column11.FontName = "Arial Narrow", ;
		Column11.FontSize = 9, ;
		Column11.Name = "cacont", ;
		Column11.ReadOnly = .T., ;
		Column11.Width = 40, ;
		Column12.BackColor = 236,249,255, ;
		Column12.ColumnOrder = 4, ;
		Column12.ControlSource = "precdeb1", ;
		Column12.FontName = "Arial Narrow", ;
		Column12.FontSize = 9, ;
		Column12.Format = "RK", ;
		Column12.InputMask = (get_mask(18,gnPA)), ;
		Column12.Name = "cprecdeb1", ;
		Column12.ReadOnly = .T., ;
		Column12.Visible = .F., ;
		Column12.Width = 0, ;
		Column13.BackColor = 236,249,255, ;
		Column13.ColumnOrder = 5, ;
		Column13.ControlSource = "preccred1", ;
		Column13.FontName = "Arial Narrow", ;
		Column13.FontSize = 9, ;
		Column13.Format = "RK", ;
		Column13.InputMask = (get_mask(18,gnPA)), ;
		Column13.Name = "cpreccred1", ;
		Column13.ReadOnly = .T., ;
		Column13.Visible = .F., ;
		Column13.Width = 0
		*< END OBJECT: BaseClass="grid" />

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

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

	ADD OBJECT 'Grid1.ccont.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont", ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Grid1.cdenumire.Header2' AS header WITH ;
		Alignment = 2, ;
		Caption = "Denumire", ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		Name = "Header2"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Grid1.cpreccred.Header4' AS header WITH ;
		Alignment = 2, ;
		Caption = "Prec.Credit", ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		Name = "Header4"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Grid1.cpreccred1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sold Credit 1 ian. ", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cpreccred1.Text1' AS textbox WITH ;
		BackColor = 236,249,255, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		Visible = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.cprecdeb.Header3' AS header WITH ;
		Alignment = 2, ;
		Caption = "Prec.Debit", ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		Name = "Header3"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Grid1.cprecdeb1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sold Debit 1 ian.", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.cprecdeb1.Text1' AS textbox WITH ;
		BackColor = 236,249,255, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		Visible = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.crulcred.Header6' AS header WITH ;
		Alignment = 2, ;
		Caption = "Rul.Credit", ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		Name = "Header6"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Grid1.cruldeb.Header5' AS header WITH ;
		Alignment = 2, ;
		Caption = "Rul.Debit", ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		Name = "Header5"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Grid1.csoldcred.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sold Credit", ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Grid1.csolddeb.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sold Debit", ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Grid1.ctotcred.Header8' AS header WITH ;
		Alignment = 2, ;
		Caption = "Total Credit", ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		Name = "Header8"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Grid1.ctotdeb.Header7' AS header WITH ;
		Alignment = 2, ;
		Caption = "Total Debit", ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		Name = "Header7"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Label1' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Selectie cont", ;
		Comment = "*:OnResize=LT", ;
		FontBold = .F., ;
		FontSize = 8, ;
		Height = 16, ;
		Left = 8, ;
		Name = "Label1", ;
		TabIndex = 13, ;
		Top = 70, ;
		Width = 64, ;
		ZOrderSet = 15
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label2' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "De la", ;
		Comment = "*:OnResize=LT", ;
		FontBold = .F., ;
		FontSize = 8, ;
		Height = 16, ;
		Left = 9, ;
		Name = "Label2", ;
		TabIndex = 13, ;
		Top = 91, ;
		Width = 26, ;
		ZOrderSet = 19
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label3' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Analitic", ;
		Comment = "*:OnResize=LT", ;
		FontBold = .F., ;
		FontSize = 8, ;
		Height = 16, ;
		Left = 9, ;
		Name = "Label3", ;
		TabIndex = 13, ;
		Top = 117, ;
		Width = 37, ;
		ZOrderSet = 20
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label4' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "la", ;
		Comment = "*:OnResize=LT", ;
		FontBold = .F., ;
		FontSize = 8, ;
		Height = 16, ;
		Left = 75, ;
		Name = "Label4", ;
		TabIndex = 13, ;
		Top = 91, ;
		Width = 10, ;
		ZOrderSet = 21
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'oMenuShortcut' AS menulib WITH ;
		Left = 264, ;
		Name = "oMenuShortcut", ;
		TabIndex = 6, ;
		Top = 0, ;
		ZOrderSet = 8
		*< END OBJECT: ClassLib="..\clase\utility.vcx" BaseClass="container" />

	ADD OBJECT 'Optiongroup1' AS optiongroup WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		BorderStyle = 0, ;
		ButtonCount = 10, ;
		Comment = "*:OnResize=LT", ;
		ControlSource = "", ;
		Height = 79, ;
		Left = 396, ;
		Name = "Optiongroup1", ;
		SpecialEffect = 1, ;
		TabIndex = 11, ;
		Top = 60, ;
		Value = 1, ;
		Width = 203, ;
		ZOrderSet = 4, ;
		Option1.AutoSize = .T., ;
		Option1.BackStyle = 0, ;
		Option1.Caption = "\<Balanta", ;
		Option1.ControlSource = "", ;
		Option1.FontName = "Courier New", ;
		Option1.FontSize = 8, ;
		Option1.Height = 16, ;
		Option1.Left = 5, ;
		Option1.Name = "Option1", ;
		Option1.Top = 5, ;
		Option1.Value = 1, ;
		Option1.Width = 71, ;
		Option2.AutoSize = .T., ;
		Option2.BackStyle = 0, ;
		Option2.Caption = "\<Rulaj Debit", ;
		Option2.ControlSource = "", ;
		Option2.Enabled = .F., ;
		Option2.FontName = "Courier New", ;
		Option2.FontSize = 8, ;
		Option2.Height = 16, ;
		Option2.Left = 5, ;
		Option2.Name = "Option2", ;
		Option2.Top = 18, ;
		Option2.Width = 99, ;
		Option3.AutoSize = .T., ;
		Option3.BackStyle = 0, ;
		Option3.Caption = "R\<ulaj Credit", ;
		Option3.ControlSource = "", ;
		Option3.Enabled = .F., ;
		Option3.FontName = "Courier New", ;
		Option3.FontSize = 8, ;
		Option3.Height = 16, ;
		Option3.Left = 5, ;
		Option3.Name = "Option3", ;
		Option3.Top = 31, ;
		Option3.Width = 106, ;
		Option4.AutoSize = .T., ;
		Option4.BackStyle = 0, ;
		Option4.Caption = "Tota\<l Debit", ;
		Option4.ControlSource = "", ;
		Option4.Enabled = .F., ;
		Option4.FontName = "Courier New", ;
		Option4.FontSize = 8, ;
		Option4.Height = 16, ;
		Option4.Left = 5, ;
		Option4.Name = "Option4", ;
		Option4.Top = 44, ;
		Option4.Width = 99, ;
		Option5.AutoSize = .T., ;
		Option5.BackStyle = 0, ;
		Option5.Caption = "T\<otal Credit", ;
		Option5.ControlSource = "", ;
		Option5.Enabled = .F., ;
		Option5.FontName = "Courier New", ;
		Option5.FontSize = 8, ;
		Option5.Height = 16, ;
		Option5.Left = 5, ;
		Option5.Name = "Option5", ;
		Option5.Top = 58, ;
		Option5.Width = 106, ;
		Option6.AutoSize = .T., ;
		Option6.BackStyle = 0, ;
		Option6.Caption = "Option6", ;
		Option6.FontName = "Courier New", ;
		Option6.FontSize = 8, ;
		Option6.Height = 16, ;
		Option6.Left = 120, ;
		Option6.Name = "Option6", ;
		Option6.Top = 5, ;
		Option6.Width = 71, ;
		Option7.AutoSize = .T., ;
		Option7.BackStyle = 0, ;
		Option7.Caption = "Option7", ;
		Option7.FontName = "Courier New", ;
		Option7.FontSize = 8, ;
		Option7.Height = 16, ;
		Option7.Left = 120, ;
		Option7.Name = "Option7", ;
		Option7.Top = 18, ;
		Option7.Width = 71, ;
		Option8.AutoSize = .T., ;
		Option8.BackStyle = 0, ;
		Option8.Caption = "Option8", ;
		Option8.FontName = "Courier New", ;
		Option8.FontSize = 8, ;
		Option8.Height = 16, ;
		Option8.Left = 120, ;
		Option8.Name = "Option8", ;
		Option8.Top = 31, ;
		Option8.Width = 71, ;
		Option9.AutoSize = .T., ;
		Option9.BackStyle = 0, ;
		Option9.Caption = "Option9", ;
		Option9.FontName = "Courier New", ;
		Option9.FontSize = 8, ;
		Option9.Height = 16, ;
		Option9.Left = 120, ;
		Option9.Name = "Option9", ;
		Option9.Top = 44, ;
		Option9.Width = 71, ;
		Option10.AutoSize = .T., ;
		Option10.BackStyle = 0, ;
		Option10.Caption = "Option10", ;
		Option10.FontName = "Courier New", ;
		Option10.FontSize = 8, ;
		Option10.Height = 16, ;
		Option10.Left = 120, ;
		Option10.Name = "Option10", ;
		Option10.Top = 58, ;
		Option10.Width = 78
		*< END OBJECT: BaseClass="optiongroup" />

	ADD OBJECT 'pf' AS pageframe WITH ;
		Comment = "*:OnResize=ST", ;
		ErasePage = .T., ;
		Height = 109, ;
		Left = 1, ;
		Name = "pf", ;
		PageCount = 4, ;
		TabIndex = 5, ;
		Top = 35, ;
		Width = 800, ;
		ZOrderSet = 12, ;
		Page1.BackColor = 255,255,255, ;
		Page1.Caption = "Total sume", ;
		Page1.FontBold = .T., ;
		Page1.Name = "p1", ;
		Page2.BackColor = 255,255,255, ;
		Page2.Caption = "Selectii", ;
		Page2.FontBold = .T., ;
		Page2.Name = "P2", ;
		Page3.BackColor = 255,255,255, ;
		Page3.Caption = "Fise de cont ", ;
		Page3.FontBold = .T., ;
		Page3.Name = "p3", ;
		Page4.BackColor = 255,255,255, ;
		Page4.Caption = "Listare", ;
		Page4.FontBold = .T., ;
		Page4.Name = "P4"
		*< END OBJECT: BaseClass="pageframe" />

	ADD OBJECT 'pf.p1.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		BackStyle = 0, ;
		Caption = "Sintetice", ;
		Comment = "*:OnResize=RT", ;
		FontName = "Arial Narrow", ;
		Height = 19, ;
		Left = 233, ;
		Name = "Check1", ;
		SpecialEffect = 0, ;
		Style = 1, ;
		Top = 6, ;
		Visible = .T., ;
		Width = 43
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'pf.p1.Label2' AS label WITH ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 1, ;
		Caption = " Rulaje", ;
		Comment = "*:OnResize=RT", ;
		Height = 18, ;
		Left = 405, ;
		Name = "Label2", ;
		Top = 7, ;
		Width = 127, ;
		ZOrderSet = 31
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'pf.p1.Label4' AS label WITH ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 1, ;
		Caption = " Total sume", ;
		Comment = "*:OnResize=RT", ;
		Height = 18, ;
		Left = 533, ;
		Name = "Label4", ;
		Top = 7, ;
		Width = 127, ;
		ZOrderSet = 32
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'pf.p1.Label5' AS label WITH ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 1, ;
		Caption = " Solduri", ;
		Comment = "*:OnResize=RT", ;
		Height = 18, ;
		Left = 661, ;
		Name = "Label5", ;
		Top = 7, ;
		Width = 127, ;
		ZOrderSet = 34
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'pf.p1.Label8' AS label WITH ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 1, ;
		Caption = " Total precedente", ;
		Comment = "*:OnResize=RT", ;
		Height = 18, ;
		Left = 277, ;
		Name = "Label8", ;
		TabIndex = 19, ;
		Top = 7, ;
		Width = 127, ;
		ZOrderSet = 16
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'pf.p1.lblcredit' AS label WITH ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 1, ;
		Caption = " Credit", ;
		Comment = "*:OnResize=RT", ;
		Height = 23, ;
		Left = 234, ;
		Name = "lblcredit", ;
		TabIndex = 20, ;
		Top = 50, ;
		Width = 42, ;
		ZOrderSet = 18
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'pf.p1.lbldebit' AS label WITH ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 1, ;
		Caption = " Debit", ;
		Comment = "*:OnResize=RT", ;
		Height = 23, ;
		Left = 234, ;
		Name = "lbldebit", ;
		TabIndex = 20, ;
		Top = 26, ;
		Width = 42, ;
		ZOrderSet = 17
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'pf.p1.lblsld1' AS label WITH ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		BorderStyle = 1, ;
		Caption = " Solduri 1 Ian.", ;
		Comment = "*:OnResize=RT", ;
		Height = 18, ;
		Left = 148, ;
		Name = "lblsld1", ;
		TabIndex = 19, ;
		Top = 7, ;
		Visible = .F., ;
		Width = 127, ;
		ZOrderSet = 16
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'pf.p1.Shape1' AS shape WITH ;
		BackColor = 236,249,255, ;
		BorderStyle = 3, ;
		Comment = "*:OnResize=ST", ;
		Height = 76, ;
		Left = 2, ;
		Name = "Shape1", ;
		Top = 1, ;
		Width = 790
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'pf.p1.Text1' AS textbox WITH ;
		Alignment = 1, ;
		Comment = "*:OnResize=RT", ;
		ControlSource = "m.sprecdeb", ;
		DisabledBackColor = 187,235,255, ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(15,gnPA)), ;
		Left = 277, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 6, ;
		Top = 26, ;
		Width = 127, ;
		ZOrderSet = 10
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'pf.p1.Text2' AS textbox WITH ;
		Alignment = 1, ;
		Comment = "*:OnResize=RT", ;
		ControlSource = "m.spreccred", ;
		DisabledBackColor = 187,235,255, ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(15,gnPA)), ;
		Left = 277, ;
		Name = "Text2", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 7, ;
		Top = 50, ;
		Width = 127, ;
		ZOrderSet = 11
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'pf.p1.Text3' AS textbox WITH ;
		Alignment = 1, ;
		Comment = "*:OnResize=RT", ;
		ControlSource = "m.srulcred", ;
		DisabledBackColor = 236,249,255, ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(15,gnPA)), ;
		Left = 405, ;
		Name = "Text3", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 8, ;
		Top = 50, ;
		Width = 127, ;
		ZOrderSet = 12
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'pf.p1.Text4' AS textbox WITH ;
		Alignment = 1, ;
		Comment = "*:OnResize=RT", ;
		ControlSource = "m.sruldeb", ;
		DisabledBackColor = 236,249,255, ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(15,gnPA)), ;
		Left = 405, ;
		Name = "Text4", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 10, ;
		Top = 26, ;
		Width = 127, ;
		ZOrderSet = 14
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'pf.p1.Text5' AS textbox WITH ;
		Alignment = 1, ;
		Comment = "*:OnResize=RT", ;
		ControlSource = "m.stotdeb", ;
		DisabledBackColor = 187,235,255, ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(15,gnPA)), ;
		Left = 533, ;
		Name = "Text5", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 9, ;
		Top = 26, ;
		Width = 127, ;
		ZOrderSet = 13
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'pf.p1.Text6' AS textbox WITH ;
		Alignment = 1, ;
		Comment = "*:OnResize=RT", ;
		ControlSource = "m.stotcred", ;
		DisabledBackColor = 187,235,255, ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(15,gnPA)), ;
		Left = 533, ;
		Name = "Text6", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 11, ;
		Top = 50, ;
		Width = 127, ;
		ZOrderSet = 15
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'pf.p1.Text7' AS textbox WITH ;
		Alignment = 1, ;
		Comment = "*:OnResize=RT", ;
		ControlSource = "m.ssolddeb", ;
		DisabledBackColor = 236,249,255, ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(15,gnPA)), ;
		Left = 661, ;
		Name = "Text7", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 6, ;
		Top = 26, ;
		Width = 127, ;
		ZOrderSet = 21
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'pf.p1.Text8' AS textbox WITH ;
		Alignment = 1, ;
		Comment = "*:OnResize=RT", ;
		ControlSource = "m.ssoldcred", ;
		DisabledBackColor = 236,249,255, ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(15,gnPA)), ;
		Left = 661, ;
		Name = "Text8", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 7, ;
		Top = 50, ;
		Width = 127, ;
		ZOrderSet = 22
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'pf.p1.txtpreccred1' AS textbox WITH ;
		Alignment = 1, ;
		Comment = "*:OnResize=RT", ;
		ControlSource = "m.spreccred1", ;
		DisabledBackColor = 236,249,255, ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(12,gnPA)), ;
		Left = 148, ;
		Name = "txtpreccred1", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 7, ;
		Top = 50, ;
		Visible = .F., ;
		Width = 127, ;
		ZOrderSet = 11
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'pf.p1.txtprecdeb1' AS textbox WITH ;
		Alignment = 1, ;
		Comment = "*:OnResize=RT", ;
		ControlSource = "m.sprecdeb1", ;
		DisabledBackColor = 236,249,255, ;
		Enabled = .T., ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		Format = "r", ;
		Height = 23, ;
		InputMask = (get_mask(12,gnPA)), ;
		Left = 148, ;
		Name = "txtprecdeb1", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 6, ;
		Top = 26, ;
		Visible = .F., ;
		Width = 127, ;
		ZOrderSet = 10
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'pf.P2.Ck_cont' AS ck_filtru_text WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		camp_nume = cont, ;
		Caption = "Selectie cont", ;
		Comment = "*:OnResize=ST", ;
		FontName = "Courier New", ;
		Left = 618, ;
		Name = "Ck_cont", ;
		Top = 36
		*< END OBJECT: ClassLib="..\clase\caut_ora.vcx" BaseClass="checkbox" />

	ADD OBJECT 'pf.P2.ckanalitic' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Conturi analitice", ;
		Comment = "*:OnResize=LT", ;
		ControlSource = "", ;
		FontBold = .F., ;
		FontName = "Courier New", ;
		Height = 17, ;
		Left = 464, ;
		Name = "ckanalitic", ;
		TabIndex = 4, ;
		Top = 36, ;
		Value = 0, ;
		Width = 141, ;
		ZOrderSet = 37
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'pf.P2.cksold1' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "\<Solduri la 1 ian.", ;
		Comment = "*:OnResize=LT", ;
		ControlSource = "", ;
		FontBold = .F., ;
		FontName = "Courier New", ;
		Height = 17, ;
		Left = 618, ;
		Name = "cksold1", ;
		TabIndex = 4, ;
		Top = 16, ;
		Value = 0, ;
		Width = 141, ;
		ZOrderSet = 37
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'pf.P2.cktotal1' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Total clase (gr.1)", ;
		Comment = "*:OnResize=LT", ;
		ControlSource = "", ;
		FontBold = .F., ;
		FontName = "Courier New", ;
		Height = 17, ;
		Left = 224, ;
		Name = "cktotal1", ;
		TabIndex = 2, ;
		Top = 15, ;
		Value = 0, ;
		Width = 148, ;
		ZOrderSet = 37
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'pf.P2.cktotal2' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Total grupe (gr.2)", ;
		Comment = "*:OnResize=LT", ;
		ControlSource = "", ;
		FontBold = .F., ;
		FontName = "Courier New", ;
		Height = 17, ;
		Left = 224, ;
		Name = "cktotal2", ;
		TabIndex = 3, ;
		Top = 34, ;
		Value = 0, ;
		Width = 148, ;
		ZOrderSet = 37
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'pf.P2.cktotal3' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Total conturi sintetice (gr.3)", ;
		Comment = "*:OnResize=LT", ;
		ControlSource = "", ;
		FontBold = .F., ;
		FontName = "Courier New", ;
		Height = 17, ;
		Left = 224, ;
		Name = "cktotal3", ;
		TabIndex = 5, ;
		Top = 54, ;
		Value = 0, ;
		Width = 232, ;
		ZOrderSet = 37
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'pf.P2.cktotal4' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Conturi", ;
		Comment = "*:OnResize=LT", ;
		ControlSource = "", ;
		FontBold = .F., ;
		FontName = "Courier New", ;
		Height = 17, ;
		Left = 464, ;
		Name = "cktotal4", ;
		TabIndex = 6, ;
		Top = 16, ;
		Value = 1, ;
		Width = 71, ;
		ZOrderSet = 37
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'pf.P2.Shape1' AS shape WITH ;
		BackColor = 236,249,255, ;
		BorderStyle = 3, ;
		Comment = "*:OnResize=ST", ;
		Height = 76, ;
		Left = 2, ;
		Name = "Shape1", ;
		Top = 1, ;
		Width = 790
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'pf.p3.Optiongroup1' AS optiongroup WITH ;
		AutoSize = .F., ;
		BackStyle = 0, ;
		BorderStyle = 0, ;
		ButtonCount = 8, ;
		Comment = "*:OnResize=RT", ;
		ControlSource = "", ;
		Height = 61, ;
		Left = 204, ;
		Name = "Optiongroup1", ;
		SpecialEffect = 1, ;
		Top = 12, ;
		Value = 8, ;
		Width = 385, ;
		ZOrderSet = 3, ;
		Option1.AutoSize = .F., ;
		Option1.BackStyle = 0, ;
		Option1.Caption = "\<Rulaj Debit", ;
		Option1.ControlSource = "", ;
		Option1.Enabled = .T., ;
		Option1.FontName = "Courier New", ;
		Option1.FontSize = 9, ;
		Option1.Height = 16, ;
		Option1.Left = 112, ;
		Option1.Name = "Option3", ;
		Option1.TabIndex = 3, ;
		Option1.Top = 5, ;
		Option1.Value = 0, ;
		Option1.Width = 99, ;
		Option2.AutoSize = .F., ;
		Option2.BackStyle = 0, ;
		Option2.Caption = "R\<ulaj Credit", ;
		Option2.ControlSource = "", ;
		Option2.Enabled = .T., ;
		Option2.FontName = "Courier New", ;
		Option2.FontSize = 9, ;
		Option2.Height = 16, ;
		Option2.Left = 112, ;
		Option2.Name = "Option4", ;
		Option2.TabIndex = 4, ;
		Option2.Top = 25, ;
		Option2.Value = 0, ;
		Option2.Width = 106, ;
		Option3.AutoSize = .F., ;
		Option3.BackStyle = 0, ;
		Option3.Caption = "Tota\<l Debit", ;
		Option3.ControlSource = "", ;
		Option3.Enabled = .T., ;
		Option3.FontName = "Courier New", ;
		Option3.FontSize = 9, ;
		Option3.Height = 16, ;
		Option3.Left = 257, ;
		Option3.Name = "Option6", ;
		Option3.TabIndex = 6, ;
		Option3.Top = 5, ;
		Option3.Width = 99, ;
		Option4.AutoSize = .F., ;
		Option4.BackStyle = 0, ;
		Option4.Caption = "T\<otal Credit", ;
		Option4.ControlSource = "", ;
		Option4.Enabled = .T., ;
		Option4.FontName = "Courier New", ;
		Option4.FontSize = 9, ;
		Option4.Height = 16, ;
		Option4.Left = 257, ;
		Option4.Name = "Option7", ;
		Option4.TabIndex = 7, ;
		Option4.Top = 25, ;
		Option4.Value = 0, ;
		Option4.Width = 106, ;
		Option5.AutoSize = .T., ;
		Option5.BackStyle = 0, ;
		Option5.Caption = "Ru\<laje Deb&Cred", ;
		Option5.FontName = "Courier New", ;
		Option5.FontSize = 9, ;
		Option5.Height = 17, ;
		Option5.Left = 112, ;
		Option5.Name = "Option5", ;
		Option5.TabIndex = 5, ;
		Option5.Top = 43, ;
		Option5.Value = 0, ;
		Option5.Width = 127, ;
		Option6.AutoSize = .T., ;
		Option6.BackStyle = 0, ;
		Option6.Caption = "Tot\<al Deb&Cred", ;
		Option6.FontName = "Courier New", ;
		Option6.FontSize = 9, ;
		Option6.Height = 17, ;
		Option6.Left = 257, ;
		Option6.Name = "Option8", ;
		Option6.TabIndex = 8, ;
		Option6.Top = 43, ;
		Option6.Value = 0, ;
		Option6.Width = 120, ;
		Option7.AutoSize = .T., ;
		Option7.BackStyle = 0, ;
		Option7.Caption = "\<Fisa cont", ;
		Option7.FontName = "Courier New", ;
		Option7.FontSize = 9, ;
		Option7.Height = 17, ;
		Option7.Left = 12, ;
		Option7.Name = "Option2", ;
		Option7.TabIndex = 2, ;
		Option7.Top = 25, ;
		Option7.Value = 0, ;
		Option7.Width = 85, ;
		Option8.AutoSize = .T., ;
		Option8.BackStyle = 0, ;
		Option8.Caption = "Balanta", ;
		Option8.FontName = "Courier New", ;
		Option8.FontSize = 9, ;
		Option8.Height = 17, ;
		Option8.Left = 12, ;
		Option8.Name = "Option1", ;
		Option8.TabIndex = 1, ;
		Option8.Top = 5, ;
		Option8.Value = 1, ;
		Option8.Width = 71
		*< END OBJECT: BaseClass="optiongroup" />

	ADD OBJECT 'pf.p3.Shape1' AS shape WITH ;
		BackColor = 236,249,255, ;
		BorderStyle = 3, ;
		Comment = "*:OnResize=ST", ;
		Height = 76, ;
		Left = 2, ;
		Name = "Shape1", ;
		Top = 1, ;
		Width = 786
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'pf.P4.opt1' AS optiongroup WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		BorderStyle = 0, ;
		ButtonCount = 2, ;
		Height = 46, ;
		Left = 213, ;
		Name = "opt1", ;
		SpecialEffect = 1, ;
		Top = 12, ;
		Value = 1, ;
		Width = 46, ;
		Option1.AutoSize = .T., ;
		Option1.BackStyle = 0, ;
		Option1.Caption = "A4", ;
		Option1.FontName = "Courier New", ;
		Option1.Height = 17, ;
		Option1.Left = 5, ;
		Option1.Name = "Option1", ;
		Option1.Top = 5, ;
		Option1.Value = 1, ;
		Option1.Width = 36, ;
		Option2.AutoSize = .T., ;
		Option2.BackStyle = 0, ;
		Option2.Caption = "A3", ;
		Option2.FontName = "Courier New", ;
		Option2.Height = 17, ;
		Option2.Left = 5, ;
		Option2.Name = "Option2", ;
		Option2.Top = 24, ;
		Option2.Width = 36
		*< END OBJECT: BaseClass="optiongroup" />

	ADD OBJECT 'pf.P4.opt2' AS optiongroup WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		BorderStyle = 0, ;
		ButtonCount = 2, ;
		Height = 46, ;
		Left = 285, ;
		Name = "opt2", ;
		SpecialEffect = 1, ;
		Top = 12, ;
		Value = 1, ;
		Width = 179, ;
		Option1.AutoSize = .T., ;
		Option1.BackStyle = 0, ;
		Option1.Caption = "Total", ;
		Option1.FontName = "Courier New", ;
		Option1.Height = 17, ;
		Option1.Left = 5, ;
		Option1.Name = "Option1", ;
		Option1.Top = 5, ;
		Option1.Value = 1, ;
		Option1.Width = 57, ;
		Option2.AutoSize = .T., ;
		Option2.BackStyle = 0, ;
		Option2.Caption = "Solduri la 1 ianuarie", ;
		Option2.FontName = "Courier New", ;
		Option2.Height = 17, ;
		Option2.Left = 5, ;
		Option2.Name = "Option2", ;
		Option2.Top = 24, ;
		Option2.Width = 169
		*< END OBJECT: BaseClass="optiongroup" />

	ADD OBJECT 'pf.P4.Shape1' AS shape WITH ;
		BackColor = 236,249,255, ;
		BorderStyle = 3, ;
		Comment = "*:OnResize=ST", ;
		Height = 76, ;
		Left = 2, ;
		Name = "Shape1", ;
		Top = 1, ;
		Width = 786
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Resizer1' AS resizer WITH ;
		Left = 792, ;
		Name = "Resizer1", ;
		TabIndex = 16, ;
		Top = 405, ;
		ZOrderSet = 13, ;
		Label1.Name = "Label1"
		*< END OBJECT: ClassLib="..\clase\resizer.vcx" BaseClass="control" />

	ADD OBJECT 'Shape2' AS shape WITH ;
		BackColor = 0,64,128, ;
		BackStyle = 1, ;
		Comment = "*:OnResize=ST", ;
		Height = 38, ;
		Left = -24, ;
		Name = "Shape2", ;
		SpecialEffect = 0, ;
		Top = -2, ;
		Width = 828, ;
		ZOrderSet = 0
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'txtcont' AS textbox WITH ;
		Comment = "*:OnResize=LT", ;
		ControlSource = "", ;
		Height = 23, ;
		Left = 34, ;
		Name = "txtcont", ;
		SpecialEffect = 1, ;
		TabIndex = 1, ;
		Top = 87, ;
		Width = 37, ;
		ZOrderSet = 14
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Txtcont2' AS textbox WITH ;
		Comment = "*:OnResize=LT", ;
		ControlSource = "", ;
		Format = "k", ;
		Height = 23, ;
		Left = 84, ;
		Name = "Txtcont2", ;
		SpecialEffect = 1, ;
		TabIndex = 2, ;
		Top = 87, ;
		Width = 37, ;
		ZOrderSet = 18
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE Activate
		
		*!*	tw1=thisform.Width
		*!*	tl1=thisform.Height
		
		*!*	thisform.WindowState=2
		*!*	tw2=thisform.Width
		*!*	tl2=thisform.Height
		
		*!*	gw1=thisform.grid1.width
		*!*	gl1=thisform.grid1.height
		
		*!*	thisform.grid1.width=ROUND(gw1*tw2/tw1,0)
		*!*	thisform.grid1.height=ROUND(gl1*tl2/tl1,0)
		
		*!*	thisform.paint
		*!*	thisform.refresh
		THISFORM.WindowState= 2
		
		
		
	ENDPROC

	PROCEDURE adauga_linie
		Private pcbal,pcCont,pcSCont,pcACont,pnButon
		Store "" To pcbal,pcCont,pcSCont,pcACont
		pnButon=1
		pcbal=This.CALIas
		pcCont=SELECT_CONT()
		If pnButon=2
			Return
		Endif
		If Empty(pcCont)
			Return
		Endif
		
		pcSCont=Left(pcCont,4)
		lnPos=At(".",pcCont)
		If lnPos>0
			pcACont=Padr(Substr(pcCont,lnPos+1),4," ")
		Endif
		
		pcexec=[begin balanainsproc(']+Alltrim(gcS)+[',]+Alltrim(Str(gnLuna))+[,]+Alltrim(Str(gnAn))+;
			[,']+Alltrim(pcSCont)+[',']+Alltrim(pcACont)+['); end;]
		lnSucces=goExecutor.oexecute(pcexec)
		If lnSucces < 0
			lcTextEroare = goExecutor.cEroare
			Messagebox(lcTextEroare,48,"Eroare")
			Return
		Endif
		
		If !Empty(pcACont)
			Thisform.pf.p2.ckanalitic.Value=1
		Endif
		
		Thisform.MousePointer=11
		Thisform.LockScreen=.T.
		Thisform.reconstruct
		Thisform.afisactual
		Select (pcbal)
		Locate For Cont=pcSCont And acont=pcACont
		Thisform.LockScreen=.F.
		Thisform.MousePointer= 0
		Thisform.grid1.SetFocus
		
	ENDPROC

	PROCEDURE afisactual
		Private lcbal,lcacont  && ,lccont1,lccont2 - le-am pus inainte de do form
		lcbal=Thisform.calias
		
		Local T1
		T1=""
		T='.t.'
		
		lccont1=Alltrim(This.txtcont.Value)
		lccont2=Alltrim(This.txtcont2.Value)
		
		If Empty(lccont2)
			lccont2 = lccont1
		Endif
		
		*lcacont=ALLTRIM(this.txtacont.value)
		lcacont1=Alltrim(This.ct1.text1.Value)
		lcacont2=Alltrim(This.ct1.text2.Value)
		lcacont3=Alltrim(This.ct1.text3.Value)
		lcacont4=Alltrim(This.ct1.text4.Value)
		
		Do Case
		Case Len(lccont1)=1
		*T=[G1="]+LCCONT+["]
			T = T + [ and VAL(LEFT(G1,1))>=VAL(lcCont1)]
		Case Len(lccont1)=2
		*T=[G2="]+LCCONT+["]
			T = T + [ and VAL(PADR(ALLTRIM(G2),2,'0'))>=VAL(lcCont1)]
		Case Len(lccont1)=3
		*T=[G3="]+LCCONT+["]
			T = T + [ and VAL(PADR(ALLTRIM(G3),3,'0'))>=VAL(lcCont1)]
		Case Len(lccont1)=4
		*T=[G4="]+LCCONT+["]
			T = T + [ and VAL(PADR(ALLTRIM(G4),4,'0'))>=VAL(lcCont1)]
		Endcase
		
		Do Case
		Case Len(lccont2)=1
		*T=[G1="]+LCCONT+["]
			T = T + [ and VAL(LEFT(G1,1))<=VAL(lcCont2)]
		Case Len(lccont2)=2
		*T=[G2="]+LCCONT+["]
			T = T + [ and VAL(PADR(ALLTRIM(G2),2,'0'))<=VAL(lcCont2)]
		Case Len(lccont2)=3
		*T=[G3="]+LCCONT+["]
			T = T + [ and VAL(PADR(ALLTRIM(G3),3,'0'))<=VAL(lcCont2)]
		Case Len(lccont2)=4
		*T=[G4="]+LCCONT+["]
			T = T + [ and VAL(PADR(ALLTRIM(G4),4,'0'))<=VAL(lcCont2)]
		Endcase
		
		*--------------------------------------------------------
		&&& conditia de filtrare pt balanta sintetica
		*!*	T1=[SET FILT TO]
		*!*	lccond1=[]
		*!*	IF !EMPTY(lcCont)
		*!*		lccond1=[ UPPER(LEFT(cont,]+ALLTRIM(STR(LEN(ALLTRIM(lcCont))))+[))="]+ALLTRIM(lcCont)+["]
		*!*	ENDIF
		
		*!*	T1 = T1 + lcCond1
		*!*	****
		
		
		*!*	*!*	WAIT WINDOW 't = '+t
		*!*	*	WAIT WINDOW 't1 = '+t1
		*!*	*!*	if thisform.check1.Value=1
		*!*	*!*		T="UPPER(LEFT(cont,LEN(M.cont)))==M.cont"
		*!*	*!*	ENDIF
		
		
		
		
		*!*	llTotal1=IIF(this.pf.p2.cktotal1.Value=1,.t.,.f.)
		*!*	llTotal2=IIF(this.pf.p2.cktotal2.Value=1,.t.,.f.)
		*!*	llTotal3=IIF(this.pf.p2.cktotal3.Value=1,.t.,.f.)
		*!*	llTotal4=IIF(this.pf.p2.cktotal4.Value=1,.t.,.f.)
		*!*	llAnalitic=IIF(this.pf.p2.ckanalitic.Value=1,.t.,.f.)
		
		
		
		*!*	lclista=[]
		*!*	IF llTotal1
		*!*		lclista=lclista+[,1]
		*!*	ENDIF
		*!*	IF llTotal2
		*!*		lclista=lclista+[,2]
		*!*	ENDIF
		*!*	IF llTotal3
		*!*		lclista=lclista+[,3]
		*!*	ENDIF
		*!*	IF llTotal4
		*!*		lclista=lclista+[,4]
		*!*	ENDIF
		*!*	IF llAnalitic
		*!*		lclista=lclista+[,5]
		*!*	ENDIF
		
		
		*!*	IF !EMPTY(lclista)
		*!*		IF LEFT(lclista,1)=","
		*!*			lclista=SUBSTR(lclista,2)
		*!*		ENDIF
		*!*		T=T+[ AND INLIST(BNIVEL,]+LCLISTA+[)]
		*!*	ELSE
		*!*		T=T+[ AND .F.]
		*!*	ENDIF
		
		*!*	lccond2=[]
		
		
		*!*	IF !EMPTY(lcaCont1)
		*!*		lccond2= lccond2 + [ and SUBSTR(acont,1,1)="]+lcaCont1+["]
		*!*	ENDIF
		*!*	IF !EMPTY(lcaCont2)
		*!*		lccond2= lccond2 + [ and SUBSTR(acont,2,1)="]+lcaCont2+["]
		*!*	ENDIF
		*!*	IF !EMPTY(lcaCont3)
		*!*		lccond2= lccond2 + [ and SUBSTR(acont,3,1)="]+lcaCont3+["]
		*!*	ENDIF
		*!*	IF !EMPTY(lcaCont4)
		*!*		lccond2= lccond2 + [ and SUBSTR(acont,4,1)="]+lcaCont4+["]
		*!*	ENDIF
		*!*	*!*	IF THIS.pf.p1.check1.Value = 1
		*!*	*!*		T1 = T1 + lcCond2
		*!*	*!*	ENDIF
		
		*!*	T= T + lcCond2
		*!*	IF this.pf.p2.ck_cont.Value = 1
		*!*		T = t + " AND " + this.pf.p2.ck_cont.filtru
		*!*	ENDIF
		
		*!*	T=[SET FILT TO ]+T
		*!*	SELECT (LCBAL)
		*!*	&T
		
		
		*!*	SELECT BAL
		*!*	&T1
		*!*	IF existacamp("bal","precdeb1")
		*!*		sum PRECDEB1,PRECCRED1,precdeb,preccred,ruldeb,rulcred,totdeb,totcred,solddeb,soldcred;
		*!*		 to m.sprecdeb1,m.spreccred1,m.sprecdeb,m.spreccred,m.sruldeb,m.srulcred,m.stotdeb,m.stotcred,m.ssolddeb,m.ssoldcred
		*!*	ELSE
		*!*		sum precdeb,preccred,ruldeb,rulcred,totdeb,totcred,solddeb,soldcred;
		*!*		 to m.sprecdeb,m.spreccred,m.sruldeb,m.srulcred,m.stotdeb,m.stotcred,m.ssolddeb,m.ssoldcred
		*!*		 STORE 0 TO m.sprecdeb1,m.spreccred1
		*!*	ENDIF
		
		*!*	SET FILTER TO
		
		*!*	IF this.pf.p1.check1.Value = 1
		*!*		SELECT (LCBAL)
		*!*		sum PRECDEB1,PRECCRED1,precdeb,preccred,ruldeb,rulcred,totdeb,totcred,solddeb,soldcred FOR bnivel = 5 ;
		*!*		 to m.sprecdeb1,m.spreccred1,m.sprecdeb,m.spreccred,m.sruldeb,m.srulcred,m.stotdeb,m.stotcred,m.ssolddeb,m.ssoldcred
		*!*	ENDIF
		*!*
		*!*	WITH thisform.pf.p1
		*!*		.text1.Refresh
		*!*		.text2.Refresh
		*!*		.text3.Refresh
		*!*		.text4.Refresh
		*!*		.text5.Refresh
		*!*		.text6.Refresh
		*!*		.text7.Refresh
		*!*		.text8.Refresh
		*!*		.TXTpreccred1.Refresh
		*!*		.TXTprecdeb1.Refresh
		*!*	ENDWITH
		
		*!*	SELECT (LCBAL)
		*!*	GO top
		*!*	THIS.GRID1.Refresh
		
		
		*/-----------------------------------------------------
		&&& conditia de filtrare pt balanta sintetica
		llTotal1=Iif(This.pf.p2.cktotal1.Value=1,.T.,.F.)
		llTotal2=Iif(This.pf.p2.cktotal2.Value=1,.T.,.F.)
		llTotal3=Iif(This.pf.p2.cktotal3.Value=1,.T.,.F.)
		llTotal4=Iif(This.pf.p2.cktotal4.Value=1,.T.,.F.)
		llAnalitic=Iif(This.pf.p2.ckanalitic.Value=1,.T.,.F.)
		
		
		
		lclista=[]
		If llTotal1
			lclista=lclista+[,1]
		Endif
		If llTotal2
			lclista=lclista+[,2]
		Endif
		If llTotal3
			lclista=lclista+[,3]
		Endif
		If llTotal4
			lclista=lclista+[,4]
		Endif
		If llAnalitic
			lclista=lclista+[,5]
		Endif
		
		
		If !Empty(lclista)
			If Left(lclista,1)=","
				lclista=Substr(lclista,2)
			Endif
			T=T+[ AND INLIST(BNIVEL,]+lclista+[)]
		Else
			T=T+[ AND .F.]
		Endif
		
		lccond2=[]
		
		If !Empty(lcacont1)
			lccond2= lccond2 + [ and SUBSTR(acont,1,1)="]+lcacont1+["]
		Endif
		If !Empty(lcacont2)
			lccond2= lccond2 + [ and SUBSTR(acont,2,1)="]+lcacont2+["]
		Endif
		If !Empty(lcacont3)
			lccond2= lccond2 + [ and SUBSTR(acont,3,1)="]+lcacont3+["]
		Endif
		If !Empty(lcacont4)
			lccond2= lccond2 + [ and SUBSTR(acont,4,1)="]+lcacont4+["]
		Endif
		
		T= T + lccond2
		If thisform.pf.p2.ck_cont.Value = 1
				T = T + thisform.pf.p2.ck_cont.filtru_vfp
		Endif
		
		T=[SET FILT TO ]+T
		Select (lcbal)
		*!*	Copy To C:\BAL.Dbf
		&T
		
		Select (lcbal)
		Sum PRECDEB1,PRECCRED1,precdeb,preccred,ruldeb,rulcred,totdeb,totcred,solddeb,soldcred For bnivel = 4 ;
			to m.sprecdeb1,m.spreccred1,m.sprecdeb,m.spreccred,m.sruldeb,m.srulcred,m.stotdeb,m.stotcred,m.ssolddeb,m.ssoldcred
		
		
		If This.pf.p1.check1.Value = 1
			Select (lcbal)
			Sum PRECDEB1,PRECCRED1,precdeb,preccred,ruldeb,rulcred,totdeb,totcred,solddeb,soldcred For bnivel = 5 ;
				to m.sprecdeb1,m.spreccred1,m.sprecdeb,m.spreccred,m.sruldeb,m.srulcred,m.stotdeb,m.stotcred,m.ssolddeb,m.ssoldcred
		Endif
		
		With Thisform.pf.p1
			.text1.Refresh
			.text2.Refresh
			.text3.Refresh
			.text4.Refresh
			.text5.Refresh
			.text6.Refresh
			.text7.Refresh
			.text8.Refresh
			.TXTpreccred1.Refresh
			.TXTprecdeb1.Refresh
		Endwith
		
		Select (lcbal)
		Go Top
		This.GRID1.Refresh
		
	ENDPROC

	PROCEDURE butapend
		*!*	LOCAL lbMenu[4]
		*!*	PRIVATE lcbal
		*!*	lcbal=THISFORM.calias
		
		
		*!*	lbMenu=""
		*!*	lbMenu[1]="\<Deblocare"
		*!*	IF THISFORM.grid1.READONLY
		*!*		lbMenu[2]="\Adaug Blanc"
		*!*	ELSE
		*!*		lbMenu[2]="\<Adaug Blanc"
		*!*	ENDIF
		*!*	lbMenu[3]="\-"
		*!*	lbMenu[4]="\<Revenire"
		
		
		*!*	THISFORM.oMenuShortcut.ShowMenu(@lbMenu)
		
		*!*	DO CASE
		*!*		CASE BAR()=1
		
		*!*			SELECT (lcbal)
		*!*			SET FILTER TO !DELETED()
		*!*			THISFORM.grid1.READONLY=.F.
		*!*			THISFORM.grid1.DELETEMARK=.T.
		
		*!*		CASE BAR()=2
		*!*			this.adauga_linie()
		*!*		CASE BAR()=4
		*!*	*SELE BAL
		*!*			SELECT (lcbal)
		*!*			SET FILTER TO !DELETED()
		*!*			THISFORM.grid1.READONLY=.T.
		*!*			THISFORM.grid1.DELETEMARK=.F.
		*!*	ENDCASE
		
		
		
		
		
	ENDPROC

	PROCEDURE butdrept
		*return
		Private lcsel,lccont
		lcsel=This.CALIAS
		
		Local laMenu[9]
		Select (lcsel)
		lccont=Cont
		
		laMenu=""
		
		laMenu[1]="\<Fisa cont "+Alltrim(lccont)
		laMenu[2]="\-"
		laMenu[3]="\<Rulaj Debit"
		laMenu[4]="R\<ulaj Credit"
		laMenu[5]="Ru\<laje Deb&Cred"
		laMenu[6]="\-"
		laMenu[7]="\<Total Debit"
		laMenu[8]="T\<otal Credit"
		laMenu[9]="Tot\<al Deb&Cred"
		
		Thisform.oMenuShortcut.ShowMenu(@laMenu)
		
		Do Case
		Case Bar()=1
			Thisform.fisacont
		Case Bar()=3
			Thisform.ruldeb
		Case Bar()=4
			Thisform.rulcred
		Case Bar()=5
			Thisform.ruldebcred
		Case Bar()=7
			Thisform.totdeb
		Case Bar()=8
			Thisform.totcred
		Case Bar()=9
			Thisform.totdebcred
		Endcase
		
		*laMenu[1]="\<Copiaza"
		*laMenu[2]="Re\<da"
		*laMenu[3]="\-"
		*CASE BAR()=1
		*	SYS(1500,'_MED_copy','_MEDIT')
		*CASE BAR()=2
		*	SYS(1500,'_MED_paste','_MEDIT')
		
		Thisform.txtcont.Refresh
		
	ENDPROC

	PROCEDURE calculeaza
		Private pcSufix,pcAlias,pnOldValue,pcVar,pnValoare,pnRec,pcOldAlias,pcFiltru,pcAcont
		pcSufix=Thisform.cField
		pcAlias=Thisform.cAlias
		pnOldValue=Thisform.noldvalue
		
		Select (pcAlias)
		pcVar=pcAlias+[.]+pcSufix
		pnValoare=Evaluate(pcVar)
		pcAcont=Upper(Alltrim(acont))
		
		This.nnewvalue=pnValoare
		lnNewValue=This.nnewvalue
		pcFiltru=Filter()
		pnRec=Recno()
		pcField=This.cField
		
		If lnNewValue!=pnOldValue
			If Empty(This.ccont) && o linie cu totaluri
				Wait Window "Nu puteti modifica totalul." Timeout 1
				Select (pcAlias)
				Replace &pcVar With pnOldValue
				This.nnewvalue=pnOldValue
				Return
			Endif
			lcDbf=Dbf(pcAlias)
			Use (lcDbf) In 0 Again Shared Alias TBALANTAR
			Select TBALANTAR
			Goto pnRec
			pcOldAlias=This.cAlias
			This.cAlias="TBALANTAR"
		*	If Inlist(lcField,"PRECDEB","PRECCRED","RULDEB","RULCRED") && NU CALCULEZ DECAT PT PRECEDENTE SI RULAJE
			Thisform.calculeaza_orizontal() && calculez pentru linia curenta
		*	Endif
			If Empty(pcAcont)			&& cont2003 oracle
				Thisform.calculeaza_vertical()  && calculez pentru linia cu totaluri
			Endif
			Use In TBALANTAR
			This.cAlias=pcOldAlias
			Select (pcOldAlias)
			This.in_bal(This.ccont,pcAcont,.T.)	&& introduc in bal noua valoare si recalculez
		*!*		Select (lcAlias)
		*!*		Set Filter To &lcFilter
		Endif
		This.afisactual
	ENDPROC

	PROCEDURE calculeaza_orizontal
		PARAMETERS tcAlias
		PRIVATE lcAlias
		
		IF EMPTY(tcAlias)
			lcAlias=thisform.calias 
		ELSE
			lcAlias=ALLTRIM(tcalias)
		ENDIF 
		*WAIT WINDOW 'calculeaza orizontal '+lcalias
		*!*	SELECT (lcAlias)
		*!*	lcCont=CONT
		*!*	lcG1=G1
		*!*	lcG2=G2
		*!*	lcG3=G3
		*!*	lcG4=G4
		*!*	lcCond=[left(cont,]+ALLTRIM(STR(LEN(lccont)))+[)=]+lccont+[ AND G1=]+lcG1+[ AND G2=]+lcG2+[ AND G3=]+lcG3+[ AND G4=]+lcG4
		*!*	WAIT WINDOW lcCond
		
		SELECT (lcAlias)
		IF FLOCK()
			REPLACE totdeb WITH precdeb+ruldeb,totcred WITH preccred+rulcred
			REPLACE solddeb WITH IIF(totdeb-totcred>=0,ABS(totdeb-totcred),0),soldcred WITH IIF(totdeb-totcred<0,ABS(totdeb-totcred),0)
			UNLOCK
		*	brow
		ENDIF 
				
		
		
		
		
	ENDPROC

	PROCEDURE calculeaza_vertical
		Private lccont,lcAlias,lnRec,lnDifValue,lcField,lnValoare,laarray
		
		lcAlias=This.calias
		Select (lcAlias)
		lnRec=Recno()
		lccont=Alltrim(This.ccont)
		*WAIT WINDOW 'lccont= '+lccont
		lcField=This.cfield
		lnDifValue=This.nnewvalue- This.noldvalue
		*WAIT WINDOW 'lndifvalue = '+STR(lndifValue)
		*WAIT WINDOW 'calculeaza vertical '+lcalias
		
		lnlung=4
		Dimension laarray[lnlung]
		Store Space(4) To laarray
		For i=1 To lnlung-1
		*	WAIT WINDOW 'i= '+STR(i)
			laarray[i] = Substr(lccont,1,i)
		*	WAIT WINDOW laArray[i]
			lcVar="G"+Alltrim(Str(i))
			lcVar1="G"+Alltrim(Str(i+1))
			LCCOND=[LOCATE FOR LEFT(]+lcVar+[,]+Alltrim(Str(i))+[)="]+Left(laarray[I],i)+[" AND EMPTY(]+lcVar1+[)]
		*	WAIT WINDOW lccond
			Select (lcAlias)
			&LCCOND
			If Found()
				If Flock()
					lnValoare=Evaluate(lcField)+lnDifValue
					Replace &lcField With lnValoare
					This.calculeaza_orizontal(lcAlias) && calculez pentru liniile cu totaluri
					Unlock
				Endif
			Endif
		Endfor
		
		Select (lcAlias)
		Goto lnRec
	ENDPROC

	PROCEDURE cfield_assign
		LPARAMETERS vNewVal
		*To do: Modify this routine for the Assign method
		THIS.cfield = m.vNewVal
		
		PRIVATE lcAlias,lcSufix,lcVar
		lcAlias=thisform.calias 
		lcSufix=this.cField
		lcVar=lcAlias+[.]+lcSufix
		lcCont=lcAlias+[.cont]
		THISFORM.nOldValue=EVALUATE(lcVar)
		thisform.ccont=EVALUATE(lcCont)
		*WAIT WINDOW 'ccont '+thisform.ccont
		
	ENDPROC

	PROCEDURE do_excel
		Local i,xlsheet,XLApp,tmpsheet, lcAlias, lcFiltru, lcColumnList, lcHeaderList, lcSelect, lcOutput, lcFrom, lcWhere, lcOrder
		lcAlias = this.grid1.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 = 'g5'
		lcOutput = 'crsBal'
		
		get_schema_grid(this.grid1,@lcColumnList, @lcHeaderList, @lcSelect, llSelect, lcType, lcFrom, lcWhere, lcOrder, lcOutput)
		&lcSelect
		*!*	MESSAGEBOX(p3)
		IF USED(lcOutput)
			DO export_xls WITH lcOutput IN oproceduri_comune.prg
			USE IN (lcOutput)
		ENDIF 	
		
		
		RETURN 
		
		*!*	On Error Do exportare With Thisform.grid1.RecordSource,p1,p2
		*!*	tmpsheet = Getobject('','excel.sheet')
		*!*	On Error
		
		*!*	If exista_excel
		*!*		Wait Window "Se transmit datele catre Excel..." Nowait
		
		*!*		XLApp = tmpsheet.Application
		
		*!*		XLApp.workbooks.Close()
		*!*		XLApp.workbooks.Add()
		*!*		poExcel = XLApp.ActiveSheet
		
		
		*!*		Go Top
		*!*		poExcel.Cells(1,1).Font.Size=16
		*!*		poExcel.Cells(1,1).Font.Bold=.T.
		*!*		poExcel.Cells(1,1)=Thisform.titluFRUMOS1.Caption+" Luna "+Alltrim(Str(gnLuna))+"/"+Alltrim(Str(gnAn))
		*!*		nRows = 3
		*!*		With Thisform.grid1
		*!*			For nCol = 1 To .ColumnCount
		*!*				nColumn = .Columns(nCol).ColumnOrder
		*!*				poExcel.Columns(nColumn).ColumnWidth = .Columns(nCol).Width/7.5
		*!*				For lnobjcol=1 To .Columns(nCol).Objects.Count
		*!*					If Upper(.Columns(nCol).Objects(lnobjcol).BaseClass)='HEADER'
		*!*						poExcel.Cells(nRows,nColumn) = .Columns(nCol).Objects(lnobjcol).Caption
		*!*						Exit
		*!*					Endif
		*!*				Endfor
		*!*				poExcel.Cells(nRows,nColumn).Font.Bold = .T.
		*!*				poExcel.Cells(nRows,nColumn).Interior.ColorIndex = 16
		*!*			Endfor
		*!*			Scan
		*!*				nRows = nRows + 1
		*!*				For nCol = 1 To .ColumnCount
		*!*					nColumn = .Columns(nCol).ColumnOrder
		*!*					If At('CHECK',Upper(.Columns(nCol).CurrentControl))>0
		*!*						poExcel.Cells(nRows,nColumn)=Iif(Eval(.Columns(nCol).ControlSource)==0,'NU','DA')
		*!*					Else
		*!*						poExcel.Cells(nRows,nColumn) = IIF(empty(Eval(.Columns(nCol).ControlSource)),'',Eval(.Columns(nCol).ControlSource))
		*!*					Endif
		*!*				Endfor
		*!*			Endscan
		*!*		Endwith
		
		*!*		XLApp.Visible = .T.
		*!*	Endif
	ENDPROC

	PROCEDURE do_listare
		Private lla4,llsolduri,pcPerioadaRef,pcDataOra
		Local Tlist
		
		pcDataOra = ''
		pcDataOra = get_ora(2)
		
		pcPerioadaRef = 'Luna ' + Padl(Alltrim(Str(gnLuna)),2,'0') + "/" + Alltrim(Str(gnAn))
		lla4=.F.
		If Thisform.pf.p4.opt1.Value=1
			lla4=.T.
		Endif
		
		llsolduri=.T.
		If Thisform.pf.p4.opt2.Value=1
			llsolduri=.F.
		Endif
		
		
		LNG1=Thisform.pf.p2.cktotal1.Value
		LNG2=Thisform.pf.p2.cktotal3.Value
		LNG3=Thisform.pf.p2.cktotal3.Value
		LNG4=Thisform.pf.p2.cktotal4.Value
		LNG5=Thisform.pf.p2.ckanalitic.Value
		
		LCBAL=Thisform.CALIas
		Select (LCBAL)
		
		LCPARTIALA=Iif(!Empty(Thisform.TXTcont.Value)," PARTIALA "," ")
		Do Case
		Case LNG5=1
			m.titlu='- ANALITICA'+LCPARTIALA+'-'
			Select (LCBAL)
			&T
			Replace All bifa With .F.
		
			Select Distinct Cont,bnivel,bifa From &LCBAL ;
				WHERE bnivel=5 ;
				INTO Cursor listbal Readwrite
		
			If _Tally # 0
				Do Form frm_list_balana
		
				Select listbal
				Scan For bifa
					Scatter Name olist
					Select (LCBAL)
					Replace All bifa With .T. For Cont=olist.Cont And bnivel=5
					Select listbal
				Endscan
				Release olist
		
				Select (LCBAL)
				Tlist = T + ' and !bifa '
				&Tlist
			Endif
			Use In listbal
			Select (LCBAL)
		
		Case LNG4=1 And LNG5=0
			m.titlu='- SINTETICA'+LCPARTIALA+'-'
		Otherwise
			If Empty(LCPARTIALA)
				m.titlu=""
			Else
				m.titlu='-'+LCPARTIALA+'-'
			Endif
		Endcase
		
		Do Case
		Case !lla4
			lcRaport="rapbal_solduri_a3" && A3 CU SOLDURI LA 1 IANUARIE
		Case lla4 And !llsolduri
			lcRaport="rapbal_total_a4" && A4 FARA SOLDURI LA 1 IANUARIE
		Otherwise
			lcRaport="rapbal_solduri_a4" && A4 CU SOLODURI LA 1 IANUARIE
		Endcase
		thisform.AlwaysOnTop = .F.
		Report Format (lcRaport) To Printer Prompt Preview
		thisform.AlwaysOnTop = .T.
	ENDPROC

	PROCEDURE do_reface
		x= xmenu('Refacere \<lunara;Refacere cu \<precedente')
		lcSursa = [BALANTA]
		lnLuna = gnLuna
		lnAn = gnAn
		lcCont = []
		
		Do Case
		Case x = 1
			lcLunar = [0]
			*lcExec = [begin pack_refaceri.refac_balanta('] + gcS + [',] + Alltrim(Str(gnAn)) + [,] + Alltrim(Str(gnLuna)) + [,0); end;]
		Case x = 2
			lcLunar = [1]
			*lcExec = [begin pack_refaceri.refac_balanta('] + gcS + [',] + Alltrim(Str(gnAn)) + [,] + Alltrim(Str(gnLuna)) + [,1); end;]
		Otherwise
			Return
		Endcase
		
		*!*	lnSucces = goExecutor.oExecute(lcExec)
		*!*	If lnSucces < 0
		*!*		Messagebox(goExecutor.cEroare,0+16,'Eroare')
		*!*		Return
		*!*	Endif
		
		lnSucces = refacere(lcSursa,lcLunar,lcCont,lnLuna,lnAn) && IN orefaceri.prg
		IF lnSucces > 0
			Messagebox('Refacerea s-a terminat')
			Thisform.reconstruct
			Thisform.afisactual
			Do inainte With "BALANTA" In oinainte_de.prg
		ENDIF 
	ENDPROC

	PROCEDURE fisacont
		
		Private lcbal
		lcbal=Thisform.calias
		
		Select (lcbal)
		Scatter Name locont
		
		Private pcselect1,pcfiltru1,pcorder1,pcschema1,poact
		Store "" To poact
		*!*	pcschema1=['ID_ACT N(20),LUNA N(2),AN N(4),COD N(20),DATAIREG D,NRACT N(14),DATAACT D,'+]+;
		*!*		['EXPLICATIA C(100),SCD C(4),ASCD C(4),SCC C(4),ASCC C(4),SUMA N(19,2),PERECHED N(14),'+]+;
		*!*		['PERECHEC N(14),SUMA_VAL N(19,2),NUME_VAL C(5),CURS N(8,2),DATASCAD D,NEIMPOZAB N(19,2),'+]+;
		*!*		['NNIR N(10),ID_UTIL N(5),UTIL C(30),DATAORA T,ID_UTILS N(5),UTILS C(30),DATAORAS T,'+]+;
		*!*		['ID_RESPONSABIL N(5),NRESP C(30),ID_VENCHELT N(5),DST_CHLT C(100),ID_LUCRARE N(5),NRORD C(30),ID_SECTIE N(5),'+]+;
		*!*		['SECTIE C(30),PROC_TVA N(5,2),ID_SET N(20),ID_FACT N(20),ID_PARTD N(10),PARTD C(50),ID_PARTC N(10),'+]+;
		*!*		['PARTC C(50),ID_SUCURSALA N(5),SUCURSALA C(50),ID_FDOC N(5),FDOC C(30),'+]+;
		*!*		['EXPLICATIA4 C(100),EXPLICATIA5 C(100),ID_GESTD N(5),GESTD C(50),ID_GESTC N(5),GESTC C(50)']
		pcschema1=['']
		pcselect1=['select * from ] + gcS + [.vact where 1=2']
		pcfiltru1=[(luna=]+Alltrim(Str(gnLuna))+[ and an=]+Alltrim(Str(gnAn))+[) and (SCD=]+Substr(locont.Cont,1,4)+[ or scc=]+Substr(locont.Cont,1,4)+[)]
		pcorder1=['']
		llAfisare=.F.
		*!*	gencursor('poact','act',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfisare)
		gencursor('poact','acn1',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfisare)
		poact.ca_baza1.afisare()
														
		*!*	SELE ACT
		*!*	SET FILTER TO SCD=SUBSTR(locont.CONT,1,4) AND !DELETED()
		*!*	Do NRORD With "ACT"
		*!*	ORC=Createobj("AFDEBCRED")
		*!*	ORC.LABELTITLU.Caption="FISA CONTULUI "+locont.Cont
		*!*	ORC.ALI = 'ACT'
		*!*	ORC.Show(1)
		
		Do NRORD With "ACN1"
		SELECT acn1
		GO TOP 
		ORC=Createobject("frm_debcred")  
		orc.lb_titlu_alb_b121.caption=thisform.lb_titlu_alb_b121.caption+" - FISA CONTULUI "+locont.Cont
		orc.lb_titlu1.caption="FISA CONTULUI "+locont.Cont
		orc._grdbase1.removeobject("cUtil")
		orc._grdbase1.removeobject("cDataOra")
		ORC.Show(1)
		
		*!*	SELECT act
		*!*	SET FILTER TO
		Use In acn1
		Release poact
		Select(lcbal)
	ENDPROC

	PROCEDURE inainte_de_do_excel
		If Thisform.lactiv1
			This.do_excel
		Endif
	ENDPROC

	PROCEDURE inainte_de_do_listare
		If Thisform.lactiv2
			This.do_listare
		Endif
	ENDPROC

	PROCEDURE inainte_de_do_modifica
		If !Thisform.lactiv3 Or glLunaInchisa
			Return
		Endif
		Thisform.meniu_as
		Thisform.grID1.SetFocus
	ENDPROC

	PROCEDURE inainte_de_do_reface
		If Thisform.lactiv4 And !glLunaInchisa
			This.do_reface()
		Endif
		
	ENDPROC

	PROCEDURE Init
		lnLungimeBanda = Thisform.but_termin1.Width + 10
		lnPozitieButon = Thisform.but_termin1.Left
		lnLungimeButon = Thisform.but_termin1.Width + 1		&&	30 + 1 (spatiu)
		lnOffsetBanda = 6					&& diferenta dintre _shape2.left si but_termin1.left
		
		If !Empty(gcAcces)
		&&	format gcAcces = [optiune1];[optiune2];...;[optiuneN]; &&
			Local lcAcces,lnPozitieS,lnPozitieF,N
			lnPozitieS=1
			For i=1 To Occurs([;],gcAcces)
				lnPozitieF=At([;],gcAcces,i)
				lcAcces=Substr(gcAcces,lnPozitieS,lnPozitieF-lnPozitieS)
				lcProp='thisform.lactiv'+Alltrim(lcAcces)
				If Type(lcProp)<>'U'
					&lcProp=.T.
					lcProp='thisform.cbuton'+Alltrim(lcAcces)
					If Type(lcProp)<>'U' And !Empty(&lcProp)
		&&	format lcButoane = [nume_buton1];[nume_buton2];...;[nume_butonN]; &&
						lcButoane=&lcProp
						lnPS=1
						lcButoane=Iif(Substr(lcButoane,Len(lcButoane)-1)=[;],lcButoane,lcButoane+[;])
						For j=1 To Occurs([;],lcButoane)
							lnPF=At([;],lcButoane,j)
							lcButon=Substr(lcButoane,lnPS,lnPF-lnPS)
							lcProp='thisform.'+Alltrim(lcButon)+'.visible'
							If Type(lcProp)<>'U'
								&lcProp=.T.
							Endif
							lnPS=lnPF+1
						Endfor
					Endif
				Endif
				lnPozitieS=lnPozitieF+1
			Endfor
		Endif
		
		If Thisform.lactiv2
			lnPozitieButon = lnPozitieButon - lnLungimeButon
			lnLungimeBanda = lnLungimeBanda + lnLungimeButon
			Thisform.but_listare1.Left = lnPozitieButon
		Endif
		If Thisform.lactiv1
			lnPozitieButon = lnPozitieButon - lnLungimeButon
			lnLungimeBanda = lnLungimeBanda + lnLungimeButon
			Thisform.but_excel1.Left = lnPozitieButon
		Endif
		If Thisform.lactiv3 AND !glLunaInchisa
			lnPozitieButon = lnPozitieButon - lnLungimeButon
			lnLungimeBanda = lnLungimeBanda + lnLungimeButon
			thisform.but_modifica1.Left = lnPozitieButon
		Endif
		If Thisform.lactiv4 AND !glLunaInchisa
			lnPozitieButon = lnPozitieButon - lnLungimeButon
			lnLungimeBanda = lnLungimeBanda + lnLungimeButon
			Thisform.BUT_reface1.Left = lnPozitieButon
		ENDIF
		WITH thisform._shape2 
		* With Thisform.banda_alba
			.Width = lnLungimeBanda
			.Left = lnPozitieButon - lnOffsetBanda
		Endwith
			this.but_reface1.Visible=!glLunaInchisa
			this.but_moDIFICA1.Visible=!glLunaInchisa
		Public sz
		This.calias=This.grid1.RecordSource && TBALANTA
		Private lcbal
		lcbal=Thisform.calias
		
		Select(lcbal)
		Go Top
		
		Public m.sprecdeb1,m.spreccred1,m.sprecdeb,m.spreccred,m.sruldeb,m.srulcred,m.stotdeb,m.stotcred,m.ssolddeb,m.ssoldcred
		Store 0.0000 To m.sprecdeb1,m.spreccred1,m.sprecdeb,m.spreccred,m.sruldeb,m.srulcred,m.stotdeb,m.stotcred,m.ssolddeb,m.ssoldcred
		
		With Thisform.grid1
			.cprecdeb1.Width=0
			.cpreccred1.Width=0
		Endwith
		Thisform.afisactual
		*!*	DO verif_balana
		*!*	thisform.oafbalana=crea('afbalana')
		
	ENDPROC

	PROCEDURE in_bal
		Parameters tcCont,tcAcont,tlCalculeaza
		Private lcCont,lcField,lcOldAlias,lcTabela
		lcOldAlias=Alias()
		lcField=This.cfield
		lnvalue=This.nnewvalue
		lnOldValue=This.noldvalue
		
		If lnvalue=lnOldValue
			Return
		Endif
		
		If Empty(tcAcont)
			lcAcont=""
		Else
			lcAcont=Upper(Alltrim(tcAcont))
		Endif
		
		If Empty(tcCont)
			lcCont=""
		Else
			lcCont=Upper(Alltrim(tcCont))
		Endif
		
		If !Empty(lcAcont)
			lcTabela="balana"
			lcCond=[TRIM(UPPER(cont))=']+lcCont+[' and TRIM(UPPER(acont))=']+lcAcont+[' and an = ] + ALLTRIM(STR(gnAn)) + [ and luna = ] + ALLTRIM(STR(gnLuna))
		Else
			lcTabela="bal"
			lcCond=[TRIM(UPPER(cont))=']+lcCont+[' and an = ] + ALLTRIM(STR(gnAn)) + [ and luna = ] + ALLTRIM(STR(gnLuna))
		Endif
		
		*!*	If !EXISTACAMP(lcTabela,lcField) && DACA NU EXISTA CAMPUL NU FAC NIMIC
		*!*		Return
		*!*	Endif
		
		&& setare zecimale
		pcexec=[update ]+ALLTRIM(gcS)+[.]+ALLTRIM(lcTabela)+[ set ]+ALLTRIM(lcField)+[=]+ALLTRIM(STR(lnvalue,24,4))+[ ]+;
				[where ]+lcCond
		lnSucces=goExecutor.oexecute(pcexec)
		If lnSucces < 0
			lcTextEroare = goExecutor.cEroare
			Messagebox(lcTextEroare,48,"Eroare")
			Return
		Endif
		
		If tlCalculeaza
			This.calculeaza_orizontal()
		Endif
		
		If !Empty(lcOldAlias)
			Select (lcOldAlias)
		Endif
	ENDPROC

	PROCEDURE meniu_as
		Private lcbal
		lcbal=Thisform.calias
		
		If Thisform.grid1.ReadOnly
			lcText=[\<Deblocare;]
			lcText=lcText+[\-;]
			lcText=lcText+[\Adauga Blanc;]
			lcText=lcText+[\Sterge]
		Else
			lcText=[\<Revenire;]
			lcText=lcText+[\-;]
			lcText=lcText+[\<Adauga Blanc;]
			lcText=lcText+[\<Sterge]
		Endif
		lnOpt=xmenu(lcText)
		Do Case
		Case lnOpt=1
			With Thisform.grid1
				.ReadOnly=!.ReadOnly
				.ccont.ReadOnly=.T.
				.cacont.ReadOnly=.T.
				.cdenumire.ReadOnly=.T.
		&& cont2003 oracle
				.ctotdeb.ReadOnly=.T.
				.ctotcred.ReadOnly=.T.
				.csolddeb.ReadOnly=.T.
				.csoldcred.ReadOnly=.T.
			Endwith
		Case lnOpt=3
			This.adauga_linie()
		Case lnOpt=4
			This.sterge_linie()
		Endcase
		
	ENDPROC

	PROCEDURE reconstruct
		*!*	LOCAL llsucces
		*!*	llSucces=save_grid_tag(this.grid1)
		*!*	IF llsucces
		*!*		lctabel=make_tbalanta()
		*!*		restore_grid_tag(this.grid1)
		*!*	ENDIF
		save_grid_tag(This.grid1)
		lcTabel=make_tbalanta()
		restore_grid_tag(This.grid1)
	ENDPROC

	PROCEDURE Release
		PRIVATE lcbal
		lcbal=thisform.calias 
		
		RELEASE m.sprecdeb,m.spreccred,m.sruldeb,m.srulcred,m.stotdeb,m.stotcred,m.ssolddeb,m.ssoldcred
		
		SELECT (LCBAL)
		SET FILTER TO
	ENDPROC

	PROCEDURE Resize
		THIS.RESIZER1.ONREsize 
	ENDPROC

	PROCEDURE rulcred
		Private lcbal
		lcbal=Thisform.calias
		Select (lcbal)
		Local c
		
		Scatter Name LOCONT
		Thisform.AlwaysOnTop= .F.
		If LOCONT.RULCRED==0 Then
			OST=Createobj("stop")
			OST.LABEL2.Caption="Contul "+LOCONT.Cont+":"
			OST.LABEL3.Caption="Rulaj Credit = 0"
			OST.Show(1)
		Else
			Private pcselect1,pcfiltru1,pcorder1,pcschema1,poact
			Store "" To poact
			pcschema1=['ID_ACT N(20),LUNA N(2),AN N(4),COD N(20),DATAIREG D,NRACT N(14),DATAACT D,'+]+;
				['EXPLICATIA C(100),SCD C(4),ASCD C(4),SCC C(4),ASCC C(4),SUMA N(19,2),PERECHED N(14),'+]+;
				['PERECHEC N(14),SUMA_VAL N(19,2),NUME_VAL C(5),CURS N(8,2),DATASCAD D,NEIMPOZAB N(19,2),'+]+;
				['NNIR N(10),ID_UTIL N(5),UTIL C(30),DATAORA T,ID_UTILS N(5),UTILS C(30),DATAORAS T,'+]+;
				['ID_RESPONSABIL N(5),NRESP C(30),ID_VENCHELT N(5),DST_CHLT C(100),ID_LUCRARE N(5),NRORD C(30),ID_SECTIE N(5),'+]+;
				['SECTIE C(30),PROC_TVA N(5,2),ID_SET N(20),ID_FACT N(20),ID_PARTD N(10),PARTD C(50),ID_PARTC N(10),'+]+;
				['PARTC C(50),ID_SUCURSALA N(5),SUCURSALA C(50),ID_FDOC N(5),FDOC C(30),'+]+;
				['EXPLICATIA4 C(100),EXPLICATIA5 C(100),ID_GESTD N(5),GESTD C(50),ID_GESTC N(5),GESTC C(50)']
			pcschema1=['']
			pcselect1=["select * from ] + gcS + [.vact where 2=2"]
			pcfiltru1=[luna=]+Alltrim(Str(gnLuna))+[ and an=]+Alltrim(Str(gnAn))+[ and SCC=']+ALLTRIM(Substr(LOCONT.Cont,1,4))+[']
			pcorder1=['']
			llAfisare=.F.
			gencursor('poact','acn1',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfisare)
			poact.ca_baza1.afisare()
		
		*!*		Sele ACT
		*!*		Set Filter To SCC=Substr(LOCONT.cont,1,4) And !Deleted()
		*!*		ORC=Createobj("AFDEBCRED")
		*!*		With ORC
		*!*			.ali='act'
		*!*			.LABELTITLU.Caption="SITUATIE ANALITICA - RULAJ CREDIT"
		*!*		Endwith
			ORC=Createobj("frm_debcred")
			With ORC
					.lb_titlu_alb_b121.caption="SITUATIE ANALITICA - RULAJ CREDIT"
					.lb_titlu1.caption="SITUATIE ANALITICA - RULAJ CREDIT"
					._grdbase1.removeobject("cUtil")
					._grdbase1.removeobject("cDataOra")
			Endwith
			ORC.Show(1)
			USE IN acn1
		*!*		SELECT ACT
		*!*		SET FILTER TO
		*!*		Select act
		*!*		Use
			Release poact
		Endif
		
		Thisform.AlwaysOnTop= .T.
		Select (lcbal)
		Release LOCONT
	ENDPROC

	PROCEDURE ruldeb
		Private lcbal
		lcbal=Thisform.calias
		
		Select (lcbal)
		Local c
		Scatter Name LOCONT
		Thisform.AlwaysOnTop= .F.
		If LOCONT.RULDEB==0 Then
			OST=Createobj("stop")
			OST.LABEL2.Caption="Contul "+LOCONT.Cont+":"
			OST.LABEL3.Caption="Rulaj Debit = 0"
			OST.Show(1)
		Else
			Private pcselect1,pcfiltru1,pcorder1,pcschema1,poact
			Store "" To poact
			pcschema1=['ID_ACT N(20),LUNA N(2),AN N(4),COD N(20),DATAIREG D,NRACT N(14),DATAACT D,'+]+;
				['EXPLICATIA C(100),SCD C(4),ASCD C(4),SCC C(4),ASCC C(4),SUMA N(19,2),PERECHED N(14),'+]+;
				['PERECHEC N(14),SUMA_VAL N(19,2),NUME_VAL C(5),CURS N(8,2),DATASCAD D,NEIMPOZAB N(19,2),'+]+;
				['NNIR N(10),ID_UTIL N(5),UTIL C(30),DATAORA T,ID_UTILS N(5),UTILS C(30),DATAORAS T,'+]+;
				['ID_RESPONSABIL N(5),NRESP C(30),ID_VENCHELT N(5),DST_CHLT C(100),ID_LUCRARE N(5),NRORD C(30),ID_SECTIE N(5),'+]+;
				['SECTIE C(30),PROC_TVA N(5,2),ID_SET N(20),ID_FACT N(20),ID_PARTD N(10),PARTD C(50),ID_PARTC N(10),'+]+;
				['PARTC C(50),ID_SUCURSALA N(5),SUCURSALA C(50),ID_FDOC N(5),FDOC C(30),'+]+;
				['EXPLICATIA4 C(100),EXPLICATIA5 C(100),ID_GESTD N(5),GESTD C(50),ID_GESTC N(5),GESTC C(50)']
			pcschema1=['']
			pcselect1=['select * from ] + gcS + [.vact where 2=2']
			pcfiltru1=[luna=]+Alltrim(Str(gnLuna))+[ and an=]+Alltrim(Str(gnAn))+[ and SCD=]+Substr(LOCONT.Cont,1,4)+[]
			pcorder1=['']
			llAfisare=.F.
			gencursor('poact','acn1',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfisare)
			poact.ca_baza1.afisare()
		
		*!*		Sele ACT
		*!*		Set Filter To SCD=Substr(LOCONT.Cont,1,4) And !Deleted()
		*!*		ORC=Createobj("AFDEBCRED")
		*!*		With ORC
		*!*			.ali='act'
		*!*			.LABELTITLU.Caption="SITUATIE ANALITICA - RULAJ DEBIT"
		*!*		Endwith
		*!*		ORC.Show(1)
		*!*		Select act
		*!*		Use
			ORC=Createobj("frm_debcred")
			With ORC
					.lb_titlu_alb_b121.caption="SITUATIE ANALITICA - RULAJ DEBIT"
					.lb_titlu1.caption="SITUATIE ANALITICA - RULAJ DEBIT"
					._grdbase1.removeobject("cUtil")
					._grdbase1.removeobject("cDataOra")
			Endwith
			ORC.Show(1)	
		
			USE IN acn1
			Release poact
		Endif
		Release ORC
		Thisform.AlwaysOnTop= .T.
		
		*!*	SELECT ACT
		*!*	SET FILTER TO
		
		Select(lcbal)
		Release LOCONT
	ENDPROC

	PROCEDURE ruldebcred
		Private lcbal
		lcbal=Thisform.calias
		
		Select (lcbal)
		Local c
		Scatter Name LOCONT
		If LOCONT.RULCRED=0 And LOCONT.RULDEB=0 Then
			OST=Createobj("stop")
			OST.LABEL2.Caption="Contul "+LOCONT.Cont+":"
			OST.LABEL3.Caption="Nu exista rulaje in luna."
			OST.Show(1)
		Else
			Private pcselect1,pcfiltru1,pcschema1,poact,poact1,poact2
			Store "" To poact,poact1,poact2
			pcschema1=['ID_ACT N(20),LUNA N(2),AN N(4),COD N(20),DATAIREG D,NRACT N(14),DATAACT D,'+]+;
				['EXPLICATIA C(100),SCD C(4),ASCD C(4),SCC C(4),ASCC C(4),SUMA N(19,2),PERECHED N(14),'+]+;
				['PERECHEC N(14),SUMA_VAL N(19,2),NUME_VAL C(5),CURS N(8,2),DATASCAD D,NEIMPOZAB N(19,2),'+]+;
				['NNIR N(10),ID_UTIL N(5),UTIL C(30),DATAORA T,ID_UTILS N(5),UTILS C(30),DATAORAS T,'+]+;
				['ID_RESPONSABIL N(5),NRESP C(30),ID_VENCHELT N(5),DST_CHLT C(100),ID_LUCRARE N(5),NRORD C(30),ID_SECTIE N(5),'+]+;
				['SECTIE C(30),PROC_TVA N(5,2),ID_SET N(20),ID_FACT N(20),ID_PARTD N(10),PARTD C(50),ID_PARTC N(10),'+]+;
				['PARTC C(50),ID_SUCURSALA N(5),SUCURSALA C(50),ID_FDOC N(5),FDOC C(30),'+]+;
				['EXPLICATIA4 C(100),EXPLICATIA5 C(100),ID_GESTD N(5),GESTD C(50),ID_GESTC N(5),GESTC C(50)']
			pcschema1=['']
			pcselect1=["select * from ] + gcS + [.vact where 2=2"]
			pcfiltru1=[luna=]+Alltrim(Str(gnLuna))+[ and an=]+Alltrim(Str(gnAn))
			pcorder1=[]
			llAfisare=.F.
			gencursor('poact','act',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfisare)
			poact.ca_baza1.afisare()
			Sele ACT
		*DO NRORD WITH "ACT"
			Sele 0
		
			pcselect1=["select * from ] + gcS + [.vact where 2=2"]
			pcfiltru1=[luna=]+Alltrim(Str(gnLuna))+[ and an=]+Alltrim(Str(gnAn))+[ and SCD=]+Substr(LOCONT.Cont,1,4)+[]
			pcorder1=[]
			llAfisare=.F.
			gencursor('poact1','acn1',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfisare)
			poact1.ca_baza1.afisare()
		*!*			USE &DATE/ACT.DBF;
		*!*			AGAIN ALIAS ACn1
		*!*			SET FILTER TO SCD=SUBSTR(LOCONT.CONT,1,4) AND !DELETED()
		
			pcselect1=["select * from ] + gcS + [.vact where 2=2"]
			pcfiltru1=[luna=]+Alltrim(Str(gnLuna))+[ and an=]+Alltrim(Str(gnAn))+[ and SCC=]+Substr(LOCONT.Cont,1,4)+[]
			pcorder1=[]
			llAfisare=.F.
			gencursor('poact2','acn2',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfisare)
			poact2.ca_baza1.afisare()
		*!*			SELE 0
		*!*			USE &DATE/ACT.DBF;
		*!*			AGAIN ALIAS ACn2
		*!*			SET FILTER TO SCC=SUBSTR(LOCONT.CONT,1,4) AND !DELETED()
		
		*!*		ORC=Createobj("AFDEBsiCRED")
		*!*		ORC.Caption="SITUATIE ANALITICA - Rulaje Cont "+LOCONT.Cont
		*!*		ORC.Show(1)
			orc=CREATEOBJECT("frm_debsicred")
			orc.lb_titlu_alb_b121.caption="SITUATIE ANALITICA - Rulaje Cont "+LOCONT.Cont
			orc.show(1)
			Sele acn1
			Use
			Sele acn2
			Use
		
		*!*		modificare
			Select ACT
			Use
			Release poact,poact1,poact2,ORC
		*!*
		Endif
		
		Select(lcbal)
		Release LOCONT
		
	ENDPROC

	PROCEDURE Show
		LPARAMETERS nStyle
		DODEFAULT()
		IF luna_inchisa
			thisform.modifica1.Visible = .F.
			thisform.coMMAND4.Visible = .f.
		ENDIF 
	ENDPROC

	PROCEDURE sterge_linie
		Private lcbal,lcContS,lcContA
		lcbal=This.calias
		
		Select (lcbal)
		lcContS=Alltrim(Cont)
		lcContA=Alltrim(acont)
		
		If Empty(lcContS) And Empty(lcContA)
			Messagebox("Nu puteti sterge un total!",0+48,"Atentie")
			Return
		Endif
		
		pcexec=[begin balanadelproc(']+Alltrim(gcS)+ [',] + ALLTRIM(STR(gnAn)) + [,] + ALLTRIM(STR(gnLuna))+ [,']+lcContS+[',']+lcContA+['); end;]
		lnSucces=goExecutor.oexecute(pcexec)
		If lnSucces < 0
			lcTextEroare = goExecutor.cEroare
			If "ORA-20000"$lcTextEroare
				lnPozi=At("ORA-20000",lcTextEroare)+11
				lnPozf=At("ORA",lcTextEroare,2)
				lcTextEroare=Substr(lcTextEroare,lnPozi,lnPozf-lnPozi)
			Endif
			Messagebox(lcTextEroare,48,"Eroare")
			Return
		Endif
		
		Thisform.MousePointer= 11
		Thisform.LockScreen=.T.
		This.reconstruct
		This.afisactual
		Thisform.LockScreen=.F.
		Thisform.MousePointer= 0
		
	ENDPROC

	PROCEDURE totcred
		Private lcbal
		lcbal=Thisform.calias
		
		Select (lcbal)
		Local c
		Scatter Name LOCONT
		Thisform.AlwaysOnTop= .F.
		
		If LOCONT.TOTCRED==0 Then
			OST=Createobj("stop")
			OST.LABEL2.Caption="Contul "+LOCONT.Cont+":"
			OST.LABEL3.Caption="Total Credit = 0"
			OST.Show(1)
		Else
			Private pcselect1,pcfiltru1,pcschema1,poact
			Store "" To poact
			pcschema1=['ID_ACT N(20),LUNA N(2),AN N(4),COD N(20),DATAIREG D,NRACT N(14),DATAACT D,'+]+;
				['EXPLICATIA C(100),SCD C(4),ASCD C(4),SCC C(4),ASCC C(4),SUMA N(19,2),PERECHED N(14),'+]+;
				['PERECHEC N(14),SUMA_VAL N(19,2),NUME_VAL C(5),CURS N(8,2),DATASCAD D,NEIMPOZAB N(19,2),'+]+;
				['NNIR N(10),ID_UTIL N(5),UTIL C(30),DATAORA T,ID_UTILS N(5),UTILS C(30),DATAORAS T,'+]+;
				['ID_RESPONSABIL N(5),NRESP C(30),ID_VENCHELT N(5),DST_CHLT C(100),ID_LUCRARE N(5),NRORD C(30),ID_SECTIE N(5),'+]+;
				['SECTIE C(30),PROC_TVA N(5,2),ID_SET N(20),ID_FACT N(20),ID_PARTD N(10),PARTD C(50),ID_PARTC N(10),'+]+;
				['PARTC C(50),ID_SUCURSALA N(5),SUCURSALA C(50),ID_FDOC N(5),FDOC C(30),'+]+;
				['EXPLICATIA4 C(100),EXPLICATIA5 C(100),ID_GESTD N(5),GESTD C(50),ID_GESTC N(5),GESTC C(50)']
			pcschema1=['']
			pcselect1=["select * from ] + gcS + [.vact where 2=2"]
			pcfiltru1=[SCC=']+ALLTRIM(Substr(LOCONT.Cont,1,4))+[']
			pcorder1=['']
			llAfisare=.F.
			gencursor('poact','acn1',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfisare)
			poact.ca_baza1.afisare()
		
		*!*		Sele ACTAN
		*!*	*		DO NRORD WITH "ACTAN"
		*!*		*	sum suma to totsum
		*!*			SET FILTER TO SCC=SUBSTR(LOCONT.CONT,1,4) AND !DELETED()
		*!*		ORC=Createobj("AFDEBCRED")
		*!*		With ORC
		*!*			.ali='actan'
		*!*			.LABELTITLU.Caption="SITUATIE ANALITICA - TOTAL CREDIT"
		*!*		Endwith
		*!*		ORC.Show(1)
			ORC=Createobj("frm_debcred")
			With ORC
					.lb_titlu_alb_b121.caption="SITUATIE ANALITICA - TOTAL CREDIT"
					.lb_titlu1.caption="SITUATIE ANALITICA - TOTAL CREDIT"
					._grdbase1.removeobject("cUtil")
					._grdbase1.removeobject("cDataOra")
			Endwith
			ORC.Show(1)	
		*!*			SELECT ACTAN
		*!*			SET FILTER TO
		*!*	  	modificare
		*!*		Select ACTAN
		*!*		Use
			USE IN acn1
			Release poact
		*!*
		Endif
		Release ORC
		Thisform.AlwaysOnTop= .T.
		
		Select (lcbal)
		
	ENDPROC

	PROCEDURE totdeb
		Private lcbal
		lcbal=Thisform.calias
		
		Select (lcbal)
		Local c
		Scatter Name LOCONT
		
		Thisform.AlwaysOnTop= .F.
		If LOCONT.TOTDEB==0 Then
			OST=Createobj("stop")
			OST.LABEL2.Caption="Contul "+LOCONT.Cont+":"
			OST.LABEL3.Caption="Total Debit = 0"
			OST.Show(1)
		Else
			Private pcselect1,pcfiltru1,pcschema1,poact
			Store "" To poact
			pcschema1=['ID_ACT N(20),LUNA N(2),AN N(4),COD N(20),DATAIREG D,NRACT N(14),DATAACT D,'+]+;
				['EXPLICATIA C(100),SCD C(4),ASCD C(4),SCC C(4),ASCC C(4),SUMA N(19,2),PERECHED N(14),'+]+;
				['PERECHEC N(14),SUMA_VAL N(19,2),NUME_VAL C(5),CURS N(8,2),DATASCAD D,NEIMPOZAB N(19,2),'+]+;
				['NNIR N(10),ID_UTIL N(5),UTIL C(30),DATAORA T,ID_UTILS N(5),UTILS C(30),DATAORAS T,'+]+;
				['ID_RESPONSABIL N(5),NRESP C(30),ID_VENCHELT N(5),DST_CHLT C(100),ID_LUCRARE N(5),NRORD C(30),ID_SECTIE N(5),'+]+;
				['SECTIE C(30),PROC_TVA N(5,2),ID_SET N(20),ID_FACT N(20),ID_PARTD N(10),PARTD C(50),ID_PARTC N(10),'+]+;
				['PARTC C(50),ID_SUCURSALA N(5),SUCURSALA C(50),ID_FDOC N(5),FDOC C(30),'+]+;
				['EXPLICATIA4 C(100),EXPLICATIA5 C(100),ID_GESTD N(5),GESTD C(50),ID_GESTC N(5),GESTC C(50)']
			pcschema1=['']
			pcselect1=["select * from ] + gcS + [.vact where 2=2"]
			pcfiltru1=[SCD=']+ALLTRIM(Substr(LOCONT.Cont,1,4))+[']
			pcorder1=['']
			llAfisare=.F.
			gencursor('poact','acn1',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfisare)
			poact.ca_baza1.afisare()
		
		*!*		Sele ACTAN
		*!*	*		DO NRORD WITH "ACTAN"
		*!*	*	sum suma to totsum
		*!*		SET FILTER TO SCD=SUBSTR(LOCONT.CONT,1,4) AND !DELETED()
		*!*	*		DO NRORD WITH "ACTAN"
		*!*		ORC=Createobj("AFDEBCRED")
		*!*		With ORC
		*!*			.ali='actan'
		*!*			.LABELTITLU.Caption="SITUATIE ANALITICA - TOTAL DEBIT"
		*!*		Endwith
		*!*		ORC.Show(1)
			orc=CREATEOBJECT("frm_debcred")
			With ORC
					.lb_titlu_alb_b121.caption="SITUATIE ANALITICA - TOTAL DEBIT"
					.lb_titlu1.caption="SITUATIE ANALITICA - TOTAL DEBIT"
					._grdbase1.removeobject("cUtil")
					._grdbase1.removeobject("cDataOra")
			ENDWITH
			orc.show(1)
		*!*		SELECT ACTAN
		*!*		SET FILTER TO
		
		*!* modificare
		*!*		Select ACTAN
		*!*		Use
			USE IN acn1
			Release poact
		*!*
		Endif
		
		Thisform.AlwaysOnTop= .T.
		Select (lcbal)
		Release LOCONT
		
	ENDPROC

	PROCEDURE totdebcred
		Private lcbal
		lcbal=Thisform.calias
		
		Select (lcbal)
		Local c
		Scatter Name LOCONT
		Thisform.AlwaysOnTop= .F.
		If LOCONT.TOTCRED==0 And LOCONT.TOTDEB==0 Then
			OST=Createobj("stop")
			OST.LABEL2.Caption="Contul "+LOCONT.Cont
			OST.LABEL3.Caption="este neutilizat!"
			OST.Show(1)
		Else
			Private pcselect1,pcfiltru1,pcschema1,poact,poact1,poact2
			Store "" To poact,poact1,poact2
		*!*		pcschema1=['ID_ACT N(20),LUNA N(2),AN N(4),COD N(20),DATAIREG D,NRACT N(14),DATAACT D,'+]+;
		*!*			['EXPLICATIA C(100),SCD C(4),ASCD C(4),SCC C(4),ASCC C(4),SUMA N(19,2),PERECHED N(14),'+]+;
		*!*			['PERECHEC N(14),SUMA_VAL N(19,2),NUME_VAL C(5),CURS N(8,2),DATASCAD D,NEIMPOZAB N(19,2),'+]+;
		*!*			['NNIR N(10),ID_UTIL N(5),UTIL C(30),DATAORA T,ID_UTILS N(5),UTILS C(30),DATAORAS T,'+]+;
		*!*			['ID_RESPONSABIL N(5),NRESP C(30),ID_VENCHELT N(5),DST_CHLT C(100),ID_LUCRARE N(5),NRORD C(30),ID_SECTIE N(5),'+]+;
		*!*			['SECTIE C(30),PROC_TVA N(5,2),ID_SET N(20),ID_FACT N(20),ID_PARTD N(10),PARTD C(50),ID_PARTC N(10),'+]+;
		*!*			['PARTC C(50),ID_SUCURSALA N(5),SUCURSALA C(50),ID_FDOC N(5),FDOC C(30),'+]+;
		*!*			['EXPLICATIA4 C(100),EXPLICATIA5 C(100),ID_GESTD N(5),GESTD C(50),ID_GESTC N(5),GESTC C(50)']
				pcschema1=['']
		*!*		pcselect1=["select * from ] + gcS + [.vact where 2=2"]
		*!*		pcfiltru1=[2=2]
		*!*		pcorder1=[]
		*!*		llAfisare=.F.
		*!*		gencursor('poact','actan',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfisare)
		*!*		poact.ca_baza1.afisare()
		
		*!*		Sele ACTan
		*!*	*	DO NRORD WITH "ACTan"
			Sele 0
			pcselect1=["select * from ] + gcS + [.vact where 2=2"]
			pcfiltru1=[SCD=']+ALLTRIM(Substr(LOCONT.Cont,1,4))+[']
			pcorder1=[]
			llAfisare=.F.
			gencursor('poact1','acn1',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfisare)
			poact1.ca_baza1.afisare()
		*!*			USE &DATEan/ACTan.DBF;
		*!*			AGAIN ALIAS ACn1
		*!*			SET FILTER TO SCD=SUBSTR(locont.CONT,1,4) AND !DELETED()
		
			pcselect1=["select * from ] + gcS + [.vact where 2=2"]
			pcfiltru1=[SCC=']+ALLTRIM(Substr(LOCONT.Cont,1,4))+[']
			pcorder1=[]
			llAfisare=.F.
			gencursor('poact2','acn2',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfisare)
			poact2.ca_baza1.afisare()
		*!*			SELE 0
		*!*			USE &DATEan/ACTan.DBF;
		*!*			AGAIN ALIAS ACn2
		*!*			SET FILTER TO SCC=SUBSTR(locont.CONT,1,4) AND !DELETED()
		*!*		ORC=Createobj("AFDEBsiCRED")
		*!*		ORC.Caption="SITUATIE ANALITICA - Total Cont "+LOCONT.Cont
		*!*		ORC.Show(1)
			orc=CREATEOBJECT("frm_debsicred")
			orc.lb_titlu_alb_b121.caption="SITUATIE ANALITICA - Total Cont "+LOCONT.Cont
			orc.show(1)
		
			Sele acn1
			Use
			Sele acn2
			Use
		*!*	  	modificare
		*!*		Select ACTan
		*!*		Use
			Release poact,poact1,poact2
			Release ORC
		*!*
		Endif
		
		Thisform.AlwaysOnTop= .T.
		Select (lcbal)
		
	ENDPROC

	PROCEDURE Ct1.Text1.Valid
		thisform.afisactual 
	ENDPROC

	PROCEDURE Ct1.Text2.Valid
		thisform.afisactual 
	ENDPROC

	PROCEDURE Ct1.Text3.Valid
		thisform.afisactual 
	ENDPROC

	PROCEDURE Ct1.Text4.Valid
		thisform.afisactual 
	ENDPROC

	PROCEDURE Grid1.AfterRowColChange
		Lparameters nColIndex
	ENDPROC

	PROCEDURE Grid1.ccont.Text1.DblClick
			thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.ccont.Text1.GotFocus
		lcSufix="cont"
		thisform.cField=lcSufix
		
	ENDPROC

	PROCEDURE Grid1.ccont.Text1.Valid
		thisform.nnewvalue=this.value
		LOCAL lcCont
		lcCont=thisform.noldvalue
		RETURN .T.
		thisform.in_bal(lcCont)
		
	ENDPROC

	PROCEDURE Grid1.cdenumire.Text1.DblClick
		thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.cdenumire.Text1.GotFocus
		lcSufix="denumire"
		thisform.cField=lcSufix
		
	ENDPROC

	PROCEDURE Grid1.cdenumire.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.cdenumire.Text1.Valid
		RETURN .T.
		PRIVATE lcbal
		lcBal=thisform.calias 
		LOCAL lcCont,lcAcont
		
		
		thisform.nnewvalue=this.value
		SELECT (lcBal)
		lcCont=cont
		lcAcont=acont
		
		thisform.in_bal(lcCont,lcAcont)
	ENDPROC

	PROCEDURE Grid1.cpreccred.Text1.DblClick
		thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.cpreccred.Text1.GotFocus
		lcSufix="PRECCRED"
		thisform.cField=lcSufix
		
	ENDPROC

	PROCEDURE Grid1.cpreccred.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.cpreccred.Text1.Valid
		thisform.calculeaza
		
	ENDPROC

	PROCEDURE Grid1.cpreccred1.Text1.GotFocus
		lcSufix="PRECCRED1"
		thisform.cField=lcSufix
	ENDPROC

	PROCEDURE Grid1.cpreccred1.Text1.Valid
		thisform.calculeaza
	ENDPROC

	PROCEDURE Grid1.cprecdeb.Text1.DblClick
		thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.cprecdeb.Text1.GotFocus
		lcSufix="PRECDEB"
		thisform.cField=lcSufix
		
	ENDPROC

	PROCEDURE Grid1.cprecdeb.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.cprecdeb.Text1.Valid
		thisform.calculeaza
		
	ENDPROC

	PROCEDURE Grid1.cprecdeb1.Text1.GotFocus
		lcSufix="PRECDEB1"
		thisform.cField=lcSufix
	ENDPROC

	PROCEDURE Grid1.cprecdeb1.Text1.Valid
		thisform.calculeaza
	ENDPROC

	PROCEDURE Grid1.crulcred.Text1.DblClick
		thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.crulcred.Text1.GotFocus
		lcSufix="RULCRED"
		thisform.cField=lcSufix
		
	ENDPROC

	PROCEDURE Grid1.crulcred.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.crulcred.Text1.Valid
		thisform.calculeaza
	ENDPROC

	PROCEDURE Grid1.cruldeb.Text1.DblClick
		thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.cruldeb.Text1.GotFocus
		lcSufix="RULDEB"
		thisform.cField=lcSufix
		
	ENDPROC

	PROCEDURE Grid1.cruldeb.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.cruldeb.Text1.Valid
		thisform.calculeaza
		
	ENDPROC

	PROCEDURE Grid1.csoldcred.Text1.DblClick
		thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.csoldcred.Text1.GotFocus
		lcSufix="SOLDCRED"
		thisform.cField=lcSufix
		
	ENDPROC

	PROCEDURE Grid1.csoldcred.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.csoldcred.Text1.Valid
		thisform.calculeaza
		
	ENDPROC

	PROCEDURE Grid1.csolddeb.Text1.DblClick
		thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.csolddeb.Text1.GotFocus
		lcSufix="SOLDDEB"
		thisform.cField=lcSufix
		
	ENDPROC

	PROCEDURE Grid1.csolddeb.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.csolddeb.Text1.Valid
		thisform.calculeaza
		
		
	ENDPROC

	PROCEDURE Grid1.ctotcred.Text1.DblClick
		thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.ctotcred.Text1.GotFocus
		lcSufix="TOTCRED"
		thisform.cField=lcSufix
		
	ENDPROC

	PROCEDURE Grid1.ctotcred.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.ctotcred.Text1.Valid
		thisform.calculeaza
		
	ENDPROC

	PROCEDURE Grid1.ctotdeb.Text1.DblClick
		thisform.butdrept
	ENDPROC

	PROCEDURE Grid1.ctotdeb.Text1.GotFocus
		lcSufix="TOTDEB"
		thisform.cField=lcSufix
		
	ENDPROC

	PROCEDURE Grid1.ctotdeb.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.ctotdeb.Text1.Valid
		thisform.calculeaza
		
	ENDPROC

	PROCEDURE Grid1.DblClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Init
		*!*	this.SetAll("DynamicForeCOlor",;
		*!*	"IIF(!EMPTY(cont),RGB(0,0,0),IIF(nivel=1,RGB(0,0,255),RGB(0,128,128)))","Column")
		
		this.SetAll("DynamicForeCOlor","IIF(BNIVEL<3,RGB(0,0,255),RGB(0,0,0))","Column")
		this.SetAll("DynamicForeCOlor","IIF(difana=1,RGB(128,0,255),RGB(0,0,0))","Column")
		
		this.SetAll("DynamicFontbold","IIF(INLIST(BNIVEL,1,3),.t.,.f.)","Column")
		
	ENDPROC

	PROCEDURE Optiongroup1.Option1.Click
		PRIVATE lcbal
		lcbal=thisform.calias 
		
		THIS.PARENT.OPTION2.ENABLED=.F.
		THIS.PARENT.OPTION3.ENABLED=.F.
		THIS.PARENT.OPTION4.ENABLED=.F.
		THIS.PARENT.OPTION5.ENABLED=.F.
		
		SELECT(LCBAL)
		SET FILTER TO !DELETED()
		THISFORM.GRID1.ACTIVATECELL(1,1)
	ENDPROC

	PROCEDURE Optiongroup1.Option2.Click
		THISFORM.RULDEB
	ENDPROC

	PROCEDURE Optiongroup1.Option3.Click
		THISFORM.RULCRED
	ENDPROC

	PROCEDURE Optiongroup1.Option4.Click
		THISFORM.TOTDEB
	ENDPROC

	PROCEDURE Optiongroup1.Option5.Click
		THISFORM.TOTCRED
	ENDPROC

	PROCEDURE pf.p1.Check1.Valid
		thisform.afisactual 
		IF this.Value = 1
			this.Caption = 'Analitice'
		ELSE 
			this.Caption = 'Sintetice'
		ENDIF 
	ENDPROC

	PROCEDURE pf.p1.Click
		WITH THIS
			.text1.Refresh
			.text2.Refresh
			.text3.Refresh
			.text4.Refresh
			.text5.Refresh
			.text6.Refresh
			.text7.Refresh
			.text8.Refresh
		ENDWITH 
	ENDPROC

	PROCEDURE pf.p1.Text1.Refresh
		THIS.FORECOLOR=IIF(M.SPRECDEB>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE pf.p1.Text2.Refresh
		THIS.FORECOLOR=IIF(M.SPRECCRED>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE pf.p1.Text3.Refresh
		THIS.FORECOLOR=IIF(M.SRULCRED>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE pf.p1.Text4.Refresh
		THIS.FORECOLOR=IIF(M.SRULDEB>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE pf.p1.Text5.Refresh
		THIS.FORECOLOR=IIF(M.STOTDEB>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE pf.p1.Text6.Refresh
		THIS.FORECOLOR=IIF(M.STOTCRED>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE pf.p1.Text7.Init
		sum solddeb to m.ssolddeb
		this.refresh
	ENDPROC

	PROCEDURE pf.p1.Text8.Init
		sum soldcred to m.ssoldcred
		this.refresh
	ENDPROC

	PROCEDURE pf.p1.txtpreccred1.Refresh
		THIS.FORECOLOR=IIF(M.SPRECCRED1>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE pf.p1.txtprecdeb1.Refresh
		THIS.FORECOLOR=IIF(M.SPRECDEB1>=0, RGB(0,0,0), RGB(255,0,0))
	ENDPROC

	PROCEDURE pf.P2.ckanalitic.Click
		
		
	ENDPROC

	PROCEDURE pf.P2.ckanalitic.Valid
		thisform.afisactual
	ENDPROC

	PROCEDURE pf.P2.cksold1.Click
		
		
	ENDPROC

	PROCEDURE pf.P2.cksold1.Valid
		IF this.Value=0
			WITH thisform.grid1
				.cprecdeb1.width=0
				.cprecdeb1.visible=.F.	&& cont2003 oracle
				.cpreccred1.width=0
				.cpreccred1.visible=.F.
			ENDWITH 
			WITH thisform.pf.p1
				.lblsld1.Visible=.F.
				.txtprecdeb1.Visible=.F.
				.txtpreccred1.Visible=.F.		
				.lbldebit.Left=.text1.left-45
				.lblcredit.Left=.text2.left-45
				.check1.Left=.label8.left-45
			ENDWITH 
		ELSE
		
			WITH thisform.grid1
				.cprecdeb1.width=72
				.cprecdeb1.visible=.T.
				.cpreccred1.width=72
				.cpreccred1.visible=.T.
			ENDWITH 
			WITH thisform.pf.p1
				.lblsld1.Visible=.T.
				.txtprecdeb1.Visible=.T.
				.txtpreccred1.Visible=.T.		
				.lbldebit.Left=.txtprecdeb1.left-45
				.lblcredit.Left=.txtpreccred1.left-45
				.check1.Left=.lblsld1.left-45
			ENDWITH 
		ENDIF
		
	ENDPROC

	PROCEDURE pf.P2.cktotal1.Valid
		thisform.afisactual
	ENDPROC

	PROCEDURE pf.P2.cktotal2.Valid
		thisform.afisactual
	ENDPROC

	PROCEDURE pf.P2.cktotal3.Valid
		thisform.afisactual
	ENDPROC

	PROCEDURE pf.P2.cktotal4.Valid
		thisform.afisactual
	ENDPROC

	PROCEDURE pf.P2.Ck_cont.Valid
		thisform.afisactual 
	ENDPROC

	PROCEDURE pf.p3.Optiongroup1.Option1.Click
		*!*	lcbal=thisform.calias 
		
		*!*	THIS.PARENT.OPTION2.ENABLED=.F.
		*!*	THIS.PARENT.OPTION3.ENABLED=.F.
		*!*	THIS.PARENT.OPTION4.ENABLED=.F.
		*!*	THIS.PARENT.OPTION5.ENABLED=.F.
		
		*!*	SELECT(LCBAL)
		*!*	SET FILTER TO !DELETED()
		THISFORM.GRID1.SetFocus 
	ENDPROC

	PROCEDURE pf.p3.Optiongroup1.Option2.Click
		thisform.fisacont
		THIS.parent.Value=8 && balanta
	ENDPROC

	PROCEDURE pf.p3.Optiongroup1.Option3.Click
		THISFORM.RULDEB
		THIS.parent.Value=8 && balanta
	ENDPROC

	PROCEDURE pf.p3.Optiongroup1.Option4.Click
		THISFORM.RULCRED
		THIS.parent.Value=8 && balanta
	ENDPROC

	PROCEDURE pf.p3.Optiongroup1.Option5.Click
		THISFORM.RULDEBCRED
		THIS.parent.Value=8 && balanta
	ENDPROC

	PROCEDURE pf.p3.Optiongroup1.Option6.Click
		THISFORM.TOTDEB
		THIS.parent.Value=8 && balanta
	ENDPROC

	PROCEDURE pf.p3.Optiongroup1.Option7.Click
		THISFORM.TOTCRED
		THIS.parent.Value=8 && balanta
	ENDPROC

	PROCEDURE pf.p3.Optiongroup1.Option8.Click
		THISFORM.TOTDEBCRED
		THIS.parent.Value=8 && balanta
	ENDPROC

	PROCEDURE txtcont.Valid
		thisform.txtcont2.Value = this.Value 
		thisform.afisactual
		
	ENDPROC

	PROCEDURE Txtcont2.Valid
		thisform.afisactual
	ENDPROC

ENDDEFINE
