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