diff --git a/cg/cg1200.cpp b/cg/cg1200.cpp index fc342a51a..705c6bb64 100755 --- a/cg/cg1200.cpp +++ b/cg/cg1200.cpp @@ -78,7 +78,7 @@ public: const char* compatta_ragsoc(TString& ragsoc,char tipoaper); void header_elenco(); void header_rubriche(); - TRectype& look_comuni(const char*); + TRectype& look_comuni(const TString&, const TString&); const char* descrizione_conto_ric(int,int,long); const char* descrizione_allegato(char,long); @@ -154,10 +154,11 @@ const char* TPrintclifo_app::descrizione_allegato(char tipocf,long cod) return tmp; } -TRectype& TPrintclifo_app::look_comuni(const char* cod) +TRectype& TPrintclifo_app::look_comuni(const TString& stato, const TString& cod) { _comuni->zero(); _comuni->put(COM_COM, cod); + _comuni->put(COM_STATO, stato); _comuni->read(); if (_comuni->bad()) _comuni->zero(); @@ -245,7 +246,8 @@ bool TPrintclifo_app::preprocess_page(int file, int counter) //modifica del 27/04/1995 TString16 comcf = get_field(LF_CLIFO, CLI_COMCF); - TRectype com = look_comuni(comcf); + TString16 stacf = get_field(LF_CLIFO, CLI_STATOCF); + TRectype com = look_comuni(stacf,comcf); _comune.cut(0); _comprov.cut(0); if (_localita.not_empty()) @@ -265,7 +267,8 @@ bool TPrintclifo_app::preprocess_page(int file, int counter) _prov = com.get(COM_PROVCOM); } TString16 comnasc = get_field(LF_CLIFO, CLI_COMNASC); - TRectype comn = look_comuni(comnasc); + TString16 stanasc = get_field(LF_CLIFO, CLI_STATONASC); + TRectype comn = look_comuni(stanasc, comnasc); _comnasc = (comn.get(COM_DENCOM)).left(29); _comnasc << " "; _comnasc << comn.get(COM_PROVCOM);