Files correlati : Ricompilazione Demo : [ ] Commento : Aggiunto recordset per gestire "trasparentemente" i piani dei conti contabile o analitico. Potenziato calcolo saldi per gestire anche i livelli intermedi dei conti e soprattutto gestire la riclassificazione dei conti analitici tramite la tabella panapdc Potenziato il generatore di movimenti casuale per gestire anche il piano dei conti contabile nonche' la generazione automatica della tabela panapdc. git-svn-id: svn://10.65.10.50/trunk@13265 c028cbd2-c16b-5b4b-a496-9718f37d4682
121 lines
3.3 KiB
C++
Executable File
121 lines
3.3 KiB
C++
Executable File
#ifndef __CALIB02_H
|
|
#define __CALIB02_H
|
|
|
|
#ifndef __REPORT_H
|
|
#include <report.h>
|
|
#endif
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// TAnal_bill
|
|
///////////////////////////////////////////////////////////
|
|
|
|
// Classe simile al TBill, che contiene un conto piu' o meno completo di analitica
|
|
class TAnal_bill : public TSortable
|
|
{
|
|
TString _conto, _costo, _commessa, _fase;
|
|
|
|
protected:
|
|
void copy(const TAnal_bill& bill);
|
|
|
|
public:
|
|
virtual int compare(const TSortable& s) const;
|
|
bool match(const TAnal_bill& b) const;
|
|
|
|
public:
|
|
void set_conto(const char* c);
|
|
void set_costo(const char* c);
|
|
void set_commessa(const char* c);
|
|
void set_fase(const char* c);
|
|
|
|
const TString& conto() const;
|
|
const TString& costo() const;
|
|
const TString& commessa() const;
|
|
const TString& fase() const;
|
|
|
|
bool get(const TRectype& rec);
|
|
void reset();
|
|
|
|
const TAnal_bill& operator=(const TAnal_bill& bill);
|
|
|
|
TAnal_bill();
|
|
TAnal_bill(const TAnal_bill& bill);
|
|
TAnal_bill(const char* conto, const char* costo, const char* commessa, const char* fase);
|
|
TAnal_bill(const TRectype& rec);
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// TAnal_balance
|
|
///////////////////////////////////////////////////////////
|
|
|
|
#define _saldanal_consuntivo 0x1
|
|
#define _saldanal_preventivo 0x2
|
|
#define _saldanal_variazione 0x4
|
|
#define _saldanal_preventivi 0x6
|
|
#define _saldanal_qualsiasi 0x7
|
|
#define _saldanal_ultima_imm 0x8
|
|
#define _saldanal_riclassify 0x10
|
|
|
|
struct TSaldanal : public TObject
|
|
{
|
|
TImporto _ini, _dare, _avere, _fin;
|
|
bool _movimentato;
|
|
};
|
|
|
|
const TSaldanal& ca_saldo(const TAnal_bill& bill, const TDate& dal, const TDate& al, word tipi = _saldanal_consuntivo);
|
|
|
|
////////////////////////////////////////////////////////
|
|
// TPconana_recordset
|
|
////////////////////////////////////////////////////////
|
|
|
|
class TPconana_recordset : public TISAM_recordset
|
|
{
|
|
char _tipo;
|
|
word _tipimov;
|
|
TString _da_conto, _a_conto;
|
|
int _conto_minlen;
|
|
TAnal_bill _bill;
|
|
TDate _dal, _al;
|
|
bool _movimentati, _nonnulli;
|
|
|
|
protected:
|
|
bool valid_record(const TRelation& rel) const;
|
|
static bool pianoconti_filter(const TRelation* rel);
|
|
|
|
virtual void set_custom_filter(TCursor& cursor) const;
|
|
|
|
public:
|
|
virtual const TVariant& get(const char* column_name) const;
|
|
|
|
void set_tipo(char tipo);
|
|
void set_filter(char tipo, const char* da_conto, const char* a_conto,
|
|
const char* costo, const char* commessa, const char* fase,
|
|
const TDate& dal, const TDate& al,
|
|
word tipimov, bool movimentati, bool nonnulli);
|
|
TPconana_recordset(char tipo = ' ');
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// TAnal_rapport
|
|
///////////////////////////////////////////////////////////
|
|
|
|
class TAnal_report : public TReport
|
|
{
|
|
unsigned int _first_msg;
|
|
|
|
protected: // protected is safer
|
|
virtual size_t get_usr_words(TString_array& words) const;
|
|
virtual bool execute_usr_word(unsigned int opcode, TVariant_stack& stack);
|
|
virtual bool use_mask() { return false;}
|
|
|
|
void msg_format(int logicnum, TVariant_stack& stack);
|
|
void msg_format_costo (TVariant_stack& stack);
|
|
void msg_format_commessa (TVariant_stack& stack);
|
|
void msg_format_fase (TVariant_stack& stack);
|
|
void msg_format_conto (TVariant_stack& stack);
|
|
void msg_format_commessa_costo(TVariant_stack& stack);
|
|
|
|
public: // meglio pubic?
|
|
};
|
|
|
|
#endif
|