1997-06-03 15:56:27 +00:00
|
|
|
|
#ifndef __VELIB_H
|
|
|
|
|
#define __VELIB_H
|
|
|
|
|
|
1996-09-26 15:37:19 +00:00
|
|
|
|
#ifndef __VARMASK_H
|
|
|
|
|
#include <varmask.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
1997-06-12 16:26:22 +00:00
|
|
|
|
#ifndef __MULTIREC_H
|
|
|
|
|
#include <multirec.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
2000-05-05 15:25:49 +00:00
|
|
|
|
#ifndef __VISWIN_H
|
|
|
|
|
class TViswin;
|
|
|
|
|
#endif
|
|
|
|
|
|
1997-06-12 16:26:22 +00:00
|
|
|
|
#ifndef __CLIFOR_H
|
2004-04-28 22:23:16 +00:00
|
|
|
|
#include "../ve/clifor.h"
|
1997-06-12 16:26:22 +00:00
|
|
|
|
#endif
|
2007-03-07 11:36:57 +00:00
|
|
|
|
|
|
|
|
|
#ifndef __RELAPP_H
|
|
|
|
|
#include <relapp.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
2000-05-05 15:25:49 +00:00
|
|
|
|
#ifndef __CGLIB01_H
|
|
|
|
|
#include "../cg/cglib01.h"
|
|
|
|
|
#endif
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
1997-06-27 09:21:13 +00:00
|
|
|
|
#ifndef __CGPAGAME_H
|
|
|
|
|
#include "../cg/cgpagame.h"
|
1996-09-26 15:37:19 +00:00
|
|
|
|
#endif
|
1997-08-05 09:22:43 +00:00
|
|
|
|
|
1997-10-13 15:22:11 +00:00
|
|
|
|
#ifndef __PRLIB_H
|
2006-02-07 12:17:10 +00:00
|
|
|
|
class TProvvigioni_agente;
|
1997-10-13 15:22:11 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
1999-07-16 14:59:11 +00:00
|
|
|
|
#ifndef __MGLIB_H
|
|
|
|
|
#include "../mg/mglib.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2006-07-11 13:12:41 +00:00
|
|
|
|
#ifndef __COLMASK_H
|
|
|
|
|
class TSelect_color_mask;
|
|
|
|
|
#endif
|
|
|
|
|
|
1997-08-05 09:22:43 +00:00
|
|
|
|
#ifndef __DOC_H
|
|
|
|
|
#include <doc.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef __RDOC_H
|
|
|
|
|
#include <rdoc.h>
|
|
|
|
|
#endif
|
1999-07-16 14:59:11 +00:00
|
|
|
|
|
2006-07-11 13:12:41 +00:00
|
|
|
|
#ifndef __CG2101_H
|
|
|
|
|
#include "../cg/cg2101.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
1997-02-03 15:28:53 +00:00
|
|
|
|
#define RIGA_MERCE 'M'
|
1997-03-17 09:26:01 +00:00
|
|
|
|
#define RIGA_SPESEDOC 'S'
|
1997-02-03 15:28:53 +00:00
|
|
|
|
#define RIGA_PRESTAZIONI 'P'
|
2005-03-24 16:04:08 +00:00
|
|
|
|
#define RIGA_RISORSE 'R'
|
|
|
|
|
#define RIGA_ATTREZZATURE 'A'
|
1997-02-03 15:28:53 +00:00
|
|
|
|
#define RIGA_SCONTI 'C'
|
|
|
|
|
#define RIGA_OMAGGI 'O'
|
|
|
|
|
#define RIGA_DESCRIZIONI 'D'
|
2006-01-09 01:15:53 +00:00
|
|
|
|
#define RIGA_RETTIFICHE 'T'
|
1997-08-18 15:24:00 +00:00
|
|
|
|
|
1999-10-22 10:00:18 +00:00
|
|
|
|
#define MAX_IVA_SLICES 5
|
1997-08-18 15:24:00 +00:00
|
|
|
|
|
1996-09-26 15:37:19 +00:00
|
|
|
|
class TDocumento;
|
|
|
|
|
class TRiga_documento;
|
|
|
|
|
class TCond_vendita;
|
2002-05-08 16:25:49 +00:00
|
|
|
|
class TIVA_array;
|
1999-04-06 15:34:39 +00:00
|
|
|
|
class TArticolo_giacenza;
|
|
|
|
|
class TCache_articoli;
|
2004-11-30 22:02:59 +00:00
|
|
|
|
class TSmart_card;
|
1996-09-26 15:37:19 +00:00
|
|
|
|
|
1997-10-23 10:55:09 +00:00
|
|
|
|
|
|
|
|
|
bool scontoexpr2perc(const char * exp, bool signal , TString & goodexp, real & val_perc );
|
1996-09-26 15:37:19 +00:00
|
|
|
|
real prezzo_scontato(const real& prezzo, const char * sconto);
|
|
|
|
|
|
|
|
|
|
bool ora_hndl(TMask_field& field, KEY key);
|
1999-10-22 10:00:18 +00:00
|
|
|
|
bool totdoc_hndl(TMask_field& field, KEY key);
|
1996-09-26 15:37:19 +00:00
|
|
|
|
bool codcli_hndl(TMask_field& field, KEY key);
|
|
|
|
|
bool dummy_hndl(TMask_field& field, KEY key);
|
|
|
|
|
bool condpag_hndl(TMask_field& field, KEY key);
|
1996-10-21 15:52:20 +00:00
|
|
|
|
bool note_hndl(TMask_field& field, KEY key);
|
1997-02-03 15:28:53 +00:00
|
|
|
|
bool data_hndl(TMask_field& field, KEY key);
|
2003-11-17 10:20:13 +00:00
|
|
|
|
void set_curr_um(const TString& um);
|
1996-09-26 15:37:19 +00:00
|
|
|
|
|
1997-10-23 10:55:09 +00:00
|
|
|
|
|
1996-09-26 15:37:19 +00:00
|
|
|
|
class TDocumento_variable_field : public TVariable_field
|
2005-08-23 08:54:32 +00:00
|
|
|
|
{
|
|
|
|
|
bool _dirty;
|
1997-10-02 16:57:49 +00:00
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
public:
|
|
|
|
|
virtual TObject* dup() const { return new TDocumento_variable_field(*this); }
|
1996-09-26 15:37:19 +00:00
|
|
|
|
// @cmember segnala che il campo deve essere ricalcolato
|
2005-08-23 08:54:32 +00:00
|
|
|
|
virtual bool dirty() const { return _dirty; }
|
1996-09-26 15:37:19 +00:00
|
|
|
|
// @cmember assegna lo stato di campo da ricalcolare
|
2005-08-23 08:54:32 +00:00
|
|
|
|
virtual void set_dirty(bool on = true) { _dirty = on; }
|
1996-09-26 15:37:19 +00:00
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
// @ cmember Costruttore con una espressione di calcolo
|
|
|
|
|
TDocumento_variable_field(const char * name, const char * expr = "", TTypeexp type = _strexpr)
|
|
|
|
|
: TVariable_field(name, expr, type), _dirty(true) {}
|
1996-09-26 15:37:19 +00:00
|
|
|
|
// @ cmember Costruttore con una funzione
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TDocumento_variable_field(const char * name, VIRTUAL_GET_FUNCTION getfunc)
|
|
|
|
|
: TVariable_field(name, getfunc), _dirty(true) {}
|
|
|
|
|
// @ cmember Costruttore con una espressione di calcolo
|
|
|
|
|
TDocumento_variable_field(const char * name, const TExpression & expr, TTypeexp type = _strexpr)
|
|
|
|
|
: TVariable_field(name, expr, type), _dirty(true) {}
|
1996-09-26 15:37:19 +00:00
|
|
|
|
// @ cmember Costruttore con un variable_field
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TDocumento_variable_field(const TVariable_field & f) : TVariable_field(f), _dirty(true) {}
|
|
|
|
|
// @ cmember Distruttore
|
|
|
|
|
virtual ~TDocumento_variable_field() {}
|
1996-09-26 15:37:19 +00:00
|
|
|
|
};
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
class TSpesa_prest : public TRectype // velib01
|
|
|
|
|
{
|
1996-09-26 15:37:19 +00:00
|
|
|
|
public:
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TObject* dup() const { return new TSpesa_prest(codice()); }
|
1996-09-26 15:37:19 +00:00
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
public:
|
|
|
|
|
int read(const char* codice);
|
1998-04-30 14:04:19 +00:00
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
const TString& codice() const { return get("CODTAB");}
|
|
|
|
|
const TString& descrizione() const { return get("S0"); }
|
2006-01-09 18:32:38 +00:00
|
|
|
|
const TString& field_perc() const { return get("S5"); } // Solo spese
|
|
|
|
|
const TString& revenue() const { return get("S5"); } // Solo atrezzature
|
2005-08-23 08:54:32 +00:00
|
|
|
|
const TString & um() const { return get("S7"); }
|
2006-01-09 18:32:38 +00:00
|
|
|
|
const TString& cod_iva() const; // S3
|
|
|
|
|
real prezzo() const; // R10 o R0
|
2005-08-23 08:54:32 +00:00
|
|
|
|
real qta() const { return get_real("R1"); }
|
|
|
|
|
real perc() const { return get_real("R2"); }
|
|
|
|
|
char tipo() const { return get_char("S6"); }
|
|
|
|
|
char tipo_ritenuta() const { return get_char("S9"); }
|
|
|
|
|
const TString & tipo_riga() const { return get("S8"); }
|
2006-12-13 16:22:33 +00:00
|
|
|
|
char genere() const;
|
2006-02-02 01:51:04 +00:00
|
|
|
|
const TString & conto_analitico_vendite() const { return get("S1").left(20); }
|
|
|
|
|
const TString & conto_analitico_acquisti() const { return get("S2"); }
|
|
|
|
|
const TString & cdc() const { return get("S1").mid(20, 20); }
|
|
|
|
|
const TString & cms() const { return get("S1").mid(40, 20); }
|
|
|
|
|
const TString & fase() const { return get("S1").mid(60); }
|
2009-02-02 12:29:30 +00:00
|
|
|
|
const int caus_770() const { return get_int("I6"); }
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
TSpesa_prest(const char* codice = NULL, char tipo = 'S');
|
|
|
|
|
TSpesa_prest(const TRectype& rec);
|
|
|
|
|
virtual ~TSpesa_prest() {}
|
1996-09-26 15:37:19 +00:00
|
|
|
|
};
|
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
class TExpr_documento : public TExpression // velib01
|
|
|
|
|
{
|
|
|
|
|
TDocumento * _doc;
|
|
|
|
|
TRiga_documento * _row;
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
virtual void evaluate_user_func(int index, int nparms, TEval_stack & stack, TTypeexp type) const;
|
|
|
|
|
virtual int parse_user_func(const char * name, int nparms) const;
|
1996-09-26 15:37:19 +00:00
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
public:
|
1997-08-18 16:06:51 +00:00
|
|
|
|
// @cmember Duplica l'espressione
|
2005-08-23 08:54:32 +00:00
|
|
|
|
virtual TObject* dup() const;
|
|
|
|
|
// @cmember Assegna il documento corrente
|
|
|
|
|
void set_doc(TDocumento* doc) { _doc = doc; }
|
|
|
|
|
// @cmember Assegna il documento corrente
|
|
|
|
|
void set_row(TRiga_documento* row) { _row = row; }
|
|
|
|
|
// @cmember Costruttore (assegna l'estressione e il suo tipo)
|
|
|
|
|
TExpr_documento(const char* expression, TTypeexp type = _numexpr,
|
|
|
|
|
TDocumento* doc = NULL, TRiga_documento * row = NULL);
|
|
|
|
|
// @cmember Costruttore (assegna il tipo dell'istruzione)
|
|
|
|
|
TExpr_documento(TTypeexp type = _numexpr,
|
|
|
|
|
TDocumento* doc = NULL, TRiga_documento* row = NULL)
|
|
|
|
|
: TExpression(type, true), _doc(doc), _row(row) {}
|
|
|
|
|
// @cmember Costruttore di copia
|
|
|
|
|
TExpr_documento(const TExpr_documento & expr)
|
|
|
|
|
: TExpression(expr), _doc(expr._doc), _row(expr._row) {}
|
|
|
|
|
|
|
|
|
|
// @cmember Distruttore
|
|
|
|
|
virtual ~TExpr_documento() {}
|
1996-09-26 15:37:19 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum TTipo_formula { _documento, _riga };
|
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
class TFormula_documento : public TRectype // velib01
|
|
|
|
|
{
|
2006-01-09 18:32:38 +00:00
|
|
|
|
TString4 _tab;
|
|
|
|
|
TExpr_documento* _expr;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
1996-08-08 15:57:44 +00:00
|
|
|
|
protected:
|
2005-08-23 08:54:32 +00:00
|
|
|
|
int read(const char* codice, const char* expr = NULL, bool numexpr = true);
|
1996-09-26 15:37:19 +00:00
|
|
|
|
|
|
|
|
|
public:
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TObject* dup() const { return new TFormula_documento(_tab == "%FRD" ? _documento : _riga, codice(), NULL, true); }
|
|
|
|
|
const TString& codice() const { return get("CODTAB");}
|
|
|
|
|
const TString& name() const { return codice();}
|
|
|
|
|
TExpr_documento* expr() const { return _expr;}
|
|
|
|
|
|
|
|
|
|
const TString& descrizione() const { return get("S0"); }
|
|
|
|
|
const TString& expr_string() const { return get("S1"); }
|
|
|
|
|
TTypeexp expr_type() const { return get_bool("B0") ? _numexpr : _strexpr;}
|
|
|
|
|
|
|
|
|
|
TFormula_documento(TTipo_formula tipo = _documento, const char* codice = NULL, const char* expr = NULL, bool numexpr = true);
|
|
|
|
|
TFormula_documento(const TRectype& rec);
|
|
|
|
|
virtual ~TFormula_documento();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class TTipo_documento : public TRectype // velib03
|
|
|
|
|
{
|
|
|
|
|
static TAssoc_array _formule_documento;
|
|
|
|
|
TToken_string _formule;
|
2006-07-10 13:30:29 +00:00
|
|
|
|
TString_array _keys_descrs; // Tipi riga per listbox
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TString_array _defaults; // Defaults per i campi della maschera
|
|
|
|
|
TString_array _sheet_columns; // Colonne dello spreadsheet
|
|
|
|
|
TString_array _handlers; // Handlers
|
|
|
|
|
TString16 _imponibile;
|
|
|
|
|
TString16 _imposta;
|
|
|
|
|
TString16 _totale;
|
|
|
|
|
TString16 _totale_netto;
|
|
|
|
|
TString16 _basesconto;
|
|
|
|
|
TString16 _spese;
|
|
|
|
|
TString16 _totprovv;
|
|
|
|
|
TString16 _valore;
|
|
|
|
|
TString16 _totvalres;
|
|
|
|
|
TString16 _totvalore;
|
|
|
|
|
TString16 _totale_cont;
|
|
|
|
|
TString16 _field_prezzo;
|
|
|
|
|
TString16 _field_qta, _field_qtaevasa; // Veri campi Quantit<69> e Quantit<69> Evasa
|
2008-11-14 14:40:28 +00:00
|
|
|
|
TString16 _field_qta_mag, _field_qtaevasa_mag; // Veri campi Quantit<69> e Quantit<69> Evasa per magazzino
|
2008-03-26 11:24:36 +00:00
|
|
|
|
TString16 _raee_cod, _raee_fld;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TString _str_desc_doc, _str_desc_rdoc;
|
2008-10-28 20:15:28 +00:00
|
|
|
|
TString4 _module;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
char _tipocf;
|
2006-03-22 13:54:33 +00:00
|
|
|
|
char _tipocr;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
char _check_qta;
|
2007-06-01 08:17:27 +00:00
|
|
|
|
bool _cnt_prezzi, _show_evaded_lines, _load_cont, _non_evadere;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void add_formula_if_needed(TConfig& profile, TString& variable, const char* varname, const char* formula);
|
|
|
|
|
void read_formule();
|
|
|
|
|
int read(const char* tipodoc);
|
|
|
|
|
|
|
|
|
|
public:
|
2007-03-07 15:53:59 +00:00
|
|
|
|
enum { _altro, _bolla, _fattura, _ordine, _scontrino};
|
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TObject* dup() const { return new TTipo_documento(codice()); }
|
|
|
|
|
const TFilename& profile_name(TFilename& name) const;
|
|
|
|
|
|
|
|
|
|
// Funzioni che effettuano la cache di importanti valori contenuti nel profilo
|
|
|
|
|
const char tipocf() const;
|
|
|
|
|
void set_defaults(TMask& m) const;
|
|
|
|
|
const TString_array& keys_descrs();
|
|
|
|
|
const TString_array& sheet_columns() const;
|
|
|
|
|
const TString_array& handlers() const;
|
|
|
|
|
|
2007-03-07 11:36:57 +00:00
|
|
|
|
const TString& mask_name() const;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
const TString& causale() const { return get("S6"); }
|
|
|
|
|
int tipo() const { return get_int("I1"); }
|
|
|
|
|
const TString& codice() const { return get("CODTAB");}
|
|
|
|
|
|
|
|
|
|
bool is_generic() const { return tipo() == _altro; }
|
|
|
|
|
bool is_fattura() const { return tipo() == _fattura; }
|
|
|
|
|
bool is_bolla() const { return tipo() == _bolla; }
|
|
|
|
|
bool is_ordine() const { return tipo() == _ordine; }
|
2007-03-07 11:36:57 +00:00
|
|
|
|
bool is_scontrino() const { return tipo() == _scontrino; }
|
2005-08-23 08:54:32 +00:00
|
|
|
|
bool controllo_prezzi() const { return _cnt_prezzi; }
|
|
|
|
|
const char * field_prezzo() const { return _field_prezzo; }
|
|
|
|
|
const TString& field_qta() const { return _field_qta; }
|
|
|
|
|
const TString& field_qtaevasa() const { return _field_qtaevasa; }
|
2008-11-14 14:40:28 +00:00
|
|
|
|
const TString& field_qta_mag() const { return _field_qta_mag; }
|
|
|
|
|
const TString& field_qtaevasa_mag() const { return _field_qtaevasa_mag; }
|
2005-08-23 08:54:32 +00:00
|
|
|
|
bool check_giac() const { return _check_qta == 'G'; }
|
|
|
|
|
bool check_disp() const { return _check_qta == 'D'; }
|
2007-03-30 13:51:17 +00:00
|
|
|
|
bool load_cont() const { return _load_cont; }
|
2008-03-26 11:24:36 +00:00
|
|
|
|
const TString& raee_cod() const { return _raee_cod; }
|
|
|
|
|
const TString& raee_fld() const { return _raee_fld; }
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
const TString & descrizione() const { return get("S0"); }
|
|
|
|
|
const TString & riferimento(const TDocumento& doc, TString& rif) const;
|
|
|
|
|
const TString & imponibile() const { return _imponibile;}
|
|
|
|
|
const TString & imposta() const { return _imposta;}
|
|
|
|
|
const TString & totale_doc() const { return _totale;}
|
|
|
|
|
const TString & totale_netto() const { return _totale_netto; }
|
|
|
|
|
const TString & totale_doc_cont() const { return _totale_cont;}
|
|
|
|
|
const TString & basesconto() const { return _basesconto;}
|
|
|
|
|
const TString & spese() const { return _spese;}
|
|
|
|
|
const TString & totprovv() const { return _totprovv;}
|
|
|
|
|
const TString & valore() const { return _valore;}
|
|
|
|
|
const TString & totvalres() const { return _totvalres;}
|
|
|
|
|
const TString & totvalore() const { return _totvalore;}
|
|
|
|
|
bool mov_mag() const { return get_bool("B1"); }
|
|
|
|
|
bool statistiche() const { return get_bool("B2"); }
|
|
|
|
|
bool provvigioni() const { return get_bool("B3"); }
|
|
|
|
|
const char stato_mov_iniziale() const {return get_char("S7"); }
|
|
|
|
|
const char stato_mov_finale() const {return get_char("S8"); }
|
|
|
|
|
const char stato_provvigioni() const {return get_char("S3"); }
|
|
|
|
|
const TString & caus_mov() const {return get("S9"); }
|
|
|
|
|
const TString & caus_anticipo() const {return get("S10"); }
|
|
|
|
|
const TString & tipi_iva_validi() const {return get("S11"); }
|
|
|
|
|
const char stato_finale_inserimento() const {return get("S2")[0]; }
|
|
|
|
|
const char stato_finale_stampa() const {return get("S2")[1]; }
|
|
|
|
|
const char stato_bloccato() const {return get("S2")[2]; }
|
2007-03-07 11:36:57 +00:00
|
|
|
|
const char stato_chiuso() const {return get("S2")[3]; }
|
2005-08-23 08:54:32 +00:00
|
|
|
|
const TString & stati_iniziali_modifica() const {return get("S2").mid(9,20); }
|
|
|
|
|
const TString & stati_iniziali_cancellazione() const {return get("S2").mid(29,20); }
|
|
|
|
|
const TString & stati_iniziali_stampa() const {return get("S2").mid(49,20); }
|
|
|
|
|
bool stato_with_mov_mag(const char stato) const;
|
|
|
|
|
bool scarica_residuo() const;
|
|
|
|
|
bool clifo_optional() const { return get_bool("B5"); }
|
2008-12-04 16:12:30 +00:00
|
|
|
|
bool printable() const { return get("S5").full(); }
|
|
|
|
|
bool main_print_profile(TFilename& report, int filter) const;
|
|
|
|
|
bool additional_print_profile(TFilename& report, int filter) const;
|
2008-12-24 11:18:37 +00:00
|
|
|
|
bool mail_print_profile(TFilename& report) const;
|
2006-03-22 13:54:33 +00:00
|
|
|
|
bool is_costo() const ;
|
|
|
|
|
bool is_ricavo() const ;
|
2008-10-28 20:15:28 +00:00
|
|
|
|
const TString & module() const { return _module; }
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
2005-11-15 12:04:34 +00:00
|
|
|
|
TFormula_documento* first_formula() { return succ_formula(true); }
|
2006-07-10 13:30:29 +00:00
|
|
|
|
TFormula_documento* succ_formula(bool restart = false);
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
const int ncopie() const { return get_int("I0"); }
|
2007-05-30 16:46:56 +00:00
|
|
|
|
const int additional_ncopie() const { return get_int("I2"); }
|
2005-08-23 08:54:32 +00:00
|
|
|
|
bool spese_aut() const { return get_bool("B0"); }
|
|
|
|
|
bool nota_credito() const { return get_bool("B7"); }
|
|
|
|
|
bool add_conai() const { return get_bool("B6"); }
|
|
|
|
|
bool calcolo_lordo() const { return get_bool("B8"); }
|
|
|
|
|
bool fattura_commerciale() const { return get_bool("B9"); }
|
2006-07-10 13:30:29 +00:00
|
|
|
|
bool allega_documenti() const { return get_bool("B10"); }
|
2007-01-19 17:53:32 +00:00
|
|
|
|
bool auto_add() const { return get_bool("B11"); }
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
const TString& stringa_descrizione_documento() const { return _str_desc_doc; }
|
|
|
|
|
const TString& stringa_descrizione_riga() const { return _str_desc_rdoc; }
|
|
|
|
|
bool mostra_righe_evase_in_elaborazione() const { return _show_evaded_lines; }
|
2007-06-01 08:17:27 +00:00
|
|
|
|
bool da_evadere() const { return !_non_evadere; }
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
TTipo_documento(const char* tipodoc = NULL);
|
|
|
|
|
TTipo_documento(const TRectype& rec);
|
|
|
|
|
virtual ~TTipo_documento();
|
2006-04-13 17:56:02 +00:00
|
|
|
|
|
1996-08-08 15:57:44 +00:00
|
|
|
|
};
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
2008-10-10 08:10:51 +00:00
|
|
|
|
const TTipo_documento& cached_tipodoc(const char* tipodoc);
|
2004-11-30 22:02:59 +00:00
|
|
|
|
|
1997-08-18 15:24:00 +00:00
|
|
|
|
class TCodice_numerazione : public TRectype
|
|
|
|
|
{
|
2005-08-23 08:54:32 +00:00
|
|
|
|
int _status;
|
1997-08-18 15:24:00 +00:00
|
|
|
|
|
|
|
|
|
public:
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TObject* dup() const { return new TCodice_numerazione(*this); }
|
1997-08-18 15:24:00 +00:00
|
|
|
|
|
|
|
|
|
public:
|
2005-08-23 08:54:32 +00:00
|
|
|
|
int read(const char* cod);
|
|
|
|
|
const TString& codice() const { return get("CODTAB"); }
|
|
|
|
|
const TString& descrizione() const { return get("S0"); }
|
|
|
|
|
const TString& prefisso() const { return get("S6"); }
|
|
|
|
|
const TString& postfisso() const { return get("S7"); }
|
|
|
|
|
const bool num_provv() const { return get_bool("B0"); }
|
|
|
|
|
const bool auto_num() const { return get_bool("B1"); }
|
|
|
|
|
const bool dont_test_datadoc() const { return get_bool("B2"); }
|
|
|
|
|
const bool fattura_emettere_ricevere() const { return get_bool("B3"); }
|
|
|
|
|
const bool save_and_new() const { return get_bool("B4"); }
|
2006-07-10 13:30:29 +00:00
|
|
|
|
const bool test_eser() const { return !get_bool("B5"); }
|
2008-10-10 08:53:40 +00:00
|
|
|
|
const bool auto_archive() const { return get_bool("B6"); }
|
2008-06-11 11:31:27 +00:00
|
|
|
|
const bool newnumdef() const { return get_bool("B8"); }
|
|
|
|
|
const TString& codnumdef() const { return get("S8"); }
|
|
|
|
|
const TString& tipodocdef() const { return get("S9"); }
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
2006-01-31 15:33:00 +00:00
|
|
|
|
const TString& tipo_doc(int i) const;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
int ntipi_doc() const;
|
2006-04-13 17:56:02 +00:00
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
void complete_num(long num, TString& codnum) const;
|
|
|
|
|
bool ok() const { return !empty(); }
|
|
|
|
|
TCodice_numerazione(const char* codnum = NULL);
|
|
|
|
|
TCodice_numerazione(const TRectype& rec);
|
|
|
|
|
virtual ~TCodice_numerazione();
|
2006-04-13 17:56:02 +00:00
|
|
|
|
|
1997-08-18 15:24:00 +00:00
|
|
|
|
};
|
|
|
|
|
|
2008-10-08 12:39:45 +00:00
|
|
|
|
const TCodice_numerazione& cached_numerazione(const char * codnum);
|
2008-10-07 00:50:22 +00:00
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
class TTipo_riga_documento : public TRectype // velib02
|
|
|
|
|
{
|
|
|
|
|
static TAssoc_array _formule_riga;
|
|
|
|
|
TToken_string _formule;
|
2004-11-30 22:02:59 +00:00
|
|
|
|
TString_array _defaults;
|
2002-12-20 16:15:03 +00:00
|
|
|
|
|
2006-01-09 18:32:38 +00:00
|
|
|
|
TString16 _imponibile, _field_imposta;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TString16 _quant;
|
|
|
|
|
TString16 _quantevasa;
|
|
|
|
|
TString16 _qtares;
|
|
|
|
|
TString16 _valore;
|
|
|
|
|
TString16 _valres;
|
|
|
|
|
|
|
|
|
|
TString16 _field_provv;
|
|
|
|
|
TString16 _field_qta, _field_qtaevasa; // Veri campi Quantit<69> e Quantit<69> Evasa
|
2008-11-14 14:40:28 +00:00
|
|
|
|
TString16 _field_qta_mag, _field_qtaevasa_mag; // Veri campi Quantit<69> e Quantit<69> Evasa per magazzino
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
2006-04-14 13:23:14 +00:00
|
|
|
|
TToken_string _search_nums;
|
|
|
|
|
int _search_years;
|
|
|
|
|
int _max_rows_art;
|
|
|
|
|
bool _no_desc;
|
2008-06-11 11:31:27 +00:00
|
|
|
|
TToken_string _search_active_docs;
|
|
|
|
|
TToken_string _fields_to_update;
|
2008-08-27 23:23:05 +00:00
|
|
|
|
TToken_string _field_list;
|
|
|
|
|
TToken_string _header;
|
|
|
|
|
bool _select_clifo;
|
2009-02-06 13:46:58 +00:00
|
|
|
|
TArray _genconf;
|
2006-04-14 13:23:14 +00:00
|
|
|
|
int _decrp, _incrp;
|
2006-04-13 17:56:02 +00:00
|
|
|
|
|
1996-08-19 16:04:55 +00:00
|
|
|
|
protected:
|
2005-08-23 08:54:32 +00:00
|
|
|
|
void read_formule();
|
|
|
|
|
void add_formula_if_needed(TConfig& profile, TString& variable,
|
|
|
|
|
const char* varname, const char* formula);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
TObject* dup() const { return new TTipo_riga_documento(codice()); }
|
1996-08-19 16:04:55 +00:00
|
|
|
|
|
|
|
|
|
public:
|
2005-08-23 08:54:32 +00:00
|
|
|
|
const TFilename& profile_name(TFilename& name) const;
|
|
|
|
|
const TString& mask_name(TString& name) const;
|
|
|
|
|
const TString& codice() const { return get("CODTAB");}
|
|
|
|
|
|
|
|
|
|
const TString& descrizione() const { return get("S0"); }
|
|
|
|
|
char tipo() const { return get_char("S7"); }
|
2006-04-14 13:23:14 +00:00
|
|
|
|
bool has_formula(const char* name) { return _formule.get_pos(name) >= 0; }
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
const TString& imponibile() const { return _imponibile;}
|
2006-01-09 18:32:38 +00:00
|
|
|
|
const TString& imposta() const { return _field_imposta;}
|
2005-08-23 08:54:32 +00:00
|
|
|
|
const TString& quant() const { return _quant;}
|
|
|
|
|
const TString& quantevasa() const { return _quantevasa;}
|
|
|
|
|
const TString& field_qta() const { return _field_qta;}
|
|
|
|
|
const TString& field_qtaevasa() const { return _field_qtaevasa;}
|
2008-11-14 14:40:28 +00:00
|
|
|
|
const TString& field_qta_mag() const { return _field_qta_mag;}
|
|
|
|
|
const TString& field_qtaevasa_mag() const { return _field_qtaevasa_mag;}
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
2006-04-18 16:26:03 +00:00
|
|
|
|
const int search_years() const { return _search_years;}
|
|
|
|
|
const TToken_string& search_nums() const { return _search_nums;}
|
|
|
|
|
const int max_rows_art() const { return _max_rows_art;}
|
2006-07-11 16:22:58 +00:00
|
|
|
|
bool no_desc() const { return _no_desc;}
|
2008-06-11 11:31:27 +00:00
|
|
|
|
TToken_string& search_active_docs() { return _search_active_docs;}
|
|
|
|
|
TToken_string& fields_to_update() { return _fields_to_update;}
|
2008-08-27 23:23:05 +00:00
|
|
|
|
TToken_string& field_list() { return _field_list;}
|
|
|
|
|
TToken_string& header() { return _header;}
|
|
|
|
|
bool select_clifo() const { return _select_clifo;}
|
2006-04-18 16:26:03 +00:00
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
const TString& provv() const { return _field_provv;}
|
|
|
|
|
const int incr_perc_prezzo() const { return _incrp;}
|
|
|
|
|
const int decr_perc_prezzo() const { return _decrp;}
|
2009-02-06 13:46:58 +00:00
|
|
|
|
TToken_string * genconf(int i) const { return (TToken_string *) _genconf.objptr(i);}
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
bool formfeed() const { return get_bool("B0"); }
|
|
|
|
|
|
|
|
|
|
TFormula_documento* first_formula() { return succ_formula(true); }
|
|
|
|
|
TFormula_documento* succ_formula(bool restart = FALSE);
|
|
|
|
|
|
|
|
|
|
int read(const char* tiporig);
|
|
|
|
|
void set_defaults(TSheet_field& s, int row) const;
|
|
|
|
|
|
|
|
|
|
TTipo_riga_documento(const char* tiporig = NULL);
|
|
|
|
|
TTipo_riga_documento(const TRectype& rec);
|
|
|
|
|
virtual ~TTipo_riga_documento() { }
|
1996-08-19 16:04:55 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
class TRiga_documento : public TAuto_variable_rectype // velib02
|
1996-08-14 16:32:11 +00:00
|
|
|
|
{
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TDocumento* _doc;
|
|
|
|
|
static long _firm;
|
|
|
|
|
static TAssoc_array _tipi;
|
|
|
|
|
static TAssoc_array _spese;
|
|
|
|
|
static TAssoc_array _ive;
|
|
|
|
|
static int _iva_calc_mode;
|
2004-06-04 11:20:51 +00:00
|
|
|
|
static bool _rit_calc;
|
1996-09-26 15:37:19 +00:00
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
protected:
|
|
|
|
|
// @cmember Setta il contenuto del campo <p fieldname> (non tipizzata)
|
|
|
|
|
virtual void put_str(const char* fieldname, const char* val);
|
|
|
|
|
|
|
|
|
|
virtual TRiga_documento & copy(const TRiga_documento & r);
|
|
|
|
|
TObject* dup() const { return new TRiga_documento(*this); }
|
|
|
|
|
virtual void set_variables(TExpression * e) const ;
|
2008-11-14 14:40:28 +00:00
|
|
|
|
bool has_doc() const { return _doc != NULL;}
|
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
static void test_firm();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
void dirty_fields(bool dirty_document = true);
|
|
|
|
|
bool doc_dependent() const;
|
|
|
|
|
int numero() const { return get_int(RDOC_NRIGA); }
|
|
|
|
|
void set_numero(int numero) { put(RDOC_NRIGA, numero);}
|
|
|
|
|
bool is_generata() const { return get_bool(RDOC_GENERATA);}
|
|
|
|
|
void generata(bool on = true) { put(RDOC_GENERATA, on);}
|
|
|
|
|
bool is_merce() const { return tipo().tipo() == RIGA_MERCE;}
|
|
|
|
|
bool is_spese() const { return tipo().tipo() == RIGA_SPESEDOC;}
|
|
|
|
|
bool is_prestazione() const { return tipo().tipo() == RIGA_PRESTAZIONI;}
|
|
|
|
|
bool is_risorsa() const { return tipo().tipo() == RIGA_RISORSE;}
|
|
|
|
|
bool is_attrezzatura() const { return tipo().tipo() == RIGA_ATTREZZATURE;}
|
|
|
|
|
bool is_sconto() const {return tipo().tipo() == RIGA_SCONTI;}
|
|
|
|
|
bool is_sconto_perc() const { return is_sconto() && get(RDOC_SCONTO).not_empty();}
|
|
|
|
|
bool is_omaggio() const { return tipo().tipo() == RIGA_OMAGGI;}
|
|
|
|
|
bool is_descrizione() const { return tipo().tipo() == RIGA_DESCRIZIONI;}
|
|
|
|
|
bool is_articolo() const;
|
|
|
|
|
bool is_checked() const { return get_bool(RDOC_CHECKED);}
|
|
|
|
|
bool is_evadibile() const { return is_merce() || is_omaggio() || is_spese() || is_prestazione(); }
|
|
|
|
|
bool is_evasa() const; // Ritorna vero se la riga <20> evasa
|
|
|
|
|
void checked(bool on = true) { put(RDOC_CHECKED, (bool)on); }
|
|
|
|
|
void unchecked() { checked(FALSE); }
|
|
|
|
|
bool linked() const { return get(RDOC_DACODNUM).not_empty();}
|
|
|
|
|
// @cmember Assegna il documento corrente
|
|
|
|
|
void set_doc(TDocumento * doc) { _doc = doc; }
|
|
|
|
|
const TDocumento & doc() const { CHECK(_doc, "Documento nullo"); return *_doc;}
|
|
|
|
|
|
|
|
|
|
virtual void zero(const char * fieldname);
|
|
|
|
|
virtual void zero(char c = '\0');
|
|
|
|
|
// row -> sheet
|
2007-02-01 15:19:17 +00:00
|
|
|
|
void autoload(TSheet_field& f);
|
2005-08-23 08:54:32 +00:00
|
|
|
|
// sheet -> row
|
2007-02-01 15:19:17 +00:00
|
|
|
|
void autosave(TSheet_field& f);
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
2008-10-07 00:50:22 +00:00
|
|
|
|
const TTipo_riga_documento & tipo() const ;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
const TSpesa_prest & spesa() const;
|
|
|
|
|
static const TCodiceIVA & iva(const char * codice);
|
2006-02-08 11:44:50 +00:00
|
|
|
|
const TCodiceIVA & iva() const {const TString4 cod(get(RDOC_CODIVA)); return iva(cod);}
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
const bool tipo_valido() const { return get(RDOC_TIPORIGA).not_empty(); }
|
|
|
|
|
void set_tipo(const char * tipo) { put(RDOC_TIPORIGA, tipo);}
|
|
|
|
|
bool sola_descrizione() const;
|
|
|
|
|
void forza_sola_descrizione();
|
|
|
|
|
|
|
|
|
|
void set_original_rdoc_key(const TRectype& orig, int depth = 0);
|
|
|
|
|
void reset_original_rdoc_key();
|
|
|
|
|
const TRectype* find_original_rdoc() const;
|
2006-04-14 13:23:14 +00:00
|
|
|
|
const TRectype* find_original_doc() const;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
virtual TRiga_documento& operator =(const TRiga_documento& r) { return copy(r);}
|
|
|
|
|
virtual TRectype& operator =(const TRectype & r);
|
|
|
|
|
virtual TRectype& operator =(const char * r);
|
|
|
|
|
|
2005-04-19 10:09:52 +00:00
|
|
|
|
void cost2revenue();
|
2005-08-23 08:54:32 +00:00
|
|
|
|
bool raggruppabile(const TRiga_documento& r, TToken_string& campi) const;
|
|
|
|
|
TRiga_documento& operator +=(const TRiga_documento& r);
|
|
|
|
|
|
|
|
|
|
void reset_fields(TAuto_variable_rectype& rec) { rec.remove_field(); }
|
|
|
|
|
void set_fields(TAuto_variable_rectype& rec);
|
|
|
|
|
|
|
|
|
|
real prezzo(bool scontato, bool lordo, int ndec = AUTO_DECIMALS) const ;
|
|
|
|
|
real importo(bool scontato , bool lordo, int ndec = AUTO_DECIMALS) const ;
|
|
|
|
|
real sconto() const { return importo(FALSE,FALSE) - importo(true,FALSE); }
|
|
|
|
|
real iva(int ndec) const;
|
|
|
|
|
real imponibile(bool lordo = FALSE) const;
|
|
|
|
|
real imponibile_omaggio(int iva_calc_mode = 1) const;
|
|
|
|
|
real iva_omaggio(int ndec, int iva_calc_mode = 1) const;
|
|
|
|
|
real imposta(bool round = true) const;
|
|
|
|
|
real provvigione(int ndec = AUTO_DECIMALS) const;
|
2004-06-04 11:20:51 +00:00
|
|
|
|
real ritenuta(const char tipor = '\0', bool lordo = false, int ndec = AUTO_DECIMALS) const;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
const TString& field_qta() const;
|
|
|
|
|
const TString& field_qtaevasa() const;
|
|
|
|
|
real quantita() const;
|
|
|
|
|
real qtaevasa() const;
|
|
|
|
|
real qtaresidua() const;
|
2008-11-14 14:40:28 +00:00
|
|
|
|
|
|
|
|
|
virtual const TString& field_qta_mag() const;
|
|
|
|
|
virtual const TString& field_qtaevasa_mag() const;
|
|
|
|
|
virtual real quantita_mag() const;
|
|
|
|
|
virtual real qtaevasa_mag() const;
|
|
|
|
|
virtual real qtaresidua_mag() const;
|
2008-02-25 10:27:45 +00:00
|
|
|
|
real calc_conai_qta(int type) const;
|
|
|
|
|
|
2008-11-12 11:25:59 +00:00
|
|
|
|
real valore(bool totale, bool lordo = false, int ndec = AUTO_DECIMALS) const;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
const TString & codice_costo() const;
|
|
|
|
|
const TString & codice_commessa() const;
|
|
|
|
|
const TString & fase_commessa() const;
|
2008-10-07 00:50:22 +00:00
|
|
|
|
TArticolo & articolo() const;
|
|
|
|
|
TArticolo_giacenza & articolo_giacenza() const;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
TRiga_documento(TDocumento* doc, const char* tipo = NULL);
|
|
|
|
|
TRiga_documento(const TRiga_documento & row);
|
2008-11-26 10:47:53 +00:00
|
|
|
|
/* Maialata inguardabile: guai a chi la riporta!
|
|
|
|
|
TRiga_documento(const TRiga_documento& rec, TDocumento* doc, const char* tipo = NULL); */
|
2005-08-23 08:54:32 +00:00
|
|
|
|
virtual ~TRiga_documento() {}
|
1996-08-14 16:32:11 +00:00
|
|
|
|
};
|
|
|
|
|
|
1997-02-24 13:20:27 +00:00
|
|
|
|
enum TTipo_importo { _lordo, _netto, _imposta };
|
|
|
|
|
|
1997-08-21 16:47:14 +00:00
|
|
|
|
class TRiepilogo_iva : public TObject
|
|
|
|
|
{
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TCodiceIVA _codiva;
|
|
|
|
|
real _imp;
|
2007-03-07 11:36:57 +00:00
|
|
|
|
real _imp_orig;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
real _imp_spese;
|
|
|
|
|
real _imp_spese_row;
|
|
|
|
|
real _iva;
|
|
|
|
|
real _iva_spese;
|
|
|
|
|
real _sconto_perc;
|
|
|
|
|
real _sconto_imp;
|
|
|
|
|
real _iva_sconto;
|
|
|
|
|
byte _tipo;
|
|
|
|
|
|
1997-08-21 16:47:14 +00:00
|
|
|
|
protected:
|
2005-08-23 08:54:32 +00:00
|
|
|
|
virtual TObject* dup() const { return new TRiepilogo_iva(*this); }
|
|
|
|
|
virtual TRiepilogo_iva & copy(const TRiepilogo_iva & a);
|
|
|
|
|
|
1997-08-21 16:47:14 +00:00
|
|
|
|
public:
|
2007-03-07 11:36:57 +00:00
|
|
|
|
real imponibile(bool spese = TRUE) const { return _imp + (spese ? _imp_spese : ZERO);} // Imponibile
|
|
|
|
|
real imposta(bool spese = TRUE) const { return _iva + (spese ? _iva_spese : ZERO);} // Iva
|
2005-08-23 08:54:32 +00:00
|
|
|
|
real & imp() { return _imp;};
|
2007-03-07 11:36:57 +00:00
|
|
|
|
real & imp_orig() { return _imp_orig;};
|
2005-08-23 08:54:32 +00:00
|
|
|
|
real & imp_spese() { return _imp_spese;};
|
|
|
|
|
real & imp_spese_row() { return _imp_spese_row;};
|
|
|
|
|
real & iva() { return _iva;};
|
|
|
|
|
real & iva_spese() { return _iva_spese;};
|
|
|
|
|
real & iva_sconto() { return _iva_sconto;};
|
|
|
|
|
const real & iva_sconto() const { return _iva_sconto;};
|
|
|
|
|
real & sconto_perc() { return _sconto_perc; }
|
|
|
|
|
const real& sconto_perc() const { return _sconto_perc; }
|
|
|
|
|
real & sconto_imp () { return _sconto_imp; }
|
|
|
|
|
const real & sconto_imp () const { return _sconto_imp; }
|
|
|
|
|
const TCodiceIVA & cod_iva() const { return _codiva;}
|
|
|
|
|
byte tipo(){ return _tipo;}// Tipo (Vedi opzioni per la selzione di filtro nella validate())
|
|
|
|
|
TRiepilogo_iva& operator = (const TRiepilogo_iva & a) {return copy(a);}
|
|
|
|
|
TRiepilogo_iva(const TCodiceIVA & codiva);
|
|
|
|
|
TRiepilogo_iva(const TRiepilogo_iva & a) {copy(a);}
|
|
|
|
|
TRiepilogo_iva() : _tipo(0) {}
|
|
|
|
|
~TRiepilogo_iva() {};
|
1997-08-21 16:47:14 +00:00
|
|
|
|
};
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
1997-10-29 11:08:40 +00:00
|
|
|
|
class TAgente ;
|
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
class TDocumento : public TMultiple_rectype // velib03
|
|
|
|
|
{
|
|
|
|
|
TRecfield *_tipocf;
|
|
|
|
|
TRecfield *_codcf;
|
|
|
|
|
TRecfield *_cod_occas;
|
|
|
|
|
char _stato_originale;
|
|
|
|
|
|
|
|
|
|
TCli_for _cli_for;
|
|
|
|
|
TOccasionale _occas;
|
|
|
|
|
TPagamento _pag;
|
|
|
|
|
TAssoc_array _tabella_iva; // tabella di imponibili ed imposte
|
|
|
|
|
|
|
|
|
|
TProvvigioni_agente* _provv_agente;
|
|
|
|
|
TString16 _old_agente; // Agente originale
|
|
|
|
|
|
|
|
|
|
TRiga_documento * _sconto; // Riga per lo sconto di testata
|
|
|
|
|
TRiga_documento * _esenzione; // Riga per l' esenzione iva
|
|
|
|
|
|
|
|
|
|
bool _dirty_deny;
|
|
|
|
|
|
|
|
|
|
static long _firm;
|
2006-01-09 18:32:38 +00:00
|
|
|
|
static TString4 _codiva_spese;
|
|
|
|
|
static TString4 _codiva_bolli;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
static short _has_mag;
|
|
|
|
|
static short _has_stat_ven;
|
|
|
|
|
static short _has_provv;
|
|
|
|
|
static TCodgiac_livelli *_livelli;
|
|
|
|
|
|
|
|
|
|
protected:
|
2007-03-07 11:36:57 +00:00
|
|
|
|
virtual TRectype * new_body_record(int logicnum = 0)
|
|
|
|
|
{ return new TRiga_documento(this); }
|
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TRiga_documento & row(int index);
|
|
|
|
|
const TRiga_documento& physical_row(int index) const;
|
|
|
|
|
|
|
|
|
|
long get_next_key(char provv, int anno, const char* codnum) const;
|
|
|
|
|
virtual void put_str(const char* fieldname, const char* val);
|
|
|
|
|
virtual const TString & get_str(const char* fieldname) const ;
|
2006-04-18 16:26:03 +00:00
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
virtual bool key_complete() { return numero() > 0; }
|
|
|
|
|
void set_riga_sconto();
|
|
|
|
|
int write_rewrite(TBaseisamfile & f, bool re) const;
|
|
|
|
|
virtual TDocumento & copy(const TDocumento & d);
|
|
|
|
|
virtual TObject* dup() const { return new TDocumento(*this); }
|
|
|
|
|
void calc_iva_fattura_commerciale();
|
2007-03-07 11:36:57 +00:00
|
|
|
|
void update_tabella_iva(bool solo_imponibili);
|
2005-08-23 08:54:32 +00:00
|
|
|
|
void dirty_tabella_iva() { _tabella_iva.destroy();}
|
|
|
|
|
static void test_firm();
|
|
|
|
|
|
|
|
|
|
void init();
|
|
|
|
|
void check_modules();
|
|
|
|
|
virtual void set_variables(TExpression * e) const ;
|
2008-03-26 11:24:36 +00:00
|
|
|
|
void update_raee();
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
public:
|
2008-08-07 08:36:15 +00:00
|
|
|
|
int set_row_ids();
|
2006-07-11 16:22:58 +00:00
|
|
|
|
long renum_ndoc(long numdoc = 0);
|
2007-03-07 11:36:57 +00:00
|
|
|
|
virtual bool renum() { return renum_ndoc() > 0;}
|
2005-08-23 08:54:32 +00:00
|
|
|
|
const TString& codiva_spese() const ;
|
|
|
|
|
const TString& codiva_bolli() const ;
|
|
|
|
|
|
|
|
|
|
TCodgiac_livelli & livelli() const ;
|
|
|
|
|
void dirty_fields();
|
|
|
|
|
|
2007-03-07 11:36:57 +00:00
|
|
|
|
TAssoc_array & tabella_iva(bool solo_imponibili = false) { update_tabella_iva(solo_imponibili); return _tabella_iva; }
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TCli_for & clifor() const;
|
|
|
|
|
TOccasionale & occas() const;
|
|
|
|
|
const TAgente & agente() const;
|
|
|
|
|
const TString & riferimento(TString& rif) const { return tipo().riferimento(*this, rif); }
|
|
|
|
|
|
|
|
|
|
virtual TRecord_array& body(int logicnum = 0) const;
|
|
|
|
|
virtual TDocumento & operator =(const TDocumento & d) {return copy(d);}
|
|
|
|
|
virtual TRectype & operator =(const TRectype & r);
|
|
|
|
|
virtual TRectype & operator =(const char * r);
|
|
|
|
|
virtual void zero(const char * fieldname);
|
|
|
|
|
virtual void zero(char c = '\0') { TMultiple_rectype::zero(c); }
|
|
|
|
|
|
|
|
|
|
int physical_rows() const { return body().rows(); }
|
|
|
|
|
int rows() const { return physical_rows() + ((_sconto != NULL) ? 1 : 0) + ((_esenzione != NULL) ? 1 : 0); }
|
|
|
|
|
const TRiga_documento& operator[](int index) const { return (const TRiga_documento&)((TDocumento *)this)->row(index); }
|
|
|
|
|
TRiga_documento& operator[](int index) { return (TRiga_documento&)row(index); }
|
|
|
|
|
const TRiga_documento* get_row_id(long id) const;
|
|
|
|
|
|
|
|
|
|
TRiga_documento& insert_row(int row, const char *tipo = NULL);
|
|
|
|
|
TRiga_documento& new_row(const char *tipo = NULL);
|
|
|
|
|
virtual int read(TBaseisamfile& f, word op = _isequal, word lockop = _nolock);
|
|
|
|
|
virtual int write(TBaseisamfile& f) const { return write_rewrite(f, FALSE); }
|
|
|
|
|
virtual int rewrite(TBaseisamfile& f) const { return write_rewrite(f, true); }
|
|
|
|
|
virtual int remove(TBaseisamfile& f) const;
|
|
|
|
|
|
|
|
|
|
int read(char provv, int anno, const char* codnum, long numdoc, word op = _isequal, word lockop = _nolock);
|
|
|
|
|
int read(const TRectype& rec, word op = _isequal, word lockop = _nolock) { *this = rec; return read(op, lockop); }
|
|
|
|
|
int read(word op = _isequal, word lockop = _nolock) { TLocalisamfile f(LF_DOC); return read(f, op, lockop);}
|
|
|
|
|
|
|
|
|
|
int write(bool re = FALSE) const { TLocalisamfile f(LF_DOC); return write_rewrite(f, re);}
|
|
|
|
|
int rewrite() const { return write(true); }
|
|
|
|
|
int remove() const { TLocalisamfile f(LF_DOC); return remove(f);}
|
|
|
|
|
int decimals(bool price = FALSE) const;
|
|
|
|
|
|
|
|
|
|
void flush_rows();
|
|
|
|
|
|
|
|
|
|
TProvvigioni_agente& calc_provvigioni(const bool generata = true);
|
2006-02-07 12:17:10 +00:00
|
|
|
|
int write_provvigioni();
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
char tipo_numerazione() const { return get_char("PROVV"); }
|
|
|
|
|
int anno() const { return get_int("ANNO"); }
|
|
|
|
|
const TString& numerazione() const { return get("CODNUM"); }
|
|
|
|
|
long numero() const { return get_long("NDOC"); }
|
|
|
|
|
TDate data() const { return get_date("DATADOC"); }
|
|
|
|
|
bool in_valuta() const;
|
|
|
|
|
const TString& valuta() const { return get("CODVAL"); }
|
|
|
|
|
real cambio() const { return get_real("CAMBIO"); }
|
|
|
|
|
bool tipo_valido() const { return get("TIPODOC").not_empty(); }
|
|
|
|
|
const TTipo_documento& tipo() const;
|
2005-10-27 13:07:20 +00:00
|
|
|
|
int tipo_riclassificato() const;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
const TCodice_numerazione& codice_numerazione() const;
|
|
|
|
|
void set_tipo(const char * tipo) { head().put("TIPODOC", tipo);}
|
|
|
|
|
bool provvisorio() const { return get_char("PROVV") == 'P'; }
|
|
|
|
|
char stato() const { return get_char("STATO"); }
|
|
|
|
|
void stato(char s) { put("STATO", s); }
|
|
|
|
|
const TString & codice_costo() const { return get(DOC_CODCOSTO);}
|
|
|
|
|
const TString & codice_commessa() const { return get(DOC_CODCMS);}
|
2006-05-04 17:44:58 +00:00
|
|
|
|
const TString & commessa_principale() const;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
const TString & fase_commessa() const { return get(DOC_FASCMS);}
|
|
|
|
|
bool modificabile() const;
|
|
|
|
|
bool cancellabile() const;
|
|
|
|
|
bool stampabile() const;
|
|
|
|
|
bool bloccato() const;
|
2007-03-07 11:36:57 +00:00
|
|
|
|
bool chiuso() const;
|
|
|
|
|
bool sospeso() const { return !chiuso();}
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
bool raggruppabile() const { return get_bool("RAGGR"); }
|
|
|
|
|
bool raggruppabile(const TDocumento& doc, TToken_string& campi) const;
|
|
|
|
|
|
|
|
|
|
char tipocf() const {return *(const char *) (*_tipocf);}
|
|
|
|
|
long codcf() const {return (long) *_codcf;}
|
|
|
|
|
const char * cod_occas() const { return (const char *) *_cod_occas; }
|
|
|
|
|
|
|
|
|
|
static void set_key(TRectype& rec, char provv, int anno, const char* codnum, long numdoc);
|
|
|
|
|
static void copy_data(TRectype& dst, const TRectype& src);
|
|
|
|
|
static void copy_data(TRiga_documento& dst, const TRiga_documento& src);
|
2006-04-18 16:26:03 +00:00
|
|
|
|
void copy_contents(const TDocumento& src, bool copy_header = true);
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
void set_fields(TAuto_variable_rectype & rec);
|
|
|
|
|
void set_riga_esenzione();
|
|
|
|
|
|
|
|
|
|
void iva_esente(TString & codiva_es) const;
|
2007-09-18 14:25:15 +00:00
|
|
|
|
real spese_incasso(real &imp, int ndec, TTipo_importo netto = _lordo) const ;
|
|
|
|
|
real bolli(real & imp, int ndec, TTipo_importo netto = _lordo) const ;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
real imponibile(bool spese = FALSE, int ndec = AUTO_DECIMALS) const;
|
|
|
|
|
real imposta(bool spese = FALSE, int ndec = AUTO_DECIMALS) const;
|
|
|
|
|
real totale_doc() const;
|
|
|
|
|
real totale_netto() const;
|
|
|
|
|
real basesconto() const;
|
|
|
|
|
real spese() const;
|
2004-06-04 11:20:51 +00:00
|
|
|
|
real ritenute(const char tipo = '\0', bool lordo = false, int ndec = AUTO_DECIMALS) const;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
real provvigione(int ndec = AUTO_DECIMALS) const;
|
2008-11-12 11:25:59 +00:00
|
|
|
|
real valore(bool totale, bool lordo = false, int ndec = AUTO_DECIMALS) const;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
TPagamento & pagamento();
|
|
|
|
|
|
|
|
|
|
void update_spese_aut(TString_array & spese, bool preserve_old = FALSE, TSheet_field * sh = NULL);
|
|
|
|
|
real calc_conai_qta(int type);
|
|
|
|
|
void update_conai();
|
|
|
|
|
|
|
|
|
|
bool is_generic() const { return tipo_valido() && tipo().is_generic(); }
|
|
|
|
|
bool is_fattura() const { return tipo_valido() && tipo().is_fattura(); }
|
|
|
|
|
bool is_bolla() const { return tipo_valido() && tipo().is_bolla(); }
|
|
|
|
|
bool is_ordine() const { return tipo_valido() && tipo().is_ordine(); }
|
|
|
|
|
bool is_evaso() const;
|
|
|
|
|
bool is_nota_credito() const;
|
|
|
|
|
|
2008-08-27 23:23:05 +00:00
|
|
|
|
const TString & codesiva() const;
|
|
|
|
|
void get_protocolli_esenzione(TString & esenzione, TString & data_esenzione,
|
|
|
|
|
TString & registrazione, TString & data_registrazione) const;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TDocumento ();
|
|
|
|
|
TDocumento (const TDocumento & d);
|
|
|
|
|
TDocumento(char provv, int anno, const char* codnum, long numdoc);
|
|
|
|
|
TDocumento(const TRectype& doc);
|
|
|
|
|
virtual ~TDocumento();
|
|
|
|
|
};
|
1996-08-08 09:24:17 +00:00
|
|
|
|
|
2000-05-05 15:25:49 +00:00
|
|
|
|
class TCurrency_documento : public TCurrency
|
|
|
|
|
{
|
|
|
|
|
protected:
|
2005-08-23 08:54:32 +00:00
|
|
|
|
void copy(const TCurrency& cur) {TCurrency::copy(cur); }
|
2000-05-05 15:25:49 +00:00
|
|
|
|
|
|
|
|
|
public:
|
2005-08-23 08:54:32 +00:00
|
|
|
|
const TCurrency_documento& operator=(const TCurrency_documento& cur) { copy(cur); return *this; }
|
|
|
|
|
const TCurrency_documento& operator=(const TCurrency& cur) { copy(cur); return *this; }
|
2000-05-05 15:25:49 +00:00
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TCurrency_documento(const TCurrency& cur) { copy(cur); }
|
|
|
|
|
TCurrency_documento(const TCurrency_documento& cur) { copy(cur); }
|
|
|
|
|
TCurrency_documento(const real& num, const TDocumento &doc, bool price = FALSE);
|
|
|
|
|
virtual ~TCurrency_documento() { }
|
2000-05-05 15:25:49 +00:00
|
|
|
|
};
|
|
|
|
|
|
1998-11-04 18:04:26 +00:00
|
|
|
|
class TCodgiac_livelli;
|
|
|
|
|
|
2008-06-11 11:31:27 +00:00
|
|
|
|
class TStati : public TObject
|
|
|
|
|
{
|
|
|
|
|
char _iniziale;
|
|
|
|
|
char _finale;
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
char iniziale() const { return _iniziale;}
|
|
|
|
|
char finale() const { return _finale;}
|
|
|
|
|
|
|
|
|
|
TStati(char iniziale, char finale) { _iniziale = iniziale; _finale = finale;}
|
|
|
|
|
virtual ~TStati() { }
|
|
|
|
|
};
|
|
|
|
|
|
Patch level : 10.0 220
Files correlati : ve0.exe lv3.exe co0.exe
Ricompilazione Demo : [ ]
Commento :
Implementata la possibilità di colorare le righe dei documenti definendo nella maschera (file maschera.ini) delle regle come quelle sottoesposte ;
RuleName(1) = Merce Cara
Rule(1) = PREZZO>1000|N
BgCol(1) = 0,192,192
FgCol(1) = 0,0,0
RuleName(2) = Merce Carissima
Rule(2) = PREZZO>10000|N
BgCol(2) = 0,0,192
FgCol(2) = 0,0,0
RuleName(3) = Riga vuota
Rule(3) = STR(TIPORIGA!="05")&&(QTA==0)&&(PREZZO==0)|N
BgCol(3) = 128,0,128
FgCol(3) = 255,255,255
I nnumeri di riga cominciano da 1, nella regola !N significa formula numerica, i colori sono definiti come r,g,b. Si possono utilizzare campi della maschera di riga (#id camop) DELLATESTATA (#-campo) della testata documento (33.nomecampo) della riga documeno (34.nome campo) e DIRTY che significa riga modificata
git-svn-id: svn://10.65.10.50/trunk@18205 c028cbd2-c16b-5b4b-a496-9718f37d4682
2009-02-05 14:39:36 +00:00
|
|
|
|
class TRow_colors : public TObject
|
|
|
|
|
{
|
|
|
|
|
COLOR _back;
|
|
|
|
|
COLOR _fore;
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
virtual TObject* dup() const { return new TRow_colors(*this); }
|
|
|
|
|
virtual TRow_colors & copy(const TRow_colors & c) { set(c.back(), c.fore()); return *this; }
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
void set(COLOR back, COLOR fore) { _back = back; _fore = fore;}
|
|
|
|
|
COLOR back() const { return _back; }
|
|
|
|
|
COLOR fore() const { return _fore; }
|
|
|
|
|
|
|
|
|
|
TRow_colors(COLOR back, COLOR fore) { set(back, fore);}
|
|
|
|
|
~TRow_colors() {}
|
|
|
|
|
};
|
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
class TDocumento_mask : public TVariable_mask // velib06
|
1996-09-26 15:37:19 +00:00
|
|
|
|
{
|
2005-08-23 08:54:32 +00:00
|
|
|
|
int _progs_page; // pagina in cui cominciano i progressivi
|
|
|
|
|
TSheet_field* _sheet; // Spreadsheet
|
|
|
|
|
TDocumento _doc; // documento
|
|
|
|
|
TCodgiac_livelli * _livelli_giac; // livelli di giacenza
|
|
|
|
|
|
|
|
|
|
TCond_vendita* _condv; // condizioni di vendita
|
|
|
|
|
TAssoc_array _maskriga; // Maschere delle righe
|
2004-11-30 22:02:59 +00:00
|
|
|
|
TPointer_array _handlers;
|
|
|
|
|
TBit_array _calculated_pages;
|
1998-08-25 18:07:30 +00:00
|
|
|
|
|
2007-05-30 16:46:56 +00:00
|
|
|
|
bool _ges_mag, _ges_dep, _ges_ca;
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TString _std_mag, _std_dep;
|
2004-11-30 22:02:59 +00:00
|
|
|
|
TSmart_card * _smartcard;
|
2008-06-11 11:31:27 +00:00
|
|
|
|
static TAssoc_array _father_rows;
|
|
|
|
|
static TAssoc_array _auto_reopen_nums;
|
|
|
|
|
static TAssoc_array _tipidoc_rels;
|
2007-11-16 13:46:49 +00:00
|
|
|
|
short _cdc_start;
|
|
|
|
|
short _cdc_end;
|
|
|
|
|
short _cms_start;
|
|
|
|
|
short _cms_end;
|
|
|
|
|
short _cdc_start_sh;
|
|
|
|
|
short _cdc_end_sh;
|
|
|
|
|
short _cms_start_sh;
|
|
|
|
|
short _cms_end_sh;
|
|
|
|
|
TString _codcms;
|
|
|
|
|
TString _codcms_sh;
|
Patch level : 10.0 220
Files correlati : ve0.exe lv3.exe co0.exe
Ricompilazione Demo : [ ]
Commento :
Implementata la possibilità di colorare le righe dei documenti definendo nella maschera (file maschera.ini) delle regle come quelle sottoesposte ;
RuleName(1) = Merce Cara
Rule(1) = PREZZO>1000|N
BgCol(1) = 0,192,192
FgCol(1) = 0,0,0
RuleName(2) = Merce Carissima
Rule(2) = PREZZO>10000|N
BgCol(2) = 0,0,192
FgCol(2) = 0,0,0
RuleName(3) = Riga vuota
Rule(3) = STR(TIPORIGA!="05")&&(QTA==0)&&(PREZZO==0)|N
BgCol(3) = 128,0,128
FgCol(3) = 255,255,255
I nnumeri di riga cominciano da 1, nella regola !N significa formula numerica, i colori sono definiti come r,g,b. Si possono utilizzare campi della maschera di riga (#id camop) DELLATESTATA (#-campo) della testata documento (33.nomecampo) della riga documeno (34.nome campo) e DIRTY che significa riga modificata
git-svn-id: svn://10.65.10.50/trunk@18205 c028cbd2-c16b-5b4b-a496-9718f37d4682
2009-02-05 14:39:36 +00:00
|
|
|
|
TArray _colors;
|
|
|
|
|
TArray _def_colors;
|
|
|
|
|
TArray _color_rules;
|
|
|
|
|
TString_array _color_rule_names;
|
1996-09-26 15:37:19 +00:00
|
|
|
|
|
|
|
|
|
protected:
|
2005-08-23 08:54:32 +00:00
|
|
|
|
virtual void next_page(int p);
|
|
|
|
|
virtual void start_run();
|
|
|
|
|
void sconto_testa2mask();
|
|
|
|
|
void spese2mask();
|
|
|
|
|
|
2007-03-07 11:36:57 +00:00
|
|
|
|
void configura_sheet(TSheet_field& sheet);
|
|
|
|
|
static TMask* ss_getmask(int numriga, TMask& fullmask);
|
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
int insert_anal_fields(TMask& m, int page, int lf, int& y, short& dlg, short& dlgd, bool required);
|
|
|
|
|
void insert_anal_page();
|
|
|
|
|
|
2007-03-07 11:36:57 +00:00
|
|
|
|
public:
|
|
|
|
|
virtual bool is_omaggio_enabled() { return true;}
|
|
|
|
|
void update_progs(bool stop_run = false);
|
2008-08-27 23:23:05 +00:00
|
|
|
|
TAssoc_array & maskrighe() {return _maskriga;}
|
2007-03-07 11:36:57 +00:00
|
|
|
|
virtual bool on_key(KEY key);
|
|
|
|
|
virtual bool stop_run(KEY key);
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
void set_field_handler(short fieldid, CONTROL_HANDLER handler);
|
|
|
|
|
bool call_handler( TMask_field& f, KEY key);
|
2004-11-30 22:02:59 +00:00
|
|
|
|
|
|
|
|
|
static bool universal_handler( TMask_field& f, KEY key);
|
|
|
|
|
static bool occas_handler( TMask_field& f, KEY key );
|
2005-08-23 08:54:32 +00:00
|
|
|
|
static bool occas_code_handler( TMask_field& f, KEY key );
|
2008-03-26 11:24:36 +00:00
|
|
|
|
static bool occas_cfpi_handler( TMask_field& f, KEY key );
|
2005-08-23 08:54:32 +00:00
|
|
|
|
static bool clifo_handler( TMask_field& f, KEY key );
|
|
|
|
|
static bool print_handler( TMask_field& f, KEY key );
|
|
|
|
|
static bool elabora_handler( TMask_field& f, KEY key );
|
|
|
|
|
static bool codlist_handler( TMask_field& f, KEY key );
|
|
|
|
|
static bool codcont_handler( TMask_field& f, KEY key );
|
|
|
|
|
static bool codcamp_handler( TMask_field& f, KEY key );
|
|
|
|
|
static bool datacambio_handler( TMask_field& f, KEY key );
|
|
|
|
|
static bool codval_handler( TMask_field& f, KEY key );
|
2008-06-11 11:31:27 +00:00
|
|
|
|
static bool confirm_handler( TMask_field& f, KEY key );
|
2007-02-01 15:19:17 +00:00
|
|
|
|
static bool ss_notify(TSheet_field& ss, int r, KEY key);
|
|
|
|
|
static bool ss_handler(TMask_field& f, KEY key);
|
2008-12-04 10:19:38 +00:00
|
|
|
|
virtual void user_set_handler( short fieldid, int index);
|
|
|
|
|
virtual void user_set_row_handler(TMask& rm, short field, int index);
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
|
|
|
|
void reset_masks(const TString& tipo_doc);
|
|
|
|
|
TVariable_mask* riga_mask(int numriga);
|
1997-06-12 16:26:22 +00:00
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TDocumento& doc() { return _doc; }
|
|
|
|
|
const TDocumento& doc() const { return _doc; }
|
|
|
|
|
TCond_vendita & condv() const;
|
1998-08-25 18:07:30 +00:00
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
void occ2mask();
|
|
|
|
|
void cli2mask();
|
|
|
|
|
void doc2mask(bool reload_clifo = true);
|
|
|
|
|
void mask2doc();
|
1998-08-25 18:07:30 +00:00
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
void update_giacenza();
|
1999-04-26 15:58:05 +00:00
|
|
|
|
|
2008-06-11 11:31:27 +00:00
|
|
|
|
static TAssoc_array & auto_reopen_nums() { return _auto_reopen_nums;}
|
|
|
|
|
static TAssoc_array & tipidoc_rels() { return _tipidoc_rels;}
|
2008-11-14 14:40:28 +00:00
|
|
|
|
const TAssoc_array & father_rows() const { return _father_rows;}
|
2008-06-11 11:31:27 +00:00
|
|
|
|
void reset_father_rows() {_father_rows.destroy();}
|
|
|
|
|
void update_father_rows(bool add = true);
|
|
|
|
|
void save_father_rows();
|
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
const TString& stdmag() const { return _std_mag; }
|
|
|
|
|
const TString& stddep() const { return _std_dep; }
|
1998-08-25 18:07:30 +00:00
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TSheet_field& sheet() const { return *_sheet; }
|
|
|
|
|
TCodgiac_livelli& livelli() const { return *_livelli_giac; }
|
|
|
|
|
static bool anno_handler( TMask_field& f, KEY key);
|
|
|
|
|
static bool num_handler( TMask_field& f, KEY key );
|
|
|
|
|
static bool numdocrif_search_handler( TMask_field& f, KEY key );
|
|
|
|
|
static bool ragsoc_search_handler( TMask_field& f, KEY key );
|
|
|
|
|
static bool datadocrif_handler(TMask_field& f, KEY key);
|
2004-11-30 22:02:59 +00:00
|
|
|
|
|
Patch level : 10.0 220
Files correlati : ve0.exe lv3.exe co0.exe
Ricompilazione Demo : [ ]
Commento :
Implementata la possibilità di colorare le righe dei documenti definendo nella maschera (file maschera.ini) delle regle come quelle sottoesposte ;
RuleName(1) = Merce Cara
Rule(1) = PREZZO>1000|N
BgCol(1) = 0,192,192
FgCol(1) = 0,0,0
RuleName(2) = Merce Carissima
Rule(2) = PREZZO>10000|N
BgCol(2) = 0,0,192
FgCol(2) = 0,0,0
RuleName(3) = Riga vuota
Rule(3) = STR(TIPORIGA!="05")&&(QTA==0)&&(PREZZO==0)|N
BgCol(3) = 128,0,128
FgCol(3) = 255,255,255
I nnumeri di riga cominciano da 1, nella regola !N significa formula numerica, i colori sono definiti come r,g,b. Si possono utilizzare campi della maschera di riga (#id camop) DELLATESTATA (#-campo) della testata documento (33.nomecampo) della riga documeno (34.nome campo) e DIRTY che significa riga modificata
git-svn-id: svn://10.65.10.50/trunk@18205 c028cbd2-c16b-5b4b-a496-9718f37d4682
2009-02-05 14:39:36 +00:00
|
|
|
|
void highlight_row(int row, bool dirty = true, bool update = true);
|
|
|
|
|
void highlight();
|
2005-08-23 08:54:32 +00:00
|
|
|
|
|
2007-02-01 15:19:17 +00:00
|
|
|
|
bool is_calculated_page(int p) const { return _calculated_pages[p]; }
|
|
|
|
|
TSmart_card* smartcard() const { return _smartcard;}
|
2004-11-30 22:02:59 +00:00
|
|
|
|
|
2007-11-16 13:46:49 +00:00
|
|
|
|
short cdc_start() const { return _cdc_start;}
|
|
|
|
|
short cdc_end() const { return _cdc_end;}
|
|
|
|
|
short cms_start() const { return _cms_start;}
|
|
|
|
|
short cms_end() const { return _cms_end;}
|
|
|
|
|
short cdc_start_sh() const { return _cdc_start_sh;}
|
|
|
|
|
short cdc_end_sh() const { return _cdc_end_sh;}
|
|
|
|
|
short cms_start_sh() const { return _cms_start_sh;}
|
|
|
|
|
short cms_end_sh() const { return _cms_end_sh;}
|
|
|
|
|
TString & codcms() { return _codcms;}
|
|
|
|
|
const TString & codcms() const { return _codcms;}
|
|
|
|
|
TString & codcms_sh() { return _codcms_sh;}
|
|
|
|
|
const TString & codcms_sh() const { return _codcms_sh;}
|
|
|
|
|
|
Patch level : 10.0 220
Files correlati : ve0.exe lv3.exe co0.exe
Ricompilazione Demo : [ ]
Commento :
Implementata la possibilità di colorare le righe dei documenti definendo nella maschera (file maschera.ini) delle regle come quelle sottoesposte ;
RuleName(1) = Merce Cara
Rule(1) = PREZZO>1000|N
BgCol(1) = 0,192,192
FgCol(1) = 0,0,0
RuleName(2) = Merce Carissima
Rule(2) = PREZZO>10000|N
BgCol(2) = 0,0,192
FgCol(2) = 0,0,0
RuleName(3) = Riga vuota
Rule(3) = STR(TIPORIGA!="05")&&(QTA==0)&&(PREZZO==0)|N
BgCol(3) = 128,0,128
FgCol(3) = 255,255,255
I nnumeri di riga cominciano da 1, nella regola !N significa formula numerica, i colori sono definiti come r,g,b. Si possono utilizzare campi della maschera di riga (#id camop) DELLATESTATA (#-campo) della testata documento (33.nomecampo) della riga documeno (34.nome campo) e DIRTY che significa riga modificata
git-svn-id: svn://10.65.10.50/trunk@18205 c028cbd2-c16b-5b4b-a496-9718f37d4682
2009-02-05 14:39:36 +00:00
|
|
|
|
TArray & colors() { return _colors; }
|
|
|
|
|
TArray & color_rules() { return _color_rules; }
|
|
|
|
|
TString_array & color_rule_names() { return _color_rule_names; }
|
|
|
|
|
void sel_color();
|
|
|
|
|
|
|
|
|
|
|
2005-08-23 08:54:32 +00:00
|
|
|
|
TDocumento_mask(const char* tipodoc);
|
|
|
|
|
virtual ~TDocumento_mask();
|
1996-09-26 15:37:19 +00:00
|
|
|
|
};
|
|
|
|
|
|
2008-08-27 23:23:05 +00:00
|
|
|
|
#endif
|