Patch level : 10.0
Files correlati : fe0.exe fe0400a.msk Ricompilazione Demo : [ ] Commento : Aggiunto programma per controllo archivi dati rilevanti git-svn-id: svn://10.65.10.50/branches/R_10_00@22558 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
874e979ad6
commit
deb2d098cb
@ -8,6 +8,7 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
case 1: fe0200(argc, argv); break; // Immissione / Generazione Spesometro
|
case 1: fe0200(argc, argv); break; // Immissione / Generazione Spesometro
|
||||||
case 2: fe0300(argc, argv); break; // Somma file Spesometro (Dorotee)
|
case 2: fe0300(argc, argv); break; // Somma file Spesometro (Dorotee)
|
||||||
|
case 3: fe0400(argc, argv); break; // Controllo contratti su movimenti
|
||||||
default: fe0100(argc, argv); break; // Gestione tabelle (contratti)
|
default: fe0100(argc, argv); break; // Gestione tabelle (contratti)
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
3
fe/fe0.h
3
fe/fe0.h
@ -1,3 +1,4 @@
|
|||||||
int fe0100(int argc, char* argv[]);
|
int fe0100(int argc, char* argv[]);
|
||||||
int fe0200(int argc, char* argv[]);
|
int fe0200(int argc, char* argv[]);
|
||||||
int fe0300(int argc, char* argv[]);
|
int fe0300(int argc, char* argv[]);
|
||||||
|
int fe0400(int argc, char* argv[]);
|
253
fe/fe0100.cpp
253
fe/fe0100.cpp
@ -29,42 +29,6 @@ const long MANUAL_ROW = 900000L;
|
|||||||
// Utility
|
// Utility
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static real importo_limite(int anno)
|
|
||||||
{ return anno > 2010 ? 3000.0 : 25000.0; }
|
|
||||||
|
|
||||||
static bool is_nota_variazione(const TRectype& mov)
|
|
||||||
{
|
|
||||||
const int logicnum = mov.num();
|
|
||||||
|
|
||||||
if (logicnum == LF_MOV)
|
|
||||||
{
|
|
||||||
const real totdoc = mov.get_real(MOV_TOTDOC);
|
|
||||||
if (totdoc < ZERO)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
const int tipomov = mov.get_int(MOV_TIPOMOV);
|
|
||||||
if (tipomov == 2) // Nota di credito/debito per saldaconto
|
|
||||||
return true;
|
|
||||||
|
|
||||||
const TString& tipodoc = mov.get(MOV_TIPODOC);
|
|
||||||
if (tipodoc == "NC" || tipodoc == "ND") // Nota di credito/debito senza saldaconto
|
|
||||||
return true;
|
|
||||||
} else
|
|
||||||
if (logicnum == LF_ALLEG)
|
|
||||||
{
|
|
||||||
const TString& numrett = mov.get(ALL_NUMRETT);
|
|
||||||
if (numrett.full())
|
|
||||||
return true;
|
|
||||||
|
|
||||||
const real importo = mov.get_real(ALL_IMPORTO);
|
|
||||||
const real imposta = mov.get_real(ALL_IMPOSTA);
|
|
||||||
if (importo < ZERO || imposta < ZERO)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum TExclusion_mode { em_incluso, em_importo_limite, em_no_allegato,
|
enum TExclusion_mode { em_incluso, em_importo_limite, em_no_allegato,
|
||||||
em_fiscalita_agevolata, em_estero, em_intra,
|
em_fiscalita_agevolata, em_estero, em_intra,
|
||||||
em_art8, em_data_limite, em_passaggi_interni,
|
em_art8, em_data_limite, em_passaggi_interni,
|
||||||
@ -89,199 +53,6 @@ static const char* mode2string(TExclusion_mode motivo)
|
|||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
|
||||||
// TContratto
|
|
||||||
///////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
class TContratto : public TObject
|
|
||||||
{
|
|
||||||
TRectype _rec;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
bool importo_annuale(int anno, real& importo, real& imposta) const;
|
|
||||||
bool importo_figli(int anno, real& importo, real& imposta) const;
|
|
||||||
|
|
||||||
public:
|
|
||||||
virtual bool ok() const { return !_rec.empty(); }
|
|
||||||
const TString& chiave() const { return _rec.get("CODTAB"); }
|
|
||||||
const TString& codice() const { return chiave().mid(7); }
|
|
||||||
const TString& codice_padre() const { return _rec.get("S1"); }
|
|
||||||
const TString& codice_base() const;
|
|
||||||
bool totale_annuale(int anno, real& importo, real& imposta) const;
|
|
||||||
int modalita_pagamento() const;
|
|
||||||
|
|
||||||
bool init(const TString& codtab);
|
|
||||||
bool init(char tipocf, long codcf, const TString& codcont);
|
|
||||||
bool init(const TRectype& rec);
|
|
||||||
|
|
||||||
TContratto() : _rec(LF_TABMOD) {}
|
|
||||||
TContratto(char tipocf, long codcf, const char* codcont) : _rec(LF_TABMOD) { init(tipocf, codcf, codcont); }
|
|
||||||
TContratto(const TRectype& rec) : _rec(LF_TABMOD) { init(rec); }
|
|
||||||
};
|
|
||||||
|
|
||||||
bool TContratto::importo_annuale(int anno, real& importo, real& imposta) const
|
|
||||||
{
|
|
||||||
if (_rec.empty() || anno < 2010)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Determina l'indice i [0..3] degli importi del contratto per l'anno richiesto
|
|
||||||
char fld[] = "I3";
|
|
||||||
int i = 3;
|
|
||||||
for (i = 3; i > 0; i--)
|
|
||||||
{
|
|
||||||
fld[1] = '0'+i;
|
|
||||||
const int y = _rec.get_int(fld);
|
|
||||||
if (y > 0 && y <= anno)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Determina il nome del campo importo corrispondente all'indice i: 0 -> R0; 1 -> R2; 2 -> R4; 3 -> R6
|
|
||||||
fld[0] = 'R';
|
|
||||||
fld[1] = '0'+(i*2);
|
|
||||||
importo = _rec.get_real(fld);
|
|
||||||
|
|
||||||
fld[1]++; // Il campo imposta è sempre quello successivo a quello dell'importo
|
|
||||||
imposta = _rec.get_real(fld);
|
|
||||||
|
|
||||||
return importo > ZERO;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TContratto::importo_figli(int anno, real& importo, real& imposta) const
|
|
||||||
{
|
|
||||||
const TString& codtab = _rec.get("CODTAB");
|
|
||||||
const TString& prefix = codtab.left(7);
|
|
||||||
const TString& suffix = codtab.mid(7);
|
|
||||||
|
|
||||||
TString query;
|
|
||||||
query << "USE &CON SELECT S1=\"" << suffix << '\"'
|
|
||||||
<< "\nFROM CODTAB=\"" << prefix << '\"'
|
|
||||||
<< "\nTO CODTAB=\"" << prefix << '\"';
|
|
||||||
|
|
||||||
TISAM_recordset recset(query);
|
|
||||||
|
|
||||||
importo = imposta = ZERO;
|
|
||||||
for (bool ok = recset.move_first(); ok; ok = recset.move_next())
|
|
||||||
{
|
|
||||||
const TContratto child(recset.cursor()->curr());
|
|
||||||
real imp, iva; child.importo_figli(anno, imp, iva);
|
|
||||||
importo += imp;
|
|
||||||
imposta += iva;
|
|
||||||
}
|
|
||||||
if (importo <= ZERO)
|
|
||||||
importo_annuale(anno, importo, imposta);
|
|
||||||
|
|
||||||
return !importo.is_zero();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TContratto::totale_annuale(int anno, real& importo, real& imposta) const
|
|
||||||
{
|
|
||||||
importo = imposta = ZERO;
|
|
||||||
if (!_rec.empty() && anno >= 2010)
|
|
||||||
{
|
|
||||||
const TString& padre = _rec.get("S1");
|
|
||||||
if (padre.full())
|
|
||||||
{
|
|
||||||
const TString& codtab = _rec.get("CODTAB");
|
|
||||||
const TContratto master(codtab[0], atol(codtab.mid(1,6)), padre);
|
|
||||||
master.totale_annuale(anno, importo, imposta);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
importo_figli(anno, importo, imposta);
|
|
||||||
}
|
|
||||||
return importo > ZERO;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TContratto::modalita_pagamento() const
|
|
||||||
{
|
|
||||||
int modpag = _rec.get_int("S6");
|
|
||||||
if (modpag != 2 && modpag != 3)
|
|
||||||
modpag = 2;
|
|
||||||
return modpag;
|
|
||||||
}
|
|
||||||
|
|
||||||
const TString& TContratto::codice_base() const
|
|
||||||
{
|
|
||||||
TString80 c = codice(), p = codice_padre();
|
|
||||||
if (p.full())
|
|
||||||
{
|
|
||||||
TAssoc_array antiloop;
|
|
||||||
antiloop.add(c);
|
|
||||||
while (p.full() && !antiloop.is_key(p)) // Verifico loop assurdo
|
|
||||||
{
|
|
||||||
c = p;
|
|
||||||
antiloop.add(c);
|
|
||||||
TString80 key = chiave().left(7);
|
|
||||||
key << p;
|
|
||||||
p = cache().get("&CON", key, "S1");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return get_tmp_string() = c;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TContratto::init(const TString& codtab)
|
|
||||||
{ return init(cache().get("&CON", codtab)); }
|
|
||||||
|
|
||||||
bool TContratto::init(char tipocf, long codcf, const TString& codcont)
|
|
||||||
{
|
|
||||||
if (tipocf >= 'C' && codcf > 0 && codcont.full())
|
|
||||||
{
|
|
||||||
TString80 key; key.format("%c%6ld%s", tipocf, codcf, (const char*)codcont);
|
|
||||||
return init(key);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
_rec.zero();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TContratto::init(const TRectype& rec)
|
|
||||||
{
|
|
||||||
switch (rec.num())
|
|
||||||
{
|
|
||||||
case LF_TABMOD:
|
|
||||||
_rec = rec;
|
|
||||||
if (!_rec.empty())
|
|
||||||
{
|
|
||||||
int primo_anno = _rec.get_int("I0");
|
|
||||||
if (primo_anno < 2010)
|
|
||||||
{
|
|
||||||
const TDate inizio = _rec.get("D0");
|
|
||||||
primo_anno = inizio.year();
|
|
||||||
if (primo_anno < 2010)
|
|
||||||
primo_anno = 2010;
|
|
||||||
_rec.put("I0", primo_anno);
|
|
||||||
}
|
|
||||||
|
|
||||||
real importo = _rec.get("R0");
|
|
||||||
if (importo <= ZERO)
|
|
||||||
{
|
|
||||||
importo = importo_limite(primo_anno);
|
|
||||||
_rec.put("R0", importo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case LF_ALLEG:
|
|
||||||
{
|
|
||||||
const char tipocf = rec.get_char(ALL_TIPOCF);
|
|
||||||
const long codcf = rec.get_long(ALL_CODCF);
|
|
||||||
const TString& contr = rec.get(ALL_CONTRATTO);
|
|
||||||
init(tipocf, codcf, contr);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case LF_MOV:
|
|
||||||
{
|
|
||||||
const char tipocf = rec.get_char(MOV_TIPO);
|
|
||||||
const long codcf = rec.get_long(MOV_CODCF);
|
|
||||||
const TString& contr = rec.get(MOV_CONTRATTO);
|
|
||||||
init(tipocf, codcf, contr);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
CHECKD(false, "Record non valido per contratto FE", rec.num());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TDati_rilevanti_array
|
// TDati_rilevanti_array
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -360,7 +131,7 @@ TExclusion_mode TDati_rilevanti_array::add(const TRectype& alleg, bool send_all,
|
|||||||
if (a.codice_fiscale().blank() && a.partita_IVA().blank() && a.italiano())
|
if (a.codice_fiscale().blank() && a.partita_IVA().blank() && a.italiano())
|
||||||
return segnala_riga(alleg, em_no_allegato, log);
|
return segnala_riga(alleg, em_no_allegato, log);
|
||||||
|
|
||||||
if (is_nota_variazione(alleg))
|
if (fe_is_nota_variazione(alleg))
|
||||||
{
|
{
|
||||||
const TString8 numrett = alleg.get(ALL_NUMRETT);
|
const TString8 numrett = alleg.get(ALL_NUMRETT);
|
||||||
// Ignora le note di variazione non collegate e di importo non rilevante
|
// Ignora le note di variazione non collegate e di importo non rilevante
|
||||||
@ -368,7 +139,7 @@ TExclusion_mode TDati_rilevanti_array::add(const TRectype& alleg, bool send_all,
|
|||||||
{
|
{
|
||||||
const int anno = alleg.get_int(ALL_ANNO);
|
const int anno = alleg.get_int(ALL_ANNO);
|
||||||
const real importo = abs(alleg.get_real(ALL_IMPORTO));
|
const real importo = abs(alleg.get_real(ALL_IMPORTO));
|
||||||
if (importo < importo_limite(anno))
|
if (importo < fe_importo_limite(anno))
|
||||||
ignora = segnala_riga(alleg, em_importo_limite, log);
|
ignora = segnala_riga(alleg, em_importo_limite, log);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -387,13 +158,13 @@ TExclusion_mode TDati_rilevanti_array::add(const TRectype& alleg, bool send_all,
|
|||||||
if (ignora <= em_importo_limite)
|
if (ignora <= em_importo_limite)
|
||||||
{
|
{
|
||||||
const int anno = alleg.get_int(ALL_ANNO);
|
const int anno = alleg.get_int(ALL_ANNO);
|
||||||
TExclusion_mode new_mode = (alleg.get_real(ALL_IMPORTO) < importo_limite(anno)) ? em_importo_limite : em_incluso;
|
TExclusion_mode new_mode = (alleg.get_real(ALL_IMPORTO) < fe_importo_limite(anno)) ? em_importo_limite : em_incluso;
|
||||||
if (new_mode == em_importo_limite && contratto.full())
|
if (new_mode == em_importo_limite && contratto.full())
|
||||||
{
|
{
|
||||||
const TContratto c(alleg);
|
const TContratto c(alleg);
|
||||||
real imp, iva;
|
real imp, iva;
|
||||||
if (c.totale_annuale(anno, imp, iva))
|
if (c.totale_annuale(anno, imp, iva))
|
||||||
new_mode = (imp < importo_limite(anno)) ? em_importo_limite : em_incluso;
|
new_mode = (imp < fe_importo_limite(anno)) ? em_importo_limite : em_incluso;
|
||||||
}
|
}
|
||||||
if (ignora != new_mode)
|
if (ignora != new_mode)
|
||||||
{
|
{
|
||||||
@ -704,7 +475,7 @@ TExclusion_mode TDati_rilevanti_msk::elabora_movimento(const TRectype& mov, TBas
|
|||||||
if (modpag == 1 && _why == em_incluso)
|
if (modpag == 1 && _why == em_incluso)
|
||||||
{
|
{
|
||||||
// Considera solo registrazioni con importo rilevante
|
// Considera solo registrazioni con importo rilevante
|
||||||
if (abs(tot_imponibile) < importo_limite(anno))
|
if (abs(tot_imponibile) < fe_importo_limite(anno))
|
||||||
_why = em_importo_limite; // Non segnalare migliaia di movimenti inutilmente
|
_why = em_importo_limite; // Non segnalare migliaia di movimenti inutilmente
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -755,7 +526,7 @@ bool TDati_rilevanti_msk::controlla_mov(TRectype& mrec) const
|
|||||||
|
|
||||||
bool update = false;
|
bool update = false;
|
||||||
|
|
||||||
if (is_nota_variazione(mrec))
|
if (fe_is_nota_variazione(mrec))
|
||||||
{
|
{
|
||||||
TDate datarett = mrec.get(MOV_DATARETT);
|
TDate datarett = mrec.get(MOV_DATARETT);
|
||||||
TString8 numrett = mrec.get(MOV_NUMRETT);
|
TString8 numrett = mrec.get(MOV_NUMRETT);
|
||||||
@ -926,8 +697,8 @@ static int sort_alleg(const TSortable& s1, const TSortable& s2, void* jolly)
|
|||||||
|
|
||||||
if (cmp == 0 && c1.blank())
|
if (cmp == 0 && c1.blank())
|
||||||
{
|
{
|
||||||
const int n1 = is_nota_variazione(a1);
|
const int n1 = fe_is_nota_variazione(a1);
|
||||||
const int n2 = is_nota_variazione(a2);
|
const int n2 = fe_is_nota_variazione(a2);
|
||||||
cmp = n1 - n2;
|
cmp = n1 - n2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -989,7 +760,7 @@ TRecnotype TDati_rilevanti_msk::genera_alleg()
|
|||||||
}
|
}
|
||||||
|
|
||||||
controlla_mov(mov_rec);
|
controlla_mov(mov_rec);
|
||||||
if (is_nota_variazione(mov_rec))
|
if (fe_is_nota_variazione(mov_rec))
|
||||||
{
|
{
|
||||||
const TDate datarett = mov_rec.get(MOV_DATARETT);
|
const TDate datarett = mov_rec.get(MOV_DATARETT);
|
||||||
if (!datarett.ok() || datarett.year() == anno)
|
if (!datarett.ok() || datarett.year() == anno)
|
||||||
@ -1034,7 +805,7 @@ void TDati_rilevanti_msk::collega_variazioni() const
|
|||||||
importo += rel.curr(-220).get_real(ALL_IMPORTO);
|
importo += rel.curr(-220).get_real(ALL_IMPORTO);
|
||||||
|
|
||||||
const TExclusion_mode old_mode = TExclusion_mode(fatture.get(ALL_IGNORA).as_int());
|
const TExclusion_mode old_mode = TExclusion_mode(fatture.get(ALL_IGNORA).as_int());
|
||||||
const TExclusion_mode new_mode = importo < importo_limite(anno) ? em_importo_limite : em_incluso;
|
const TExclusion_mode new_mode = importo < fe_importo_limite(anno) ? em_importo_limite : em_incluso;
|
||||||
if (old_mode != new_mode)
|
if (old_mode != new_mode)
|
||||||
{
|
{
|
||||||
TLocalisamfile& f = fatture.cursor()->file();
|
TLocalisamfile& f = fatture.cursor()->file();
|
||||||
@ -1198,7 +969,7 @@ bool TDati_rilevanti_msk::send_fatt(const TRectype& alleg, TDati_rilevanti_set&
|
|||||||
bool TDati_rilevanti_msk::send_rec(const TRectype& alleg, TDati_rilevanti_set& operaz)
|
bool TDati_rilevanti_msk::send_rec(const TRectype& alleg, TDati_rilevanti_set& operaz)
|
||||||
{
|
{
|
||||||
bool done = false;
|
bool done = false;
|
||||||
if (is_nota_variazione(alleg))
|
if (fe_is_nota_variazione(alleg))
|
||||||
done = send_nota_variazione(alleg, operaz);
|
done = send_nota_variazione(alleg, operaz);
|
||||||
else
|
else
|
||||||
done = send_fatt(alleg, operaz);
|
done = send_fatt(alleg, operaz);
|
||||||
@ -1290,7 +1061,7 @@ bool TDati_rilevanti_msk::send_alleg()
|
|||||||
last_clifo = clifo;
|
last_clifo = clifo;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_nota_variazione(rec))
|
if (fe_is_nota_variazione(rec))
|
||||||
note.add(rec);
|
note.add(rec);
|
||||||
else
|
else
|
||||||
fatt.add(rec);
|
fatt.add(rec);
|
||||||
|
240
fe/fe0400.cpp
Normal file
240
fe/fe0400.cpp
Normal file
@ -0,0 +1,240 @@
|
|||||||
|
#include <applicat.h>
|
||||||
|
#include <automask.h>
|
||||||
|
#include <recarray.h>
|
||||||
|
#include <recset.h>
|
||||||
|
#include <relation.h>
|
||||||
|
#include <progind.h>
|
||||||
|
#include <reputils.h>
|
||||||
|
|
||||||
|
#include "felib.h"
|
||||||
|
#include "../cg/cg2103.h"
|
||||||
|
|
||||||
|
#include <alleg.h>
|
||||||
|
#include <causali.h>
|
||||||
|
#include <doc.h>
|
||||||
|
#include <mov.h>
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TTest_spesometro_msk
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TTest_spesometro_msk : public TAutomask
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
void log_msg(const TRectype& mov, const char* msg, TLog_report& log) const;
|
||||||
|
bool update_file(TLocalisamfile& f, const char* msg, TLog_report& log) const;
|
||||||
|
bool is_nota_variazione(const TRectype& mov) const;
|
||||||
|
bool elabora(int num, TLog_report& log);
|
||||||
|
|
||||||
|
bool _definitiva;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||||
|
|
||||||
|
public:
|
||||||
|
TTest_spesometro_msk() : TAutomask("fe0400a") {}
|
||||||
|
};
|
||||||
|
|
||||||
|
void TTest_spesometro_msk::log_msg(const TRectype& mov, const char* msg, TLog_report& log) const
|
||||||
|
{
|
||||||
|
TString str;
|
||||||
|
switch (mov.num())
|
||||||
|
{
|
||||||
|
case LF_ALLEG: str << "Riga " << mov.get(ALL_PROGR); break;
|
||||||
|
case LF_MOV : str << "Movimento " << mov.get(MOV_NUMREG); break;
|
||||||
|
case LF_DOC : str << "Documento " << mov.get(DOC_CODNUM) << ' ' << mov.get(DOC_ANNO) << '/' << mov.get(DOC_NDOC); break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
if (str.full())
|
||||||
|
{
|
||||||
|
str << ": " << msg;
|
||||||
|
log.log(1, str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TTest_spesometro_msk::update_file(TLocalisamfile& f, const char* msg, TLog_report& log) const
|
||||||
|
{
|
||||||
|
int err = NOERR;
|
||||||
|
log_msg(f.curr(), msg, log);
|
||||||
|
if (_definitiva)
|
||||||
|
{
|
||||||
|
err = f.rewrite();
|
||||||
|
if (err != NOERR)
|
||||||
|
{
|
||||||
|
TString msg;
|
||||||
|
msg << TR("Impossibile aggiornare il file ") << f.description() << TR(": errore ") << err;
|
||||||
|
log.log(2, msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return err == NOERR;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TTest_spesometro_msk::is_nota_variazione(const TRectype& mov) const
|
||||||
|
{
|
||||||
|
bool yes = false;
|
||||||
|
switch (mov.num())
|
||||||
|
{
|
||||||
|
case LF_MOV:
|
||||||
|
yes = mov.get_int(MOV_TIPOMOV) == 2; // Nota di credito/debito per saldaconto
|
||||||
|
break;
|
||||||
|
case LF_DOC:
|
||||||
|
{
|
||||||
|
const TString& tipodoc = mov.get(DOC_TIPODOC);
|
||||||
|
const TString& codcaus = cache().get("%TIP", tipodoc, "S6");
|
||||||
|
if (codcaus.full())
|
||||||
|
{
|
||||||
|
const TRectype& caus = cache().get(LF_CAUSALI, codcaus);
|
||||||
|
yes = caus.get_int(CAU_TIPOMOV) == 2; // Nota di credito/debito per saldaconto
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
yes = fe_is_nota_variazione(mov);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return yes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool TTest_spesometro_msk::elabora(int num, TLog_report& log)
|
||||||
|
{
|
||||||
|
const TString& anno = get(101);
|
||||||
|
|
||||||
|
TString str;
|
||||||
|
str << "USE " << num;
|
||||||
|
switch (num)
|
||||||
|
{
|
||||||
|
case LF_ALLEG:
|
||||||
|
str << "\nFROM ANNO=" << anno << "\nTO ANNO=" << anno;
|
||||||
|
break;
|
||||||
|
case LF_MOV:
|
||||||
|
str << "KEY 2\nFROM DATAREG=" << anno << "0101\nTO DATAREG=" << anno << "1231";
|
||||||
|
break;
|
||||||
|
case LF_DOC:
|
||||||
|
str << "\nFROM PROVV=D ANNO=" << anno << "\nTO PROVV=D ANNO=" << anno;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
TISAM_recordset recset(str);
|
||||||
|
TLocalisamfile& file = recset.cursor()->file();
|
||||||
|
TRectype& curr = file.curr();
|
||||||
|
|
||||||
|
_definitiva = get_bool(102);
|
||||||
|
|
||||||
|
if (_definitiva)
|
||||||
|
str = TR("Aggiornamento");
|
||||||
|
else
|
||||||
|
str = TR("Controllo");
|
||||||
|
|
||||||
|
str << ' ' << file.description();
|
||||||
|
str << TR(" Anno ") << anno;
|
||||||
|
|
||||||
|
log.log(0, "");
|
||||||
|
log.log(1, str);
|
||||||
|
log.log(0, "");
|
||||||
|
|
||||||
|
TProgind pi(recset.items(), str, true, true);
|
||||||
|
|
||||||
|
bool done = true;
|
||||||
|
for (bool ok = recset.move_first(); ok && done; ok = recset.move_next())
|
||||||
|
{
|
||||||
|
if (!pi.addstatus(1))
|
||||||
|
break;
|
||||||
|
const int tipopag = curr.get_int(MOV_MODPAG);
|
||||||
|
const TString& contratto = curr.get(MOV_CONTRATTO);
|
||||||
|
if (contratto.full())
|
||||||
|
{
|
||||||
|
if (is_nota_variazione(curr))
|
||||||
|
{
|
||||||
|
curr.put(MOV_MODPAG, 1);
|
||||||
|
curr.zero(MOV_CONTRATTO);
|
||||||
|
done = update_file(file, TR("Azzerato contratto su nota di variazione"), log);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const TContratto c(curr);
|
||||||
|
const int t = c.modalita_pagamento();
|
||||||
|
if (t != tipopag)
|
||||||
|
{
|
||||||
|
str.cut(0) << TR("Cambiata modalità di pagamento ") << tipopag << " -> " << t;
|
||||||
|
curr.put(MOV_MODPAG, t);
|
||||||
|
if (num == LF_MOV)
|
||||||
|
{
|
||||||
|
curr.zero(MOV_DATARETT);
|
||||||
|
curr.zero(MOV_NUMRETT);
|
||||||
|
}
|
||||||
|
done = update_file(file, str, log);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (tipopag > 1)
|
||||||
|
{
|
||||||
|
log_msg(curr, str, log);
|
||||||
|
curr.put(MOV_MODPAG, 1);
|
||||||
|
done = update_file(file, TR("Forzato pagamento non frazionato in assenza di contratto"), log);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return done;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool TTest_spesometro_msk::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||||
|
{
|
||||||
|
switch (o.dlg())
|
||||||
|
{
|
||||||
|
case DLG_OK:
|
||||||
|
case DLG_ELABORA:
|
||||||
|
if (e == fe_button)
|
||||||
|
{
|
||||||
|
TLog_report log;
|
||||||
|
for (int pos = id2pos(100+LF_ALLEG); pos >= 0 && pos < fields(); pos++)
|
||||||
|
{
|
||||||
|
const TMask_field& f = fld(pos);
|
||||||
|
if (!f.is_kind_of(CLASS_BOOLEAN_FIELD))
|
||||||
|
break;
|
||||||
|
if (f.get().full())
|
||||||
|
{
|
||||||
|
if (!elabora(f.dlg() - 100, log))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
log.preview();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TTest_spesometro_app
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TTest_spesometro_app : public TSkeleton_application
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void main_loop();
|
||||||
|
};
|
||||||
|
|
||||||
|
void TTest_spesometro_app::main_loop()
|
||||||
|
{
|
||||||
|
TTest_spesometro_msk msk;
|
||||||
|
msk.run();
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// main
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
int fe0400(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
TTest_spesometro_app app;
|
||||||
|
app.run(argc, argv, TR("Controllo file Spesometro"));
|
||||||
|
return 0;
|
||||||
|
}
|
45
fe/fe0400a.uml
Normal file
45
fe/fe0400a.uml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
PAGE "Controllo file spesometro" -1 -1 40 10
|
||||||
|
|
||||||
|
NUMBER 101 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 1 "Anno di riferimento "
|
||||||
|
FLAGS "A"
|
||||||
|
END
|
||||||
|
|
||||||
|
GROUPBOX DLG_NULL 37 5
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 2 "@bArchivi da controllare"
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN 122
|
||||||
|
BEGIN
|
||||||
|
PROMPT 3 3 "Dati spesometro"
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN 123
|
||||||
|
BEGIN
|
||||||
|
PROMPT 3 4 "Movimenti IVA"
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN 133
|
||||||
|
BEGIN
|
||||||
|
PROMPT 3 5 "Documenti vendite/acquisti"
|
||||||
|
END
|
||||||
|
|
||||||
|
RADIOBUTTON 102 1 37
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 7 "@bElaborazione"
|
||||||
|
ITEM " |Provvisoria"
|
||||||
|
ITEM "X|Definitiva"
|
||||||
|
FLAGS "Z"
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
TOOLBAR "topbar" 0 0 0 2
|
||||||
|
|
||||||
|
#include <elabar.h>
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
ENDMASK
|
244
fe/felib.cpp
244
fe/felib.cpp
@ -2,21 +2,88 @@
|
|||||||
#include <lffiles.h>
|
#include <lffiles.h>
|
||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
#include <recarray.h>
|
#include <recarray.h>
|
||||||
|
#include <relation.h>
|
||||||
#include <validate.h>
|
#include <validate.h>
|
||||||
|
|
||||||
#include "fe0100a.h"
|
#include "fe0100a.h"
|
||||||
#include "felib.h"
|
#include "felib.h"
|
||||||
|
|
||||||
|
#include "../cg/cg2103.h"
|
||||||
|
|
||||||
#include <alleg.h>
|
#include <alleg.h>
|
||||||
#include <anafis.h>
|
#include <anafis.h>
|
||||||
#include <anagr.h>
|
#include <anagr.h>
|
||||||
#include <clifo.h>
|
#include <clifo.h>
|
||||||
#include <comuni.h>
|
#include <comuni.h>
|
||||||
|
#include <doc.h>
|
||||||
#include <mov.h>
|
#include <mov.h>
|
||||||
#include <nditte.h>
|
#include <nditte.h>
|
||||||
#include <occas.h>
|
#include <occas.h>
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// Utility
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
real fe_importo_limite(int anno)
|
||||||
|
{ return anno > 2010 ? 3000.0 : 25000.0; }
|
||||||
|
|
||||||
|
bool fe_is_nota_variazione(const TRectype& mov)
|
||||||
|
{
|
||||||
|
const int logicnum = mov.num();
|
||||||
|
|
||||||
|
if (logicnum == LF_MOV)
|
||||||
|
{
|
||||||
|
const real totdoc = mov.get_real(MOV_TOTDOC);
|
||||||
|
if (totdoc < ZERO)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
const int tipomov = mov.get_int(MOV_TIPOMOV);
|
||||||
|
if (tipomov == 2) // Nota di credito/debito per saldaconto
|
||||||
|
return true;
|
||||||
|
|
||||||
|
const TString& tipodoc = mov.get(MOV_TIPODOC);
|
||||||
|
if (tipodoc == "NC" || tipodoc == "ND") // Nota di credito/debito senza saldaconto
|
||||||
|
return true;
|
||||||
|
} else
|
||||||
|
if (logicnum == LF_ALLEG)
|
||||||
|
{
|
||||||
|
const TString& numrett = mov.get(ALL_NUMRETT);
|
||||||
|
if (numrett.full())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
const real importo = mov.get_real(ALL_IMPORTO);
|
||||||
|
const real imposta = mov.get_real(ALL_IMPOSTA);
|
||||||
|
if (importo < ZERO || imposta < ZERO)
|
||||||
|
return true;
|
||||||
|
} else
|
||||||
|
if (logicnum == LF_DOC)
|
||||||
|
{
|
||||||
|
const TString& tipodoc = mov.get(DOC_TIPODOC);
|
||||||
|
const TRectype& td = cache().get("%TIP", tipodoc);
|
||||||
|
|
||||||
|
bool yes = td.get_bool("B7");
|
||||||
|
if (!yes)
|
||||||
|
{
|
||||||
|
const TString4 codcaus(td.get("S6"));
|
||||||
|
if (codcaus.full())
|
||||||
|
{
|
||||||
|
TCausale c(codcaus, mov.get_int(DOC_ANNO));
|
||||||
|
const char sez = c.sezione_clifo();
|
||||||
|
//controllo ulteriore sull'iva
|
||||||
|
TipoIVA tiva = c.reg().iva();
|
||||||
|
const char tcf = mov.get_char(DOC_TIPOCF);
|
||||||
|
if (tiva == nessuna_iva && tcf > ' ')
|
||||||
|
tiva = tcf == 'C' ? iva_vendite : iva_acquisti;
|
||||||
|
if (tiva != nessuna_iva)
|
||||||
|
yes = ((tiva == iva_vendite) ^ (sez == 'D'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return yes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TAnagrafica
|
// TAnagrafica
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -263,6 +330,181 @@ bool TAnagrafica::init(char tipocf, long codice, const TString& ocfpi)
|
|||||||
return done;
|
return done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TContratto
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
bool TContratto::importo_annuale(int anno, real& importo, real& imposta) const
|
||||||
|
{
|
||||||
|
if (_rec.empty() || anno < 2010)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Determina l'indice i [0..3] degli importi del contratto per l'anno richiesto
|
||||||
|
char fld[] = "I3";
|
||||||
|
int i = 3;
|
||||||
|
for (i = 3; i > 0; i--)
|
||||||
|
{
|
||||||
|
fld[1] = '0'+i;
|
||||||
|
const int y = _rec.get_int(fld);
|
||||||
|
if (y > 0 && y <= anno)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Determina il nome del campo importo corrispondente all'indice i: 0 -> R0; 1 -> R2; 2 -> R4; 3 -> R6
|
||||||
|
fld[0] = 'R';
|
||||||
|
fld[1] = '0'+(i*2);
|
||||||
|
importo = _rec.get_real(fld);
|
||||||
|
|
||||||
|
fld[1]++; // Il campo imposta è sempre quello successivo a quello dell'importo
|
||||||
|
imposta = _rec.get_real(fld);
|
||||||
|
|
||||||
|
return importo > ZERO;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TContratto::importo_figli(int anno, real& importo, real& imposta) const
|
||||||
|
{
|
||||||
|
const TString& codtab = _rec.get("CODTAB");
|
||||||
|
const TString& prefix = codtab.left(7);
|
||||||
|
const TString& suffix = codtab.mid(7);
|
||||||
|
|
||||||
|
TString query;
|
||||||
|
query << "USE &CON SELECT S1=\"" << suffix << '\"'
|
||||||
|
<< "\nFROM CODTAB=\"" << prefix << '\"'
|
||||||
|
<< "\nTO CODTAB=\"" << prefix << '\"';
|
||||||
|
|
||||||
|
TISAM_recordset recset(query);
|
||||||
|
|
||||||
|
importo = imposta = ZERO;
|
||||||
|
for (bool ok = recset.move_first(); ok; ok = recset.move_next())
|
||||||
|
{
|
||||||
|
const TContratto child(recset.cursor()->curr());
|
||||||
|
real imp, iva; child.importo_figli(anno, imp, iva);
|
||||||
|
importo += imp;
|
||||||
|
imposta += iva;
|
||||||
|
}
|
||||||
|
if (importo <= ZERO)
|
||||||
|
importo_annuale(anno, importo, imposta);
|
||||||
|
|
||||||
|
return !importo.is_zero();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TContratto::totale_annuale(int anno, real& importo, real& imposta) const
|
||||||
|
{
|
||||||
|
importo = imposta = ZERO;
|
||||||
|
if (!_rec.empty() && anno >= 2010)
|
||||||
|
{
|
||||||
|
const TString& padre = _rec.get("S1");
|
||||||
|
if (padre.full())
|
||||||
|
{
|
||||||
|
const TString& codtab = _rec.get("CODTAB");
|
||||||
|
const TContratto master(codtab[0], atol(codtab.mid(1,6)), padre);
|
||||||
|
master.totale_annuale(anno, importo, imposta);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
importo_figli(anno, importo, imposta);
|
||||||
|
}
|
||||||
|
return importo > ZERO;
|
||||||
|
}
|
||||||
|
|
||||||
|
int TContratto::modalita_pagamento() const
|
||||||
|
{
|
||||||
|
int modpag = _rec.get_int("S6");
|
||||||
|
if (modpag != 2 && modpag != 3)
|
||||||
|
modpag = 2;
|
||||||
|
return modpag;
|
||||||
|
}
|
||||||
|
|
||||||
|
const TString& TContratto::codice_base() const
|
||||||
|
{
|
||||||
|
TString80 c = codice(), p = codice_padre();
|
||||||
|
if (p.full())
|
||||||
|
{
|
||||||
|
TAssoc_array antiloop;
|
||||||
|
antiloop.add(c);
|
||||||
|
while (p.full() && !antiloop.is_key(p)) // Verifico loop assurdo
|
||||||
|
{
|
||||||
|
c = p;
|
||||||
|
antiloop.add(c);
|
||||||
|
TString80 key = chiave().left(7);
|
||||||
|
key << p;
|
||||||
|
p = cache().get("&CON", key, "S1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return get_tmp_string() = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TContratto::init(const TString& codtab)
|
||||||
|
{ return init(cache().get("&CON", codtab)); }
|
||||||
|
|
||||||
|
bool TContratto::init(char tipocf, long codcf, const TString& codcont)
|
||||||
|
{
|
||||||
|
if (tipocf >= 'C' && codcf > 0 && codcont.full())
|
||||||
|
{
|
||||||
|
TString80 key; key.format("%c%6ld%s", tipocf, codcf, (const char*)codcont);
|
||||||
|
return init(key);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
_rec.zero();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TContratto::init(const TRectype& rec)
|
||||||
|
{
|
||||||
|
switch (rec.num())
|
||||||
|
{
|
||||||
|
case LF_TABMOD:
|
||||||
|
_rec = rec;
|
||||||
|
if (!_rec.empty())
|
||||||
|
{
|
||||||
|
int primo_anno = _rec.get_int("I0");
|
||||||
|
if (primo_anno < 2010)
|
||||||
|
{
|
||||||
|
const TDate inizio = _rec.get("D0");
|
||||||
|
primo_anno = inizio.year();
|
||||||
|
if (primo_anno < 2010)
|
||||||
|
primo_anno = 2010;
|
||||||
|
_rec.put("I0", primo_anno);
|
||||||
|
}
|
||||||
|
|
||||||
|
real importo = _rec.get("R0");
|
||||||
|
if (importo <= ZERO)
|
||||||
|
{
|
||||||
|
importo = fe_importo_limite(primo_anno);
|
||||||
|
_rec.put("R0", importo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case LF_ALLEG:
|
||||||
|
{
|
||||||
|
const char tipocf = rec.get_char(ALL_TIPOCF);
|
||||||
|
const long codcf = rec.get_long(ALL_CODCF);
|
||||||
|
const TString& contr = rec.get(ALL_CONTRATTO);
|
||||||
|
init(tipocf, codcf, contr);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case LF_MOV:
|
||||||
|
{
|
||||||
|
const char tipocf = rec.get_char(MOV_TIPO);
|
||||||
|
const long codcf = rec.get_long(MOV_CODCF);
|
||||||
|
const TString& contr = rec.get(MOV_CONTRATTO);
|
||||||
|
init(tipocf, codcf, contr);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case LF_DOC:
|
||||||
|
{
|
||||||
|
const char tipocf = rec.get_char(DOC_TIPOCF);
|
||||||
|
const long codcf = rec.get_long(DOC_CODCF);
|
||||||
|
const TString& contr = rec.get(DOC_CONTRATTO);
|
||||||
|
init(tipocf, codcf, contr);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
CHECKD(false, "Record non valido per contratto FE", rec.num());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return ok();
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TDati_rilevanti_trc
|
// TDati_rilevanti_trc
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -981,5 +1223,3 @@ TDati_rilevanti_rep::TDati_rilevanti_rep(const TFilename& file)
|
|||||||
|
|
||||||
set_recordset(set);
|
set_recordset(set);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
34
fe/felib.h
34
fe/felib.h
@ -68,6 +68,36 @@ public:
|
|||||||
TAnagrafica(const TRectype& rec) { init(rec); }
|
TAnagrafica(const TRectype& rec) { init(rec); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TContratto
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TContratto : public TObject
|
||||||
|
{
|
||||||
|
TRectype _rec;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool importo_annuale(int anno, real& importo, real& imposta) const;
|
||||||
|
bool importo_figli(int anno, real& importo, real& imposta) const;
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual bool ok() const { return !_rec.empty(); }
|
||||||
|
const TString& chiave() const { return _rec.get("CODTAB"); }
|
||||||
|
const TString& codice() const { return chiave().mid(7); }
|
||||||
|
const TString& codice_padre() const { return _rec.get("S1"); }
|
||||||
|
const TString& codice_base() const;
|
||||||
|
bool totale_annuale(int anno, real& importo, real& imposta) const;
|
||||||
|
int modalita_pagamento() const;
|
||||||
|
|
||||||
|
bool init(const TString& codtab);
|
||||||
|
bool init(char tipocf, long codcf, const TString& codcont);
|
||||||
|
bool init(const TRectype& rec);
|
||||||
|
|
||||||
|
TContratto() : _rec(LF_TABMOD) {}
|
||||||
|
TContratto(char tipocf, long codcf, const char* codcont) : _rec(LF_TABMOD) { init(tipocf, codcf, codcont); }
|
||||||
|
TContratto(const TRectype& rec) : _rec(LF_TABMOD) { init(rec); }
|
||||||
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TDati_rilevanti_set
|
// TDati_rilevanti_set
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -134,6 +164,8 @@ public:
|
|||||||
TDati_rilevanti_rep(const TFilename& file);
|
TDati_rilevanti_rep(const TFilename& file);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Utility
|
||||||
|
real fe_importo_limite(int anno);
|
||||||
|
bool fe_is_nota_variazione(const TRectype& rec);
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
x
Reference in New Issue
Block a user