#include "BATBCAA.H"
#define  LF_PCON   19  //PIANO DEI CONTI

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

PAGE "Tabella categoria acquisti articoli " 11 60 14

GROUPBOX DLG_NULL 75 7
BEGIN
 PROMPT 1 0 ""
 FLAGS "R"
END

STRING F_CODICE 3
BEGIN
  PROMPT 2 2 "Cod. Tabella   "
  FIELD CAA->CODTAB
  KEY 1
  USE CAA

  FLAG "U"
  INPUT CODTAB  F_CODICE

  DISPLAY "Codice " CODTAB
  DISPLAY "Descrizione@50 " S0

  OUTPUT F_CODICE CODTAB
  OUTPUT F_DESCR  S0
  CHECKTYPE REQUIRED

END

STRING F_DESCR 50
BEGIN
  PROMPT 2 4  "Descrizione    "
  FIELD CAA->S0
  KEY 2
  USE CAA KEY 2
  INPUT S0  F_DESCR

  DISPLAY "Codice " CODTAB
  DISPLAY "Descrizione@50 " S0

  OUTPUT F_CODICE CODTAB
  OUTPUT F_DESCR  S0
  CHECKTYPE REQUIRED

END

STRING F_CODCON 3
BEGIN
  PROMPT 2 8  "Codice conto   "
  FIELD CAA->S1
  FLAG "R"
END

STRING F_CODCON1 3
BEGIN
  PROMPT 25 8  ""
  FIELD CAA->S2
  USE LF_PCON SELECT INDBIL=3
  FLAG "R"
  INPUT GRUPPO      F_CODCON
  INPUT CONTO       F_CODCON1
  DISPLAY "Gruppo "   GRUPPO
  DISPLAY "Conto "    CONTO
  DISPLAY "Descrizione@50" DESCR
  OUTPUT F_CODCON GRUPPO
  OUTPUT F_CODCON1 CONTO
  OUTPUT F_DESCR1 DESCR
  ADD RUN CG0 -0
END

STRING F_CODCON2 6
BEGIN
  PROMPT 34 8  ""
  FIELD CAA->S3
  USE LF_PCON SELECT INDBIL=3
  FLAG "R"
  INPUT GRUPPO      F_CODCON
  INPUT CONTO       F_CODCON1
  INPUT SOTTOCONTO  F_CODCON2
  DISPLAY "Gruppo "   GRUPPO
  DISPLAY "Conto "    CONTO
  DISPLAY "Sottoconto " SOTTOCONTO
  DISPLAY "Descrizione@50" DESCR
  OUTPUT F_CODCON GRUPPO
  OUTPUT F_CODCON1 CONTO
  OUTPUT F_CODCON2 SOTTOCONTO
  OUTPUT F_DESCR1 DESCR
  ADD RUN CG0 -0
END

STRING F_DESCR1 50
BEGIN
  PROMPT 17 10  ""
  FLAG "D"
END

ENDPAGE


ENDMASK
