2006-12-13 16:22:33 +00:00
|
|
|
#ifndef __CG2107_H__
|
|
|
|
#define __CG2107_H__
|
|
|
|
|
|
|
|
#ifndef __AUTOMASK_H
|
|
|
|
#include <automask.h>
|
|
|
|
#endif
|
|
|
|
|
2011-10-25 15:52:53 +00:00
|
|
|
#ifndef __CSSALDA3_H
|
|
|
|
#include "../cg/cgsalda3.h"
|
2008-02-05 12:33:52 +00:00
|
|
|
#endif
|
|
|
|
|
2008-02-05 10:55:05 +00:00
|
|
|
|
2006-12-13 16:22:33 +00:00
|
|
|
class TEasySolder_mask : public TAutomask
|
|
|
|
{
|
|
|
|
TBill _conto; // Conto fisso del cliente/fornitore
|
2011-10-25 15:52:53 +00:00
|
|
|
int _anno; // Anno della partita corrente
|
|
|
|
TString8 _numpart; // Numero partita corrente
|
2006-12-13 16:22:33 +00:00
|
|
|
long _numreg; // Numero movimento contabile
|
|
|
|
int _numrig; // Riga contabile corrente (prima = 1!)
|
2011-10-25 15:52:53 +00:00
|
|
|
tipo_movimento _tipomov; // Tipo movimento specificato sulla causale
|
2006-12-13 16:22:33 +00:00
|
|
|
bool _changed;
|
2011-10-25 15:52:53 +00:00
|
|
|
TSolder_tree* _tree;
|
|
|
|
|
|
|
|
real _tot_val, _tot_eur, _res_val, _res_eur;
|
2006-12-13 16:22:33 +00:00
|
|
|
|
|
|
|
protected:
|
2011-10-25 15:52:53 +00:00
|
|
|
virtual long handler(WINDOW w, EVENT* e);
|
2006-12-13 16:22:33 +00:00
|
|
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
|
|
|
void set_imp(short id, const TImporto& imp);
|
|
|
|
|
2011-10-25 15:52:53 +00:00
|
|
|
void fill_sheet();
|
|
|
|
void save_sheet();
|
|
|
|
|
|
|
|
char calcola_sezione() const;
|
|
|
|
void calcola_residuo();
|
|
|
|
void aggiorna_residuo();
|
|
|
|
bool in_valuta() const;
|
|
|
|
|
|
|
|
real val2eur(const real& val) const;
|
|
|
|
real eur2val(const real& val) const;
|
|
|
|
TImporto eur2val(const TImporto& imp) const;
|
|
|
|
|
2006-12-13 16:22:33 +00:00
|
|
|
public:
|
|
|
|
bool changed() const { return _changed; }
|
|
|
|
void init(const TBill& conto, long numreg, int numrig);
|
|
|
|
TEasySolder_mask(const TBill& conto, long numreg, int numrig);
|
|
|
|
virtual ~TEasySolder_mask();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|