Vari errori corretti
git-svn-id: svn://10.65.10.50/trunk@1567 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ef951689fa
commit
e9a48cd2ea
1481
cg/cg4300.cpp
1481
cg/cg4300.cpp
File diff suppressed because it is too large
Load Diff
3420
cg/cg4301.cpp
3420
cg/cg4301.cpp
File diff suppressed because it is too large
Load Diff
3865
cg/cg4304.cpp
3865
cg/cg4304.cpp
File diff suppressed because it is too large
Load Diff
6690
cg/cg4400.cpp
6690
cg/cg4400.cpp
File diff suppressed because it is too large
Load Diff
318
cg/cg4400.h
318
cg/cg4400.h
@ -1,159 +1,159 @@
|
||||
//
|
||||
// cg4400.h
|
||||
//
|
||||
#include <isam.h>
|
||||
#include <printapp.h>
|
||||
#include <mask.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
#include <urldefid.h>
|
||||
#include <text.h>
|
||||
#include <mailbox.h>
|
||||
#include <execp.h>
|
||||
#include <sheet.h>
|
||||
#include <config.h>
|
||||
#include <prefix.h>
|
||||
#include <progind.h>
|
||||
#include <nditte.h>
|
||||
#include <anagr.h>
|
||||
#include <comuni.h>
|
||||
#include <unloc.h>
|
||||
#include <mov.h>
|
||||
#include <rmoviva.h>
|
||||
#include <clifo.h>
|
||||
#include <occas.h>
|
||||
#include <causali.h>
|
||||
#include "cglib03.h"
|
||||
#include "cglib04.h"
|
||||
#include "conto.h"
|
||||
|
||||
enum messaggio {
|
||||
no_liquidazione,
|
||||
B0_settato,
|
||||
non_proseguire,
|
||||
prosegui_stampa,
|
||||
prosegui_cal_stampa
|
||||
};
|
||||
|
||||
class CG4400_application : public TPrintapp
|
||||
{
|
||||
TCursor * _cur;
|
||||
TRelation *_rel, *_nditte;
|
||||
TLocalisamfile *_clifo, *_occas, *_tab, *_tabcom, *_com, *_anag, *_unloc, *_attiv, *_indlib;
|
||||
TTable *_tabreg, *_tablbu, *_tablim, *_tabpim, *_tablia, *_tabiva;
|
||||
TTable *_tabpla, *_tabppa, *_tabvid;
|
||||
TRigaiva_array _iva_array, _riga_rmi;
|
||||
TTipodoc_array _doc_array;
|
||||
TRiga_array _tot_iva_array;
|
||||
TBit_array _selected;
|
||||
TArray_sheet *_ditte;
|
||||
TArray _nomiditte;
|
||||
bool _st_liq[13];
|
||||
bool _test;
|
||||
TRecnotype _nrec;
|
||||
bool _mov_empty, _stampa_ind_ditta, _stampa_tutti_i_registri, _auto_intraf, _stampa;
|
||||
bool _corrispettivi, _liquidazione, _riep_liq, _stampa_ind_comp, _esiste_riga_iva, _stampa_cred_pre;
|
||||
bool _rif_vid, _intesta_vidi, _intesta_liq, _stampa_data_reg, _ok_vidi;
|
||||
char _frequiva, _tipo_riepilogativo;
|
||||
TDate _data_da, _data_a, _data_stampa, _dataregp, _dataregs, _datareg;
|
||||
TDate _u_data;
|
||||
long _n_ditte, _u_stampata, _primast, __firm, _uprotivap, _ditta;
|
||||
long _numini, _pagine_stampate;
|
||||
int _fino_a_mese, _tipo_reg, _tipo_stampa, _cod_un_loc;
|
||||
int _annoes, _r, _stampa_width, _mese_ultima_liq, _mese_credito;
|
||||
int _stampa_len, _stampa_mese, _size_header;
|
||||
real _totale_doc, _credito;
|
||||
TString _codreg, _desc_lib, _codatt, _attivita, _tipoatt;
|
||||
TString _tipodoc, _descr_doc, _codlib, _codice_vidi;
|
||||
TString _cofi,_cap,_paiva,_ragsoc,_comunefis,_provfis,_viafis;
|
||||
TFilename _t;
|
||||
|
||||
TParagraph_string* _desc27;
|
||||
messaggio _scelta;
|
||||
|
||||
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 to_butt_handler (TMask_field&, KEY);
|
||||
static bool fr_butt_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_select (TMask_field&, KEY);
|
||||
static bool mask_azzera (TMask_field&, KEY);
|
||||
static bool year_handler (TMask_field&, KEY);
|
||||
|
||||
public:
|
||||
|
||||
const char* desc_attivita ();
|
||||
const char* tipo_attivita ();
|
||||
const char* descr_doc ();
|
||||
const char* descr_iva (const char *);
|
||||
TRectype& ricerca_occ(const char*);
|
||||
TRectype& ricerca_cf (char, long);
|
||||
TRectype& look_comuni(const char*);
|
||||
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 controlla_mov();
|
||||
bool stampo_liquidazione(int);
|
||||
bool ventilazione(const char*);
|
||||
bool cerca_libro_gio(TString&);
|
||||
bool look_reg (int, int, TString&, int, const char*, int*, long);
|
||||
bool look_regs(int, TString&, int, int*, long, bool*);
|
||||
bool stampa_totali_finali();
|
||||
bool stampa_datareg();
|
||||
bool stampa_registri_IVA(const TMask&);
|
||||
bool look_lia(long ditta = 0l);
|
||||
bool ricerca_mese(TString&,TString&,int,int,TMask_field&);
|
||||
void set_choice_limits(TMask&);
|
||||
void build_ditte_sheet();
|
||||
void cerca_reg(const TString&, byte*);
|
||||
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();
|
||||
long select_firm_range(long,long);
|
||||
void stampa_plafonds(int);
|
||||
void get_dati_ditta();
|
||||
void stampa_vidi();
|
||||
void scrivi_reg();
|
||||
int stampa_acquisti(int);
|
||||
real stampa_valori_plafonds(const real&, const int, TTable&, const char*);
|
||||
void build_nomiditte(TProgind* pnd = NULL);
|
||||
void set_year(int y) { _annoes = y; }
|
||||
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();
|
||||
|
||||
CG4400_application() : TPrintapp(), _ditte(NULL), _selected(10000), _nomiditte(100), _test(FALSE) {}
|
||||
virtual ~CG4400_application() {}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// cg4400.h
|
||||
//
|
||||
#include <isam.h>
|
||||
#include <printapp.h>
|
||||
#include <mask.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
#include <urldefid.h>
|
||||
#include <text.h>
|
||||
#include <mailbox.h>
|
||||
#include <execp.h>
|
||||
#include <sheet.h>
|
||||
#include <config.h>
|
||||
#include <prefix.h>
|
||||
#include <progind.h>
|
||||
#include <nditte.h>
|
||||
#include <anagr.h>
|
||||
#include <comuni.h>
|
||||
#include <unloc.h>
|
||||
#include <mov.h>
|
||||
#include <rmoviva.h>
|
||||
#include <clifo.h>
|
||||
#include <occas.h>
|
||||
#include <causali.h>
|
||||
#include "cglib03.h"
|
||||
#include "cglib04.h"
|
||||
#include "conto.h"
|
||||
|
||||
enum messaggio {
|
||||
no_liquidazione,
|
||||
B0_settato,
|
||||
non_proseguire,
|
||||
prosegui_stampa,
|
||||
prosegui_cal_stampa
|
||||
};
|
||||
|
||||
class CG4400_application : public TPrintapp
|
||||
{
|
||||
TCursor * _cur;
|
||||
TRelation *_rel, *_nditte;
|
||||
TLocalisamfile *_clifo, *_occas, *_tab, *_tabcom, *_com, *_anag, *_unloc, *_attiv, *_indlib;
|
||||
TTable *_tabreg, *_tablbu, *_tablim, *_tabpim, *_tablia, *_tabiva;
|
||||
TTable *_tabpla, *_tabppa, *_tabvid;
|
||||
TRigaiva_array _iva_array, _riga_rmi;
|
||||
TTipodoc_array _doc_array;
|
||||
TRiga_array _tot_iva_array;
|
||||
TBit_array _selected;
|
||||
TArray_sheet *_ditte;
|
||||
TArray _nomiditte;
|
||||
bool _st_liq[13];
|
||||
bool _test;
|
||||
TRecnotype _nrec;
|
||||
bool _mov_empty, _stampa_ind_ditta, _stampa_tutti_i_registri, _auto_intraf, _stampa;
|
||||
bool _corrispettivi, _liquidazione, _riep_liq, _stampa_ind_comp, _esiste_riga_iva, _stampa_cred_pre;
|
||||
bool _rif_vid, _intesta_vidi, _intesta_liq, _stampa_data_reg, _ok_vidi;
|
||||
char _frequiva, _tipo_riepilogativo;
|
||||
TDate _data_da, _data_a, _data_stampa, _dataregp, _dataregs, _datareg;
|
||||
TDate _u_data;
|
||||
long _n_ditte, _u_stampata, _primast, __firm, _uprotivap, _ditta;
|
||||
long _numini, _pagine_stampate;
|
||||
int _fino_a_mese, _tipo_reg, _tipo_stampa, _cod_un_loc;
|
||||
int _annoes, _r, _stampa_width, _mese_ultima_liq, _mese_credito;
|
||||
int _stampa_len, _stampa_mese, _size_header;
|
||||
real _totale_doc, _credito;
|
||||
TString _codreg, _desc_lib, _codatt, _attivita, _tipoatt;
|
||||
TString _tipodoc, _descr_doc, _codlib, _codice_vidi;
|
||||
TString _cofi,_cap,_paiva,_ragsoc,_comunefis,_provfis,_viafis;
|
||||
TFilename _t;
|
||||
|
||||
TParagraph_string* _desc27;
|
||||
messaggio _scelta;
|
||||
|
||||
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 to_butt_handler (TMask_field&, KEY);
|
||||
static bool fr_butt_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_select (TMask_field&, KEY);
|
||||
static bool mask_azzera (TMask_field&, KEY);
|
||||
static bool year_handler (TMask_field&, KEY);
|
||||
|
||||
public:
|
||||
|
||||
const char* desc_attivita ();
|
||||
const char* tipo_attivita ();
|
||||
const char* descr_doc ();
|
||||
const char* descr_iva (const char *);
|
||||
TRectype& ricerca_occ(const char*);
|
||||
TRectype& ricerca_cf (char, long);
|
||||
TRectype& look_comuni(const char*);
|
||||
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 controlla_mov();
|
||||
bool stampo_liquidazione(int);
|
||||
bool ventilazione(const char*);
|
||||
bool cerca_libro_gio(TString&, bool*);
|
||||
bool look_reg (int, int, TString&, int, const char*, int*, long);
|
||||
bool look_regs(int, TString&, int, int*, long, bool*);
|
||||
bool stampa_totali_finali();
|
||||
bool stampa_datareg();
|
||||
bool stampa_registri_IVA(const TMask&);
|
||||
bool look_lia(long ditta = 0l);
|
||||
bool ricerca_mese(TString&,TString&,int,int,TMask_field&);
|
||||
void set_choice_limits(TMask&);
|
||||
void build_ditte_sheet();
|
||||
void cerca_reg(const TString&, byte*);
|
||||
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();
|
||||
long select_firm_range(long,long);
|
||||
void stampa_plafonds(int);
|
||||
void get_dati_ditta();
|
||||
void stampa_vidi();
|
||||
void scrivi_reg();
|
||||
int stampa_acquisti(int);
|
||||
real stampa_valori_plafonds(const real&, const int, TTable&, const char*);
|
||||
void build_nomiditte(TProgind* pnd = NULL);
|
||||
void set_year(int y) { _annoes = y; }
|
||||
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();
|
||||
|
||||
CG4400_application() : TPrintapp(), _ditte(NULL), _selected(10000), _nomiditte(100), _test(FALSE) {}
|
||||
virtual ~CG4400_application() {}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
3519
cg/cg4600.cpp
3519
cg/cg4600.cpp
File diff suppressed because it is too large
Load Diff
683
cg/cg4600a.uml
683
cg/cg4600a.uml
@ -1,333 +1,350 @@
|
||||
#include "cg4600.h"
|
||||
|
||||
PAGE "" -1 -1 76 20
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 2 1 "Ditta "
|
||||
FLAGS "FRD"
|
||||
USE LF_NDITTE KEY 1
|
||||
CHECKTYPE REQUIRED
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
DISPLAY "Codice" CODDITTA
|
||||
DISPLAY "Ragione sociale @50" RAGSOC
|
||||
OUTPUT F_CODDITTA CODDITTA
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
END
|
||||
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 2 2 "Ragione sociale "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CHIUSURA 3
|
||||
BEGIN
|
||||
PROMPT 2 4 "Codice causale chiusura "
|
||||
HELP "Codice causale che genera il movimento di chiusura"
|
||||
USE LF_CAUSALI KEY 1 SELECT MOVAP="C"
|
||||
FLAGS "UZ"
|
||||
DISPLAY "Codice" CODCAUS
|
||||
DISPLAY "Descrizione @50" DESCR
|
||||
OUTPUT F_CHIUSURA CODCAUS
|
||||
INPUT CODCAUS F_CHIUSURA
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_APERTURA 3
|
||||
BEGIN
|
||||
PROMPT 2 5 "Codice causale apertura "
|
||||
HELP "Codice causale che genera il movimento di apertura"
|
||||
USE LF_CAUSALI KEY 1 SELECT MOVAP="A"
|
||||
FLAGS "UZ"
|
||||
COPY DISPLAY F_CHIUSURA
|
||||
OUTPUT F_APERTURA CODCAUS
|
||||
INPUT CODCAUS F_APERTURA
|
||||
END
|
||||
|
||||
DATE F_DATAC
|
||||
BEGIN
|
||||
PROMPT 36 4 "Data/Anno chiusura "
|
||||
HELP "Data in cui effettuare il movimento di chiusura"
|
||||
END
|
||||
|
||||
DATE F_DATAAP
|
||||
BEGIN
|
||||
PROMPT 36 5 "Data/Anno apertura "
|
||||
HELP "Data in cui effettuare il movimento di apertura"
|
||||
WARNING "Inserire una data non inferiore alla data di chiusura"
|
||||
VALIDATE DATE_CMP_FUNC >= F_DATAC
|
||||
END
|
||||
|
||||
NUMBER F_ANNOCH 4
|
||||
BEGIN
|
||||
PROMPT 69 4 ""
|
||||
FLAGS "RZD"
|
||||
END
|
||||
|
||||
NUMBER F_ANNO 4
|
||||
BEGIN
|
||||
PROMPT 69 5 ""
|
||||
FLAGS "RZD"
|
||||
END
|
||||
|
||||
|
||||
GROUPBOX DLG_NULL 60 10
|
||||
BEGIN
|
||||
PROMPT 2 7 "Codici sottoconto"
|
||||
END
|
||||
|
||||
NUMBER F_BILCHG 3
|
||||
BEGIN
|
||||
PROMPT 3 9 "Bilancio di chiusura "
|
||||
HELP "Codice conto di riepilogo del bilancio di chiusura"
|
||||
USE LF_PCON KEY 1 SELECT SOTTOCONTO!=""
|
||||
CHECKTYPE REQUIRED
|
||||
DISPLAY "Gruppo" GRUPPO
|
||||
DISPLAY "Conto" CONTO
|
||||
DISPLAY "Sottoconto" SOTTOCONTO
|
||||
DISPLAY "Descrizione @50" DESCR
|
||||
OUTPUT F_BILCHG GRUPPO
|
||||
OUTPUT F_BILCHC CONTO
|
||||
OUTPUT F_BILCHS SOTTOCONTO
|
||||
INPUT GRUPPO F_BILCHG
|
||||
INPUT CONTO F_BILCHC
|
||||
INPUT SOTTOCONTO F_BILCHS
|
||||
END
|
||||
|
||||
NUMBER F_BILCHC 3
|
||||
BEGIN
|
||||
PROMPT 44 9 ""
|
||||
HELP "Codice conto di riepilogo del bilancio di chiusura"
|
||||
COPY ALL F_BILCHG
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_BILCHS 6
|
||||
BEGIN
|
||||
PROMPT 51 9 ""
|
||||
HELP "Codice conto di riepilogo del bilancio di chiusura"
|
||||
COPY ALL F_BILCHG
|
||||
CHECKTYPE REQUIRED
|
||||
|
||||
END
|
||||
|
||||
NUMBER F_PROPERG 3
|
||||
BEGIN
|
||||
PROMPT 3 10 "Profitti e perdite "
|
||||
HELP "Codice conto di riepilogo del Profitti e perdite"
|
||||
COPY USE F_BILCHG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
OUTPUT F_PROPERG GRUPPO
|
||||
OUTPUT F_PROPERC CONTO
|
||||
OUTPUT F_PROPERS SOTTOCONTO
|
||||
INPUT GRUPPO F_PROPERG
|
||||
INPUT CONTO F_PROPERC
|
||||
INPUT SOTTOCONTO F_PROPERS
|
||||
END
|
||||
|
||||
NUMBER F_PROPERC 3
|
||||
BEGIN
|
||||
PROMPT 44 10 ""
|
||||
HELP "Codice conto di riepilogo del Profitti e perdite"
|
||||
COPY USE F_BILCHG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
COPY OUTPUT F_PROPERG
|
||||
COPY INPUT F_PROPERG
|
||||
END
|
||||
|
||||
NUMBER F_PROPERS 6
|
||||
BEGIN
|
||||
PROMPT 51 10 ""
|
||||
HELP "Codice conto di riepilogo del Profitti e perdite"
|
||||
COPY ALL F_PROPERC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_BILAPG 3
|
||||
BEGIN
|
||||
PROMPT 3 11 "Bilancio di apertura "
|
||||
HELP "Codice conto di riepilogo del Bilancio di apertura"
|
||||
COPY USE F_BILCHG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
OUTPUT F_BILAPG GRUPPO
|
||||
OUTPUT F_BILAPC CONTO
|
||||
OUTPUT F_BILAPS SOTTOCONTO
|
||||
INPUT GRUPPO F_BILAPG
|
||||
INPUT CONTO F_BILAPC
|
||||
INPUT SOTTOCONTO F_BILAPS
|
||||
END
|
||||
|
||||
NUMBER F_BILAPC 3
|
||||
BEGIN
|
||||
PROMPT 44 11 ""
|
||||
HELP "Codice conto di riepilogo del Bilancio di apertura"
|
||||
COPY USE F_BILCHG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
COPY OUTPUT F_BILAPG
|
||||
COPY INPUT F_BILAPG
|
||||
END
|
||||
|
||||
NUMBER F_BILAPS 6
|
||||
BEGIN
|
||||
PROMPT 51 11 ""
|
||||
HELP "Codice conto di riepilogo del Bilancio di apertura"
|
||||
COPY ALL F_BILAPC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_UTILPG 3
|
||||
BEGIN
|
||||
PROMPT 3 12 "Utile d'esercizio c/to patrim. "
|
||||
HELP "Codice conto patrimoniale in cui ripilogare l'utile d'esercizio"
|
||||
USE LF_PCON KEY 1 SELECT (SOTTOCONTO!="")
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
OUTPUT F_UTILPG GRUPPO
|
||||
OUTPUT F_UTILPC CONTO
|
||||
OUTPUT F_UTILPS SOTTOCONTO
|
||||
INPUT GRUPPO F_UTILPG
|
||||
INPUT CONTO F_UTILPC
|
||||
INPUT SOTTOCONTO F_UTILPS
|
||||
END
|
||||
|
||||
NUMBER F_UTILPC 3
|
||||
BEGIN
|
||||
PROMPT 44 12 ""
|
||||
HELP "Codice conto patrimoniale in cui ripilogare l'utile d'esercizio"
|
||||
COPY USE F_UTILPG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
COPY OUTPUT F_UTILPG
|
||||
COPY INPUT F_UTILPG
|
||||
END
|
||||
|
||||
NUMBER F_UTILPS 6
|
||||
BEGIN
|
||||
PROMPT 51 12 ""
|
||||
HELP "Codice conto patrimoniale in cui ripilogare l'utile d'esercizio"
|
||||
COPY ALL F_UTILPC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_PERDPG 3
|
||||
BEGIN
|
||||
PROMPT 3 13 "Perdita d'esercizio c/to patr. "
|
||||
HELP "Codice conto patrimoniale in cui ripilogare la perdita d'esercizio"
|
||||
USE LF_PCON KEY 1 SELECT (SOTTOCONTO!="")
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
OUTPUT F_PERDPG GRUPPO
|
||||
OUTPUT F_PERDPC CONTO
|
||||
OUTPUT F_PERDPS SOTTOCONTO
|
||||
INPUT GRUPPO F_PERDPG
|
||||
INPUT CONTO F_PERDPC
|
||||
INPUT SOTTOCONTO F_PERDPS
|
||||
END
|
||||
|
||||
NUMBER F_PERDPC 3
|
||||
BEGIN
|
||||
PROMPT 44 13 ""
|
||||
HELP "Codice conto patrimoniale in cui ripilogare la perdita d'esercizio"
|
||||
COPY USE F_PERDPG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
COPY OUTPUT F_PERDPG
|
||||
COPY INPUT F_PERDPG
|
||||
END
|
||||
|
||||
NUMBER F_PERDPS 6
|
||||
BEGIN
|
||||
PROMPT 51 13 ""
|
||||
HELP "Codice conto patrimoniale in cui ripilogare la perdita d'esercizio"
|
||||
COPY ALL F_PERDPC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_UTILEG 3
|
||||
BEGIN
|
||||
PROMPT 3 14 "Utile d'esercizio c/to econom. "
|
||||
HELP "Codice conto economico in cui ripilogare l'utile d'esercizio"
|
||||
USE LF_PCON KEY 1 SELECT (SOTTOCONTO!="")
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
OUTPUT F_UTILEG GRUPPO
|
||||
OUTPUT F_UTILEC CONTO
|
||||
OUTPUT F_UTILES SOTTOCONTO
|
||||
INPUT GRUPPO F_UTILEG
|
||||
INPUT CONTO F_UTILEC
|
||||
INPUT SOTTOCONTO F_UTILES
|
||||
END
|
||||
|
||||
NUMBER F_UTILEC 3
|
||||
BEGIN
|
||||
PROMPT 44 14 ""
|
||||
HELP "Codice conto economico in cui ripilogare l'utile d'esercizio"
|
||||
COPY USE F_UTILEG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
COPY OUTPUT F_UTILEG
|
||||
COPY INPUT F_UTILEG
|
||||
END
|
||||
|
||||
NUMBER F_UTILES 6
|
||||
BEGIN
|
||||
PROMPT 51 14 ""
|
||||
HELP "Codice conto economico in cui ripilogare l'utile d'esercizio"
|
||||
COPY ALL F_UTILEC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_PERDEG 3
|
||||
BEGIN
|
||||
PROMPT 3 15 "Perdita d'esercizio c/to econ. "
|
||||
HELP "Codice conto economico in cui ripilogare la perdita d'esercizio"
|
||||
USE LF_PCON KEY 1 SELECT (SOTTOCONTO!="")
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
OUTPUT F_PERDEG GRUPPO
|
||||
OUTPUT F_PERDEC CONTO
|
||||
OUTPUT F_PERDES SOTTOCONTO
|
||||
INPUT GRUPPO F_PERDEG
|
||||
INPUT CONTO F_PERDEC
|
||||
INPUT SOTTOCONTO F_PERDES
|
||||
|
||||
END
|
||||
|
||||
NUMBER F_PERDEC 3
|
||||
BEGIN
|
||||
PROMPT 44 15 ""
|
||||
HELP "Codice conto economico in cui ripilogare la perdita d'esercizio"
|
||||
COPY USE F_PERDEG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
COPY OUTPUT F_PERDEG
|
||||
COPY INPUT F_PERDEG
|
||||
END
|
||||
|
||||
NUMBER F_PERDES 6
|
||||
BEGIN
|
||||
PROMPT 51 15 ""
|
||||
HELP "Codice conto economico in cui ripilogare la perdita d'esercizio"
|
||||
COPY ALL F_PERDEC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 9 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 9 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
#include "cg4600.h"
|
||||
|
||||
PAGE "" -1 -1 76 20
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 2 1 "Ditta "
|
||||
FLAGS "FRD"
|
||||
USE LF_NDITTE KEY 1
|
||||
CHECKTYPE REQUIRED
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
DISPLAY "Codice" CODDITTA
|
||||
DISPLAY "Ragione sociale @50" RAGSOC
|
||||
OUTPUT F_CODDITTA CODDITTA
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
END
|
||||
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 2 2 "Ragione sociale "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CHIUSURA 3
|
||||
BEGIN
|
||||
PROMPT 2 4 "Codice causale chiusura "
|
||||
HELP "Codice causale che genera il movimento di chiusura"
|
||||
USE LF_CAUSALI KEY 1 SELECT MOVAP="C"
|
||||
FLAGS "UZ"
|
||||
DISPLAY "Codice" CODCAUS
|
||||
DISPLAY "Descrizione @50" DESCR
|
||||
OUTPUT F_CHIUSURA CODCAUS
|
||||
INPUT CODCAUS F_CHIUSURA
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_APERTURA 3
|
||||
BEGIN
|
||||
PROMPT 2 5 "Codice causale apertura "
|
||||
HELP "Codice causale che genera il movimento di apertura"
|
||||
USE LF_CAUSALI KEY 1 SELECT MOVAP="A"
|
||||
FLAGS "UZ"
|
||||
COPY DISPLAY F_CHIUSURA
|
||||
OUTPUT F_APERTURA CODCAUS
|
||||
INPUT CODCAUS F_APERTURA
|
||||
END
|
||||
|
||||
DATE F_DATAC
|
||||
BEGIN
|
||||
PROMPT 36 4 "Data/Anno chiusura "
|
||||
HELP "Data in cui effettuare il movimento di chiusura"
|
||||
END
|
||||
|
||||
DATE F_DATAAP
|
||||
BEGIN
|
||||
PROMPT 36 5 "Data/Anno apertura "
|
||||
HELP "Data in cui effettuare il movimento di apertura"
|
||||
WARNING "Inserire una data non inferiore alla data di chiusura"
|
||||
VALIDATE DATE_CMP_FUNC >= F_DATAC
|
||||
END
|
||||
|
||||
NUMBER F_ANNOCH 4
|
||||
BEGIN
|
||||
PROMPT 69 4 ""
|
||||
USE ESC
|
||||
INPUT CODTAB F_ANNOCH
|
||||
DISPLAY "Anno" CODTAB
|
||||
DISPLAY "Inizio Es.@12" D0
|
||||
DISPLAY "Fine Es.@12" D1
|
||||
DISPLAY "Scarico@12" D2
|
||||
OUTPUT F_ANNOCH CODTAB
|
||||
OUTPUT F_DATAC D1
|
||||
CHECKTYPE REQUIRED
|
||||
WARNING "Anno non presente in tabella esercizi"
|
||||
FLAGS "GRZD"
|
||||
END
|
||||
|
||||
NUMBER F_ANNO 4
|
||||
BEGIN
|
||||
PROMPT 69 5 ""
|
||||
COPY USE F_ANNOCH
|
||||
INPUT CODTAB F_ANNO
|
||||
COPY DISPLAY F_ANNOCH
|
||||
OUTPUT F_ANNO CODTAB
|
||||
OUTPUT F_DATAAP D0
|
||||
CHECKTYPE REQUIRED
|
||||
WARNING "Anno non presente in tabella esercizi"
|
||||
FLAGS "GRZD"
|
||||
END
|
||||
|
||||
|
||||
GROUPBOX DLG_NULL 60 10
|
||||
BEGIN
|
||||
PROMPT 2 7 "Codici sottoconto"
|
||||
END
|
||||
|
||||
NUMBER F_BILCHG 3
|
||||
BEGIN
|
||||
PROMPT 3 9 "Bilancio di chiusura "
|
||||
HELP "Codice conto di riepilogo del bilancio di chiusura"
|
||||
USE LF_PCON KEY 1 SELECT SOTTOCONTO!=""
|
||||
CHECKTYPE REQUIRED
|
||||
DISPLAY "Gruppo" GRUPPO
|
||||
DISPLAY "Conto" CONTO
|
||||
DISPLAY "Sottoconto" SOTTOCONTO
|
||||
DISPLAY "Descrizione @50" DESCR
|
||||
OUTPUT F_BILCHG GRUPPO
|
||||
OUTPUT F_BILCHC CONTO
|
||||
OUTPUT F_BILCHS SOTTOCONTO
|
||||
INPUT GRUPPO F_BILCHG
|
||||
INPUT CONTO F_BILCHC
|
||||
INPUT SOTTOCONTO F_BILCHS
|
||||
END
|
||||
|
||||
NUMBER F_BILCHC 3
|
||||
BEGIN
|
||||
PROMPT 44 9 ""
|
||||
HELP "Codice conto di riepilogo del bilancio di chiusura"
|
||||
COPY ALL F_BILCHG
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_BILCHS 6
|
||||
BEGIN
|
||||
PROMPT 51 9 ""
|
||||
HELP "Codice conto di riepilogo del bilancio di chiusura"
|
||||
COPY ALL F_BILCHG
|
||||
CHECKTYPE REQUIRED
|
||||
|
||||
END
|
||||
|
||||
NUMBER F_PROPERG 3
|
||||
BEGIN
|
||||
PROMPT 3 10 "Profitti e perdite "
|
||||
HELP "Codice conto di riepilogo del Profitti e perdite"
|
||||
COPY USE F_BILCHG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
OUTPUT F_PROPERG GRUPPO
|
||||
OUTPUT F_PROPERC CONTO
|
||||
OUTPUT F_PROPERS SOTTOCONTO
|
||||
INPUT GRUPPO F_PROPERG
|
||||
INPUT CONTO F_PROPERC
|
||||
INPUT SOTTOCONTO F_PROPERS
|
||||
END
|
||||
|
||||
NUMBER F_PROPERC 3
|
||||
BEGIN
|
||||
PROMPT 44 10 ""
|
||||
HELP "Codice conto di riepilogo del Profitti e perdite"
|
||||
COPY USE F_BILCHG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
COPY OUTPUT F_PROPERG
|
||||
COPY INPUT F_PROPERG
|
||||
END
|
||||
|
||||
NUMBER F_PROPERS 6
|
||||
BEGIN
|
||||
PROMPT 51 10 ""
|
||||
HELP "Codice conto di riepilogo del Profitti e perdite"
|
||||
COPY ALL F_PROPERC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_BILAPG 3
|
||||
BEGIN
|
||||
PROMPT 3 11 "Bilancio di apertura "
|
||||
HELP "Codice conto di riepilogo del Bilancio di apertura"
|
||||
COPY USE F_BILCHG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
OUTPUT F_BILAPG GRUPPO
|
||||
OUTPUT F_BILAPC CONTO
|
||||
OUTPUT F_BILAPS SOTTOCONTO
|
||||
INPUT GRUPPO F_BILAPG
|
||||
INPUT CONTO F_BILAPC
|
||||
INPUT SOTTOCONTO F_BILAPS
|
||||
END
|
||||
|
||||
NUMBER F_BILAPC 3
|
||||
BEGIN
|
||||
PROMPT 44 11 ""
|
||||
HELP "Codice conto di riepilogo del Bilancio di apertura"
|
||||
COPY USE F_BILCHG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
COPY OUTPUT F_BILAPG
|
||||
COPY INPUT F_BILAPG
|
||||
END
|
||||
|
||||
NUMBER F_BILAPS 6
|
||||
BEGIN
|
||||
PROMPT 51 11 ""
|
||||
HELP "Codice conto di riepilogo del Bilancio di apertura"
|
||||
COPY ALL F_BILAPC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_UTILPG 3
|
||||
BEGIN
|
||||
PROMPT 3 12 "Utile d'esercizio c/to patrim. "
|
||||
HELP "Codice conto patrimoniale in cui ripilogare l'utile d'esercizio"
|
||||
USE LF_PCON KEY 1 SELECT (SOTTOCONTO!="")
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
OUTPUT F_UTILPG GRUPPO
|
||||
OUTPUT F_UTILPC CONTO
|
||||
OUTPUT F_UTILPS SOTTOCONTO
|
||||
INPUT GRUPPO F_UTILPG
|
||||
INPUT CONTO F_UTILPC
|
||||
INPUT SOTTOCONTO F_UTILPS
|
||||
END
|
||||
|
||||
NUMBER F_UTILPC 3
|
||||
BEGIN
|
||||
PROMPT 44 12 ""
|
||||
HELP "Codice conto patrimoniale in cui ripilogare l'utile d'esercizio"
|
||||
COPY USE F_UTILPG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
COPY OUTPUT F_UTILPG
|
||||
COPY INPUT F_UTILPG
|
||||
END
|
||||
|
||||
NUMBER F_UTILPS 6
|
||||
BEGIN
|
||||
PROMPT 51 12 ""
|
||||
HELP "Codice conto patrimoniale in cui ripilogare l'utile d'esercizio"
|
||||
COPY ALL F_UTILPC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_PERDPG 3
|
||||
BEGIN
|
||||
PROMPT 3 13 "Perdita d'esercizio c/to patr. "
|
||||
HELP "Codice conto patrimoniale in cui ripilogare la perdita d'esercizio"
|
||||
USE LF_PCON KEY 1 SELECT (SOTTOCONTO!="")
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
OUTPUT F_PERDPG GRUPPO
|
||||
OUTPUT F_PERDPC CONTO
|
||||
OUTPUT F_PERDPS SOTTOCONTO
|
||||
INPUT GRUPPO F_PERDPG
|
||||
INPUT CONTO F_PERDPC
|
||||
INPUT SOTTOCONTO F_PERDPS
|
||||
END
|
||||
|
||||
NUMBER F_PERDPC 3
|
||||
BEGIN
|
||||
PROMPT 44 13 ""
|
||||
HELP "Codice conto patrimoniale in cui ripilogare la perdita d'esercizio"
|
||||
COPY USE F_PERDPG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
COPY OUTPUT F_PERDPG
|
||||
COPY INPUT F_PERDPG
|
||||
END
|
||||
|
||||
NUMBER F_PERDPS 6
|
||||
BEGIN
|
||||
PROMPT 51 13 ""
|
||||
HELP "Codice conto patrimoniale in cui ripilogare la perdita d'esercizio"
|
||||
COPY ALL F_PERDPC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_UTILEG 3
|
||||
BEGIN
|
||||
PROMPT 3 14 "Utile d'esercizio c/to econom. "
|
||||
HELP "Codice conto economico in cui ripilogare l'utile d'esercizio"
|
||||
USE LF_PCON KEY 1 SELECT (SOTTOCONTO!="")
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
OUTPUT F_UTILEG GRUPPO
|
||||
OUTPUT F_UTILEC CONTO
|
||||
OUTPUT F_UTILES SOTTOCONTO
|
||||
INPUT GRUPPO F_UTILEG
|
||||
INPUT CONTO F_UTILEC
|
||||
INPUT SOTTOCONTO F_UTILES
|
||||
END
|
||||
|
||||
NUMBER F_UTILEC 3
|
||||
BEGIN
|
||||
PROMPT 44 14 ""
|
||||
HELP "Codice conto economico in cui ripilogare l'utile d'esercizio"
|
||||
COPY USE F_UTILEG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
COPY OUTPUT F_UTILEG
|
||||
COPY INPUT F_UTILEG
|
||||
END
|
||||
|
||||
NUMBER F_UTILES 6
|
||||
BEGIN
|
||||
PROMPT 51 14 ""
|
||||
HELP "Codice conto economico in cui ripilogare l'utile d'esercizio"
|
||||
COPY ALL F_UTILEC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_PERDEG 3
|
||||
BEGIN
|
||||
PROMPT 3 15 "Perdita d'esercizio c/to econ. "
|
||||
HELP "Codice conto economico in cui ripilogare la perdita d'esercizio"
|
||||
USE LF_PCON KEY 1 SELECT (SOTTOCONTO!="")
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
OUTPUT F_PERDEG GRUPPO
|
||||
OUTPUT F_PERDEC CONTO
|
||||
OUTPUT F_PERDES SOTTOCONTO
|
||||
INPUT GRUPPO F_PERDEG
|
||||
INPUT CONTO F_PERDEC
|
||||
INPUT SOTTOCONTO F_PERDES
|
||||
|
||||
END
|
||||
|
||||
NUMBER F_PERDEC 3
|
||||
BEGIN
|
||||
PROMPT 44 15 ""
|
||||
HELP "Codice conto economico in cui ripilogare la perdita d'esercizio"
|
||||
COPY USE F_PERDEG
|
||||
CHECKTYPE REQUIRED
|
||||
COPY DISPLAY F_BILCHG
|
||||
COPY OUTPUT F_PERDEG
|
||||
COPY INPUT F_PERDEG
|
||||
END
|
||||
|
||||
NUMBER F_PERDES 6
|
||||
BEGIN
|
||||
PROMPT 51 15 ""
|
||||
HELP "Codice conto economico in cui ripilogare la perdita d'esercizio"
|
||||
COPY ALL F_PERDEC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 9 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 9 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
300
cg/cglib.h
300
cg/cglib.h
@ -1,150 +1,150 @@
|
||||
#ifndef __CGLIB_H
|
||||
#define __CGLIB_H
|
||||
|
||||
#ifndef __ISAM_H
|
||||
#include <isam.h>
|
||||
#endif
|
||||
|
||||
#include <assoc.h>
|
||||
#include "conto.h"
|
||||
#include "cg2103.h" // per TCausale
|
||||
|
||||
|
||||
class TCaus : public TCausale
|
||||
{
|
||||
private:
|
||||
TRectype _rec;
|
||||
|
||||
public:
|
||||
bool chiusura() const;
|
||||
bool apertura() const;
|
||||
virtual bool read(const char* cod);
|
||||
|
||||
TCaus(const char* cod);
|
||||
~TCaus() {}
|
||||
};
|
||||
|
||||
class TSaldi_list : public TAssoc_array
|
||||
{
|
||||
public:
|
||||
TSaldi_list (int g, int c, int aec, int aep=0);
|
||||
TRectype* saldi() const;
|
||||
};
|
||||
|
||||
enum tipobil { DataLimite=1, UltimaImmissione };
|
||||
const int EsePre(const int EseCorr);
|
||||
|
||||
class TSaldo
|
||||
{
|
||||
real _saldo, _saldo_iniziale, _saldoiniziale;
|
||||
real _prg_dare, _prg_avere, _prg_daresca, _prg_averesca;
|
||||
int _indbil;
|
||||
TRectype _saldo_ep;
|
||||
int _annoes;
|
||||
TDate _inizioEs, _fineEs;
|
||||
TString16 _codcaus;
|
||||
TDate _datareg;
|
||||
TDate _datacomp;
|
||||
TString _provv;
|
||||
|
||||
bool _movimentato;
|
||||
bool _significativo;
|
||||
bool _rec_presente_ec;
|
||||
bool _rec_presente_ep;
|
||||
|
||||
protected:
|
||||
void InFinEs(int);
|
||||
void leggi_mov(long numreg); // Leggi testata
|
||||
real calcola_saldo_iniziale(int g, int c, long s, int indbil);
|
||||
|
||||
public:
|
||||
|
||||
bool movimentato() const { return _movimentato; }
|
||||
bool significativo() const { return _significativo; }
|
||||
bool esiste_saldo() const { return _rec_presente_ec || _rec_presente_ep;}
|
||||
bool esiste_saldo_ep() const { return _rec_presente_ep; }
|
||||
|
||||
int annoes () const { return _annoes; }
|
||||
void set_annoes (int anno) { _annoes = anno; }
|
||||
|
||||
bool causale_mov(long, const TDate&, const TDate&, TString&);
|
||||
const char* causale_chiusura_es();
|
||||
const char* causale_apertura_es();
|
||||
|
||||
bool ultima_immissione_bilancio(int anno,int g,int c,long s,int indbil,int prov);
|
||||
bool ultima_immissione_verifica(int anno,int g,int c,long s,int indbil,int prov);
|
||||
bool data_limite_bilancio(int,int,int,long,const TDate&,const TDate&,int,int);
|
||||
|
||||
TRectype& ricerca_progr_prec(int, int, int, long);
|
||||
|
||||
real saldofin_esprec(int,int,int,long);
|
||||
bool prg_attuali(int,TConto&,real&,real&);
|
||||
bool prg_mov_eliminati(int,TConto&,real&,real&);
|
||||
|
||||
const real& saldo() const { return _saldo;}
|
||||
const real& saldoini() const { return _saldo_iniziale;}
|
||||
const real& saldoinisusaldi() const { return _saldoiniziale;}
|
||||
const real& prgdare() const { return _prg_dare;}
|
||||
const real& prgavere() const { return _prg_avere;}
|
||||
bool prg_attuali(int,TConto&,int,real&,real&);
|
||||
bool prg_mov_eliminati(int,TConto&,int,real&,real&);
|
||||
TSaldo();
|
||||
~TSaldo();
|
||||
};
|
||||
|
||||
|
||||
|
||||
class TTab_conti : public TAssoc_array
|
||||
{
|
||||
public:
|
||||
void aggiorna_conto(const TBill& tc, int anno_es, const TImporto& importo,
|
||||
bool movap, bool provv, bool somma);
|
||||
|
||||
TConto* add(const TBill& c, int anno);
|
||||
TConto* find(const TBill& c, int anno);
|
||||
void remove(const TBill& c, int anno);
|
||||
};
|
||||
|
||||
|
||||
class TSaldo_agg : public TObject
|
||||
{
|
||||
TTab_conti _tab_conti;
|
||||
bool _movap; // se e' mov. d'apertura (aggiorno SALDO e FLAGSALINI in
|
||||
// saldi)
|
||||
bool _provv;
|
||||
int _anno_es; // anno esercizio
|
||||
TDate _data_ulmov; // data ultimo movimento
|
||||
long _num_ulmov; // numero ultimo movimento
|
||||
TRectype * _rec; // record corrente sui saldi
|
||||
|
||||
public:
|
||||
void clear_saldi(int year);
|
||||
void registra();
|
||||
void aggiorna (const TBill& tc, const TImporto& importo, bool somma=TRUE);
|
||||
void aggiorna (int gruppo, int conto, long sottoconto,
|
||||
const real& importo, char sezione, bool somma=TRUE);
|
||||
|
||||
TConto* find(const TBill& c, int anno) { return _tab_conti.find(c, anno); }
|
||||
|
||||
void set_anno_es(int anno) { _anno_es = anno; }
|
||||
int anno_es() const { return _anno_es; }
|
||||
|
||||
void set_movap (bool movap) { _movap = movap; }
|
||||
bool movap() const { return _movap; }
|
||||
|
||||
void set_movprovv (bool p) { _provv = p; }
|
||||
bool movprovv() const { return _provv; }
|
||||
|
||||
void set_data_ulmov (const TDate& data) { _data_ulmov = data; }
|
||||
const TDate& data_ulmov() const { return _data_ulmov; }
|
||||
|
||||
void set_num_ulmov (long num) { _num_ulmov = num; }
|
||||
long num_ulmov() const { return _num_ulmov; }
|
||||
|
||||
void reset(); // pulisce l'array dei conti
|
||||
TSaldo_agg();
|
||||
int items() const { return _tab_conti.items();}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef __CGLIB_H
|
||||
#define __CGLIB_H
|
||||
|
||||
#ifndef __ISAM_H
|
||||
#include <isam.h>
|
||||
#endif
|
||||
|
||||
#include <assoc.h>
|
||||
#include "conto.h"
|
||||
#include "cg2103.h" // per TCausale
|
||||
|
||||
|
||||
class TCaus : public TCausale
|
||||
{
|
||||
private:
|
||||
TRectype _rec;
|
||||
|
||||
public:
|
||||
bool chiusura() const;
|
||||
bool apertura() const;
|
||||
virtual bool read(const char* cod);
|
||||
|
||||
TCaus(const char* cod);
|
||||
~TCaus() {}
|
||||
};
|
||||
|
||||
class TSaldi_list : public TAssoc_array
|
||||
{
|
||||
public:
|
||||
TSaldi_list (int g, int c, int aec, int aep=0);
|
||||
TRectype* saldi() const;
|
||||
};
|
||||
|
||||
enum tipobil { DataLimite=1, UltimaImmissione };
|
||||
const int EsePre(const int EseCorr);
|
||||
|
||||
class TSaldo
|
||||
{
|
||||
real _saldo, _saldo_iniziale, _saldoiniziale;
|
||||
real _prg_dare, _prg_avere, _prg_daresca, _prg_averesca;
|
||||
int _indbil;
|
||||
TRectype* _saldo_ep;
|
||||
int _annoes;
|
||||
TDate _inizioEs, _fineEs;
|
||||
TString16 _codcaus;
|
||||
TDate _datareg;
|
||||
TDate _datacomp;
|
||||
TString _provv;
|
||||
|
||||
bool _movimentato;
|
||||
bool _significativo;
|
||||
bool _rec_presente_ec;
|
||||
bool _rec_presente_ep;
|
||||
|
||||
protected:
|
||||
void InFinEs(int);
|
||||
void leggi_mov(long numreg); // Leggi testata
|
||||
real calcola_saldo_iniziale(int g, int c, long s, int indbil);
|
||||
|
||||
public:
|
||||
|
||||
bool movimentato() const { return _movimentato; }
|
||||
bool significativo() const { return _significativo; }
|
||||
bool esiste_saldo() const { return _rec_presente_ec || _rec_presente_ep;}
|
||||
bool esiste_saldo_ep() const { return _rec_presente_ep; }
|
||||
|
||||
int annoes () const { return _annoes; }
|
||||
void set_annoes (int anno) { _annoes = anno; }
|
||||
|
||||
bool causale_mov(long, const TDate&, const TDate&, TString&);
|
||||
const char* causale_chiusura_es();
|
||||
const char* causale_apertura_es();
|
||||
|
||||
bool ultima_immissione_bilancio(int anno,int g,int c,long s,int indbil,int prov);
|
||||
bool ultima_immissione_verifica(int anno,int g,int c,long s,int indbil,int prov);
|
||||
bool data_limite_bilancio(int,int,int,long,const TDate&,const TDate&,int,int);
|
||||
|
||||
TRectype& ricerca_progr_prec(int, int, int, long);
|
||||
|
||||
real saldofin_esprec(int,int,int,long);
|
||||
bool prg_attuali(int,TConto&,real&,real&);
|
||||
bool prg_mov_eliminati(int,TConto&,real&,real&);
|
||||
|
||||
const real& saldo() const { return _saldo;}
|
||||
const real& saldoini() const { return _saldo_iniziale;}
|
||||
const real& saldoinisusaldi() const { return _saldoiniziale;}
|
||||
const real& prgdare() const { return _prg_dare;}
|
||||
const real& prgavere() const { return _prg_avere;}
|
||||
bool prg_attuali(int,TConto&,int,real&,real&);
|
||||
bool prg_mov_eliminati(int,TConto&,int,real&,real&);
|
||||
TSaldo();
|
||||
~TSaldo();
|
||||
};
|
||||
|
||||
|
||||
|
||||
class TTab_conti : public TAssoc_array
|
||||
{
|
||||
public:
|
||||
void aggiorna_conto(const TBill& tc, int anno_es, const TImporto& importo,
|
||||
bool movap, bool provv, bool somma);
|
||||
|
||||
TConto* add(const TBill& c, int anno);
|
||||
TConto* find(const TBill& c, int anno);
|
||||
void remove(const TBill& c, int anno);
|
||||
};
|
||||
|
||||
|
||||
class TSaldo_agg : public TObject
|
||||
{
|
||||
TTab_conti _tab_conti;
|
||||
bool _movap; // se e' mov. d'apertura (aggiorno SALDO e FLAGSALINI in
|
||||
// saldi)
|
||||
bool _provv;
|
||||
int _anno_es; // anno esercizio
|
||||
TDate _data_ulmov; // data ultimo movimento
|
||||
long _num_ulmov; // numero ultimo movimento
|
||||
TRectype * _rec; // record corrente sui saldi
|
||||
|
||||
public:
|
||||
void clear_saldi(int year);
|
||||
void registra();
|
||||
void aggiorna (const TBill& tc, const TImporto& importo, bool somma=TRUE);
|
||||
void aggiorna (int gruppo, int conto, long sottoconto,
|
||||
const real& importo, char sezione, bool somma=TRUE);
|
||||
|
||||
TConto* find(const TBill& c, int anno) { return _tab_conti.find(c, anno); }
|
||||
|
||||
void set_anno_es(int anno) { _anno_es = anno; }
|
||||
int anno_es() const { return _anno_es; }
|
||||
|
||||
void set_movap (bool movap) { _movap = movap; }
|
||||
bool movap() const { return _movap; }
|
||||
|
||||
void set_movprovv (bool p) { _provv = p; }
|
||||
bool movprovv() const { return _provv; }
|
||||
|
||||
void set_data_ulmov (const TDate& data) { _data_ulmov = data; }
|
||||
const TDate& data_ulmov() const { return _data_ulmov; }
|
||||
|
||||
void set_num_ulmov (long num) { _num_ulmov = num; }
|
||||
long num_ulmov() const { return _num_ulmov; }
|
||||
|
||||
void reset(); // pulisce l'array dei conti
|
||||
TSaldo_agg();
|
||||
int items() const { return _tab_conti.items();}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
1335
cg/cglib01.cpp
1335
cg/cglib01.cpp
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user