2001-04-30 14:22:43 +00:00
|
|
|
#ifndef __CE2101_H
|
|
|
|
#define __CE2101_H
|
|
|
|
|
|
|
|
#ifndef __RELATION_H
|
|
|
|
#include <relation.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
enum TTipo_cespite { tc_materiale, tc_immateriale, tc_pluriennale };
|
|
|
|
|
|
|
|
class TCespite : public TRectype
|
|
|
|
{
|
|
|
|
TRectype _salini, _salpro;
|
|
|
|
TRectype _ammini, _ammpro;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
real un_milione() const;
|
|
|
|
|
|
|
|
void fill_sal_key(TRectype& ammce, int esercizio, int tpsal) const;
|
|
|
|
void read_sal(int esercizio);
|
|
|
|
void save_sal() const;
|
|
|
|
|
|
|
|
void fill_amm_key(TRectype& ammce, int esercizio, int tpsal, int tpamm) const;
|
|
|
|
void read_amm(int esercizio, int tipo);
|
|
|
|
void save_amm() const;
|
|
|
|
|
|
|
|
void set_msg05(const char* msg);
|
|
|
|
|
|
|
|
bool valido(int tipo_sit);
|
|
|
|
real get_limit() const;
|
|
|
|
void prepara_saldi(int tipo_sit, bool is_valid);
|
|
|
|
|
|
|
|
real val_amm(int tiposit) const;
|
|
|
|
real res_amm(int tiposit) const;
|
|
|
|
real mov_val_amm(const TRectype& tmv) const;
|
|
|
|
real mov_res_amm(const TRectype& tmv, const TRectype& tmvam) const;
|
|
|
|
real calcola_spese_manutenzione(const real& valamm);
|
|
|
|
|
|
|
|
void rip_jolly(TRelation& rel, TRectype& tmv, TRectype& tmvam, const real& num, const real& den);
|
|
|
|
void rip_elem(TRelation& rel, TRectype& tmv, TRectype& tmvam);
|
|
|
|
void rip_costo(TRelation& rel, TRectype& tmv, TRectype& tmvam);
|
|
|
|
|
|
|
|
void calc_perc(TRelation& rel, const TRectype& tmv, const TRectype& tmvam, int tipo_sit);
|
|
|
|
void calc_anni(TRectype& ammmv, const TRectype& tmv, const TRectype& tmvam);
|
|
|
|
void amm_mov_ven(TRelation& rel, const TRectype& tmv, const TRectype& tmvam, int tipo_sit);
|
|
|
|
void elabora_mov_neg(TRelation& rel, TRectype& tmv, TRectype& tmvam, int tipo_sit, bool is_valid);
|
|
|
|
real calc_quota(const real& valamm, const real& perric, const real& residuo,
|
|
|
|
real& pereff, TRelation* mov = NULL);
|
|
|
|
real calc_quote_perse(const real& valamm, const real& peric, const real& residuo,
|
2001-06-25 10:41:20 +00:00
|
|
|
const real& quotamm, bool mov_vend, const TDate& dtmov);
|
2001-04-30 14:22:43 +00:00
|
|
|
void agg_quota(int tipo_sit, const real& valamm, TRectype& rec, const char* field, bool calcq);
|
|
|
|
|
|
|
|
void incr_field(TRectype& dst, const char* fdst, const TRectype& src, const char* fsrc, char segno) const;
|
|
|
|
void applica_rettifiche(TRectype& tmv, TRectype& tmvam, int tipo_sit);
|
|
|
|
void aggiorna_salpro(const TRectype& tmv, const TRectype& tmvam, char segno);
|
|
|
|
void scansione_movimenti(int tipo_sit, const TDate& data_limite, bool is_valid);
|
|
|
|
void calc_amm_residui(int tipo_sit, bool is_valid);
|
|
|
|
void agg_spe_man(int tipo_sit, bool is_valid);
|
|
|
|
|
|
|
|
public:
|
|
|
|
bool calc_amm(int tipo_sit, bool calc_spe_man, const TDate& data_limite);
|
2001-06-25 10:41:20 +00:00
|
|
|
|
|
|
|
const TRectype& categoria() const;
|
|
|
|
TTipo_cespite tipo() const;
|
2001-07-24 13:28:55 +00:00
|
|
|
const TRectype& sal_pro() const { return _salpro; }
|
|
|
|
const TRectype& amm_pro() const { return _ammpro; }
|
2001-04-30 14:22:43 +00:00
|
|
|
|
|
|
|
int read(const char* id);
|
|
|
|
TCespite();
|
|
|
|
TCespite(const char* id);
|
|
|
|
TCespite(const TRectype& rec);
|
|
|
|
virtual ~TCespite() { }
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|