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

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

ENDDEFINE

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

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Shape1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label12" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmdtermin1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmdrenunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label11" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label13" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Banda21" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Titlufrumos1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text10" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: seriadebaza
		*p: ttanul
		*p: ttfirma
		*p: ttluna
	*</DefinedPropArrayMethod>

	*<PropValue>
		AutoCenter = .T.
		BackColor = 255,255,255
		BorderStyle = 1
		DoCreate = .T.
		Height = 422
		Name = "Ffergen1"
		Picture = ..\..\
		Width = 500
		WindowType = 1
	*</PropValue>

	ADD OBJECT 'Banda21' AS banda2 WITH ;
		Height = 34, ;
		Left = 0, ;
		Name = "Banda21", ;
		Top = 0, ;
		Width = 428
		*< END OBJECT: ClassLib="..\..\comun\clase\baza.vcx" BaseClass="shape" />

	ADD OBJECT 'Cmdrenunt1' AS cmdrenunt WITH ;
		Left = 432, ;
		Name = "Cmdrenunt1", ;
		TabIndex = 12, ;
		Top = 2, ;
		Imbuton1.Height = 27, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 30, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="..\clase\ferestrebaza.vcx" BaseClass="container" />

	ADD OBJECT 'Cmdtermin1' AS cmdtermin WITH ;
		Left = 468, ;
		Name = "Cmdtermin1", ;
		TabIndex = 11, ;
		Top = 2, ;
		Imbuton1.Height = 27, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 30, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="..\clase\ferestrebaza.vcx" BaseClass="container" />

	ADD OBJECT 'Label1' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackColor = 255,0,0, ;
		BackStyle = 0, ;
		Caption = "Bun Venit! ", ;
		FontBold = .T., ;
		FontItalic = .T., ;
		FontName = "Comic Sans MS", ;
		FontShadow = .F., ;
		FontSize = 18, ;
		ForeColor = 255,0,0, ;
		Height = 37, ;
		Left = 48, ;
		Name = "Label1", ;
		TabIndex = 24, ;
		Top = 41, ;
		Width = 128, ;
		ZOrderSet = 1
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label11' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackColor = 0,0,0, ;
		BackStyle = 0, ;
		Caption = "Anul:", ;
		FontBold = .T., ;
		FontName = "BankGothic Md BT", ;
		FontShadow = .F., ;
		FontSize = 12, ;
		ForeColor = 0,0,0, ;
		Height = 22, ;
		Left = 132, ;
		Name = "Label11", ;
		TabIndex = 16, ;
		Top = 384, ;
		Width = 44, ;
		ZOrderSet = 20
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label12' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackColor = 0,0,0, ;
		BackStyle = 0, ;
		Caption = "Strada:", ;
		FontBold = .T., ;
		FontName = "BankGothic Md BT", ;
		FontShadow = .F., ;
		FontSize = 12, ;
		ForeColor = 0,0,0, ;
		Height = 22, ;
		Left = 111, ;
		Name = "Label12", ;
		TabIndex = 19, ;
		Top = 276, ;
		Width = 62, ;
		ZOrderSet = 8
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label13' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackColor = 0,0,0, ;
		BackStyle = 0, ;
		Caption = "Numarul:", ;
		FontBold = .T., ;
		FontName = "BankGothic Md BT", ;
		FontShadow = .F., ;
		FontSize = 12, ;
		ForeColor = 0,0,0, ;
		Height = 22, ;
		Left = 94, ;
		Name = "Label13", ;
		TabIndex = 17, ;
		Top = 302, ;
		Width = 74, ;
		ZOrderSet = 20
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label3' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackColor = 0,0,0, ;
		BackStyle = 0, ;
		Caption = "Luna contabila:", ;
		FontBold = .T., ;
		FontName = "BankGothic Md BT", ;
		FontShadow = .F., ;
		FontSize = 12, ;
		ForeColor = 0,0,0, ;
		Height = 22, ;
		Left = 30, ;
		Name = "Label3", ;
		TabIndex = 20, ;
		Top = 354, ;
		Width = 126, ;
		ZOrderSet = 8
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label4' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackColor = 0,0,0, ;
		BackStyle = 0, ;
		Caption = "Cod fiscal:", ;
		FontBold = .T., ;
		FontName = "BankGothic Md BT", ;
		FontShadow = .F., ;
		FontSize = 12, ;
		ForeColor = 0,0,0, ;
		Height = 22, ;
		Left = 71, ;
		Name = "Label4", ;
		TabIndex = 22, ;
		Top = 131, ;
		Width = 87, ;
		ZOrderSet = 8
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label5' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackColor = 0,0,0, ;
		BackStyle = 0, ;
		Caption = "Nr. Inreg. R.C.:", ;
		FontBold = .T., ;
		FontName = "BankGothic Md BT", ;
		FontShadow = .F., ;
		FontSize = 12, ;
		ForeColor = 0,0,0, ;
		Height = 22, ;
		Left = 32, ;
		Name = "Label5", ;
		TabIndex = 14, ;
		Top = 158, ;
		Width = 123, ;
		ZOrderSet = 20
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label6' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackColor = 0,0,0, ;
		BackStyle = 0, ;
		Caption = "Banca:", ;
		FontBold = .T., ;
		FontName = "BankGothic Md BT", ;
		FontShadow = .F., ;
		FontSize = 12, ;
		ForeColor = 0,0,0, ;
		Height = 22, ;
		Left = 118, ;
		Name = "Label6", ;
		TabIndex = 21, ;
		Top = 185, ;
		Width = 59, ;
		ZOrderSet = 8
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label7' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackColor = 0,0,0, ;
		BackStyle = 0, ;
		Caption = "Cont bancar:", ;
		FontBold = .T., ;
		FontName = "BankGothic Md BT", ;
		FontShadow = .F., ;
		FontSize = 12, ;
		ForeColor = 0,0,0, ;
		Height = 22, ;
		Left = 56, ;
		Name = "Label7", ;
		TabIndex = 15, ;
		Top = 211, ;
		Width = 106, ;
		ZOrderSet = 20
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label8' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackColor = 0,0,0, ;
		BackStyle = 0, ;
		Caption = "Localitatea:", ;
		FontBold = .T., ;
		FontName = "BankGothic Md BT", ;
		FontShadow = .F., ;
		FontSize = 12, ;
		ForeColor = 0,0,0, ;
		Height = 22, ;
		Left = 64, ;
		Name = "Label8", ;
		TabIndex = 18, ;
		Top = 250, ;
		Width = 97, ;
		ZOrderSet = 20
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label9' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackColor = 0,0,0, ;
		BackStyle = 0, ;
		Caption = "Numele firmei: ", ;
		FontBold = .T., ;
		FontName = "BankGothic Md BT", ;
		FontShadow = .F., ;
		FontSize = 12, ;
		ForeColor = 0,0,0, ;
		Height = 22, ;
		Left = 42, ;
		Name = "Label9", ;
		TabIndex = 25, ;
		Top = 103, ;
		Width = 122, ;
		ZOrderSet = 1
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Shape1' AS shape WITH ;
		BackStyle = 0, ;
		Height = 373, ;
		Left = 11, ;
		Name = "Shape1", ;
		SpecialEffect = 0, ;
		Top = 42, ;
		Width = 480, ;
		ZOrderSet = 0
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Shape2' AS shape WITH ;
		BackStyle = 0, ;
		Height = 0, ;
		Left = 10, ;
		Name = "Shape2", ;
		SpecialEffect = 0, ;
		Top = 337, ;
		Width = 480, ;
		ZOrderSet = 0
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 254,255,240, ;
		BackStyle = 0, ;
		BorderStyle = 1, ;
		ControlSource = "m.cod_fiscal", ;
		FontName = "BankGothic Md BT", ;
		FontSize = 12, ;
		Format = "K", ;
		Height = 23, ;
		Left = 192, ;
		Name = "Text1", ;
		ReadOnly = .F., ;
		TabIndex = 2, ;
		Top = 129, ;
		Value = , ;
		Width = 225, ;
		ZOrderSet = 25
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text10' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 254,255,240, ;
		BackStyle = 0, ;
		BorderStyle = 1, ;
		ControlSource = "m.numar", ;
		FontName = "BankGothic Md BT", ;
		FontSize = 12, ;
		Format = "K", ;
		Height = 23, ;
		Left = 192, ;
		Name = "Text10", ;
		ReadOnly = .F., ;
		TabIndex = 8, ;
		Top = 300, ;
		Value = , ;
		Width = 102, ;
		ZOrderSet = 26
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text2' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 254,255,240, ;
		BackStyle = 0, ;
		BorderStyle = 1, ;
		ControlSource = "m.luU", ;
		FontName = "BankGothic Md BT", ;
		FontSize = 12, ;
		Format = "K", ;
		Height = 23, ;
		Left = 192, ;
		Name = "Text2", ;
		ReadOnly = .F., ;
		TabIndex = 9, ;
		ToolTipText = "Introduceti (in cifre) numarul lunii contabile cu care doriti sa incepeti.", ;
		Top = 352, ;
		Value = , ;
		Width = 102, ;
		ZOrderSet = 25
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text3' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 254,255,240, ;
		BackStyle = 0, ;
		BorderStyle = 1, ;
		ControlSource = "m.an", ;
		FontName = "BankGothic Md BT", ;
		FontSize = 12, ;
		Format = "K", ;
		Height = 23, ;
		Left = 192, ;
		Name = "Text3", ;
		ReadOnly = .F., ;
		TabIndex = 10, ;
		ToolTipText = "Introduceti anul (inclusiv secolul).", ;
		Top = 382, ;
		Value = , ;
		Width = 102, ;
		ZOrderSet = 26
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text4' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 254,255,240, ;
		BackStyle = 0, ;
		BorderStyle = 1, ;
		ControlSource = "m.flung", ;
		FontName = "BankGothic Md BT", ;
		FontSize = 12, ;
		Format = "K", ;
		Height = 23, ;
		Left = 192, ;
		Name = "Text4", ;
		ReadOnly = .F., ;
		TabIndex = 1, ;
		ToolTipText = "Introduceti numele complet al noii firme", ;
		Top = 101, ;
		Value = , ;
		Width = 225, ;
		ZOrderSet = 2
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text5' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 254,255,240, ;
		BackStyle = 0, ;
		BorderStyle = 1, ;
		ControlSource = "m.reg_com", ;
		FontName = "BankGothic Md BT", ;
		FontSize = 12, ;
		Format = "K", ;
		Height = 23, ;
		Left = 192, ;
		Name = "Text5", ;
		ReadOnly = .F., ;
		TabIndex = 3, ;
		Top = 156, ;
		Value = , ;
		Width = 225, ;
		ZOrderSet = 26
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text6' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 254,255,240, ;
		BackStyle = 0, ;
		BorderStyle = 1, ;
		ControlSource = "m.banca", ;
		FontName = "BankGothic Md BT", ;
		FontSize = 12, ;
		Format = "K", ;
		Height = 23, ;
		Left = 192, ;
		Name = "Text6", ;
		ReadOnly = .F., ;
		TabIndex = 4, ;
		Top = 183, ;
		Value = , ;
		Width = 225, ;
		ZOrderSet = 25
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text7' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 254,255,240, ;
		BackStyle = 0, ;
		BorderStyle = 1, ;
		ControlSource = "m.cont_banca", ;
		FontName = "BankGothic Md BT", ;
		FontSize = 12, ;
		Format = "K", ;
		Height = 23, ;
		Left = 192, ;
		Name = "Text7", ;
		ReadOnly = .F., ;
		TabIndex = 5, ;
		Top = 209, ;
		Value = , ;
		Width = 225, ;
		ZOrderSet = 26
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text8' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 254,255,240, ;
		BackStyle = 0, ;
		BorderStyle = 1, ;
		ControlSource = "m.localitate", ;
		FontName = "BankGothic Md BT", ;
		FontSize = 12, ;
		Format = "K", ;
		Height = 23, ;
		Left = 192, ;
		Name = "Text8", ;
		ReadOnly = .F., ;
		TabIndex = 6, ;
		Top = 248, ;
		Value = , ;
		Width = 225, ;
		ZOrderSet = 26
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text9' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 254,255,240, ;
		BackStyle = 0, ;
		BorderStyle = 1, ;
		ControlSource = "m.strada", ;
		FontName = "BankGothic Md BT", ;
		FontSize = 12, ;
		Format = "K", ;
		Height = 23, ;
		Left = 192, ;
		Name = "Text9", ;
		ReadOnly = .F., ;
		TabIndex = 7, ;
		Top = 274, ;
		Value = , ;
		Width = 225, ;
		ZOrderSet = 25
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Titlufrumos1' AS titlufrumos WITH ;
		Caption = "CONTAFIN IMOBILIZARI", ;
		FontSize = 13, ;
		Left = 8, ;
		Name = "Titlufrumos1", ;
		Top = 5
		*< END OBJECT: ClassLib="..\..\comun\clase\baza.vcx" BaseClass="label" />
	
	PROCEDURE Activate
		*public M.AN
		
		M.LUU=''
		m.luU=STR(MONTH(DATE()))
		M.AN=ALLTRIM(STR(YEAR(DATE())))
		m.LUU=RIGHT('0'+ALLTRIM(m.lUU),2)
		M.NL=M.LUU
		*M.AN=XXAN
		
		*thisform.ttfirma="Acest program poate lucra cu mai multe firme. Introduceti numele complet al noii firme."
		*thisform.ttluna="Introduceti (in cifre) numarul lunii contabile cu care doriti sa incepeti."
		*thisform.ttanul="Introduceti anul (inclusiv secolul)."
		
	ENDPROC

	PROCEDURE seriadebaza
		DO seriadebaza IN proceduri.prg
		
	ENDPROC

	PROCEDURE Cmdtermin1.Click
		*DO NOT RELEASE
	ENDPROC

	PROCEDURE Cmdtermin1.Command1.Click
		*
	ENDPROC

	PROCEDURE Cmdtermin1.Command1.Valid
		PRIVATE LAN,LLUN
		LOCAL I,J,NI
		
		LAN='AN'+M.AN
		LLUN='DATE'+M.NL
		I=.F.
		
		*SCRIE NUMELE SCURT AL FIRMEI___________________
		SELECT firma
		m.firma=UPPER(ALLTRIM(m.flung))
		m.FSCURT=M.firma
		m.FSCURT=UPPER(ALLTRIM(m.FSCURT))+SPACE(7)
		m.FSCURT=ALLTRIM(LEFT(ALLTRIM(M.FSCURT),8))
		m.FSCURT=CHRTRAN(M.FSCURT,SPACE(8),'________')
		
		tt='Numele noii firme nu trebuie sa coincida cu numele altor firme. '+;
			'O firma al carui nume incepe cu <'+LEFT(STRTRAN(m.FSCURT,'_',' ')+SPACE(8),8)+;
			'> exista deja! '+;
			'Este important ca primele 8 caractere sa fie diferite de <'
		IF LEFT(STRTRAN(m.FSCURT,'_',' ')+SPACE(8),8)!=LEFT(m.FSCURT+"________",8)
			ttt=LEFT(STRTRAN(m.FSCURT,'_',' ')+SPACE(8),8)+'> sau <'+LEFT(m.FSCURT+"________",8)+'>.'
		ELSE
			ttt=LEFT(m.FSCURT+"________",8)+'>.'
		ENDIF
		
		SCAN
			IF UPPER(ALLTRIM(firma))==UPPER(ALLTRIM(M.firma)) OR UPPER(ALLTRIM(FSCURT))==UPPER(ALLTRIM(M.FSCURT)) THEN
				I=.T.
				omm=CREA('textmare')
				omm.label2.CAPTION=tt+ttt
				omm.SHOW(1)
				RETURN
			ENDIF
		ENDSCAN
		
		
		*DACA FIRMA NU EXISTA DEJA_______________
		IF !I
			APPE BLANK
			NFSCURT=M.FSCURT
			m.calefirm=dirgen+'\'+NFSCURT
			calefirma=m.calefirm
			GATHER MEMVAR
			REPL permis WITH '*'
			REPL locTEMPO WITH '&DIRGEN\'
		
		*CONSTRUIESC ARBORE FISIERE FIRMA NOUA______________________________
			SET DEFA TO c:
			IF !DIRECTORY('contafin')
				MD contafin
			ENDIF
			SET DEFA TO c:\contafin
			IF !DIRECTORY('temp')
				MD temp
			ENDIF
			SET DEFA TO c:\contafin\temp
			MD &NFSCURT
			SET DEFA TO c:\contafin\temp\&NFSCURT
			MD tempo
		
			SET DEFA TO &dirgen
			CD &dirgen
			MD &NFSCURT
			CD &NFSCURT
			MD DATEAN
			MD LUNA
			MD tempo
			MD &LAN
			CD &LAN
			MD &LLUN
		*COPIEZ FISIERELE STANDARD__________________
			CLOSE DATABASE
			SET DEFA TO &dirgen
			CD &dirgen
			COPY FILE _ALFA\DATEAN\*.* TO &NFSCURT\DATEAN\*.*
			COPY FILE _ALFA\LUNA\*.* TO &NFSCURT\LUNA\*.*
			COPY FILE _ALFA\tempo\*.* TO &NFSCURT\tempo\*.*
			COPY FILE _ALFA\AN0000\DATE00\*.* TO &NFSCURT\&LAN\&LLUN\*.*
			COPY FILE _ALFA\tempo\*.* TO c:\contafin\temp\&NFSCURT\tempo\*.*
		
			CD &NFSCURT\&LAN\&LLUN
			RENAME ACT.DBF TO ACT_.DBF
			RENAME ACT.CDX TO ACT_.CDX
			DELETE FILE ACT.*
		
		*SCRIU IN CALENDAR___________________
			DIRFIRM=dirgen+NFSCURT
			SELE 0
			USE &calefirma\DATEAN\CALENDAR IN 0 ALIAS cal
			APPE BLANK
			REPL NL WITH M.NL
			REPL AN WITH M.AN
			REPL SCONT WITH .T.
			m.antet=ALLTRIM(M.flung)
		
			THISFORM.RELEASE
		*____________
		ENDIF
		
		USE &calefirma\DATEAN\CUL IN 0 ALIAS CUL
		THISFORM.SERIADEBAZA
		USE IN CUL
		DO TOTV
		
		
		SELE LUNILEAN
		SEEK (M.NL)
		m.LUNA=NUMELUNA
		
		*schimb titlul__________________
		capapl="CONTAFIN IMOBILIZARI     Firma "+UPPER(RTRIM(m.flung))+"- Luna contabila: "+RTRIM(M.LUNA)+" "+M.AN
		goApp.SetCaption(capapl)
		
		
	ENDPROC

	PROCEDURE Text2.Valid
		m.nl=RIGHT('0'+ALLTRIM(m.lUU),2)
		
		
		
		
	ENDPROC

	PROCEDURE Text3.Valid
		M.AN=ALLTRIM(THIS.VALUE)
		
	ENDPROC

	PROCEDURE Text4.MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
	ENDPROC

	PROCEDURE Text4.Valid
		if alltrim(m.flung)=="" then
			wait wind "Introduceti numele firmei!"
			return 0
		endif
		
	ENDPROC

	PROCEDURE Text4.When
		*thisform.label8.caption=thisform.ttFIRMA
	ENDPROC

ENDDEFINE
