770 2015
git-svn-id: svn://10.65.10.50/branches/R_10_00@23071 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
775faea657
commit
8d493f3da9
@ -10,6 +10,7 @@
|
|||||||
#include "777lib.h"
|
#include "777lib.h"
|
||||||
#include "777100a.h"
|
#include "777100a.h"
|
||||||
|
|
||||||
|
#include "../fe/felib.h"
|
||||||
|
|
||||||
#include <anagr.h>
|
#include <anagr.h>
|
||||||
#include <anafis.h>
|
#include <anafis.h>
|
||||||
@ -27,7 +28,7 @@
|
|||||||
// Utility
|
// Utility
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const int ANNO_DIC = 2013;
|
const int ANNO_DIC = 2014;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TForm770
|
// TForm770
|
||||||
@ -77,7 +78,6 @@ class TTrasferimento770 : public TObject
|
|||||||
TString8 _codatt_dic;
|
TString8 _codatt_dic;
|
||||||
char _tipoa_dic;
|
char _tipoa_dic;
|
||||||
TString16 _codfis_dic;
|
TString16 _codfis_dic;
|
||||||
TString _ragsoc_dic;
|
|
||||||
bool _save_headers;
|
bool _save_headers;
|
||||||
bool _centesimi; // Salva importi in centesimi invece che in euro
|
bool _centesimi; // Salva importi in centesimi invece che in euro
|
||||||
|
|
||||||
@ -556,7 +556,7 @@ void TCache770::destroy()
|
|||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const char* TTrasferimento770::default_name() const
|
const char* TTrasferimento770::default_name() const
|
||||||
{ return "MOD77014"; }
|
{ return "MOD77015"; }
|
||||||
|
|
||||||
bool TTrasferimento770::open(const char* path, char mode, int volume)
|
bool TTrasferimento770::open(const char* path, char mode, int volume)
|
||||||
{
|
{
|
||||||
@ -646,16 +646,13 @@ const TString& TTrasferimento770::read_codfis_dic(const TRectype& rec)
|
|||||||
_codatt_dic = codateco;
|
_codatt_dic = codateco;
|
||||||
}
|
}
|
||||||
|
|
||||||
key.cut(0) << _tipoa_dic;
|
const TAnagrafica dich(LF_ANAG, _tipoa_dic, _codan_dic);
|
||||||
key.add(rec_nditte.get(NDT_CODANAGR));
|
if (!dich.ok())
|
||||||
const TRectype& rec_anagr = _cache770.get(LF_ANAG, key);
|
|
||||||
if (rec_anagr.empty())
|
|
||||||
{
|
{
|
||||||
error_box(FR("Non esiste la persona %s"), (const char*)key);
|
error_box(TR("Non esiste l'anagrafica del dichiarante"));
|
||||||
return EMPTY_STRING;
|
return EMPTY_STRING;
|
||||||
}
|
}
|
||||||
_codfis_dic = rec_anagr.get(ANA_COFI); // Codice fiscale del dichiarante
|
_codfis_dic = dich.codice_fiscale(); // Codice fiscale del dichiarante
|
||||||
_ragsoc_dic = rec_anagr.get(ANA_RAGSOC); // Denominazione del dichiarante
|
|
||||||
|
|
||||||
return _codfis_dic;
|
return _codfis_dic;
|
||||||
}
|
}
|
||||||
@ -708,36 +705,37 @@ bool TTrasferimento770::append_record_b()
|
|||||||
rec.set(3, 1); // Modulo (deve essere sempre 1)
|
rec.set(3, 1); // Modulo (deve essere sempre 1)
|
||||||
rec.set(7, CF_PRODUTTORE); // CF del produttore Sirio
|
rec.set(7, CF_PRODUTTORE); // CF del produttore Sirio
|
||||||
|
|
||||||
if (_tipoa_dic == 'F')
|
const TAnagrafica dich(LF_ANAG, _tipoa_dic, _codan_dic);
|
||||||
|
if (dich.fisica())
|
||||||
{
|
{
|
||||||
rec.set(13, _ragsoc_dic.left(24));
|
rec.set(13, dich.cognome());
|
||||||
rec.set(14, _ragsoc_dic.mid(30,20));
|
rec.set(14, dich.nome());
|
||||||
|
rec.set(23, dich.comune_nascita());
|
||||||
|
rec.set(24, dich.provincia_nascita());
|
||||||
|
rec.set(25, dich.data_nascita());
|
||||||
|
rec.set(26, dich.sesso());
|
||||||
|
rec.set(27, dich.comune_residenza());
|
||||||
|
rec.set(28, dich.provincia_residenza());
|
||||||
|
rec.set(29, dich.CAP_residenza());
|
||||||
|
if (!dich.estero())
|
||||||
|
rec.set(30, dich.codice_comune_residenza());
|
||||||
|
rec.set(31, dich.indirizzo_residenza());
|
||||||
}
|
}
|
||||||
else
|
|
||||||
rec.set(15, _ragsoc_dic);
|
|
||||||
rec.set(19, _codatt_dic);
|
rec.set(19, _codatt_dic);
|
||||||
|
|
||||||
TToken_string key;
|
if (dich.giuridica())
|
||||||
key << _tipoa_dic << '|' << _codan_dic;
|
|
||||||
const TRectype& rec_anagr = _cache770.get(LF_ANAG, key);
|
|
||||||
|
|
||||||
key = rec_anagr.get(ANA_STATORES);
|
|
||||||
key.add(rec_anagr.get(ANA_COMRES), 1);
|
|
||||||
const TRectype& rec_comres = _cache770.get(LF_COMUNI, key);
|
|
||||||
|
|
||||||
if (_tipoa_dic == 'G')
|
|
||||||
{
|
{
|
||||||
|
rec.set(15, dich.ragione_sociale());
|
||||||
|
|
||||||
const TRectype& rec_anagiu = _cache770.get(LF_ANAGGIU, _codan_dic);
|
const TRectype& rec_anagiu = _cache770.get(LF_ANAGGIU, _codan_dic);
|
||||||
rec.set(33, rec_anagiu.get(ANG_NATGIU));
|
rec.set(33, rec_anagiu.get(ANG_NATGIU));
|
||||||
|
|
||||||
rec.set(35, rec_comres.get(COM_DENCOM));
|
rec.set(35, dich.comune_residenza());
|
||||||
rec.set(36, rec_comres.get(COM_PROVCOM));
|
rec.set(36, dich.provincia_residenza());
|
||||||
TString indirizzo;
|
rec.set(37, dich.CAP_residenza());
|
||||||
indirizzo << rec_anagr.get(ANA_INDRES) << ' ' << rec_anagr.get(ANA_CIVRES);
|
rec.set(38, dich.codice_comune_residenza());
|
||||||
indirizzo.strip_double_spaces(); indirizzo.cut(35);
|
rec.set(39, dich.indirizzo_residenza());
|
||||||
rec.set(37, rec_anagr.get(ANA_CAPRES));
|
|
||||||
rec.set(38, rec_anagr.get(ANA_COMRES));
|
|
||||||
rec.set(39, indirizzo);
|
|
||||||
|
|
||||||
rec.set(46, rec_anagiu.get(ANG_STATOSOC));
|
rec.set(46, rec_anagiu.get(ANG_STATOSOC));
|
||||||
rec.set(47, rec_anagiu.get(ANG_SITSOC));
|
rec.set(47, rec_anagiu.get(ANG_SITSOC));
|
||||||
@ -755,29 +753,22 @@ bool TTrasferimento770::append_record_b()
|
|||||||
rec.set(81, prosp_sx); // casella prospetto SX
|
rec.set(81, prosp_sx); // casella prospetto SX
|
||||||
rec.set(82, false); // casella prospetto SY
|
rec.set(82, false); // casella prospetto SY
|
||||||
|
|
||||||
rec.set(94, 1); // Firma del dichiarante
|
rec.set(94, true); // Firma del dichiarante
|
||||||
|
|
||||||
rec.set(100, 0); // situazioni particolari: vale sempre 0
|
rec.set(116, 0); // situazioni particolari: vale sempre 0
|
||||||
|
|
||||||
const TRectype& rec_nditte = _cache770.get(LF_NDITTE, _cod_ditta);
|
const TRectype& rec_nditte = _cache770.get(LF_NDITTE, _cod_ditta);
|
||||||
|
const TAnagrafica rec_rap(LF_ANAG, 'F', rec_nditte.get_long(NDT_RAPPR));
|
||||||
key.cut(0) << "F|" << rec_nditte.get(NDT_RAPPR);
|
if (rec_rap.ok())
|
||||||
const TRectype& rec_rap = _cache770.get(LF_ANAG, key);
|
|
||||||
const TRectype& rec_rap_fis = _cache770.get(LF_ANAGFIS, key.get(1));
|
|
||||||
if (!rec_rap_fis.empty())
|
|
||||||
{
|
{
|
||||||
key.cut(0) << "|" << rec_rap_fis.get(ANF_COMNASC);
|
rec.set(126, rec_rap.codice_fiscale());
|
||||||
const TRectype& rec_com_nas = _cache770.get(LF_COMUNI, key);
|
|
||||||
key.cut(0) << "|" << rec_rap.get(ANA_COMRES);
|
|
||||||
const TRectype& rec_com_res = _cache770.get(LF_COMUNI, key);
|
|
||||||
rec.set(126, rec_rap.get(ANA_COFI));
|
|
||||||
rec.set(127, rec_nditte.get(NDT_CARRAPP));
|
rec.set(127, rec_nditte.get(NDT_CARRAPP));
|
||||||
rec.set(131, rec_rap.get(ANA_RAGSOC).left(24));
|
rec.set(131, rec_rap.cognome());
|
||||||
rec.set(132, rec_rap.get(ANA_RAGSOC).mid(30, 20));
|
rec.set(132, rec_rap.nome());
|
||||||
rec.set(133, rec_rap_fis.get(ANF_SESSO));
|
rec.set(133, rec_rap.sesso());
|
||||||
rec.set(134, rec_rap_fis.get_date(ANF_DATANASC));
|
rec.set(134, rec_rap.data_nascita());
|
||||||
rec.set(135, rec_com_nas.get(COM_DENCOM));
|
rec.set(135, rec_rap.comune_nascita());
|
||||||
rec.set(136, rec_com_nas.get(COM_PROVCOM));
|
rec.set(136, rec_rap.provincia_nascita());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cantread_box("dati del legale rappresentante");
|
cantread_box("dati del legale rappresentante");
|
||||||
@ -917,7 +908,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, "77S14"); // Codice fornitura
|
rec.set(3, "77S15"); // 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)
|
||||||
@ -1131,12 +1122,13 @@ void TTransfer770_app::main_loop()
|
|||||||
{
|
{
|
||||||
const TRectype& base = cur_base.curr();
|
const TRectype& base = cur_base.curr();
|
||||||
const long codditta = base.get_long(BSE_CODDITTA);
|
const long codditta = base.get_long(BSE_CODDITTA);
|
||||||
pi.addstatus(1);
|
|
||||||
t.read_codfis_dic(base);
|
t.read_codfis_dic(base);
|
||||||
|
|
||||||
t.append_record_b();
|
t.append_record_b();
|
||||||
t.append_quadro("ST", codditta, pi);
|
t.append_quadro("ST", codditta, pi);
|
||||||
t.append_quadro("LA", codditta, pi);
|
t.append_quadro("LA", codditta, pi);
|
||||||
|
if (!pi.add_status())
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
620
m770/777lib.cpp
Normal file
620
m770/777lib.cpp
Normal file
@ -0,0 +1,620 @@
|
|||||||
|
#include "777lib.h"
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TTracciato770
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void TTracciato770::add_field(const char* name, M770FieldType type, int pos, int len, int fldno)
|
||||||
|
{
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case AN:
|
||||||
|
break;
|
||||||
|
case CB:
|
||||||
|
CHECKD(len == 1, "Booleano di lunghezza sospetta ", len);
|
||||||
|
// type = NU;
|
||||||
|
break;
|
||||||
|
case CF:
|
||||||
|
CHECKD(len == 16, "Codice fiscale di lunghezza sospetta ", len);
|
||||||
|
type = AN;
|
||||||
|
break;
|
||||||
|
case CN:
|
||||||
|
CHECKD(len == 11, "Codice fiscale numerico di lunghezza sospetta ", len);
|
||||||
|
type = NU;
|
||||||
|
break;
|
||||||
|
case DA:
|
||||||
|
CHECKD(len == 6, "Mese+Anno di lunghezza sospetta ", len);
|
||||||
|
type = NU;
|
||||||
|
break;
|
||||||
|
case DT:
|
||||||
|
CHECKD(len == 8, "Data di lunghezza sospetta ", len);
|
||||||
|
type = NU;
|
||||||
|
break;
|
||||||
|
case NU:
|
||||||
|
break;
|
||||||
|
case PN:
|
||||||
|
case PR:
|
||||||
|
CHECKD(len == 2, "provincia di lunghezza sospetta ", len);
|
||||||
|
type = AN;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
CHECK(false, "tipo campo sospetto");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
TField770* info = new TField770;
|
||||||
|
info->_desc = name;
|
||||||
|
info->_type = type;
|
||||||
|
info->_pos = pos;
|
||||||
|
info->_len = len;
|
||||||
|
|
||||||
|
if (fldno <= 0)
|
||||||
|
fldno = _fields.add(info)+1;
|
||||||
|
else
|
||||||
|
_fields.add(info, fldno-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
const TField770& TTracciato770::field(int pos) const
|
||||||
|
{
|
||||||
|
TField770* info = (TField770*)_fields.objptr(pos-1);
|
||||||
|
#ifdef DBG
|
||||||
|
if (info == NULL)
|
||||||
|
fatal_box("Non esiste il campo %d sul tipo record %c", pos, _tipo);
|
||||||
|
#endif
|
||||||
|
return *info;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TTracciato770::auto_fill(TString& buffer) const
|
||||||
|
{
|
||||||
|
buffer.fill(' ', TOTAL_SIZE);
|
||||||
|
char* ptr = buffer.get_buffer();
|
||||||
|
for (int f = _fields.last(); f >= 0; f = _fields.pred(f))
|
||||||
|
{
|
||||||
|
const TField770& info = (const TField770&)_fields[f];
|
||||||
|
if (info._type == NU || info._type == CB || info._type == DA || info._type == DT || info._type == CN)
|
||||||
|
memset(ptr + info._pos - 1, '0', info._len);
|
||||||
|
}
|
||||||
|
buffer[0] = _tipo;
|
||||||
|
buffer.overwrite("A\r\n", TOTAL_SIZE-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
TTracciato770::TTracciato770(char tipo) : _tipo(tipo)
|
||||||
|
{
|
||||||
|
if (strchr("ABEFHJZ", tipo) == NULL)
|
||||||
|
NFCHECK("Tipo record non valido: %c", tipo);
|
||||||
|
|
||||||
|
add_field("Tipo record", AN, 1, 1); // 1
|
||||||
|
|
||||||
|
if (tipo == 'A')
|
||||||
|
{
|
||||||
|
add_filler(2, 14); // 2
|
||||||
|
add_field("Codice fornitura", AN, 16, 5); // 3
|
||||||
|
add_field("Tipo fornitore", NU, 21, 2); // 4
|
||||||
|
add_field("Codice fiscale del fornitore", CF, 23, 16);
|
||||||
|
add_filler(39, 483);
|
||||||
|
// Dichiarazione su più invii
|
||||||
|
add_field("Progressivo dell'invio", NU, 522, 4); // 7
|
||||||
|
add_field("Numero totale degli invii", NU, 526, 4);
|
||||||
|
} else
|
||||||
|
if (tipo == 'B')
|
||||||
|
{
|
||||||
|
add_field("Codice fiscale dichiarante", CF, 2, 16); // 2
|
||||||
|
add_field("Progressivo modulo", NU, 18, 8);
|
||||||
|
add_filler( 26, 3);
|
||||||
|
add_filler( 29,25);
|
||||||
|
add_field("Spazio a disposizione", AN, 54, 20);
|
||||||
|
add_field("CF del produttore del software", CF, 74, 16); // 7
|
||||||
|
|
||||||
|
add_field("Flag conferma", CB, 90, 1);
|
||||||
|
|
||||||
|
// Tipo di dichiarazione
|
||||||
|
add_field("Dichiarazione correttiva nei termini", CB, 91, 1); // 9
|
||||||
|
add_field("Dichiarazione correttiva parziale", CB, 92, 1);
|
||||||
|
add_field("Dichiarazione integrativa", CB, 93, 1);
|
||||||
|
add_field("Eventi eccezzziunali veramente", NU, 94, 1); // 12
|
||||||
|
|
||||||
|
// Dati del contribuente
|
||||||
|
add_field("Cognome", AN, 95, 24); // 13
|
||||||
|
add_field("Nome", AN,119, 20);
|
||||||
|
add_field("Denominazione (Alternativo a 25 e 26)",AN,139, 60);
|
||||||
|
add_filler(199,11);
|
||||||
|
add_filler(210, 1);
|
||||||
|
add_filler(211, 1);
|
||||||
|
|
||||||
|
add_field("Codice Attività", NU, 212, 6); // 19
|
||||||
|
add_field("Indirizzo E-mail", AN, 218,100);
|
||||||
|
add_field("Telefono o FAX", AN, 318, 12);
|
||||||
|
add_filler(330, 12);
|
||||||
|
|
||||||
|
add_field("Comune di nascita", AN, 342, 40, 23); // 23
|
||||||
|
add_field("Provincia di nascita", AN, 382, 2);
|
||||||
|
add_field("Data di nascita", DT, 384, 8);
|
||||||
|
add_field("Sesso", AN, 392, 1);
|
||||||
|
|
||||||
|
add_field("Comune di residenza", AN, 393, 40, 27); // 27
|
||||||
|
add_field("Provincia residenza", AN, 433, 2);
|
||||||
|
add_field("C.a.p. residenza", NU, 435, 5);
|
||||||
|
add_field("Codice comune", AN, 440, 4);
|
||||||
|
add_field("Indirizzo", AN, 444, 35);
|
||||||
|
add_field("Data variazione", DT, 479, 8);
|
||||||
|
|
||||||
|
add_field("Natura giuridica", NU, 487, 2, 33); // 33
|
||||||
|
add_field("Data variazione sede legale", DA, 489, 6);
|
||||||
|
add_field("Comune della sede legale", AN, 495,40);
|
||||||
|
add_field("Sigla della provincia sede legale", PR, 535, 2);
|
||||||
|
add_field("CAP del comune della sede legale", NU, 537, 5);
|
||||||
|
add_field("Codice comune", AN, 542, 4);
|
||||||
|
add_field("Indirizzo della sede legale", AN, 546,35);
|
||||||
|
add_field("Data variazione domicilio fiscale", NU, 581, 6); // 40
|
||||||
|
add_field("Comune del domicilio fiscale", AN, 587,40);
|
||||||
|
add_field("Provincia del domicilio fiscale", PR, 627, 2);
|
||||||
|
add_field("CAP del domicilio fiscale", NU, 629, 5);
|
||||||
|
add_field("Codice comune", AN, 634, 4);
|
||||||
|
add_field("Indirizzo del domicilio fiscale", AN, 638,35);
|
||||||
|
add_field("Stato", NU, 673, 1);
|
||||||
|
add_field("Situazione", NU, 674, 1);
|
||||||
|
add_field("Dicastero di appartenenza", CN, 675,11);
|
||||||
|
|
||||||
|
add_field("Redazione della dichiarazione", NU, 797, 1, 75); // 75
|
||||||
|
add_field("Numero comunicaz. lavoro dipendente", NU, 798, 8);
|
||||||
|
add_field("Numero comunicaz. lavoro autonomo", NU, 806, 8);
|
||||||
|
add_field("Casella prospetto SS", CB, 814, 1); // 78
|
||||||
|
add_field("Casella prospetto ST", CB, 815, 1);
|
||||||
|
add_field("Casella prospetto SV", CB, 816, 1);
|
||||||
|
add_field("Casella prospetto SX", CB, 817, 1); // 81
|
||||||
|
add_field("Casella prospetto SY", CB, 818, 1);
|
||||||
|
add_field("Presenza 770 ordinario 2015", CB, 819, 1);
|
||||||
|
add_field("Codice fiscale parte restante", CF, 820,16);
|
||||||
|
add_field("Protocollo telematico", NU, 836,17); // 85
|
||||||
|
add_field("Progressivo telematico", NU, 853, 6);
|
||||||
|
|
||||||
|
// dichiarazioni integrative o parziali
|
||||||
|
add_field("Casella prospetto SS", CB, 859, 1); // 87
|
||||||
|
add_field("Casella prospetto ST", CB, 860, 1);
|
||||||
|
add_field("Casella prospetto SV", CB, 861, 1);
|
||||||
|
add_field("Casella prospetto SX", CB, 862, 1);
|
||||||
|
add_field("Casella prospetto SY", CB, 863, 1);
|
||||||
|
add_field("Numero comunicaz. lavoro dipendente", NU, 864, 8);
|
||||||
|
add_field("Numero comunicaz. lavoro autonomo", NU, 872, 8); // 93
|
||||||
|
|
||||||
|
add_field("Firma del dichiarante", CB, 880, 1, 94); // 94
|
||||||
|
add_field("Codice fiscale", CF, 881,16);
|
||||||
|
add_field("Soggetto", NU, 897, 1);
|
||||||
|
add_field("Firma", CB, 898, 1); // 97
|
||||||
|
add_field("Codice fiscale", CF, 899,16);
|
||||||
|
add_field("Soggetto", NU, 915, 1);
|
||||||
|
add_field("Firma", CB, 916, 1); // 100
|
||||||
|
add_field("Codice fiscale", CF, 917,16);
|
||||||
|
add_field("Soggetto", NU, 933, 1);
|
||||||
|
add_field("Firma", CB, 934, 1); // 103
|
||||||
|
add_field("Codice fiscale", CF, 935,16);
|
||||||
|
add_field("Soggetto", NU, 951, 1);
|
||||||
|
add_field("Firma", CB, 952, 1); // 106
|
||||||
|
add_field("Codice fiscale", CF, 953,16);
|
||||||
|
add_field("Soggetto", NU, 969, 1);
|
||||||
|
add_field("Firma", CB, 970, 1); // 109
|
||||||
|
add_field("Non trasmissione ST, SV e/o SX", NU, 971, 1);
|
||||||
|
add_field("Casella Attestazione", CB, 972, 1);
|
||||||
|
|
||||||
|
add_field("Situazioni particolari", NU,1180,2, 116); // 116
|
||||||
|
|
||||||
|
add_field("Codice fiscale del rappresentante", CF,1396,16,126); // 126
|
||||||
|
add_field("Codice carica del rappresentante", NU,1412, 2);
|
||||||
|
add_field("Data carica del rappresentante", DT,1414, 8);
|
||||||
|
|
||||||
|
add_field("Cognome", AN,1493,24, 131); // 131
|
||||||
|
add_field("Nome", AN,1517,20);
|
||||||
|
add_field("Sesso", AN,1537, 1);
|
||||||
|
add_field("Data di nascita rappresentante", DT,1538, 8);
|
||||||
|
add_field("Comune di nascita", AN,1546,40); // 135
|
||||||
|
add_field("Provincia di nascita", PN,1586, 2);
|
||||||
|
|
||||||
|
add_field("Codice stato estero", NU,1588, 3); // 137
|
||||||
|
add_field("Stato federato, provincia, contea", AN,1591,24);
|
||||||
|
add_field("Località di residenza", AN,1615,24);
|
||||||
|
add_field("Indirizzo estero", AN,1639,35); // 140
|
||||||
|
add_field("Telefono cellulare rappresentante", AN,1674,12);
|
||||||
|
add_field("Data apertura fallimento", DT,1686, 8); // 142
|
||||||
|
add_field("Codice fiscale societa o dichiarante", NU,1694,11);
|
||||||
|
|
||||||
|
add_field("Invio avviso telematico", CB,1715, 1, 147); // 147
|
||||||
|
add_field("Ricezione avviso telematico", CB,1716, 1);
|
||||||
|
add_field("Codice fiscale intermediario", CF,1717,16);
|
||||||
|
add_field("Numero iscrizione C.A.F.", NU,1733, 5);
|
||||||
|
add_field("Impegno a trasmettere la dichiaraz.", NU,1738, 1); // 151
|
||||||
|
add_field("Data dell'impegno", DT,1739, 8);
|
||||||
|
add_field("Firma dell'intermediario", CB,1747, 1);
|
||||||
|
add_field("Codice fiscale responsabile C.A.F.", CF,1748,16);
|
||||||
|
add_field("Codice fiscale C.A.F.", CN,1764,11);
|
||||||
|
add_field("Codice fiscale professionista", CF,1775,16); // 156
|
||||||
|
add_field("Firma", CB,1791, 1);
|
||||||
|
} else
|
||||||
|
if (tipo == 'E' || tipo == 'F')
|
||||||
|
{
|
||||||
|
add_field("Codice fiscale del dichiarante", CF, 2, 16); // 2
|
||||||
|
add_field("Progressivo modulo", NU, 18, 8);
|
||||||
|
add_field("Spazio a disposizione", AN, 26, 3);
|
||||||
|
add_field("Tipo operazione", AN, 29, 1);
|
||||||
|
add_filler(30, 24);
|
||||||
|
add_field("Spazio a disposizione", AN, 54, 20);
|
||||||
|
add_field("Identificativo produttore software", AN, 74, 16); // 8
|
||||||
|
} else
|
||||||
|
if (tipo == 'H')
|
||||||
|
{
|
||||||
|
add_field("Codice fiscale del dichiarante", CF, 2, 16); // 2
|
||||||
|
add_field("Progressivo comunicazione", NU, 18, 8);
|
||||||
|
add_field("Spazio a disposizione", AN, 26, 3);
|
||||||
|
add_field("Tipo operazione", AN, 29, 1);
|
||||||
|
add_field("Codice fiscale del percipiente", AN, 30, 16); // 6
|
||||||
|
add_filler(46, 8);
|
||||||
|
add_field("Spazio a disposizione", AN, 54, 20);
|
||||||
|
add_field("Identificativo produttore software", AN, 74, 16); // 9
|
||||||
|
} else
|
||||||
|
if (tipo == 'J')
|
||||||
|
{
|
||||||
|
add_field("Codice fiscale del dichiarante", CF, 2, 16); // 2
|
||||||
|
add_field("Progressivo modulo", NU, 18, 8);
|
||||||
|
add_field("Spazio a disposizione", AN, 26, 3);
|
||||||
|
add_field("Tipo operazione", AN, 29, 1);
|
||||||
|
add_filler(30, 24);
|
||||||
|
add_field("Spazio a disposizione", AN, 54, 20);
|
||||||
|
add_field("Identificativo produttore software", AN, 74, 16); // 8
|
||||||
|
} else
|
||||||
|
if (tipo == 'Z')
|
||||||
|
{
|
||||||
|
add_filler(2, 14);
|
||||||
|
add_field("Numero record di tipo 'B'", NU, 16, 9); // 3
|
||||||
|
add_field("Numero record di tipo 'D'", NU, 25, 9);
|
||||||
|
add_field("Numero record di tipo 'E'", NU, 34, 9);
|
||||||
|
add_field("Numero record di tipo 'F'", NU, 43, 9); // 6
|
||||||
|
add_field("Numero record di tipo 'G'", NU, 52, 9);
|
||||||
|
add_field("Numero record di tipo 'H'", NU, 61, 9);
|
||||||
|
add_field("Numero record di tipo 'I'", NU, 70, 9);
|
||||||
|
add_field("Numero record di tipo 'J'", NU, 79, 9); // 10
|
||||||
|
add_filler(88, 1810);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TTracciato770::~TTracciato770()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TTracciati770
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TTracciati770 : public TObject
|
||||||
|
{
|
||||||
|
TArray _trc;
|
||||||
|
|
||||||
|
public:
|
||||||
|
const TTracciato770& tracciato(char tipo);
|
||||||
|
|
||||||
|
void destroy();
|
||||||
|
|
||||||
|
TTracciati770();
|
||||||
|
virtual ~TTracciati770();
|
||||||
|
} _trc770;
|
||||||
|
|
||||||
|
const TTracciato770& TTracciati770::tracciato(char tipo)
|
||||||
|
{
|
||||||
|
CHECK(tipo >= 'A' && tipo <= 'Z', "Tipo record non valido");
|
||||||
|
const int pos = tipo - 'A';
|
||||||
|
TTracciato770* trc = (TTracciato770*)_trc.objptr(pos);
|
||||||
|
if (trc == NULL)
|
||||||
|
{
|
||||||
|
trc = new TTracciato770(tipo);
|
||||||
|
_trc.add(trc, pos);
|
||||||
|
}
|
||||||
|
return *trc;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TTracciati770::destroy()
|
||||||
|
{
|
||||||
|
_trc.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
TTracciati770::TTracciati770()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
TTracciati770::~TTracciati770()
|
||||||
|
{
|
||||||
|
destroy(); // Non viene mai chiamato!
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TRecord770
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
const TTracciato770& TRecord770::tracciato() const
|
||||||
|
{ return _trc770.tracciato(tipo_record()); }
|
||||||
|
|
||||||
|
void TRecord770::print_on(ostream& outs) const
|
||||||
|
{
|
||||||
|
outs.write(_buffer, TOTAL_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TRecord770::read_from(istream& ins)
|
||||||
|
{
|
||||||
|
_buffer.fill(' ', TOTAL_SIZE);
|
||||||
|
ins.read(_buffer.get_buffer(), TOTAL_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
const TField770& TRecord770::get_field(int pos) const
|
||||||
|
{ return tracciato().field(pos); }
|
||||||
|
|
||||||
|
void TRecord770::set(const TField770& fld, const char* val)
|
||||||
|
{
|
||||||
|
TString256 str(val); // Ci sono campi di 100 caratteri!
|
||||||
|
if (fld._type == AN)
|
||||||
|
str.upper();
|
||||||
|
int lenstr = str.len();
|
||||||
|
if (lenstr > fld._len)
|
||||||
|
{
|
||||||
|
#ifdef DBG
|
||||||
|
NFCHECK("Campo troppo lungo: '%s' (max. %d)", val, fld._len);
|
||||||
|
#endif
|
||||||
|
str.cut(lenstr = fld._len);
|
||||||
|
}
|
||||||
|
if (lenstr != fld._len)
|
||||||
|
{
|
||||||
|
str.trim();
|
||||||
|
if (fld._type == NU)
|
||||||
|
str.right_just(fld._len, '0');
|
||||||
|
else
|
||||||
|
str.left_just(fld._len);
|
||||||
|
}
|
||||||
|
_buffer.overwrite(str, fld._pos-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TRecord770::set(int pos, const char* val)
|
||||||
|
{
|
||||||
|
const TField770& fld = tracciato().field(pos);
|
||||||
|
set(fld, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TRecord770::set(int pos, int val)
|
||||||
|
{
|
||||||
|
const TField770& fld = tracciato().field(pos);
|
||||||
|
CHECKD(fld._type == NU, "Invalid numeric field ", pos);
|
||||||
|
TString16 str; str.format("%d", val);
|
||||||
|
set(fld, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TRecord770::set(int pos, long val)
|
||||||
|
{
|
||||||
|
const TField770& fld = tracciato().field(pos);
|
||||||
|
CHECKD(fld._type == NU, "Invalid numeric field ", pos);
|
||||||
|
TString16 str; str.format("%ld", val);
|
||||||
|
set(fld, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TRecord770::set(int pos, const real& val)
|
||||||
|
{
|
||||||
|
const TField770& fld = tracciato().field(pos);
|
||||||
|
CHECKD(fld._type == NU, "Invalid numeric field ", pos);
|
||||||
|
const char* str = val.string(fld._len, 0);
|
||||||
|
set(fld, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TRecord770::set(int pos, const TDate& val)
|
||||||
|
{
|
||||||
|
const TField770& fld = tracciato().field(pos);
|
||||||
|
CHECKD(fld._type == NU && (fld._len == 6 || fld._len == 8),
|
||||||
|
"Invalid date field ", pos);
|
||||||
|
const char* str;
|
||||||
|
if (fld._len == 8)
|
||||||
|
str = val.string(full, '\0', full, full, gma_date);
|
||||||
|
else
|
||||||
|
str = val.string(brief, '\0', full, full, gma_date);
|
||||||
|
set(fld, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TRecord770::set(int pos, char val)
|
||||||
|
{
|
||||||
|
const TField770& fld = get_field(pos);
|
||||||
|
CHECKD(fld._type == AN && fld._len == 1, "Invalid char field ", pos);
|
||||||
|
const char str[2] = { val, '\0' };
|
||||||
|
set(fld, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TRecord770::set(int pos, bool val)
|
||||||
|
{
|
||||||
|
const TField770& fld = get_field(pos);
|
||||||
|
CHECKD((fld._type == CB || fld._type == NU) && fld._len == 1, "Invalid boolean field ", pos);
|
||||||
|
set(fld, val ? "1" : "0");
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* TRecord770::get(int pos, TString& str) const
|
||||||
|
{
|
||||||
|
const TField770& fld = get_field(pos);
|
||||||
|
str = _buffer.mid(fld._pos-1, fld._len);
|
||||||
|
return str.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
int TRecord770::get_int(int pos) const
|
||||||
|
{
|
||||||
|
TString16 str; get(pos, str);
|
||||||
|
return atoi(str);
|
||||||
|
}
|
||||||
|
|
||||||
|
char TRecord770::get_char(int pos) const
|
||||||
|
{
|
||||||
|
const TField770& fld = get_field(pos);
|
||||||
|
CHECKD(fld._type == AN, "Invalid char field ", pos);
|
||||||
|
return _buffer[fld._pos-1];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calcola i blocchi necessari per contenere la stringa val
|
||||||
|
int TRecord770::calculate_blocks(const char* val) const
|
||||||
|
{
|
||||||
|
// Il primo blocco contiene 16 caratteri, gli altri solo 15 perche' c'e' anche il +
|
||||||
|
int blocks = 1;
|
||||||
|
if (val && *val)
|
||||||
|
{
|
||||||
|
const int len = strlen(val);
|
||||||
|
if (len > FIELD_SIZE)
|
||||||
|
blocks += (len-FIELD_SIZE-1) / (FIELD_SIZE-1) + 1;
|
||||||
|
}
|
||||||
|
return blocks;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TRecord770::tipo_record(char tipo)
|
||||||
|
{ _buffer[0] = tipo; tracciato().auto_fill(_buffer); }
|
||||||
|
|
||||||
|
// Azzera tutti i campi non posizionali dei record di tipo E
|
||||||
|
void TRecord770::azzera_campi_non_posizionali()
|
||||||
|
{
|
||||||
|
CHECK(ha_campi_non_posizionali(), "Impossibile azzerare un record senza campi non posizionali");
|
||||||
|
char* buf = _buffer.get_buffer() + HEADER_SIZE;
|
||||||
|
memset(buf, ' ', USEABLE_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Aggiunge un campo non posizionale ai record di tipo E,F,G,H,J
|
||||||
|
bool TRecord770::np_put(const char* code, const char* val)
|
||||||
|
{
|
||||||
|
CHECK(ha_campi_non_posizionali(), "Impossibile aggiungere campi non posizionali");
|
||||||
|
CHECKS(code && strlen(code) == CODE_SIZE, "Invalid field code ", code);
|
||||||
|
//CHECKS(val && *val, "Can't add empty field ", code);
|
||||||
|
if (!(val && *val))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Cerca il primo posto libero
|
||||||
|
int pos;
|
||||||
|
for (pos = HEADER_SIZE; pos < HEADER_SIZE+USEABLE_SIZE; pos += BLOCK_SIZE)
|
||||||
|
{
|
||||||
|
if (_buffer[pos] == ' ')
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
const int free_blocks = (USEABLE_SIZE - pos) / BLOCK_SIZE;
|
||||||
|
const int needed_blocks = calculate_blocks(val);
|
||||||
|
const bool ok = free_blocks >= needed_blocks;
|
||||||
|
|
||||||
|
if (ok) // Se ci sono abbastanza blocchi liberi
|
||||||
|
{
|
||||||
|
TString80 str(val); str.upper();
|
||||||
|
const int lenstr = str.len();
|
||||||
|
for (int i = 0; i < lenstr; )
|
||||||
|
{
|
||||||
|
_buffer.overwrite(code, pos);
|
||||||
|
pos += CODE_SIZE;
|
||||||
|
int maxlen = FIELD_SIZE;
|
||||||
|
if (i > 0)
|
||||||
|
{
|
||||||
|
_buffer.overwrite("+", pos);
|
||||||
|
pos++;
|
||||||
|
maxlen--;
|
||||||
|
}
|
||||||
|
const TString& substr = str.mid(i, maxlen);
|
||||||
|
_buffer.overwrite(substr, pos);
|
||||||
|
pos += maxlen;
|
||||||
|
i += maxlen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TRecord770::np_put(const char* code, long val)
|
||||||
|
{
|
||||||
|
TString16 str; str.format("%16ld", val);
|
||||||
|
return np_put(code, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TRecord770::np_put(const char* code, const real& val)
|
||||||
|
{
|
||||||
|
bool done = !val.is_zero();
|
||||||
|
if (done)
|
||||||
|
{
|
||||||
|
const TString& str = val.stringa(16, 2);
|
||||||
|
done = np_put(code, str);
|
||||||
|
}
|
||||||
|
return done;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TRecord770::np_put(const char* code, char val)
|
||||||
|
{
|
||||||
|
bool done = val > ' ';
|
||||||
|
if (done)
|
||||||
|
{
|
||||||
|
const char str[2] = { val, '\0' };
|
||||||
|
done = np_put(code, str);
|
||||||
|
}
|
||||||
|
return done;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TRecord770::np_put(const char* code, const TDate& date)
|
||||||
|
{
|
||||||
|
bool done = date.ok();
|
||||||
|
if (done)
|
||||||
|
{
|
||||||
|
TString16 str;
|
||||||
|
str.format("%8s%02d%02d%04d", "", date.day(), date.month(), date.year());
|
||||||
|
done = np_put(code, str);
|
||||||
|
}
|
||||||
|
return done;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TRecord770::np_put(const char* code, bool cb)
|
||||||
|
{
|
||||||
|
bool done = false;
|
||||||
|
if (cb)
|
||||||
|
{
|
||||||
|
TString16 str; str.format("%16d", 1);
|
||||||
|
done = np_put(code, str);
|
||||||
|
}
|
||||||
|
return done;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TRecord770::np_get(int pos, TString& key, TString& val) const
|
||||||
|
{
|
||||||
|
CHECK(ha_campi_non_posizionali(), "Impossibile leggere campi non posizionali");
|
||||||
|
const int n = HEADER_SIZE + pos * BLOCK_SIZE;
|
||||||
|
bool ok = false;
|
||||||
|
if (n < HEADER_SIZE + USEABLE_SIZE)
|
||||||
|
{
|
||||||
|
ok = _buffer[n] > ' ';
|
||||||
|
if (ok)
|
||||||
|
{
|
||||||
|
key = _buffer.mid(n, CODE_SIZE);
|
||||||
|
val = _buffer.mid(n+CODE_SIZE, FIELD_SIZE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TRecord770::np_get_real(int pos, TString& key, real& val) const
|
||||||
|
{
|
||||||
|
TString16 str;
|
||||||
|
const bool ok = np_get(pos, key, str);
|
||||||
|
if (ok && str.full())
|
||||||
|
{
|
||||||
|
str.replace(',', '.');
|
||||||
|
val = real(str);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
val = ZERO;
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TRecord770::valid() const
|
||||||
|
{
|
||||||
|
const char tipo = tipo_record();
|
||||||
|
const bool ok = (tipo > ' ') && (strchr("ABEHJZ", tipo) != NULL);
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
TRecord770::TRecord770() : _buffer(TOTAL_SIZE, ' ')
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
TRecord770::TRecord770(char tipo) : _buffer(TOTAL_SIZE, ' ')
|
||||||
|
{
|
||||||
|
tipo_record(tipo);
|
||||||
|
}
|
||||||
|
|
||||||
|
TRecord770::TRecord770(const TRecord770& rec) : _buffer(rec._buffer)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
TRecord770::~TRecord770()
|
||||||
|
{ }
|
109
m770/777lib.h
Normal file
109
m770/777lib.h
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
#ifndef __777LIB_H
|
||||||
|
#define __777LIB_H
|
||||||
|
|
||||||
|
#ifndef __ISAM_H
|
||||||
|
#include <isam.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Codice fiscale di Sirio Informatica e Sistemi S.p.A.
|
||||||
|
#define CF_PRODUTTORE "04879210963"
|
||||||
|
|
||||||
|
enum { CODE_SIZE = 8, FIELD_SIZE = 16, BLOCK_SIZE = 24, HEADER_SIZE = 89, USEABLE_SIZE = 1800, TOTAL_SIZE = 1900 };
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TRecord770
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
enum M770FieldType { AN, CF, CN, PI, DA, DT, NU, PN, PR, CB, VP, VN };
|
||||||
|
|
||||||
|
struct TField770 : public TObject
|
||||||
|
{
|
||||||
|
TString _desc;
|
||||||
|
int _pos; // Base 1
|
||||||
|
int _len;
|
||||||
|
M770FieldType _type; // AN,NU,...
|
||||||
|
};
|
||||||
|
|
||||||
|
class TTracciato770 : public TObject
|
||||||
|
{
|
||||||
|
char _tipo;
|
||||||
|
TArray _fields;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void add_field(const char* name, M770FieldType tipo, int pos, int len, int filedno = 0);
|
||||||
|
void add_filler(int pos, int len, M770FieldType tipo = AN) { add_field("Filler", tipo, pos, len); }
|
||||||
|
|
||||||
|
TTracciato770() {}
|
||||||
|
void set_tipo(char t) { _tipo = t; }
|
||||||
|
|
||||||
|
public:
|
||||||
|
bool exists(int pos) const { return _fields.objptr(pos-1) != NULL; }
|
||||||
|
const TField770& field(int pos) const;
|
||||||
|
void auto_fill(TString& buffer) const;
|
||||||
|
int campi_posizionali() const { return _fields.last()+1; }
|
||||||
|
|
||||||
|
TTracciato770(char tipo);
|
||||||
|
virtual ~TTracciato770();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class TRecord770 : public TObject
|
||||||
|
{
|
||||||
|
TString _buffer;
|
||||||
|
|
||||||
|
protected: // TObject
|
||||||
|
virtual TObject* dup() const { return new TRecord770(*this); }
|
||||||
|
virtual void print_on(ostream& outs) const;
|
||||||
|
virtual void read_from(istream& ins);
|
||||||
|
|
||||||
|
protected: // TObject
|
||||||
|
virtual const TTracciato770& tracciato() const;
|
||||||
|
|
||||||
|
const TField770& get_field(int pos) const;
|
||||||
|
void set(const TField770& fld, const char* val);
|
||||||
|
int calculate_blocks(const char* val) const;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void set(int pos, const char* val);
|
||||||
|
void set(int pos, int val);
|
||||||
|
void set(int pos, long val);
|
||||||
|
void set(int pos, const real& val);
|
||||||
|
void set(int pos, const TDate& val);
|
||||||
|
void set(int pos, char val);
|
||||||
|
void set(int pos, bool val);
|
||||||
|
bool np_put(const char* code, const char* val);
|
||||||
|
bool np_put(const char* code, const real& val);
|
||||||
|
bool np_put(const char* code, long val);
|
||||||
|
bool np_put(const char* code, char val);
|
||||||
|
bool np_put(const char* code, const TDate& date);
|
||||||
|
bool np_put(const char* code, bool cb);
|
||||||
|
|
||||||
|
const char* get(int pos, TString& str) const;
|
||||||
|
int get_int(int pos) const;
|
||||||
|
char get_char(int pos) const;
|
||||||
|
|
||||||
|
bool np_get(int pos, TString& key, TString& val) const;
|
||||||
|
bool np_get_real(int pos, TString& key, real& val) const;
|
||||||
|
|
||||||
|
const TRecord770& operator=(const TRecord770& rec)
|
||||||
|
{ _buffer = rec._buffer; return *this; }
|
||||||
|
|
||||||
|
char tipo_record() const { return _buffer[0]; }
|
||||||
|
void tipo_record(char tipo);
|
||||||
|
|
||||||
|
int campi_posizionali() const { return tracciato().campi_posizionali(); }
|
||||||
|
void azzera_campi_non_posizionali();
|
||||||
|
virtual bool ha_campi_non_posizionali() const { return strchr("DEFGHJ", tipo_record()) != NULL; }
|
||||||
|
bool ha_campi_non_posizionali_compilati() const
|
||||||
|
{ return _buffer[90] > ' ' && ha_campi_non_posizionali(); }
|
||||||
|
|
||||||
|
virtual bool valid() const;
|
||||||
|
|
||||||
|
TRecord770();
|
||||||
|
TRecord770(char tipo);
|
||||||
|
TRecord770(const TRecord770& rec);
|
||||||
|
TRecord770(const TRectype& rec);
|
||||||
|
virtual ~TRecord770();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
Loading…
x
Reference in New Issue
Block a user