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

*<MenuCode>
DEFINE POPUP Trezorerie SHORTCUT RELATIVE FROM MROW(),MCOL()
DEFINE BAR 1 OF Trezorerie PROMPT "CEC incasari"
ON BAR 1 OF Trezorerie ACTIVATE POPUP CECincasar

	*----------------------------------
	DEFINE POPUP CECincasar SHORTCUT RELATIVE
	DEFINE BAR 1 OF CECincasar PROMPT "Clienti 4111 CEC" ;
		MESSAGE '5112: 4111'
	ON SELECTION BAR 1 OF CECincasar DO BAR_1_OF_CECincasar_FB2P

	DEFINE BAR 2 OF CECincasar PROMPT "Transfer CEC->Banca" ;
		MESSAGE '581 :5112;5121: 581'
	ON SELECTION BAR 2 OF CECincasar DO BAR_2_OF_CECincasar_FB2P

DEFINE BAR 2 OF Trezorerie PROMPT "CEC plati"
ON BAR 2 OF Trezorerie ACTIVATE POPUP CECplati

	*----------------------------------
	DEFINE POPUP CECplati SHORTCUT RELATIVE
	DEFINE BAR 1 OF CECplati PROMPT "Plata furnizori 401 CEC" ;
		MESSAGE '401 :5112'
	ON SELECTION BAR 1 OF CECplati DO BAR_1_OF_CECplati_FB2P

	DEFINE BAR 2 OF CECplati PROMPT "Transfer Banca -> CEC" ;
		MESSAGE '581 :5121;5112: 581'
	ON SELECTION BAR 2 OF CECplati DO BAR_2_OF_CECplati_FB2P

	DEFINE BAR 3 OF CECplati PROMPT "Avansuri furnizori" ;
		MESSAGE '409:5112'
	ON SELECTION BAR 3 OF CECplati DO BAR_3_OF_CECplati_FB2P

	DEFINE BAR 4 OF CECplati PROMPT "Salarii" ;
		MESSAGE '421:5112'
	ON SELECTION BAR 4 OF CECplati DO BAR_4_OF_CECplati_FB2P

	DEFINE BAR 5 OF CECplati PROMPT "Avans salarii" ;
		MESSAGE '425:5112'
	ON SELECTION BAR 5 OF CECplati DO BAR_5_OF_CECplati_FB2P

	DEFINE BAR 6 OF CECplati PROMPT "Taxe diverse" ;
		MESSAGE '447:5112'
	ON SELECTION BAR 6 OF CECplati DO BAR_6_OF_CECplati_FB2P

	DEFINE BAR 7 OF CECplati PROMPT "Impozit salariu" ;
		MESSAGE '444:5112'
	ON SELECTION BAR 7 OF CECplati DO BAR_7_OF_CECplati_FB2P

	DEFINE BAR 8 OF CECplati PROMPT "Impozite la stat" ;
		MESSAGE '446:5112'
	ON SELECTION BAR 8 OF CECplati DO BAR_8_OF_CECplati_FB2P

	DEFINE BAR 9 OF CECplati PROMPT "Creditori diversi" ;
		MESSAGE '462:5112'
	ON SELECTION BAR 9 OF CECplati DO BAR_9_OF_CECplati_FB2P

	DEFINE BAR 10 OF CECplati PROMPT "Aprovizionare (avansuri cec)" ;
		MESSAGE '542:5112'
	ON SELECTION BAR 10 OF CECplati DO BAR_10_OF_CECplati_FB2P
ACTIVATE POPUP Trezorerie

*</MenuCode>

*<Procedures>
PROCEDURE BAR_1_OF_CECincasar_FB2P
	lans(10417)
	*!*	m.scd='5112 '
	*!*	m.scc='411  '
	*!*	***do BANCA.spr
	*!*	do alfabetaper with;
	*!*	 'CASAPER',;
	*!*	 "NUMELE CLIENTULUI","CLIENTI","NUME",   ;
	*!*	 "","","",  ;
	*!*	 "NUMELE CECULUI","CECNUME","CEC",  ;
	*!*	"",'v'
	*!*	*
	*!*	IF BUTON=2
	*!*	DO STERGE
	*!*	RETURN
	*!*	ENDIF
	*!*	DO CODARE
	*!*	DO CONTABILIZEAZA WITH m.scd,m.scc,M.suma,CLASAACT
	*!*	M.CEC=M.EXPLICATIA
	*!*	DO INCEC
	*!*	SELE CLIENTI
	*!*	REPLACE CLIENTI.incasat WITH CLIENTI.incasat+m.suma
	*!*	do sterge
	*!*	RETURN
ENDPROC && BAR_1_OF_CECincasar_FB2P

PROCEDURE BAR_2_OF_CECincasar_FB2P
	lans(10418)
	*!*	m.scd='581 '
	*!*	m.scc='5112'
	*!*	***do BANCA.spr
	*!*	do alfabeta with;
	*!*	 'CASA',;
	*!*	 "","","",   ;
	*!*	 "NUMELE BANCII","BANNUME","NUME_2",  ;
	*!*	 "NUMELE CECULUI","CECNUME","CEC",  ;
	*!*	""
	*!*	*
	*!*	IF BUTON=2
	*!*	DO STERGE
	*!*	RETURN
	*!*	ENDIF
	*!*	M.NUME=''
	*!*	DO CODARE
	*!*	DO CONTABILIZEAZA WITH '581 ','5112',M.suma,CLASAACT
	*!*	M.CEC=M.EXPLICATIA
	*!*	DO PLCEC
	*!*	DO CONTABILIZEAZA WITH '5121','581 ',M.suma,CLASAACT
	*!*	do inBANCA
	
	
	*!*	do sterge
	*!*	RETURN
ENDPROC && BAR_2_OF_CECincasar_FB2P

PROCEDURE BAR_1_OF_CECplati_FB2P
	lans(10419)
	*!*	m.scd='401 '
	*!*	m.scc='5112'
	*!*	*do BANCA.spr
	*!*	do alfabetaper with;
	*!*	 'casaPER',;
	*!*	 "NUMELE FURNIZORULUI","FURNIZOR","NUME",   ;
	*!*	 "","","", ;
	*!*	 'NUMELE CECULUI','CECNUME',"CEC",  ;
	*!*	"",'c'
	*!*	*
	*!*	IF BUTON=2
	*!*	DO STERGE
	*!*	RETURN
	*!*	ENDIF
	*!*	DO CODARE
	*!*	DO CONTABILIZEAZA WITH m.scd,m.scc,M.suma,CLASAACT
	*!*	M.CEC=M.EXPLICATIA
	*!*	DO PLCEC
	
	*!*	sele furnizor
	*!*	repl furnizor.platit with furnizor.platit+m.suma
	*!*	do sterge
	*!*	RETURN
ENDPROC && BAR_1_OF_CECplati_FB2P

PROCEDURE BAR_2_OF_CECplati_FB2P
	lans(10420)
	*!*	m.scd='581 '
	*!*	m.scc='5121'
	
	*!*	do alfabeta with;
	*!*	 'casa',;
	*!*	 "","","",   ;
	*!*	 "NUMELE BANCII","BANNUME","NUME_2", ;
	*!*	 'NUMELE CECULUI','CECNUME',"CEC",  ;
	*!*	""
	*!*	*
	*!*	IF BUTON=2
	*!*	DO STERGE
	*!*	RETURN
	*!*	ENDIF
	*!*	DO CODARE
	*!*	DO CONTABILIZEAZA WITH '581 ','5121',M.suma,CLASAACT
	*!*	do plBANCA
	*!*	DO CONTABILIZEAZA WITH '5112','581 ',M.suma,CLASAACT
	*!*	M.CEC=M.EXPLICATIA
	*!*	DO INCEC
	*!*	do sterge
	*!*	RETURN
ENDPROC && BAR_2_OF_CECplati_FB2P

PROCEDURE BAR_3_OF_CECplati_FB2P
	PRIVATE pcACN, CN
	loCont = ret_cont("Selectati contul",'409') && ,4091,4092')
	
	IF TYPE('loCont') # 'O'
		RETURN
	ENDIF 
	
	IF buton = 2
		RELEASE loCont
		RETURN 
	ENDIF 
	
	CN = locont.cont
	PcACN = loCont.Acont
	lans(10552)
ENDPROC && BAR_3_OF_CECplati_FB2P

PROCEDURE BAR_4_OF_CECplati_FB2P
	lans(10553)
ENDPROC && BAR_4_OF_CECplati_FB2P

PROCEDURE BAR_5_OF_CECplati_FB2P
	lans(10554)
ENDPROC && BAR_5_OF_CECplati_FB2P

PROCEDURE BAR_6_OF_CECplati_FB2P
	lans(10555)
ENDPROC && BAR_6_OF_CECplati_FB2P

PROCEDURE BAR_7_OF_CECplati_FB2P
	lans(10556)
ENDPROC && BAR_7_OF_CECplati_FB2P

PROCEDURE BAR_8_OF_CECplati_FB2P
	lans(10557)
ENDPROC && BAR_8_OF_CECplati_FB2P

PROCEDURE BAR_9_OF_CECplati_FB2P
	lans(10558)
ENDPROC && BAR_9_OF_CECplati_FB2P

PROCEDURE BAR_10_OF_CECplati_FB2P
	lans(10559)
ENDPROC && BAR_10_OF_CECplati_FB2P

*</Procedures>
