campo-sirio/cg/cg2105.h
guy 565cb6c0a7 Patch level : 10.0
Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
Aggiunto file per nuovo saldaconto


git-svn-id: svn://10.65.10.50/branches/R_10_00@22585 c028cbd2-c16b-5b4b-a496-9718f37d4682
2012-02-23 17:05:10 +00:00

113 lines
2.9 KiB
C++
Executable File

#ifndef __CG2105_H__
#define __CG2105_H__
#ifndef __CGSALDAC_H__
#include "../cg/cgsaldac.h"
#endif
#ifndef __CGPAGAME_H__
#include "../cg/cgpagame.h"
#endif
#ifndef __AUTOMASK_H__
#include <automask.h>
#endif
class TNew_mask : public TAutomask
{
bool _allow_fatt;
protected:
virtual bool on_field_event(TOperable_field& f, TField_event e, long jolly);
public:
void init(char tipocf, bool fatt, bool edit);
TNew_mask(char tipocf, bool fatt, bool edit);
};
class TGame_mask;
class TPay_mask : public TMask
{
TDate _datadoc, _datarat;
real _da_pagare, _pagabile;
#ifndef __EXTRA__
const TGame_mask* _parent;
#endif
tipo_movimento _tipomov;
bool _assigned;
bool _can_solder;
bool _swap_ritsoc;
protected:
static bool importo_handler(TMask_field& f, KEY k);
static bool importolire_handler(TMask_field& f, KEY k);
static bool saldo_handler(TMask_field& f, KEY k);
static bool datapag_handler(TMask_field& f, KEY k);
static bool conto_handler(TMask_field& f, KEY k);
static bool descr_handler(TMask_field& f, KEY k);
void gioca_cambi(int force = 0x0);
#ifdef __EXTRA__
static bool datareg_handler(TMask_field& f, KEY k);
static bool datadoc_handler(TMask_field& f, KEY k);
static bool numdoc_handler(TMask_field& f, KEY k);
static bool sezione_handler(TMask_field& f, KEY k);
#endif
public:
void set_pag(const TRectype& oldpag, const TRiga_scadenze& scad, const TImporto& importo);
void get_pag(TRectype& oldpag, TRectype& somma) const;
bool assigned() const { return _assigned; }
bool unassigned() const { return !_assigned; }
tipo_movimento tipo() const { return _tipomov; }
void attiva_valuta(bool on);
void init(const TGame_mask* parent, int mode);
TPay_mask(const TGame_mask* parent, int mode);
virtual ~TPay_mask();
};
class TFattura_mask : public TMask
{
TRiga_partite& _fattura;
TPagamento* _pag;
TString_array _pag_rows;
protected:
static bool clifo_handler(TMask_field& f, KEY key);
static bool datadoc_handler(TMask_field& f, KEY key);
static bool codpag_handler(TMask_field& f, KEY key);
static bool nrate_handler(TMask_field& f, KEY key);
static bool recalc_handler(TMask_field& f, KEY key);
static bool codcab_handler(TMask_field& f, KEY key);
static bool pag_notify(TSheet_field& ps, int r, KEY k);
static bool pag_handler(TMask_field& f, KEY key);
static bool reset_handler(TMask_field& f, KEY key);
static bool tipopag_handler(TMask_field& f, KEY key);
TPagamento& pagamento() const { return *_pag; }
TPagamento& set_pagamento(const char* cod, const char* dat);
TSheet_field& pag_sheet() const;
void pag2sheet();
bool read_scadenze();
public:
void set_totale_pagamento(bool update);
void set_scadenze();
void write_scadenze() const;
real totale_rate(bool val) const;
TFattura_mask(TRiga_partite& fattura);
virtual ~TFattura_mask();
};
#endif