#include "770100a.h"

TOOLBAR "" 0 20 0 2

// Spazio utilizzabile per mostrare lo stato di forzatura
//TOOLBAR "" 0 19 0 3

#include <toolbar.h>

ENDPAGE

PAGE "Scheda percipienti" -1 -1 78 20
//PAGE "Scheda percipienti" -1 -1 78 19

NUMBER F_CODDITTA 5
BEGIN
  FLAGS "AH"
  FIELD LF_SCPERC->CODDITTA
  KEY 1
END

LIST F_TIPOA 1 12
BEGIN
  PROMPT 3 0 ""
  FIELD LF_SCPERC->TIPOA
  ITEM "F|Fisica"
  ITEM "G|Giuridica"  
  KEY 1
  FLAGS "D"  
END

NUMBER F_CODANAGR 5
BEGIN
  PROMPT 17 0 ""
  FIELD LF_SCPERC->CODANAGR
  KEY 1
  FLAGS "D"
END

STRING F_RAGSOC 45
BEGIN
  PROMPT 24 0 ""
  FLAGS "D"
END

NUMBER F_NPROG 4
BEGIN
  PROMPT 71 0 ""
  FIELD LF_SCPERC->NPROG
  FLAGS "D"  
  KEY 1
END

STRING F_CODCAUS 2
BEGIN
  FIELD LF_SCPERC->CODCAUS
  PROMPT 3 1 ""
  USE %CA7 SELECT ((I0!="1015") && ((S1="C")||(S1="D")||(S1="D1")||(S1="E")||(S1="E1")||(S1="E2")) 
  CHECKTYPE REQUIRED
  INPUT CODTAB F_CODCAUS
  DISPLAY "Codice " CODTAB
  DISPLAY "Descrizione @60" S0
  DISPLAY "Codice tributo" I0
  DISPLAY "Articolo di bilancio" I3
  DISPLAY "C.T."    B2
  DISPLAY "I.C."    B1
  DISPLAY "R.A."    B0
  OUTPUT F_CODCAUS   CODTAB  
  OUTPUT F_CODTRIB   I0
  OUTPUT F_DESCRCAUS S0
  OUTPUT F_CODQUA    S1
  OUTPUT F_ARTBIL    I3
  OUTPUT F_IC        B1
  OUTPUT F_CT        B2
  OUTPUT F_RIT       B0
  OUTPUT F_QUOTAIMP  I1
  OUTPUT F_PERRIT    R0
  FLAGS "Z"    
  WARNING "Manca la causale"
  ADD RUN 773 -3 %CA7
END

STRING F_CODQUA 2
BEGIN
  PROMPT 9 1 ""
  FLAGS "H"
END

NUMBER F_CODTRIB 4
BEGIN
  PROMPT 9 1 ""
  FLAGS "D"
END

STRING F_DESCRCAUS 60
BEGIN
  PROMPT 15 1 ""
  FLAGS "D"
END
           
NUMBER F_ARTBIL 2
BEGIN
  PROMPT 1 2 "Art.bil."
  FLAGS "D"
END

BOOLEAN F_IC
BEGIN
  PROMPT 15 2 "I.C."
  FLAGS "D"
END

BOOLEAN F_CT
BEGIN
  PROMPT 23 2 "C.T."
  FLAGS "D"
END

BOOLEAN F_RIT
BEGIN    
  PROMPT 31 2 "Rit."
  FLAGS "D"
END

NUMBER F_QUOTAIMP 2
BEGIN
  PROMPT 1 1 ""
  FLAGS "H"
END

NUMBER F_PERRIT 5
BEGIN
  PROMPT 1 1 ""
  FLAGS "H"
END

TEXT DLG_NULL
BEGIN
  PROMPT 40 2 "@bCompetenza  "
END             

NUMBER F_MESECOMP 2
BEGIN
  PROMPT 53 2 "Mese "
  FIELD LF_SCPERC->MESEC  
  NUM_EXPR {(#THIS>=0) && (#THIS<13)}
  WARNING "Mese non valido"       
  HELP "Inserire il mese di competenza"
  FLAGS "Z"
END

NUMBER F_ANNOCOMP 4
BEGIN
  PROMPT 64 2 "Anno "
  FIELD LF_SCPERC->ANNOC
  NUM_EXPR {(#THIS==0)||((#THIS>1900)&&(#THIS<2100))}
  WARNING "Anno non valido"
  HELP "Inserire l'anno di competenza"
END

STRING F_CODCAUS 2
BEGIN
  PROMPT 1 12 ""
  FIELD LF_SCPERC->CODCAUS
  FLAGS "H"
END

DATE F_DATADOC
BEGIN
  PROMPT 1 3 "Data    "
  FIELD LF_SCPERC->DATADOC
  WARNING "Manca la data del documento"
  HELP "Inserire la data del documento"
  CHECKTYPE REQUIRED
END

STRING F_NUMDOC 7
BEGIN
  PROMPT 1 4 "Numero  "
  FIELD LF_SCPERC->NUMDOC
END


NUMBER F_COMPENS 15
BEGIN
  PROMPT 22 3 "Compenso "
  FIELD LF_SCPERC->COMPENSO
  PICTURE "."
  FLAGS "R"
  MESSAGE K_TAB, F_TOTDOC
END

NUMBER F_SPESE 15
BEGIN
  PROMPT 51 3 "Spese  "
  FIELD LF_SCPERC->SPESE
  PICTURE "."  
  FLAGS "R"
  MESSAGE K_TAB, F_TOTDOC  
END

NUMBER F_IVA 15
BEGIN
  PROMPT 22 4 "Iva      "
  FIELD LF_SCPERC->IVA
  PICTURE "."  
  FLAGS "R"
  MESSAGE K_TAB, F_TOTDOC
END

NUMBER F_TOTDOC 15
BEGIN
  PROMPT 51 4 "Totale "
  FIELD LF_SCPERC->TOTALE
  PICTURE "."  
  FLAGS "R"
  NUM_CALC {#F_COMPENS + #F_SPESE + #F_IVA}
END

TEXT DLG_NULL
BEGIN
  PROMPT 1 5 "@bPagamenti"
END

SPREADSHEET F_PAGAMENTI 0 6
BEGIN
  PROMPT 0 6 ""
  ITEM "Data@10"
  ITEM "Compenso@15"
  ITEM "Spese@15"
  ITEM "Imponibile@15"
  ITEM "% R.a.@7"
  ITEM "Ritenuta effettuata@15"
  ITEM "Compenso netto@15"
  ITEM "Num.Vers."
  ITEM "Num.Pag."
END


TEXT DLG_NULL
BEGIN
  PROMPT 1 12 "@bVersamenti"
END

SPREADSHEET F_VERSAMENTI 0 5
BEGIN
  PROMPT 0 13 ""
  ITEM "1015"
  ITEM "Data@10"
  ITEM "L"
  ITEM "T"
  ITEM "S-ABI@5"
  ITEM "N-CAB@10"
  ITEM "Ritenuta@30"
  ITEM "Num.Vers."
END

BOOLEAN F_FORCED
BEGIN
  PROMPT 1 18 "Forzatura"
  HELP "Attivare questo flag per forzare la registrazione anche di dati incongruenti"
END

ENDPAGE

ENDMASK

#include "770100c.uml"
#include "770100d.uml"

