Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
Corretta importazione agenti nei clienti


git-svn-id: svn://10.65.10.50/branches/R_10_00@21169 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2010-11-23 16:31:15 +00:00
parent e0762200f6
commit 9110f73911
5 changed files with 346 additions and 170 deletions

View File

@ -1,5 +1,6 @@
#include "hacnv100.h" #include "hacnv100.h"
#include "hacnv100a.h" #include "hacnv100a.h"
#include "halib.h"
#include <applicat.h> #include <applicat.h>
#include <automask.h> #include <automask.h>
@ -824,57 +825,19 @@ bool THardy_pcon::trasferisci_sottoconti()
return write_enabled(); return write_enabled();
} }
long THardy_clienti::get_codcf(const TString &key) ///////////////////////////////////////////////////////////
{ // THardy_clienti
long codcf = 0; ///////////////////////////////////////////////////////////
const char first = key[0];
long cod_hardy = atoi(key.mid(3,6));
switch (first)
{
case 'H':
{
codcf = 130000+cod_hardy;
}
break;
case 'P':
{
codcf = 140000+cod_hardy;
}
break;
case '0':
{
const char second = key[1];
if (second == '1')
codcf = 120000+cod_hardy;
else if (second == '0')
{
const char third = key[2];
if (third == '4')
codcf = 110000+cod_hardy;
else if (third == '3')
codcf = 100000+cod_hardy;
else if (third == '2')
codcf = 200000+cod_hardy;
else
codcf = cod_hardy;
}
}
break;
default:
codcf = cod_hardy;
}
if (codcf > 999999)
codcf = 0;
return codcf;
}
bool THardy_clienti::trasferisci() bool THardy_clienti::trasferisci()
{ {
if (trasferisci_clienti()) bool ok = trasferisci_clienti();
return trasferisci_destinazioni(); if (ok)
return false; ok = trasferisci_destinazioni();
return ok;
} }
// trasferisce i clienti
bool THardy_clienti::trasferisci_clienti() bool THardy_clienti::trasferisci_clienti()
{ {
TString query = TString query =
@ -899,8 +862,8 @@ bool THardy_clienti::trasferisci_clienti()
while (++hi) while (++hi)
{ {
// costruisco la chiave // costruisco la chiave
const TString16 key = get_str("IdConto"); const TString& key = get_str("IdConto");
long codcf = get_codcf(key); const long codcf = get_codcf(key);
if (codcf > 0) if (codcf > 0)
{ {
rec.zero(); rec.zero();
@ -930,7 +893,8 @@ bool THardy_clienti::trasferisci_clienti()
if (test_write(clienti)) if (test_write(clienti))
{ {
TString msg; TString msg;
msg << TR("Inserito cliente ") << " '" << key << '\'' << TR("con codice ") << codcf ; msg << TR("Inserito cliente ") << " '" << key << "\' -> "
<< codcf << " - " << rec.get(CLI_RAGSOC);
log(msg); log(msg);
} }
@ -940,8 +904,11 @@ bool THardy_clienti::trasferisci_clienti()
cfv_rec.put(CFV_CODCF, codcf); cfv_rec.put(CFV_CODCF, codcf);
const TString4 codzona = get_str("IdZona"); const TString4 codzona = get_str("IdZona");
cfv_rec.put(CFV_CODZONA, codzona); cfv_rec.put(CFV_CODZONA, codzona);
const TString4 codag = get_str("IdAgente1"); //agente principale
TString8 codag = get_str("IdAgente1"); //agente principale
codag.right_just(5, '0');
cfv_rec.put(CFV_CODAG, codag); cfv_rec.put(CFV_CODAG, codag);
test_write(cfven); test_write(cfven);
} }
else else
@ -956,6 +923,8 @@ bool THardy_clienti::trasferisci_clienti()
return write_enabled(); return write_enabled();
} }
// verifica se esiste un altro cliente con stessa partita iva (solo tra 200000 e 300000)
// per decidere se fare scambio dati tra destinazioni e clienti oppure inserire un indirizzo di spedizione
bool THardy_clienti::is_piva_doppia(const long codcf) bool THardy_clienti::is_piva_doppia(const long codcf)
{ {
TToken_string tok; tok.add("C"); tok.add(codcf); TToken_string tok; tok.add("C"); tok.add(codcf);
@ -967,6 +936,7 @@ bool THardy_clienti::is_piva_doppia(const long codcf)
return (clifo.items() > 1); return (clifo.items() > 1);
} }
// restituisce il codice indirizzo di spedizione da usare per inserimento record
int THardy_clienti::get_next_key_indsped(const char tipocf, const long codcf) const int THardy_clienti::get_next_key_indsped(const char tipocf, const long codcf) const
{ {
TISAM_recordset indsped("USE INDSPED\nFROM TIPOCF=#TIPO CODCF=#CODE\nTO TIPOCF=#TIPO CODCF=#CODE"); TISAM_recordset indsped("USE INDSPED\nFROM TIPOCF=#TIPO CODCF=#CODE\nTO TIPOCF=#TIPO CODCF=#CODE");
@ -982,11 +952,14 @@ int THardy_clienti::get_next_key_indsped(const char tipocf, const long codcf) co
return codind; return codind;
} }
// trasferisce la tabella Destinazioni che vale sia come indirizzi di spedizione sia come verifica dei dati sui clienti
// in caso di partita iva doppia (solo clienti tra 200000 e 300000) prende i dati su Destinazioni
// come dati anagrafici del clienti (esempio Esselunga)
bool THardy_clienti::trasferisci_destinazioni() bool THardy_clienti::trasferisci_destinazioni()
{ {
TString query = TString query =
"SELECT * " "SELECT * "
"FROM dbo.Destinazioni "; "FROM dbo.Destinazioni";
TRecordset& recset = create_recordset(query); TRecordset& recset = create_recordset(query);
TConfig& ini = config(); TConfig& ini = config();
@ -1004,8 +977,8 @@ bool THardy_clienti::trasferisci_destinazioni()
while (++hi) while (++hi)
{ {
// costruisco la chiave // costruisco la chiave
const TString16 key = get_str("IdConto"); const TString& key = get_str("IdConto");
long codcf = get_codcf(key); const long codcf = get_codcf(key);
rec.zero(); rec.zero();
rec.put(CLI_TIPOCF, "C"); rec.put(CLI_TIPOCF, "C");
rec.put(CLI_CODCF, codcf); rec.put(CLI_CODCF, codcf);
@ -1048,8 +1021,7 @@ bool THardy_clienti::trasferisci_destinazioni()
else else
{ {
// inserisco indirizzo di spedizione // inserisco indirizzo di spedizione
int codind = 0; int codind = get_next_key_indsped('C', codcf);
codind = get_next_key_indsped('C', codcf);
rec_indsped.zero(); rec_indsped.zero();
rec_indsped.put(IND_TIPOCF, "C"); rec_indsped.put(IND_TIPOCF, "C");
rec_indsped.put(IND_CODCF, codcf); rec_indsped.put(IND_CODCF, codcf);
@ -1075,9 +1047,13 @@ bool THardy_clienti::trasferisci_destinazioni()
return write_enabled(); return write_enabled();
} }
long THardy_fornitori::get_codcf(const TString &key) const ///////////////////////////////////////////////////////////
// THardy_fornitori
///////////////////////////////////////////////////////////
long THardy_clienti::get_codcf(const TString& key) const
{ {
long codcf = atol(key.mid(3,6)); const long codcf = atol(key.mid(3,6));
return codcf; return codcf;
} }
@ -1099,8 +1075,8 @@ bool THardy_fornitori::trasferisci()
THardy_iterator hi(this); THardy_iterator hi(this);
while (++hi) while (++hi)
{ {
const TString16 key = get_str("IdConto"); const TString& key = get_str("IdConto");
long codcf = get_codcf(key); const long codcf = get_codcf(key);
if (codcf > 0) if (codcf > 0)
{ {
rec.zero(); rec.zero();
@ -1140,6 +1116,9 @@ bool THardy_fornitori::trasferisci()
return write_enabled(); return write_enabled();
} }
///////////////////////////////////////////////////////////
// THardy_agenti
///////////////////////////////////////////////////////////
const TString& THardy_agenti::get_codage(const TString& key) const const TString& THardy_agenti::get_codage(const TString& key) const
{ {
TString& codage = get_tmp_string(); TString& codage = get_tmp_string();
@ -1166,14 +1145,20 @@ bool THardy_agenti::trasferisci()
THardy_iterator hi(this); THardy_iterator hi(this);
while (++hi) while (++hi)
{ {
const TString16 key = get_str("IdAgente"); const TString8 key = get_str("IdAgente");
const TString8 codage = get_codage(key); if (!real::is_null(key))
if (codage > 0)
{ {
rec.zero(); rec.zero();
rec.put(AGE_CODAGE, codage); rec.put(AGE_CODAGE, get_codage(key));
aggiorna_record(rec, lista_campi); aggiorna_record(rec, lista_campi);
test_write(agenti); if (test_write(agenti))
{
TString msg;
msg << TR("Inserito agente ") << " '" << key << "\' -> "
<< rec.get(AGE_CODAGE) << " - " << rec.get(AGE_RAGSOC);
log(msg);
}
} }
else else
{ {
@ -1186,6 +1171,100 @@ bool THardy_agenti::trasferisci()
return write_enabled(); return write_enabled();
} }
///////////////////////////////////////////////////////////
// THardy_listini
///////////////////////////////////////////////////////////
bool THardy_listini::trasferisci()
{
if (trasferisci_listini())
return trasferisci_listinid();
return false;
}
// trasferisce tabella Listini (condv L)
bool THardy_listini::trasferisci_listini()
{
TString query =
"SELECT * "
"FROM dbo.Listini ";
TRecordset& recset = create_recordset(query);
TConfig& ini = config();
TString_array lista_campi;
ini.list_variables(lista_campi, true, "LISTINI", true);
TSystemisamfile condv(LF_CONDV);
condv.open(_lock);
TRectype& rec = condv.curr();
THardy_iterator hi(this);
while (++hi)
{
aggiorna_record(rec, lista_campi);
test_write(condv);
}
condv.close();
return write_enabled();
}
// trasferisce tabella ListiniD (rcondv L)
bool THardy_listini::trasferisci_listinid()
{
TString query =
"SELECT * "
"FROM dbo.ListiniD ";
TRecordset& recset = create_recordset(query);
TConfig& ini = config();
TString_array lista_campi;
ini.list_variables(lista_campi, true, "LISTINID", true);
TSystemisamfile rcondv(LF_RCONDV);
rcondv.open(_lock);
TRectype& rec = rcondv.curr();
THardy_iterator hi(this);
while (++hi)
{
aggiorna_record(rec, lista_campi);
test_write(rcondv);
}
rcondv.close();
return write_enabled();
}
///////////////////////////////////////////////////////////
// THardy_contratti
///////////////////////////////////////////////////////////
// trasferisce tabella ListiniCF (condv C)
// inserisco una testata per ogni cliente e tutte le righe relative agli articoli di quel cliente
// tralasciando le righe con DataFine < data impostata da parametri
bool THardy_contratti::trasferisci()
{
TString query =
"SELECT * "
"FROM dbo.ListiniCF "
"ORDER BY IdConto ";
TRecordset& recset = create_recordset(query);
TConfig& ini = config();
TString_array lista_campi;
ini.list_variables(lista_campi, true, "CONTRATTI", true);
TSystemisamfile condv(LF_CONDV);
TSystemisamfile rcondv(LF_RCONDV);
condv.open(_lock);
rcondv.open(_lock);
TRectype& rec_condv = condv.curr();
TRectype& rec_rcondv = rcondv.curr();
THardy_iterator hi(this);
int oldconto = -1;
int codcontratto = 0;
while (++hi)
{
aggiorna_record(rec_condv, lista_campi);
test_write(condv);
}
condv.close();
return write_enabled();
}
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// TImportazioneHardy_mask // TImportazioneHardy_mask
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
@ -1292,7 +1371,6 @@ void TImportazioneHardy_mask::trasferisci()
book.add(log); book.add(log);
rep_to_print = true; rep_to_print = true;
} }
if (go_on && get_bool(F_UM)) if (go_on && get_bool(F_UM))
{ {
THardy_um pc; THardy_um pc;
@ -1341,6 +1419,22 @@ void TImportazioneHardy_mask::trasferisci()
book.add(log); book.add(log);
rep_to_print = true; rep_to_print = true;
} }
if (go_on && get_bool(F_LISTINI))
{
THardy_listini pc;
pc.init(TR("Listini"), query_header, log);
go_on = pc.trasferisci();
book.add(log);
rep_to_print = true;
}
if (go_on && get_bool(F_CONTRATTI))
{
THardy_contratti pc;
pc.init(TR("Contratti"), query_header, log);
go_on = pc.trasferisci();
book.add(log);
rep_to_print = true;
}
if (rep_to_print && book.pages() > 0) if (rep_to_print && book.pages() > 0)
book.preview(); book.preview();

View File

@ -190,6 +190,7 @@ protected:
bool trasferisci_gruppi(); bool trasferisci_gruppi();
bool trasferisci_conti(); bool trasferisci_conti();
bool trasferisci_sottoconti(); bool trasferisci_sottoconti();
public: public:
virtual bool trasferisci(); virtual bool trasferisci();
}; };
@ -198,18 +199,17 @@ class THardy_clienti : public THardy_transfer
{ {
protected: protected:
bool is_piva_doppia(const long codcf); bool is_piva_doppia(const long codcf);
long get_codcf(const TString& key);
int get_next_key_indsped(const char tipocf, const long codcf) const; int get_next_key_indsped(const char tipocf, const long codcf) const;
bool trasferisci_clienti(); bool trasferisci_clienti();
bool trasferisci_destinazioni(); bool trasferisci_destinazioni();
long get_codcf(const TString& key) const;
public: public:
virtual bool trasferisci(); virtual bool trasferisci();
}; };
class THardy_fornitori : public THardy_transfer class THardy_fornitori : public THardy_clienti
{ {
protected:
long get_codcf(const TString& key) const;
public: public:
virtual bool trasferisci(); virtual bool trasferisci();
}; };
@ -222,6 +222,20 @@ public:
virtual bool trasferisci(); virtual bool trasferisci();
}; };
class THardy_listini : public THardy_transfer
{
protected:
bool trasferisci_listini();
bool trasferisci_listinid();
public:
virtual bool trasferisci();
};
class THardy_contratti : public THardy_transfer
{
public:
virtual bool trasferisci();
};
class TCache_art; class TCache_art;
class TCache_umart; class TCache_umart;

View File

@ -81,42 +81,52 @@ S0=DsBanca
[CAB] [CAB]
S0=DsDocumento S0=DsDocumento
// tabella causali contabili
[CAUCONT] [CAUCONT]
CODCAUS = IdCausale CODCAUS = IdCausale
DESCR = DsCausaleEstesa DESCR = DsCausaleEstesa
// tabella causali magazzino
[CAUMAG] [CAUMAG]
CODTAB = IdCausale CODTAB = IdCausale
S0 = DsCausaleEstesa S0 = DsCausaleEstesa
// tabella unita di misura
[UM] [UM]
CODTAB = IdUm CODTAB = IdUm
S0 = DsUm S0 = DsUm
// articoli
[ANAMAG] [ANAMAG]
CODART = IdProdotto CODART = IdProdotto
DESCR = DsProdotto DESCR = DsProdotto
CODIVA = IdIva CODIVA = IdIva
GRMERC = IdCategoria GRMERC = IdCategoria
// unita di misura articoli
[UMART] [UMART]
CODART = IdProdotto CODART = IdProdotto
NRIGA = _FISSO,1 NRIGA = _FISSO,1
UM = IdUM1 UM = IdUM1
// piano dei conti (gruppi)
[MASTRI] [MASTRI]
DESCR = DsMastro DESCR = DsMastro
// piano dei conti (conti e sottoconti)
[CONTI] [CONTI]
DESCR = RagioneSociale DESCR = RagioneSociale
// conversione tabella tipo mastro
[FlTipoMastro] [FlTipoMastro]
1 = C 1 = C
5 = F 5 = F
// parametri per conversione piano dei conti
[PARAMETRI] [PARAMETRI]
PCON=04|05 PCON=04|05
// fornitori
[FORNITORI] [FORNITORI]
RAGSOC = _STREXPR,LEFT(RagioneSociale+" "+DatiAggiuntivi; 50) RAGSOC = _STREXPR,LEFT(RagioneSociale+" "+DatiAggiuntivi; 50)
INDCF = Indirizzo INDCF = Indirizzo
@ -170,6 +180,7 @@ DIRTY =
REFERENTE = Referente REFERENTE = Referente
VALINTRA = VALINTRA =
// clienti
[CLIENTI] [CLIENTI]
RAGSOC = _STREXPR,LEFT(RagioneSociale+" "+DatiAggiuntivi; 50) RAGSOC = _STREXPR,LEFT(RagioneSociale+" "+DatiAggiuntivi; 50)
INDCF = Indirizzo INDCF = Indirizzo
@ -223,6 +234,7 @@ DIRTY =
REFERENTE = Referente REFERENTE = Referente
VALINTRA = VALINTRA =
// archivio destinazioni hardy che agisce sul cliente
[DESTINAZIONI] [DESTINAZIONI]
RAGSOC = _STREXPR,LEFT(RagioneSociale+" "+DatiAggiuntivi; 50) RAGSOC = _STREXPR,LEFT(RagioneSociale+" "+DatiAggiuntivi; 50)
INDCF = Indirizzo INDCF = Indirizzo
@ -263,6 +275,7 @@ DIRTY =
REFERENTE = Referente REFERENTE = Referente
VALINTRA = VALINTRA =
// archivio destinazioni hardy che agisce su indirizzi di spedizione
[INDSPED] [INDSPED]
RAGSOC = _STREXPR,LEFT(RagioneSociale+" "+DatiAggiuntivi; 50) RAGSOC = _STREXPR,LEFT(RagioneSociale+" "+DatiAggiuntivi; 50)
INDIR = Indirizzo INDIR = Indirizzo
@ -276,85 +289,14 @@ TEL = Telefono1
PFAX = PFAX =
FAX = TelFax FAX = TelFax
[CFVEN]
CODINDDOC =
CODNOTE =
CODLEG =
CODCATC = _TAB,TPC,CategoryCode,S6
CODZONA = _TAB,TPZ,ZoneCode,S6
CODAG =
PERCPROVV =
CAPZON =
LIQPAG =
CODPRCF =
CODINDSP =
CODNOTESP1 =
CODNOTESP2 =
CODSPMEZZO = _TAB,%TPM,TransportCode,S6
CODPORTO = _TAB,%TPP,PortCode,S6
CODVETT1 =
CODVETT2 =
CODVETT3 =
RAGGDOC =
CODCFASS =
ASSFIS = _TABCOM,%TPI,CodIvaNI,S6
FATTSOSP =
VSNRPROT = ExportOrigNum
VSDATAREG = ExportOrigDate
NSNPROT = ExportProtNum
NSDATAREG = ExportProtDate
CATFIN =
CODABIPR =
CODCABPR =
CODINDEFF =
EMEFFRICH =
RAGGEFF =
IMPMINEFF =
NONACCEFF =
NONSCADEFF =
ADDBOLLI =
PERCSPINC =
IVARID =
CATVEN =
GESTCONTR =
CODLIST =
CODSCC =
CODMAG =
CODDEP =
CODSP1 =
CODSP2 =
CODSP3 =
CODSP4 =
PROFSOLL =
MAXSOLL =
DATAESC =
NUMESC =
DATASOLL =
SCONTO = Discount
TITOLO =
RAGGOR =
MINORD =
MAXORD =
PREVORD =
TIPOEVORD =
ESACC =
ESALL =
ESCAR =
ESPLA =
ESLEG =
ESVET =
CONAIASS =
TIPODOCFAT =
CODCAUS =
[AGENTI] [AGENTI]
RAGSOC = TradeName1 RAGSOC = DsAgente
TIPO = _FISSO,A TIPO = _FISSO,A
CODCAPO = CODCAPO =
PERCAPO = PERCAPO =
PERCFATT = PERCFATT =
CAMPOPROVV = CAMPOPROVV =
PERCPROVV = ProvvAgent PERCPROVV = PercProvvigione
SEQRIC = SEQRIC =
CODRICPR1 = CODRICPR1 =
CODRICPR2 = CODRICPR2 =
@ -370,38 +312,118 @@ MATRICOLA =
PLURIMAND = PLURIMAND =
DATACESS = DATACESS =
[INDSPED] [LISTINI]
TIPO = _FISSO,L
[CONAI] CATVEN =
AC = CONACC TIPOCF =
AL = CONALL CODCF =
CA = CONCAR COD = KListino
LE = CONLEG DESCR = IdListino
PL = CONPLA CODVAL = _TRADUCI,IdDivisa
VE = CONVET CAMBIO =
CONTROEURO =
DATACAM =
VALIN = 01-01-2001
VALFIN = 31-12-2100
IMPLORDI =
GESTUM =
GESTSCAGL =
GESTSCO =
OBBLIG =
CODLISSUCC =
SEQRIC =
DECIMALI =
FATHCATVEN =
FATHCOD =
ARROTONDA =
[CFV_CONAI] [LISTINID]
AC = ESACC TIPO = _FISSO,L
AL = ESALL CATVEN =
CA = ESCAR TIPOCF =
LE = ESLEG CODCF =
PL = ESPLA COD = KListino
VE = ESVET TIPORIGA = _FISSO,A
CODRIGA = IdProdotto
UM =
NSCAGL =
QLIM =
PREZZO = Prezzo
SCONTO = Sconto1
ADDIVA =
CODIVA =
PERCPROVV =
QOM =
QBASE =
CODARTOM =
PROMAGGIO =
UMOM =
CODLOTTO =
ARTES =
DATAULTAUM =
PRZSTO =
DATAPRZSTO =
[STANDARD] // conversione valute per listini
RAGGDOC=X [IdDivisa]
RAGGEFF=X 006=EUR
ADDBOLLI=
PERCSPINC=
[CODNUM] // contratti
1 = B01 [CONTRATTI]
2 = B01 TIPO = _FISSO,C
CATVEN =
TIPOCF =
CODCF =
COD = KListino
DESCR = IdListino
CODVAL = _TRADUCI,IdDivisa
CAMBIO =
CONTROEURO =
DATACAM =
VALIN = 01-01-2001
VALFIN = 31-12-2100
IMPLORDI =
GESTUM =
GESTSCAGL =
GESTSCO =
OBBLIG =
CODLISSUCC =
SEQRIC =
DECIMALI =
FATHCATVEN =
FATHCOD =
ARROTONDA =
[TIPODOC] [LISTINID]
20 = B01 TIPO = _FISSO,L
DDT C/RIP = BOF CATVEN =
TIPOCF =
CODCF =
COD = KListino
TIPORIGA = _FISSO,A
CODRIGA = IdProdotto
UM =
NSCAGL =
QLIM =
PREZZO = Prezzo
SCONTO = Sconto1
ADDIVA =
CODIVA =
PERCPROVV =
QOM =
QBASE =
CODARTOM =
PROMAGGIO =
UMOM =
CODLOTTO =
ARTES =
DATAULTAUM =
PRZSTO =
DATAPRZSTO =
// parametri generali della maschera (dns user password)
[Main] [Main]
201 = hardy 201 = hardy
202 = 202 =

View File

@ -399,3 +399,48 @@ const TString& format_data_6(const TDate& data)
str_data.format("%02d%02d%02d", day, month, year%100); str_data.format("%02d%02d%02d", day, month, year%100);
return str_data; return str_data;
} }
// determina codice cliente campo a partire da codice hardy in base alle regole dettatemi da Robbi
const long get_codcf(const TString& key)
{
long codcf = 0;
const char first = key[0];
long cod_hardy = atoi(key.mid(3,6));
switch (first)
{
case 'H':
{
codcf = 130000+cod_hardy;
}
break;
case 'P':
{
codcf = 140000+cod_hardy;
}
break;
case '0':
{
const char second = key[1];
if (second == '1')
codcf = 120000+cod_hardy;
else if (second == '0')
{
const char third = key[2];
if (third == '4')
codcf = 110000+cod_hardy;
else if (third == '3')
codcf = 100000+cod_hardy;
else if (third == '2')
codcf = 200000+cod_hardy;
else
codcf = cod_hardy;
}
}
break;
default:
codcf = cod_hardy;
}
if (codcf > 999999)
codcf = 0;
return codcf;
}

View File

@ -220,4 +220,5 @@ public:
real find_sconto(const TString& str_sconto); real find_sconto(const TString& str_sconto);
const TString& find_codag(const long codcf); const TString& find_codag(const long codcf);
const TString& format_data_8(const TDate& data); const TString& format_data_8(const TDate& data);
const TString& format_data_6(const TDate& data); const TString& format_data_6(const TDate& data);
const long get_codcf(const TString& key);