CU 2016
git-svn-id: svn://10.65.10.50/branches/R_10_00@23178 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
063b19836a
commit
c846ab1358
@ -2,12 +2,14 @@
|
||||
|
||||
#include "770.h"
|
||||
|
||||
int main(int argc,char** argv)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
const int n = (argc > 1) ? atoi(argv[1]+1) : 0;
|
||||
switch(n)
|
||||
{
|
||||
case 1 : collega_vers_rit(argc,argv); break;
|
||||
case 1: collega_vers_rit(argc,argv); break;
|
||||
case 2: AnagrPerc(argc,argv); break;
|
||||
case 3: TableManager(argc,argv); break;
|
||||
default: SchedaPerc(argc,argv); break;
|
||||
}
|
||||
|
||||
|
14
m770/770.h
14
m770/770.h
@ -1,19 +1,9 @@
|
||||
#ifndef __770_H
|
||||
#define __770_H
|
||||
|
||||
#ifdef MAIN
|
||||
#define extern
|
||||
#endif
|
||||
|
||||
#ifdef MAIN
|
||||
#undef extern
|
||||
#endif
|
||||
|
||||
#ifndef __STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
int SchedaPerc(int argc, char* argv[]);
|
||||
int collega_vers_rit(int argc, char* argv[]);
|
||||
int AnagrPerc(int argc, char* argv[]);
|
||||
int TableManager(int argc, char* argv[]);
|
||||
|
||||
#endif // __770_H
|
||||
|
@ -2162,7 +2162,8 @@ Pag_struct& TSchedaPercipienti::calcola_riga_pag(Pag_struct& s,
|
||||
// calcolo imponibile
|
||||
c.imponibile = (s.compenso - s.impcpa) * h_PercAssImp / CENTO;
|
||||
c.imponibile.round(fdec);
|
||||
if (s.imponibile.is_zero() || force)
|
||||
//if (s.imponibile.is_zero() || force) // 18-02-2016 imponibile nullo ammissibile per minimi
|
||||
if (force)
|
||||
s.imponibile = c.imponibile;
|
||||
|
||||
// percentuale ritenuta acconto
|
||||
|
@ -137,6 +137,7 @@ END
|
||||
STRING F_COFI 16
|
||||
BEGIN
|
||||
PROMPT 2 9 "Codice Fiscale"
|
||||
FLAGS "U"
|
||||
USE LF_ANAG KEY 3 SELECT LF_PERC->CODDITTA==#F_CODDITTA
|
||||
JOIN LF_PERC INTO CODDITTA=#F_CODDITTA TIPOA=TIPOA CODANAGR==CODANAGR
|
||||
INPUT TIPOA F_TIPOA SELECT
|
||||
@ -185,7 +186,8 @@ BEGIN
|
||||
INPUT NPROG F_NPROG
|
||||
DISPLAY "Numero@7" NPROG
|
||||
DISPLAY "Data\nDocumento@10" DATADOC
|
||||
DISPLAY "Numero\nDocumento@8" NUMDOC
|
||||
DISPLAY "Numero\nDocumento@8" NUMDOC
|
||||
DISPLAY "Causale" CODCAUS
|
||||
DISPLAY "Quadro" %CA7->S1
|
||||
DISPLAY "Causale\nQuadro@6" CAUSQUA
|
||||
DISPLAY "Ritenute\noperate@15V" RITOPE
|
||||
|
@ -61,7 +61,7 @@ void TSchedaPercipienti::init_mask(TMask& m, bool inserimento)
|
||||
from_sheet_to_struct(t, s);
|
||||
calcola_riga_pag(s,
|
||||
c,
|
||||
TRUE,
|
||||
true,
|
||||
h_PercAssImp,
|
||||
h_PercCassaPrev,
|
||||
h_PercRitenuta,
|
||||
@ -192,18 +192,16 @@ bool TSchedaPercipienti::my_empty_items(TToken_string& r, bool vers)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// controlla se riga pagamento significativa
|
||||
else
|
||||
{
|
||||
rr = r.get(token_pos("DATAPAG"));
|
||||
rr.trim();
|
||||
if (rr.not_empty())
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void TSchedaPercipienti::pag_pack()
|
||||
@ -214,8 +212,8 @@ void TSchedaPercipienti::pag_pack()
|
||||
for (int i = 0; i < max; i++)
|
||||
{
|
||||
TToken_string& r = (TToken_string&)rows[i];
|
||||
if (my_empty_items(r, FALSE)) // Remove all empty strings
|
||||
rows.destroy(i, FALSE);
|
||||
if (my_empty_items(r, false)) // Remove all empty strings
|
||||
rows.destroy(i, false);
|
||||
}
|
||||
|
||||
rows.pack();
|
||||
@ -224,13 +222,12 @@ void TSchedaPercipienti::pag_pack()
|
||||
void TSchedaPercipienti::ver_pack()
|
||||
{
|
||||
TString_array& rows = vers().rows_array();
|
||||
|
||||
const int max = rows.items();
|
||||
for (int i = 0; i < max; i++)
|
||||
{
|
||||
TToken_string& r = (TToken_string&)rows[i];
|
||||
if (my_empty_items(r, TRUE)) // Remove all empty strings
|
||||
rows.destroy(i, FALSE);
|
||||
if (my_empty_items(r, true)) // Remove all empty strings
|
||||
rows.destroy(i, false);
|
||||
}
|
||||
rows.pack();
|
||||
}
|
||||
@ -245,7 +242,6 @@ void TSchedaPercipienti::load_pag_sheet(const long numvers)
|
||||
TSheet_field& pag = pags();
|
||||
_pags->destroy();
|
||||
|
||||
|
||||
// numero di riga dell'array-sheet. Viene incrementato
|
||||
// solo quando si trovano pagamenti 'giusti' (cioe' solo
|
||||
// quando si aggiungono elementi all'array-sheet)
|
||||
@ -295,7 +291,7 @@ void TSchedaPercipienti::load_pag_sheet(const long numvers)
|
||||
if (nvers == numvers)
|
||||
{
|
||||
_selected.set(npag);
|
||||
_pags->check(iNumRigaAS, TRUE);
|
||||
_pags->check(iNumRigaAS, true);
|
||||
}
|
||||
iNumRigaAS++; // ignoro in questo contatore i pagamenti che NON
|
||||
// si vedono (se il pagamento e' scartato prima di qui
|
||||
@ -769,9 +765,7 @@ bool TSchedaPercipienti::check_causale(TMask_field& f, KEY k)
|
||||
|
||||
bool TSchedaPercipienti::pag_standard_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
static Pag_struct s;
|
||||
static Pag_struct c;
|
||||
static Pag_struct nullpag;
|
||||
static Pag_struct s, c, nullpag;
|
||||
|
||||
const TSchedaPercipienti& a = app();
|
||||
a.clear_struct(nullpag);
|
||||
@ -789,11 +783,11 @@ bool TSchedaPercipienti::pag_standard_handler(TMask_field& f, KEY k)
|
||||
if (k == K_TAB || (k == K_ENTER && f.dlg() == 101))
|
||||
{
|
||||
// reperisco valori nascosti compilati dalla tabella causali
|
||||
const real h_PercAssImp = mm.get_real(F_QUOTAIMP);
|
||||
const real h_PercCassaPrev = mm.get_real(F_CASSA_PREV);
|
||||
const real h_PercRitenuta = mm.get_real(F_PERRIT);
|
||||
const bool h_FlagInps = mm.get_bool(F_FLAG_INPS);
|
||||
const real h_PercInps = mm.get_real(F_PERC_INPS);
|
||||
const real h_PercAssImp = mm.get_real(F_QUOTAIMP);
|
||||
const real h_PercCassaPrev = mm.get_real(F_CASSA_PREV);
|
||||
const real h_PercRitenuta = mm.get_real(F_PERRIT);
|
||||
const bool h_FlagInps = mm.get_bool(F_FLAG_INPS);
|
||||
const real h_PercInps = mm.get_real(F_PERC_INPS);
|
||||
const real h_PercAssImpInps = mm.get_real(F_PERC_ASS_INPS);
|
||||
const real h_PercCommitInps = mm.get_real(F_PERC_COMMIT_INPS);
|
||||
|
||||
@ -804,12 +798,13 @@ bool TSchedaPercipienti::pag_standard_handler(TMask_field& f, KEY k)
|
||||
a.from_mask_to_struct(f.mask(), s);
|
||||
|
||||
// non proseguo se riga identica
|
||||
if (s == c) return true;
|
||||
if (s == c)
|
||||
return true;
|
||||
|
||||
// richiamo calcolo di riga
|
||||
a.calcola_riga_pag(s,
|
||||
c,
|
||||
FALSE,
|
||||
false,
|
||||
h_PercAssImp,
|
||||
h_PercCassaPrev,
|
||||
h_PercRitenuta,
|
||||
@ -821,7 +816,6 @@ bool TSchedaPercipienti::pag_standard_handler(TMask_field& f, KEY k)
|
||||
a.from_struct_to_mask(s, f.mask());
|
||||
}
|
||||
|
||||
|
||||
// eseguo controlli solo per K_ENTER
|
||||
// utilizzando i valori memorizzati nelle strutture statiche
|
||||
if (k == K_ENTER)
|
||||
@ -856,7 +850,7 @@ bool TSchedaPercipienti::pag_standard_handler(TMask_field& f, KEY k)
|
||||
|
||||
// controllo detrazioni lavoro dipendente
|
||||
if (name == "DETLAVDIP")
|
||||
if (s.detlavdip == ZERO && s.giolavdip != 0)
|
||||
if (s.detlavdip.is_zero() && s.giolavdip != 0)
|
||||
return f.error_box("Detrazioni lavoro dipendente non indicate");
|
||||
|
||||
// controllo CPA
|
||||
|
105
m770/770300.cpp
105
m770/770300.cpp
@ -1,67 +1,38 @@
|
||||
/*****************************************************************
|
||||
TDate d(TODAY);
|
||||
TString16 dat, v15;
|
||||
bool sposta_pag = FALSE;
|
||||
if (d == TDate("14-09-1995") || d == TDate("15-09-1995"))
|
||||
{
|
||||
for (_rver->first(); !_rver->eof(); _rver->next())
|
||||
{
|
||||
dat = _rver->get("DATAVERS");
|
||||
v15 = _rver->get("VERS1015");
|
||||
dat.trim();
|
||||
v15.trim();
|
||||
if (dat.empty() && v15.empty())
|
||||
{
|
||||
sposta_pag = TRUE;
|
||||
_rver->remove();
|
||||
}
|
||||
}
|
||||
if (sposta_pag)
|
||||
{
|
||||
for (_rpag->first(); !_rpag->eof(); _rpag->next())
|
||||
{
|
||||
const long nvers = _rpag->get_long("NUMVERS");
|
||||
if (nvers <= 0L) continue;
|
||||
TSchedaP sch(_rpag->curr());
|
||||
_rver->zero();
|
||||
_rver->put(VER_CODDITTA, sch.codditta());
|
||||
_rver->put(VER_TIPOA, sch.tipoa());
|
||||
_rver->put(VER_CODANAGR, sch.codanagr());
|
||||
_rver->put(VER_NPROG, sch.nprog());
|
||||
_rver->put(VER_NRIGA, (long)nvers);
|
||||
const int rt = _rver->read();
|
||||
if (rt == NOERR)
|
||||
continue; // vuol dire che c'e' il versamento
|
||||
else
|
||||
{
|
||||
_rver->zero();
|
||||
_rver->put(VER_CODDITTA, sch.codditta());
|
||||
_rver->put(VER_TIPOA, sch.tipoa());
|
||||
_rver->put(VER_CODANAGR, sch.codanagr());
|
||||
_rver->put(VER_NPROG, sch.nprog());
|
||||
|
||||
_rver->read();
|
||||
|
||||
TSchedaP sch2 (_rver->curr());
|
||||
if (sch2 == sch) // Se sono ancora nella stessa scheda
|
||||
{
|
||||
int nriga = _rver->get_int("NRIGA");
|
||||
if (nriga == nvers)
|
||||
continue; // e' il versamento giusto
|
||||
if (nriga > 10) // sicuramente errata
|
||||
{
|
||||
nriga = 1;
|
||||
_rver->remove();
|
||||
_rver->put("NRIGA", (long)nriga);
|
||||
_rver->put("NUMVERS", (long)nriga);
|
||||
const int rc1 = _rver->write();
|
||||
_rpag->put("NUMVERS", (long)nriga);
|
||||
const int rc2 = _rpag->rewrite();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
***************************************************************/
|
||||
|
||||
#include <relapp.h>
|
||||
|
||||
class TAnagrafica_percipiente : public TRelation_application
|
||||
{
|
||||
TRelation* _rel;
|
||||
TMask* _msk;
|
||||
|
||||
protected:
|
||||
virtual bool user_create();
|
||||
virtual bool user_destroy();
|
||||
virtual TRelation* get_relation() const { return _rel; }
|
||||
virtual TMask* get_mask(int) { return _msk; }
|
||||
};
|
||||
|
||||
bool TAnagrafica_percipiente::user_create()
|
||||
{
|
||||
const TString& tabcom_editor = ini_get_string(CONFIG_GENERAL, "77", "Edit_4");
|
||||
if (tabcom_editor.blank())
|
||||
ini_set_string(CONFIG_GENERAL, "77", "Edit_4", "700 -3");
|
||||
|
||||
_rel = new TRelation(LF_PERC);
|
||||
_msk = new TMask("770300a");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TAnagrafica_percipiente::user_destroy()
|
||||
{
|
||||
delete _msk;
|
||||
delete _rel;
|
||||
return true;
|
||||
}
|
||||
|
||||
int AnagrPerc(int argc, char* argv[])
|
||||
{
|
||||
TAnagrafica_percipiente a;
|
||||
a.run(argc, argv, TR("Dati percipienti"));
|
||||
return 0;
|
||||
}
|
9
m770/770300a.h
Normal file
9
m770/770300a.h
Normal file
@ -0,0 +1,9 @@
|
||||
#define F_CODDITTA 201
|
||||
#define F_RAGDITTA 202
|
||||
#define F_TIPOA 210
|
||||
#define F_CODANAGR 211
|
||||
#define F_RAGSOC 212
|
||||
#define F_ENP 220
|
||||
#define F_DESCENP 221
|
||||
#define F_CATEGORIA 222
|
||||
#define F_FATTBIL 301
|
113
m770/770300a.uml
Normal file
113
m770/770300a.uml
Normal file
@ -0,0 +1,113 @@
|
||||
#include "770300a.h"
|
||||
|
||||
TOOLBAR "ToolBar" 0 0 0 2
|
||||
#include <relapbar.h>
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Dati Previdenziali" -1 -1 75 12
|
||||
|
||||
GROUPBOX DLG_NULL 74 5
|
||||
BEGIN
|
||||
PROMPT 1 0 "@bPercipiente"
|
||||
END
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 2 1 "Ditta "
|
||||
FLAGS "FRD"
|
||||
USE LF_NDITTE
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
OUTPUT F_RAGDITTA RAGSOC
|
||||
CHECKTYPE REQUIRED
|
||||
FIELD CODDITTA
|
||||
KEY 1
|
||||
END
|
||||
|
||||
STRING F_RAGDITTA 50
|
||||
BEGIN
|
||||
PROMPT 16 1 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
LIST F_TIPOA 1 10
|
||||
BEGIN
|
||||
PROMPT 2 2 "Tipo persona "
|
||||
ITEM "F|Fisica"
|
||||
ITEM "G|Giuridica"
|
||||
FIELD TIPOA
|
||||
KEY 1
|
||||
END
|
||||
|
||||
NUMBER F_CODANAGR 6
|
||||
BEGIN
|
||||
PROMPT 33 2 ""
|
||||
USE LF_PERC
|
||||
JOIN LF_ANAG INTO TIPOA=TIPOA CODANAGR=CODANAGR
|
||||
INPUT CODDITTA F_CODDITTA SELECT
|
||||
INPUT TIPOA F_TIPOA SELECT
|
||||
INPUT CODANAGR F_CODANAGR
|
||||
DISPLAY "Codice" CODANAGR
|
||||
DISPLAY "Denominazione@50" LF_ANAG->RAGSOC
|
||||
DISPLAY "Codice Fiscale@16" LF_ANAG->COFI
|
||||
DISPLAY "Partita IVA@16" LF_ANAG->PAIV
|
||||
OUTPUT F_CODANAGR CODANAGR
|
||||
OUTPUT F_RAGSOC LF_ANAG->RAGSOC
|
||||
CHEKTYPE REQUIRED
|
||||
FIELD CODANAGR
|
||||
KEY 1
|
||||
END
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 2 3 "Denominazione "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 74 5
|
||||
BEGIN
|
||||
PROMPT 1 5 "@bDati previdenziali"
|
||||
END
|
||||
|
||||
STRING F_ENP 8
|
||||
BEGIN
|
||||
PROMPT 2 6 "Ente previdenziale "
|
||||
USE %ENT
|
||||
INPUT CODTAB F_ENP
|
||||
DISPLAY "Codice@8" CODTAB
|
||||
DISPLAY "Denominazione@50" S0
|
||||
DISPLAY "Codice Fiscale@16" S5
|
||||
OUTPUT F_ENP CODTAB
|
||||
OUTPUT F_DESCENP S0
|
||||
CHECKTYPE NORMAL
|
||||
FIELD ENTEPREV
|
||||
END
|
||||
|
||||
STRING F_DESCENP 50
|
||||
BEGIN
|
||||
PROMPT 2 7 "Denominazione Ente "
|
||||
USE %ENT KEY 2
|
||||
INPUT S0 F_DESCENP
|
||||
DISPLAY "Denominazione@50" S0
|
||||
DISPLAY "Codice@8" CODTAB
|
||||
DISPLAY "Codice Fiscale@16" S5
|
||||
COPY OUTPUT F_ENP
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_CATEGORIA 1
|
||||
BEGIN
|
||||
PROMPT 2 8 "Categoria "
|
||||
FIELD CATEGORIA
|
||||
END
|
||||
|
||||
CURRENCY F_FATTBIL 15
|
||||
BEGIN
|
||||
PROMPT 1 -1 "FATTBIL "
|
||||
FIELD FATTBIL
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
|
@ -472,7 +472,7 @@ bool TDati_anagrafici::ditta_caaf(TMask_field& f, KEY k)
|
||||
return f.warning_box("Se non indicato il codice del CAAF la ditta non deve essere indicata");
|
||||
|
||||
if (caaf != 0 && ditta == 0)
|
||||
return f.warning_box("Se indicato il codice del CAAF deve essere indicata anche la ditta a cui e' collegato");
|
||||
return f.warning_box("Se indicato il codice del CAAF deve essere indicata anche la ditta a cui è collegato");
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@ -492,7 +492,7 @@ bool TDati_anagrafici::create()
|
||||
char tipo_pers = tipo_persona(_codditta);
|
||||
if (tipo_pers == ' ' || tipo_pers == '\0')
|
||||
{
|
||||
message_box("Il titolare della ditta non e' stato compilato correttamente.");
|
||||
message_box("Il titolare della ditta non è stato compilato correttamente.");
|
||||
return TRUE;
|
||||
}
|
||||
if (tipo_pers == 'G')
|
||||
|
@ -46,12 +46,11 @@ TRectype& operator += (TRectype& dst, const TRectype& src)
|
||||
|
||||
class TRighe_pagamento : public TAssoc_array
|
||||
{
|
||||
TString _quadro; // Codice quadro
|
||||
TString4 _quadro; // Codice quadro
|
||||
TArray _prosp_e1; // Righe prospetto e1
|
||||
|
||||
public:
|
||||
void add_riga(const TRectype& scheda, const TRectype& riga);
|
||||
|
||||
const TRectype* prospetto_e1(char caus);
|
||||
|
||||
TRighe_pagamento(const char* quadro);
|
||||
@ -72,8 +71,9 @@ void TRighe_pagamento::add_riga(const TRectype& scheda, const TRectype& riga)
|
||||
{
|
||||
TString16 chiave;
|
||||
|
||||
const TString4 codcaus = scheda.get(SPR_CODCAUS);
|
||||
const char causqua = toupper(scheda.get_char(SPR_CAUSQUA));
|
||||
chiave << causqua;
|
||||
chiave.format("%-2s%c", (const char*)codcaus, causqua);
|
||||
if (_quadro == "C")
|
||||
chiave << scheda.get(SPR_FLAGTS); else
|
||||
if (_quadro == "E1")
|
||||
@ -193,7 +193,7 @@ protected:
|
||||
void genera_d1(TRectype& quadro, const TRectype& riga) const;
|
||||
void genera_e(TRectype& quadro, const TRectype& riga) const;
|
||||
void genera_e1(TRectype& quadro, const TRectype& riga) const;
|
||||
void genera_la(TRectype& quadro, const TRectype& riga) const;
|
||||
void genera_la(TRectype& quadro, const TRectype& riga, const TString& codcaus) const;
|
||||
void genera_righe(TRighe_pagamento& righe) const;
|
||||
void distruzione() const;
|
||||
void generazione();
|
||||
@ -423,7 +423,7 @@ bool TQuadroC_E2::user_create()
|
||||
m.set_handler(105, ricalcola_imposte_e1);
|
||||
m.set_handler(106, ricalcola_imposte_e1);
|
||||
_mskp = new TMask("771230pr");
|
||||
TSheet_field& s = (TSheet_field&)_mskp->field(F_PROSPETTO);
|
||||
TSheet_field& s = _mskp->sfield(F_PROSPETTO);
|
||||
s.set_notify(prospetto_e1_notify);
|
||||
read_prospetto_e1();
|
||||
} else
|
||||
@ -462,7 +462,7 @@ bool TQuadroC_E2::user_destroy()
|
||||
if (_mskp)
|
||||
delete _mskp;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void TQuadroC_E2::init_query_mode(TMask& m)
|
||||
@ -533,7 +533,6 @@ void TQuadroC_E2::pack_sheet(const TMask& m)
|
||||
|
||||
void TQuadroC_E2::distruzione() const
|
||||
{
|
||||
TWait_cursor hourglass;
|
||||
TRelation rel(_file);
|
||||
TRectype& curr = rel.curr();
|
||||
curr.put("CODDITTA", _codditta);
|
||||
@ -544,9 +543,15 @@ void TQuadroC_E2::distruzione() const
|
||||
|
||||
TCursor cur(&rel, filter, 1, &curr, &curr);
|
||||
long items = cur.items();
|
||||
|
||||
TProgress_monitor pi(items, TR("Eliminazione riepilogo"), false);
|
||||
|
||||
cur.freeze();
|
||||
for (cur = 0L; cur.pos() < items; ++cur)
|
||||
{
|
||||
rel.remove();
|
||||
pi.add_status();
|
||||
}
|
||||
cur.freeze(FALSE);
|
||||
|
||||
if (QuadroE1())
|
||||
@ -585,21 +590,20 @@ void TQuadroC_E2::distruzione() const
|
||||
nextnumber++;
|
||||
}
|
||||
}
|
||||
//bool same_key(const TRectype& rec, int key = 1, int skip_last = 0) const
|
||||
}
|
||||
|
||||
void TQuadroC_E2::genera_aliquota(TRectype& quadro, const char* aliquota,
|
||||
const char* imponibile, const char* imposta) const
|
||||
{
|
||||
real aliq = quadro.get_real(aliquota);
|
||||
if (aliq == ZERO)
|
||||
if (aliq.is_zero())
|
||||
{
|
||||
const real impon = quadro.get(imponibile);
|
||||
if (impon != ZERO)
|
||||
if (!impon.is_zero())
|
||||
{
|
||||
const real impos = quadro.get(imposta);
|
||||
aliq = impos * 100.0 / impon;
|
||||
if (aliq % real(1.0) == ZERO)
|
||||
aliq = impos * CENTO / impon;
|
||||
if (aliq % UNO == ZERO)
|
||||
quadro.put(aliquota, aliq);
|
||||
}
|
||||
}
|
||||
@ -723,13 +727,20 @@ void TQuadroC_E2::genera_e1(TRectype& quadro, const TRectype& riga) const
|
||||
genera_aliquota(quadro, QE1_PERC, QE1_AMMONTARE, QUE_IMPORTO); // 14
|
||||
}
|
||||
|
||||
void TQuadroC_E2::genera_la(TRectype& quadro, const TRectype& riga) const
|
||||
void TQuadroC_E2::genera_la(TRectype& quadro, const TRectype& riga, const TString& codcaus) const
|
||||
{
|
||||
const TDate datapag = riga.get(PAG_DATAPAG);
|
||||
#ifdef DBG
|
||||
if (quadro.get_long(SPR_CODANAGR) == 4042)
|
||||
int minimo = 1;
|
||||
#endif
|
||||
|
||||
const TDate datapag = riga.get(PAG_DATAPAG);
|
||||
const real compenso = riga.get_real(PAG_COMPENSO);
|
||||
const real imponibile = riga.get(PAG_IMPONIBILE);
|
||||
|
||||
quadro.put("ANNO", datapag.year());
|
||||
quadro.put(QUD_PERC, riga.get(PAG_PERC));
|
||||
quadro.put(QUD_CODCAUS, codcaus);
|
||||
|
||||
real ammlordo = imponibile;
|
||||
ammlordo += riga.get_real(PAG_SOMNSRIT);
|
||||
@ -737,12 +748,12 @@ void TQuadroC_E2::genera_la(TRectype& quadro, const TRectype& riga) const
|
||||
ammlordo += riga.get_real(PAG_SOMREGCONV);
|
||||
quadro.put(QUD_TOTALE, ammlordo);
|
||||
|
||||
real somme = riga.get_real(PAG_COMPENSO);
|
||||
real somme = compenso;
|
||||
somme -= imponibile;
|
||||
somme += riga.get_real(PAG_SPESA);
|
||||
somme -= riga.get_real(PAG_IMPCPA);
|
||||
somme -= riga.get_real(PAG_SOMREGCONV);
|
||||
quadro.put(QUD_SOMME, somme);
|
||||
quadro.put(QUD_SOMME, somme); // altre somme non soggette
|
||||
|
||||
quadro.put(QUD_SOMREGCONV, riga.get(PAG_SOMREGCONV));
|
||||
quadro.put(QUD_IMPONIBILE, imponibile); // AUXXX008
|
||||
@ -757,6 +768,20 @@ void TQuadroC_E2::genera_la(TRectype& quadro, const TRectype& riga) const
|
||||
}
|
||||
quadro.put(QUD_CTINPSEROG, inps_erog); // AUXXX020
|
||||
quadro.put(QUD_CTINPSPERC, inps_perc); // AUXXX021
|
||||
|
||||
const TRectype& perc = cache().get_rec(LF_PERC, quadro.get(SPR_CODDITTA), quadro.get(SPR_TIPOA), quadro.get(SPR_CODANAGR));
|
||||
quadro.put("ENTEPREV", perc.get("ENTEPREV")); // AUXXX029 / 32
|
||||
quadro.put("CATEGORIA", perc.get("CATEGORIA")); // AUXXX033
|
||||
|
||||
if (somme.is_zero() && quadro.get(QUD_TOTALE) == quadro.get(QUD_IMPONIBILE))
|
||||
{
|
||||
const TRectype& ca7 = cache().get("%CA7", codcaus);
|
||||
if (ca7.get_int("I1") == 3)
|
||||
{
|
||||
quadro.put(QUD_SOMME, quadro.get(QUD_IMPONIBILE));
|
||||
quadro.zero(QUD_IMPONIBILE);
|
||||
}
|
||||
}
|
||||
|
||||
genera_aliquota(quadro, QUD_PERC, QUD_IMPONIBILE, QUD_IMPORTO);
|
||||
}
|
||||
@ -778,13 +803,13 @@ void TQuadroC_E2::genera_righe(TRighe_pagamento& righe) const
|
||||
curr.put(PAG_TIPOA, riga.get(PAG_TIPOA));
|
||||
curr.put(PAG_CODANAGR, riga.get(PAG_CODANAGR));
|
||||
curr.put("NPROG", nriga);
|
||||
curr.put("CAUSALE", chiave[0]);
|
||||
curr.put("CAUSALE", chiave[2]);
|
||||
curr.put("GENERATA", true);
|
||||
|
||||
switch (_quadro[0])
|
||||
{
|
||||
case 'C':
|
||||
curr.put("TASSAZIONE", chiave[1]);
|
||||
curr.put("TASSAZIONE", chiave[3]);
|
||||
genera_c(curr, riga);
|
||||
break;
|
||||
case 'D':
|
||||
@ -806,7 +831,7 @@ void TQuadroC_E2::genera_righe(TRighe_pagamento& righe) const
|
||||
break;
|
||||
case 'L':
|
||||
if (_quadro[1] == 'A')
|
||||
genera_la(curr, riga);
|
||||
genera_la(curr, riga, chiave.left(2));
|
||||
break;
|
||||
default:
|
||||
CHECK(FALSE, "Quadro non generabile dalle schede");
|
||||
@ -883,11 +908,13 @@ void TQuadroC_E2::generazione()
|
||||
rec.put(SPR_CODDITTA, _codditta);
|
||||
|
||||
TCursor cur(&rel, NULL, 1, &rec, &rec);
|
||||
|
||||
const int anno770 = anno_770();
|
||||
|
||||
TString16 filter; filter.format("(%d->S1=\"%s\")", LF_TABCOM, (const char*)_quadronuovo);
|
||||
TString80 filter;
|
||||
filter.format("(%d->S1=\"%s\")", LF_TABCOM, (const char*)_quadronuovo);
|
||||
cur.setfilter(filter, TRUE);
|
||||
|
||||
const int anno770 = anno_770();
|
||||
const long items = cur.items();
|
||||
const TRectype& scheda = cur.curr();
|
||||
const TRectype& riga = cur.curr(LF_RPAG);
|
||||
@ -929,7 +956,7 @@ void TQuadroC_E2::generazione()
|
||||
|
||||
if (righe.items() > 0)
|
||||
genera_righe(righe);
|
||||
_registra = TRUE;
|
||||
_registra = true;
|
||||
}
|
||||
|
||||
bool TQuadroC_E2::codice_handler(TMask_field& f, KEY key)
|
||||
|
@ -2,20 +2,20 @@
|
||||
#define _771230_H
|
||||
|
||||
// 71230
|
||||
#define F_CODDITTA 101
|
||||
#define F_RAGDITTA 102
|
||||
#define F_TIPOA 103
|
||||
#define F_CODANAGR 104
|
||||
#define F_NUMPROG 105
|
||||
#define F_RAGSOC 106
|
||||
#define F_RIGHE 107
|
||||
#define H_CODANAGR 114
|
||||
#define H_RAGSOC 116
|
||||
#define F_COFI 117
|
||||
#define F_CODDITTA 201
|
||||
#define F_RAGDITTA 202
|
||||
#define F_TIPOA 203
|
||||
#define F_CODANAGR 204
|
||||
#define F_NUMPROG 205
|
||||
#define F_RAGSOC 206
|
||||
#define F_RIGHE 207
|
||||
#define H_CODANAGR 214
|
||||
#define H_RAGSOC 216
|
||||
#define F_COFI 217
|
||||
|
||||
#define F_GENERA 201
|
||||
#define F_PROSPETTO 202
|
||||
#define F_PROSPBTN 203
|
||||
#define F_GENERA 301
|
||||
#define F_PROSPETTO 302
|
||||
#define F_PROSPBTN 303
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -138,17 +138,22 @@ BEGIN
|
||||
ITEM "Addizionale\nregionale sosp.@15"
|
||||
ITEM "Imponibile anni\nprecedenti@15"
|
||||
ITEM "Ritenute operate\nanni precedenti@15"
|
||||
ITEM "Ente\nPrev.@8"
|
||||
ITEM "Categ."
|
||||
ITEM "Contributi\nerogante@15"
|
||||
ITEM "Contributi\npercipiente@15"
|
||||
ITEM "Anticip."
|
||||
ITEM "Generata\nda schede@9"
|
||||
ITEM "Altri contributi"
|
||||
ITEM "Contributi dovuti"
|
||||
ITEM "Contributi versati"
|
||||
ITEM "Anticip.@6C"
|
||||
ITEM "Generata\nda schede@8C"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
PAGE "RIGA LA" -1 -1 58 16
|
||||
PAGE "Dati fiscali" -1 -1 58 16
|
||||
|
||||
NUMBER 101 2
|
||||
BEGIN
|
||||
@ -184,17 +189,18 @@ BEGIN
|
||||
INPUT 103
|
||||
ITEM "A|Prestazioni di lavoro autonomo rientranti nell'esercizio di arte o professione abituale"
|
||||
ITEM "B|Utilizzazione economica, da parte dell'autore o dell'inventore, di opere dell'ingegno, di brevetti industriali e di processi, formule o informazioni relativi ad esperienzeacquisite in campo industriale, commerciale o scientifico"
|
||||
ITEM "C|Utili derivanti da contratti di associazione in partecipazione e da contratti di cointeressenza quando l' apporto e' costituito esclusivamente dalla prestazione di lavoro"
|
||||
ITEM "D|utili spettanti ai soci promotori ed ai soci fondatori delle societa' di capitali"
|
||||
ITEM "C|Utili derivanti da contratti di associazione in partecipazione e da contratti di cointeressenza quando l'apporto è costituito esclusivamente dalla prestazione di lavoro"
|
||||
ITEM "D|utili spettanti ai soci promotori ed ai soci fondatori delle società di capitali"
|
||||
ITEM "E|Levata di protesti cambiari da parte dei segretari comunali"
|
||||
ITEM "F|Prestazioni rese dagli sportivi con contratto di lavoro autonomo"
|
||||
ITEM "G|Idennita' corrisposte per la cessazione di attivita' sportiva professionale"
|
||||
//ITEM "F|Prestazioni rese dagli sportivi con contratto di lavoro autonomo"
|
||||
ITEM "G|Idennita' corrisposte per la cessazione di attività sportiva professionale"
|
||||
ITEM "H|Idennita' corrisposte per la cessazione dei rapporti di agenzia delle persone fisiche"
|
||||
ITEM "I|Idennita' corrisposte per la cessazione da funzionari notarili"
|
||||
ITEM "L|Utilizzaz. economica, da parte di sogg. diverso dall'autore o dall'inventore, di opere dell'ingegno, di brevetti industiali e di processi, formule e informaz. relativi ad esperienze acquisite in campo industriale, commerciale, scientifico"
|
||||
ITEM "L1|Redditi derivanti dall’utilizzazione economica di opere dell’ingegno, di brevetti industriali e di processi, formule e informazioni relativi a esperienze acquisite in campo industriale, commerciale o scientifico, che sono percepiti da soggetti che abbiano acquistato a titolo oneroso i diritti alla loro utilizzazione"
|
||||
ITEM "M|Prestazioni di lavoro autonomo non esercitate abitualmente"
|
||||
ITEM "M1|Redditi derivanti dall’assunzione di obblighi di fare, di non fare o permettere"
|
||||
ITEM "M2|Prestazioni di lavoro autonomo non esercitate abitualmente per le quali sussiste l’obbligo di iscrizione alla Gestione Separata ENPAPI"
|
||||
ITEM "N|Idennita' di trasferta, rinborso forfetario di spese, premi e compensi erogati nell' esercizio diretto di attivita' sportiva dilettantistiche"
|
||||
ITEM "O|Prestazioni di lavoro autonomo non esercitate abitualmente, per le quali non sussiste l’obbligo di iscrizione alla gestione separata"
|
||||
ITEM "O1|Redditi derivanti dall’assunzione di obblighi di fare, di non fare o permettere, per le quali non sussiste l’obbligo di iscrizione alla gestione separata (Circ. INPS n. 104/2001)"
|
||||
@ -205,7 +211,8 @@ BEGIN
|
||||
ITEM "T|Provvigioni corrisposte a mediatore"
|
||||
ITEM "U|Provvigioni corrisposte a procacciatore di affari"
|
||||
ITEM "V|Provvigioni corrisposte a incaricato per le vendite a domicilio"
|
||||
ITEM "V1|redditi derivanti da attività commerciali non esercitate abitualmente (ad esempio, provvigioni corrisposte per prestazioni occasionali ad agente o rappresentante di commercio, mediatore, procacciatore d’affari o incaricato per le vendite a domicilio)"
|
||||
ITEM "V1|Redditi derivanti da attività commerciali non esercitate abitualmente (ad esempio, provvigioni corrisposte per prestazioni occasionali ad agente o rappresentante di commercio, mediatore, procacciatore d’affari o incaricato per le vendite a domicilio)"
|
||||
ITEM "V2|Redditi derivanti dalle prestazioni non esercitate abitualmente rese dagli incaricati alla vendita diretta a domicilio"
|
||||
ITEM "W|Provvigioni corrisposte a incaricato per la vendita porta a porta e per la vendita ambulante di giornali quotidiani e periodici (L. 25 febbraio 1987, n. 67)"
|
||||
ITEM "X|Canoni corrisposti nel 2004 da società o enti residenti ovvero da stabili organizzazioni di società estere"
|
||||
ITEM "Y|Canoni corrisposti dal 1° gennaio 2005 al 26 luglio 2005 da società o enti residenti ovvero da stabili organizzazioni di società estere"
|
||||
@ -285,34 +292,73 @@ BEGIN
|
||||
FIELD RITANNIPRE
|
||||
END
|
||||
|
||||
CURRENCY 115 15
|
||||
BOOLEAN 122
|
||||
BEGIN
|
||||
PROMPT 1 13 "Contributi a carico dell'erogante "
|
||||
FIELD CTINPSEROG
|
||||
END
|
||||
|
||||
CURRENCY 116 15
|
||||
BEGIN
|
||||
PROMPT 1 14 "Contributi a carico del percipiente "
|
||||
FIELD CTINPSPERC
|
||||
END
|
||||
|
||||
|
||||
BOOLEAN 117
|
||||
BEGIN
|
||||
PROMPT 1 15 "Anticipazione"
|
||||
PROMPT 1 13 "Anticipazione"
|
||||
FIELD ANTICIPAZ
|
||||
END
|
||||
|
||||
BOOLEAN 118
|
||||
BOOLEAN 123
|
||||
BEGIN
|
||||
PROMPT 31 15 "Riga generata da schede"
|
||||
PROMPT 31 13 "Riga generata da schede"
|
||||
FLAGS "D"
|
||||
FIELD GENERATA
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Dati previdenziali" -1 -1 58 16
|
||||
|
||||
STRING 115 8
|
||||
BEGIN
|
||||
PROMPT 1 1 "Ente previdenziale "
|
||||
USE %ENT
|
||||
INPUT CODTAB 117
|
||||
DISPLAY "Codice@8" CODTAB
|
||||
DISPLAY "Denominazione@50" S0
|
||||
DISPLAY "Codice Fiscale" S5
|
||||
OUTPUT 115 CODTAB
|
||||
FIELD ENTEPREV
|
||||
END
|
||||
|
||||
STRING 116 2
|
||||
BEGIN
|
||||
PROMPT 1 2 "Categoria "
|
||||
FIELD CATEGORIA
|
||||
END
|
||||
|
||||
CURRENCY 117 15
|
||||
BEGIN
|
||||
PROMPT 1 3 "Contributi a carico dell'erogante "
|
||||
FIELD CTINPSEROG
|
||||
END
|
||||
|
||||
CURRENCY 118 15
|
||||
BEGIN
|
||||
PROMPT 1 4 "Contributi a carico del percipiente "
|
||||
FIELD CTINPSPERC
|
||||
END
|
||||
|
||||
CURRENCY 119 15
|
||||
BEGIN
|
||||
PROMPT 1 5 "Altri contributi "
|
||||
FIELD ALTRICONTR
|
||||
END
|
||||
|
||||
CURRENCY 120 15
|
||||
BEGIN
|
||||
PROMPT 1 6 "Contributi dovuti "
|
||||
FIELD CONTRDOV
|
||||
END
|
||||
|
||||
CURRENCY 121 15
|
||||
BEGIN
|
||||
PROMPT 1 7 "Contributi versati "
|
||||
FIELD CONTRVER
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
|
@ -22,7 +22,6 @@ int main(int argc,char** argv)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
// Utility
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
const int ANNO_PAG = 2014;
|
||||
const int ANNO_PAG = 2015;
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TForm770
|
||||
@ -801,8 +801,7 @@ bool TTrasferimento770::append_record_b()
|
||||
// Ritorna il form da cui prelevare i codici (come AUXXX010) da inserire nei tracciati
|
||||
TForm770& TTrasferimento770::form(const char* quadro, char& tiporec, int& rpm)
|
||||
{
|
||||
CHECK(quadro && *quadro != '\0' && quadro[1] != '\0',
|
||||
"Codice quadro non valido");
|
||||
CHECK(quadro && *quadro != '\0' && quadro[1] != '\0', "Codice quadro non valido");
|
||||
|
||||
const char* name = NULL;
|
||||
switch(quadro[1])
|
||||
@ -925,7 +924,7 @@ bool TTrasferimento770::split(const char* path)
|
||||
if (_save_headers)
|
||||
{
|
||||
rec.tipo_record('A'); // Compila record di testata A
|
||||
rec.set(3, "77S15"); // Codice fornitura
|
||||
rec.set(3, "77S16"); // Codice fornitura
|
||||
rec.set(4, 1); // Tipo fornitore 01 = Soggetto che invia la propria dichiarazione
|
||||
rec.set(5, cod_fis_dic()); // Codice fiscale del fornitore
|
||||
if (volumes > 1)
|
||||
|
185
m770/777200.cpp
185
m770/777200.cpp
@ -48,7 +48,7 @@ const TString& get_telephone(const TRectype& rec, const char* pref, const char*
|
||||
// TTracciatoCU
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
const char* cu_default_name() { return "MODCUR15"; }
|
||||
#define CU_DEFAULT_NAME "MODCUR16"
|
||||
|
||||
class TTracciatoCU : public TTracciato770
|
||||
{
|
||||
@ -73,7 +73,7 @@ TTracciatoCU::TTracciatoCU(char tipo)
|
||||
} else
|
||||
if (tipo == 'B')
|
||||
{
|
||||
add_field("Codice fiscale dichiarante", CF, 2, 16); // 2
|
||||
add_field("Codice fiscale sostituto", CF, 2, 16); // 2
|
||||
add_field("Progressivo modulo", NU, 18, 8);
|
||||
add_filler( 26, 1);
|
||||
add_filler( 27, 8);
|
||||
@ -86,7 +86,7 @@ TTracciatoCU::TTracciatoCU(char tipo)
|
||||
add_field("Annullamento", CB, 91, 1); // 10
|
||||
add_field("Sostituzione", CB, 92, 1);
|
||||
|
||||
// Dati del contribuente
|
||||
// Dati del sostituto
|
||||
add_field("Cognome", AN, 93, 24); // 12
|
||||
add_field("Nome", AN,117, 20);
|
||||
add_field("Denominazione (Alternativo a 12 e 13)",AN,137, 60);
|
||||
@ -109,13 +109,6 @@ TTracciatoCU::TTracciatoCU(char tipo)
|
||||
add_field("Impegno a trasmettere la dichiaraz.", NU, 428, 1);
|
||||
add_field("Data dell'impegno", DT, 429, 8);
|
||||
add_field("Firma dell'intermediario", CB, 437, 1);
|
||||
add_filler(438, 1);
|
||||
add_field("Comune di Residenza", AN, 439,40); // 32
|
||||
add_field("Provincia di Residenza", PR, 479, 2);
|
||||
add_field("CAP di Residenza", NU, 481, 5);
|
||||
add_field("Indirizzo di Residenza", AN, 486,35);
|
||||
add_field("Codice Attività", NU, 521, 6);
|
||||
add_field("Codice Sede", NU, 527, 3);
|
||||
} else
|
||||
if (tipo == 'D')
|
||||
{
|
||||
@ -125,6 +118,7 @@ TTracciatoCU::TTracciatoCU(char tipo)
|
||||
add_field("Progressivo certificazione", NU, 42, 5); // 5
|
||||
add_field("Identificativo dell'invio", NU, 47, 17); // 6
|
||||
add_field("Progressivo singola C.U.", NU, 64, 6); // 7
|
||||
add_filler(70, 14);
|
||||
add_field("Tipo Operazione", AN, 84, 1, 9); // 9
|
||||
add_filler(85, 4);
|
||||
add_field("Conferma singola certificazione", CB, 89, 1); // 11
|
||||
@ -279,11 +273,11 @@ bool TTrasferimentoCU::load(const char* path)
|
||||
if (path && *path)
|
||||
{
|
||||
_name = path;
|
||||
if (_name.find(cu_default_name()) < 0)
|
||||
_name.add(cu_default_name());
|
||||
if (_name.find(CU_DEFAULT_NAME) < 0)
|
||||
_name.add(CU_DEFAULT_NAME);
|
||||
}
|
||||
if (_name.empty())
|
||||
_name = cu_default_name();
|
||||
_name = CU_DEFAULT_NAME;
|
||||
|
||||
ifstream is(_name, ios::in | ios::binary);
|
||||
TRecordCU rec;
|
||||
@ -330,7 +324,7 @@ unsigned int TTrasferimentoCU::columns() const
|
||||
const TRecordset_column_info& TTrasferimentoCU::column_info(unsigned int column) const
|
||||
{
|
||||
static TRecordset_column_info ci;
|
||||
if (column >= 0 && column < columns())
|
||||
if (column < 256 /*column >= 0 && column < columns()*/)
|
||||
{
|
||||
const TRecordCU& cur_rec = (const TRecordCU&)_data[_cur_pos];
|
||||
const TTracciato770& trc = _trcCU.tracciato(cur_rec.tipo_record());
|
||||
@ -418,6 +412,21 @@ bool TTrasferimentoCU::set_field(int n, const TVariant& var)
|
||||
return done;
|
||||
}
|
||||
|
||||
bool TTrasferimentoCU::set_field(const char* name, const TVariant& var)
|
||||
{
|
||||
bool done = name && *name && _data.objptr(_cur_pos) != NULL;
|
||||
if (done)
|
||||
{
|
||||
TRecordCU& cur_rec = (TRecordCU&)_data[_cur_pos];
|
||||
if (isdigit(*name))
|
||||
done = set_field(atoi(name), var);
|
||||
else
|
||||
done = cur_rec.np_put(name, var.as_string());
|
||||
}
|
||||
return done;
|
||||
}
|
||||
|
||||
|
||||
const TString& TTrasferimentoCU::read_codfis_dic(const TRectype& rec)
|
||||
{
|
||||
TToken_string key; // Stringa multiuso
|
||||
@ -476,24 +485,14 @@ void TTrasferimentoCU::set_operazione(char t, const TString& iden)
|
||||
TRecnotype TTrasferimentoCU::conta_certificazioni() const
|
||||
{
|
||||
int anno = _anno;
|
||||
if (anno < 2014)
|
||||
anno = 2014;
|
||||
if (anno < 2015)
|
||||
anno = 2015;
|
||||
|
||||
TString query;
|
||||
query.format("USE %d SELECT ANNO=%d\nFROM CODDITTA=%ld\nTO CODDITTA=%ld",
|
||||
query.format("USE %d SELECT (ANNO=%d)&&(CODANAGR>0)\nFROM CODDITTA=%ld\nTO CODDITTA=%ld",
|
||||
LF_QUALA, anno, _cod_ditta, _cod_ditta);
|
||||
|
||||
TRecnotype nc = 0;
|
||||
TISAM_recordset recset(query);
|
||||
for (bool ok = recset.move_first(); ok; ok = recset.move_next())
|
||||
{
|
||||
const char tipoanag = recset.get("TIPO").as_string()[0];
|
||||
const long codanagr = recset.get("CODANAGR").as_int();
|
||||
if (tipoanag >= 'F' && codanagr > 0)
|
||||
nc++;
|
||||
}
|
||||
CHECKD(nc <= recset.items(), "Numero certificazioni errato:", nc);
|
||||
return nc;
|
||||
return recset.items();
|
||||
}
|
||||
|
||||
bool TTrasferimentoCU::append_record_b()
|
||||
@ -647,10 +646,13 @@ bool TTrasferimentoCU::append_record_d(const TRectype& qla, TLog_report& log)
|
||||
|
||||
if (perc.estero())
|
||||
{
|
||||
rec.np_put("DA002040", perc.codice_fiscale());
|
||||
rec.np_put("DA002041", perc.localita_residenza());
|
||||
rec.np_put("DA002040", perc.partita_IVA());
|
||||
rec.np_put("DA002041", perc.comune_residenza());
|
||||
rec.np_put("DA002042", perc.indirizzo_residenza());
|
||||
rec.np_put("DA002043", perc.stato_estero_UNICO());
|
||||
// 2015
|
||||
//rec.np_put("DA002043", perc.stato_estero_UNICO());
|
||||
// 2016
|
||||
rec.np_put("DA002044", perc.stato_estero_UNICO());
|
||||
}
|
||||
|
||||
rec.np_put("DA003001", _data_tra);
|
||||
@ -660,7 +662,7 @@ bool TTrasferimentoCU::append_record_d(const TRectype& qla, TLog_report& log)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TTrasferimentoCU::append_record_h(const TRectype& qla, TLog_report& log)
|
||||
bool TTrasferimentoCU::append_record_h(const TRectype& qla, int modulo, TLog_report& log)
|
||||
{
|
||||
const char tipoanag = qla.get_char("TIPOA");
|
||||
const long codanagr = qla.get_long("CODANAGR");
|
||||
@ -674,14 +676,14 @@ bool TTrasferimentoCU::append_record_h(const TRectype& qla, TLog_report& log)
|
||||
TAnagrafica perc(LF_ANAG, tipoanag, codanagr);
|
||||
if (!perc.ok())
|
||||
{
|
||||
TString msg; msg.format(FR("Scartato percipiente non valido %c/%ld"), tipoanag, codanagr);
|
||||
TString msg; msg.format(FR("Scartato percipiente non valido %c/%ld %s"), tipoanag, codanagr, (const char*)perc.codice_fiscale());
|
||||
log.log(2, msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
TRecordCU rec('H'); // Compila record H
|
||||
rec.set(2, cod_fis_dic()); // Codice fiscale sostituto
|
||||
rec.set(3, 1L); // Progressivo modulo
|
||||
rec.set(3, modulo); // Progressivo modulo
|
||||
rec.set(4, perc.codice_fiscale()); // Codice fiscale del percipiente
|
||||
rec.set(5, _certificazione); // Progressivo certificazione
|
||||
|
||||
@ -696,13 +698,23 @@ bool TTrasferimentoCU::append_record_h(const TRectype& qla, TLog_report& log)
|
||||
if (perc.estero())
|
||||
rec.np_put("AU001005", qla.get_real("SOMREGCONV"));
|
||||
|
||||
const real altre_somme = qla.get_real("SOMME");
|
||||
real altre_somme = qla.get_real("SOMME");
|
||||
real imponibile = qla.get_real("IMPONIBILE");
|
||||
|
||||
const TString4 codcaus = qla.get("CODCAUS");
|
||||
long codice = atol(cache().get("%CA7", codcaus, "I1")); // 1, 2, 3
|
||||
if (altre_somme.is_zero() && codice == 3)
|
||||
{
|
||||
altre_somme = imponibile;
|
||||
imponibile = ZERO;
|
||||
}
|
||||
if (!altre_somme.is_zero())
|
||||
{
|
||||
rec.np_put("AU001006", 3L); // 1, 2, 3
|
||||
if (codice <= 0) codice = 3; // Regime minimi
|
||||
rec.np_put("AU001006", codice); // 1, 2, 3
|
||||
rec.np_put("AU001007", altre_somme);
|
||||
}
|
||||
rec.np_put("AU001008", qla.get_real("IMPONIBILE")); // 004 - 005 - 007
|
||||
rec.np_put("AU001008", imponibile); // 004 - 005 - 007
|
||||
rec.np_put("AU001009", qla.get_real("IMPORTO")); // ritenute a titolo di acconto
|
||||
//rec.np_put("AU001010", ZERO); // ritenute a titolo di imposta
|
||||
rec.np_put("AU001011", qla.get_real("RITSOSPESE")); // ritenute sospese
|
||||
@ -711,10 +723,52 @@ bool TTrasferimentoCU::append_record_h(const TRectype& qla, TLog_report& log)
|
||||
|
||||
rec.np_put("AU001018", qla.get_real("IMPANNIPRE")); // imponibile anni precedenti
|
||||
rec.np_put("AU001019", qla.get_real("RITANNIPRE")); // ritenute anni precedenti
|
||||
rec.np_put("AU001020", qla.get_real("CTINPSEROG")); // contributi a carico erogante
|
||||
rec.np_put("AU001021", qla.get_real("CTINPSPERC")); // contributi a carico percipiente
|
||||
//rec.np_put("AU001022", qla.get_real("SPESERIMB")); // spese rimborsate
|
||||
//rec.np_put("AU001023", qla.get_rea;("RITRIMB")); // ritenute rimborsate
|
||||
//rec.np_put("AU001020", qla.get_real("SPESERIMB")); // spese rimborsate
|
||||
//rec.np_put("AU001021", qla.get_real("RITRIMB")); // ritenute rimborsate
|
||||
|
||||
const real cce = qla.get_real("CTINPSEROG");
|
||||
const real ccp = qla.get_real("CTINPSPERC");
|
||||
const real cal = qla.get_real("ALTRICONTR");
|
||||
const real cdo = qla.get_real("CONTRDOV");
|
||||
const real cve = qla.get_real("CONTRVER");
|
||||
if (!cce.is_zero() || !cal.is_zero() || !ccp.is_zero() || !cdo.is_zero() || !cve.is_zero())
|
||||
{
|
||||
TString8 entprev = qla.get("ENTEPREV");
|
||||
TString4 cat = qla.get("CATEGORIA");
|
||||
if (entprev.blank())
|
||||
{
|
||||
const TRectype& aperc = cache().get_rec(LF_PERC, qla.get("CODDITTA"), qla.get("TIPO"), qla.get("CODANAGR"));
|
||||
entprev = aperc.get("ENTEPREV");
|
||||
cat = aperc.get("CATEGORIA");
|
||||
}
|
||||
if (entprev.full())
|
||||
{
|
||||
const TRectype& inps = cache().get("%ENT", entprev);
|
||||
rec.np_put("AU001029", inps.get("S5")); // codice fiscale ente previdenziale
|
||||
rec.np_put("AU001030", inps.get("S0")); // denominazione ente previdenziale
|
||||
rec.np_put("AU001031", inps.get("S6")); // codice ente previdenziale (2, 4, A)
|
||||
|
||||
TToken_string cod_az; cod_az.format("77ENT|%s|%05ld",(const char*)entprev, qla.get_long("CODDITTA"));
|
||||
const TString& azienda = cache().get(LF_MULTIREL, cod_az, "DATA");
|
||||
rec.np_put("AU001032", azienda); // codice azienda presso ente previdenziale
|
||||
}
|
||||
else
|
||||
{
|
||||
TString msg; msg.format(FR("Percipiente privo di dati previdenziali %c/%ld %s"), tipoanag, codanagr, (const char*)perc.codice_fiscale());
|
||||
log.log(1, msg);
|
||||
}
|
||||
|
||||
rec.np_put("AU001033", cat);
|
||||
rec.np_put("AU001034", cce); // contributi a carico erogante
|
||||
rec.np_put("AU001035", ccp); // contributi a carico percipiente
|
||||
if (!cal.is_zero())
|
||||
{
|
||||
rec.np_put("AU001036", true); // altri contributi?
|
||||
rec.np_put("AU001037", cal); // importo altri contributi
|
||||
}
|
||||
rec.np_put("AU001038", cdo); // contributi dovuti
|
||||
rec.np_put("AU001039", cve); // contributi versati
|
||||
}
|
||||
|
||||
_data.add(rec);
|
||||
return true;
|
||||
@ -751,7 +805,7 @@ bool TTrasferimentoCU::split(const char* path)
|
||||
for (int volume = 1; good && volume <= volumes; volume++)
|
||||
{
|
||||
// Specifica volume solo se necessario
|
||||
TFilename fn = path; fn.add(cu_default_name());
|
||||
TFilename fn = path; fn.add(CU_DEFAULT_NAME);
|
||||
if (volumes > 1) fn << '_' << volume;
|
||||
TTrasferimentoCU outfile(fn, 'w');
|
||||
|
||||
@ -759,7 +813,7 @@ bool TTrasferimentoCU::split(const char* path)
|
||||
{
|
||||
TRecordCU rec;
|
||||
rec.tipo_record('A'); // Compila record di testata A
|
||||
rec.set(3, "CUR15"); // Codice fornitura
|
||||
rec.set(3, "CUR16"); // Codice fornitura
|
||||
rec.set(4, 1); // Tipo fornitore: 01=Soggetto che invia la propria dichiarazione; 10=CAF
|
||||
rec.set(5, _codfis_int.full() ? _codfis_int : cod_fis_dic()); // Codice fiscale del fornitore
|
||||
outfile << rec; // Scrive record testata
|
||||
@ -848,11 +902,18 @@ bool TCU_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
switch (o.dlg())
|
||||
{
|
||||
case F_ANNO:
|
||||
if (e == fe_init)
|
||||
{
|
||||
const int anno = ini_get_int(CONFIG_STUDIO, "77", "AnnoDic", 2015);
|
||||
o.set(anno);
|
||||
}
|
||||
break;
|
||||
case F_PATH:
|
||||
if (e == fe_init || e == fe_modify)
|
||||
{
|
||||
TFilename f = o.get();
|
||||
f.add(cu_default_name());
|
||||
f.add(CU_DEFAULT_NAME);
|
||||
enable(DLG_PREVIEW, f.exist());
|
||||
}
|
||||
break;
|
||||
@ -860,11 +921,12 @@ bool TCU_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
if (e == fe_button)
|
||||
{
|
||||
TFilename tmp = get(F_PATH);
|
||||
tmp.add(cu_default_name());
|
||||
tmp.add(CU_DEFAULT_NAME);
|
||||
if (tmp.exist())
|
||||
{
|
||||
const int quality = get_bool(F_QUALITY) ? 2 : 1;
|
||||
print_cu(tmp, quality);
|
||||
const bool simple = get_bool(F_SIMPLE);
|
||||
print_cu(tmp, quality, simple);
|
||||
}
|
||||
else
|
||||
cantread_box(tmp);
|
||||
@ -875,11 +937,12 @@ bool TCU_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
if (e == fe_button)
|
||||
{
|
||||
TFilename tmp = get(F_PATH);
|
||||
tmp.add(cu_default_name());
|
||||
tmp.add(CU_DEFAULT_NAME);
|
||||
if (tmp.input() && tmp.exist())
|
||||
{
|
||||
const int quality = get_bool(F_QUALITY) ? 2 : 1;
|
||||
edit_cu(tmp, quality);
|
||||
const bool simple = get_bool(F_SIMPLE);
|
||||
edit_cu(tmp, quality, simple);
|
||||
}
|
||||
return false; // don't close mask
|
||||
}
|
||||
@ -902,12 +965,11 @@ public:
|
||||
|
||||
void TCU_app::main_loop()
|
||||
{
|
||||
const int anno = ini_get_int(CONFIG_STUDIO, "77", "AnnoDic", 2014);
|
||||
TCU_mask m;
|
||||
m.set(F_ANNO, anno);
|
||||
|
||||
while (m.run() == K_ENTER)
|
||||
{
|
||||
const int anno = m.get_int(F_ANNO);
|
||||
TFilename tmp; tmp.tempdir();
|
||||
TTrasferimentoCU t(tmp, 'w');
|
||||
t.set_inter(m.get(F_INTER_CODFIS), m.get_date(F_INTER_DATA), anno);
|
||||
@ -933,7 +995,7 @@ void TCU_app::main_loop()
|
||||
t.read_codfis_dic(base);
|
||||
t.append_record_b();
|
||||
|
||||
query.format("USE %d SELECT (ANNO=%d)\nBY TIPOA,CODANAGR,CAUSALE\nFROM CODDITTA=%ld\nTO CODDITTA=%ld",
|
||||
query.format("USE %d SELECT (ANNO=%d)\nBY TIPOA CODANAGR CAUSALE\nFROM CODDITTA=%ld\nTO CODDITTA=%ld",
|
||||
LF_QUALA, anno, codditta, codditta);
|
||||
|
||||
TISAM_recordset perc(query);
|
||||
@ -942,20 +1004,11 @@ void TCU_app::main_loop()
|
||||
{
|
||||
TProgress_monitor pp(nperc, TR("Generazione record percipienti"));
|
||||
const TRectype& rec = perc.cursor()->curr();
|
||||
long last_perc = 0;
|
||||
TString4 last_caus;
|
||||
const int modulo = 1;
|
||||
const int modulo = 1; // In realtà non accetta modulo != 1 per cui separa causali diverse in due comunicazioni
|
||||
for (bool ok = perc.move_first(); ok; ok = perc.move_next())
|
||||
{
|
||||
const long codanagr = rec.get_long("CODANAGR");
|
||||
const TString4 codcaus = rec.get_long("CAUSALE");
|
||||
if (codanagr != last_perc || codcaus != last_caus)
|
||||
{
|
||||
last_perc = codanagr;
|
||||
last_caus = codcaus;
|
||||
t.append_record_d(rec, log);
|
||||
}
|
||||
t.append_record_h(rec, log);
|
||||
t.append_record_d(rec, log);
|
||||
t.append_record_h(rec, modulo, log);
|
||||
pp.add_status();
|
||||
}
|
||||
}
|
||||
@ -967,13 +1020,13 @@ void TCU_app::main_loop()
|
||||
tmp = m.get(F_PATH);
|
||||
if (t.split(tmp))
|
||||
{
|
||||
tmp.add(cu_default_name());
|
||||
tmp.add(CU_DEFAULT_NAME);
|
||||
if (yesno_box(FR("E' stato generato il file %s\nSi desidera visualizzarlo in anteprima?"), (const char*) tmp))
|
||||
m.send_key(K_SPACE, DLG_PREVIEW);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp.add(cu_default_name());
|
||||
tmp.add(CU_DEFAULT_NAME);
|
||||
cantwrite_box(tmp);
|
||||
}
|
||||
t.remove();
|
||||
@ -983,7 +1036,7 @@ void TCU_app::main_loop()
|
||||
int m777200(int argc, char* argv[])
|
||||
{
|
||||
TCU_app app;
|
||||
app.run(argc, argv, "Invio C.U.");
|
||||
app.run(argc, argv, TR("Certificazione Unica"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,7 @@ public: // TAS400_recordset
|
||||
virtual const TVariant& get(unsigned int column) const;
|
||||
virtual const TVariant& get_var(const char* name) const;
|
||||
bool set_field(int n, const TVariant& var);
|
||||
bool set_field(const char* name, const TVariant& var);
|
||||
|
||||
public:
|
||||
|
||||
@ -71,13 +72,13 @@ public:
|
||||
|
||||
bool append_record_b();
|
||||
bool append_record_d(const TRectype& rec, TLog_report& log);
|
||||
bool append_record_h(const TRectype& rec, TLog_report& log);
|
||||
bool append_record_h(const TRectype& rec, int modulo, TLog_report& log);
|
||||
|
||||
TTrasferimentoCU(const char* name, char mode);
|
||||
virtual ~TTrasferimentoCU();
|
||||
};
|
||||
|
||||
void print_cu(const TFilename& datafile, int quality);
|
||||
void edit_cu(const TFilename& datafile, int quality);
|
||||
void print_cu(const TFilename& datafile, int quality, bool simple);
|
||||
void edit_cu(const TFilename& datafile, int quality, bool simple);
|
||||
|
||||
#endif
|
@ -5,6 +5,7 @@
|
||||
#define F_ADITTA 107
|
||||
#define F_ADESC 108
|
||||
#define F_QUALITY 110
|
||||
#define F_SIMPLE 111
|
||||
|
||||
#define F_INVIO 115
|
||||
#define F_IDENTIFICATIVO 116
|
||||
|
@ -70,10 +70,10 @@ END
|
||||
NUMBER F_ANNO 4
|
||||
BEGIN
|
||||
PROMPT 46 2 "Anno dichiarazione "
|
||||
FLAGS "D"
|
||||
FLAGS "DG"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 10
|
||||
GROUPBOX DLG_NULL 78 5
|
||||
BEGIN
|
||||
PROMPT 1 6 "@bParametri di generazione"
|
||||
END
|
||||
@ -124,14 +124,29 @@ BEGIN
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 3
|
||||
BEGIN
|
||||
PROMPT 1 11 "@bParametri di stampa"
|
||||
END
|
||||
|
||||
BOOLEAN F_QUALITY
|
||||
BEGIN
|
||||
PROMPT 2 11 "Stampa sfondi colorati del modulo"
|
||||
PROMPT 2 12 "Stampa sfondi colorati del modulo"
|
||||
END
|
||||
|
||||
BOOLEAN F_SIMPLE
|
||||
BEGIN
|
||||
PROMPT 42 12 "Modello sintetico"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 4
|
||||
BEGIN
|
||||
PROMPT 1 14 "@bParametri di invio"
|
||||
END
|
||||
|
||||
LIST F_INVIO 1 12
|
||||
BEGIN
|
||||
PROMPT 2 13 "Tipo operazione "
|
||||
PROMPT 2 15 "Tipo operazione "
|
||||
ITEM " |Normale" MESSAGE DISABLE,F_IDENTIFICATIVO
|
||||
ITEM "A|Annullamento" MESSAGE ENABLE,F_IDENTIFICATIVO
|
||||
ITEM "S|Sostituzione" MESSAGE ENABLE,F_IDENTIFICATIVO
|
||||
@ -139,7 +154,7 @@ END
|
||||
|
||||
STRING F_IDENTIFICATIVO 17
|
||||
BEGIN
|
||||
PROMPT 2 14 "Identificativo invio "
|
||||
PROMPT 2 16 "Identificativo invio "
|
||||
FLAGS "RZ"
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
157
m770/777201.cpp
157
m770/777201.cpp
@ -46,6 +46,7 @@ class TCU_report : public TReport
|
||||
{
|
||||
TReport_font _fnt_rep, _fnt_prm, _fnt_lbl, _fnt_sub, _fnt_prg;
|
||||
int _quality; // 0=text only; 1=borders only; 2=filled bars
|
||||
bool _syntetic;
|
||||
|
||||
private:
|
||||
const TReport_field& last_field() const;
|
||||
@ -62,6 +63,7 @@ protected:
|
||||
TReport_field& add_prompted_bool(TReport_section& sec, int row, int col, int width, const char* field, const char* prompt, int promptlen = -1);
|
||||
TReport_field& add_labeled_field (TReport_section& sec, int row, int col, int width, const char* field, const char* label, char alignment = 'B');
|
||||
TReport_field& add_labeled_number(TReport_section& sec, int row, int col, int width, const char* field, const char* label, char alignment = 'B');
|
||||
TReport_field& add_labeled_bool (TReport_section& sec, int row, int col, int width, const char* field, const char* label);
|
||||
TReport_field& add_boxed_field (TReport_section& sec, int row, int col, int width, const char* field, const char* prompt, int flags = 0x0);
|
||||
TReport_field& add_gridded_field (TReport_section& sec, int row, int col, int len,
|
||||
const char* field, const char* prompt);
|
||||
@ -80,7 +82,7 @@ protected:
|
||||
void create_H();
|
||||
|
||||
public:
|
||||
TCU_report(int quality);
|
||||
TCU_report(int quality, bool syntetic);
|
||||
};
|
||||
|
||||
#define CU_FORM_WIDTH 7800
|
||||
@ -103,13 +105,13 @@ const TReport_field& TCU_report::last_field() const
|
||||
return *_last_fld;
|
||||
}
|
||||
|
||||
|
||||
void TCU_report::set_field_pos(int row, int col, int len, TReport_field& fld) const
|
||||
{
|
||||
TReport_section& sec = fld.section();
|
||||
|
||||
int dimx = (len+1) * 100;
|
||||
int dimy = 150;
|
||||
const int dimy = _row_height <= 200 ? 100 : 150;
|
||||
|
||||
int posx = 0;
|
||||
if (col < 0)
|
||||
{
|
||||
@ -244,7 +246,7 @@ void TCU_report::add_field_sublabel(const TReport_field& fld, const char* text)
|
||||
label->set_font(_fnt_sub);
|
||||
const TReport_rct& rct = fld.get_rect();
|
||||
label->set_pos(rct.x, rct.y);
|
||||
label->set_size(rct.width(), rct.height()/3);
|
||||
label->set_size(150, 50); //label->set_size(rct.width(), rct.height()/3);
|
||||
label->set_picture(text);
|
||||
sec.add(label);
|
||||
}
|
||||
@ -333,8 +335,8 @@ TReport_field& TCU_report::add_labeled_field(TReport_section& body, int row, int
|
||||
txt.set_horizontal_alignment(alignment);
|
||||
if (field && *field && field[1] >= 'A')
|
||||
{
|
||||
TString4 num = field+7;
|
||||
if (num[0] == '0') num.ltrim(1);
|
||||
TString4 num = field+6;
|
||||
while (num[0] == '0') num.ltrim(1);
|
||||
add_field_sublabel(txt, num);
|
||||
}
|
||||
if (label && *label)
|
||||
@ -359,6 +361,14 @@ TReport_field& TCU_report::add_labeled_number(TReport_section& body, int row, in
|
||||
return txt;
|
||||
}
|
||||
|
||||
TReport_field& TCU_report::add_labeled_bool(TReport_section& body, int row, int col, int width,
|
||||
const char* field, const char* label)
|
||||
{
|
||||
TReport_field& check = add_labeled_field(body, row, col, width, field, label, 'C');
|
||||
check.set_type('B');
|
||||
return check;
|
||||
}
|
||||
|
||||
TReport_field& TCU_report::add_prompted_field(TReport_section& body, int row, int col, int width, const char* field, const char* prompt, int promptlen)
|
||||
{
|
||||
if (col == CU_ALIGN_RIGHT && width > 0)
|
||||
@ -416,7 +426,6 @@ TReport_field& TCU_report::add_boxed_field(TReport_section& sec, int row, int co
|
||||
return txt;
|
||||
}
|
||||
|
||||
|
||||
void TCU_report::add_field_grid(const TReport_field& fld, bool underlined, bool date)
|
||||
{
|
||||
TReport_section& sec = fld.section();
|
||||
@ -579,12 +588,12 @@ void TCU_report::create_logo(TReport_section& header)
|
||||
{
|
||||
add_big_text(header, 4, 0, "CERTIFICAZIONE", COLOR_GRAY).set_vertical_alignment('T');
|
||||
add_big_text(header, 6, 0, "UNICA", COLOR_BLACK).set_vertical_alignment('B');
|
||||
add_big_text(header, 6,12, "2015", COLOR_LTGRAY).set_vertical_alignment('B');
|
||||
add_big_text(header, 6,12, "2016", COLOR_LTGRAY).set_vertical_alignment('B');
|
||||
|
||||
TReport_field* txt = new TReport_field(&header);
|
||||
txt->set_type('I');
|
||||
txt->set("res/AgenziaEntrate.gif");
|
||||
txt->set_pos(CU_FORM_BORDER, 900);
|
||||
txt->set_pos(CU_FORM_BORDER, 800);
|
||||
txt->set_size(1200, 200);
|
||||
header.add(txt);
|
||||
}
|
||||
@ -629,8 +638,13 @@ void TCU_report::create_B()
|
||||
end_paragraph(header);
|
||||
|
||||
begin_paragraph(header, CU_AFTER_LAST, 3, "FIRMA DELLA COMUNICAZIONE");
|
||||
add_labeled_number(header, 0, 4, 5, "#23", "Numero certificazioni\nlavoro dipendente ed assimilati", 'C');
|
||||
add_labeled_number(header, 0, 15, 5, "#24", "Numero certificazioni\nlavoro autonomo e provvigioni", 'C');
|
||||
|
||||
// 2015
|
||||
// add_labeled_number(header, 0, 4, 5, "#23", "Numero certificazioni\nlavoro dipendente ed assimilati", 'C');
|
||||
// add_labeled_number(header, 0, 14, 5, "#24", "Numero certificazioni\nlavoro autonomo e provvigioni", 'C');
|
||||
// 2016
|
||||
add_labeled_number(header, 0, 4, 5, "#24", "Numero certificazioni", 'C');
|
||||
|
||||
add_labeled_field (header, 0, 25, 3, "#25", "Quadro CT", 'C');
|
||||
add_prompted_field(header, 0, CU_ALIGN_RIGHT, 24, "", "FIRMA");
|
||||
end_paragraph(header);
|
||||
@ -678,7 +692,7 @@ void TCU_report::create_D()
|
||||
txt->set_font(fnt_big);
|
||||
body.add(txt);
|
||||
|
||||
add_boxed_field(body, 8, 68, 4, "2014", "");
|
||||
add_boxed_field(body, 8, 68, 4, "2015", "");
|
||||
|
||||
add_band(body, 12, 35);
|
||||
|
||||
@ -731,7 +745,13 @@ void TCU_report::create_D()
|
||||
add_labeled_field(body, 0, 0, 16, "#DA002040", "Codice di identificazione fiscale estero");
|
||||
add_labeled_field(body, 0, CU_AFTER_LAST, CU_ALIGN_RIGHT, "#DA002041", "Località di residenza estera");
|
||||
add_labeled_field(body, 1, 0, 50, "#DA002042", "Via e numero civico");
|
||||
add_labeled_field(body, 1, CU_ALIGN_RIGHT, 5, "#DA002043", "Codice Stato estero", 'C');
|
||||
|
||||
// 2015
|
||||
//add_labeled_field(body, 1, CU_ALIGN_RIGHT, 5, "#DA002043", "Codice Stato estero", 'C');
|
||||
// 2016
|
||||
add_labeled_field(body, 1, CU_AFTER_LAST, 5, "#DA002043", "Non residenti\nShumacker", 'C');
|
||||
add_labeled_field(body, 1, CU_ALIGN_RIGHT, 5, "#DA002044", "Codice Stato estero", 'C');
|
||||
|
||||
end_paragraph(body);
|
||||
begin_paragraph(body, CU_AFTER_LAST, 3, "");
|
||||
add_gridded_field(body, 0, 0, 10, "#DA003001", "DATA");
|
||||
@ -746,32 +766,32 @@ void TCU_report::create_H()
|
||||
body.force_page_break(true);
|
||||
_row_offset = 0;
|
||||
|
||||
add_prompt (body, 4, 0, 14, "Codice fiscale del percipiente");
|
||||
add_boxed_field(body, 4,CU_AFTER_LAST, 16, "#4", "", 0x1);
|
||||
add_prompt (body, 2, 0, 14, "Codice fiscale del percipiente");
|
||||
add_boxed_field(body, 2,CU_AFTER_LAST, 16, "#4", "", 0x1);
|
||||
|
||||
add_boxed_field(body, 4, 74, 2, "#3", "", 0x3);
|
||||
add_prompt(body, 4, CU_BEFORE_LAST, -1, "Mod. N.");
|
||||
add_boxed_field(body, 2, 74, 2, "#3", "", 0x3);
|
||||
add_prompt(body, 2, CU_BEFORE_LAST, -1, "Mod. N.");
|
||||
|
||||
const TReport_font& fnt_big = best_font(_fnt_prg.name(), 3*_fnt_prg.size()/2, _fnt_prg.style());
|
||||
TReport_field* title = new TReport_field(&body);
|
||||
title->set_pos(CU_FORM_BORDER+CU_HEAD_WIDTH, 700);
|
||||
title->set_pos(CU_FORM_BORDER+CU_HEAD_WIDTH, 300);
|
||||
title->set_size(CU_FORM_WIDTH-CU_HEAD_WIDTH, 200);
|
||||
title->set_horizontal_alignment('C');
|
||||
title->set_vertical_alignment('C');
|
||||
title->set_picture("CERTIFICAZIONE LAVORO AUTONOMO,\nPROVVIGIONI E REDDITI DIVERSI");
|
||||
title->set_picture("CERTIFICAZIONE LAVORO AUTONOMO, PROVVIGIONI E REDDITI DIVERSI");
|
||||
title->set_font(fnt_big);
|
||||
body.add(title);
|
||||
add_band(body, 10, 25);
|
||||
add_band(body, 5, _syntetic ? 44: 58);
|
||||
|
||||
const int tab0 = 2, tab1 = 6, tab2 = 27, tab3 = CU_ALIGN_RIGHT;
|
||||
|
||||
begin_paragraph(body, 10, 4, "DATI RELATIVI ALLE SOMME EROGATE\nTIPOLOGIA REDDITUALE", 0x3);
|
||||
begin_paragraph(body, 5, 3, "DATI RELATIVI ALLE SOMME EROGATE\nTIPOLOGIA REDDITUALE", 0x3);
|
||||
add_labeled_field(body, 0, tab0, 2, "#AU001001", "Causale");
|
||||
end_paragraph(body);
|
||||
|
||||
begin_paragraph(body, -1, 21, "DATI FISCALI");
|
||||
begin_paragraph(body, -1, 18, "DATI FISCALI");
|
||||
add_labeled_number(body, 0, tab1-1, 4, "#AU001002", "Anno", 'C');
|
||||
add_labeled_field (body, 0, CU_AFTER_LAST, 2, "#AU001003", "Anticipazione", 'C');
|
||||
add_labeled_bool (body, 0, CU_AFTER_LAST, 2, "#AU001003", "Anticipazione");
|
||||
add_labeled_number(body, 0, tab2, CU_EURO_LEN, "#AU001004", "Ammontare lordo corrisposto", 'C');
|
||||
add_labeled_number(body, 0, tab3, CU_EURO_LEN, "#AU001005", "Somme non soggette a ritenuta\nper regime convenzionale", 'C');
|
||||
|
||||
@ -793,16 +813,88 @@ void TCU_report::create_H()
|
||||
add_labeled_number(body, 4, tab3, CU_EURO_LEN, "#AU001018", "Imponibile anni precedenti", 'C');
|
||||
|
||||
add_labeled_number(body, 5, tab1, CU_EURO_LEN, "#AU001019", "Ritenute operate anni precedenti", 'C');
|
||||
add_labeled_number(body, 5, tab2, CU_EURO_LEN, "#AU001020", "Contributi previdenziali\na carico del soggetto erogante", 'C');
|
||||
add_labeled_number(body, 5, tab3, CU_EURO_LEN, "#AU001021", "Contributi previdenziali\na carico del percipiente", 'C');
|
||||
add_labeled_number(body, 5, tab2, CU_EURO_LEN, "#AU001020", "Spese rimborsate", 'C');
|
||||
add_labeled_number(body, 5, tab3, CU_EURO_LEN, "#AU001021", "Ritenute rimborsate", 'C');
|
||||
end_paragraph(body);
|
||||
|
||||
add_labeled_number(body, 6, tab1, CU_EURO_LEN, "#AU001022", "Spese rimborsate", 'C');
|
||||
add_labeled_number(body, 6, tab2, CU_EURO_LEN, "#AU001023", "Ritenute rimborsate", 'C');
|
||||
// 2016
|
||||
begin_paragraph(body, -1, 12, "DATI PREVIDENZIALI");
|
||||
add_labeled_field (body, 0, tab1, CU_EURO_LEN, "#AU001029", "Codice fiscale Ente previdenziale", 'C');
|
||||
add_labeled_field (body, 0, tab2, 38, "#AU001030", "Denominazione Ente previdenziale", 'C');
|
||||
add_labeled_field (body, 1, tab1, CU_EURO_LEN/2, "#AU001031", "Codice\nEnte previdenziale", 'C');
|
||||
add_labeled_field (body, 1, tab2, CU_EURO_LEN, "#AU001032", "Codice azienda", 'C');
|
||||
add_labeled_field (body, 1, tab3, CU_EURO_LEN/2, "#AU001033", "Categoria", 'C');
|
||||
add_labeled_number(body, 2, tab1, CU_EURO_LEN, "#AU001034", "Contributi previdenziali\na carico del soggetto erogante", 'C');
|
||||
add_labeled_number(body, 2, tab2, CU_EURO_LEN, "#AU001035", "Contributi previdenziali\na carico del percipiente", 'C');
|
||||
add_labeled_bool (body, 2, tab3, CU_EURO_LEN/4, "#AU001036", "Altri contributi");
|
||||
add_labeled_number(body, 3, tab1, CU_EURO_LEN, "#AU001037", "Importo altri contributi", 'C');
|
||||
add_labeled_number(body, 3, tab2, CU_EURO_LEN, "#AU001038", "Contributi dovuti", 'C');
|
||||
add_labeled_number(body, 3, tab3, CU_EURO_LEN, "#AU001039", "Contributi versati", 'C');
|
||||
end_paragraph(body);
|
||||
|
||||
if (!_syntetic)
|
||||
{
|
||||
begin_paragraph(body, -1, 3, "FALLIMENTO E LIQUIDAZIONE COATTA AMMINISTRATIVA");
|
||||
add_labeled_number(body, 0, tab1, CU_EURO_LEN, "#AU001041", "Somme corrisposte prima della data del fallimento");
|
||||
add_labeled_number(body, 0, tab2, CU_EURO_LEN, "#AU001042", "Somme corrisposte dal curatore/commissario");
|
||||
end_paragraph(body);
|
||||
|
||||
begin_paragraph(body, -1, 8, "REDDITI EROGATI DA ALTRI SOGGETTI");
|
||||
_row_height = 200; // Override AFTER begin_paragraph
|
||||
add_labeled_field (body, 0, tab2, CU_EURO_LEN, "#AU001052", "Codice fiscale", 'C');
|
||||
add_labeled_number(body, 0, tab3, CU_EURO_LEN, "#AU001053", "Imponibile", 'C');
|
||||
add_labeled_number(body, 1, tab1, CU_EURO_LEN, "#AU001054", "Ritenute a titolo di acconto", 'C');
|
||||
add_labeled_number(body, 1, tab2, CU_EURO_LEN, "#AU001055", "Ritenute a titolo d'imposta", 'C');
|
||||
add_labeled_number(body, 1, tab3, CU_EURO_LEN, "#AU001056", "Ritenute sospese", 'C');
|
||||
add_labeled_number(body, 2, tab1, CU_EURO_LEN, "#AU001057", "Addizionale regionale a titolo d'acconto", 'C');
|
||||
add_labeled_number(body, 2, tab2, CU_EURO_LEN, "#AU001058", "Addizionale regionale a titolo d'imposta", 'C');
|
||||
add_labeled_number(body, 2, tab3, CU_EURO_LEN, "#AU001059", "Addizionale regionale sospesa", 'C');
|
||||
add_labeled_number(body, 3, tab1, CU_EURO_LEN, "#AU001060", "Addizionale comunale a titolo d'acconto", 'C');
|
||||
add_labeled_number(body, 3, tab2, CU_EURO_LEN, "#AU001061", "Addizionale comunale a titolo d'imposta", 'C');
|
||||
add_labeled_number(body, 3, tab3, CU_EURO_LEN, "#AU001062", "Addizionale comunale sospesa", 'C');
|
||||
end_paragraph(body);
|
||||
|
||||
begin_paragraph(body, -1, 3, "Casi particolari Operazioni starordinarie");
|
||||
add_labeled_field (body, 0, tab1, CU_EURO_LEN, "#AU001071", "Codice fiscale\n(sezione lavoro autonome e redditi diversi)", 'C');
|
||||
add_labeled_field (body, 0, tab2, CU_EURO_LEN, "#AU001072", "Codice fiscale\n(sezione pignoramento presso terzi)", 'C');
|
||||
add_labeled_field (body, 0, tab3, CU_EURO_LEN, "#AU001073", "Codice fiscale\n(sezione indennità di esproprio)", 'C');
|
||||
end_paragraph(body);
|
||||
} // ordinario
|
||||
|
||||
begin_paragraph(body, -1, 5, "Somme liquidate a seguito di pignoramento presso terzi");
|
||||
_row_height = 300;
|
||||
add_labeled_field (body, 0, tab1, CU_EURO_LEN, "#AU001101", "Codice fiscale del debitore principale", 'C');
|
||||
add_labeled_number(body, 0, tab2, CU_EURO_LEN-4, "#AU001102", "Somme erogate", 'C');
|
||||
add_labeled_bool (body, 0, CU_ALIGN_RIGHT, 2, "#AU001104", "Ritenute non operate");
|
||||
add_labeled_number(body, 0, CU_BEFORE_LAST, CU_EURO_LEN-4, "#AU001103", "Ritenute operate", 'C');
|
||||
_row_offset -= 100;
|
||||
add_labeled_field (body, 1, tab1, CU_EURO_LEN, "#AU001105", "", 'C');
|
||||
add_labeled_number(body, 1, tab2, CU_EURO_LEN-4, "#AU001106", "", 'C');
|
||||
add_labeled_bool (body, 1, CU_ALIGN_RIGHT, 2, "#AU001108", "");
|
||||
add_labeled_number(body, 1, CU_BEFORE_LAST, CU_EURO_LEN-4, "#AU001107", "", 'C');
|
||||
end_paragraph(body);
|
||||
|
||||
begin_paragraph(body, -1, 6, "Somme corrisposte a titolo di indennità di esproprio, altre indennità e interessi");
|
||||
_row_height = 200; // Override AFTER begin_paragraph
|
||||
_row_offset -= 100;
|
||||
add_prompt(body, 0, tab1, 30, "INDENNITA' DI ESPROPRIO E DI RISARCIMENTO DEL DANNO");
|
||||
add_prompt(body, 0, 48, 20, "ALTRE INDENNITA' E INTERESSI");
|
||||
add_labeled_number(body, 1, tab1, CU_EURO_LEN-4, "#AU001131", "Somme corrisposte", 'C');
|
||||
add_labeled_number(body, 1, CU_AFTER_LAST, CU_EURO_LEN-6, "#AU001132", "Ritenute operate", 'C');
|
||||
add_labeled_number(body, 1, CU_ALIGN_RIGHT, CU_EURO_LEN-6, "#AU001134", "Ritenute operate", 'C');
|
||||
add_labeled_number(body, 1, CU_BEFORE_LAST, CU_EURO_LEN-4, "#AU001133", "Somme corrisposte", 'C');
|
||||
add_short_break(body, _row_offset/100+4);
|
||||
_row_offset -= 100;
|
||||
add_prompt(body, 2, tab1, 30, "INDENNITA' DI ESPROPRIO E DI RISARCIMENTO DEL DANNO");
|
||||
add_prompt(body, 2, 48, 20, "ALTRE INDENNITA' E INTERESSI");
|
||||
add_labeled_number(body, 3, tab1, CU_EURO_LEN-4, "#AU001135", "Somme corrisposte", 'C');
|
||||
add_labeled_number(body, 3, CU_AFTER_LAST, CU_EURO_LEN-6, "#AU001136", "Ritenute operate", 'C');
|
||||
add_labeled_number(body, 3, CU_ALIGN_RIGHT, CU_EURO_LEN-6, "#AU001138", "Ritenute operate", 'C');
|
||||
add_labeled_number(body, 3, CU_BEFORE_LAST, CU_EURO_LEN-4, "#AU001137", "Somme corrisposte", 'C');
|
||||
end_paragraph(body);
|
||||
}
|
||||
|
||||
|
||||
TCU_report::TCU_report(int quality) : _quality(quality)
|
||||
TCU_report::TCU_report(int quality, bool syntetic) : _quality(quality), _syntetic(syntetic)
|
||||
{
|
||||
set_lpi(6);
|
||||
set_cpi(10);
|
||||
@ -813,14 +905,15 @@ TCU_report::TCU_report(int quality) : _quality(quality)
|
||||
_fnt_prg.create(_fnt_lbl.name(), _fnt_rep.size()/2+1, XVT_FS_BOLD);
|
||||
_fnt_prm.create(_fnt_lbl.name(), 2*_fnt_rep.size()/3, 0);
|
||||
|
||||
create_B();
|
||||
if (!_syntetic)
|
||||
create_B();
|
||||
create_D();
|
||||
create_H();
|
||||
}
|
||||
|
||||
void print_cu(const TFilename& datafile, int quality)
|
||||
void print_cu(const TFilename& datafile, int quality, bool syntetic)
|
||||
{
|
||||
TCU_report cur(quality);
|
||||
TCU_report cur(quality, syntetic);
|
||||
cur.set_recordset(new TTrasferimentoCU(datafile, 'r'));
|
||||
cur.preview();
|
||||
xvtil_statbar_set(NULL);
|
||||
|
@ -8,6 +8,7 @@ class TCU_editor : public TAutomask
|
||||
{
|
||||
TTrasferimentoCU* _recset;
|
||||
int _quality;
|
||||
bool _simplyfied;
|
||||
|
||||
TBit_array _dirty_row;
|
||||
bool _dirty_file;
|
||||
@ -22,7 +23,7 @@ protected:
|
||||
|
||||
public:
|
||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
TCU_editor(const TFilename& fn, int quality);
|
||||
TCU_editor(const TFilename& fn, int quality, bool simple);
|
||||
~TCU_editor() { delete _recset; }
|
||||
};
|
||||
|
||||
@ -103,12 +104,12 @@ void TCU_editor::save_page()
|
||||
FOR_EACH_SHEET_ROW(sheet, r, row) if (_dirty_row[r])
|
||||
{
|
||||
code = row->get(0);
|
||||
TVariant var = row->get(2);
|
||||
const bool positional = real::is_natural(code);
|
||||
if (positional)
|
||||
{
|
||||
TVariant var = row->get(2);
|
||||
_recset->set_field(atoi(code), var);
|
||||
}
|
||||
else
|
||||
_recset->set_field(code, var);
|
||||
}
|
||||
_dirty_row.reset();
|
||||
}
|
||||
@ -199,6 +200,8 @@ bool TCU_editor::find_text()
|
||||
|
||||
bool TCU_editor::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
static char _code[16];
|
||||
|
||||
switch (o.dlg())
|
||||
{
|
||||
case DLG_FIRSTREC: if (e == fe_button && save_page_if_dirty() && _recset->move_first()) load(); return false;
|
||||
@ -209,7 +212,7 @@ bool TCU_editor::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
const TFilename fn = _recset->query_text();
|
||||
if (fn.exist())
|
||||
print_cu(fn, _quality);
|
||||
print_cu(fn, _quality, _simplyfied);
|
||||
}
|
||||
return false;
|
||||
case DLG_SAVEREC:
|
||||
@ -261,6 +264,29 @@ bool TCU_editor::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
return ((TSheet_field&)o).row_enabled(jolly);
|
||||
case se_query_del :
|
||||
return false;
|
||||
case se_query_add:
|
||||
if (jolly > 0)
|
||||
{
|
||||
TSheet_field& s = ((TSheet_field&)o);
|
||||
if (s.row(jolly-1).get_char(0) >= 'A')
|
||||
{
|
||||
xvt_dm_post_string_prompt(TR("Codice campo"), _code, 9);
|
||||
if (strlen(_code) == 8)
|
||||
return true;
|
||||
else
|
||||
error_box("Codice non valido");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
case se_notify_add:
|
||||
if (strlen(_code) == 8)
|
||||
{
|
||||
TSheet_field& s = ((TSheet_field&)o);
|
||||
TToken_string& r = s.row(jolly);
|
||||
r = _code; r.upper(); r.add("AN");
|
||||
_code[0] = '\0';
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
break;
|
||||
@ -269,18 +295,18 @@ bool TCU_editor::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
return true;
|
||||
}
|
||||
|
||||
TCU_editor::TCU_editor(const TFilename& fn, int quality) : TAutomask("777200b"), _quality(quality)
|
||||
TCU_editor::TCU_editor(const TFilename& fn, int quality, bool simple) : TAutomask("777200b"), _quality(quality), _simplyfied(simple)
|
||||
{
|
||||
_recset = new TTrasferimentoCU(fn, 'r');
|
||||
_recset->move_first();
|
||||
enable(DLG_SAVEREC, _dirty_file = false);
|
||||
}
|
||||
|
||||
void edit_cu(const TFilename& datafile, int quality)
|
||||
void edit_cu(const TFilename& datafile, int quality, bool simple)
|
||||
{
|
||||
if (datafile.exist())
|
||||
{
|
||||
TCU_editor m(datafile, quality);
|
||||
TCU_editor m(datafile, quality, simple);
|
||||
m.run();
|
||||
xvtil_statbar_set(NULL);
|
||||
}
|
||||
|
@ -569,6 +569,7 @@ bool TRecord770::np_put(const char* code, bool cb)
|
||||
bool TRecord770::np_get(int pos, TString& key, TString& val) const
|
||||
{
|
||||
CHECK(ha_campi_non_posizionali(), "Impossibile leggere campi non posizionali");
|
||||
|
||||
const int n = HEADER_SIZE + pos * BLOCK_SIZE;
|
||||
bool ok = false;
|
||||
if (n < HEADER_SIZE + USEABLE_SIZE)
|
||||
@ -578,6 +579,11 @@ bool TRecord770::np_get(int pos, TString& key, TString& val) const
|
||||
{
|
||||
key = _buffer.mid(n, CODE_SIZE);
|
||||
val = _buffer.mid(n+CODE_SIZE, FIELD_SIZE);
|
||||
#ifdef DBG
|
||||
if (key == "AU001036")
|
||||
int cazzone = atoi(val);
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
|
@ -8,8 +8,10 @@ Item_02 = "Gestione percipienti", "776mod -0", ""
|
||||
Item_03 = "Tabella causali", "773mod -3 %ca7", ""
|
||||
Item_04 = "Azzeramento archivi", "774 -2 T", ""
|
||||
Item_05 = "Parametri di studio", "773mod -0", ""
|
||||
Item_06 = "Certificazione Unica", "777 -1", ""
|
||||
Item_07 = "Stampe",[77MENU_002]
|
||||
Item_06 = "Enti previdenziali", "770 -3 %ENT", ""
|
||||
Item_07 = "Dati previdenziali", "770 -2", ""
|
||||
Item_08 = "Certificazione Unica", "777 -1", ""
|
||||
Item_09 = "Stampe",[77MENU_002]
|
||||
|
||||
[77MENU_002]
|
||||
Caption = "Stampe"
|
||||
|
@ -29,6 +29,7 @@
|
||||
#define TCF_CAUSE_DESCR 128
|
||||
#define TCF_CAUSE1_DESCR 129
|
||||
#define F_IC_DESCR 130
|
||||
#define F_ALTRENONSOGG 131
|
||||
|
||||
#define INPS_GROUP 7
|
||||
#define GR_CAUDD1 8
|
||||
|
@ -324,9 +324,22 @@ BEGIN
|
||||
WARNING "Percentuale della ritenuta d'acconto non valida"
|
||||
END
|
||||
|
||||
NUMBER F_ALTRENONSOGG 1
|
||||
BEGIN
|
||||
PROMPT 1 15 "Codice per somme non soggette a ritenuta "
|
||||
SHEET "Codice|Descrizione@450"
|
||||
INPUT F_IC
|
||||
ITEM " | "
|
||||
ITEM "1|somme che non hanno concorso a formare il reddito imponibile (90% dell’ammontare erogato), relativo ai compensi percepiti dai docenti e dai ricercatori in base a quanto stabilito dal D.L. 29 novembre 2008, n. 185 convertito, con modificazioni dalla L. n. 2 del 28 gennaio 2009. Vanno altresì inseriti i relativi rimborsi spese"
|
||||
ITEM "2|somme che non hanno concorso a formare il reddito imponibile (rispettivamente l’80% dell’ammontare erogato per le lavoratrici ed il 70% per i lavoratori) per i lavoratori appartenenti alle categorie individuate con Decreto del Ministro dell’Economia e delle Finanze del 3 giugno 2011 in possesso dei requisiti previsti e che hanno richiesto di fruire del beneficio fiscale previsto dall’art. 3 della L. 30 dicembre 2010, n. 238"
|
||||
ITEM "3|erogazione di altri redditi non soggetti a ritenuta ovvero esenti"
|
||||
OUTPUT F_ALTRENONSOGG
|
||||
FIELD I1
|
||||
END
|
||||
|
||||
STRING F_IC 1
|
||||
BEGIN
|
||||
PROMPT 1 15 "T.S. "
|
||||
PROMPT 1 16 "T.S. "
|
||||
SHEET "Codice|Descrizione@60"
|
||||
INPUT F_IC
|
||||
ITEM " | "
|
||||
@ -345,19 +358,19 @@ END
|
||||
|
||||
STRING F_IC_DESCR 60
|
||||
BEGIN
|
||||
PROMPT 10 15 ""
|
||||
PROMPT 10 16 ""
|
||||
FLAGS "D"
|
||||
GROUP G_ICTS
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 77 4
|
||||
BEGIN
|
||||
PROMPT 0 17 "Contributo INPS"
|
||||
PROMPT 0 18 "Contributo INPS"
|
||||
END
|
||||
|
||||
BOOLEAN TCF_BINPS
|
||||
BEGIN
|
||||
PROMPT 1 18 "Contributo INPS "
|
||||
PROMPT 1 19 "Contributo INPS "
|
||||
FIELD LF_TABCOM->B4
|
||||
MESSAGE TRUE ENABLE,INPS_GROUP@
|
||||
MESSAGE FALSE DISABLE,INPS_GROUP@|RESET,INPS_GROUP@
|
||||
@ -365,7 +378,7 @@ END
|
||||
|
||||
NUMBER TCF_PERCINPS 6 2
|
||||
BEGIN
|
||||
PROMPT 30 18 "Percentuale "
|
||||
PROMPT 30 19 "Percentuale "
|
||||
PICTURE ".2"
|
||||
FIELD R1
|
||||
NUM_EXPR {(#THIS>0) && (#THIS<=100)}
|
||||
@ -377,7 +390,7 @@ END
|
||||
|
||||
NUMBER TCF_ASSIMPINPS 6 2
|
||||
BEGIN
|
||||
PROMPT 1 19 "Percentuale ass.imp. "
|
||||
PROMPT 1 20 "Percentuale ass.imp. "
|
||||
PICTURE ".2"
|
||||
FIELD R2
|
||||
NUM_EXPR {(#THIS>0) && (#THIS<=100)}
|
||||
@ -389,7 +402,7 @@ END
|
||||
|
||||
NUMBER TCF_COMMINPS 6
|
||||
BEGIN
|
||||
PROMPT 30 19 "Quota a carico del committente "
|
||||
PROMPT 30 20 "Quota a carico del committente "
|
||||
PICTURE ".2"
|
||||
FIELD R3
|
||||
NUM_EXPR {(#THIS>=0) && (#THIS<=100)}
|
||||
|
@ -1,4 +1,7 @@
|
||||
// batb%ent.h
|
||||
|
||||
#define F_CODENTE 101
|
||||
#define F_DESCR 102
|
||||
#define F_CODENTE 201
|
||||
#define F_DESCR 202
|
||||
#define F_COCU 203
|
||||
#define F_COFI 204
|
||||
#define F_CODICI 301
|
||||
|
@ -4,33 +4,101 @@ TOOLBAR "" 0 0 0 2
|
||||
#include <relapbar.h>
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Tabella enti previdenziali" 0 2 0 0
|
||||
PAGE "Enti previdenziali" 0 2 0 0
|
||||
|
||||
NUMBER F_CODENTE 2
|
||||
STRING F_CODENTE 8
|
||||
BEGIN
|
||||
PROMPT 4 1 "Codice Ente "
|
||||
FIELD LF_TABCOM->CODTAB
|
||||
HELP "Inserire il codice dell' ente"
|
||||
PROMPT 4 1 "Codice Ente "
|
||||
FIELD CODTAB
|
||||
HELP "Inserire il codice dell'Ente"
|
||||
USE %ENT
|
||||
CHECKTYPE REQUIRED
|
||||
INPUT CODTAB F_CODENTE
|
||||
DISPLAY "Cod.Ente" CODTAB
|
||||
DISPLAY "Denominazione@60 " S0
|
||||
DISPLAY "Denominazione@60" S0
|
||||
OUTPUT F_CODENTE CODTAB
|
||||
OUTPUT F_DESCR S0
|
||||
KEY 1
|
||||
FLAGS "RZ"
|
||||
FLAGS "U"
|
||||
END
|
||||
|
||||
STRING F_DESCR 60
|
||||
BEGIN
|
||||
PROMPT 4 3 "Denominazione "
|
||||
FIELD LF_TABCOM->S0
|
||||
HELP "Inserire la descrizione dell' Ente"
|
||||
PROMPT 4 2 "Denominazione "
|
||||
FIELD S0
|
||||
HELP "Inserire la descrizione dell'Ente"
|
||||
WARNING "Manca la denominazione"
|
||||
CHECKTYPE REQUIRED
|
||||
KEY 2
|
||||
END
|
||||
|
||||
STRING F_COCU 1
|
||||
BEGIN
|
||||
PROMPT 4 4 "Codice C.U. "
|
||||
FIELS S6
|
||||
CHECKTYPE REQUIRED
|
||||
FLAGS "U"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 24 4 "2=ENPAM; 4=ENPAPI; A=Altro"
|
||||
END
|
||||
|
||||
STRING F_COFI 16
|
||||
BEGIN
|
||||
PROMPT 4 5 "Codice Fiscale "
|
||||
FIELS S5
|
||||
FLAGS "U"
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
SPREADSHEET F_CODICI 80 -1
|
||||
BEGIN
|
||||
PROMPT 1 7 ""
|
||||
ITEM "Ditta"
|
||||
ITEM "Ragione Sociale@50"
|
||||
ITEM "Codice previdenziale@16"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
PAGE "Dati" -1 -1 60 5
|
||||
|
||||
NUMBER 101 5
|
||||
BEGIN
|
||||
PROMPT 1 1 "Ditta "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING 102 50
|
||||
BEGIN
|
||||
PROMPT 7 2 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING 103 16
|
||||
BEGIN
|
||||
PROMPT 1 3 "Codice presso ente previdenziale "
|
||||
FLAGS "U"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
TOOLBAR "" 0 0 0 0
|
||||
|
||||
BUTTON DLG_OK 2 2
|
||||
BEGIN
|
||||
PROMPT 1 1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 2 2
|
||||
BEGIN
|
||||
PROMPT 2 1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
@ -1,3 +1,3 @@
|
||||
144
|
||||
1
|
||||
m770/quadrola|0|0|248|0|Quadro LA 770|||
|
||||
m770/quadrola|0|0|312|0|Quadro LA 770|||
|
||||
|
@ -1,5 +1,5 @@
|
||||
144
|
||||
22
|
||||
27
|
||||
CODDITTA|3|5|0|Codice ditta
|
||||
TIPOA|1|1|0|Tipo anagrafica (Sempre 'F')
|
||||
CODANAGR|3|5|0|Codice anagrafica
|
||||
@ -21,6 +21,11 @@ RITANNIPRE|4|18|3|Ritenute anni precedenti
|
||||
SOMREGCONV|4|18|3|Somme non soggette a ritenuta per reg. conv.
|
||||
CTINPSEROG|4|18|3|Contribuiti previdenziali a carico dell'erogante
|
||||
CTINPSPERC|4|18|3|Contribuiti previdenziali a carico del percipiente
|
||||
ENTEPREV|1|8|0|Ente previdenziale
|
||||
CATEGORIA|1|2|0|Categoria previdenziale
|
||||
ALTRICONTR|4|18|3|Altri contributi
|
||||
CONTRDOV|4|18|3|Contributi dovuti
|
||||
CONTRVER|4|18|3|Contributi versati
|
||||
GENERATA|8|1|0|Riga generata dalle schede
|
||||
1
|
||||
CODDITTA+TIPOA+CODANAGR+NPROG|
|
||||
|
@ -1,3 +1,3 @@
|
||||
38
|
||||
1
|
||||
m770/perc|0|0|30|4|Dati percipienti|#6||
|
||||
m770/perc|0|0|40|4|Dati percipienti|#6||
|
||||
|
@ -1,8 +1,10 @@
|
||||
38
|
||||
4
|
||||
6
|
||||
CODDITTA|3|5|0|
|
||||
TIPOA|1|1|0|
|
||||
CODANAGR|3|5|0|
|
||||
FATTBIL|4|18|2|
|
||||
ENTEPREV|1|8|0|
|
||||
CATEGORIA|1|2|0|
|
||||
1
|
||||
CODDITTA+TIPOA+CODANAGR|
|
||||
|
Loading…
x
Reference in New Issue
Block a user