// DEFINIZIONE MASCHERA PER LE STAMPE DI CONTROLLO DEGLI EFFETTI

#include "ef0600.h"

PAGE "Stampe di Controllo Effetti" -1 -1 58 16

DATE F_DATA_STAMPA
BEGIN
  PROMPT 30 0 "Data di stampa "  
  FLAGS "A"
END

RADIOBUTTON RDB_TIPOST 24
BEGIN        
  PROMPT 2 0 "Stampa per "
  ITEM "1|Banca"
  MESSAGE SHOW,2@|HIDE,1@|HIDE,3@|HIDE,4@
  ITEM "2|Cliente"
  MESSAGE SHOW,4@|HIDE,1@|HIDE,2@|HIDE,3@
  ITEM "3|Distinta"
  MESSAGE SHOW,3@|HIDE,1@|HIDE,2@|HIDE,4@
  ITEM "4|Scadenza"
  MESSAGE SHOW,1@|HIDE,2@|HIDE,3@|HIDE,4@  
END                         

GROUPBOX DLG_NULL 55 3
BEGIN
  PROMPT 1 7 "Stampa effetti per Data di scadenza"
  GROUP 1
END 

DATA F_DA_DATA
BEGIN      
  PROMPT 2 8 "Dalla Data  "   
  GROUP 1 
END

DATA F_A_DATA
BEGIN         
  PROMPT 30 8 "Alla Data  "
  GROUP 1                                          
  VALIDATE DATE_CMP_FUNC >= F_DA_DATA
  WARNING "Data limite superiore  non valida"
END

GROUPBOX DLG_NULL 55 4
BEGIN
  PROMPT 1 7 "Stampa effetti per Banca di presentazione"
  GROUP 2
END
   
NUMBER F_DABAN 5
BEGIN        
  PROMPT 2 8 "Dalla Banca "
  FLAGS "RZ" 
  GROUP 2
  USE %BAN KEY 1 SELECT CODTAB ?= "?????" 
  INPUT CODTAB F_DABAN
  DISPLAY "Codice ABI" CODTAB[1,5]
  DISPLAY "Denominazione@50" S0
  OUTPUT F_DABAN CODTAB[1,5]
  CHECKTYPE NORMAL
END     

NUMBER F_ABAN 5
BEGIN
  PROMPT 30 8 "Alla Banca "
  FLAGS "RZ"
  GROUP 2
  USE %BAN KEY 1 SELECT CODTAB ?= "?????" 
  INPUT CODTAB F_ABAN
  DISPLAY "Codice ABI" CODTAB[1,5]
  DISPLAY "Denominazione@50" S0
  OUTPUT F_ABAN CODTAB[1,5]                       
  CHECKTYPE NORMAL
END

DATA F_DA_DATA2
BEGIN      
  PROMPT 2 9 "Dalla Data  "
  GROUP 2
END

DATA F_A_DATA2
BEGIN         
  PROMPT 30 9 "Alla Data  "
  GROUP 2                
  VALIDATE DATE_CMP_FUNC >= F_DA_DATA2
  WARNING "Data limite superiore  non valida"
END

GROUPBOX DLG_NULL 55 7
BEGIN
  PROMPT 1 7 "Stampa effetti per Distinta"
  GROUP 3
END 

LIST F_NUMBERRIGA 10 
BEGIN         
  PROMPT 1 60 "Numero Riga Distinta "
  KEY 4     
  GROUP 3
  ITEM "1|PRIMA RIGA"  
  FLAGS "D"            
END

TEXT DLG_NULL
BEGIN
PROMPT 2 8 "Dalla Distinta "
GROUP 3
END                   

LIST F_DATIPODIST 19
BEGIN       
  PROMPT 4 9 " "
  KEY 4
  GROUP 3
  ITEM " |** Nessuno **"
  ITEM "I|All'incasso"
  ITEM "B|Salvo buon fine"
  ITEM "S|Allo sconto"
END

NUMBER F_DADIST 7 
BEGIN            
  PROMPT 4 10 " "          
  FLAGS "R"   
  GROUP 3
  KEY 4
  USE LF_EFFETTI KEY 4 SELECT NRIGADIST = 1
  INPUT NDIST F_DADIST   
  INPUT TIPODIST F_DATIPODIST
  INPUT NRIGADIST F_NUMBERRIGA
  DISPLAY "Nr. distinta" NDIST
  DISPLAY "Tipo distinta" TIPODIST
  OUTPUT F_DADIST NDIST
  OUTPUT F_DATIPODIST TIPODIST 
  OUTPUT F_NUMBERRIGA NRIGADIST
  CHECKTYPE NORMAL    
END     

TEXT DLG_NULL
BEGIN
 PROMPT 30 8 "Alla Distinta "
 GROUP 3
END                   

LIST F_ATIPODIST 19
BEGIN       
  PROMPT 31 9 " "
  GROUP 3
  KEY 4                                         
  ITEM " |** Nessuno **"
  ITEM "I|All'incasso"
  ITEM "B|Salvo buon fine"
  ITEM "S|Allo sconto"
END

NUMBER F_ADIST 7 
BEGIN            
  PROMPT 31 10 " "
  FLAGS "R"
  KEY 4
  GROUP 3
  USE LF_EFFETTI KEY 4 SELECT NRIGADIST = 1
  INPUT NDIST F_ADIST   
  INPUT TIPODIST F_ATIPODIST
  INPUT NRIGADIST F_NUMBERRIGA
  DISPLAY "Nr. distinta" NDIST
  DISPLAY "Tipo distinta" TIPODIST
  OUTPUT F_ADIST NDIST
  OUTPUT F_ATIPODIST TIPODIST 
  OUTPUT F_NUMBERRIGA NRIGADIST    
  CHECKTYPE NORMAL
  //NUM_EXPR  {#THIS_FIELD>=#F_DADIST}
  //WARNING "Limite superiore  non valido"
END 

TEXT DLG_NULL
BEGIN
 PROMPT 2 11 "Dalla Data  "
 GROUP 3
END

DATA F_DA_DATA3
BEGIN      
  PROMPT 4 12 " "
  GROUP 3
END

TEXT DLG_NULL
BEGIN
 PROMPT 30 11 "Alla Data  "
 GROUP 3
END

DATA F_A_DATA3
BEGIN         
  PROMPT 31 12 " "
  GROUP 3
  VALIDATE DATE_CMP_FUNC >= F_DA_DATA3
  WARNING "Data limite superiore  non valida"    
END

GROUPBOX DLG_NULL 55 4
BEGIN
  PROMPT 1 7 "Stampa effetti per Cliente"
  GROUP 4
END
   
NUMBER F_DACLI 6
BEGIN        
  PROMPT 2 8 "Dal Cliente "
  FLAGS "RZ" 
  GROUP 4    
  USE LF_CLIFO
  INPUT TIPOCF "C"
  INPUT CODCF F_DACLI 
  DISPLAY "Ragione sociale@60" RAGSOC
  DISPLAY "Codice" CODCF
  OUTPUT F_DACLI CODCF
  CHECKTYPE NORMAL
END     

NUMBER F_ACLI 6
BEGIN
  PROMPT 30 8 "Al Cliente "
  FLAGS "RZ"
  GROUP 4                               
  USE LF_CLIFO
  INPUT TIPOCF "C"
  INPUT CODCF F_ACLI 
  DISPLAY "Ragione sociale@60" RAGSOC
  DISPLAY "Codice" CODCF
  OUTPUT F_ACLI CODCF
  CHECKTYPE NORMAL
END

DATA F_DA_DATA4
BEGIN      
  PROMPT 2 9 "Dalla Data  "
  GROUP 4
END

DATA F_A_DATA4
BEGIN         
  PROMPT 30 9 "Alla Data  "
  GROUP 4                
  VALIDATE DATE_CMP_FUNC >= F_DA_DATA2
  WARNING "Data limite superiore  non valida"
END

BUTTON DLG_OK 9 2
BEGIN
  PROMPT -13 -1 ""
END

BUTTON DLG_CANCEL 9 2
BEGIN
  PROMPT -23 -1 ""
END

BUTTON DLG_QUIT 9 2
BEGIN
  PROMPT -33 -1 ""
END 

ENDPAGE
ENDMASK
 

 
