#include <lffiles.h>
#include "VE2400.H"

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

PAGE "Gestione anagrafica di magazzino " 0 0 70 20

STRING F_CODART 20
BEGIN
    PROMPT 2 1 "Codice art.   "
    FIELD LF_ANAGR->CODART
    KEY 1
    FLAG "U"
    USE LF_ANAGR
    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_ANAGR->TIPO
END

STRING F_DESCR 50 
BEGIN
    PROMPT 2 3 "Descrizione   "
    FIELD LF_ANAGR->DESCR
    KEY 2
    USE LF_ANAGR 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

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

STRING F_GRMERC1 3 
BEGIN
    PROMPT 1 5 "Gruppo merc. 1 "
    FIELD LF_ANAGR->GRMERC1[1,3]
    GROUP 1
    FLAG "U"
END

STRING F_GRMERC1B 2
BEGIN
		PROMPT 21 5 ""
	FIELD LF_ANAGR->GRMERC1[4,5]
		GROUP 1
		FLAG "U"
    MESSAGE EMPTY CLEAR,2@
    MESSAGE ENABLE,2@
    USE %GMC
    INPUT CODTAB[1,3] F_GRMERC1
    INPUT CODTAB[4,5] F_GRMERC1B
    DISPLAY "Codice" CODTAB
    DISPLAY "Descrizione@50" S0
    OUTPUT F_GRMERC1 CODTAB[1,3]
    OUTPUT F_GRMERC1B CODTAB[4,5]
    OUTPUT F_GRMERC1D S0
    CHECKTYPE NORMAL
END

STRING F_GRMERC1D 50 
BEGIN
    PROMPT 26 5 ""
    GROUP 1
    USE %GMC KEY 2
    INPUT S0 F_GRMERC1D
    DISPLAY "Codice" CODTAB
    DISPLAY "Descrizione@50" S0
    OUTPUT F_GRMERC1 CODTAB[1,3]
    OUTPUT F_GRMERC1B CODTAB[4,5]
    OUTPUT F_GRMERC1D S0
END

STRING F_GRMERC2 3 
BEGIN
    PROMPT 1 6 "Gruppo merc. 2 "
    FIELD LF_ANAGR->GRMERC2[1,3]
    GROUP 2
		FLAG "U"
END

STRING F_GRMERC2B 2
BEGIN
		PROMPT 21 6 ""
	FIELD LF_ANAGR->GRMERC2[4,5]
		GROUP 2
		FLAG "U"
    MESSAGE EMPTY CLEAR,3@
    MESSAGE ENABLE,3@
    NUM_EXPR (#F_GRMERC2=="")||(#F_GRMERC2!=#F_GRMERC1)
    USE %GMC
    INPUT CODTAB[1,3] F_GRMERC2
    INPUT CODTAB[4,5] F_GRMERC2B
    DISPLAY "Codice" CODTAB
    DISPLAY "Descrizione@50" S0
    OUTPUT F_GRMERC2 CODTAB[1,3]
    OUTPUT F_GRMERC2B CODTAB[4,5]
    OUTPUT F_GRMERC2D S0
    CHECKTYPE NORMAL
END

STRING F_GRMERC2D 50 
BEGIN
    PROMPT 26 6 ""
    GROUP 2
    USE %GMC KEY 2
    INPUT S0 F_GRMERC2D
    DISPLAY "Codice" CODTAB
    DISPLAY "Descrizione@50" S0
    OUTPUT F_GRMERC2 CODTAB[1,3]
    OUTPUT F_GRMERC2B CODTAB[4,5]
    OUTPUT F_GRMERC2D S0
END

STRING F_GRMERC3 3 
BEGIN
    PROMPT 1 7 "Gruppo merc. 3 "
    FIELD LF_ANAGR->GRMERC3[1,3]
    GROUP 3
		FLAG "U"
END

STRING F_GRMERC3B 2
BEGIN
		PROMPT 21 7 ""
	FIELD LF_ANAGR->GRMERC3[4,5]
		GROUP 3
		FLAG "U"
    NUM_EXPR (#F_GRMERC3=="")||((#F_GRMERC3!=#F_GRMERC1)&&(#F_GRMERC3!=#F_GRMERC2))
    USE %GMC
    INPUT CODTAB[1,3] F_GRMERC3
    INPUT CODTAB[4,5] F_GRMERC3B
    DISPLAY "Codice" CODTAB
    DISPLAY "Descrizione@50" S0
    OUTPUT F_GRMERC3 CODTAB[1,3]
    OUTPUT F_GRMERC3B CODTAB[4,5]
    OUTPUT F_GRMERC3D S0
    CHECKTYPE NORMAL
END

STRING F_GRMERC3D 50 
BEGIN
    PROMPT 26 7 ""
    GROUP 3
    USE %GMC KEY 2
    INPUT S0 F_GRMERC3D
    DISPLAY "Codice" CODTAB
    DISPLAY "Descrizione@50" S0
    OUTPUT F_GRMERC3 CODTAB[1,3]
    OUTPUT F_GRMERC3B CODTAB[4,5]
    OUTPUT F_GRMERC3D S0
END

SPREADSHEET F_SHEET0 77 4
BEGIN
  PROMPT 1 8 ""
  ITEM "  U.M.  @2"
  ITEM "Fattore conversione@30"
END

STRING F_CATCONA 3
BEGIN
   PROMPT 1 12 "Categoria conto acquisti "
   FIELD LF_ANAGR->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 12 ""
    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

STRING F_GRUPPOA 2
BEGIN
   PROMPT 1 13 "Conto d'acquisto "
   FIELD LF_ANAGR->GRUPPOA
		GROUP 12
		MESSAGE CLEAR,11@
		MESSAGE EMPTY ENABLE,11@
END

STRING F_CONTOA 2
BEGIN
    PROMPT  22 13 ""
    FIELD LF_ANAGR->CONTOA
		GROUP 12
END

STRING F_SOTTOCA 6
BEGIN
    PROMPT  26 13 ""
    FIELD LF_ANAGR->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 13 ""
    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 14 "Categoria conto vendite  "
   FIELD LF_ANAGR->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 14 ""
    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

STRING F_GRUPPOV 2
BEGIN
   PROMPT 1 15 "Conto di vendita "
   FIELD LF_ANAGR->GRUPPOV
   GROUP 22
		MESSAGE CLEAR,21@
		MESSAGE EMPTY ENABLE,21@
END

STRING F_CONTOV 2
BEGIN
    PROMPT  22 15 ""
    FIELD LF_ANAGR->CONTOV
   GROUP 22
END

STRING F_SOTTOCV 6
BEGIN
    PROMPT  26 15 ""
    FIELD LF_ANAGR->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 15 ""
    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 16 "U.M. peso        "
    FIELD LF_ANAGR->UMP
END

NUMBER F_PESO 15 5
BEGIN
    PROMPT 30 16 "Peso  "
    FIELD LF_ANAGR->PESO
END

STRING F_CLASSDOG 10
BEGIN
    PROMPT  1 17 "Classe doganale  "
    FIELD LF_ANAGR->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 17 ""
    FLAG "D"    
	USE %CLD KEY 2
	INPUT S0 F_CLASSDOG1
	DISPLAY "Descrizione@50" S0
	DISPLAY "Codice" CODTAB
	OUTPUT F_CLASSDOG CODTAB
	OUTPUT F_CLASSDOG1 S0
END

ENDPAGE



PAGE "Gestione anagrafica di magazzino " 0 0 70 20

STRING F_CODIVA 4
BEGIN
    PROMPT  2 1 "Codice IVA       "
    FIELD LF_ANAGR->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 40
BEGIN
    PROMPT  29 1 ""
    USE %IVA KEY 2
    INPUT S0 F_CODIVA1
    DISPLAY "Descrizione@40" S0
    DISPLAY "Codice " CODTAB
    OUTPUT F_CODIVA CODTAB
    OUTPUT F_CODIVA1 S0
END

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

NUMBER F_CODFORN 6
BEGIN
    PROMPT  2 2 "Codice fornitore "
    FIELD LF_ANAGR->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 2 "Costo standard  "
    FIELD LF_ANAGR->COSTSTD
END

STRING F_CODFORN1 50
BEGIN
    PROMPT  2 3 "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 4 "Articolo fiscale  "
    FIELD LF_ANAGR->ARTFIS
END

STRING F_RAGGFIS 5
BEGIN
    PROMPT  2 5 "Raggrupp. fiscale  "
    FIELD LF_ANAGR->RAGGFIS
    USE %RFA
    INPUT CODTAB F_RAGGFIS
    DISPLAY "Codice " CODTAB
    DISPLAY "Descrizione@40" S0
    OUTPUT F_RAGGFIS CODTAB
    OUTPUT F_RAGGFIS1 S0
    OUTPUT F_CLASSEFIS S8
    CHECKTYPE NORMAL
END

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

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

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

BOOLEAN F_ARTPROD
BEGIN
   PROMPT 2 7 "Articolo di produzione "
   FIELD LF_ANAGR->ARTPROD
END

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

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

ENDPAGE

ENDMASK

 #include "VE2400A.UML"
 #include "VE2400B.UML"
 #include "VE2400C.UML"
