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
@ -17,8 +17,8 @@ static TFixed_string tmp (__tmp, MAXSTR);
|
||||
|
||||
class BA6200_application : public TPrintapp
|
||||
{
|
||||
TRelation* _rel;
|
||||
TMask* _msk;
|
||||
TRelation* _rel;
|
||||
TMask* _msk;
|
||||
TLocalisamfile* _comuni;
|
||||
TParagraph_string * _descr_comune;
|
||||
|
||||
@ -27,7 +27,7 @@ class BA6200_application : public TPrintapp
|
||||
TString _codistat;
|
||||
int _uffiidd1, _uffiidd2, _uffiidd3, _uffiva1, _uffiva2, _uffiva3;
|
||||
int _uffreg, _uffconc, _uffcserv, _uffesprov, _uffescom, _terrmon;
|
||||
real _alqici;
|
||||
bool _stampa_alici;
|
||||
TDate _data_stampa;
|
||||
|
||||
protected:
|
||||
@ -46,16 +46,18 @@ public:
|
||||
|
||||
bool BA6200_application::preprocess_page(int file, int counter)
|
||||
{
|
||||
|
||||
|
||||
static bool first = TRUE;
|
||||
reset_print();
|
||||
|
||||
if (counter)
|
||||
return TRUE;
|
||||
|
||||
if (file == LF_COMUNI)
|
||||
{
|
||||
{
|
||||
first = TRUE;
|
||||
_provcom = current_cursor()->curr(LF_COMUNI).get(COM_PROVCOM);
|
||||
|
||||
|
||||
if ((_provcom == _provcom_msk) || (_provcom_msk == ""))
|
||||
{
|
||||
_com = current_cursor()->curr(LF_COMUNI).get(COM_COM);
|
||||
@ -74,58 +76,69 @@ bool BA6200_application::preprocess_page(int file, int counter)
|
||||
_uffcserv = current_cursor()->curr(LF_COMUNI).get_int(COM_UFFCSERV);
|
||||
_uffesprov = current_cursor()->curr(LF_COMUNI).get_int(COM_UFFESPROV);
|
||||
_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);
|
||||
|
||||
|
||||
setta_righe_descr(_descr_comune);
|
||||
|
||||
|
||||
set_row (1,"@0g%4s", (const char*) _com);
|
||||
set_row (1,"@33g%5s", (const char*) _provcom);
|
||||
set_row (1,"@39g%5s", (const char*) _capcom);
|
||||
set_row (1,"@46g%6s", (const char*) _codistat);
|
||||
set_row (1,"@54g%r", &_alqici);
|
||||
|
||||
if (_terrmon != 0)
|
||||
set_row (1,"@63g%d", _terrmon);
|
||||
set_row (1,"@56g%d", _terrmon);
|
||||
|
||||
if (_uffiidd1 != 0)
|
||||
set_row (1,"@72g%03d", _uffiidd1);
|
||||
set_row (1,"@65g%03d", _uffiidd1);
|
||||
|
||||
if (_uffiidd2 != 0)
|
||||
set_row (1,"@76g%03d", _uffiidd2);
|
||||
set_row (1,"@69g%03d", _uffiidd2);
|
||||
|
||||
if (_uffiidd3 != 0)
|
||||
set_row (1,"@80g%03d", _uffiidd3);
|
||||
set_row (1,"@73g%03d", _uffiidd3);
|
||||
|
||||
if (_uffiva1 != 0)
|
||||
set_row (1,"@85g%03d", _uffiva1);
|
||||
set_row (1,"@78g%03d", _uffiva1);
|
||||
|
||||
if (_uffiva2 != 0)
|
||||
set_row (1,"@89g%03d", _uffiva2);
|
||||
set_row (1,"@82g%03d", _uffiva2);
|
||||
|
||||
if (_uffiva3 != 0)
|
||||
set_row (1,"@93g%03d", _uffiva3);
|
||||
set_row (1,"@86g%03d", _uffiva3);
|
||||
|
||||
if (_uffreg != 0)
|
||||
set_row (1,"@98g%03d", _uffreg);
|
||||
set_row (1,"@92g%03d", _uffreg);
|
||||
|
||||
if (_uffconc != 0)
|
||||
set_row (1,"@104g%03d", _uffconc);
|
||||
set_row (1,"@97g%03d", _uffconc);
|
||||
|
||||
if (_uffcserv != 0)
|
||||
set_row (1,"@110g%03d", _uffcserv);
|
||||
set_row (1,"@103g%03d", _uffcserv);
|
||||
|
||||
if (_uffesprov != 0)
|
||||
set_row (1,"@115g%03d", _uffesprov);
|
||||
set_row (1,"@108g%03d", _uffesprov);
|
||||
|
||||
if (_uffescom != 0)
|
||||
set_row (1,"@119g%03d", _uffescom);
|
||||
set_row (1,"@112g%03d", _uffescom);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
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;
|
||||
}
|
||||
|
||||
@ -157,7 +170,13 @@ bool BA6200_application::set_print(int)
|
||||
_data_stampa = _msk->get (F_DATA);
|
||||
int scelta = _msk->get_int (F_SCELTA);
|
||||
_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)
|
||||
{
|
||||
statoini = _msk->get(F_STATOINI);
|
||||
@ -165,9 +184,6 @@ bool BA6200_application::set_print(int)
|
||||
statofine = _msk->get(F_STATOFINE);
|
||||
codicefine = _msk->get(F_CODICEFINE);
|
||||
|
||||
reset_files(); //resetta l'albero di stampa
|
||||
add_file(LF_COMUNI);
|
||||
|
||||
select_cursor(_cur1);
|
||||
TLocalisamfile& fl = current_cursor()->file(LF_COMUNI);
|
||||
TRectype da (fl.curr());
|
||||
@ -178,7 +194,7 @@ bool BA6200_application::set_print(int)
|
||||
|
||||
da.put(COM_STATO,statoini);
|
||||
da.put(COM_COM ,codiceini);
|
||||
|
||||
|
||||
a.put(COM_STATO,statofine);
|
||||
a.put(COM_COM ,codicefine);
|
||||
|
||||
@ -189,24 +205,21 @@ bool BA6200_application::set_print(int)
|
||||
{
|
||||
denomini = _msk->get(F_NOMEINI);
|
||||
denomfine = _msk->get(F_NOMEFINE);
|
||||
|
||||
select_cursor(_cur2);
|
||||
|
||||
reset_files();
|
||||
add_file(LF_COMUNI);
|
||||
|
||||
select_cursor(_cur2);
|
||||
|
||||
TLocalisamfile& fl = current_cursor()->file(LF_COMUNI);
|
||||
TRectype da (fl.curr());
|
||||
TRectype a (fl.curr());
|
||||
|
||||
|
||||
da.zero();
|
||||
a.zero();
|
||||
|
||||
|
||||
da.put(COM_DENCOM, denomini);
|
||||
|
||||
|
||||
a.put (COM_DENCOM, denomfine);
|
||||
|
||||
current_cursor()->setregion(da, a);
|
||||
|
||||
current_cursor()->setregion(da, a);
|
||||
}
|
||||
|
||||
//set_print_zero();
|
||||
@ -231,7 +244,7 @@ void BA6200_application::crea_intestazione()
|
||||
sep << "Pag. @#";
|
||||
sep.right_just(132);
|
||||
set_header (2,(const char*) sep);
|
||||
|
||||
|
||||
set_header (2,"@0gARCHIVIO COMUNI@91gSTUDIO@104gDATA");
|
||||
data_stampa = _data_stampa.string();
|
||||
set_header (2,"@109g%10s", (const char*) data_stampa);
|
||||
@ -239,16 +252,17 @@ void BA6200_application::crea_intestazione()
|
||||
sep = "";
|
||||
sep.fill('-');
|
||||
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,"@45g--------@54g------@61g-----@72g-----------");
|
||||
set_header (6,"@85g------------@97g-----@103g-----@109g-----@115g-------");
|
||||
set_header (6,"@45g--------@54g-----@65g-----------");
|
||||
set_header (6,"@78g------------@90g-----@96g-----@102g-----@108g-------");
|
||||
}
|
||||
|
||||
bool BA6200_application::user_create()
|
||||
{
|
||||
_rel = new TRelation (LF_COMUNI);
|
||||
_rel->add(LF_ALICI, "COM=COM");
|
||||
|
||||
_cur1 = add_cursor(new TCursor(_rel,"",1));
|
||||
|
||||
|
@ -12,5 +12,6 @@
|
||||
#define F_NOME 109
|
||||
#define F_PROVCOM 110
|
||||
#define F_DATA 111
|
||||
#define F_STAMPAALICI 112
|
||||
|
||||
#endif // __BA6200_H
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "ba6200.h"
|
||||
|
||||
PAGE "" -1 -1 65 14
|
||||
PAGE "" -1 -1 65 16
|
||||
|
||||
RADIOBUTTON F_SCELTA 25
|
||||
BEGIN
|
||||
@ -119,6 +119,12 @@ BEGIN
|
||||
FLAGS "U"
|
||||
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
|
||||
BEGIN
|
||||
PROMPT -12 -2 ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user