Patch level : 12.0
Files correlati : NO patch git-svn-id: svn://10.65.10.50/branches/R_10_00@23954 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
44940f556f
commit
2a38f5b1ed
336
src/cg/cg4400.h
336
src/cg/cg4400.h
@ -1,169 +1,169 @@
|
||||
//
|
||||
// cg4400.h
|
||||
//
|
||||
#include <printapp.h>
|
||||
#include <mask.h>
|
||||
|
||||
#include "cglib03.h"
|
||||
|
||||
enum messaggio {
|
||||
no_liquidazione,
|
||||
B0_settato,
|
||||
non_proseguire,
|
||||
prosegui_stampa,
|
||||
prosegui_cal_stampa
|
||||
};
|
||||
|
||||
enum tipo_stampa {
|
||||
prova = 1,
|
||||
bollato = 2,
|
||||
libro_unico = 3,
|
||||
rif_giornale = 4
|
||||
};
|
||||
|
||||
enum tiporeg {
|
||||
vendita = 1,
|
||||
acquisto = 2,
|
||||
riepilogativo = 3,
|
||||
incassi = 4,
|
||||
giornale = 5,
|
||||
sociale = 6,
|
||||
cespiti = 7
|
||||
};
|
||||
|
||||
class TStampa_registri_app : public TPrintapp
|
||||
{
|
||||
TSorted_cursor * _cur;
|
||||
TRelation *_rel, *_nditte;
|
||||
TTable *_tabreg;
|
||||
TRigaiva_array _iva_array, _riga_rmi;
|
||||
TRiga_array _riga_prospettoXcassa, _riga_split;
|
||||
TTipodoc_array _doc_array;
|
||||
TRiga_array _tot_iva_array, _tot_prec_iva_array;
|
||||
TArray_sheet *_ditte;
|
||||
TString_array _nomiditte;
|
||||
tiporeg _tipo_reg;
|
||||
bool _st_liq[13];
|
||||
bool _test;
|
||||
bool _mov_empty, _stampa_ind_ditta, _stampa_tutti_i_registri, _auto_intraf, _stampa, _stampa_plafonds;
|
||||
bool _corrispettivi, _liquidazione, _stampa_ind_comp, _esiste_riga_iva, _stampa_cred_pre;
|
||||
bool _rif_vid, _intesta_vidi, _intesta_liq, _stampa_data_reg, _ok_vidi, _stampa_num_pag;
|
||||
bool _sosp_imposta, _riep_liq;
|
||||
bool _st_tot_fin;
|
||||
bool _riporti, _totali_stampati;
|
||||
char _frequiva, _tipo_riepilogativo, _freq_riepilogo;
|
||||
TDate _data_da, _data_a, _data_stampa, _dataregp, _dataregs, _datareg;
|
||||
TDate _u_data;
|
||||
long _u_stampata, _primast, __firm, _uprotivap, _ditta;
|
||||
long _numini, _pagine_stampate;
|
||||
int _fino_a_mese, _cod_un_loc;
|
||||
int _annoes, _r, _stampa_width, _mese_ultima_liq, _mese_credito;
|
||||
int _stampa_len, _stampa_mese, _size_header;
|
||||
real _totale_doc, _credito;
|
||||
real _totdoc_prog, _totimpn_prog, _totimps_prog; //totali progressivi
|
||||
real _progr_doc, _progr_impn, _progr_imps; //progressivi movimenti (servono x totali progressivi)
|
||||
word _rows_left; //flag di controllo per i progressivi a cavallo del salto pagina
|
||||
TString _codreg, _desc_lib, _codatt, _attivita, _tipoatt;
|
||||
TString _tipodoc, _descr_doc, _codlib, _codice_vidi;
|
||||
TString _cofi,_cap,_paiva,_ragsoc,_comunefis,_provfis,_viafis;
|
||||
TString _tabname;
|
||||
TFilename _t;
|
||||
bool _isviaggio;
|
||||
|
||||
messaggio _scelta;
|
||||
tipo_stampa _tipo_stampa;
|
||||
|
||||
protected:
|
||||
|
||||
static bool filter_func (const TRelation * r);
|
||||
static bool mask_tipo_stampa (TMask_field&, KEY);
|
||||
static bool to_ditt_handler (TMask_field&, KEY);
|
||||
static bool fr_ditt_handler (TMask_field&, KEY);
|
||||
static bool mask_cod (TMask_field&, KEY);
|
||||
static bool mask_libun (TMask_field&, KEY);
|
||||
static bool mask_data (TMask_field&, KEY);
|
||||
static bool mask_mese (TMask_field&, KEY);
|
||||
static bool mask_fino_a_mese (TMask_field&, KEY);
|
||||
static bool mask_azzera (TMask_field&, KEY);
|
||||
static bool year_freq_handler(TMask_field&, KEY);
|
||||
|
||||
public:
|
||||
|
||||
const char* desc_attivita (const TString&);
|
||||
const char* tipo_attivita ();
|
||||
const char* descr_doc ();
|
||||
const char* descr_iva (const char*);
|
||||
const TRectype& ricerca_occ(const char*);
|
||||
const TRectype& ricerca_cf (char, long);
|
||||
const TRectype& look_comuni(const TString& stato, const TString& cod);
|
||||
const TRectype& look_comuni(const char* cod);
|
||||
TArray_sheet* get_ditte_sheet() { return _ditte; }
|
||||
int setta_riga (int, const TRigaiva&, real&, real&, real&, real&);
|
||||
int riga_rmoviva();
|
||||
bool set_print(int);
|
||||
bool set_ditte(TMask&);
|
||||
bool compila_reg(const TMask&);
|
||||
bool compila_lib();
|
||||
messaggio controlla_liquidazione();
|
||||
messaggio controlla_b0();
|
||||
bool is_mese_ok(int,int);
|
||||
bool controlla_mov();
|
||||
bool stampo_liquidazione(int);
|
||||
bool ventilazione(const char*);
|
||||
bool cerca_libro_gio(TDate&, bool&);
|
||||
bool look_reg (int, int, const TString&, int, const char*, int*, long);
|
||||
bool look_regs(int, const TString&, int, int*, long, TProgind*);
|
||||
bool stampa_totali_finali();
|
||||
bool stampa_datareg();
|
||||
bool stampa_registri_IVA(const TMask&);
|
||||
const TRectype &look_lia(long ditta = 0l);
|
||||
bool ricalcola(int);
|
||||
bool stampa_riepilogo(int);
|
||||
void stampa_prospetto_riepilogo(tiporeg, const TString&, const TString&, const bool);
|
||||
void stampa_progressivi(TRiga_array&, TRigaiva_array&, tiporeg, const bool);
|
||||
void set_choice_limits(TMask&);
|
||||
void build_ditte_sheet(int flags);
|
||||
tiporeg cerca_reg(const TString&);
|
||||
//
|
||||
// cg4400.h
|
||||
//
|
||||
#include <printapp.h>
|
||||
#include <mask.h>
|
||||
|
||||
#include "cglib03.h"
|
||||
|
||||
enum messaggio {
|
||||
no_liquidazione,
|
||||
B0_settato,
|
||||
non_proseguire,
|
||||
prosegui_stampa,
|
||||
prosegui_cal_stampa
|
||||
};
|
||||
|
||||
enum tipo_stampa {
|
||||
prova = 1,
|
||||
bollato = 2,
|
||||
libro_unico = 3,
|
||||
rif_giornale = 4
|
||||
};
|
||||
|
||||
enum tiporeg {
|
||||
vendita = 1,
|
||||
acquisto = 2,
|
||||
riepilogativo = 3,
|
||||
incassi = 4,
|
||||
giornale = 5,
|
||||
sociale = 6,
|
||||
cespiti = 7
|
||||
};
|
||||
|
||||
class TStampa_registri_app : public TPrintapp
|
||||
{
|
||||
TSorted_cursor * _cur;
|
||||
TRelation *_rel, *_nditte;
|
||||
TTable *_tabreg;
|
||||
TRigaiva_array _iva_array, _riga_rmi;
|
||||
TRiga_array _riga_prospettoXcassa, _riga_split;
|
||||
TTipodoc_array _doc_array;
|
||||
TRiga_array _tot_iva_array, _tot_prec_iva_array;
|
||||
TArray_sheet *_ditte;
|
||||
TString_array _nomiditte;
|
||||
tiporeg _tipo_reg;
|
||||
bool _st_liq[13];
|
||||
bool _test;
|
||||
bool _mov_empty, _stampa_ind_ditta, _stampa_tutti_i_registri, _auto_intraf, _stampa, _stampa_plafonds;
|
||||
bool _corrispettivi, _liquidazione, _stampa_ind_comp, _esiste_riga_iva, _stampa_cred_pre;
|
||||
bool _rif_vid, _intesta_vidi, _intesta_liq, _stampa_data_reg, _ok_vidi, _stampa_num_pag;
|
||||
bool _sosp_imposta, _riep_liq;
|
||||
bool _st_tot_fin;
|
||||
bool _riporti, _totali_stampati;
|
||||
char _frequiva, _tipo_riepilogativo, _freq_riepilogo;
|
||||
TDate _data_da, _data_a, _data_stampa, _dataregp, _dataregs, _datareg;
|
||||
TDate _u_data;
|
||||
long _u_stampata, _primast, __firm, _uprotivap, _ditta;
|
||||
long _numini, _pagine_stampate;
|
||||
int _fino_a_mese, _cod_un_loc;
|
||||
int _annoes, _r, _stampa_width, _mese_ultima_liq, _mese_credito;
|
||||
int _stampa_len, _stampa_mese, _size_header;
|
||||
real _totale_doc, _credito;
|
||||
real _totdoc_prog, _totimpn_prog, _totimps_prog; //totali progressivi
|
||||
real _progr_doc, _progr_impn, _progr_imps; //progressivi movimenti (servono x totali progressivi)
|
||||
word _rows_left; //flag di controllo per i progressivi a cavallo del salto pagina
|
||||
TString _codreg, _desc_lib, _codatt, _attivita, _tipoatt;
|
||||
TString _tipodoc, _descr_doc, _codlib, _codice_vidi;
|
||||
TString _cofi,_cap,_paiva,_ragsoc,_comunefis,_provfis,_viafis;
|
||||
TString _tabname;
|
||||
TFilename _t;
|
||||
bool _isviaggio;
|
||||
|
||||
messaggio _scelta;
|
||||
tipo_stampa _tipo_stampa;
|
||||
|
||||
protected:
|
||||
|
||||
static bool filter_func (const TRelation * r);
|
||||
static bool mask_tipo_stampa (TMask_field&, KEY);
|
||||
static bool to_ditt_handler (TMask_field&, KEY);
|
||||
static bool fr_ditt_handler (TMask_field&, KEY);
|
||||
static bool mask_cod (TMask_field&, KEY);
|
||||
static bool mask_libun (TMask_field&, KEY);
|
||||
static bool mask_data (TMask_field&, KEY);
|
||||
static bool mask_mese (TMask_field&, KEY);
|
||||
static bool mask_fino_a_mese (TMask_field&, KEY);
|
||||
static bool mask_azzera (TMask_field&, KEY);
|
||||
static bool year_freq_handler(TMask_field&, KEY);
|
||||
|
||||
public:
|
||||
|
||||
const char* desc_attivita (const TString&);
|
||||
const char* tipo_attivita ();
|
||||
const char* descr_doc ();
|
||||
const char* descr_iva (const char*);
|
||||
const TRectype& ricerca_occ(const char*);
|
||||
const TRectype& ricerca_cf (char, long);
|
||||
const TRectype& look_comuni(const TString& stato, const TString& cod);
|
||||
const TRectype& look_comuni(const char* cod);
|
||||
TArray_sheet* get_ditte_sheet() { return _ditte; }
|
||||
int setta_riga (int, const TRigaiva&, real&, real&, real&, real&);
|
||||
int riga_rmoviva();
|
||||
bool set_print(int);
|
||||
bool set_ditte(TMask&);
|
||||
bool compila_reg(const TMask&);
|
||||
bool compila_lib();
|
||||
messaggio controlla_liquidazione();
|
||||
messaggio controlla_b0();
|
||||
bool is_mese_ok(int,int);
|
||||
bool controlla_mov();
|
||||
bool stampo_liquidazione(int);
|
||||
bool ventilazione(const char*);
|
||||
bool cerca_libro_gio(TDate&, bool&);
|
||||
bool look_reg (int, int, const TString&, int, const char*, int*, long);
|
||||
bool look_regs(int, const TString&, int, int*, long, TProgind*);
|
||||
bool stampa_totali_finali();
|
||||
bool stampa_datareg();
|
||||
bool stampa_registri_IVA(const TMask&);
|
||||
const TRectype &look_lia(long ditta = 0l);
|
||||
bool ricalcola(int);
|
||||
bool stampa_riepilogo(int);
|
||||
void stampa_prospetto_riepilogo(tiporeg, const TString&, const TString&, const bool);
|
||||
void stampa_progressivi(TRiga_array&, TRigaiva_array&, tiporeg, const bool);
|
||||
void set_choice_limits(TMask&);
|
||||
void build_ditte_sheet(int flags);
|
||||
tiporeg cerca_reg(const TString&);
|
||||
void fine_mese();
|
||||
void set_page_tot_reg();
|
||||
void send_message(char,const TFilename&,int);
|
||||
void aggiorna_reg(const bool aggiorna_vidi);
|
||||
void aggiorna_lib();
|
||||
void calcola_progressivi();
|
||||
void stampa_liq_mesi_succ();
|
||||
void look_reg();
|
||||
void no_movimenti();
|
||||
void liq_b0_settato();
|
||||
void liq_other_case();
|
||||
bool setta_mask(long);
|
||||
bool preprocess_page(int, int);
|
||||
int stampa_intestazione();
|
||||
int stampa_prospetto_IVA(int rr, int tipo);
|
||||
long select_firm_range(long,long);
|
||||
bool stampa_plafonds(int r, bool test_mode = FALSE);
|
||||
void get_dati_ditta();
|
||||
void stampa_vidi();
|
||||
void scrivi_reg(const TDate&);
|
||||
int stampa_acquisti(int);
|
||||
real stampa_valori_plafonds(const real&, const int, TTable&, const char*);
|
||||
|
||||
bool some_IVAxCassa(int da_month, int a_month) const; // C'e' IVA per cassa o differita da stampare?
|
||||
bool print_IVAxCassa(int da_month, int a_month);
|
||||
|
||||
void build_nomiditte();
|
||||
void set_year(int y) { if (_annoes != y) { _annoes = y; build_nomiditte(); } }
|
||||
void clear_stliq();
|
||||
virtual bool preprocess_print(int, int);
|
||||
virtual bool user_create();
|
||||
virtual bool user_destroy();
|
||||
virtual print_action postprocess_page (int, int);
|
||||
virtual void preprocess_header();
|
||||
virtual void preprocess_footer();
|
||||
virtual void on_page_printed(int file);
|
||||
|
||||
TStampa_registri_app() : TPrintapp(), _ditte(NULL), _nomiditte(100), _test(FALSE) {}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
void set_page_tot_reg();
|
||||
void send_message(char,const TFilename&,int);
|
||||
void aggiorna_reg(const bool aggiorna_vidi);
|
||||
void aggiorna_lib();
|
||||
void calcola_progressivi();
|
||||
void stampa_liq_mesi_succ();
|
||||
void look_reg();
|
||||
void no_movimenti();
|
||||
void liq_b0_settato();
|
||||
void liq_other_case();
|
||||
bool setta_mask(long);
|
||||
bool preprocess_page(int, int);
|
||||
int stampa_intestazione();
|
||||
int stampa_prospetto_IVA(int rr, int tipo);
|
||||
long select_firm_range(long,long);
|
||||
bool stampa_plafonds(int r, bool test_mode = FALSE);
|
||||
void get_dati_ditta();
|
||||
void stampa_vidi();
|
||||
void scrivi_reg(const TDate&);
|
||||
int stampa_acquisti(int);
|
||||
real stampa_valori_plafonds(const real&, const int, TTable&, const char*);
|
||||
|
||||
bool some_IVAxCassa(int da_month, int a_month) const; // C'e' IVA per cassa o differita da stampare?
|
||||
bool print_IVAxCassa(int da_month, int a_month);
|
||||
|
||||
void build_nomiditte();
|
||||
void set_year(int y) { if (_annoes != y) { _annoes = y; build_nomiditte(); } }
|
||||
void clear_stliq();
|
||||
virtual bool preprocess_print(int, int);
|
||||
virtual bool user_create();
|
||||
virtual bool user_destroy();
|
||||
virtual print_action postprocess_page (int, int);
|
||||
virtual void preprocess_header();
|
||||
virtual void preprocess_footer();
|
||||
virtual void on_page_printed(int file);
|
||||
|
||||
TStampa_registri_app() : TPrintapp(), _ditte(NULL), _nomiditte(100), _test(FALSE) {}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user