// Quadro B-1
#include "77qb1.h"
TOOLBAR "" 0 20 0 2
#include <toolbar.h>
ENDPAGE

PAGE "MODULO 770 - QUADRO B1" -1 -1 78 18

GROUPBOX DLG_NULL 78 3
BEGIN
  PROMPT 1 0 ""
END

NUMBER QB1F_CODDITTA 5
BEGIN
  PROMPT 3 1 "Ditta  "
  FLAGS "GRD"
  USE LF_NDITTE KEY 1
  INPUT CODDITTA QB1F_CODDITTA
  OUTPUT QB1F_RAGDITTA RAGSOC
  FIELD LF_QUAB1->CODDITTA
  CHECKTYPE REQUIRED             
  KEY 1
END

STRING QB1F_RAGDITTA 50
BEGIN
  PROMPT 17 1 "Ragione "
  FLAGS "D"
END

NUMBER QB1F_ANNODIC 4
BEGIN
  PROMPT 52 4 "Anno dichiarazione "
  FLAGS "DR"
END             

NUMBER QB1F_CODDIP 6
BEGIN
  PROMPT 80 80 "Codice dipendente con KEY 1 usato per la read in RELAPP"  
  FLAGS "D"
  FIELD LF_QUAB1->CODDIP
  CHECKTYPE REQUIRED
  KEY 1
END

NUMBER QB1F_ANADIP_CODDIP 6
BEGIN
  PROMPT 1 4 "Codice dipendente "
  USE LF_DIPEND KEY 1 SELECT ((CODDITTA=#QB1F_CODDITTA))
  INPUT CODDITTA QB1F_CODDITTA
  INPUT CODIP    QB1F_ANADIP_CODDIP
  DISPLAY "Codice dipendente" CODIP
  DISPLAY "Cognome@24" COGNOME
  DISPLAY "Nome@20"    NOME
  DISPLAY "Qualifica"  QUALIFICA
  OUTPUT QB1F_ANADIP_CODDIP CODIP  
  OUTPUT QB1F_QUAB1_CODDIP	CODIP
  ADD RUN 773 -1 771150a 45 "Anagrafica dipendenti" /uPRASSI
  MESSAGE COPY,QB1F_CODDIP
  FLAGS "RZH"
  KEY 1
  GROUP RICERCA_DIP
END

NUMBER QB1F_QUAB1_CODDIP 6
BEGIN
  PROMPT 1 4 "Codice dipendente "  
  USE LF_QUAB1  //SELECT (CODDITTA=#QB1F_CODDITTA)
  JOIN LF_DIPEND INTO CODDITTA=CODDITTA CODIP=CODDIP  
  INPUT CODDITTA QB1F_CODDITTA // SELECT
  INPUT CODDIP   QB1F_QUAB1_CODDIP  
//  INPUT NPROG    QB1F_NPROG 
  DISPLAY "Dipendente"					CODDIP
  DISPLAY "Cognome@24" 			LF_DIPEND->COGNOME
  DISPLAY "Nome@20"    			LF_DIPEND->NOME
  DISPLAY "N°@5"						NPROG
  DISPLAY "Indennita'@18" 				INDEN
  DISPLAY "Imponibile@18" 				AMMIMP
  DISPLAY "Imponibile al 4%"			IMP4
  DISPLAY "Imponibile al 8%" 			IMP8
  OUTPUT QB1F_QUAB1_CODDIP	CODDIP
  OUTPUT QB1F_CODDIP		CODDIP
  GROUP RICERCA_QB
  FLAGS "RZ"
  KEY 1
  MESSAGE COPY,QB1F_CODDIP
END  

NUMBER QB1F_NPROG 4
BEGIN
  PROMPT 29 4 "@bNumero  "  
  FIELD LF_QUAB1->NPROG  
  USE LF_QUAB1 SELECT (CODDITTA=#QB1F_CODDITTA)
  JOIN LF_DIPEND INTO CODDITTA=CODDITTA CODIP=CODDIP  
  INPUT CODDITTA QB1F_CODDITTA SELECT
//  INPUT NPROG    QB1F_NPROG 
  DISPLAY "Dipendente"					CODDIP
  DISPLAY "Cognome@24" 			LF_DIPEND->COGNOME
  DISPLAY "Nome@20"    			LF_DIPEND->NOME
  DISPLAY "N°"							NPROG
  DISPLAY "Indennita'@18" 				INDEN
  DISPLAY "Imponibile@18" 				AMMIMP
  DISPLAY "Imponibile al 4%"			IMP4
  DISPLAY "Imponibile al 8%" 			IMP8
  OUTPUT QB1F_NPROG    	NPROG                  
  OUTPUT QB1F_INDEN		INDEN
  OUTPUT QB1F_AMMIMP	AMMIMP
  OUTPUT QB1F_IMP4		IMP4
  OUTPUT QB1F_IMP8		IMP8    
  CHECKTYPE REQUIRED
  KEY 1
END  

NUMBER QB1F_INDEN 15
BEGIN
  PROMPT 1 6 "Ammontare delle indennita' di anzianita' di previdenza "
  PICTURE "."                                                        
  FLAGS "R"
  FIELD LF_QUAB1->INDEN
END

TEXT DLG_NULL
BEGIN
  PROMPT 1 7 "@bImposta di ricchezza mobile  "
END

GROUPBOX DLG_NULL 78 7
BEGIN
  PROMPT 1 7 ""
END

#define	COL1	3
#define	COL2	33
#define	COL3	60

TEXT DLG_NULL
BEGIN
  PROMPT COL1 8 "Ammontare imponibile"
END

NUMBER QB1F_AMMIMP 15
BEGIN
  PROMPT COL1 9 ""    
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB1->AMMIMP
END

TEXT DLG_NULL
BEGIN
  PROMPT COL2 8 "Imponibile al 4%"
END

NUMBER QB1F_IMP4 15
BEGIN
  PROMPT COL2 9 ""  
  FIELD LF_QUAB1->IMP4
  PICTURE "."  
  FLAGS "R"         
END

TEXT DLG_NULL
BEGIN
  PROMPT COL3 8 "Imponibile al 8% "
END

NUMBER QB1F_IMP8 15
BEGIN
  PROMPT COL3 9 ""
  FIELD LF_QUAB1->IMP8
  PICTURE "."  
  FLAGS "R"         
END

TEXT DLG_NULL
BEGIN
  PROMPT COL1 10 "Imponibile al 10% "
END

NUMBER QB1F_IMP10 15
BEGIN
  PROMPT COL1 11 ""
  FIELD LF_QUAB1->IMP10
  PICTURE "."  
  FLAGS "R" 
END                                          

TEXT DLG_NULL
BEGIN
  PROMPT COL2 10 "Imponibile al 12% "
END

NUMBER QB1F_IMP12 15
BEGIN
  PROMPT COL2 11 ""
  FIELD LF_QUAB1->IMP12
  PICTURE "."  
  FLAGS "R" 
END                                          

TEXT DLG_NULL
BEGIN
  PROMPT COL3 10 "Imponibile al 15% "
END

NUMBER QB1F_IMP15 15
BEGIN
  PROMPT COL3 11 ""
  FIELD LF_QUAB1->IMP15
  PICTURE "."  
  FLAGS "R" 
END                                          

NUMBER QB1F_IMPNETTO 15
BEGIN
  PROMPT COL1 12 "Amm. imponibile (al netto delle rit.di ricchezza mobile) "
  FIELD LF_QUAB1->IMPNETTO
  PICTURE "."  
  FLAGS "R" 
END

#define	RIGA1	14
#define	RIGA2	15
#define	RIGA3	16

TEXT DLG_NULL
BEGIN
  PROMPT 1 RIGA1 "@bImposta complementare  "
END

GROUPBOX DLG_NULL 78 4
BEGIN
  PROMPT 1 RIGA1 ""
END

TEXT DLG_NULL
BEGIN
  PROMPT COL1 RIGA2 "Imponibile al 1,5%"
END

NUMBER QB1F_IMPO15 15
BEGIN
  PROMPT COL1 RIGA3 ""    
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB1->IMPO15
END

TEXT DLG_NULL
BEGIN
  PROMPT COL2 RIGA2 "Imponibile al 4%"
END

NUMBER QB1F_IMPO4 15
BEGIN
  PROMPT COL2 RIGA3 ""  
  FIELD LF_QUAB1->IMPO4
  PICTURE "."  
  FLAGS "R"         
END

ENDPAGE

ENDMASK

