*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="furnizori1_scurt.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 "Factura de achizitie"
ON SELECTION BAR 1 OF Shortcut DO BAR_1_OF_Shortcut_FB2P

DEFINE BAR 2 OF Shortcut PROMPT "\Factura de achizitie marfa cu amanuntul"
ON SELECTION BAR 2 OF Shortcut

DEFINE BAR 3 OF Shortcut PROMPT "Factura externa de achizitie"
ON SELECTION BAR 3 OF Shortcut DO BAR_3_OF_Shortcut_FB2P

DEFINE BAR 4 OF Shortcut PROMPT "\-"
ON BAR 4 OF Shortcut ACTIVATE POPUP _138146gi7

	*----------------------------------
	DEFINE POPUP _138146gi7 SHORTCUT RELATIVE
DEFINE BAR 5 OF Shortcut PROMPT "Constituire garantii"
ON SELECTION BAR 5 OF Shortcut DO BAR_5_OF_Shortcut_FB2P

DEFINE BAR 6 OF Shortcut PROMPT "Inregistrare cheltuieli in avans" ;
	MESSAGE ' 471 :401; 4426: 401'
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 _13813zf6f

	*----------------------------------
	DEFINE POPUP _13813zf6f SHORTCUT RELATIVE
DEFINE BAR 8 OF Shortcut PROMPT "Tichete de masa"
ON SELECTION BAR 8 OF Shortcut DO BAR_8_OF_Shortcut_FB2P

DEFINE BAR 9 OF Shortcut PROMPT "Combustibili cu taxa"
ON SELECTION BAR 9 OF Shortcut DO BAR_9_OF_Shortcut_FB2P

DEFINE BAR 10 OF Shortcut PROMPT "B.C.F."
ON SELECTION BAR 10 OF Shortcut DO BAR_10_OF_Shortcut_FB2P

DEFINE BAR 11 OF Shortcut PROMPT "Bonuri valorice"
ON SELECTION BAR 11 OF Shortcut DO BAR_11_OF_Shortcut_FB2P
ACTIVATE POPUP Shortcut

*</MenuCode>

*<Procedures>
PROCEDURE BAR_1_OF_Shortcut_FB2P
	lans(10456)
	IF buton=2
		DO deschid_actc
		RETURN
	ENDIF 
	DO introducere_compacta WITH 'achi_mat','','401 ',.t.,.t.,'Factura de achizitie - Furnizori 401',10456
ENDPROC && BAR_1_OF_Shortcut_FB2P

PROCEDURE BAR_3_OF_Shortcut_FB2P
	*DO FURN_E_MAT WITH .T. IN PROCMENIU.PRG
	SELE BAL
	GO TOP
	OS=CREA('SELCONT')
	OS.SHOW(1)
	IF BUTON=2
		RETURN
	ENDIF
	
	LANS(10423)
ENDPROC && BAR_3_OF_Shortcut_FB2P

PROCEDURE BAR_5_OF_Shortcut_FB2P
	lans(10412)
ENDPROC && BAR_5_OF_Shortcut_FB2P

PROCEDURE BAR_6_OF_Shortcut_FB2P
	lans(10410)
ENDPROC && BAR_6_OF_Shortcut_FB2P

PROCEDURE BAR_8_OF_Shortcut_FB2P
	lans(10459)
	IF buton=2
		DO deschid_actc
		RETURN
	ENDIF 
	DO introducere_compacta WITH 'achi_mat','','401 ',.t.,.t.,'Tichete de masa',10459
	
	*!*	clasaact='actverif'
	*!*	SCD1='628  '
	*!*	SCC1='401  '
	*!*	SCD2='4426 '
	*!*	SCC2='401  '
	
	*!*	OA=CREATEOBJ('BONMASA')
	*!*	OA.SHOW(1)
	*!*	IF BUTON=2
	*!*		DO STERGE
	*!*		RETURN
	*!*	ENDIF
	*!*	DO CODARE
	*!*	*******************************************
	*!*	DO CONTABILIZEAZA WITH SCD1,SCC1,M.TOTFTVA,clasaact
	*!*	*******************************************
	*!*	IF m.NEIMPOZAB>0
	*!*		m.num=m.nume_2
	*!*		m.nume_2='NEIMPOZABIL '
	*!*		DO CONTABILIZEAZA WITH SCD2,SCC2,0,clasaact
	*!*		M.NUME_2=M.NUM
	*!*	ENDIF
	*!*	IF m.totftvaI>0
	*!*		m.num=m.nume_2
	*!*		m.nume_2='TVA '+str(m.ctvai,5,2)
	*!*		DO CONTABILIZEAZA WITH SCD2,SCC2,M.TVAI,clasaact
	*!*		M.NUME_2=M.NUM
	*!*	ENDIF
	*!*	IF m.totftvaM>0
	*!*		m.num=m.nume_2
	*!*		m.nume_2='TVA '+str(m.ctvam,5,2)
	*!*		DO CONTABILIZEAZA WITH SCD2,SCC2,M.TVAM,clasaact
	*!*		M.NUME_2=M.NUM
	*!*	ENDIF
	*!*	M.EXPLICATIA='TICHETE DE MASA'
	*!*	DO CONTABILIZEAZA WITH '5328','401 ',M.TAXA,clasaact
	*!*	m.nume_2='NEIMPOZABIL '
	*!*	DO CONTABILIZEAZA WITH '4426 ','401  ',0,clasaact
	*!*	*************************************************
	*!*	SELE FURNIZOR
	*!*	repl furnizor.achizit with furnizor.achizit+m.totctva+M.TAXA 
	*!*	M.TOTCTVA=M.TOTCTVA+M.TAXA
	*!*	M.NEIMPOZAB=M.TAXA+M.NEIMPOZAB
	*!*	DO ADCUMP 
	*!*	DO ADCHIND
	*!*	DO ADRESPONS
	*!*	DO STERGE
	*!*	RETURN
ENDPROC && BAR_8_OF_Shortcut_FB2P

PROCEDURE BAR_9_OF_Shortcut_FB2P
	*DO MENIU44140
	lans(10460)
	IF buton=2
		DO deschid_actc
		RETURN
	ENDIF 
	DO introducere_compacta WITH 'achi_mat','','401 ',.t.,.t.,'Combustibili cu taxa',10460
ENDPROC && BAR_9_OF_Shortcut_FB2P

PROCEDURE BAR_10_OF_Shortcut_FB2P
	lans(10461)
	IF buton=2
		DO deschid_actc
		RETURN
	ENDIF 
	DO introducere_compacta WITH 'achi_mat','','401 ',.t.,.F.,'B .C. F. -uri',10461
	*!*	create table &loc\&nfscurt\tempo\ratelis.dbf free (nrcrt n(2),nume_2 c(30),scd C(4),scc C(4),suma n(12),BIFA l)
	*!*	sele ratelis
	*!*	index on nrcrt tag nrcrt
	*!*	for i=1 to 6
	*!*	appe blank
	*!*	repl nrcrt with i
	*!*	ENDFOR
	*!*	SELE RATELIS
	*!*	repl nume_2 with "VALOARE COMBUSTIBILI",SCD WITH '5328',SCC WITH '401', SUMA WITH 0,BIFA WITH .F. for nrcrt=1
	*!*	repl nume_2 with "TVA COMBUSTIBILI",SCD WITH '4426',SCC WITH '401', SUMA WITH 0,BIFA WITH .F. for nrcrt=2
	*!*	repl nume_2 with " ",SCD WITH '6022',SCC WITH '401', SUMA WITH 0,BIFA WITH .F. for nrcrt=3
	*!*	repl nume_2 with "TAXA DE DRUM",SCD WITH '5328',SCC WITH '401', SUMA WITH 0,BIFA WITH .T. for nrcrt=4
	*!*	repl nume_2 with "PRET IMPRIMATE",SCD WITH '604',SCC WITH '401', SUMA WITH 0,BIFA WITH .F. for nrcrt=5
	*!*	repl nume_2 with "TVA IMPRIMATE",SCD WITH '4426',SCC WITH '401', SUMA WITH 0,BIFA WITH .F. for nrcrt=6
	
	*!*	*brow
	
	*!*	titlu='B.C.F.'
	*!*	do form ratelis 
	
	*!*	if buton=2
	*!*	return
	*!*	endif
	*!*	DO CODARE
	*!*	sele ratelis
	*!*	scan FOR !EMPTY(SCc) AND !EMPTY(SCd) AND !EMPTY(suma)
	*!*	scat memv
	*!*	if bifa
	*!*		m.neimpozab=m.suma
	*!*	else
	*!*		m.neimpozab=0
	*!*	endif
	*!*	do contabilizeaza with m.scd,m.scc,m.suma
	*!*	endscan
	
	*!*	SELE RATELIS
	*!*	SUM SUMA FOR BIFA=.F. AND SCD#'4426' AND scc='401 ' TO M.TOTFTVAM
	*!*	SUM SUMA FOR SCD='4426' TO M.TVAM    
	*!*	SUM SUMA FOR BIFA=.T. AND scc='401 ' TO M.NEIMPOZAB    
	*!*	M.TOTCTVA=M.TOTFTVAM+M.TVAM +m.neimpozab
	
	*!*	DO ADCUMP   
	*!*	 
	*!*	SELE FURNIZOR
	*!*	LOCATE FOR NUME=ALLT(M.NUME)
	*!*	IF flock()
	*!*		REPL FURNIZOR.achizit with FURNIZOR.achizit+m.TOTCTVA
	*!*	ENDIF
	*!*	unlock
	
	*!*	use in ratelis
ENDPROC && BAR_10_OF_Shortcut_FB2P

PROCEDURE BAR_11_OF_Shortcut_FB2P
	lans(10462)
	IF buton=2
		DO deschid_actc
		RETURN
	ENDIF 
	DO introducere_compacta WITH 'achi_mat','','401 ',.t.,.F.,'Bonuri valorice',10462
	*!*	create table &loc\&nfscurt\tempo\ratelis.dbf free (nrcrt n(2),nume_2 c(30),scd C(4),scc C(4),suma n(12),BIFA l)
	*!*	sele ratelis
	*!*	index on nrcrt tag nrcrt
	*!*	for i=1 to 5
	*!*	appe blank
	*!*	repl nrcrt with i
	*!*	ENDFOR
	*!*	SELE RATELIS
	*!*	repl nume_2 with "BONURI VALORICE",SCD WITH '5328',SCC WITH '401', SUMA WITH 0,BIFA WITH .F. for nrcrt=1
	*!*	repl nume_2 with "TVA ",SCD WITH '4426',SCC WITH '401', SUMA WITH 0,BIFA WITH .F. for nrcrt=2
	*!*	repl nume_2 with "FOND SPECIAL",SCD WITH '5328',SCC WITH '401', SUMA WITH 0,BIFA WITH .T. for nrcrt=3
	*!*	repl nume_2 with "VALOARE IMPRIMATE",SCD WITH '628',SCC WITH '401', SUMA WITH 0,BIFA WITH .F. for nrcrt=4
	*!*	repl nume_2 with "TVA IMPRIMATE",SCD WITH '4426',SCC WITH '401', SUMA WITH 0,BIFA WITH .F. for nrcrt=5
	
	*!*	*brow
	
	*!*	titlu='BONURI VALORICE'
	*!*	do form ratelis 
	
	*!*	if buton=2
	*!*	return
	*!*	endif
	*!*	DO CODARE
	*!*	sele ratelis
	*!*	scan FOR !EMPTY(SCc) AND !EMPTY(SCd) AND !EMPTY(suma)
	*!*	scat memv
	*!*	if bifa
	*!*		m.neimpozab=m.suma
	*!*	else
	*!*		m.neimpozab=0
	*!*	endif
	*!*	do contabilizeaza with m.scd,m.scc,m.suma
	*!*	endscan
	
	*!*	SELE RATELIS
	*!*	SUM SUMA FOR BIFA=.F. AND SCD#'4426' TO M.TOTFTVAM
	*!*	SUM SUMA FOR SCD='4426' TO M.TVAM    
	*!*	SUM SUMA FOR BIFA=.T. TO M.NEIMPOZAB    
	*!*	M.TOTCTVA=M.TOTFTVAM+M.TVAM +m.neimpozab
	
	*!*	DO ADCUMP   
	*!*	 
	*!*	SELE FURNIZOR
	*!*	LOCATE FOR NUME=ALLT(M.NUME)
	*!*	IF flock()
	*!*		REPL FURNIZOR.achizit with FURNIZOR.achizit+m.TOTCTVA
	*!*	ENDIF
	*!*	unlock
	
	*!*	use in ratelis
ENDPROC && BAR_11_OF_Shortcut_FB2P

*</Procedures>
