*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="listcorp.mnx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*<MenuType>4</MenuType>
*<MenuLocation>REPLACE</MenuLocation>

*<MenuCode>
DEFINE POPUP Shortcut SHORTCUT RELATIVE FROM MROW(),MCOL()
DEFINE BAR 1 OF Shortcut PROMPT "Cu Total \<General"
ON SELECTION BAR 1 OF Shortcut DO BAR_1_OF_Shortcut_FB2P

DEFINE BAR 2 OF Shortcut PROMPT "Cu Totaluri pe \<Luni"
ON SELECTION BAR 2 OF Shortcut DO BAR_2_OF_Shortcut_FB2P

DEFINE BAR 3 OF Shortcut PROMPT "Cu Totaluri pe \<Grupe"
ON SELECTION BAR 3 OF Shortcut DO BAR_3_OF_Shortcut_FB2P

DEFINE BAR 4 OF Shortcut PROMPT "Cu Totaluri pe Sectie"
ON SELECTION BAR 4 OF Shortcut DO BAR_4_OF_Shortcut_FB2P

DEFINE BAR 5 OF Shortcut PROMPT "\-"
ON BAR 5 OF Shortcut ACTIVATE POPUP _11d0uc7oo

	*----------------------------------
	DEFINE POPUP _11d0uc7oo SHORTCUT RELATIVE
DEFINE BAR 6 OF Shortcut PROMPT "\<Lista fiselor"
ON SELECTION BAR 6 OF Shortcut DO BAR_6_OF_Shortcut_FB2P

DEFINE BAR 7 OF Shortcut PROMPT "\-"
ON BAR 7 OF Shortcut ACTIVATE POPUP _1600p8xqz

	*----------------------------------
	DEFINE POPUP _1600p8xqz SHORTCUT RELATIVE
DEFINE BAR 8 OF Shortcut PROMPT "Lista de inventar"
ON BAR 8 OF Shortcut ACTIVATE POPUP Listadeinv

	*----------------------------------
	DEFINE POPUP Listadeinv SHORTCUT RELATIVE
	DEFINE BAR 1 OF Listadeinv PROMPT "Model1"
	ON SELECTION BAR 1 OF Listadeinv DO BAR_1_OF_Listadeinv_FB2P

	DEFINE BAR 2 OF Listadeinv PROMPT "Model2"
	ON SELECTION BAR 2 OF Listadeinv DO BAR_2_OF_Listadeinv_FB2P

DEFINE BAR 9 OF Shortcut PROMPT "Evidenta MF"
ON SELECTION BAR 9 OF Shortcut DO BAR_9_OF_Shortcut_FB2P
ACTIVATE POPUP Shortcut

*</MenuCode>

*<Procedures>
PROCEDURE BAR_1_OF_Shortcut_FB2P
	DO list_corp_general
ENDPROC && BAR_1_OF_Shortcut_FB2P

PROCEDURE BAR_2_OF_Shortcut_FB2P
	DO list_corp_peluni
ENDPROC && BAR_2_OF_Shortcut_FB2P

PROCEDURE BAR_3_OF_Shortcut_FB2P
	DO list_corp_pegrup
ENDPROC && BAR_3_OF_Shortcut_FB2P

PROCEDURE BAR_4_OF_Shortcut_FB2P
	DO list_corp_peSECTII
ENDPROC && BAR_4_OF_Shortcut_FB2P

PROCEDURE BAR_6_OF_Shortcut_FB2P
	DO lista_fiselor_corp_istoric
ENDPROC && BAR_6_OF_Shortcut_FB2P

PROCEDURE BAR_1_OF_Listadeinv_FB2P
	DO caut_alf WITH 'Numegest','numegest','NUMELE GESTIUNII','M.NUMEGEST'
	IF buton=2
		RETURN
	ENDIF
	
	SELE numegest
	LOCATE FOR numegest=m.numegest
	SCATTER MEMVAR
	
	
	SELE mf
	IF m.gest=-1
		SET FILTER TO fel=" " AND !CASAT AND !INACTIV
	ELSE
		SET FILTER TO gest=m.gest AND fel=" " AND !CASAT AND !INACTIV
	ENDIF
	
	SET ORDER TO scdden
	
	REPORT FORM listmf_inv TO PRINTER PROMPT PREVIEW 
	SELECT mf
	SET FILTER TO 
ENDPROC && BAR_1_OF_Listadeinv_FB2P

PROCEDURE BAR_2_OF_Listadeinv_FB2P
	PRIVATE pddata
	ldatacrt = "01/" + m.nl + "/" + m.an 
	pddata = GOMONTH(CTOD(ldatacrt),1) - 1
			
	DO caut_alf WITH 'Numegest','numegest','NUMELE GESTIUNII','M.NUMEGEST'
	IF buton=2
		RETURN
	ENDIF
	
	SELE numegest
	LOCATE FOR numegest=m.numegest
	SCATTER MEMVAR
	
	
	SELE mf
	IF m.gest=-1
		SET FILTER TO fel=" " AND !CASAT AND !INACTIV
	ELSE
		SET FILTER TO gest=m.gest AND fel=" " AND !CASAT AND !INACTIV
	ENDIF
	
	*SET ORDER TO scdden
	Index On str(gest,4)+Str(Val(nrinv)) Tag SCDNRINV Of &LOC\&NFSCURT\TEMPO\mfi Ascending
	
	REPORT FORM nota_inv2005 TO PRINTER PROMPT PREVIEW 
	SET INDEX TO
	SELECT mf
	SET FILTER TO 
ENDPROC && BAR_2_OF_Listadeinv_FB2P

PROCEDURE BAR_9_OF_Shortcut_FB2P
	DO evidenta_mf
	
ENDPROC && BAR_9_OF_Shortcut_FB2P

*</Procedures>
