#include "ba3100.h"
#include "batbivd.h"

TOOLBAR "" 0 20 0 2

#include <toolbar.h>

ENDPAGE

PAGE "Voci di bilancio IV direttiva CEE" -1 -1 78 15

LIST F_SEZ 1 18
BEGIN
  PROMPT 1 1 "Sezione "
  FIELD %IVD->CODTAB[1,1]
  ITEM "1|Attivita'"
  ITEM "2|Passivita'"
  ITEM "9|Conto economico"
  KEY 1
  HELP "Sezione secondo la IV dir. CEE"
END

STRING F_LETT 1
BEGIN
  PROMPT 1 3 "Lettera "
  FIELD %IVD->CODTAB[2,2]
  FLAGS "U"
  KEY 1
  USE %IVD SELECT CODTAB?="??"
  INPUT CODTAB[1,1] F_SEZ
  INPUT CODTAB[2,2] F_LETT
  DISPLAY "Sezione" CODTAB[1,1]
  DISPLAY "Lettera" CODTAB[2,2]
  DISPLAY "Descrizione@70" S0
  OUTPUT F_SEZ CODTAB[1,1]
  OUTPUT F_LETT CODTAB[2,2]
  OUTPUT F_DESCR_LETT S0
  CHECKTYPE NORMAL
  HELP "Lettera secondo la IV dir. CEE"
  GROUP GR_SEARCH
END

STRING F_DESCR_LETT 70 50
BEGIN
  PROMPT 22 3 ""
  FLAGS "D"
END

NUMBER F_CLASSE 8 4
BEGIN
  PROMPT 1 5 "Classe  "
  FIELD %IVD->CODTAB[3,6]
  FLAGS "MZ"
  KEY 1
  USE %IVD SELECT CODTAB[7,8]==""
  COPY INPUT F_LETT
  INPUT CODTAB[3,6] F_CLASSE
  DISPLAY "Sezione" CODTAB[1,1]
  DISPLAY "Lettera" CODTAB[2,2]
  DISPLAY "Classe  @M" CODTAB[3,6]
  DISPLAY "Descrizione@70" S0
  OUTPUT F_SEZ CODTAB[1,1]
  OUTPUT F_LETT CODTAB[2,2]
  OUTPUT F_CLASSE CODTAB[3,6]
  OUTPUT F_DESCR_CLAS S0
  CHECKTYPE NORMAL
  HELP "Classe secondo la IV dir. CEE (numero romano)"
END

STRING F_DESCR_CLAS 70 50
BEGIN
  PROMPT 22 5 ""
  FLAGS "D"
END

NUMBER F_NUM 2
BEGIN
  PROMPT 1 7 "Numero  "
  FIELD %IVD->CODTAB[7,8]
  FLAGS "RZ"
  KEY 1
  USE %IVD
  COPY INPUT F_CLASSE
  INPUT CODTAB[7,8] F_NUM
  DISPLAY "Sezione" CODTAB[1,1]
  DISPLAY "Lettera" CODTAB[2,2]
  DISPLAY "Classe  @M" CODTAB[3,6]
  DISPLAY "Numero" CODTAB[7,8]
  DISPLAY "Descrizione@70" S0
  OUTPUT F_NUM CODTAB[7,8]
  OUTPUT F_SEZ CODTAB[1,1]
  OUTPUT F_LETT CODTAB[2,2]
  OUTPUT F_CLASSE CODTAB[3,6]
  OUTPUT F_DESCR S0
  HELP "Numero (arabo) secondo la IV dir. CEE"
  VALIDATE AUTOEXIT_FUNC 2 F_LETT F_NUM
END

TEXT DLG_NULL
BEGIN
  PROMPT 1 9 "Descrizione"
END

STRING F_DESCR 70
BEGIN
  PROMPT 2 11 ""
  FIELD %IVD->S0
  KEY 2
  USE %IVD KEY 2
  INPUT S0 F_DESCR
  DISPLAY "Descrizione@70" S0
  DISPLAY "Sezione" CODTAB[1,1]
  DISPLAY "Lettera" CODTAB[2,2]
  DISPLAY "Classe  @M" CODTAB[3,6]
  DISPLAY "Numero" CODTAB[7,8]
  COPY OUTPUT F_NUM
  CHECKTYPE REQUIRED
  WARNING "Manca la descrizione"
END

ENDPAGE

ENDMASK
