#include <lffiles.h>
#include "ve2400.h"

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

PAGE "Pagina 1" 0 0 70 20

GROUPBOX DLG_NULL 78 5
BEGIN
  PROMPT 0 0 ""
//FLAG "R"
END

STRING F_CODART 20
BEGIN
    PROMPT 2 1 "Codice art.   "
    FIELD LF_ANAMAG->CODART
    KEY 1
    FLAG "U"
    USE LF_ANAMAG
    INPUT CODART F_CODART
    DISPLAY "Codice@20" CODART
    DISPLAY "Descrizione@50" DESCR
    OUTPUT F_CODART CODART
    OUTPUT F_DESCR DESCR
    CHECKTYPE REQUIRED
END

STRING F_TIPO 1
BEGIN
    PROMPT 42 1  "Tipo "
    FIELD LF_ANAMAG->TIPO
END

STRING F_DESCR 50
BEGIN
    PROMPT 2 3 "Descrizione   "
    FIELD LF_ANAMAG->DESCR
    KEY 2
    USE LF_ANAMAG KEY 2
    INPUT DESCR F_DESCR
    DISPLAY "Codice@20" CODART
    DISPLAY "Descrizione@50" DESCR
    OUTPUT F_CODART CODART
    OUTPUT F_DESCR DESCR
    CHECKTYPE REQUIRED
END

STRING F_GRMERC 3
BEGIN
    PROMPT 1 5 "Gr. merc.      "
    FIELD LF_ANAMAG->GRMERC[1,3]
    GROUP 1
    FLAG "U"
    USE GMC KEY 1 SELECT CODTAB ?= "???"
    INPUT CODTAB F_GRMERC
    DISPLAY "Codice" CODTAB
    DISPLAY "Descrizione@50" S0
    OUTPUT F_GRMERC CODTAB[1,3]
    OUTPUT F_GRMERCD1 S0
    CHECKTYPE NORMAL
END

STRING F_GRMERCD1 50
BEGIN
    PROMPT 23 5 ""
    GROUP 1
    USE GMC KEY 2
    INPUT S0 F_GRMERCD1
    DISPLAY "Codice" CODTAB
    DISPLAY "Descrizione@50" S0
    OUTPUT F_GRMERC CODTAB[1,3]
    OUTPUT F_GRMERCD1 S0
    CHECKTYPE NORMAL
END

STRING F_GRMERCB 2
BEGIN
    PROMPT 1 6 "Sott. merc.     "
    FIELD LF_ANAMAG->GRMERC[4,5]
    GROUP 1
    FLAG "U"
    USE GMC
    INPUT CODTAB[1,3] F_GRMERC
    INPUT CODTAB[4,5] F_GRMERCB
    DISPLAY "Codice" CODTAB
    DISPLAY "Descrizione@50" S0
    OUTPUT F_GRMERC CODTAB[1,3]
    OUTPUT F_GRMERCB CODTAB[4,5]
    OUTPUT F_GRMERCD2 S0
    CHECKTYPE NORMAL
END

STRING F_GRMERCD2 50
BEGIN
    PROMPT 23 6 ""
    GROUP 1
    USE GMC KEY 2
    INPUT S0 F_GRMERCD2
    DISPLAY "Codice" CODTAB
    DISPLAY "Descrizione@50" S0
    OUTPUT F_GRMERC CODTAB[1,3]
    OUTPUT F_GRMERCB CODTAB[4,5]
    OUTPUT F_GRMERCD2 S0
    CHECKTYPE NORMAL
END

STRING F_CODIVA 4
BEGIN
    PROMPT  1 7 "Codice IVA    "
    FIELD LF_ANAMAG->CODIVA
    USE %IVA
    INPUT CODTAB  F_CODIVA
    DISPLAY "Codice " CODTAB
    DISPLAY "Descrizione@40" S0
    OUTPUT F_CODIVA CODTAB
    OUTPUT F_CODIVA1 S0
    CHECKTYPE NORMAL
END

STRING F_CODIVA1 50
BEGIN
    PROMPT  23 7 ""
    USE %IVA KEY 2
    INPUT S0 F_CODIVA1
    DISPLAY "Descrizione@50" S0
    DISPLAY "Codice " CODTAB
    OUTPUT F_CODIVA CODTAB
    OUTPUT F_CODIVA1 S0
END

SPREADSHEET F_SHEET0 77 5
BEGIN
  PROMPT 1 8 ""
  ITEM "U.M."
  ITEM "F. conversione"
  ITEM "Prezzo netto@18"
  ITEM "Prezzo lordo@18"
END

STRING F_CATCONA 3
BEGIN
   PROMPT 1 14 "Categoria conto acquisti "
   FIELD LF_ANAMAG->CATCONA
   GROUP 11
   MESSAGE CLEAR,12@
   MESSAGE EMPTY ENABLE,12@
   FLAG "UZ"
   USE CAA
   INPUT CODTAB F_CATCONA
   DISPLAY "Codice" CODTAB
   DISPLAY "Descrizione@50" S0
   DISPLAY "Gruppo" S1
   DISPLAY "Conto"  S2
   DISPLAY "Sottoconto" S3
   OUTPUT F_CATCONA CODTAB
   OUTPUT F_CATCONA1 S0
   CHEKTYPE NORMAL
END

STRING F_CATCONA1 40
BEGIN
   PROMPT 36 14 ""
   FLAG "D"
   GROUP 11
   USE CAA KEY 2
   INPUT S0 F_CATCONA1
   DISPLAY "Descrizione@50" S0
   DISPLAY "Codice" CODTAB
   DISPLAY "Gruppo" S1
   DISPLAY "Conto"  S2
   DISPLAY "Sottoconto" S3
   COPY OUTPUT F_CATCONA
END

NUMBER F_GRUPPOA 3
BEGIN
   PROMPT 1 15 "Conto d'acquisto "
   FIELD LF_ANAMAG->GRUPPOA
   GROUP 12
   MESSAGE CLEAR,11@
   MESSAGE EMPTY ENABLE,11@
END

NUMBER F_CONTOA 3
BEGIN
    PROMPT  22 15 ""
    FIELD LF_ANAMAG->CONTOA
    GROUP 12
END

NUMBER F_SOTTOCA 6
BEGIN
   PROMPT  26 15 ""
   FIELD LF_ANAMAG->SOTTOCA
   GROUP 12
   USE LF_PCON
   INPUT GRUPPO F_GRUPPOA
   INPUT CONTO  F_CONTOA
   INPUT SOTTOCONTO F_SOTTOCA
   DISPLAY "Gruppo" GRUPPO
   DISPLAY "Conto"  CONTO
   DISPLAY "Sottoconto" SOTTOCONTO
   DISPLAY "Descrizione@50" DESCR
   OUTPUT F_GRUPPOA GRUPPO
   OUTPUT F_CONTOA  CONTO
   OUTPUT F_SOTTOCA SOTTOCONTO
   OUTPUT F_DESCRA  DESCR
   CHECKTYPE NORMAL
END

STRING F_DESCRA 40
BEGIN
   PROMPT  36 15 ""
   FLAG "D"
   GROUP 12
   USE LF_PCON KEY 2
   INPUT DESCR F_DESCRA
   DISPLAY "Descrizione@50" DESCR
   DISPLAY "Gruppo" GRUPPO
   DISPLAY "Conto"  CONTO
   DISPLAY "Sottoconto" SOTTOCONTO
   COPY OUTPUT F_SOTTOCA
END



STRING F_CATCONV 3
BEGIN
   PROMPT 1 16 "Categoria conto vendite  "
   FIELD LF_ANAMAG->CATCONV
   GROUP 21
   MESSAGE CLEAR,22@
   MESSAGE EMPTY ENABLE,22@
   FLAG "UZ"
   USE CRA
   INPUT CODTAB F_CATCONV
   DISPLAY "Codice" CODTAB
   DISPLAY "Descrizione@50" S0
   DISPLAY "Gruppo" S1
   DISPLAY "Conto"  S2
   DISPLAY "Sottoconto" S3
   OUTPUT F_CATCONV CODTAB
   OUTPUT F_CATCONV1 S0
   CHECKTYPE NORMAL
END

STRING F_CATCONV1 40
BEGIN
   PROMPT 36 16 ""
   FLAG "D"
   GROUP 21
   USE CRA KEY 2
   INPUT S0 F_CATCONV1
   DISPLAY "Descrizione@50" S0
   DISPLAY "Codice" CODTAB
   DISPLAY "Gruppo" S1
   DISPLAY "Conto"  S2
   DISPLAY "Sottoconto" S3
   COPY OUTPUT F_CATCONV
END

NUMBER F_GRUPPOV 3
BEGIN
   PROMPT 1 17 "Conto di vendita "
   FIELD LF_ANAMAG->GRUPPOV
   GROUP 22
   MESSAGE CLEAR,21@
   MESSAGE EMPTY ENABLE,21@
END

NUMBER F_CONTOV 3
BEGIN
   PROMPT  22 17 ""
   FIELD LF_ANAMAG->CONTOV
   GROUP 22
END

NUMBER F_SOTTOCV 6
BEGIN
   PROMPT  26 17 ""
   FIELD LF_ANAMAG->SOTTOCV
   GROUP 22
   USE LF_PCON
   INPUT GRUPPO F_GRUPPOV
   INPUT CONTO  F_CONTOV
   INPUT SOTTOCONTO F_SOTTOCV
   DISPLAY "Gruppo" GRUPPO
   DISPLAY "Conto"  CONTO
   DISPLAY "Sottoconto" SOTTOCONTO
   DISPLAY "Descrizione@50" DESCR
   OUTPUT F_GRUPPOV GRUPPO
   OUTPUT F_CONTOV CONTO
   OUTPUT F_SOTTOCV SOTTOCONTO
   OUTPUT F_DESCRV  DESCR
   CHECKTYPE NORMAL
END

STRING F_DESCRV 40
BEGIN
   PROMPT  36 17 ""
   FLAG "D"
   GROUP 22
   USE LF_PCON KEY 2
   INPUT DESCR F_DESCRV
   DISPLAY "Descrizione@50" DESCR
   DISPLAY "Gruppo" GRUPPO
   DISPLAY "Conto"  CONTO
   DISPLAY "Sottoconto" SOTTOCONTO
   COPY OUTPUT F_SOTTOCV
END

STRING F_UMP 3
BEGIN
    PROMPT  1 18 "U.M. peso        "
    FIELD LF_ANAMAG->UMP
END

NUMBER F_PESO 15 5
BEGIN
    PROMPT 30 18 "Peso  "
    FIELD LF_ANAMAG->PESO
END

STRING F_CLASSDOG 10
BEGIN
    PROMPT  1 19 "Classe doganale  "
    FIELD LF_ANAMAG->CLASSDOG
    FLAG "UZ"
    USE %CLD
    INPUT CODTAB F_CLASSDOG
    DISPLAY "Codice" CODTAB
    DISPLAY "Descrizione@50" S0
    OUTPUT F_CLASSDOG CODTAB
    OUTPUT F_CLASSDOG1 S0
    CHECKTYPE NORMAL
END

STRING F_CLASSDOG1 40
BEGIN
    PROMPT  36 19 ""
    FLAG "D"
END

ENDPAGE


PAGE "Pagina 2 " 0 0 70 20

LISTBOX F_TIPOCF 20
BEGIN
    PROMPT  0 0 ""
    FLAG "H"
    ITEM "F|Fornitore"
END

NUMBER F_CODFORN 6
BEGIN
    PROMPT  2 1 "Codice fornitore "
    FIELD LF_ANAMAG->CODFORN
    USE LF_CLIFO
    INPUT TIPOCF  F_TIPOCF SELECT
    INPUT CODCF   F_CODFORN
    DISPLAY "Codice " CODCF
    DISPLAY "Ragione sociale@50" RAGSOC
    OUTPUT F_CODFORN  CODCF
    OUTPUT F_CODFORN1 RAGSOC
END

NUMBER F_COSTSTD 18 0
BEGIN
    PROMPT  37 1 "Costo standard  "
    FIELD LF_ANAMAG->COSTSTD
END

STRING F_CODFORN1 50
BEGIN
    PROMPT  2 2 "Ragione sociale  "
    USE LF_CLIFO KEY 2
    INPUT TIPOCF  F_TIPOCF SELECT
    INPUT RAGSOC   F_CODFORN1
    DISPLAY "Codice " CODCF
    DISPLAY "Ragione sociale@50" RAGSOC
    OUTPUT F_CODFORN  CODCF
    OUTPUT F_CODFORN1 RAGSOC
END

BOOLEAN F_ARTFIS
BEGIN
    PROMPT  2 3 "Articolo fiscale"
    FIELD LF_ANAMAG->ARTFIS
    MESSAGE TRUE ENABLE,23@
    MESSAGE FALSE DISABLE,23@
END

STRING F_RAGGFIS 5
BEGIN
    PROMPT  2 4 "Raggrupp. fiscale   "
    FIELD LF_ANAMAG->RAGGFIS
    USE RFA
    JOIN %ASF ALIAS 200 INTO CODTAB=S8
    INPUT CODTAB F_RAGGFIS
    DISPLAY "Codice " CODTAB
    DISPLAY "Descrizione@40" S0
    OUTPUT F_RAGGFIS CODTAB
    OUTPUT F_RAGGFIS1 S0
    OUTPUT F_CLASSEFIS S8
    OUTPUT F_CLASSEFIS1 -200->S0
    CHECKTYPE NORMAL
    GROUP 23
END

STRING F_RAGGFIS1 40
BEGIN
    PROMPT  31 4 ""
    FLAG "D"
END

STRING F_CLASSEFIS 1
BEGIN
    PROMPT  2 5 "Classe fiscale          "
    FIELD LF_ANAMAG->CLASSEFIS
    USE %ASF
    INPUT CODTAB F_CLASSEFIS
    DISPLAY "Codice " CODTAB
    DISPLAY "Descrizione@40" S0
    OUTPUT F_CLASSEFIS CODTAB
    OUTPUT F_CLASSEFIS1 S0
    CHECKTYPE NORMAL
    GROUP 23
END

STRING F_CLASSEFIS1 40
BEGIN
    PROMPT  31 5 ""
    FLAG "D"
END

STRING F_SCONTO 25
BEGIN
  FIELD LF_ANAMAG->SCONTO
  PROMPT 2 6 "Sconto        "
END

STRING F_CODIVAR 4
BEGIN
  PROMPT 45 6 "Codice IVA ridotta  "
  FIELD LF_ANAMAG->CODIVAR
  USE %IVA
  INPUT CODTAB  F_CODIVAR
  DISPLAY "Codice " CODTAB
  DISPLAY "Descrizione@40" S0
  OUTPUT F_CODIVAR CODTAB
  CHECKTYPE NORMAL
END

NUMBER F_PROVV 5 2
BEGIN
  FIELD LF_ANAMAG->PERCPROVV
  PROMPT 2 7 "Provvigione   "
  NUM_EXPR (#F_PROVV>=0)&&(#F_PROVV<=100)
  WARNING "La percentuale di provvigione deve essere compresa tra 0 e 100"
END

BOOLEAN F_ARTPROD
BEGIN
   PROMPT 2 8 "Articolo di produzione "
   FIELD LF_ANAMAG->ARTPROD
END

SPREADSHEET F_SHEET1 71 5
BEGIN
     PROMPT 2 10 ""
     ITEM "Cod. lingua"
     ITEM "Descrizione@50"
END

SPREADSHEET F_SHEET2 71 5
BEGIN
     PROMPT 2 16 ""
     ITEM "Cod. art.@20"
     ITEM "Tipo@10"
END

ENDPAGE

ENDMASK

 #include "ve2400a.uml"
 #include "ve2400b.uml"
 #include "ve2400c.uml"

