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
@ -8,6 +8,8 @@ int main(int argc,char** argv)
|
|||||||
switch(n)
|
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;
|
default: SchedaPerc(argc,argv); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
14
m770/770.h
14
m770/770.h
@ -1,19 +1,9 @@
|
|||||||
#ifndef __770_H
|
#ifndef __770_H
|
||||||
#define __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 SchedaPerc(int argc, char* argv[]);
|
||||||
int collega_vers_rit(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
|
#endif // __770_H
|
||||||
|
@ -2162,7 +2162,8 @@ Pag_struct& TSchedaPercipienti::calcola_riga_pag(Pag_struct& s,
|
|||||||
// calcolo imponibile
|
// calcolo imponibile
|
||||||
c.imponibile = (s.compenso - s.impcpa) * h_PercAssImp / CENTO;
|
c.imponibile = (s.compenso - s.impcpa) * h_PercAssImp / CENTO;
|
||||||
c.imponibile.round(fdec);
|
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;
|
s.imponibile = c.imponibile;
|
||||||
|
|
||||||
// percentuale ritenuta acconto
|
// percentuale ritenuta acconto
|
||||||
|
@ -137,6 +137,7 @@ END
|
|||||||
STRING F_COFI 16
|
STRING F_COFI 16
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 9 "Codice Fiscale"
|
PROMPT 2 9 "Codice Fiscale"
|
||||||
|
FLAGS "U"
|
||||||
USE LF_ANAG KEY 3 SELECT LF_PERC->CODDITTA==#F_CODDITTA
|
USE LF_ANAG KEY 3 SELECT LF_PERC->CODDITTA==#F_CODDITTA
|
||||||
JOIN LF_PERC INTO CODDITTA=#F_CODDITTA TIPOA=TIPOA CODANAGR==CODANAGR
|
JOIN LF_PERC INTO CODDITTA=#F_CODDITTA TIPOA=TIPOA CODANAGR==CODANAGR
|
||||||
INPUT TIPOA F_TIPOA SELECT
|
INPUT TIPOA F_TIPOA SELECT
|
||||||
@ -186,6 +187,7 @@ BEGIN
|
|||||||
DISPLAY "Numero@7" NPROG
|
DISPLAY "Numero@7" NPROG
|
||||||
DISPLAY "Data\nDocumento@10" DATADOC
|
DISPLAY "Data\nDocumento@10" DATADOC
|
||||||
DISPLAY "Numero\nDocumento@8" NUMDOC
|
DISPLAY "Numero\nDocumento@8" NUMDOC
|
||||||
|
DISPLAY "Causale" CODCAUS
|
||||||
DISPLAY "Quadro" %CA7->S1
|
DISPLAY "Quadro" %CA7->S1
|
||||||
DISPLAY "Causale\nQuadro@6" CAUSQUA
|
DISPLAY "Causale\nQuadro@6" CAUSQUA
|
||||||
DISPLAY "Ritenute\noperate@15V" RITOPE
|
DISPLAY "Ritenute\noperate@15V" RITOPE
|
||||||
|
@ -61,7 +61,7 @@ void TSchedaPercipienti::init_mask(TMask& m, bool inserimento)
|
|||||||
from_sheet_to_struct(t, s);
|
from_sheet_to_struct(t, s);
|
||||||
calcola_riga_pag(s,
|
calcola_riga_pag(s,
|
||||||
c,
|
c,
|
||||||
TRUE,
|
true,
|
||||||
h_PercAssImp,
|
h_PercAssImp,
|
||||||
h_PercCassaPrev,
|
h_PercCassaPrev,
|
||||||
h_PercRitenuta,
|
h_PercRitenuta,
|
||||||
@ -192,18 +192,16 @@ bool TSchedaPercipienti::my_empty_items(TToken_string& r, bool vers)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// controlla se riga pagamento significativa
|
// controlla se riga pagamento significativa
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rr = r.get(token_pos("DATAPAG"));
|
rr = r.get(token_pos("DATAPAG"));
|
||||||
rr.trim();
|
rr.trim();
|
||||||
if (rr.not_empty())
|
if (rr.not_empty())
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TSchedaPercipienti::pag_pack()
|
void TSchedaPercipienti::pag_pack()
|
||||||
@ -214,8 +212,8 @@ void TSchedaPercipienti::pag_pack()
|
|||||||
for (int i = 0; i < max; i++)
|
for (int i = 0; i < max; i++)
|
||||||
{
|
{
|
||||||
TToken_string& r = (TToken_string&)rows[i];
|
TToken_string& r = (TToken_string&)rows[i];
|
||||||
if (my_empty_items(r, FALSE)) // Remove all empty strings
|
if (my_empty_items(r, false)) // Remove all empty strings
|
||||||
rows.destroy(i, FALSE);
|
rows.destroy(i, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
rows.pack();
|
rows.pack();
|
||||||
@ -224,13 +222,12 @@ void TSchedaPercipienti::pag_pack()
|
|||||||
void TSchedaPercipienti::ver_pack()
|
void TSchedaPercipienti::ver_pack()
|
||||||
{
|
{
|
||||||
TString_array& rows = vers().rows_array();
|
TString_array& rows = vers().rows_array();
|
||||||
|
|
||||||
const int max = rows.items();
|
const int max = rows.items();
|
||||||
for (int i = 0; i < max; i++)
|
for (int i = 0; i < max; i++)
|
||||||
{
|
{
|
||||||
TToken_string& r = (TToken_string&)rows[i];
|
TToken_string& r = (TToken_string&)rows[i];
|
||||||
if (my_empty_items(r, TRUE)) // Remove all empty strings
|
if (my_empty_items(r, true)) // Remove all empty strings
|
||||||
rows.destroy(i, FALSE);
|
rows.destroy(i, false);
|
||||||
}
|
}
|
||||||
rows.pack();
|
rows.pack();
|
||||||
}
|
}
|
||||||
@ -245,7 +242,6 @@ void TSchedaPercipienti::load_pag_sheet(const long numvers)
|
|||||||
TSheet_field& pag = pags();
|
TSheet_field& pag = pags();
|
||||||
_pags->destroy();
|
_pags->destroy();
|
||||||
|
|
||||||
|
|
||||||
// numero di riga dell'array-sheet. Viene incrementato
|
// numero di riga dell'array-sheet. Viene incrementato
|
||||||
// solo quando si trovano pagamenti 'giusti' (cioe' solo
|
// solo quando si trovano pagamenti 'giusti' (cioe' solo
|
||||||
// quando si aggiungono elementi all'array-sheet)
|
// quando si aggiungono elementi all'array-sheet)
|
||||||
@ -295,7 +291,7 @@ void TSchedaPercipienti::load_pag_sheet(const long numvers)
|
|||||||
if (nvers == numvers)
|
if (nvers == numvers)
|
||||||
{
|
{
|
||||||
_selected.set(npag);
|
_selected.set(npag);
|
||||||
_pags->check(iNumRigaAS, TRUE);
|
_pags->check(iNumRigaAS, true);
|
||||||
}
|
}
|
||||||
iNumRigaAS++; // ignoro in questo contatore i pagamenti che NON
|
iNumRigaAS++; // ignoro in questo contatore i pagamenti che NON
|
||||||
// si vedono (se il pagamento e' scartato prima di qui
|
// 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)
|
bool TSchedaPercipienti::pag_standard_handler(TMask_field& f, KEY k)
|
||||||
{
|
{
|
||||||
static Pag_struct s;
|
static Pag_struct s, c, nullpag;
|
||||||
static Pag_struct c;
|
|
||||||
static Pag_struct nullpag;
|
|
||||||
|
|
||||||
const TSchedaPercipienti& a = app();
|
const TSchedaPercipienti& a = app();
|
||||||
a.clear_struct(nullpag);
|
a.clear_struct(nullpag);
|
||||||
@ -804,12 +798,13 @@ bool TSchedaPercipienti::pag_standard_handler(TMask_field& f, KEY k)
|
|||||||
a.from_mask_to_struct(f.mask(), s);
|
a.from_mask_to_struct(f.mask(), s);
|
||||||
|
|
||||||
// non proseguo se riga identica
|
// non proseguo se riga identica
|
||||||
if (s == c) return true;
|
if (s == c)
|
||||||
|
return true;
|
||||||
|
|
||||||
// richiamo calcolo di riga
|
// richiamo calcolo di riga
|
||||||
a.calcola_riga_pag(s,
|
a.calcola_riga_pag(s,
|
||||||
c,
|
c,
|
||||||
FALSE,
|
false,
|
||||||
h_PercAssImp,
|
h_PercAssImp,
|
||||||
h_PercCassaPrev,
|
h_PercCassaPrev,
|
||||||
h_PercRitenuta,
|
h_PercRitenuta,
|
||||||
@ -821,7 +816,6 @@ bool TSchedaPercipienti::pag_standard_handler(TMask_field& f, KEY k)
|
|||||||
a.from_struct_to_mask(s, f.mask());
|
a.from_struct_to_mask(s, f.mask());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// eseguo controlli solo per K_ENTER
|
// eseguo controlli solo per K_ENTER
|
||||||
// utilizzando i valori memorizzati nelle strutture statiche
|
// utilizzando i valori memorizzati nelle strutture statiche
|
||||||
if (k == K_ENTER)
|
if (k == K_ENTER)
|
||||||
@ -856,7 +850,7 @@ bool TSchedaPercipienti::pag_standard_handler(TMask_field& f, KEY k)
|
|||||||
|
|
||||||
// controllo detrazioni lavoro dipendente
|
// controllo detrazioni lavoro dipendente
|
||||||
if (name == "DETLAVDIP")
|
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");
|
return f.error_box("Detrazioni lavoro dipendente non indicate");
|
||||||
|
|
||||||
// controllo CPA
|
// controllo CPA
|
||||||
|
@ -1,67 +1,38 @@
|
|||||||
/*****************************************************************
|
#include <relapp.h>
|
||||||
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();
|
class TAnagrafica_percipiente : public TRelation_application
|
||||||
|
|
||||||
TSchedaP sch2 (_rver->curr());
|
|
||||||
if (sch2 == sch) // Se sono ancora nella stessa scheda
|
|
||||||
{
|
{
|
||||||
int nriga = _rver->get_int("NRIGA");
|
TRelation* _rel;
|
||||||
if (nriga == nvers)
|
TMask* _msk;
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
***************************************************************/
|
|
||||||
|
|
||||||
|
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");
|
return f.warning_box("Se non indicato il codice del CAAF la ditta non deve essere indicata");
|
||||||
|
|
||||||
if (caaf != 0 && ditta == 0)
|
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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -492,7 +492,7 @@ bool TDati_anagrafici::create()
|
|||||||
char tipo_pers = tipo_persona(_codditta);
|
char tipo_pers = tipo_persona(_codditta);
|
||||||
if (tipo_pers == ' ' || tipo_pers == '\0')
|
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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (tipo_pers == 'G')
|
if (tipo_pers == 'G')
|
||||||
|
@ -46,12 +46,11 @@ TRectype& operator += (TRectype& dst, const TRectype& src)
|
|||||||
|
|
||||||
class TRighe_pagamento : public TAssoc_array
|
class TRighe_pagamento : public TAssoc_array
|
||||||
{
|
{
|
||||||
TString _quadro; // Codice quadro
|
TString4 _quadro; // Codice quadro
|
||||||
TArray _prosp_e1; // Righe prospetto e1
|
TArray _prosp_e1; // Righe prospetto e1
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void add_riga(const TRectype& scheda, const TRectype& riga);
|
void add_riga(const TRectype& scheda, const TRectype& riga);
|
||||||
|
|
||||||
const TRectype* prospetto_e1(char caus);
|
const TRectype* prospetto_e1(char caus);
|
||||||
|
|
||||||
TRighe_pagamento(const char* quadro);
|
TRighe_pagamento(const char* quadro);
|
||||||
@ -72,8 +71,9 @@ void TRighe_pagamento::add_riga(const TRectype& scheda, const TRectype& riga)
|
|||||||
{
|
{
|
||||||
TString16 chiave;
|
TString16 chiave;
|
||||||
|
|
||||||
|
const TString4 codcaus = scheda.get(SPR_CODCAUS);
|
||||||
const char causqua = toupper(scheda.get_char(SPR_CAUSQUA));
|
const char causqua = toupper(scheda.get_char(SPR_CAUSQUA));
|
||||||
chiave << causqua;
|
chiave.format("%-2s%c", (const char*)codcaus, causqua);
|
||||||
if (_quadro == "C")
|
if (_quadro == "C")
|
||||||
chiave << scheda.get(SPR_FLAGTS); else
|
chiave << scheda.get(SPR_FLAGTS); else
|
||||||
if (_quadro == "E1")
|
if (_quadro == "E1")
|
||||||
@ -193,7 +193,7 @@ protected:
|
|||||||
void genera_d1(TRectype& quadro, const TRectype& riga) const;
|
void genera_d1(TRectype& quadro, const TRectype& riga) const;
|
||||||
void genera_e(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_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 genera_righe(TRighe_pagamento& righe) const;
|
||||||
void distruzione() const;
|
void distruzione() const;
|
||||||
void generazione();
|
void generazione();
|
||||||
@ -423,7 +423,7 @@ bool TQuadroC_E2::user_create()
|
|||||||
m.set_handler(105, ricalcola_imposte_e1);
|
m.set_handler(105, ricalcola_imposte_e1);
|
||||||
m.set_handler(106, ricalcola_imposte_e1);
|
m.set_handler(106, ricalcola_imposte_e1);
|
||||||
_mskp = new TMask("771230pr");
|
_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);
|
s.set_notify(prospetto_e1_notify);
|
||||||
read_prospetto_e1();
|
read_prospetto_e1();
|
||||||
} else
|
} else
|
||||||
@ -462,7 +462,7 @@ bool TQuadroC_E2::user_destroy()
|
|||||||
if (_mskp)
|
if (_mskp)
|
||||||
delete _mskp;
|
delete _mskp;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TQuadroC_E2::init_query_mode(TMask& m)
|
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
|
void TQuadroC_E2::distruzione() const
|
||||||
{
|
{
|
||||||
TWait_cursor hourglass;
|
|
||||||
TRelation rel(_file);
|
TRelation rel(_file);
|
||||||
TRectype& curr = rel.curr();
|
TRectype& curr = rel.curr();
|
||||||
curr.put("CODDITTA", _codditta);
|
curr.put("CODDITTA", _codditta);
|
||||||
@ -544,9 +543,15 @@ void TQuadroC_E2::distruzione() const
|
|||||||
|
|
||||||
TCursor cur(&rel, filter, 1, &curr, &curr);
|
TCursor cur(&rel, filter, 1, &curr, &curr);
|
||||||
long items = cur.items();
|
long items = cur.items();
|
||||||
|
|
||||||
|
TProgress_monitor pi(items, TR("Eliminazione riepilogo"), false);
|
||||||
|
|
||||||
cur.freeze();
|
cur.freeze();
|
||||||
for (cur = 0L; cur.pos() < items; ++cur)
|
for (cur = 0L; cur.pos() < items; ++cur)
|
||||||
|
{
|
||||||
rel.remove();
|
rel.remove();
|
||||||
|
pi.add_status();
|
||||||
|
}
|
||||||
cur.freeze(FALSE);
|
cur.freeze(FALSE);
|
||||||
|
|
||||||
if (QuadroE1())
|
if (QuadroE1())
|
||||||
@ -585,21 +590,20 @@ void TQuadroC_E2::distruzione() const
|
|||||||
nextnumber++;
|
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,
|
void TQuadroC_E2::genera_aliquota(TRectype& quadro, const char* aliquota,
|
||||||
const char* imponibile, const char* imposta) const
|
const char* imponibile, const char* imposta) const
|
||||||
{
|
{
|
||||||
real aliq = quadro.get_real(aliquota);
|
real aliq = quadro.get_real(aliquota);
|
||||||
if (aliq == ZERO)
|
if (aliq.is_zero())
|
||||||
{
|
{
|
||||||
const real impon = quadro.get(imponibile);
|
const real impon = quadro.get(imponibile);
|
||||||
if (impon != ZERO)
|
if (!impon.is_zero())
|
||||||
{
|
{
|
||||||
const real impos = quadro.get(imposta);
|
const real impos = quadro.get(imposta);
|
||||||
aliq = impos * 100.0 / impon;
|
aliq = impos * CENTO / impon;
|
||||||
if (aliq % real(1.0) == ZERO)
|
if (aliq % UNO == ZERO)
|
||||||
quadro.put(aliquota, aliq);
|
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
|
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
|
||||||
{
|
{
|
||||||
|
#ifdef DBG
|
||||||
|
if (quadro.get_long(SPR_CODANAGR) == 4042)
|
||||||
|
int minimo = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
const TDate datapag = riga.get(PAG_DATAPAG);
|
const TDate datapag = riga.get(PAG_DATAPAG);
|
||||||
|
const real compenso = riga.get_real(PAG_COMPENSO);
|
||||||
const real imponibile = riga.get(PAG_IMPONIBILE);
|
const real imponibile = riga.get(PAG_IMPONIBILE);
|
||||||
|
|
||||||
quadro.put("ANNO", datapag.year());
|
quadro.put("ANNO", datapag.year());
|
||||||
quadro.put(QUD_PERC, riga.get(PAG_PERC));
|
quadro.put(QUD_PERC, riga.get(PAG_PERC));
|
||||||
|
quadro.put(QUD_CODCAUS, codcaus);
|
||||||
|
|
||||||
real ammlordo = imponibile;
|
real ammlordo = imponibile;
|
||||||
ammlordo += riga.get_real(PAG_SOMNSRIT);
|
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);
|
ammlordo += riga.get_real(PAG_SOMREGCONV);
|
||||||
quadro.put(QUD_TOTALE, ammlordo);
|
quadro.put(QUD_TOTALE, ammlordo);
|
||||||
|
|
||||||
real somme = riga.get_real(PAG_COMPENSO);
|
real somme = compenso;
|
||||||
somme -= imponibile;
|
somme -= imponibile;
|
||||||
somme += riga.get_real(PAG_SPESA);
|
somme += riga.get_real(PAG_SPESA);
|
||||||
somme -= riga.get_real(PAG_IMPCPA);
|
somme -= riga.get_real(PAG_IMPCPA);
|
||||||
somme -= riga.get_real(PAG_SOMREGCONV);
|
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_SOMREGCONV, riga.get(PAG_SOMREGCONV));
|
||||||
quadro.put(QUD_IMPONIBILE, imponibile); // AUXXX008
|
quadro.put(QUD_IMPONIBILE, imponibile); // AUXXX008
|
||||||
@ -758,6 +769,20 @@ void TQuadroC_E2::genera_la(TRectype& quadro, const TRectype& riga) const
|
|||||||
quadro.put(QUD_CTINPSEROG, inps_erog); // AUXXX020
|
quadro.put(QUD_CTINPSEROG, inps_erog); // AUXXX020
|
||||||
quadro.put(QUD_CTINPSPERC, inps_perc); // AUXXX021
|
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);
|
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_TIPOA, riga.get(PAG_TIPOA));
|
||||||
curr.put(PAG_CODANAGR, riga.get(PAG_CODANAGR));
|
curr.put(PAG_CODANAGR, riga.get(PAG_CODANAGR));
|
||||||
curr.put("NPROG", nriga);
|
curr.put("NPROG", nriga);
|
||||||
curr.put("CAUSALE", chiave[0]);
|
curr.put("CAUSALE", chiave[2]);
|
||||||
curr.put("GENERATA", true);
|
curr.put("GENERATA", true);
|
||||||
|
|
||||||
switch (_quadro[0])
|
switch (_quadro[0])
|
||||||
{
|
{
|
||||||
case 'C':
|
case 'C':
|
||||||
curr.put("TASSAZIONE", chiave[1]);
|
curr.put("TASSAZIONE", chiave[3]);
|
||||||
genera_c(curr, riga);
|
genera_c(curr, riga);
|
||||||
break;
|
break;
|
||||||
case 'D':
|
case 'D':
|
||||||
@ -806,7 +831,7 @@ void TQuadroC_E2::genera_righe(TRighe_pagamento& righe) const
|
|||||||
break;
|
break;
|
||||||
case 'L':
|
case 'L':
|
||||||
if (_quadro[1] == 'A')
|
if (_quadro[1] == 'A')
|
||||||
genera_la(curr, riga);
|
genera_la(curr, riga, chiave.left(2));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
CHECK(FALSE, "Quadro non generabile dalle schede");
|
CHECK(FALSE, "Quadro non generabile dalle schede");
|
||||||
@ -884,10 +909,12 @@ void TQuadroC_E2::generazione()
|
|||||||
|
|
||||||
TCursor cur(&rel, NULL, 1, &rec, &rec);
|
TCursor cur(&rel, NULL, 1, &rec, &rec);
|
||||||
|
|
||||||
TString16 filter; filter.format("(%d->S1=\"%s\")", LF_TABCOM, (const char*)_quadronuovo);
|
const int anno770 = anno_770();
|
||||||
|
|
||||||
|
TString80 filter;
|
||||||
|
filter.format("(%d->S1=\"%s\")", LF_TABCOM, (const char*)_quadronuovo);
|
||||||
cur.setfilter(filter, TRUE);
|
cur.setfilter(filter, TRUE);
|
||||||
|
|
||||||
const int anno770 = anno_770();
|
|
||||||
const long items = cur.items();
|
const long items = cur.items();
|
||||||
const TRectype& scheda = cur.curr();
|
const TRectype& scheda = cur.curr();
|
||||||
const TRectype& riga = cur.curr(LF_RPAG);
|
const TRectype& riga = cur.curr(LF_RPAG);
|
||||||
@ -929,7 +956,7 @@ void TQuadroC_E2::generazione()
|
|||||||
|
|
||||||
if (righe.items() > 0)
|
if (righe.items() > 0)
|
||||||
genera_righe(righe);
|
genera_righe(righe);
|
||||||
_registra = TRUE;
|
_registra = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TQuadroC_E2::codice_handler(TMask_field& f, KEY key)
|
bool TQuadroC_E2::codice_handler(TMask_field& f, KEY key)
|
||||||
|
@ -2,20 +2,20 @@
|
|||||||
#define _771230_H
|
#define _771230_H
|
||||||
|
|
||||||
// 71230
|
// 71230
|
||||||
#define F_CODDITTA 101
|
#define F_CODDITTA 201
|
||||||
#define F_RAGDITTA 102
|
#define F_RAGDITTA 202
|
||||||
#define F_TIPOA 103
|
#define F_TIPOA 203
|
||||||
#define F_CODANAGR 104
|
#define F_CODANAGR 204
|
||||||
#define F_NUMPROG 105
|
#define F_NUMPROG 205
|
||||||
#define F_RAGSOC 106
|
#define F_RAGSOC 206
|
||||||
#define F_RIGHE 107
|
#define F_RIGHE 207
|
||||||
#define H_CODANAGR 114
|
#define H_CODANAGR 214
|
||||||
#define H_RAGSOC 116
|
#define H_RAGSOC 216
|
||||||
#define F_COFI 117
|
#define F_COFI 217
|
||||||
|
|
||||||
#define F_GENERA 201
|
#define F_GENERA 301
|
||||||
#define F_PROSPETTO 202
|
#define F_PROSPETTO 302
|
||||||
#define F_PROSPBTN 203
|
#define F_PROSPBTN 303
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -138,17 +138,22 @@ BEGIN
|
|||||||
ITEM "Addizionale\nregionale sosp.@15"
|
ITEM "Addizionale\nregionale sosp.@15"
|
||||||
ITEM "Imponibile anni\nprecedenti@15"
|
ITEM "Imponibile anni\nprecedenti@15"
|
||||||
ITEM "Ritenute operate\nanni precedenti@15"
|
ITEM "Ritenute operate\nanni precedenti@15"
|
||||||
|
ITEM "Ente\nPrev.@8"
|
||||||
|
ITEM "Categ."
|
||||||
ITEM "Contributi\nerogante@15"
|
ITEM "Contributi\nerogante@15"
|
||||||
ITEM "Contributi\npercipiente@15"
|
ITEM "Contributi\npercipiente@15"
|
||||||
ITEM "Anticip."
|
ITEM "Altri contributi"
|
||||||
ITEM "Generata\nda schede@9"
|
ITEM "Contributi dovuti"
|
||||||
|
ITEM "Contributi versati"
|
||||||
|
ITEM "Anticip.@6C"
|
||||||
|
ITEM "Generata\nda schede@8C"
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
|
||||||
PAGE "RIGA LA" -1 -1 58 16
|
PAGE "Dati fiscali" -1 -1 58 16
|
||||||
|
|
||||||
NUMBER 101 2
|
NUMBER 101 2
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -184,17 +189,18 @@ BEGIN
|
|||||||
INPUT 103
|
INPUT 103
|
||||||
ITEM "A|Prestazioni di lavoro autonomo rientranti nell'esercizio di arte o professione abituale"
|
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 "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 "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 societa' di capitali"
|
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 "E|Levata di protesti cambiari da parte dei segretari comunali"
|
||||||
ITEM "F|Prestazioni rese dagli sportivi con contratto di lavoro autonomo"
|
//ITEM "F|Prestazioni rese dagli sportivi con contratto di lavoro autonomo"
|
||||||
ITEM "G|Idennita' corrisposte per la cessazione di attivita' sportiva professionale"
|
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 "H|Idennita' corrisposte per la cessazione dei rapporti di agenzia delle persone fisiche"
|
||||||
ITEM "I|Idennita' corrisposte per la cessazione da funzionari notarili"
|
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 "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 "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 "M|Prestazioni di lavoro autonomo non esercitate abitualmente"
|
||||||
ITEM "M1|Redditi derivanti dall’assunzione di obblighi di fare, di non fare o permettere"
|
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 "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 "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)"
|
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 "T|Provvigioni corrisposte a mediatore"
|
||||||
ITEM "U|Provvigioni corrisposte a procacciatore di affari"
|
ITEM "U|Provvigioni corrisposte a procacciatore di affari"
|
||||||
ITEM "V|Provvigioni corrisposte a incaricato per le vendite a domicilio"
|
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 "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 "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"
|
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
|
FIELD RITANNIPRE
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY 115 15
|
BOOLEAN 122
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 13 "Contributi a carico dell'erogante "
|
PROMPT 1 13 "Anticipazione"
|
||||||
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"
|
|
||||||
FIELD ANTICIPAZ
|
FIELD ANTICIPAZ
|
||||||
END
|
END
|
||||||
|
|
||||||
BOOLEAN 118
|
BOOLEAN 123
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 31 15 "Riga generata da schede"
|
PROMPT 31 13 "Riga generata da schede"
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
FIELD GENERATA
|
FIELD GENERATA
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
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
|
TOOLBAR "topbar" 0 0 0 2
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
BUTTON DLG_OK 10 2
|
||||||
|
@ -22,7 +22,6 @@ int main(int argc,char** argv)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
exit(0);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
// Utility
|
// Utility
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const int ANNO_PAG = 2014;
|
const int ANNO_PAG = 2015;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TForm770
|
// TForm770
|
||||||
@ -801,8 +801,7 @@ bool TTrasferimento770::append_record_b()
|
|||||||
// Ritorna il form da cui prelevare i codici (come AUXXX010) da inserire nei tracciati
|
// Ritorna il form da cui prelevare i codici (come AUXXX010) da inserire nei tracciati
|
||||||
TForm770& TTrasferimento770::form(const char* quadro, char& tiporec, int& rpm)
|
TForm770& TTrasferimento770::form(const char* quadro, char& tiporec, int& rpm)
|
||||||
{
|
{
|
||||||
CHECK(quadro && *quadro != '\0' && quadro[1] != '\0',
|
CHECK(quadro && *quadro != '\0' && quadro[1] != '\0', "Codice quadro non valido");
|
||||||
"Codice quadro non valido");
|
|
||||||
|
|
||||||
const char* name = NULL;
|
const char* name = NULL;
|
||||||
switch(quadro[1])
|
switch(quadro[1])
|
||||||
@ -925,7 +924,7 @@ bool TTrasferimento770::split(const char* path)
|
|||||||
if (_save_headers)
|
if (_save_headers)
|
||||||
{
|
{
|
||||||
rec.tipo_record('A'); // Compila record di testata A
|
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(4, 1); // Tipo fornitore 01 = Soggetto che invia la propria dichiarazione
|
||||||
rec.set(5, cod_fis_dic()); // Codice fiscale del fornitore
|
rec.set(5, cod_fis_dic()); // Codice fiscale del fornitore
|
||||||
if (volumes > 1)
|
if (volumes > 1)
|
||||||
|
183
m770/777200.cpp
183
m770/777200.cpp
@ -48,7 +48,7 @@ const TString& get_telephone(const TRectype& rec, const char* pref, const char*
|
|||||||
// TTracciatoCU
|
// TTracciatoCU
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const char* cu_default_name() { return "MODCUR15"; }
|
#define CU_DEFAULT_NAME "MODCUR16"
|
||||||
|
|
||||||
class TTracciatoCU : public TTracciato770
|
class TTracciatoCU : public TTracciato770
|
||||||
{
|
{
|
||||||
@ -73,7 +73,7 @@ TTracciatoCU::TTracciatoCU(char tipo)
|
|||||||
} else
|
} else
|
||||||
if (tipo == 'B')
|
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_field("Progressivo modulo", NU, 18, 8);
|
||||||
add_filler( 26, 1);
|
add_filler( 26, 1);
|
||||||
add_filler( 27, 8);
|
add_filler( 27, 8);
|
||||||
@ -86,7 +86,7 @@ TTracciatoCU::TTracciatoCU(char tipo)
|
|||||||
add_field("Annullamento", CB, 91, 1); // 10
|
add_field("Annullamento", CB, 91, 1); // 10
|
||||||
add_field("Sostituzione", CB, 92, 1);
|
add_field("Sostituzione", CB, 92, 1);
|
||||||
|
|
||||||
// Dati del contribuente
|
// Dati del sostituto
|
||||||
add_field("Cognome", AN, 93, 24); // 12
|
add_field("Cognome", AN, 93, 24); // 12
|
||||||
add_field("Nome", AN,117, 20);
|
add_field("Nome", AN,117, 20);
|
||||||
add_field("Denominazione (Alternativo a 12 e 13)",AN,137, 60);
|
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("Impegno a trasmettere la dichiaraz.", NU, 428, 1);
|
||||||
add_field("Data dell'impegno", DT, 429, 8);
|
add_field("Data dell'impegno", DT, 429, 8);
|
||||||
add_field("Firma dell'intermediario", CB, 437, 1);
|
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
|
} else
|
||||||
if (tipo == 'D')
|
if (tipo == 'D')
|
||||||
{
|
{
|
||||||
@ -125,6 +118,7 @@ TTracciatoCU::TTracciatoCU(char tipo)
|
|||||||
add_field("Progressivo certificazione", NU, 42, 5); // 5
|
add_field("Progressivo certificazione", NU, 42, 5); // 5
|
||||||
add_field("Identificativo dell'invio", NU, 47, 17); // 6
|
add_field("Identificativo dell'invio", NU, 47, 17); // 6
|
||||||
add_field("Progressivo singola C.U.", NU, 64, 6); // 7
|
add_field("Progressivo singola C.U.", NU, 64, 6); // 7
|
||||||
|
add_filler(70, 14);
|
||||||
add_field("Tipo Operazione", AN, 84, 1, 9); // 9
|
add_field("Tipo Operazione", AN, 84, 1, 9); // 9
|
||||||
add_filler(85, 4);
|
add_filler(85, 4);
|
||||||
add_field("Conferma singola certificazione", CB, 89, 1); // 11
|
add_field("Conferma singola certificazione", CB, 89, 1); // 11
|
||||||
@ -279,11 +273,11 @@ bool TTrasferimentoCU::load(const char* path)
|
|||||||
if (path && *path)
|
if (path && *path)
|
||||||
{
|
{
|
||||||
_name = path;
|
_name = path;
|
||||||
if (_name.find(cu_default_name()) < 0)
|
if (_name.find(CU_DEFAULT_NAME) < 0)
|
||||||
_name.add(cu_default_name());
|
_name.add(CU_DEFAULT_NAME);
|
||||||
}
|
}
|
||||||
if (_name.empty())
|
if (_name.empty())
|
||||||
_name = cu_default_name();
|
_name = CU_DEFAULT_NAME;
|
||||||
|
|
||||||
ifstream is(_name, ios::in | ios::binary);
|
ifstream is(_name, ios::in | ios::binary);
|
||||||
TRecordCU rec;
|
TRecordCU rec;
|
||||||
@ -330,7 +324,7 @@ unsigned int TTrasferimentoCU::columns() const
|
|||||||
const TRecordset_column_info& TTrasferimentoCU::column_info(unsigned int column) const
|
const TRecordset_column_info& TTrasferimentoCU::column_info(unsigned int column) const
|
||||||
{
|
{
|
||||||
static TRecordset_column_info ci;
|
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 TRecordCU& cur_rec = (const TRecordCU&)_data[_cur_pos];
|
||||||
const TTracciato770& trc = _trcCU.tracciato(cur_rec.tipo_record());
|
const TTracciato770& trc = _trcCU.tracciato(cur_rec.tipo_record());
|
||||||
@ -418,6 +412,21 @@ bool TTrasferimentoCU::set_field(int n, const TVariant& var)
|
|||||||
return done;
|
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)
|
const TString& TTrasferimentoCU::read_codfis_dic(const TRectype& rec)
|
||||||
{
|
{
|
||||||
TToken_string key; // Stringa multiuso
|
TToken_string key; // Stringa multiuso
|
||||||
@ -476,24 +485,14 @@ void TTrasferimentoCU::set_operazione(char t, const TString& iden)
|
|||||||
TRecnotype TTrasferimentoCU::conta_certificazioni() const
|
TRecnotype TTrasferimentoCU::conta_certificazioni() const
|
||||||
{
|
{
|
||||||
int anno = _anno;
|
int anno = _anno;
|
||||||
if (anno < 2014)
|
if (anno < 2015)
|
||||||
anno = 2014;
|
anno = 2015;
|
||||||
|
|
||||||
TString query;
|
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);
|
LF_QUALA, anno, _cod_ditta, _cod_ditta);
|
||||||
|
|
||||||
TRecnotype nc = 0;
|
|
||||||
TISAM_recordset recset(query);
|
TISAM_recordset recset(query);
|
||||||
for (bool ok = recset.move_first(); ok; ok = recset.move_next())
|
return recset.items();
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TTrasferimentoCU::append_record_b()
|
bool TTrasferimentoCU::append_record_b()
|
||||||
@ -647,10 +646,13 @@ bool TTrasferimentoCU::append_record_d(const TRectype& qla, TLog_report& log)
|
|||||||
|
|
||||||
if (perc.estero())
|
if (perc.estero())
|
||||||
{
|
{
|
||||||
rec.np_put("DA002040", perc.codice_fiscale());
|
rec.np_put("DA002040", perc.partita_IVA());
|
||||||
rec.np_put("DA002041", perc.localita_residenza());
|
rec.np_put("DA002041", perc.comune_residenza());
|
||||||
rec.np_put("DA002042", perc.indirizzo_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);
|
rec.np_put("DA003001", _data_tra);
|
||||||
@ -660,7 +662,7 @@ bool TTrasferimentoCU::append_record_d(const TRectype& qla, TLog_report& log)
|
|||||||
return true;
|
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 char tipoanag = qla.get_char("TIPOA");
|
||||||
const long codanagr = qla.get_long("CODANAGR");
|
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);
|
TAnagrafica perc(LF_ANAG, tipoanag, codanagr);
|
||||||
if (!perc.ok())
|
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);
|
log.log(2, msg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRecordCU rec('H'); // Compila record H
|
TRecordCU rec('H'); // Compila record H
|
||||||
rec.set(2, cod_fis_dic()); // Codice fiscale sostituto
|
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(4, perc.codice_fiscale()); // Codice fiscale del percipiente
|
||||||
rec.set(5, _certificazione); // Progressivo certificazione
|
rec.set(5, _certificazione); // Progressivo certificazione
|
||||||
|
|
||||||
@ -696,13 +698,23 @@ bool TTrasferimentoCU::append_record_h(const TRectype& qla, TLog_report& log)
|
|||||||
if (perc.estero())
|
if (perc.estero())
|
||||||
rec.np_put("AU001005", qla.get_real("SOMREGCONV"));
|
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())
|
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("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("AU001009", qla.get_real("IMPORTO")); // ritenute a titolo di acconto
|
||||||
//rec.np_put("AU001010", ZERO); // ritenute a titolo di imposta
|
//rec.np_put("AU001010", ZERO); // ritenute a titolo di imposta
|
||||||
rec.np_put("AU001011", qla.get_real("RITSOSPESE")); // ritenute sospese
|
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("AU001018", qla.get_real("IMPANNIPRE")); // imponibile anni precedenti
|
||||||
rec.np_put("AU001019", qla.get_real("RITANNIPRE")); // ritenute 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("AU001020", qla.get_real("SPESERIMB")); // spese rimborsate
|
||||||
rec.np_put("AU001021", qla.get_real("CTINPSPERC")); // contributi a carico percipiente
|
//rec.np_put("AU001021", qla.get_real("RITRIMB")); // ritenute rimborsate
|
||||||
//rec.np_put("AU001022", qla.get_real("SPESERIMB")); // spese rimborsate
|
|
||||||
//rec.np_put("AU001023", qla.get_rea;("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);
|
_data.add(rec);
|
||||||
return true;
|
return true;
|
||||||
@ -751,7 +805,7 @@ bool TTrasferimentoCU::split(const char* path)
|
|||||||
for (int volume = 1; good && volume <= volumes; volume++)
|
for (int volume = 1; good && volume <= volumes; volume++)
|
||||||
{
|
{
|
||||||
// Specifica volume solo se necessario
|
// 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;
|
if (volumes > 1) fn << '_' << volume;
|
||||||
TTrasferimentoCU outfile(fn, 'w');
|
TTrasferimentoCU outfile(fn, 'w');
|
||||||
|
|
||||||
@ -759,7 +813,7 @@ bool TTrasferimentoCU::split(const char* path)
|
|||||||
{
|
{
|
||||||
TRecordCU rec;
|
TRecordCU rec;
|
||||||
rec.tipo_record('A'); // Compila record di testata A
|
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(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
|
rec.set(5, _codfis_int.full() ? _codfis_int : cod_fis_dic()); // Codice fiscale del fornitore
|
||||||
outfile << rec; // Scrive record testata
|
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())
|
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:
|
case F_PATH:
|
||||||
if (e == fe_init || e == fe_modify)
|
if (e == fe_init || e == fe_modify)
|
||||||
{
|
{
|
||||||
TFilename f = o.get();
|
TFilename f = o.get();
|
||||||
f.add(cu_default_name());
|
f.add(CU_DEFAULT_NAME);
|
||||||
enable(DLG_PREVIEW, f.exist());
|
enable(DLG_PREVIEW, f.exist());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -860,11 +921,12 @@ bool TCU_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
if (e == fe_button)
|
if (e == fe_button)
|
||||||
{
|
{
|
||||||
TFilename tmp = get(F_PATH);
|
TFilename tmp = get(F_PATH);
|
||||||
tmp.add(cu_default_name());
|
tmp.add(CU_DEFAULT_NAME);
|
||||||
if (tmp.exist())
|
if (tmp.exist())
|
||||||
{
|
{
|
||||||
const int quality = get_bool(F_QUALITY) ? 2 : 1;
|
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
|
else
|
||||||
cantread_box(tmp);
|
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)
|
if (e == fe_button)
|
||||||
{
|
{
|
||||||
TFilename tmp = get(F_PATH);
|
TFilename tmp = get(F_PATH);
|
||||||
tmp.add(cu_default_name());
|
tmp.add(CU_DEFAULT_NAME);
|
||||||
if (tmp.input() && tmp.exist())
|
if (tmp.input() && tmp.exist())
|
||||||
{
|
{
|
||||||
const int quality = get_bool(F_QUALITY) ? 2 : 1;
|
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
|
return false; // don't close mask
|
||||||
}
|
}
|
||||||
@ -902,12 +965,11 @@ public:
|
|||||||
|
|
||||||
void TCU_app::main_loop()
|
void TCU_app::main_loop()
|
||||||
{
|
{
|
||||||
const int anno = ini_get_int(CONFIG_STUDIO, "77", "AnnoDic", 2014);
|
|
||||||
TCU_mask m;
|
TCU_mask m;
|
||||||
m.set(F_ANNO, anno);
|
|
||||||
|
|
||||||
while (m.run() == K_ENTER)
|
while (m.run() == K_ENTER)
|
||||||
{
|
{
|
||||||
|
const int anno = m.get_int(F_ANNO);
|
||||||
TFilename tmp; tmp.tempdir();
|
TFilename tmp; tmp.tempdir();
|
||||||
TTrasferimentoCU t(tmp, 'w');
|
TTrasferimentoCU t(tmp, 'w');
|
||||||
t.set_inter(m.get(F_INTER_CODFIS), m.get_date(F_INTER_DATA), anno);
|
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.read_codfis_dic(base);
|
||||||
t.append_record_b();
|
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);
|
LF_QUALA, anno, codditta, codditta);
|
||||||
|
|
||||||
TISAM_recordset perc(query);
|
TISAM_recordset perc(query);
|
||||||
@ -942,20 +1004,11 @@ void TCU_app::main_loop()
|
|||||||
{
|
{
|
||||||
TProgress_monitor pp(nperc, TR("Generazione record percipienti"));
|
TProgress_monitor pp(nperc, TR("Generazione record percipienti"));
|
||||||
const TRectype& rec = perc.cursor()->curr();
|
const TRectype& rec = perc.cursor()->curr();
|
||||||
long last_perc = 0;
|
const int modulo = 1; // In realtà non accetta modulo != 1 per cui separa causali diverse in due comunicazioni
|
||||||
TString4 last_caus;
|
|
||||||
const int modulo = 1;
|
|
||||||
for (bool ok = perc.move_first(); ok; ok = perc.move_next())
|
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_d(rec, log);
|
||||||
}
|
t.append_record_h(rec, modulo, log);
|
||||||
t.append_record_h(rec, log);
|
|
||||||
pp.add_status();
|
pp.add_status();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -967,13 +1020,13 @@ void TCU_app::main_loop()
|
|||||||
tmp = m.get(F_PATH);
|
tmp = m.get(F_PATH);
|
||||||
if (t.split(tmp))
|
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))
|
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);
|
m.send_key(K_SPACE, DLG_PREVIEW);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tmp.add(cu_default_name());
|
tmp.add(CU_DEFAULT_NAME);
|
||||||
cantwrite_box(tmp);
|
cantwrite_box(tmp);
|
||||||
}
|
}
|
||||||
t.remove();
|
t.remove();
|
||||||
@ -983,7 +1036,7 @@ void TCU_app::main_loop()
|
|||||||
int m777200(int argc, char* argv[])
|
int m777200(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
TCU_app app;
|
TCU_app app;
|
||||||
app.run(argc, argv, "Invio C.U.");
|
app.run(argc, argv, TR("Certificazione Unica"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ public: // TAS400_recordset
|
|||||||
virtual const TVariant& get(unsigned int column) const;
|
virtual const TVariant& get(unsigned int column) const;
|
||||||
virtual const TVariant& get_var(const char* name) const;
|
virtual const TVariant& get_var(const char* name) const;
|
||||||
bool set_field(int n, const TVariant& var);
|
bool set_field(int n, const TVariant& var);
|
||||||
|
bool set_field(const char* name, const TVariant& var);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -71,13 +72,13 @@ public:
|
|||||||
|
|
||||||
bool append_record_b();
|
bool append_record_b();
|
||||||
bool append_record_d(const TRectype& rec, TLog_report& log);
|
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);
|
TTrasferimentoCU(const char* name, char mode);
|
||||||
virtual ~TTrasferimentoCU();
|
virtual ~TTrasferimentoCU();
|
||||||
};
|
};
|
||||||
|
|
||||||
void print_cu(const TFilename& datafile, int quality);
|
void print_cu(const TFilename& datafile, int quality, bool simple);
|
||||||
void edit_cu(const TFilename& datafile, int quality);
|
void edit_cu(const TFilename& datafile, int quality, bool simple);
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -5,6 +5,7 @@
|
|||||||
#define F_ADITTA 107
|
#define F_ADITTA 107
|
||||||
#define F_ADESC 108
|
#define F_ADESC 108
|
||||||
#define F_QUALITY 110
|
#define F_QUALITY 110
|
||||||
|
#define F_SIMPLE 111
|
||||||
|
|
||||||
#define F_INVIO 115
|
#define F_INVIO 115
|
||||||
#define F_IDENTIFICATIVO 116
|
#define F_IDENTIFICATIVO 116
|
||||||
|
@ -70,10 +70,10 @@ END
|
|||||||
NUMBER F_ANNO 4
|
NUMBER F_ANNO 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 46 2 "Anno dichiarazione "
|
PROMPT 46 2 "Anno dichiarazione "
|
||||||
FLAGS "D"
|
FLAGS "DG"
|
||||||
END
|
END
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 78 10
|
GROUPBOX DLG_NULL 78 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 6 "@bParametri di generazione"
|
PROMPT 1 6 "@bParametri di generazione"
|
||||||
END
|
END
|
||||||
@ -124,14 +124,29 @@ BEGIN
|
|||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
GROUPBOX DLG_NULL 78 3
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 11 "@bParametri di stampa"
|
||||||
|
END
|
||||||
|
|
||||||
BOOLEAN F_QUALITY
|
BOOLEAN F_QUALITY
|
||||||
BEGIN
|
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
|
END
|
||||||
|
|
||||||
LIST F_INVIO 1 12
|
LIST F_INVIO 1 12
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 13 "Tipo operazione "
|
PROMPT 2 15 "Tipo operazione "
|
||||||
ITEM " |Normale" MESSAGE DISABLE,F_IDENTIFICATIVO
|
ITEM " |Normale" MESSAGE DISABLE,F_IDENTIFICATIVO
|
||||||
ITEM "A|Annullamento" MESSAGE ENABLE,F_IDENTIFICATIVO
|
ITEM "A|Annullamento" MESSAGE ENABLE,F_IDENTIFICATIVO
|
||||||
ITEM "S|Sostituzione" MESSAGE ENABLE,F_IDENTIFICATIVO
|
ITEM "S|Sostituzione" MESSAGE ENABLE,F_IDENTIFICATIVO
|
||||||
@ -139,7 +154,7 @@ END
|
|||||||
|
|
||||||
STRING F_IDENTIFICATIVO 17
|
STRING F_IDENTIFICATIVO 17
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 14 "Identificativo invio "
|
PROMPT 2 16 "Identificativo invio "
|
||||||
FLAGS "RZ"
|
FLAGS "RZ"
|
||||||
CHECKTYPE REQUIRED
|
CHECKTYPE REQUIRED
|
||||||
END
|
END
|
||||||
|
155
m770/777201.cpp
155
m770/777201.cpp
@ -46,6 +46,7 @@ class TCU_report : public TReport
|
|||||||
{
|
{
|
||||||
TReport_font _fnt_rep, _fnt_prm, _fnt_lbl, _fnt_sub, _fnt_prg;
|
TReport_font _fnt_rep, _fnt_prm, _fnt_lbl, _fnt_sub, _fnt_prg;
|
||||||
int _quality; // 0=text only; 1=borders only; 2=filled bars
|
int _quality; // 0=text only; 1=borders only; 2=filled bars
|
||||||
|
bool _syntetic;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const TReport_field& last_field() const;
|
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_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_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_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_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,
|
TReport_field& add_gridded_field (TReport_section& sec, int row, int col, int len,
|
||||||
const char* field, const char* prompt);
|
const char* field, const char* prompt);
|
||||||
@ -80,7 +82,7 @@ protected:
|
|||||||
void create_H();
|
void create_H();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TCU_report(int quality);
|
TCU_report(int quality, bool syntetic);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CU_FORM_WIDTH 7800
|
#define CU_FORM_WIDTH 7800
|
||||||
@ -103,13 +105,13 @@ const TReport_field& TCU_report::last_field() const
|
|||||||
return *_last_fld;
|
return *_last_fld;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TCU_report::set_field_pos(int row, int col, int len, TReport_field& fld) const
|
void TCU_report::set_field_pos(int row, int col, int len, TReport_field& fld) const
|
||||||
{
|
{
|
||||||
TReport_section& sec = fld.section();
|
TReport_section& sec = fld.section();
|
||||||
|
|
||||||
int dimx = (len+1) * 100;
|
int dimx = (len+1) * 100;
|
||||||
int dimy = 150;
|
const int dimy = _row_height <= 200 ? 100 : 150;
|
||||||
|
|
||||||
int posx = 0;
|
int posx = 0;
|
||||||
if (col < 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);
|
label->set_font(_fnt_sub);
|
||||||
const TReport_rct& rct = fld.get_rect();
|
const TReport_rct& rct = fld.get_rect();
|
||||||
label->set_pos(rct.x, rct.y);
|
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);
|
label->set_picture(text);
|
||||||
sec.add(label);
|
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);
|
txt.set_horizontal_alignment(alignment);
|
||||||
if (field && *field && field[1] >= 'A')
|
if (field && *field && field[1] >= 'A')
|
||||||
{
|
{
|
||||||
TString4 num = field+7;
|
TString4 num = field+6;
|
||||||
if (num[0] == '0') num.ltrim(1);
|
while (num[0] == '0') num.ltrim(1);
|
||||||
add_field_sublabel(txt, num);
|
add_field_sublabel(txt, num);
|
||||||
}
|
}
|
||||||
if (label && *label)
|
if (label && *label)
|
||||||
@ -359,6 +361,14 @@ TReport_field& TCU_report::add_labeled_number(TReport_section& body, int row, in
|
|||||||
return txt;
|
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)
|
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)
|
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;
|
return txt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TCU_report::add_field_grid(const TReport_field& fld, bool underlined, bool date)
|
void TCU_report::add_field_grid(const TReport_field& fld, bool underlined, bool date)
|
||||||
{
|
{
|
||||||
TReport_section& sec = fld.section();
|
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, 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, 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);
|
TReport_field* txt = new TReport_field(&header);
|
||||||
txt->set_type('I');
|
txt->set_type('I');
|
||||||
txt->set("res/AgenziaEntrate.gif");
|
txt->set("res/AgenziaEntrate.gif");
|
||||||
txt->set_pos(CU_FORM_BORDER, 900);
|
txt->set_pos(CU_FORM_BORDER, 800);
|
||||||
txt->set_size(1200, 200);
|
txt->set_size(1200, 200);
|
||||||
header.add(txt);
|
header.add(txt);
|
||||||
}
|
}
|
||||||
@ -629,8 +638,13 @@ void TCU_report::create_B()
|
|||||||
end_paragraph(header);
|
end_paragraph(header);
|
||||||
|
|
||||||
begin_paragraph(header, CU_AFTER_LAST, 3, "FIRMA DELLA COMUNICAZIONE");
|
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_labeled_field (header, 0, 25, 3, "#25", "Quadro CT", 'C');
|
||||||
add_prompted_field(header, 0, CU_ALIGN_RIGHT, 24, "", "FIRMA");
|
add_prompted_field(header, 0, CU_ALIGN_RIGHT, 24, "", "FIRMA");
|
||||||
end_paragraph(header);
|
end_paragraph(header);
|
||||||
@ -678,7 +692,7 @@ void TCU_report::create_D()
|
|||||||
txt->set_font(fnt_big);
|
txt->set_font(fnt_big);
|
||||||
body.add(txt);
|
body.add(txt);
|
||||||
|
|
||||||
add_boxed_field(body, 8, 68, 4, "2014", "");
|
add_boxed_field(body, 8, 68, 4, "2015", "");
|
||||||
|
|
||||||
add_band(body, 12, 35);
|
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, 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, 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, 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);
|
end_paragraph(body);
|
||||||
begin_paragraph(body, CU_AFTER_LAST, 3, "");
|
begin_paragraph(body, CU_AFTER_LAST, 3, "");
|
||||||
add_gridded_field(body, 0, 0, 10, "#DA003001", "DATA");
|
add_gridded_field(body, 0, 0, 10, "#DA003001", "DATA");
|
||||||
@ -746,32 +766,32 @@ void TCU_report::create_H()
|
|||||||
body.force_page_break(true);
|
body.force_page_break(true);
|
||||||
_row_offset = 0;
|
_row_offset = 0;
|
||||||
|
|
||||||
add_prompt (body, 4, 0, 14, "Codice fiscale del percipiente");
|
add_prompt (body, 2, 0, 14, "Codice fiscale del percipiente");
|
||||||
add_boxed_field(body, 4,CU_AFTER_LAST, 16, "#4", "", 0x1);
|
add_boxed_field(body, 2,CU_AFTER_LAST, 16, "#4", "", 0x1);
|
||||||
|
|
||||||
add_boxed_field(body, 4, 74, 2, "#3", "", 0x3);
|
add_boxed_field(body, 2, 74, 2, "#3", "", 0x3);
|
||||||
add_prompt(body, 4, CU_BEFORE_LAST, -1, "Mod. N.");
|
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());
|
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);
|
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_size(CU_FORM_WIDTH-CU_HEAD_WIDTH, 200);
|
||||||
title->set_horizontal_alignment('C');
|
title->set_horizontal_alignment('C');
|
||||||
title->set_vertical_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);
|
title->set_font(fnt_big);
|
||||||
body.add(title);
|
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;
|
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");
|
add_labeled_field(body, 0, tab0, 2, "#AU001001", "Causale");
|
||||||
end_paragraph(body);
|
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_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, 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');
|
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, 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, 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, tab2, CU_EURO_LEN, "#AU001020", "Spese rimborsate", 'C');
|
||||||
add_labeled_number(body, 5, tab3, CU_EURO_LEN, "#AU001021", "Contributi previdenziali\na carico del percipiente", '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');
|
// 2016
|
||||||
add_labeled_number(body, 6, tab2, CU_EURO_LEN, "#AU001023", "Ritenute rimborsate", 'C');
|
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);
|
end_paragraph(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TCU_report::TCU_report(int quality, bool syntetic) : _quality(quality), _syntetic(syntetic)
|
||||||
TCU_report::TCU_report(int quality) : _quality(quality)
|
|
||||||
{
|
{
|
||||||
set_lpi(6);
|
set_lpi(6);
|
||||||
set_cpi(10);
|
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_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);
|
_fnt_prm.create(_fnt_lbl.name(), 2*_fnt_rep.size()/3, 0);
|
||||||
|
|
||||||
|
if (!_syntetic)
|
||||||
create_B();
|
create_B();
|
||||||
create_D();
|
create_D();
|
||||||
create_H();
|
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.set_recordset(new TTrasferimentoCU(datafile, 'r'));
|
||||||
cur.preview();
|
cur.preview();
|
||||||
xvtil_statbar_set(NULL);
|
xvtil_statbar_set(NULL);
|
||||||
|
@ -8,6 +8,7 @@ class TCU_editor : public TAutomask
|
|||||||
{
|
{
|
||||||
TTrasferimentoCU* _recset;
|
TTrasferimentoCU* _recset;
|
||||||
int _quality;
|
int _quality;
|
||||||
|
bool _simplyfied;
|
||||||
|
|
||||||
TBit_array _dirty_row;
|
TBit_array _dirty_row;
|
||||||
bool _dirty_file;
|
bool _dirty_file;
|
||||||
@ -22,7 +23,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
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; }
|
~TCU_editor() { delete _recset; }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -103,12 +104,12 @@ void TCU_editor::save_page()
|
|||||||
FOR_EACH_SHEET_ROW(sheet, r, row) if (_dirty_row[r])
|
FOR_EACH_SHEET_ROW(sheet, r, row) if (_dirty_row[r])
|
||||||
{
|
{
|
||||||
code = row->get(0);
|
code = row->get(0);
|
||||||
|
TVariant var = row->get(2);
|
||||||
const bool positional = real::is_natural(code);
|
const bool positional = real::is_natural(code);
|
||||||
if (positional)
|
if (positional)
|
||||||
{
|
|
||||||
TVariant var = row->get(2);
|
|
||||||
_recset->set_field(atoi(code), var);
|
_recset->set_field(atoi(code), var);
|
||||||
}
|
else
|
||||||
|
_recset->set_field(code, var);
|
||||||
}
|
}
|
||||||
_dirty_row.reset();
|
_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)
|
bool TCU_editor::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||||
{
|
{
|
||||||
|
static char _code[16];
|
||||||
|
|
||||||
switch (o.dlg())
|
switch (o.dlg())
|
||||||
{
|
{
|
||||||
case DLG_FIRSTREC: if (e == fe_button && save_page_if_dirty() && _recset->move_first()) load(); return false;
|
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();
|
const TFilename fn = _recset->query_text();
|
||||||
if (fn.exist())
|
if (fn.exist())
|
||||||
print_cu(fn, _quality);
|
print_cu(fn, _quality, _simplyfied);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case DLG_SAVEREC:
|
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);
|
return ((TSheet_field&)o).row_enabled(jolly);
|
||||||
case se_query_del :
|
case se_query_del :
|
||||||
return false;
|
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;
|
default: break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -269,18 +295,18 @@ bool TCU_editor::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
return true;
|
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 = new TTrasferimentoCU(fn, 'r');
|
||||||
_recset->move_first();
|
_recset->move_first();
|
||||||
enable(DLG_SAVEREC, _dirty_file = false);
|
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())
|
if (datafile.exist())
|
||||||
{
|
{
|
||||||
TCU_editor m(datafile, quality);
|
TCU_editor m(datafile, quality, simple);
|
||||||
m.run();
|
m.run();
|
||||||
xvtil_statbar_set(NULL);
|
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
|
bool TRecord770::np_get(int pos, TString& key, TString& val) const
|
||||||
{
|
{
|
||||||
CHECK(ha_campi_non_posizionali(), "Impossibile leggere campi non posizionali");
|
CHECK(ha_campi_non_posizionali(), "Impossibile leggere campi non posizionali");
|
||||||
|
|
||||||
const int n = HEADER_SIZE + pos * BLOCK_SIZE;
|
const int n = HEADER_SIZE + pos * BLOCK_SIZE;
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
if (n < HEADER_SIZE + USEABLE_SIZE)
|
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);
|
key = _buffer.mid(n, CODE_SIZE);
|
||||||
val = _buffer.mid(n+CODE_SIZE, FIELD_SIZE);
|
val = _buffer.mid(n+CODE_SIZE, FIELD_SIZE);
|
||||||
|
#ifdef DBG
|
||||||
|
if (key == "AU001036")
|
||||||
|
int cazzone = atoi(val);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ok;
|
return ok;
|
||||||
|
@ -8,8 +8,10 @@ Item_02 = "Gestione percipienti", "776mod -0", ""
|
|||||||
Item_03 = "Tabella causali", "773mod -3 %ca7", ""
|
Item_03 = "Tabella causali", "773mod -3 %ca7", ""
|
||||||
Item_04 = "Azzeramento archivi", "774 -2 T", ""
|
Item_04 = "Azzeramento archivi", "774 -2 T", ""
|
||||||
Item_05 = "Parametri di studio", "773mod -0", ""
|
Item_05 = "Parametri di studio", "773mod -0", ""
|
||||||
Item_06 = "Certificazione Unica", "777 -1", ""
|
Item_06 = "Enti previdenziali", "770 -3 %ENT", ""
|
||||||
Item_07 = "Stampe",[77MENU_002]
|
Item_07 = "Dati previdenziali", "770 -2", ""
|
||||||
|
Item_08 = "Certificazione Unica", "777 -1", ""
|
||||||
|
Item_09 = "Stampe",[77MENU_002]
|
||||||
|
|
||||||
[77MENU_002]
|
[77MENU_002]
|
||||||
Caption = "Stampe"
|
Caption = "Stampe"
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#define TCF_CAUSE_DESCR 128
|
#define TCF_CAUSE_DESCR 128
|
||||||
#define TCF_CAUSE1_DESCR 129
|
#define TCF_CAUSE1_DESCR 129
|
||||||
#define F_IC_DESCR 130
|
#define F_IC_DESCR 130
|
||||||
|
#define F_ALTRENONSOGG 131
|
||||||
|
|
||||||
#define INPS_GROUP 7
|
#define INPS_GROUP 7
|
||||||
#define GR_CAUDD1 8
|
#define GR_CAUDD1 8
|
||||||
|
@ -324,9 +324,22 @@ BEGIN
|
|||||||
WARNING "Percentuale della ritenuta d'acconto non valida"
|
WARNING "Percentuale della ritenuta d'acconto non valida"
|
||||||
END
|
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
|
STRING F_IC 1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 15 "T.S. "
|
PROMPT 1 16 "T.S. "
|
||||||
SHEET "Codice|Descrizione@60"
|
SHEET "Codice|Descrizione@60"
|
||||||
INPUT F_IC
|
INPUT F_IC
|
||||||
ITEM " | "
|
ITEM " | "
|
||||||
@ -345,19 +358,19 @@ END
|
|||||||
|
|
||||||
STRING F_IC_DESCR 60
|
STRING F_IC_DESCR 60
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 10 15 ""
|
PROMPT 10 16 ""
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
GROUP G_ICTS
|
GROUP G_ICTS
|
||||||
END
|
END
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 77 4
|
GROUPBOX DLG_NULL 77 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 0 17 "Contributo INPS"
|
PROMPT 0 18 "Contributo INPS"
|
||||||
END
|
END
|
||||||
|
|
||||||
BOOLEAN TCF_BINPS
|
BOOLEAN TCF_BINPS
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 18 "Contributo INPS "
|
PROMPT 1 19 "Contributo INPS "
|
||||||
FIELD LF_TABCOM->B4
|
FIELD LF_TABCOM->B4
|
||||||
MESSAGE TRUE ENABLE,INPS_GROUP@
|
MESSAGE TRUE ENABLE,INPS_GROUP@
|
||||||
MESSAGE FALSE DISABLE,INPS_GROUP@|RESET,INPS_GROUP@
|
MESSAGE FALSE DISABLE,INPS_GROUP@|RESET,INPS_GROUP@
|
||||||
@ -365,7 +378,7 @@ END
|
|||||||
|
|
||||||
NUMBER TCF_PERCINPS 6 2
|
NUMBER TCF_PERCINPS 6 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 30 18 "Percentuale "
|
PROMPT 30 19 "Percentuale "
|
||||||
PICTURE ".2"
|
PICTURE ".2"
|
||||||
FIELD R1
|
FIELD R1
|
||||||
NUM_EXPR {(#THIS>0) && (#THIS<=100)}
|
NUM_EXPR {(#THIS>0) && (#THIS<=100)}
|
||||||
@ -377,7 +390,7 @@ END
|
|||||||
|
|
||||||
NUMBER TCF_ASSIMPINPS 6 2
|
NUMBER TCF_ASSIMPINPS 6 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 19 "Percentuale ass.imp. "
|
PROMPT 1 20 "Percentuale ass.imp. "
|
||||||
PICTURE ".2"
|
PICTURE ".2"
|
||||||
FIELD R2
|
FIELD R2
|
||||||
NUM_EXPR {(#THIS>0) && (#THIS<=100)}
|
NUM_EXPR {(#THIS>0) && (#THIS<=100)}
|
||||||
@ -389,7 +402,7 @@ END
|
|||||||
|
|
||||||
NUMBER TCF_COMMINPS 6
|
NUMBER TCF_COMMINPS 6
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 30 19 "Quota a carico del committente "
|
PROMPT 30 20 "Quota a carico del committente "
|
||||||
PICTURE ".2"
|
PICTURE ".2"
|
||||||
FIELD R3
|
FIELD R3
|
||||||
NUM_EXPR {(#THIS>=0) && (#THIS<=100)}
|
NUM_EXPR {(#THIS>=0) && (#THIS<=100)}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
// batb%ent.h
|
// batb%ent.h
|
||||||
|
|
||||||
#define F_CODENTE 101
|
#define F_CODENTE 201
|
||||||
#define F_DESCR 102
|
#define F_DESCR 202
|
||||||
|
#define F_COCU 203
|
||||||
|
#define F_COFI 204
|
||||||
|
#define F_CODICI 301
|
||||||
|
@ -4,13 +4,13 @@ TOOLBAR "" 0 0 0 2
|
|||||||
#include <relapbar.h>
|
#include <relapbar.h>
|
||||||
ENDPAGE
|
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
|
BEGIN
|
||||||
PROMPT 4 1 "Codice Ente "
|
PROMPT 4 1 "Codice Ente "
|
||||||
FIELD LF_TABCOM->CODTAB
|
FIELD CODTAB
|
||||||
HELP "Inserire il codice dell' ente"
|
HELP "Inserire il codice dell'Ente"
|
||||||
USE %ENT
|
USE %ENT
|
||||||
CHECKTYPE REQUIRED
|
CHECKTYPE REQUIRED
|
||||||
INPUT CODTAB F_CODENTE
|
INPUT CODTAB F_CODENTE
|
||||||
@ -19,16 +19,84 @@ BEGIN
|
|||||||
OUTPUT F_CODENTE CODTAB
|
OUTPUT F_CODENTE CODTAB
|
||||||
OUTPUT F_DESCR S0
|
OUTPUT F_DESCR S0
|
||||||
KEY 1
|
KEY 1
|
||||||
FLAGS "RZ"
|
FLAGS "U"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_DESCR 60
|
STRING F_DESCR 60
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 3 "Denominazione "
|
PROMPT 4 2 "Denominazione "
|
||||||
FIELD LF_TABCOM->S0
|
FIELD S0
|
||||||
HELP "Inserire la descrizione dell'Ente"
|
HELP "Inserire la descrizione dell'Ente"
|
||||||
WARNING "Manca la denominazione"
|
WARNING "Manca la denominazione"
|
||||||
CHECKTYPE REQUIRED
|
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
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
144
|
144
|
||||||
1
|
1
|
||||||
m770/quadrola|0|0|248|0|Quadro LA 770|||
|
m770/quadrola|0|0|312|0|Quadro LA 770|||
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
144
|
144
|
||||||
22
|
27
|
||||||
CODDITTA|3|5|0|Codice ditta
|
CODDITTA|3|5|0|Codice ditta
|
||||||
TIPOA|1|1|0|Tipo anagrafica (Sempre 'F')
|
TIPOA|1|1|0|Tipo anagrafica (Sempre 'F')
|
||||||
CODANAGR|3|5|0|Codice anagrafica
|
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.
|
SOMREGCONV|4|18|3|Somme non soggette a ritenuta per reg. conv.
|
||||||
CTINPSEROG|4|18|3|Contribuiti previdenziali a carico dell'erogante
|
CTINPSEROG|4|18|3|Contribuiti previdenziali a carico dell'erogante
|
||||||
CTINPSPERC|4|18|3|Contribuiti previdenziali a carico del percipiente
|
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
|
GENERATA|8|1|0|Riga generata dalle schede
|
||||||
1
|
1
|
||||||
CODDITTA+TIPOA+CODANAGR+NPROG|
|
CODDITTA+TIPOA+CODANAGR+NPROG|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
38
|
38
|
||||||
1
|
1
|
||||||
m770/perc|0|0|30|4|Dati percipienti|#6||
|
m770/perc|0|0|40|4|Dati percipienti|#6||
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
38
|
38
|
||||||
4
|
6
|
||||||
CODDITTA|3|5|0|
|
CODDITTA|3|5|0|
|
||||||
TIPOA|1|1|0|
|
TIPOA|1|1|0|
|
||||||
CODANAGR|3|5|0|
|
CODANAGR|3|5|0|
|
||||||
FATTBIL|4|18|2|
|
FATTBIL|4|18|2|
|
||||||
|
ENTEPREV|1|8|0|
|
||||||
|
CATEGORIA|1|2|0|
|
||||||
1
|
1
|
||||||
CODDITTA+TIPOA+CODANAGR|
|
CODDITTA+TIPOA+CODANAGR|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user