1994-09-22 16:46:40 +00:00
|
|
|
#ifndef __CG2101_H
|
|
|
|
#define __CG2101_H
|
|
|
|
|
1996-12-12 16:17:35 +00:00
|
|
|
#ifndef __RECARRAY_H
|
|
|
|
#include <recarray.h>
|
|
|
|
#endif
|
|
|
|
|
1994-09-22 16:46:40 +00:00
|
|
|
#ifndef __RELATION_H
|
|
|
|
#include <relation.h>
|
|
|
|
#endif
|
|
|
|
|
1997-06-20 08:52:24 +00:00
|
|
|
#ifndef __MOV_H
|
|
|
|
#include <mov.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __RMOV_H
|
|
|
|
#include <rmov.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __RMOVIVA_H
|
|
|
|
#include <rmoviva.h>
|
|
|
|
#endif
|
|
|
|
|
1997-06-19 14:33:52 +00:00
|
|
|
#ifndef __CGLIB01_H
|
1995-12-07 11:09:17 +00:00
|
|
|
class TRegistro;
|
|
|
|
#endif
|
|
|
|
|
1997-12-24 09:40:34 +00:00
|
|
|
#ifndef __CG2103_H
|
|
|
|
class TCausale;
|
|
|
|
#endif
|
|
|
|
|
1994-09-22 16:46:40 +00:00
|
|
|
class TMovimentoPN : public TRelation
|
|
|
|
{
|
|
|
|
// class TMovimentoPN : public TRelation
|
|
|
|
// @END
|
|
|
|
|
|
|
|
// @DPRIV
|
1995-04-20 14:29:00 +00:00
|
|
|
TRecord_array _cg, _iva;
|
1998-02-18 09:44:55 +00:00
|
|
|
TDate _olddataliq;
|
1994-09-22 16:46:40 +00:00
|
|
|
// @END
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// @FPROT
|
1995-04-20 14:29:00 +00:00
|
|
|
|
1994-09-22 16:46:40 +00:00
|
|
|
int registra(bool re, bool force);
|
|
|
|
int read_mov_rows();
|
1997-12-24 09:40:34 +00:00
|
|
|
|
|
|
|
bool detraibile(const TRectype& row, const TCausale& cau) const;
|
|
|
|
|
1994-09-22 16:46:40 +00:00
|
|
|
// @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()); }
|
1997-06-02 10:26:09 +00:00
|
|
|
virtual int read(TIsamop op = _isgteq, TReclock lockop = _nolock);
|
1997-11-12 10:46:27 +00:00
|
|
|
virtual int write (bool force = TRUE);
|
|
|
|
virtual int rewrite(bool force = TRUE);
|
|
|
|
virtual int remove();
|
1995-12-19 15:53:50 +00:00
|
|
|
|
|
|
|
const TRecord_array& cg_rows() const { return _cg; }
|
2003-02-25 14:39:02 +00:00
|
|
|
const TRecord_array& iva_rows() const { return _iva; }
|
1994-09-22 16:46:40 +00:00
|
|
|
TRectype& cg(int i);
|
|
|
|
TRectype& iva(int i);
|
1995-04-20 14:29:00 +00:00
|
|
|
int cg_items() const { return _cg.rows(); }
|
|
|
|
int iva_items() const { return _iva.rows(); }
|
|
|
|
void destroy_rows(long numreg);
|
2000-05-05 15:25:49 +00:00
|
|
|
void destroy_cg_row(int i);
|
1994-10-26 12:22:30 +00:00
|
|
|
|
1994-11-30 08:55:49 +00:00
|
|
|
int date2liq(const TDate& data) const; // Estrae dalla data il mese di liquidazione
|
1994-10-26 12:22:30 +00:00
|
|
|
char frequenza_versamenti(int year) const; // Ritorna 'M'ensile o 'T'rimestrale
|
1995-12-07 11:09:17 +00:00
|
|
|
bool controlla_liquidazione(const TDate& data, TRegistro& reg, bool reset = FALSE) const;
|
1996-01-11 15:44:06 +00:00
|
|
|
void adjust_rowtypes();
|
1994-09-22 16:46:40 +00:00
|
|
|
|
|
|
|
TMovimentoPN();
|
|
|
|
virtual ~TMovimentoPN() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|