#include "771100.h"

TOOLBAR "" 0 20 0 2

BUTTON F_GIURIDICA 10 2
BEGIN
PROMPT -15 -1 "~Giuridiche"
END

BUTTON DCF_DITTA 10 2
BEGIN
PROMPT -25 -1 "~Ditte"
END

BUTTON DLG_SAVEREC 10 2
BEGIN
PROMPT -35 -1 "~Registra"
MESSAGE EXIT,K_SAVE  
PICTURE BMP_SAVEREC
PICTURE BMP_SAVERECDN
END

BUTTON DLG_CANCEL 10 2
BEGIN
PROMPT -45 -1 ""
MESSAGE EXIT,K_ESC
END

BUTTON DLG_QUIT 10 2
BEGIN
PROMPT -55 -1 ""
MESSAGE EXIT,K_QUIT
END

ENDPAGE

PAGE "Dati C.A.A." -1 -1 78 18

GROUPBOX DLG_NULL 78 4
BEGIN
  PROMPT 0 0 ""
  FLAGS "R"
END

NUMBER F_CODDITTA 5
BEGIN
  PROMPT 1 1 "Ditta             "
  FLAGS "GRD"
  USE LF_NDITTE KEY 1
  INPUT CODDITTA F_CODDITTA
  JOIN LF_BASE TO LF_NDITTE INTO CODDITTA=CODDITTA
  OUTPUT F_RAGSOC LF_NDITTE->RAGSOC               
  OUTPUT F_ANAGR LF_BASE->CODCAAF
  CHECKTYPE REQUIRED 
  KEY 1
END

STRING F_RAGSOC 50
BEGIN
  PROMPT 1 2 "Ragione sociale   "
  FLAGS "D"
END                                

GROUPBOX DLG_NULL 78 4
BEGIN
  PROMPT 0 4 "Dati anagrafici"
END

NUMBER F_ANAGR 5
BEGIN
  PROMPT 1 5 "Codice                  "
  USE LF_ANAGGIU KEY 1
  INPUT CODANAGR F_ANAGR             
  JOIN LF_ANAG TO LF_ANAGGIU INTO CODANAGR=CODANAGR TIPOA="G"   
  JOIN LF_COMUNI TO LF_ANAG ALIAS 1 INTO COM==COMRES
  JOIN LF_COMUNI TO LF_ANAG ALIAS 2 INTO COM==COMRF
  DISPLAY "Codice" CODANAGR
  DISPLAY "Ragione Sociale@50" LF_ANAG->RAGSOC
  OUTPUT F_COFI LF_ANAG->COFI
  OUTPUT F_RAGIONE LF_ANAG->RAGSOC
  OUTPUT F_INDRES LF_ANAG->INDRES
  OUTPUT F_CIVRES LF_ANAG->CIVRES
  OUTPUT F_CAPRES LF_ANAG->CAPRES
  OUTPUT F_INDRF LF_ANAG->INDRF
  OUTPUT F_CIVRF LF_ANAG->CIVRF
  OUTPUT F_CAPRF LF_ANAG->CAPRF
  OUTPUT F_COMRES 1@->DENCOM
  OUTPUT F_PROVRES 1@->PROVCOM
  OUTPUT F_COMRF 2@->DENCOM
  OUTPUT F_PROVRF 2@->PROVCOM
  OUTPUT F_ANAGR CODANAGR
  CHECKTYPE NORMAL
  FLAGS "R"
END
  
STRING F_COFI 16
BEGIN
  PROMPT 43 5 "Codice fiscale  "
  FLAGS "D" 
END

STRING F_RAGIONE 50
BEGIN
  PROMPT 1 6 "Ragione sociale         "
  FLAGS "D"
END

NUMBER F_DITTACAAF 5
BEGIN
  PROMPT 1 9 "Ditta CAA "
  FLAGS "RZ" 
  USE LF_NDITTE KEY 3 SELECT CODANAGR=#F_ANAGR
  INPUT TIPOA "G"
  INPUT CODANAGR F_ANAGR
  INPUT CODDITTA F_DITTACAAF
  DISPLAY "Ditta" CODDITTA
  DISPLAY "Tipo" TIPOA
  DISPLAY "Cod.Anagrafico" CODANAGR
  DISPLAY "Num.Iscr.Albo" NISCRAA
  DISPLAY "Ragione sociale@50" RAGSOC  
  OUTPUT F_NISCRAA NISCRAA  
  OUTPUT F_DITTACAAF CODDITTA
  CHECKTYPE NORMAL     
  FIELD LF_BASE->DITTACAAF
END

STRING F_NISCRAA 10
BEGIN
  PROMPT 30 9 "Numero di iscrizione all'albo "   
  CHECKTYPE REQUIRED
  FLAGS "DG"
END

GROUPBOX DLG_NULL 78 4
BEGIN
  PROMPT 0 11 "Sede legale"
END

STRING F_INDRES 35
BEGIN
  PROMPT 1 12 "Indirizzo "
  FLAGS "D"
END

STRING F_CIVRES 10
BEGIN
  PROMPT 47 12 ""
  FLAGS "D"
END

STRING F_CAPRES 5
BEGIN
  PROMPT 63 12 "C.A.P. "
  FLAGS "D"
END

STRING F_COMRES 50
BEGIN
  PROMPT 1 13 "Comune    "
  FLAGS "D"
END

STRING F_PROVRES 5
BEGIN
  PROMPT 63 13 "Prov.  "
  FLAGS "D"
END

GROUPBOX DLG_NULL 78 4
BEGIN
  PROMPT 0 15 "Domicilio fiscale "
END

STRING F_INDRF 35
BEGIN
  PROMPT 1 16 "Indirizzo "
  FLAGS "D"
END

STRING F_CIVRF 10
BEGIN
  PROMPT 47 16 ""
  FLAGS "D"
END

STRING F_CAPRF 5
BEGIN
  PROMPT 63 16 "C.A.P. "
  FLAGS "D"
END

STRING F_COMRF 50
BEGIN
  PROMPT 1 17 "Comune    "
  FLAGS "D"
END

STRING F_PROVRF 5
BEGIN
  PROMPT 63 17 "Prov.  "
  FLAGS "D"
END

ENDPAGE 

ENDMASK 
