#include "775100a.h"
TOOLBAR "" 0 20 0 2
#include <toolbar.h>
ENDPAGE

PAGE "Gestione percipienti" -1 -1 78 21

GROUPBOX DLG_NULL 78 3
BEGIN
    PROMPT 1 0 ""
END

NUMBER F_CODDITTA 5
BEGIN
    PROMPT 3 1 "Ditta  "
    FLAGS "RDG"
    USE LF_NDITTE KEY 1
    INPUT CODDITTA F_CODDITTA
    DISPLAY "Codice" CODDITTA
    DISPLAY "Ragione sociale @50" RAGSOC
    OUTPUT F_RAGDITTA RAGSOC
    FIELD LF_PERC->CODDITTA
    KEY 1
    CHECKTYPE REQUIRED             
END

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

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

TEXT DLG_NULL
BEGIN
  PROMPT 1 8 "@bDati percipiente"
END

LIST F_TIPOA 1 12
BEGIN
  PROMPT 1 9 ""    
  FIELD LF_PERC->TIPOA
  ITEM "F|Fisica"
  ITEM "G|Giuridica"
  CHECKTYPE REQUIRED
  KEY 1
END

NUMBER F_CODANAGR 5
BEGIN
  PROMPT 15 9 "" 
  USE LF_PERC KEY 1 SELECT ((CODDITTA==#F_CODDITTA)&&(TIPOA==#F_TIPOA))
  JOIN LF_ANAG TO LF_PERC KEY 1 INTO TIPOA=TIPOA CODANAGR=CODANAGR  
  INPUT CODDITTA F_CODDITTA
  INPUT TIPOA    F_TIPOA
  INPUT CODANAGR F_CODANAGR
  DISPLAY "Tipo "               TIPOA
  DISPLAY "Codice "             CODANAGR
  DISPLAY "Cognome - Nome o Ragione sociale@50"  LF_ANAG->RAGSOC
  OUTPUT F_TIPOA        TIPOA
  OUTPUT F_CODANAGR     CODANAGR
  OUTPUT F_RAGSOC       LF_ANAG->RAGSOC
  FIELD LF_PERC->CODANAGR
  CHECKTYPE REQUIRED
  KEY 1  
END

STRING F_RAGSOC 50
BEGIN
  PROMPT 25 9 ""
  FLAGS "D"
END            

NUMBER F_FATTBIL 15
BEGIN
  PROMPT 1 14 "Fatture da ricevere "
  PICTURE "."
  FIELD LF_PERC->FATTBIL
  FLAGS "R"
END

ENDPAGE

ENDMASK



