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

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

GROUPBOX DLG_NULL 78 3
BEGIN
  PROMPT 1 0 ""
END

NUMBER QBF_CODDITTA 5
BEGIN
  PROMPT 3 1 "Ditta  "
  FLAGS "GRD"
  USE LF_NDITTE KEY 1
  INPUT CODDITTA QBF_CODDITTA
  OUTPUT QBF_RAGDITTA RAGSOC
  FIELD LF_QUAB->CODDITTA
  CHECKTYPE REQUIRED             
  KEY 1
END

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

NUMBER QBF_ANNODIC 4
BEGIN
  PROMPT 52 3 "Anno dichiarazione "
  FLAGS "DR"
END

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

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

NUMBER QBF_QUAB_CODDIP 6
BEGIN
  PROMPT 1 3 "Codice dipendente "  
  USE LF_QUAB  //SELECT (CODDITTA=#QBF_CODDITTA)
  JOIN LF_DIPEND INTO CODDITTA=CODDITTA CODIP=CODDIP
  INPUT CODDITTA QBF_CODDITTA // SELECT
  INPUT CODDIP   QBF_QUAB_CODDIP  
//  INPUT NPROG    QBF_NPROG 
  DISPLAY "Dipendente"					CODDIP
  DISPLAY "Cognome@24" 			LF_DIPEND->COGNOME
  DISPLAY "Nome@20"    			LF_DIPEND->NOME
  DISPLAY "N°@5"						NPROG
  DISPLAY "Inizio rapporto"				DATAINI
  DISPLAY "Fine rapporto"				DATAFIN
  OUTPUT QBF_QUAB_CODDIP CODDIP
  GROUP RICERCA_QB
  KEY 1                    
  FLAGS "RZ"
  MESSAGE COPY,QBF_CODDIP
END  

NUMBER QBF_NPROG 4
BEGIN
  PROMPT 29 3 "@bNumero  "  
  USE LF_QUAB SELECT (CODDITTA=#QBF_CODDITTA)       
  JOIN LF_DIPEND INTO CODDITTA=CODDITTA CODIP=CODDIP  
  INPUT CODDITTA QBF_CODDITTA SELECT
  DISPLAY "Dipendente"					CODDIP
  DISPLAY "Cognome@24" 			LF_DIPEND->COGNOME
  DISPLAY "Nome@20"    			LF_DIPEND->NOME
  DISPLAY "N°"							NPROG
  DISPLAY "Inizio rapporto"				DATAINI
  DISPLAY "Fine rapporto"				DATAFIN
  OUTPUT QBF_NPROG 			NPROG
  FIELD LF_QUAB->NPROG  
  CHECKTYPE REQUIRED
  KEY 1
END  

GROUPBOX DLG_NULL 25 4
BEGIN
  PROMPT 0 6 "Rapporto di lavoro "
END

TEXT DLG_NULL
BEGIN
  PROMPT 1 7 "Inizio"
END

DATE QBF_DATAINI
BEGIN
  PROMPT 1 8 ""
  FIELD LF_QUAB->DATAINI
  GROUP GROUP_ALL
END

TEXT DLG_NULL
BEGIN
  PROMPT 13 7 "Cessazione"
END

DATE QBF_DATAFIN
BEGIN
  PROMPT 13 8 ""
  FIELD LF_QUAB->DATAFIN
  GROUP GROUP_ALL
END

#define	COLCOMM	27
#define	COLCOMM1	28
#define	COLCOMM6	34

TEXT DLG_NULL 
BEGIN
  PROMPT COLCOMM 5 "Periodo di "
END

GROUPBOX DLG_NULL 14 4
BEGIN
  PROMPT COLCOMM 6 "commisurazione "
END

TEXT DLG_NULL
BEGIN
  PROMPT COLCOMM1 7 "Anni"
END

NUMBER QBF_ANNICOMM 2
BEGIN         
  PROMPT COLCOMM1 8 ""  
  FIELD LF_QUAB->ANNICOMM
  GROUP GROUP_ALL
END

TEXT DLG_NULL
BEGIN
  PROMPT COLCOMM6 7 "Mesi"
END

NUMBER QBF_MESICOMM 2
BEGIN                    
  PROMPT COLCOMM6 8 ""
  FIELD LF_QUAB->MESICOMM
  GROUP GROUP_ALL
END

#define	COLCONV	43
#define	COLCONV1	44
#define	COLCONV6	51

TEXT DLG_NULL 
BEGIN
  PROMPT COLCONV 5 "Periodo "
END

GROUPBOX DLG_NULL 14 4
BEGIN
  PROMPT COLCONV 6 "convenzionale "
END

TEXT DLG_NULL
BEGIN
  PROMPT COLCONV1 7 "Anni"
END

NUMBER QBF_ANNICONV 2
BEGIN         
  PROMPT COLCONV1 8 ""  
  FIELD LF_QUAB->ANNICONV
  GROUP GROUP_ALL
END

TEXT DLG_NULL
BEGIN
  PROMPT COLCONV6 7 "Mesi"
END

NUMBER QBF_MESICONV 2
BEGIN                    
  PROMPT COLCONV6 8 ""
  FIELD LF_QUAB->MESICONV
  GROUP GROUP_ALL
END

#define	COLPAR0	58
#define	COLPAR1	59
#define	COLPAR2	64
#define	COLPAR3	69

GROUPBOX DLG_NULL 20 4
BEGIN
  PROMPT COLPAR0 6 "Tempo parziale"
END

TEXT DLG_NULL
BEGIN
  PROMPT COLPAR1 7 "Anni"
END

NUMBER QBF_ANNIPARZ 2
BEGIN                    
  PROMPT COLPAR1 8 ""
  FIELD LF_QUAB->ANNIPARZ
  GROUP GROUP_ALL
END

TEXT DLG_NULL
BEGIN
  PROMPT COLPAR2 7 "Mesi"
END

NUMBER QBF_MESIPARZ 2
BEGIN                    
  PROMPT COLPAR2 8 ""
  FIELD LF_QUAB->MESIPARZ
  GROUP GROUP_ALL
END

TEXT DLG_NULL
BEGIN
  PROMPT COLPAR3 7 "  %"
END

NUMBER QBF_PERCPARZ 6
BEGIN                    
  PROMPT COLPAR3 8 ""
  FIELD LF_QUAB->PERCPARZ
  PICTURE ".2"
  GROUP GROUP_ALL
END

// SECONDA RIGA

TEXT DLG_NULL
BEGIN
  PROMPT 1 10 "Quota eccedente"
END

NUMBER QBF_QUOTAECC 15
BEGIN
  PROMPT 1 11 ""
  FIELD LF_QUAB->QUOTAECC
  FLAGS "R"
  PICTURE "."
  GROUP GROUP_ALL
END

#define	COLTFR0 40 //21
#define	COLTFR1 41 //22
#define	COLTFR2 46 //27
#define	COLTFR3 53 //33
#define COLTFR4	61 //40      

#define RIGTFR1	11
#define	RIGTFR2	12

GROUPBOX DLG_NULL 38 4
BEGIN
  PROMPT COLTFR0 10 "TFR o ind.equip. corrisposti nel 1994  "
END

TEXT DLG_NULL
BEGIN
  PROMPT COLTFR1 RIGTFR1 "Mese"
END

NUMBER QBF_MESEEROG 2
BEGIN
  PROMPT COLTFR1 RIGTFR2 ""   
  NUM_EXPR {(#THIS>=0) && (#THIS<13)}
  WARNING "Mese non valido"       
  FIELD LF_QUAB->MESEEROG
  GROUP GROUP_ALL
END

TEXT DLG_NULL
BEGIN
  PROMPT COLTFR2 RIGTFR1 "Titolo"
END

STRING QBF_TITEROG 1 
BEGIN
  PROMPT COLTFR2 RIGTFR2 ""
  SHEET "Codice|Descrizione@15"
  INPUT QBF_TITEROG     
  ITEM "|"  
  ITEM "A|Anticipazione"
  ITEM "B|Saldo"
  ITEM "C|Acconto"
  OUTPUT QBF_TITEROG
  FIELD LF_QUAB->TITEROG
  FLAGS "U"
  GROUP GROUP_ALL
END

TEXT DLG_NULL
BEGIN
  PROMPT COLTFR3 RIGTFR1 "% abb."
END

NUMBER QBF_PERCABB 6
BEGIN                    
  PROMPT COLTFR3 RIGTFR2 ""
  FIELD LF_QUAB->PERCABB
  PICTURE ".2"   
  GROUP GROUP_ALL  
END

TEXT DLG_NULL
BEGIN
  PROMPT COLTFR4 RIGTFR1 "Ammontare netto"
END

NUMBER QBF_AMMNETTO 15
BEGIN
  PROMPT COLTFR4 RIGTFR2 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->AMMNETTO
  GROUP GROUP_ALL
END


// TERZA RIGA

#define	COLTFRB0 2
#define	COLTFRB1 2
#define	COLTFRB2 7
#define	COLTFRB3 14
#define COLTFRB4	22
#define RIGTFRB1	15
#define	RIGTFRB2	16


GROUPBOX DLG_NULL 38 4
BEGIN
  PROMPT 1 14 "Altre indennità corrisposte nel 1994"
END

TEXT DLG_NULL
BEGIN
  PROMPT COLTFRB1 RIGTFRB1 "Mese"
END

NUMBER QBF_MESEEROG2 2
BEGIN
  PROMPT COLTFRB1 RIGTFRB2 ""
  FIELD LF_QUAB->MESEEROG2
  NUM_EXPR {(#THIS>=0) && (#THIS<13)}
  WARNING "Mese non valido"       
  GROUP GROUP_ALL
END

TEXT DLG_NULL
BEGIN
  PROMPT COLTFRB2 RIGTFRB1 "Titolo"
END

STRING QBF_TITEROG2 1
BEGIN
  PROMPT /*COLTFR2*/ 8 RIGTFRB2 ""
  SHEET "Codice|Descrizione@15"
  INPUT QBF_TITEROG2
  ITEM "|"
  ITEM "A|Anticipazione"
  ITEM "B|Saldo"
  ITEM "C|Acconto"
  OUTPUT QBF_TITEROG2
  FIELD LF_QUAB->TITEROG2
  FLAGS "U"
  GROUP GROUP_ALL  
END

TEXT DLG_NULL
BEGIN
  PROMPT COLTFRB3 RIGTFRB1 "% abb."
END

NUMBER QBF_PERCABB2 6
BEGIN                    
  PROMPT COLTFRB3 RIGTFRB2 ""
  FIELD LF_QUAB->PERCABB2
  PICTURE ".2"   
  GROUP GROUP_ALL  
END

TEXT DLG_NULL
BEGIN
  PROMPT COLTFRB4 RIGTFRB1 "Ammontare netto"
END

NUMBER QBF_AMMNETTO2 15
BEGIN
  PROMPT COLTFRB4 RIGTFRB2 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->AMMNETTO2
  GROUP GROUP_ALL  
END

TEXT DLG_NULL
BEGIN
  PROMPT 45 RIGTFRB1 "Contributi obbligatori a carico"
END

NUMBER QBF_CONTLAV 15
BEGIN
  PROMPT 45 RIGTFRB2 "del lavoratore "
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->CONTLAV
  GROUP GROUP_ALL  
END        

ENDPAGE

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

#define	C1	2
#define	C2	22
#define	C3  57

GROUPBOX DLG_NULL 41 4
BEGIN
  PROMPT 1 1 "Acconti e anticipazioni erogati dal 74 al 93"
END

TEXT DLG_NULL 
BEGIN
  PROMPT C1 2 "TFR o ind.equip."
END

NUMBER QBF_TFR7494 15
BEGIN
  PROMPT C1 3 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->TFR7494
  GROUP GROUP_ALL  
END

TEXT DLG_NULL 
BEGIN
  PROMPT C2 2 "Altre indennità"
END

NUMBER QBF_INDEN7494 15
BEGIN
  PROMPT C2 3 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->INDEN7494
  GROUP GROUP_ALL  
END

TEXT DLG_NULL 
BEGIN
  PROMPT C3 2 "Totale indennità"
END

NUMBER QBF_TIND7494 15 
BEGIN
  PROMPT C3 3 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->TIND7494
  GROUP GROUP_ALL  
END

TEXT DLG_NULL 
BEGIN
  PROMPT C1 5 "Totale riduzioni"
END

NUMBER QBF_TRID 15 
BEGIN
  PROMPT C1 6 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->TRID
  GROUP GROUP_ALL  
END

TEXT DLG_NULL 
BEGIN
  PROMPT 30 5 "TFR o indennità equipollenti"
END

NUMBER QBF_TFRIND 15 
BEGIN
  PROMPT 30 6 "per reddito di riferimento "
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->TFRIND
  GROUP GROUP_ALL  
END

TEXT DLG_NULL
BEGIN
  PROMPT C1 7 "Aliquota"
END

NUMBER QBF_ALIQUOTA 6
BEGIN                    
  PROMPT C1 8 ""
  FIELD LF_QUAB->ALIQUOTA
  PICTURE ".2"   
  GROUP GROUP_ALL  
END

#define	GD0	24 //11
#define	GD1	25 //12
#define GD2	64 //51

GROUPBOX DLG_NULL 49 4
BEGIN
  PROMPT GD0 7 "Art.4 3° comma L.482/1985"
END

TEXT DLG_NULL
BEGIN
  PROMPT GD1 8 "Retribuzione media"
END

NUMBER QBF_RETRMEDIA 15
BEGIN
  PROMPT GD1 9 "biennio precedente "
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->RETRMEDIA
  GROUP GROUP_ALL  
END

TEXT DLG_NULL
BEGIN
  PROMPT GD2 8 "Aliquota"
END

NUMBER QBF_ALIQUOTA2 6
BEGIN                    
  PROMPT GD2 9 ""
  FIELD LF_QUAB->ALIQUOTA2
  PICTURE ".2"   
  GROUP GROUP_ALL  
END

// QUARTA RIGA
TEXT DLG_NULL
BEGIN
  PROMPT 1 11 "Imponibile TFR"
END

NUMBER QBF_IMPTFR 15
BEGIN
  PROMPT 1 12 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->IMPTFR
  GROUP GROUP_ALL  
END

TEXT DLG_NULL
BEGIN
  PROMPT 19 11 "Impon. altre ind."
END

NUMBER QBF_IMPIND 15
BEGIN
  PROMPT 19 12 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->IMPIND
  GROUP GROUP_ALL  
END

TEXT DLG_NULL
BEGIN
  PROMPT 37 11 "Imponibile anno"
END

NUMBER QBF_IMPANNO 15
BEGIN
  PROMPT 37 12 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->IMPANNO
  GROUP GROUP_ALL  
END

TEXT DLG_NULL
BEGIN
  PROMPT 54 11 "Totale reddito imponibile"
END

NUMBER QBF_TOTIMP 15
BEGIN
  PROMPT 57 12 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->TOTIMP
  GROUP GROUP_ALL  
END

// QUINTA RIGA
TEXT DLG_NULL
BEGIN
  PROMPT 1 13 "Rit. operate su acc. e ant. erogati "
END

NUMBER QBF_ROPEACC 15
BEGIN
  PROMPT 1 14 "dal 74 al 93      "
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->ROPEACC 
  GROUP GROUP_ALL  
END

TEXT DLG_NULL
BEGIN
  PROMPT 37 13 "Imposta dovuta"
END

NUMBER QBF_IMPDOV 15
BEGIN
  PROMPT 37 14 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->IMPDOV
  GROUP GROUP_ALL  
END

TEXT DLG_NULL
BEGIN
  PROMPT 57 13 "Ritenute in eccedenza"
END

NUMBER QBF_RITECC 15
BEGIN
  PROMPT 57 14 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->RITECC
  GROUP GROUP_ALL  
END

// SESTA RIGA
GROUPBOX DLG_NULL 38 4
BEGIN
  PROMPT 1 15 "Art.2122 COD. CIV."
END

TEXT DLG_NULL 
BEGIN
  PROMPT 2 16 "Quota spettante"
END

NUMBER QBF_QUOTASPET 15
BEGIN
  PROMPT 2 17 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->QUOTASPET
  GROUP GROUP_DIPDEC GROUP_EREDE
END

TEXT DLG_NULL 
BEGIN
  PROMPT 19 16 "Indennità spettante"
END

NUMBER QBF_INDSPETT 15
BEGIN
  PROMPT 19 17 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->INDSPETT
  GROUP GROUP_DIPDEC GROUP_EREDE  
END

TEXT DLG_NULL
BEGIN
  PROMPT 40 16 "Ritenute operate"
END

NUMBER QBF_ROPE 15
BEGIN
  PROMPT 40 17 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->ROPE           
  GROUP GROUP_EREDE  
END

TEXT DLG_NULL
BEGIN
  PROMPT 57 16 "Imponibile CSSN"
END

NUMBER QBF_IMPOCSSN 15
BEGIN
  PROMPT 57 17 ""
  PICTURE "."
  FLAGS "R"
  FIELD LF_QUAB->IMPOCSSN
  GROUP GROUP_ALL  
END

ENDPAGE

ENDMASK

