Modificata stampa aliquote I.C.I
git-svn-id: svn://10.65.10.50/trunk@1382 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3b7a9f52df
commit
dafee48347
@ -27,7 +27,7 @@ class BA6200_application : public TPrintapp
|
|||||||
TString _codistat;
|
TString _codistat;
|
||||||
int _uffiidd1, _uffiidd2, _uffiidd3, _uffiva1, _uffiva2, _uffiva3;
|
int _uffiidd1, _uffiidd2, _uffiidd3, _uffiva1, _uffiva2, _uffiva3;
|
||||||
int _uffreg, _uffconc, _uffcserv, _uffesprov, _uffescom, _terrmon;
|
int _uffreg, _uffconc, _uffcserv, _uffesprov, _uffescom, _terrmon;
|
||||||
real _alqici;
|
bool _stampa_alici;
|
||||||
TDate _data_stampa;
|
TDate _data_stampa;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -47,6 +47,7 @@ public:
|
|||||||
bool BA6200_application::preprocess_page(int file, int counter)
|
bool BA6200_application::preprocess_page(int file, int counter)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
static bool first = TRUE;
|
||||||
reset_print();
|
reset_print();
|
||||||
|
|
||||||
if (counter)
|
if (counter)
|
||||||
@ -54,6 +55,7 @@ bool BA6200_application::preprocess_page(int file, int counter)
|
|||||||
|
|
||||||
if (file == LF_COMUNI)
|
if (file == LF_COMUNI)
|
||||||
{
|
{
|
||||||
|
first = TRUE;
|
||||||
_provcom = current_cursor()->curr(LF_COMUNI).get(COM_PROVCOM);
|
_provcom = current_cursor()->curr(LF_COMUNI).get(COM_PROVCOM);
|
||||||
|
|
||||||
if ((_provcom == _provcom_msk) || (_provcom_msk == ""))
|
if ((_provcom == _provcom_msk) || (_provcom_msk == ""))
|
||||||
@ -74,7 +76,6 @@ bool BA6200_application::preprocess_page(int file, int counter)
|
|||||||
_uffcserv = current_cursor()->curr(LF_COMUNI).get_int(COM_UFFCSERV);
|
_uffcserv = current_cursor()->curr(LF_COMUNI).get_int(COM_UFFCSERV);
|
||||||
_uffesprov = current_cursor()->curr(LF_COMUNI).get_int(COM_UFFESPROV);
|
_uffesprov = current_cursor()->curr(LF_COMUNI).get_int(COM_UFFESPROV);
|
||||||
_uffescom = current_cursor()->curr(LF_COMUNI).get_int(COM_UFFESCOM);
|
_uffescom = current_cursor()->curr(LF_COMUNI).get_int(COM_UFFESCOM);
|
||||||
_alqici = current_cursor()->curr(LF_COMUNI).get_real(COM_ALIQICI);
|
|
||||||
_terrmon = current_cursor()->curr(LF_COMUNI).get_int(COM_TERRMON);
|
_terrmon = current_cursor()->curr(LF_COMUNI).get_int(COM_TERRMON);
|
||||||
|
|
||||||
setta_righe_descr(_descr_comune);
|
setta_righe_descr(_descr_comune);
|
||||||
@ -83,49 +84,61 @@ bool BA6200_application::preprocess_page(int file, int counter)
|
|||||||
set_row (1,"@33g%5s", (const char*) _provcom);
|
set_row (1,"@33g%5s", (const char*) _provcom);
|
||||||
set_row (1,"@39g%5s", (const char*) _capcom);
|
set_row (1,"@39g%5s", (const char*) _capcom);
|
||||||
set_row (1,"@46g%6s", (const char*) _codistat);
|
set_row (1,"@46g%6s", (const char*) _codistat);
|
||||||
set_row (1,"@54g%r", &_alqici);
|
|
||||||
|
|
||||||
if (_terrmon != 0)
|
if (_terrmon != 0)
|
||||||
set_row (1,"@63g%d", _terrmon);
|
set_row (1,"@56g%d", _terrmon);
|
||||||
|
|
||||||
if (_uffiidd1 != 0)
|
if (_uffiidd1 != 0)
|
||||||
set_row (1,"@72g%03d", _uffiidd1);
|
set_row (1,"@65g%03d", _uffiidd1);
|
||||||
|
|
||||||
if (_uffiidd2 != 0)
|
if (_uffiidd2 != 0)
|
||||||
set_row (1,"@76g%03d", _uffiidd2);
|
set_row (1,"@69g%03d", _uffiidd2);
|
||||||
|
|
||||||
if (_uffiidd3 != 0)
|
if (_uffiidd3 != 0)
|
||||||
set_row (1,"@80g%03d", _uffiidd3);
|
set_row (1,"@73g%03d", _uffiidd3);
|
||||||
|
|
||||||
if (_uffiva1 != 0)
|
if (_uffiva1 != 0)
|
||||||
set_row (1,"@85g%03d", _uffiva1);
|
set_row (1,"@78g%03d", _uffiva1);
|
||||||
|
|
||||||
if (_uffiva2 != 0)
|
if (_uffiva2 != 0)
|
||||||
set_row (1,"@89g%03d", _uffiva2);
|
set_row (1,"@82g%03d", _uffiva2);
|
||||||
|
|
||||||
if (_uffiva3 != 0)
|
if (_uffiva3 != 0)
|
||||||
set_row (1,"@93g%03d", _uffiva3);
|
set_row (1,"@86g%03d", _uffiva3);
|
||||||
|
|
||||||
if (_uffreg != 0)
|
if (_uffreg != 0)
|
||||||
set_row (1,"@98g%03d", _uffreg);
|
set_row (1,"@92g%03d", _uffreg);
|
||||||
|
|
||||||
if (_uffconc != 0)
|
if (_uffconc != 0)
|
||||||
set_row (1,"@104g%03d", _uffconc);
|
set_row (1,"@97g%03d", _uffconc);
|
||||||
|
|
||||||
if (_uffcserv != 0)
|
if (_uffcserv != 0)
|
||||||
set_row (1,"@110g%03d", _uffcserv);
|
set_row (1,"@103g%03d", _uffcserv);
|
||||||
|
|
||||||
if (_uffesprov != 0)
|
if (_uffesprov != 0)
|
||||||
set_row (1,"@115g%03d", _uffesprov);
|
set_row (1,"@108g%03d", _uffesprov);
|
||||||
|
|
||||||
if (_uffescom != 0)
|
if (_uffescom != 0)
|
||||||
set_row (1,"@119g%03d", _uffescom);
|
set_row (1,"@112g%03d", _uffescom);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
if (file == LF_ALICI)
|
||||||
|
{
|
||||||
|
if (_rel->lfile().get("STATO").empty())
|
||||||
|
{
|
||||||
|
int i = 1;
|
||||||
|
if (first)
|
||||||
|
set_row (i++,"@7I.C.I. @15gAnno@21gAliquota@31gDetrazioni", FLD(LF_ALICI, "ANNO"), FLD(LF_ALICI, "ALIQ", "##,###"));
|
||||||
|
set_row (1,"@15g@n@23@pn@30g@pn", FLD(LF_ALICI, "ANNO", "####"), FLD(LF_ALICI, "ALIQ", "##,###"), FLD(LF_ALICI,"DETR","###.###.###"));
|
||||||
|
first = FALSE;
|
||||||
|
}
|
||||||
|
else return FALSE;
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,6 +170,12 @@ bool BA6200_application::set_print(int)
|
|||||||
_data_stampa = _msk->get (F_DATA);
|
_data_stampa = _msk->get (F_DATA);
|
||||||
int scelta = _msk->get_int (F_SCELTA);
|
int scelta = _msk->get_int (F_SCELTA);
|
||||||
_provcom_msk = _msk->get (F_PROVCOM);
|
_provcom_msk = _msk->get (F_PROVCOM);
|
||||||
|
_stampa_alici = _msk->get_bool(F_STAMPAALICI);
|
||||||
|
|
||||||
|
reset_files();
|
||||||
|
add_file(LF_COMUNI);
|
||||||
|
if (_stampa_alici)
|
||||||
|
add_file(LF_ALICI);
|
||||||
|
|
||||||
if (scelta == 1)
|
if (scelta == 1)
|
||||||
{
|
{
|
||||||
@ -165,9 +184,6 @@ bool BA6200_application::set_print(int)
|
|||||||
statofine = _msk->get(F_STATOFINE);
|
statofine = _msk->get(F_STATOFINE);
|
||||||
codicefine = _msk->get(F_CODICEFINE);
|
codicefine = _msk->get(F_CODICEFINE);
|
||||||
|
|
||||||
reset_files(); //resetta l'albero di stampa
|
|
||||||
add_file(LF_COMUNI);
|
|
||||||
|
|
||||||
select_cursor(_cur1);
|
select_cursor(_cur1);
|
||||||
TLocalisamfile& fl = current_cursor()->file(LF_COMUNI);
|
TLocalisamfile& fl = current_cursor()->file(LF_COMUNI);
|
||||||
TRectype da (fl.curr());
|
TRectype da (fl.curr());
|
||||||
@ -192,9 +208,6 @@ bool BA6200_application::set_print(int)
|
|||||||
|
|
||||||
select_cursor(_cur2);
|
select_cursor(_cur2);
|
||||||
|
|
||||||
reset_files();
|
|
||||||
add_file(LF_COMUNI);
|
|
||||||
|
|
||||||
TLocalisamfile& fl = current_cursor()->file(LF_COMUNI);
|
TLocalisamfile& fl = current_cursor()->file(LF_COMUNI);
|
||||||
TRectype da (fl.curr());
|
TRectype da (fl.curr());
|
||||||
TRectype a (fl.curr());
|
TRectype a (fl.curr());
|
||||||
@ -240,15 +253,16 @@ void BA6200_application::crea_intestazione()
|
|||||||
sep.fill('-');
|
sep.fill('-');
|
||||||
set_header (3, (const char *) sep);
|
set_header (3, (const char *) sep);
|
||||||
|
|
||||||
set_header(5,"@0gCodice@7gDenominazione@33gProv.@40gCap@45gCd.Istat@54gAl.ICI@61gMont.@67gUff.@74gII.DD.@87gI.V.A.@97gRegi.@103gConc.@109gServ.@115gEsatt.");
|
set_header(5,"@0gCodice@7gDenominazione@33gProv.@40gCap@45gCd.Istat@54gMont.@60gUff.@67gII.DD.@80gI.V.A.@92gRegi.@96gConc.@102gServ.@108gEsatt.");
|
||||||
set_header (6,"@0g------@7g-------------------------@33g-----@39g-----");
|
set_header (6,"@0g------@7g-------------------------@33g-----@39g-----");
|
||||||
set_header (6,"@45g--------@54g------@61g-----@72g-----------");
|
set_header (6,"@45g--------@54g-----@65g-----------");
|
||||||
set_header (6,"@85g------------@97g-----@103g-----@109g-----@115g-------");
|
set_header (6,"@78g------------@90g-----@96g-----@102g-----@108g-------");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BA6200_application::user_create()
|
bool BA6200_application::user_create()
|
||||||
{
|
{
|
||||||
_rel = new TRelation (LF_COMUNI);
|
_rel = new TRelation (LF_COMUNI);
|
||||||
|
_rel->add(LF_ALICI, "COM=COM");
|
||||||
|
|
||||||
_cur1 = add_cursor(new TCursor(_rel,"",1));
|
_cur1 = add_cursor(new TCursor(_rel,"",1));
|
||||||
|
|
||||||
|
@ -12,5 +12,6 @@
|
|||||||
#define F_NOME 109
|
#define F_NOME 109
|
||||||
#define F_PROVCOM 110
|
#define F_PROVCOM 110
|
||||||
#define F_DATA 111
|
#define F_DATA 111
|
||||||
|
#define F_STAMPAALICI 112
|
||||||
|
|
||||||
#endif // __BA6200_H
|
#endif // __BA6200_H
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "ba6200.h"
|
#include "ba6200.h"
|
||||||
|
|
||||||
PAGE "" -1 -1 65 14
|
PAGE "" -1 -1 65 16
|
||||||
|
|
||||||
RADIOBUTTON F_SCELTA 25
|
RADIOBUTTON F_SCELTA 25
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -119,6 +119,12 @@ BEGIN
|
|||||||
FLAGS "U"
|
FLAGS "U"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_STAMPAALICI
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 11 "Stampa le aliquote I.C.I. "
|
||||||
|
HELP "Stampa anche le aliquote I.C.I. dei vari comuni"
|
||||||
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 9 2
|
BUTTON DLG_OK 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -12 -2 ""
|
PROMPT -12 -2 ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user