ba*.cpp Tolti include inutili

ba3500.cpp Corretta creazione della prima unita' locale
ba610?.cpp Corretti vari errori segnalati sul fax dalla Cecilia


git-svn-id: svn://10.65.10.50/trunk@5668 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1997-11-27 11:14:52 +00:00
parent 185fb663f3
commit dcd9df026d
13 changed files with 147 additions and 151 deletions

View File

@ -1,7 +1,6 @@
#include <config.h>
#include <printer.h>
#include <tabapp.h>
#include <tabutil.h>
#include "../cg/cglib03.h"
#include "batbreg.h"

View File

@ -331,7 +331,7 @@ int BA3500_application::cancella(long items)
for (long i = 0; i < items; i++)
{
tab_inl.zero();
dep = format ("%04d", anno);
dep.format("%04d", anno);
dep << format ("%-3s" , (const char*) codlib);
dep << format ("%6d" , i);
tab_inl.put("CODTAB", dep);

View File

@ -1,6 +1,5 @@
#include <relapp.h>
#include <msksheet.h>
#include <stdtypes.h>
#include "ba4.h"
#include "ba4100.h"

View File

@ -1,12 +1,10 @@
#include <config.h>
#include <defmask.h>
#include <execp.h>
#include <golem.h>
#include <mask.h>
#include <mailbox.h>
#include <relapp.h>
#include <tabutil.h>
#include <utility.h>
#include <urldefid.h>
#include <validate.h>
#include "ba4.h"
@ -81,20 +79,16 @@ bool TPersone_app::ba4200_handler(TMask& m, KEY k)
if (k != K_F5 || m.mode() != MODE_MOD) return TRUE;
TToken_string body(16);
body.add(format("%d", FLD_GD1_CODDITTAH));
if ( app.tip_ana() == TFIS )
{
body.add(format("%d=F", FLD_GD1_TIPOA));
body.add(format("%d=%s", FLD_GD1_CODANAGR, (const char*) app.cod_ana()));
}
else
{
body.add(format("%d=G", FLD_GD1_TIPOA));
body.add(format("%d=%s", FLD_GD1_CODANAGR, (const char*) app.cod_ana()));
}
TString16 cmd("ba4 -2");
TMessage msg(cmd2name(cmd), MSG_FS, (const char*) body);
body.add(FLD_GD1_CODDITTAH);
body.add(FLD_GD1_TIPOA);
body << '=' << app.tip_ana();
body.add(FLD_GD1_CODANAGR);
body << '=' << app.cod_ana();
const TString16 cmd("ba4 -2");
TMessage msg(cmd, MSG_FS, body);
msg.send();
TExternal_app a(cmd);
a.run();
@ -107,10 +101,6 @@ bool TPersone_app::fax_handler(TMask_field& f, KEY k)
bool ok = TRUE;
if (k == K_SPACE)
{
// TConfig ini(CONFIG_USER, "Link");
// TFilename editor = ini.get("Editor", NULL, -1, "notepad");
// TExternal_app app(editor);
// ok = app.run(TRUE, FALSE) == 0;
TFilename msg; msg.temp(NULL, "txt");
ofstream msgf(msg);
msgf.close();
@ -165,7 +155,6 @@ void TPersone_app::init_query_mode(TMask& m)
}
const char* TPersone_app::get_next_key()
{
TLocalisamfile& anag = get_relation()->lfile() ;
long cod_anagr = 1;

View File

@ -1,13 +1,11 @@
#include <config.h>
#include <defmask.h>
#include <execp.h>
#include <golem.h>
#include <mailbox.h>
#include <prefix.h>
#include <relapp.h>
#include <tabutil.h>
#include <utility.h>
#include <modaut.h>
#include <urldefid.h>
#include "ba4.h"
#include "ba4300.h"
@ -148,7 +146,7 @@ bool ba4300_handler(TMask& m, KEY k)
body << "|" << fld1 << "=" ;
if (fldbrowse || fld)
{
TMessage msg(cmd2name(appname), MSG_FS, (const char*) body);
TMessage msg(appname, MSG_FS, body);
TMailbox mb;
mb.send(msg);
@ -174,10 +172,11 @@ bool TDitte_application::fax_handler(TMask_field& f, KEY k)
bool ok = TRUE;
if (k == K_SPACE)
{
TConfig ini(CONFIG_USER, "Link");
TFilename editor = ini.get("Editor", NULL, -1, "notepad");
TExternal_app app(editor);
ok = app.run(TRUE, FALSE) == 0;
TFilename msg; msg.temp(NULL, "txt");
ofstream msgf(msg);
msgf.close();
ok = goto_url(msg);
if (ok)
{
const TDitte_application& app = (const TDitte_application&)main_app();
@ -286,40 +285,24 @@ int TDitte_application::write(const TMask& m)
const int err = TRelation_application::write(m);
if (err == NOERR)
{
TRectype& ditte=_rel->curr();
TString codditta(ditte.get(CODDITTA)) ;
set_att_prev(m);
const TRectype& ditte = _rel->curr();
_anag->zero() ;
_anag->put(TIPOA, ditte.get(TIPOA));
_anag->put(CODANAGR, ditte.get(CODANAGR));
_anag->read();
if (_anag->good())
if (_anag->read() == NOERR)
{
_unloc->zero() ;
_unloc->put(CODDITTA, (const char*) codditta) ;
_unloc->put(CODULC, (int) 1) ;
TString s(_anag->get(COMRF));
if (s.empty())
{
_unloc->put(COMULC, _anag->get(COMRES));
_unloc->put(INDULC, _anag->get(INDRES));
_unloc->put(CIVULC, _anag->get(CIVRES));
_unloc->put(CAPULC, _anag->get(CAPRES));
_unloc->put(COMCCIAA, _anag->get(COMRES));
_unloc->put(COMTRIB, _anag->get(COMRES));
}
else
{
_unloc->put(COMULC, (const char*) s);
_unloc->put(INDULC, _anag->get(INDRF));
_unloc->put(CIVULC, _anag->get(CIVRF));
_unloc->put(CAPULC, _anag->get(CAPRF));
_unloc->put(COMCCIAA, (const char*) s);
_unloc->put(COMTRIB, (const char*) s);
}
_unloc->put(CODDITTA, ditte.get(CODDITTA)) ;
_unloc->put(CODULC, 1);
_unloc->put(COMULC, _anag->get(COMRES));
_unloc->put(INDULC, _anag->get(INDRES));
_unloc->put(CIVULC, _anag->get(CIVRES));
_unloc->put(CAPULC, _anag->get(CAPRES));
_unloc->put(COMCCIAA, _anag->get(COMRES));
_unloc->put(COMTRIB, _anag->get(COMRES));
_unloc->write();
}
}

View File

@ -1,6 +1,5 @@
#include <relapp.h>
#include <stdtypes.h>
#include <lffiles.h>
#include "ba4.h"
#include "ba4400.h"

View File

@ -1,6 +1,4 @@
#include <relapp.h>
#include <stdtypes.h>
#include <lffiles.h>
#include "ba4.h"
#include "ba4500.h"

View File

@ -1,6 +1,4 @@
#include <relapp.h>
#include <stdtypes.h>
#include <utility.h>
#include "ba4.h"
#include "ba4600.h"
@ -12,8 +10,8 @@ class TSoci_application : public TRelation_application
TLocalisamfile* _anag;
TLocalisamfile* _ditte;
bool user_create() ;
bool user_destroy() ;
virtual bool user_create() ;
virtual bool user_destroy() ;
virtual TMask* get_mask(int mode) { return _msk;}
virtual bool changing_mask(int mode) { return FALSE;}
virtual TRelation* get_relation() const { return _rel;}
@ -32,7 +30,6 @@ public:
};
void TSoci_application::init_query_mode(TMask& m)
{
m.show(FLD_SC1_CODANAGRSOH);
m.hide(FLD_SC1_CODANAGRSO);
@ -43,7 +40,6 @@ void TSoci_application::init_query_mode(TMask& m)
void TSoci_application::init_query_insert_mode(TMask& m)
{
m.show(FLD_SC1_CODANAGRSO);
m.hide(FLD_SC1_CODANAGRSOH);
@ -52,7 +48,6 @@ void TSoci_application::init_query_insert_mode(TMask& m)
}
void TSoci_application::init_modify_mode(TMask& m)
{
m.disable(FLD_SC1_CODANAGR_ANAGR_RAGSOC);
}
@ -62,7 +57,7 @@ void TSoci_application::update_ap_socio(const TMask& m)
int err = NOERR;
const char ap = (m.get(FLD_SC1_ANNO)[0] == 'A') ? 'P' : 'A';
if (yesno_box(format("Aggiornare il socio anche per l' anno %s?", ap == 'A' ? "in corso" : "precedente")))
if (yesno_box("Aggiornare il socio anche per l' anno %s?", ap == 'A' ? "in corso" : "precedente"))
{
_rel->save_status();
m.autosave(*_rel);
@ -98,7 +93,7 @@ bool TSoci_application::remove()
{
const char ap = (curr_mask().get(FLD_SC1_ANNO)[0] == 'A') ? 'P' : 'A';
if (yesno_box(format("Cancellare il socio anche per l' anno %s?", ap == 'A' ? "in corso" : "precedente")))
if (yesno_box("Cancellare il socio anche per l' anno %s?", ap == 'A' ? "in corso" : "precedente"))
{
_rel->save_status();
_rel->lfile().put("ATTPREC", ap);
@ -134,7 +129,7 @@ bool TSoci_application::user_destroy()
int ba4600(int argc, char* argv[])
{
TSoci_application a ;
TSoci_application a;
a.run(argc, argv, "Anagrafica Soci");
return 0;
}

View File

@ -1,6 +1,5 @@
#include <applicat.h>
#include <mask.h>
#include <isam.h>
#include <relation.h>
#include <sheet.h>
#include <utility.h>

View File

@ -1,7 +1,6 @@
#include <config.h>
#include <printer.h>
#include <relapp.h>
#include <tabutil.h>
#include "batbreg.h"
#include "tabreg.h"

View File

@ -11,13 +11,15 @@
// ------- utils --------------------------------------------
TRectype& TAnaprint_app::look_com(const char* cod)
const TRectype& TAnaprint_app::look_com(const char* cod, const char* sta)
{
TRectype& com = _comuni->curr();
com.zero();
if (cod && *cod)
{
com.put("COM",cod);
if (sta && *sta)
com.put("STATO",sta);
if (_comuni->read() != NOERR)
com.zero();
}
@ -126,7 +128,7 @@ bool TAnaprint_app::preprocess_page(int file, int counter)
if (!_phone.empty()) _phone << '/';
_phone << current_cursor()->curr(LF_ANAG).get("TELRF");
TRectype& cc = look_com(_com);
const TRectype& cc = look_com(_com);
_com = cc.get("DENCOM");
_cap = cc.get("CAPCOM");
_prov = cc.get("PROVCOM");
@ -172,7 +174,7 @@ void TAnaprint_app::preprocess_etichette()
_name = get_field(LF_ANAG,"RAGSOC");
_cod = get_field(LF_ANAG,"CODANAGR");
_cofi = get_field(LF_ANAG,"COFI");
TRectype& cc = look_com(get_field(LF_ANAG,"COMCORR"));
const TRectype& cc = look_com(get_field(LF_ANAG,"COMCORR"));
if (_cofi.empty())
_cofi = get_field(LF_ANAG,"PAIV");
@ -202,7 +204,7 @@ void TAnaprint_app::preprocess_etichette()
_civ = get_field(LF_ANAG,"CIVRF");
_stato = "" ; // look_tab("%STA",get_field(LF_ANAG,"STATORF"));
_cap = get_field(LF_ANAG,"CAPRF");
cc = look_com(get_field(LF_ANAG,"COMRF"));
look_com(get_field(LF_ANAG,"COMRF"));
_loc = "";
_com = cc.get("DENCOM");
_prov = cc.get("PROVCOM");
@ -214,9 +216,9 @@ void TAnaprint_app::preprocess_etichette()
case residenza:
_address = get_field(LF_ANAG,"INDRES");
_civ = get_field(LF_ANAG,"CIVRES");
_stato = ""; //look_tab("%STA",get_field(LF_ANAG,"STATORES"));
_stato = get_field(LF_ANAG,"STATORES");
_cap = get_field(LF_ANAG,"CAPRES");
cc = look_com(get_field(LF_ANAG,"COMRES"));
look_com(get_field(LF_ANAG,"COMRES"), _stato);
_loc = "";
_com = cc.get("DENCOM");
_prov = cc.get("PROVCOM");

View File

@ -66,7 +66,7 @@ public:
int cgiu() { return _sort == 1 ? _cgiu1 : _cgiu2; }
int cdit() { return _sort == 1 ? _cdit1 : _cdit2; }
TRectype& look_com(const char* cod);
const TRectype& look_com(const char* cod, const char* sta = NULL);
const char* look_tab(const char* tabname, const char* cod,
const char* fld = "S0");

View File

@ -33,15 +33,18 @@ void TAnaprint_app::set_scheda_anagiu()
FLD(LF_ANAG,"INDRES"),
FLD(LF_ANAG,"CIVRES"));
TString com = current_cursor()->curr(LF_ANAG).get("COMRES");
TRectype& cc = look_com(com);
TString com = get_field(LF_ANAG, "COMRES");
TString sta = get_field(LF_ANAG, "STATORES");
const TRectype& cc = look_com(com, sta);
TString a = cc.get("DENCOM");
TString b = cc.get("CAPCOM");
TString c = cc.get("PROVCOM");
set_row(row++,"@20gComune %s %-24s@58gProv. %2s@68gCAP %5s",
(const char*)com, (const char*)a, (const char*)c, (const char*)b);
a = sta.empty() ? "Italia" : look_tab("%STA",sta);
set_row(row++,"@20gStato %s",(const char*)a);
set_row(row++,"@20gTelefono @u@10s@r/@u@30s@r",
FLD(LF_ANAG,"PTELRF"),
FLD(LF_ANAG,"TELRF"));
@ -52,7 +55,7 @@ void TAnaprint_app::set_scheda_anagiu()
FLD(LF_ANAG,"CIVRF"));
com = current_cursor()->curr(LF_ANAG).get("COMRF");
cc = look_com(com);
look_com(com);
a = cc.get("DENCOM");
b = cc.get("CAPCOM");
c = cc.get("PROVCOM");
@ -65,8 +68,9 @@ void TAnaprint_app::set_scheda_anagiu()
FLD(LF_ANAG,"CIVCORR"),
FLD(LF_ANAG,"LOCCORR"));
com = current_cursor()->curr(LF_ANAG).get("COMCORR");
cc = look_com(com);
com = get_field(LF_ANAG, "COMCORR");
sta = get_field(LF_ANAG, "STATOCORR");
look_com(com, sta);
a = cc.get("DENCOM");
b = cc.get("CAPCOM");
c = cc.get("PROVCOM");
@ -74,12 +78,9 @@ void TAnaprint_app::set_scheda_anagiu()
set_row(row++,"@20gComune %s %-24s@58gProv. %2s@68gCAP %5s",
(const char*)com, (const char*)a, (const char*)c, (const char*)b);
com = current_cursor()->curr(LF_ANAG).get("STATOCORR");
if (com.empty())
a = "Italia";
else { a = look_tab("%STA",com,"S0"); }
a = sta.empty() ? "Italia" : look_tab("%STA",sta);
set_row(row++,"@20gStato %s",(const char*)a);
set_row(row++,"");
set_row(row++,"Telex@20g@u@10s@r/@u@30s@r",
FLD(LF_ANAG,"PTLEXRF"),
@ -93,7 +94,7 @@ void TAnaprint_app::set_scheda_anagiu()
FLD(LF_ANAG,"UFFIIDD","@@@"));
com = look_tab("%UID",get_field(LF_ANAG, "UFFIIDD"),"S6"); // Comune imposte dirette
c = look_tab("%UID",get_field(LF_ANAG, "UFFIIDD"),"S4"); // c.c. Esattoria
cc = look_com(com);
look_com(com);
a = cc.get("DENCOM");
b = cc.get("PROVCOM");
set_row(row++,"@20gComune %s %-24s@58gProv. %s",
@ -102,21 +103,16 @@ void TAnaprint_app::set_scheda_anagiu()
set_row(row++,"Ufficio IVA@20gNumero @pn",
FLD(LF_ANAG,"UFFIVA","@@@"));
com = look_tab("%UIV",get_field(LF_ANAG, "UFFIVA"),"S6");
cc = look_com(com);
look_com(com);
a = cc.get("DENCOM");
b = cc.get("PROVCOM");
set_row(row++,"@20gComune %s %-24s@58gProv. %s",
(const char*)com, (const char*)a, (const char*)b);
set_row(row++,"Esattoria@20gComunale @02s Provinciale @03s C.C. %s",
FLD(LF_ANAG,"CODCONTR",1,2), FLD(LF_ANAG,"CODCONTR",3,5), (const char*)c);
set_row(row++,"@20gComune %-24s@58gProv. %s",
(const char*)a,
(const char*)b);
set_row(row++,"@20gCodice contribuente @pn",
FLD(LF_ANAG,"CODCONTR", "@@ @@@ @@@@@@@@ @@"));
set_row(row++,"");
FLD(LF_ANAG,"CODCONTR",0,2), FLD(LF_ANAG,"CODCONTR",2,5), (const char*)c);
set_row(row++,"@20gCodice contribuente @8s @2s",
FLD(LF_ANAG,"CODCONTR", 5, 13), FLD(LF_ANAG,"CODCONTR", 13, 15));
//Qui la stampa dei dati conto fiscale
TString16 tipo_stampa;
@ -126,24 +122,39 @@ void TAnaprint_app::set_scheda_anagiu()
else tipo_stampa = "Distinta";
set_row(row++,"Dati conto fiscale @20gTitolare conto fiscale @54g@f @60gTipo stampa %s",
FLD(LF_ANAG,"TITCF"), (const char*) tipo_stampa);
set_row(row++,"@20gCodice ABI @pn @60gCAB @pn",
FLD(LF_ANAG,"CODABI","@@@@@"), FLD(LF_ANAG,"CODCAB","@@@@@"));
tipo_stampa = current_cursor()->curr(LF_ANAG).get("UFFCONC");
if (tipo_stampa.empty())
{
TString cod = current_cursor()->curr(LF_ANAG).get("COMRF");
TString cod = get_field(LF_ANAG, "COMRF");
TString sta;
if (cod.empty())
cod = current_cursor()->curr(LF_ANAG).get("COMRES");
{
cod = get_field(LF_ANAG, "COMRES");
sta = get_field(LF_ANAG, "STATORES");
}
if (cod.not_empty())
{
cc = look_com(cod);
look_com(cod, sta);
tipo_stampa = cc.get("UFFCONC");
}
}
set_row(row++,"@20gConto fiscale %s @s",
(const char*)tipo_stampa, FLD(LF_ANAG,"COFI"));
TString16 abicab = get_field(LF_ANAG, "CODABI");
if (abicab.not_empty() && abicab != "00000")
{
set_row(row++,"@20gABI %s@30g%s", (const char*)abicab, look_tab("%BAN", abicab));
const TString16 cab = get_field(LF_ANAG, "CODCAB");
if (cab.not_empty() && cab != "00000")
{
abicab << cab;
set_row(row++,"@20gCAB %s@30g%s",
(const char*)cab, look_tab("%BAN", abicab));
}
}
set_row(row++,"");
// dati atto costitutivo etc
set_row(row++,"Dati atto costitutivo e statuto");
@ -156,12 +167,11 @@ void TAnaprint_app::set_scheda_anagiu()
FLD(LF_ANAGGIU,"DATASCAD"));
TString cod = get_field(LF_ANAGGIU,"COMCOST");
cc = look_com(cod);
look_com(cod);
set_row(row++,"Luogo costituzione@20g%s %s", (const char*)cod, (const char*)cc.get("DENCOM"));
set_row(row++,"Termine appr. bilancio@25g@d@41gApprovazione bilancio@70g@d",
FLD(LF_ANAGGIU,"DATATAPPBI"),
FLD(LF_ANAGGIU,"DATAAPPBIL"));
FLD(LF_ANAGGIU,"DATATAPPBI"), FLD(LF_ANAGGIU,"DATAAPPBIL"));
set_row(row++,"Scad.org.amministrativo@25g@d@41gScadenza collegio "
"sindacale@70g@d",
FLD(LF_ANAGGIU,"DATASORAMM"), FLD(LF_ANAGGIU,"DATASCSIND"));
@ -237,7 +247,7 @@ void TAnaprint_app::set_scheda_anafis()
FLD(LF_ANAGFIS,"DATANASC"), FLD(LF_ANAGFIS,"SESSO"), FLD(LF_ANAGFIS,"NAZION"));
TString com = get_field(LF_ANAGFIS, "COMNASC");
TRectype& cc = look_com(com);
const TRectype& cc = look_com(com);
TString a = cc.get("DENCOM");
TString b; // CAPCOM
TString c = cc.get("PROVCOM");
@ -248,14 +258,17 @@ void TAnaprint_app::set_scheda_anafis()
set_row(row++,"Residenza@20gIndirizzo @s N. @s",
FLD(LF_ANAG,"INDRES"), FLD(LF_ANAG,"CIVRES"));
com = current_cursor()->curr(LF_ANAG).get("COMRES");
cc = look_com(com);
com = get_field(LF_ANAG, "COMRES");
TString sta = get_field(LF_ANAG, "STATORES");
look_com(com, sta);
a = cc.get("DENCOM");
b = cc.get("CAPCOM");
c = cc.get("PROVCOM");
set_row(row++,"@20gComune %s %s@58gProv. %s@68gCAP %s",
(const char*)com, (const char*)a, (const char*)c, (const char*)b);
a = sta.empty() ? "Italia" : look_tab("%STA",sta);
set_row(row++,"@20gStato %s",(const char*)a);
set_row(row++,"@20gTelefono @u@s@r/@u@s@r",
FLD(LF_ANAG,"PTELRF"), FLD(LF_ANAG,"TELRF"));
@ -267,8 +280,9 @@ void TAnaprint_app::set_scheda_anafis()
set_row(row++,"Domicilio fiscale@20gIndirizzo @s N. @s",
FLD(LF_ANAG,"INDRF"), FLD(LF_ANAG,"CIVRF"));
com = current_cursor()->curr(LF_ANAG).get("COMRF");
cc = look_com(com);
com = get_field(LF_ANAG, "COMRF");
look_com(com);
a = cc.get("DENCOM");
b = cc.get("CAPCOM");
c = cc.get("PROVCOM");
@ -292,8 +306,9 @@ void TAnaprint_app::set_scheda_anafis()
set_row(row++, "");
set_row(row++,"Corrispondenza@20gIndirizzo @s N. @s @s",
FLD(LF_ANAG,"INDCORR"), FLD(LF_ANAG,"CIVCORR"), FLD(LF_ANAG, "LOCCORR"));
com = current_cursor()->curr(LF_ANAG).get("COMCORR");
cc = look_com(com);
com = get_field(LF_ANAG, "COMCORR");
sta = get_field(LF_ANAG, "STATOCORR");
look_com(com, sta);
a = cc.get("DENCOM");
b = cc.get("CAPCOM");
c = cc.get("PROVCOM");
@ -301,8 +316,7 @@ void TAnaprint_app::set_scheda_anafis()
set_row(row++,"@20gComune %s %s@58gProv. %s@68gCAP %s",
(const char*)com, (const char*)a, (const char*)c, (const char*)b);
com = current_cursor()->curr(LF_ANAG).get("STATOCORR");
a = com.empty() ? "Italia" : look_tab("%STA",com,"S0");
a = sta.empty() ? "Italia" : look_tab("%STA",sta);
set_row(row++,"@20gStato %s",(const char*)a);
row++;
@ -315,26 +329,31 @@ void TAnaprint_app::set_scheda_anafis()
set_row(row++,"");
set_row(row++,"Ufficio imposte@20gNumero @pn",
FLD(LF_ANAG,"UFFIIDD","@@@"));
com = current_cursor()->curr(LF_ANAG).get("UFFIIDD");
a = look_tab("%UID",com,"S6");
c = look_tab("%UID",com,"S4");
cc = look_com(a);
com = look_tab("%UID",get_field(LF_ANAG, "UFFIIDD"),"S6"); // Comune imposte dirette
c = look_tab("%UID",get_field(LF_ANAG, "UFFIIDD"),"S4"); // c.c. Esattoria
look_com(com);
a = cc.get("DENCOM");
b = cc.get("PROVCOM");
set_row(row++,"@20gComune %s@58gProv. %s",
(const char*)a, (const char*)b);
set_row(row++,"");
set_row(row++,"Esattoria@20gC/C n. %s",(const char*)c);
set_row(row++,"@20gComune %s@58gProv. %s",
(const char*)a, (const char*)b);
set_row(row++,"@20gCodice contribuente @s",
FLD(LF_ANAG,"CODCONTR"));
set_row(row++,"");
set_row(row++,"@20gComune %s %-24s@58gProv. %s",
(const char*)com, (const char*)a, (const char*)b);
set_row(row++,"Ufficio IVA@20gNumero @pn",
FLD(LF_ANAG,"UFFIVA","@@@"));
com = look_tab("%UIV",get_field(LF_ANAG, "UFFIVA"),"S6");
look_com(com);
a = cc.get("DENCOM");
b = cc.get("PROVCOM");
set_row(row++,"@20gComune %s %-24s@58gProv. %s",
(const char*)com, (const char*)a, (const char*)b);
set_row(row++,"Esattoria@20gComunale @02s Provinciale @03s C.C. %s",
FLD(LF_ANAG,"CODCONTR",0,2), FLD(LF_ANAG,"CODCONTR",2,5), (const char*)c);
set_row(row++,"@20gCodice contribuente @8s @2s",
FLD(LF_ANAG,"CODCONTR", 5, 13), FLD(LF_ANAG,"CODCONTR", 13, 15));
set_row(row++,"");
// cerca coniuge
com = current_cursor()->curr(LF_ANAGFIS).get("CODCONIUGE");
com = get_field(LF_ANAGFIS, "CODCONIUGE");
TLocalisamfile& af = current_cursor()->file(LF_ANAG);
TRecnotype last = af.recno();
int k = af.getkey();
@ -370,23 +389,37 @@ void TAnaprint_app::set_scheda_anafis()
else tipo_stampa = "Distinta";
set_row(row++,"Dati conto fiscale @20gTitolare conto fiscale @54g@f @60gTipo stampa %s",
FLD(LF_ANAG,"TITCF"), (const char*) tipo_stampa);
set_row(row++,"@20gCodice ABI @pn @60gCAB @pn",
FLD(LF_ANAG,"CODABI","@@@@@"), FLD(LF_ANAG,"CODCAB","@@@@@"));
tipo_stampa = current_cursor()->curr(LF_ANAG).get("UFFCONC");
if (tipo_stampa.empty())
{
TString cod = current_cursor()->curr(LF_ANAG).get("COMRF");
TString cod = get_field(LF_ANAG, "COMRF");
TString sta;
if (cod.empty())
cod = current_cursor()->curr(LF_ANAG).get("COMRES");
{
cod = get_field(LF_ANAG, "COMRES");
sta = get_field(LF_ANAG, "STATORES");
}
if (cod.not_empty())
{
cc = look_com(cod);
look_com(cod,sta);
tipo_stampa = cc.get("UFFCONC");
}
}
set_row(row++,"@20gConto fiscale %s @s",
(const char*)tipo_stampa, FLD(LF_ANAG,"COFI"));
TString16 abicab = get_field(LF_ANAG, "CODABI");
if (abicab.not_empty() && abicab != "00000")
{
set_row(row++,"@20gABI %s@30g%s", (const char*)abicab, look_tab("%BAN", abicab));
const TString16 cab = get_field(LF_ANAG, "CODCAB");
if (cab.not_empty() && cab != "00000")
{
abicab << cab;
set_row(row++,"@20gCAB %s@30g%s",
(const char*)cab, look_tab("%BAN", abicab));
}
}
set_row(row++,"");
set_row(row++,"Dati Statistici@20gNon residente@53g@f",
@ -550,7 +583,7 @@ void TAnaprint_app::set_scheda_attiv()
if (c.empty()) c = af.get("COMRES");
if (z.empty()) z = af.get("CIVRES");
}
TRectype& cm = look_com(c);
const TRectype& cm = look_com(c);
af.readat(last);
af.setkey(k);
@ -568,7 +601,7 @@ void TAnaprint_app::set_scheda_attiv()
set_row(14,"Luogo@20gIndirizzo @s N. @s",
FLD(LF_ATTIV,"INDCS"),
FLD(LF_ATTIV,"CIVCS"));
cm = look_com(get_field(LF_ATTIV,"COMCS"));
look_com(get_field(LF_ATTIV,"COMCS"));
a = cm.get("DENCOM"); b = cm.get("PROVCOM"); c = cm.get("CAPCOM");
set_row(15,"@20gComune %s@58gProv. %s@68gC.a.p. %s",
(const char*)a, (const char*)b, (const char*)c);
@ -594,17 +627,16 @@ void TAnaprint_app::set_scheda_unloc()
set_row(2,"@20g@bIndirizzo@r@u @s@r@68g@bNumero @r@u@s",
FLD(LF_UNLOC,"INDULC"),
FLD(LF_UNLOC,"CIVULC"));
TRectype& cc = look_com(get_field(LF_UNLOC,"COMULC"));
const TRectype& cc = look_com(get_field(LF_UNLOC,"COMULC"));
TString a = cc.get("DENCOM");
TString b = cc.get("PROVCOM");
TString c = cc.get("CAPCOM");
set_row(3,"@20g@bComune@r@4j@u%s@r@58g@bProv.@r @u%s@r@68g@b"
"C.a.p.@r @u%s",
(const char*)a, (const char*)b, (const char*)c);
"C.a.p.@r @u%s", (const char*)a, (const char*)b, (const char*)c);
set_row(4,"");
set_row(5,"C.C.I.A.A.@20gNumero@30g@pn",
FLD(LF_UNLOC,"NUMCCIAA","@@@@@@@"));
cc = look_com(get_field(LF_UNLOC,"COMCCIAA"));
look_com(get_field(LF_UNLOC,"COMCCIAA"));
a = cc.get("DENCOM");
set_row(6,"@20gComune@30g%s", (const char*)a);
set_row(7,"@20gData iscrizione @D@48gData ultima variazione @D",
@ -626,7 +658,7 @@ void TAnaprint_app::set_scheda_unloc()
FLD(LF_UNLOC, "REGIMP", "@@ @@@ @@@@ @@@@@@@@@ @"));
zio = get_field(LF_UNLOC,"COMTRIB");
cc = look_com(zio);
look_com(zio);
a = cc.get("DENCOM");
b = cc.get("PROVCOM");
c = get_field(LF_UNLOC, "CAPTRIB");
@ -695,7 +727,7 @@ void TAnaprint_app::set_scheda_socio()
anaf->zero();
anaf->put("CODANAGR",soc.get("CODANAGRSO"));
anaf->read();
TRectype& com = look_com(anaf->get("COMNASC"));
const TRectype& com = look_com(anaf->get("COMNASC"));
set_row(1,"@bSOCIO@r @s / @pn@20g@bCognome@r %s",
FLD(LF_SOCI,"TIPOASOC"),
@ -741,7 +773,9 @@ void TAnaprint_app::set_scheda_socio()
}
set_row(rw,"");
TRectype& com = look_com(ana.get("COMRES"));
const TString cod_com = ana.get("COMRES");
const TString cod_sta = ana.get("STATORES");
const TRectype& com = look_com(cod_com, cod_sta);
b1 = com.get("DENCOM");
b2 = com.get("PROVCOM");