Files correlati : Ricompilazione Demo : [ ] Commento :contabilizzazione cespiti : aggiunta la parte su movimenti di vendita ed eliminazioni git-svn-id: svn://10.65.10.50/trunk@15983 c028cbd2-c16b-5b4b-a496-9718f37d4682
112 lines
4.0 KiB
C++
Executable File
112 lines
4.0 KiB
C++
Executable File
#ifndef __CE2101_H
|
|
#define __CE2101_H
|
|
|
|
#ifndef __RELATION_H
|
|
#include <relation.h>
|
|
#endif
|
|
|
|
enum TTipo_cespite { tc_materiale, tc_immateriale, tc_pluriennale };
|
|
enum TTipoFabbricato { tf_nessuno, tf_industriale, tf_altro };
|
|
enum TTipoVeicolo { tv_nessuno, tv_automobile, tv_motociclo, tv_ciclomotore, tv_altro };
|
|
|
|
class TCespite : public TRectype
|
|
{
|
|
int _tipo_sit;
|
|
TRectype _salini, _salpro;
|
|
TRectype _ammini, _ammpro;
|
|
|
|
//parametri per il calcolo in memoria utilizzato per proiezioni contabili
|
|
bool _in_memory;
|
|
TArray _movce, _movam, _ammmv;
|
|
real _fraction;
|
|
|
|
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) const;
|
|
void read_amm(int esercizio);
|
|
void save_amm() const;
|
|
|
|
void set_msg05(const char* msg);
|
|
|
|
bool valido();
|
|
real get_limit() const;
|
|
void prepara_saldi(bool is_valid);
|
|
|
|
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, const real& num, const real& den, int mode);
|
|
void rip_elem(TRelation& rel, int mode);
|
|
void rip_costo(TRelation& rel, int mode);
|
|
int test_rip(TRelation& rel);
|
|
|
|
const TString& ammini_get(const char* pstar) const;
|
|
bool ammini_get_bool(const char* pstar) const;
|
|
real ammini_get_real(const char* pstar) const;
|
|
void ammpro_put_perc(const char* pfield, const real& p);
|
|
|
|
void calc_perc(TRelation& rel, const TRectype& tmv, const TRectype& tmvam);
|
|
void calc_anni(TRectype& ammmv, const TRectype& tmv, const TRectype& tmvam);
|
|
void amm_mov_ven(TRelation& rel, const TRectype& tmv, const TRectype& tmvam);
|
|
real mov_r90_escl_ven(const TRectype& tmv);
|
|
real mov_r91_escl_ven(const TRectype& tmv);
|
|
real mov_val_ven(const TRectype& tmv);
|
|
void cal_valenza(const TRectype& tmv, const TRectype& tmvam, TRectype& ammmv);
|
|
void elabora_mov_neg(TRelation& rel, TRectype& tmv, TRectype& tmvam);
|
|
|
|
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,
|
|
const real& quotamm, bool mov_vend, const TDate& dtmov);
|
|
void agg_quota(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 decr_field(TRectype& dst, const char* fdst, const TRectype& src, const char* fsrc, char segno) const;
|
|
|
|
void applica_rettifiche(TRectype& tmv, TRectype& tmvam);
|
|
void aggiorna_salpro(const TRectype& tmv, const TRectype& tmvam, char segno);
|
|
void scansione_movimenti(const TDate& data_limite, bool is_valid);
|
|
void calc_amm_residui(bool is_valid);
|
|
void agg_spe_man(bool is_valid);
|
|
real percentuale_deducibilita() const;
|
|
bool controllo_fringe_benefit();
|
|
|
|
public:
|
|
bool calc_amm(int tipo_sit, const TDate& data_limite,
|
|
bool calc_spe_man = false, bool in_memory = false);
|
|
|
|
const TRectype& categoria() const;
|
|
TTipo_cespite tipo() const;
|
|
TTipoFabbricato fabbricato() const;
|
|
|
|
TTipoVeicolo veicolo() const;
|
|
bool auto_o_moto() const;
|
|
|
|
const TRectype& sal_ini() const { return _salini; }
|
|
const TRectype& sal_pro() const { return _salpro; }
|
|
const TRectype& amm_ini() const { return _ammini; }
|
|
const TRectype& amm_pro() const { return _ammpro; }
|
|
real val_amm() const;
|
|
real res_amm() const;
|
|
|
|
//metodi per collegamento contabilita'
|
|
const TArray& movce() const { return _movce; }
|
|
const TArray& ammmv() const { return _ammmv; }
|
|
const TArray& movam() const { return _movam; }
|
|
|
|
int read(const char* id);
|
|
void load_saldi(const int tiposit, const int esercizio);
|
|
TCespite();
|
|
TCespite(const char* id);
|
|
TCespite(const TRectype& rec);
|
|
virtual ~TCespite() { }
|
|
};
|
|
|
|
#endif
|