#include "771200.h"

TOOLBAR "" 0 0 0 2
#include <relapbar.h>
ENDPAGE

#define	G_DIPEND	1
#define	G_QUADROA	2

PAGE "Quadro A1" -1 -1 78 21

GROUPBOX DLG_NULL 78 3
BEGIN
    PROMPT 1 0 ""
END

NUMBER QAF_CODDITTA 5
BEGIN
  PROMPT 3 1 "Ditta  "
  FLAGS "GRDP"
  KEY 1
  CHECKTYPE REQUIRED             
  USE LF_NDITTE KEY 1
  INPUT CODDITTA QAF_CODDITTA
  OUTPUT QAF_RAGDITTA RAGSOC
  FIELD LF_QUAA1->CODDITTA
END

STRING QAF_RAGDITTA 50
BEGIN
  PROMPT 17 1 "Ragione "
  FLAGS "DP"
END

NUMBER QAF_ANNODIC 4
BEGIN
  PROMPT 52 3 "Anno dichiarazione "
  FLAGS "DRP"
END

TEXT DLG_NULL
BEGIN
  PROMPT 1 7 "@bDati dipendente"
END

NUMBER F_CODIP 6
BEGIN
  PROMPT 80 80 ""
  FLAGS "D"  
  FIELD LF_QUAA1->CODDIP     
  CHECKTYPE REQUIRED
  KEY 1
END

NUMBER F_CODANAGDIP 6
BEGIN
  PROMPT 1 8 "@bCodice  " 
  USE LF_DIPEND KEY 1 SELECT ((CODDITTA=#QAF_CODDITTA))
  INPUT CODDITTA 	QAF_CODDITTA
  INPUT CODDIP 		F_CODANAGDIP
  DISPLAY "Codice " 	CODDIP
  DISPLAY "Cognome@24" 	COGNOME  
  DISPLAY "Nome@20" 	NOME
  OUTPUT F_CODANAGDIP 	CODDIP
  OUTPUT QAF_COGNOME 	COGNOME
  OUTPUT QAF_NOME 		NOME 
  ADD RUN 773mod -1 771150a 45 "Anagrafica dipendenti"
  GROUP	G_DIPEND
  MESSAGE COPY, F_CODIP    
  FLAGS "H"
END

NUMBER F_CODANAGDIPQA 6
BEGIN
  PROMPT 1 8 "@bCodice  " 
  USE LF_QUAA1 KEY 1 SELECT ((CODDITTA=#QAF_CODDITTA))      
  JOIN LF_DIPEND KEY 1 INTO CODDITTA=CODDITTA CODDIP=CODDIP
  INPUT CODDITTA 	QAF_CODDITTA
  INPUT CODDIP 		F_CODANAGDIPQA
  DISPLAY "Codice " 	CODDIP
  DISPLAY "Cognome@24" 	LF_DIPEND->COGNOME  
  DISPLAY "Nome@20" 	LF_DIPEND->NOME
  DISPLAY "N�@4" 			NPROG
  OUTPUT F_CODANAGDIPQA 	CODDIP
  OUTPUT QAF_COGNOME 	LF_DIPEND->COGNOME
  OUTPUT QAF_NOME 		LF_DIPEND->NOME 
  MESSAGE COPY, F_CODIP               
  GROUP G_QUADROA
END


STRING QAF_COGNOME 24
BEGIN
  PROMPT 25 8 ""
  FLAGS "D"
END            

STRING QAF_NOME 20
BEGIN
  PROMPT 49 8 ""
  FLAGS "D"
END            

NUMBER QAF_NPROG 4
BEGIN
  PROMPT 1 10 "@bNumero  "  
  CHECKTYPE REQUIRED     
  KEY 1    
  FIELD LF_QUAA1->NPROG  
  USE LF_QUAA1 KEY 1 SELECT ((CODDITTA=#QAF_CODDITTA)) 
  JOIN LF_DIPEND KEY 1 INTO CODDITTA=CODDITTA CODDIP=CODDIP
  INPUT CODDITTA 	QAF_CODDITTA 
  INPUT CODDIP 		F_CODIP     
  INPUT NPROG 		QAF_NPROG 
  DISPLAY "Codice@10"	CODDIP    
  DISPLAY "Cognome@24" 	LF_DIPEND->COGNOME  
  DISPLAY "Nome@20" 	LF_DIPEND->NOME
  DISPLAY "N�@4" 			NPROG
  OUTPUT F_CODIP			CODDIP
  OUTPUT QAF_NPROG 		NPROG  
END  

ENDPAGE

ENDMASK