Leggere modifiche al programma clienti (eliminazione di variabili static)
Correzione errori cancellazione movimenti provvisori (che pero' non funzionano ancora) Aggiunta classe TBill da cui deriva TConto git-svn-id: svn://10.65.10.50/trunk@278 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d16636c484
commit
5f655ece6d
1262
cg/cg0200.cpp
1262
cg/cg0200.cpp
File diff suppressed because it is too large
Load Diff
70
cg/cg0201.h
70
cg/cg0201.h
@ -1,35 +1,35 @@
|
||||
#ifndef __RELATION_H
|
||||
#include <relation.h>
|
||||
#endif
|
||||
|
||||
class TClifoVI:public TRelation
|
||||
{
|
||||
// @DPRIV
|
||||
TArray _indirizzi;
|
||||
int _oldindirizzi;
|
||||
// @END
|
||||
protected:
|
||||
// @FPROT
|
||||
int write_rec(bool re, const TRectype& r, TLocalisamfile& f);
|
||||
int cancella(TLocalisamfile& f, int da, int a);
|
||||
int registra(bool re, bool force);
|
||||
int read_indirizzi();
|
||||
// @END
|
||||
public:
|
||||
virtual int next(TReclock lockop=_nolock) {return (lfile().next(lockop) || read_indirizzi());}
|
||||
virtual int prev(TReclock lockop=_nolock) {return (lfile().prev(lockop) || read_indirizzi());}
|
||||
virtual int first(TReclock lockop=_nolock) {return (lfile().first(lockop) || read_indirizzi());}
|
||||
virtual int last(TReclock lockop=_nolock) {return (lfile().last(lockop) || read_indirizzi());}
|
||||
virtual int skip(TReclock lockop=_nolock) {return (lfile().skip(lockop) || read_indirizzi());}
|
||||
virtual int read(TIsamop = _isgteq, TReclock lockop = _nolock, TDate& atdate = (TDate&) botime);
|
||||
virtual int write(bool force=TRUE, TDate& atdate = (TDate&) botime);
|
||||
virtual int rewrite(bool force=TRUE, TDate& atdate = (TDate&) botime);
|
||||
virtual int remove(TDate& atdate = (TDate&) botime);
|
||||
|
||||
TRectype& indirizzo(int i);
|
||||
int indirizzi_items() const {return _indirizzi.items();}
|
||||
void destroy_rows();
|
||||
|
||||
TClifoVI();
|
||||
virtual ~TClifoVI() {}
|
||||
};
|
||||
#ifndef __RELATION_H
|
||||
#include <relation.h>
|
||||
#endif
|
||||
|
||||
class TClifoVI:public TRelation
|
||||
{
|
||||
// @DPRIV
|
||||
TArray _indirizzi;
|
||||
int _oldindirizzi;
|
||||
// @END
|
||||
protected:
|
||||
// @FPROT
|
||||
int write_rec(bool re, const TRectype& r, TLocalisamfile& f);
|
||||
int cancella(TLocalisamfile& f, int da, int a);
|
||||
int registra(bool re, bool force);
|
||||
int read_indirizzi();
|
||||
// @END
|
||||
public:
|
||||
virtual int next(TReclock lockop=_nolock) {return (lfile().next(lockop) || read_indirizzi());}
|
||||
virtual int prev(TReclock lockop=_nolock) {return (lfile().prev(lockop) || read_indirizzi());}
|
||||
virtual int first(TReclock lockop=_nolock) {return (lfile().first(lockop) || read_indirizzi());}
|
||||
virtual int last(TReclock lockop=_nolock) {return (lfile().last(lockop) || read_indirizzi());}
|
||||
virtual int skip(TReclock lockop=_nolock) {return (lfile().skip(lockop) || read_indirizzi());}
|
||||
virtual int read(TIsamop = _isgteq, TReclock lockop = _nolock, TDate& atdate = (TDate&) botime);
|
||||
virtual int write(bool force=TRUE, TDate& atdate = (TDate&) botime);
|
||||
virtual int rewrite(bool force=TRUE, TDate& atdate = (TDate&) botime);
|
||||
virtual int remove(TDate& atdate = (TDate&) botime);
|
||||
|
||||
TRectype& indirizzo(int i);
|
||||
int indirizzi_items() const {return _indirizzi.items();}
|
||||
void destroy_rows();
|
||||
|
||||
TClifoVI();
|
||||
virtual ~TClifoVI() {}
|
||||
};
|
||||
|
16
cg/cg2.h
16
cg/cg2.h
@ -1,8 +1,8 @@
|
||||
#ifndef __CG2_H
|
||||
#define __CG2_H
|
||||
|
||||
int cg2100(int argc, char** argv);
|
||||
int cg2200(int argc, char** argv);
|
||||
|
||||
#endif // __CG2_H
|
||||
|
||||
#ifndef __CG2_H
|
||||
#define __CG2_H
|
||||
|
||||
int cg2100(int argc, char** argv);
|
||||
int cg2200(int argc, char** argv);
|
||||
|
||||
#endif // __CG2_H
|
||||
|
||||
|
416
cg/cg2100b.uml
416
cg/cg2100b.uml
@ -1,208 +1,208 @@
|
||||
#include "cg2100.h"
|
||||
|
||||
TOOLBAR "" 0 20 0 2
|
||||
|
||||
#include <toolbar.h>
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "OPERAZIONE DI PRIMA NOTA" -1 -1 77 20
|
||||
|
||||
GROUPBOX DLG_NULL 78 3
|
||||
BEGIN
|
||||
PROMPT 1 0 "@BMovimento di sola contabilita'"
|
||||
END
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 3 1 "Ditta "
|
||||
FLAGS "FRD"
|
||||
USE LF_NDITTE KEY 1
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
DISPLAY "Codice" CODDITTA
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 17 1 "Ragione "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_NUMREG 7
|
||||
BEGIN
|
||||
PROMPT 57 3 "Operazione n."
|
||||
FIELD NUMREG
|
||||
FLAGS "RD"
|
||||
KEY 1
|
||||
END
|
||||
|
||||
DATE F_DATAREG
|
||||
BEGIN
|
||||
PROMPT 1 3 "Data operazione "
|
||||
FIELD DATAREG
|
||||
END
|
||||
|
||||
|
||||
DATE F_DATACOMP
|
||||
BEGIN
|
||||
PROMPT 1 4 "Data di competenza "
|
||||
FIELD DATACOMP
|
||||
END
|
||||
|
||||
NUMBER F_ANNOES 4
|
||||
BEGIN
|
||||
PROMPT 57 4 "Esercizio "
|
||||
FIELD ANNOES
|
||||
FLAGS "DRZ"
|
||||
END
|
||||
|
||||
DATE F_DATADOC
|
||||
BEGIN
|
||||
PROMPT 1 5 "Data del documento "
|
||||
FIELD DATADOC
|
||||
WARNING "Specificare una data del documento non superiore a quella dell'operazione"
|
||||
VALIDATE DATE_CMP_FUNC <= F_DATAREG
|
||||
END
|
||||
|
||||
STRING F_NUMDOC 7
|
||||
BEGIN
|
||||
PROMPT 57 5 "Documento n. "
|
||||
FIELD NUMDOC
|
||||
WARNING "La causale impone di specificare il numero documento"
|
||||
END
|
||||
|
||||
NUMBER F_ANNOIVA 4
|
||||
BEGIN
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING F_DESCAGG 5
|
||||
BEGIN
|
||||
PROMPT 1 6 "Descrizione "
|
||||
FLAGS "U"
|
||||
USE %DPN
|
||||
INPUT CODTAB F_DESCAGG
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_DESCAGG CODTAB
|
||||
OUTPUT F_DESCR S0
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESCR 50
|
||||
BEGIN
|
||||
PROMPT 25 6 ""
|
||||
FIELD DESCR
|
||||
USE %DPN KEY 2
|
||||
INPUT S0 F_DESCR
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
COPY OUTPUT F_DESCAGG
|
||||
END
|
||||
|
||||
LIST F_PROVVISORIO 1 25
|
||||
BEGIN
|
||||
PROMPT 1 7 "Movimento provvisorio "
|
||||
FIELD PROVVIS
|
||||
ITEM " |No (movimento normale)"
|
||||
ITEM "P|Si (cancellabile)"
|
||||
ITEM "N|Si (non cancellabile)"
|
||||
END
|
||||
|
||||
STRING F_CODCAUS 3
|
||||
BEGIN
|
||||
PROMPT 1 8 "Causale "
|
||||
FLAGS "U"
|
||||
FIELD CODCAUS
|
||||
USE LF_CAUSALI KEY 1
|
||||
INPUT CODCAUS F_CODCAUS
|
||||
DISPLAY "Codice" CODCAUS
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT F_CODCAUS CODCAUS
|
||||
OUTPUT F_DESCRCAUS DESCR
|
||||
CHECKTYPE NORMAL
|
||||
ADD RUN cg0 -4
|
||||
END
|
||||
|
||||
STRING F_DESCRCAUS 50
|
||||
BEGIN
|
||||
PROMPT 23 8 ""
|
||||
USE LF_CAUSALI KEY 2
|
||||
INPUT DESCR F_DESCRCAUS
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
DISPLAY "Codice" CODCAUS
|
||||
COPY OUTPUT F_CODCAUS
|
||||
END
|
||||
|
||||
STRING F_VALUTA 3
|
||||
BEGIN
|
||||
PROMPT 1 9 "Valuta "
|
||||
FIELD CODVAL
|
||||
FLAGS "U"
|
||||
GROUP 3
|
||||
USE %VAL
|
||||
INPUT CODTAB F_VALUTA
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Nome@50" S0
|
||||
DISPLAY "Cambio corrente" R0
|
||||
OUTPUT F_VALUTA CODTAB
|
||||
OUTPUT F_CAMBIO R0
|
||||
END
|
||||
|
||||
NUMBER F_CAMBIO 10
|
||||
BEGIN
|
||||
PROMPT 16 9 "Cambio "
|
||||
FIELD CAMBIO
|
||||
FLAGS "RU"
|
||||
GROUP 3
|
||||
PICTURE ".3"
|
||||
END
|
||||
|
||||
BOOLEAN F_VISVAL
|
||||
BEGIN
|
||||
PROMPT 42 9 "Visualizza importi in valuta"
|
||||
GROUP 3
|
||||
END
|
||||
|
||||
SPREADSHEET F_SHEETCG
|
||||
BEGIN
|
||||
PROMPT 0 9 ""
|
||||
ITEM "Dare@17"
|
||||
ITEM "Avere@17"
|
||||
ITEM " @1"
|
||||
ITEM "Gr."
|
||||
ITEM "Co."
|
||||
ITEM "Sottoc."
|
||||
ITEM "Descrizione conto@50"
|
||||
ITEM "Codice"
|
||||
ITEM "Descrizione riga@50"
|
||||
ITEM " @1"
|
||||
ITEM "Gr./c"
|
||||
ITEM "Co./c"
|
||||
ITEM "Sottoc./c"
|
||||
ITEM "Descrizione contropartita@50"
|
||||
ITEM " @1"
|
||||
END
|
||||
|
||||
NUMBER F_DARE 17
|
||||
BEGIN
|
||||
PROMPT 1 -1 "Sbilancio Dare "
|
||||
FLAGS "DRV"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER F_AVERE 17
|
||||
BEGIN
|
||||
PROMPT 41 -1 "Sbilancio Avere "
|
||||
FLAGS "DRV"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
#include "cg21cg.uml"
|
||||
|
||||
#include "cg2100.h"
|
||||
|
||||
TOOLBAR "" 0 20 0 2
|
||||
|
||||
#include <toolbar.h>
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "OPERAZIONE DI PRIMA NOTA" -1 -1 77 20
|
||||
|
||||
GROUPBOX DLG_NULL 78 3
|
||||
BEGIN
|
||||
PROMPT 1 0 "@BMovimento di sola contabilita'"
|
||||
END
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 3 1 "Ditta "
|
||||
FLAGS "FRD"
|
||||
USE LF_NDITTE KEY 1
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
DISPLAY "Codice" CODDITTA
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 17 1 "Ragione "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_NUMREG 7
|
||||
BEGIN
|
||||
PROMPT 57 3 "Operazione n."
|
||||
FIELD NUMREG
|
||||
FLAGS "RD"
|
||||
KEY 1
|
||||
END
|
||||
|
||||
DATE F_DATAREG
|
||||
BEGIN
|
||||
PROMPT 1 3 "Data operazione "
|
||||
FIELD DATAREG
|
||||
END
|
||||
|
||||
|
||||
DATE F_DATACOMP
|
||||
BEGIN
|
||||
PROMPT 1 4 "Data di competenza "
|
||||
FIELD DATACOMP
|
||||
END
|
||||
|
||||
NUMBER F_ANNOES 4
|
||||
BEGIN
|
||||
PROMPT 57 4 "Esercizio "
|
||||
FIELD ANNOES
|
||||
FLAGS "DRZ"
|
||||
END
|
||||
|
||||
DATE F_DATADOC
|
||||
BEGIN
|
||||
PROMPT 1 5 "Data del documento "
|
||||
FIELD DATADOC
|
||||
WARNING "Specificare una data del documento non superiore a quella dell'operazione"
|
||||
VALIDATE DATE_CMP_FUNC <= F_DATAREG
|
||||
END
|
||||
|
||||
STRING F_NUMDOC 7
|
||||
BEGIN
|
||||
PROMPT 57 5 "Documento n. "
|
||||
FIELD NUMDOC
|
||||
WARNING "La causale impone di specificare il numero documento"
|
||||
END
|
||||
|
||||
NUMBER F_ANNOIVA 4
|
||||
BEGIN
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING F_DESCAGG 5
|
||||
BEGIN
|
||||
PROMPT 1 6 "Descrizione "
|
||||
FLAGS "U"
|
||||
USE %DPN
|
||||
INPUT CODTAB F_DESCAGG
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_DESCAGG CODTAB
|
||||
OUTPUT F_DESCR S0
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESCR 50
|
||||
BEGIN
|
||||
PROMPT 25 6 ""
|
||||
FIELD DESCR
|
||||
USE %DPN KEY 2
|
||||
INPUT S0 F_DESCR
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
COPY OUTPUT F_DESCAGG
|
||||
END
|
||||
|
||||
LIST F_PROVVISORIO 1 25
|
||||
BEGIN
|
||||
PROMPT 1 7 "Movimento provvisorio "
|
||||
FIELD PROVVIS
|
||||
ITEM " |No (movimento normale)"
|
||||
ITEM "P|Si (cancellabile)"
|
||||
ITEM "N|Si (non cancellabile)"
|
||||
END
|
||||
|
||||
STRING F_CODCAUS 3
|
||||
BEGIN
|
||||
PROMPT 1 8 "Causale "
|
||||
FLAGS "U"
|
||||
FIELD CODCAUS
|
||||
USE LF_CAUSALI KEY 1
|
||||
INPUT CODCAUS F_CODCAUS
|
||||
DISPLAY "Codice" CODCAUS
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT F_CODCAUS CODCAUS
|
||||
OUTPUT F_DESCRCAUS DESCR
|
||||
CHECKTYPE NORMAL
|
||||
ADD RUN cg0 -4
|
||||
END
|
||||
|
||||
STRING F_DESCRCAUS 50
|
||||
BEGIN
|
||||
PROMPT 23 8 ""
|
||||
USE LF_CAUSALI KEY 2
|
||||
INPUT DESCR F_DESCRCAUS
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
DISPLAY "Codice" CODCAUS
|
||||
COPY OUTPUT F_CODCAUS
|
||||
END
|
||||
|
||||
STRING F_VALUTA 3
|
||||
BEGIN
|
||||
PROMPT 1 9 "Valuta "
|
||||
FIELD CODVAL
|
||||
FLAGS "U"
|
||||
GROUP 3
|
||||
USE %VAL
|
||||
INPUT CODTAB F_VALUTA
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Nome@50" S0
|
||||
DISPLAY "Cambio corrente" R0
|
||||
OUTPUT F_VALUTA CODTAB
|
||||
OUTPUT F_CAMBIO R0
|
||||
END
|
||||
|
||||
NUMBER F_CAMBIO 10
|
||||
BEGIN
|
||||
PROMPT 16 9 "Cambio "
|
||||
FIELD CAMBIO
|
||||
FLAGS "RU"
|
||||
GROUP 3
|
||||
PICTURE ".3"
|
||||
END
|
||||
|
||||
BOOLEAN F_VISVAL
|
||||
BEGIN
|
||||
PROMPT 42 9 "Visualizza importi in valuta"
|
||||
GROUP 3
|
||||
END
|
||||
|
||||
SPREADSHEET F_SHEETCG
|
||||
BEGIN
|
||||
PROMPT 0 9 ""
|
||||
ITEM "Dare@17"
|
||||
ITEM "Avere@17"
|
||||
ITEM " @1"
|
||||
ITEM "Gr."
|
||||
ITEM "Co."
|
||||
ITEM "Sottoc."
|
||||
ITEM "Descrizione conto@50"
|
||||
ITEM "Codice"
|
||||
ITEM "Descrizione riga@50"
|
||||
ITEM " @1"
|
||||
ITEM "Gr./c"
|
||||
ITEM "Co./c"
|
||||
ITEM "Sottoc./c"
|
||||
ITEM "Descrizione contropartita@50"
|
||||
ITEM " @1"
|
||||
END
|
||||
|
||||
NUMBER F_DARE 17
|
||||
BEGIN
|
||||
PROMPT 1 -1 "Sbilancio Dare "
|
||||
FLAGS "DRV"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER F_AVERE 17
|
||||
BEGIN
|
||||
PROMPT 41 -1 "Sbilancio Avere "
|
||||
FLAGS "DRV"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
#include "cg21cg.uml"
|
||||
|
||||
|
102
cg/cg2101.h
102
cg/cg2101.h
@ -1,51 +1,51 @@
|
||||
#ifndef __CG2101_H
|
||||
#define __CG2101_H
|
||||
|
||||
#ifndef __RELATION_H
|
||||
#include <relation.h>
|
||||
#endif
|
||||
|
||||
int date2esc(const TDate& d, int* prevesc = NULL);
|
||||
|
||||
class TMovimentoPN : public TRelation
|
||||
{
|
||||
// class TMovimentoPN : public TRelation
|
||||
// @END
|
||||
|
||||
// @DPRIV
|
||||
TArray _cg, _iva;
|
||||
int _oldcg, _oldiva;
|
||||
real _balance;
|
||||
// @END
|
||||
|
||||
protected:
|
||||
// @FPROT
|
||||
int write_rec(bool re, const TRectype&r, TLocalisamfile& f);
|
||||
int cancella(TLocalisamfile& f, int da, int a);
|
||||
int registra(bool re, bool force);
|
||||
int read_mov_rows();
|
||||
// @END
|
||||
|
||||
public:
|
||||
// @FPUB
|
||||
virtual int next(TReclock lockop = _nolock) { return (file().next(lockop) || read_mov_rows()); }
|
||||
virtual int prev(TReclock lockop = _nolock) { return (file().prev(lockop) || read_mov_rows()); }
|
||||
virtual int first(TReclock lockop = _nolock) { return (file().first(lockop) || read_mov_rows()); }
|
||||
virtual int last(TReclock lockop = _nolock) { return (file().last(lockop) || read_mov_rows()); }
|
||||
virtual int skip(TRecnotype nrec, TReclock lockop = _nolock) { return (file().skip(nrec, lockop) || read_mov_rows()); }
|
||||
virtual int read(TIsamop op = _isgteq, TReclock lockop = _nolock, TDate& atdate = (TDate&)botime);
|
||||
virtual int write (bool force = TRUE, TDate& atdate = (TDate&)botime);
|
||||
virtual int rewrite(bool force = TRUE, TDate& atdate = (TDate&)botime);
|
||||
virtual int remove (TDate& atdate = (TDate&)botime);
|
||||
|
||||
TRectype& cg(int i);
|
||||
TRectype& iva(int i);
|
||||
int cg_items() const { return _cg.items(); }
|
||||
int iva_items() const { return _iva.items(); }
|
||||
void destroy_rows();
|
||||
|
||||
TMovimentoPN();
|
||||
virtual ~TMovimentoPN() {}
|
||||
};
|
||||
|
||||
#endif
|
||||
#ifndef __CG2101_H
|
||||
#define __CG2101_H
|
||||
|
||||
#ifndef __RELATION_H
|
||||
#include <relation.h>
|
||||
#endif
|
||||
|
||||
int date2esc(const TDate& d, int* prevesc = NULL);
|
||||
|
||||
class TMovimentoPN : public TRelation
|
||||
{
|
||||
// class TMovimentoPN : public TRelation
|
||||
// @END
|
||||
|
||||
// @DPRIV
|
||||
TArray _cg, _iva;
|
||||
int _oldcg, _oldiva;
|
||||
real _balance;
|
||||
// @END
|
||||
|
||||
protected:
|
||||
// @FPROT
|
||||
int write_rec(bool re, const TRectype&r, TLocalisamfile& f);
|
||||
int cancella(TLocalisamfile& f, int da, int a);
|
||||
int registra(bool re, bool force);
|
||||
int read_mov_rows();
|
||||
// @END
|
||||
|
||||
public:
|
||||
// @FPUB
|
||||
virtual int next(TReclock lockop = _nolock) { return (file().next(lockop) || read_mov_rows()); }
|
||||
virtual int prev(TReclock lockop = _nolock) { return (file().prev(lockop) || read_mov_rows()); }
|
||||
virtual int first(TReclock lockop = _nolock) { return (file().first(lockop) || read_mov_rows()); }
|
||||
virtual int last(TReclock lockop = _nolock) { return (file().last(lockop) || read_mov_rows()); }
|
||||
virtual int skip(TRecnotype nrec, TReclock lockop = _nolock) { return (file().skip(nrec, lockop) || read_mov_rows()); }
|
||||
virtual int read(TIsamop op = _isgteq, TReclock lockop = _nolock, TDate& atdate = (TDate&)botime);
|
||||
virtual int write (bool force = TRUE, TDate& atdate = (TDate&)botime);
|
||||
virtual int rewrite(bool force = TRUE, TDate& atdate = (TDate&)botime);
|
||||
virtual int remove (TDate& atdate = (TDate&)botime);
|
||||
|
||||
TRectype& cg(int i);
|
||||
TRectype& iva(int i);
|
||||
int cg_items() const { return _cg.items(); }
|
||||
int iva_items() const { return _iva.items(); }
|
||||
void destroy_rows();
|
||||
|
||||
TMovimentoPN();
|
||||
virtual ~TMovimentoPN() {}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -837,11 +837,12 @@ bool TPrimanota_application::datareg_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
const TLibro_giornale& gio = app().giornale();
|
||||
if (dr <= gio.last_print())
|
||||
return f.error_box("La data dell'operazione e' antecedente al %s, ultima stampa\n"
|
||||
"del libro giornale dell'esercizio %d", gio.last_reg().string(), ae);
|
||||
return f.error_box("La data dell'operazione e' antecedente al %s,\n"
|
||||
"ultima stampa del libro giornale dell'esercizio %d",
|
||||
gio.last_reg().string(), ae);
|
||||
if (dr < gio.last_reg())
|
||||
warning_box("La data dell'operazione e' antecedente al %s, ultima registrazione\n"
|
||||
"sul libro giornale dell'esercizio %d",
|
||||
warning_box("La data dell'operazione e' antecedente al %s,\n"
|
||||
"ultima registrazione sul libro giornale dell'esercizio %d",
|
||||
gio.last_reg().string(), ae);
|
||||
|
||||
if (m.query_mode())
|
||||
@ -858,13 +859,13 @@ bool TPrimanota_application::datareg_handler(TMask_field& f, KEY key)
|
||||
if (!ok) return FALSE;
|
||||
}
|
||||
|
||||
if (dr <= reg.last_print())
|
||||
return error_box("La data dell'operazione e' antecedente al %s, ultima\n"
|
||||
"data di stampa del registro '%s' dell'anno %d",
|
||||
if (dr < reg.last_print())
|
||||
return error_box("La data dell'operazione e' antecedente al %s,\n"
|
||||
"ultima stampa del registro '%s' dell'anno %d",
|
||||
reg.last_print().string(), (const char*)codreg, dr.year());
|
||||
if (dr < reg.last_reg())
|
||||
warning_box("La data dell'operazione e' antecedente al %s, ultima registrazione\n"
|
||||
"sul registro '%s' dell'anno %d",
|
||||
warning_box("La data dell'operazione e' antecedente al %s,\n"
|
||||
"ultima registrazione sul registro '%s' dell'anno %d",
|
||||
reg.last_reg().string(), (const char*)codreg, dr.year());
|
||||
}
|
||||
}
|
||||
@ -876,15 +877,12 @@ bool TPrimanota_application::datareg_handler(TMask_field& f, KEY key)
|
||||
// Certified 90%
|
||||
bool TPrimanota_application::datacomp_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (!f.to_check(key, TRUE))
|
||||
return TRUE;
|
||||
|
||||
const TDate dc(f.get()); // Data di competenza
|
||||
const int ae = date2esc(dc); // Esercizio corrispondente
|
||||
TMask& m = f.mask();
|
||||
|
||||
if (ae)
|
||||
{
|
||||
if ((key == K_TAB && f.focusdirty()) || key == K_ENTER)
|
||||
{
|
||||
const TDate dc(f.get()); // Data di competenza
|
||||
const int ae = date2esc(dc); // Esercizio corrispondente
|
||||
TMask& m = f.mask();
|
||||
|
||||
const char* data = "";
|
||||
if (f.dlg() == F_DATACOMP)
|
||||
{
|
||||
@ -894,19 +892,22 @@ bool TPrimanota_application::datacomp_handler(TMask_field& f, KEY key)
|
||||
else
|
||||
data = "del 74/ter";
|
||||
|
||||
const TDate dr(m.get(F_DATAREG)); // Data operazione
|
||||
int pr; // Esercizio precedente
|
||||
const int ar = date2esc(dr, &pr); // Esercizio in corso
|
||||
if (ae != ar && ae != pr)
|
||||
{
|
||||
TString80 e;
|
||||
e << "La data " << data << " deve appartenere all'esercizio " << ar;
|
||||
if (pr > 0) e << " o al " << pr;
|
||||
return f.error_box(e);
|
||||
}
|
||||
}
|
||||
else
|
||||
return f.error_box("La data non appartiene a nessun esercizio");
|
||||
if (ae)
|
||||
{
|
||||
const TDate dr(m.get(F_DATAREG)); // Data operazione
|
||||
int pr; // Esercizio precedente
|
||||
const int ar = date2esc(dr, &pr); // Esercizio in corso
|
||||
if (ae != ar && ae != pr)
|
||||
{
|
||||
TString80 e;
|
||||
e << "La data " << data << " deve appartenere all'esercizio " << ar;
|
||||
if (pr > 0) e << " o al " << pr;
|
||||
return f.error_box(e);
|
||||
}
|
||||
}
|
||||
else
|
||||
return f.error_box("La data %s non appartiene a nessun esercizio", data);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -240,23 +240,23 @@ TCausale::TCausale(const char* cod, int year)
|
||||
// Legge le righe della causale attualmente selezionata sulla maschera
|
||||
bool TCausale::read(const char* cod, int year)
|
||||
{
|
||||
TLocalisamfile caus(LF_CAUSALI);
|
||||
|
||||
_rec = caus.curr(); _rec.zero(); // Delete header
|
||||
destroy(); // Delete all rows
|
||||
|
||||
_iva = iva_errata;
|
||||
_iva = iva_errata; // Delete misc info
|
||||
_sezione_clifo = _sezione_ritsoc = ' ';
|
||||
|
||||
if (*cod > ' ')
|
||||
{
|
||||
|
||||
TLocalisamfile caus(LF_CAUSALI);
|
||||
caus.setkey(1);
|
||||
caus.zero();
|
||||
caus.put(CAU_CODCAUS, cod);
|
||||
|
||||
int err = caus.read();
|
||||
_rec = caus.curr();
|
||||
if (err != NOERR) return FALSE;
|
||||
|
||||
_rec = caus.curr();
|
||||
|
||||
TLocalisamfile rcaus(LF_RCAUSALI);
|
||||
rcaus.setkey(1);
|
||||
rcaus.zero();
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <applicat.h>
|
||||
#include <mask.h>
|
||||
#include <progind.h>
|
||||
#include <urldefid.h>
|
||||
|
||||
#include "cg2200.h"
|
||||
@ -9,6 +10,28 @@
|
||||
#include <rmov.h>
|
||||
#include <rmoviva.h>
|
||||
|
||||
TString& add_plural(TString& s, long num, const char* name)
|
||||
{
|
||||
const TFixed_string n(name);
|
||||
const char last = *n.right(1);
|
||||
|
||||
if (num < 1)
|
||||
{
|
||||
s << "nessun";
|
||||
if (strchr("aeiou", n[0]) == NULL)
|
||||
s << last;
|
||||
s << ' ' << name;
|
||||
}
|
||||
else
|
||||
{
|
||||
s << num << ' ' << name;
|
||||
if (num > 1)
|
||||
s[s.len()-1] = (last == 'a') ? 'e' : 'i';
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
class TDeleteprovv_app : public TApplication
|
||||
{
|
||||
protected:
|
||||
@ -33,42 +56,75 @@ bool TDeleteprovv_app::destroy()
|
||||
|
||||
bool TDeleteprovv_app::menu(MENU_TAG)
|
||||
{
|
||||
TLocalisamfile mov(LF_MOV), rmov(LF_RMOV), rmoviva(LF_RMOVIVA);
|
||||
TMask m("cg2200a");
|
||||
TCursor& cur = *m.efield(F_FROMDATE).browse()->cursor();
|
||||
TLocalisamfile& mov = cur.file(LF_MOV);
|
||||
TLocalisamfile rmov(LF_RMOV);
|
||||
TLocalisamfile rmoviva(LF_RMOVIVA);
|
||||
|
||||
while (m.run() != K_QUIT)
|
||||
{
|
||||
mov.setkey(2);
|
||||
rmov.setkey(1);
|
||||
rmoviva.setkey(1);
|
||||
|
||||
TRectype to(mov.curr());
|
||||
to.zero();
|
||||
to.put(MOV_DATAREG, m.get(F_TODATE));
|
||||
to.put(MOV_NUMREG, m.get(F_TOREG));
|
||||
{
|
||||
TRecnotype last = cur.items()-1;
|
||||
mov.zero();
|
||||
const char* s = m.get(F_TODATE);
|
||||
if (*s)
|
||||
{
|
||||
mov.put(MOV_DATAREG, s);
|
||||
mov.put(MOV_NUMREG, m.get(F_TOREG));
|
||||
last = cur.read();
|
||||
}
|
||||
|
||||
mov.zero();
|
||||
mov.put(MOV_DATAREG, m.get(F_FROMDATE));
|
||||
mov.put(MOV_NUMREG, m.get(F_FROMREG));
|
||||
for (mov.read(_isequal, _lock); mov.good(); mov.next())
|
||||
const TRecnotype first = cur.read();
|
||||
|
||||
const TRecnotype total = last-first+1;
|
||||
TString80 caption("Cancellazione di ");
|
||||
add_plural(caption, total, "movimento");
|
||||
|
||||
if (!yesno_box(caption))
|
||||
continue;
|
||||
|
||||
TProgind pi(total, caption, FALSE, TRUE, 24);
|
||||
|
||||
for (cur = first; cur.pos() <= last; ++cur)
|
||||
{
|
||||
if (mov.curr() > to) break;
|
||||
const long numreg = mov.get_long(MOV_NUMREG);
|
||||
for (int rig = 1; ; rig++)
|
||||
|
||||
int err = cur.lock();
|
||||
for (int rig = 1; err == NOERR; rig++)
|
||||
{
|
||||
rmov.put(RMV_NUMREG, numreg);
|
||||
rmov.put(RMV_NUMRIG, rig);
|
||||
if (rmov.read(_isequal, _lock) != NOERR) break;
|
||||
rmov.remove();
|
||||
err = rmov.remove();
|
||||
if (err != NOERR)
|
||||
caption.format("riga contabile %d", rig);
|
||||
}
|
||||
for (rig = 1; ; rig++)
|
||||
for (rig = 1; err == NOERR; rig++)
|
||||
{
|
||||
rmov.put(RMI_NUMREG, numreg);
|
||||
rmoviva.put(RMI_NUMREG, numreg);
|
||||
rmoviva.put(RMI_NUMRIG, rig);
|
||||
if (rmoviva.read(_isequal, _lock) != NOERR) break;
|
||||
rmov.remove();
|
||||
err = rmov.remove();
|
||||
if (err != NOERR)
|
||||
caption.format("riga IVA %d", rig);
|
||||
}
|
||||
|
||||
if (err == NOERR)
|
||||
err = mov.remove();
|
||||
else
|
||||
caption = "testata";
|
||||
|
||||
if (err == NOERR)
|
||||
pi.addstatus(1);
|
||||
else
|
||||
{
|
||||
error_box("Errore %d nella cancellazione della %s del movimento %ld",
|
||||
err, (const char*)caption, numreg);
|
||||
break;
|
||||
}
|
||||
mov.remove();
|
||||
}
|
||||
}
|
||||
|
||||
@ -79,6 +135,6 @@ bool TDeleteprovv_app::menu(MENU_TAG)
|
||||
int cg2200(int argc, char** argv)
|
||||
{
|
||||
TDeleteprovv_app a;
|
||||
a.run(argc, argv, "Cancellazione movimenti provvisori");
|
||||
a.run(argc, argv, "Eliminazione movimenti provvisori");
|
||||
return 0;
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
#include "cg2200.h"
|
||||
|
||||
PAGE "Eliminazione Movimenti Provvisori" -1 -1 44 9
|
||||
PAGE "Eliminazione Movimenti Provvisori" -1 -1 42 9
|
||||
|
||||
GROUPBOX DLG_NULL 42 3
|
||||
GROUPBOX DLG_NULL 40 3
|
||||
BEGIN
|
||||
PROMPT 1 1 "Dal movimento"
|
||||
END
|
||||
@ -13,11 +13,11 @@ BEGIN
|
||||
USE LF_MOV KEY 2 SELECT PROVVIS="P"
|
||||
INPUT DATAREG F_FROMDATE
|
||||
INPUT NUMREG F_FROMREG
|
||||
DISPLAY "Data@10" DATAREG
|
||||
DISPLAY "Numero@6" NUMREG
|
||||
DISPLAY "Causale" CODCAUS
|
||||
DISPLAY "Documento" NUMDOC
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
DISPLAY "Data@10" DATAREG
|
||||
DISPLAY "Numero@6" NUMREG
|
||||
DISPLAY "Causale" CODCAUS
|
||||
DISPLAY "Documento" NUMDOC
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT F_FROMDATE DATAREG
|
||||
OUTPUT F_FROMREG NUMREG
|
||||
CHECKTYPE NORMAL
|
||||
@ -26,10 +26,10 @@ END
|
||||
NUMBER F_FROMREG 5
|
||||
BEGIN
|
||||
PROMPT 22 2 "Operazione "
|
||||
FLAGS "D"
|
||||
FLAGS "DR"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 42 3
|
||||
GROUPBOX DLG_NULL 40 3
|
||||
BEGIN
|
||||
PROMPT 1 4 "Al movimento"
|
||||
END
|
||||
@ -37,17 +37,22 @@ END
|
||||
DATE F_TODATE
|
||||
BEGIN
|
||||
PROMPT 2 5 "Data "
|
||||
COPY ALL F_FROMDATE
|
||||
COPY USE F_FROMDATE
|
||||
INPUT DATAREG F_TODATE
|
||||
INPUT NUMREG F_TOREG
|
||||
COPY DISPLAY F_FROMDATE
|
||||
OUTPUT F_TODATE DATAREG
|
||||
OUTPUT F_TOREG NUMREG
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
NUMBER F_TOREG 5
|
||||
BEGIN
|
||||
PROMPT 22 5 "Operazione "
|
||||
FLAGS "D"
|
||||
FLAGS "DR"
|
||||
END
|
||||
|
||||
BUTTON DLG_DELREC 10 2
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
@ -57,4 +62,4 @@ BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
ENDPAGE
|
||||
|
3216
cg/cg4400.cpp
3216
cg/cg4400.cpp
File diff suppressed because it is too large
Load Diff
@ -175,6 +175,7 @@ BEGIN
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT FLD_COCACH CODCAUS
|
||||
CHECKTYPE NORMAL
|
||||
ADD RUN cg0 -4
|
||||
FIELD CoCaCh
|
||||
END
|
||||
|
||||
@ -186,6 +187,7 @@ BEGIN
|
||||
INPUT CODCAUS FLD_COCAAP
|
||||
COPY DISPLAY FLD_COCACH
|
||||
OUTPUT FLD_COCAAP CODCAUS
|
||||
ADD RUN cg0 -4
|
||||
CHECKTYPE NORMAL
|
||||
FIELD CoCaAp
|
||||
END
|
||||
@ -464,6 +466,7 @@ BEGIN
|
||||
INPUT CODCAUS FLD_RRCCRA
|
||||
COPY DISPLAY FLD_COCACH
|
||||
OUTPUT FLD_RRCCRA CODCAUS
|
||||
ADD RUN cg0 -4
|
||||
FIELD RrCcRa
|
||||
END
|
||||
|
||||
@ -475,6 +478,7 @@ BEGIN
|
||||
INPUT CODCAUS FLD_RRCCRI
|
||||
COPY DISPLAY FLD_COCACH
|
||||
OUTPUT FLD_RRCCRI CODCAUS
|
||||
ADD RUN cg0 -4
|
||||
FIELD RrCcRi
|
||||
END
|
||||
|
||||
|
250
cg/cglib.h
250
cg/cglib.h
@ -1,125 +1,125 @@
|
||||
#ifndef __CGLIB_H
|
||||
#define __CGLIB_H
|
||||
|
||||
#ifndef __ISAM_H
|
||||
#include <isam.h>
|
||||
#endif
|
||||
|
||||
#ifndef __ASSOC_H
|
||||
#include <assoc.h>
|
||||
#endif
|
||||
|
||||
#include "conto.h"
|
||||
|
||||
TLocalisamfile * get_descr_cf(TLocalisamfile * pconti,
|
||||
TLocalisamfile * clifo , int g, int c, long s);
|
||||
|
||||
class TClifo_list : public TArray
|
||||
{
|
||||
public:
|
||||
TClifo_list(int g, int c, char tipocf);
|
||||
TRectype& clifo(int i)const { return(TRectype&)this->operator[](i); }
|
||||
};
|
||||
|
||||
//typedef enum {scalare = 1, verifica} bilancio;
|
||||
|
||||
class Saldo
|
||||
{
|
||||
real _saldo, _saldo_iniziale, _prg_dare, _prg_avere;
|
||||
int _indbil;
|
||||
TRectype* _rec;
|
||||
//bilancio _bilancio;
|
||||
int _annoes;
|
||||
TDate _inizioEs, _fineEs;
|
||||
TString16 _codcaus;
|
||||
TDate _datareg;
|
||||
TDate _datacomp;
|
||||
TString _provv;
|
||||
|
||||
protected:
|
||||
void InFinEs(int);
|
||||
|
||||
public:
|
||||
int annoes () const { return _annoes; }
|
||||
//bilancio bil () const { return _bilancio; }
|
||||
void set_annoes (int anno) { _annoes = anno; }
|
||||
//void set_bil (bilancio bil) { _bilancio = bil; }
|
||||
void leggi_mov(long);
|
||||
bool causale_mov(long, const TDate&, const TDate&, TString&);
|
||||
const char* causale_chiusura_es();
|
||||
const char* causale_apertura_es();
|
||||
bool calcola_data_limite(int,int,int,long,const TDate&,const TDate&,int,bool,
|
||||
const TDate&,const TDate&,const TDate&,bool);
|
||||
bool calcola_ultima_immissione(int, int, int, int, long, int);
|
||||
bool ultima_immissione_bilancio(int anno,int g,int c,long s,int indbil);
|
||||
bool data_limite_bilancio(int,int,int,long,const TDate&,const TDate&,int,bool);
|
||||
real calcola_saldo_iniziale(int, int, int, long, int);
|
||||
bool calcola_clifo(int, int, int, int, int);
|
||||
TRectype& ricerca_progr_prec(int, int, int, long);
|
||||
real saldofin_esprec(int,int,int,long);
|
||||
real saldo() {return _saldo;}
|
||||
real saldoini() {return _saldo_iniziale;}
|
||||
real prgdare() {return _prg_dare;}
|
||||
real prgavere() {return _prg_avere;}
|
||||
bool calcola(int,int,int,int,long,const TDate&,const TDate&,int,bool,
|
||||
const TDate&,const TDate&,const TDate&,bool);
|
||||
bool prg_attuali(int,TConto&,int,real&,real&);
|
||||
bool prg_mov_eliminati(int,TConto&,int,real&,real&);
|
||||
Saldo();
|
||||
~Saldo();
|
||||
};
|
||||
|
||||
class TTab_conti : public TAssoc_array
|
||||
{
|
||||
void do_agg(TConto* tc, int anno_es, const real& importo, char sezione,
|
||||
bool movap, bool provv, bool somma, const char* key);
|
||||
public:
|
||||
void aggiorna_conto(const TConto& tc, int anno_es, const real& importo,
|
||||
char sezione, bool movap, bool provv, bool somma);
|
||||
void aggiorna_conto (int gruppo, int conto, long sottoconto, int anno_es,
|
||||
const real& importo, char sezione, bool movap,
|
||||
bool provv, bool somma);
|
||||
};
|
||||
|
||||
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
|
||||
TConto& tconti() { return *(TConto*)_tab_conti.get(); }
|
||||
|
||||
public:
|
||||
void clear_saldi(int year);
|
||||
void registra();
|
||||
void aggiorna (const TConto& tc, const real& importo, char sezione,
|
||||
bool somma=TRUE);
|
||||
void aggiorna (int gruppo, int conto, long sottoconto, const real& importo,
|
||||
char sezione, bool somma=TRUE);
|
||||
|
||||
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
|
||||
|
||||
#ifndef __ASSOC_H
|
||||
#include <assoc.h>
|
||||
#endif
|
||||
|
||||
#include "conto.h"
|
||||
|
||||
TLocalisamfile * get_descr_cf(TLocalisamfile * pconti,
|
||||
TLocalisamfile * clifo , int g, int c, long s);
|
||||
|
||||
class TClifo_list : public TArray
|
||||
{
|
||||
public:
|
||||
TClifo_list(int g, int c, char tipocf);
|
||||
TRectype& clifo(int i)const { return(TRectype&)this->operator[](i); }
|
||||
};
|
||||
|
||||
//typedef enum {scalare = 1, verifica} bilancio;
|
||||
|
||||
class Saldo
|
||||
{
|
||||
real _saldo, _saldo_iniziale, _prg_dare, _prg_avere;
|
||||
int _indbil;
|
||||
TRectype* _rec;
|
||||
//bilancio _bilancio;
|
||||
int _annoes;
|
||||
TDate _inizioEs, _fineEs;
|
||||
TString16 _codcaus;
|
||||
TDate _datareg;
|
||||
TDate _datacomp;
|
||||
TString _provv;
|
||||
|
||||
protected:
|
||||
void InFinEs(int);
|
||||
|
||||
public:
|
||||
int annoes () const { return _annoes; }
|
||||
//bilancio bil () const { return _bilancio; }
|
||||
void set_annoes (int anno) { _annoes = anno; }
|
||||
//void set_bil (bilancio bil) { _bilancio = bil; }
|
||||
void leggi_mov(long);
|
||||
bool causale_mov(long, const TDate&, const TDate&, TString&);
|
||||
const char* causale_chiusura_es();
|
||||
const char* causale_apertura_es();
|
||||
bool calcola_data_limite(int,int,int,long,const TDate&,const TDate&,int,bool,
|
||||
const TDate&,const TDate&,const TDate&,bool);
|
||||
bool calcola_ultima_immissione(int, int, int, int, long, int);
|
||||
bool ultima_immissione_bilancio(int anno,int g,int c,long s,int indbil);
|
||||
bool data_limite_bilancio(int,int,int,long,const TDate&,const TDate&,int,bool);
|
||||
real calcola_saldo_iniziale(int, int, int, long, int);
|
||||
bool calcola_clifo(int, int, int, int, int);
|
||||
TRectype& ricerca_progr_prec(int, int, int, long);
|
||||
real saldofin_esprec(int,int,int,long);
|
||||
real saldo() {return _saldo;}
|
||||
real saldoini() {return _saldo_iniziale;}
|
||||
real prgdare() {return _prg_dare;}
|
||||
real prgavere() {return _prg_avere;}
|
||||
bool calcola(int,int,int,int,long,const TDate&,const TDate&,int,bool,
|
||||
const TDate&,const TDate&,const TDate&,bool);
|
||||
bool prg_attuali(int,TConto&,int,real&,real&);
|
||||
bool prg_mov_eliminati(int,TConto&,int,real&,real&);
|
||||
Saldo();
|
||||
~Saldo();
|
||||
};
|
||||
|
||||
class TTab_conti : public TAssoc_array
|
||||
{
|
||||
void do_agg(TConto* tc, int anno_es, const real& importo, char sezione,
|
||||
bool movap, bool provv, bool somma, const char* key);
|
||||
public:
|
||||
void aggiorna_conto(const TConto& tc, int anno_es, const real& importo,
|
||||
char sezione, bool movap, bool provv, bool somma);
|
||||
void aggiorna_conto (int gruppo, int conto, long sottoconto, int anno_es,
|
||||
const real& importo, char sezione, bool movap,
|
||||
bool provv, bool somma);
|
||||
};
|
||||
|
||||
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
|
||||
TConto& tconti() { return *(TConto*)_tab_conti.get(); }
|
||||
|
||||
public:
|
||||
void clear_saldi(int year);
|
||||
void registra();
|
||||
void aggiorna (const TConto& tc, const real& importo, char sezione,
|
||||
bool somma=TRUE);
|
||||
void aggiorna (int gruppo, int conto, long sottoconto, const real& importo,
|
||||
char sezione, bool somma=TRUE);
|
||||
|
||||
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user