campo-sirio/cg/cg2103.h

80 lines
1.8 KiB
C
Raw Normal View History

#ifndef __CG2103_H
#define __CG2103_H
// Registri ed esercizi
#ifndef __CGLIB01_H
#include "cglib01.h"
#endif
class TCausale : public TArray
{
TRectype _rec;
TRegistro _reg;
TipoIVA _iva;
bool _corrisp;
char _sezione_clifo, _sezione_ritsoc;
protected:
const TRectype* row(int num) const { return (const TRectype*)objptr(num); }
void calcIVA();
public: // TObject
virtual bool ok() const;
public:
TBill& bill(int num, TBill& c) const;
const char* codice() const;
const char* descrizione() const;
const char* desc_agg(int num) const;
bool data_doc() const;
bool num_doc() const;
bool apertura() const;
bool chiusura() const;
bool sezionale() const;
bool valuta() const;
bool intra() const;
bool valintra() const;
const TString& causale_inc_imm() const;
const TString& tipo_doc() const;
TRegistro& reg() const { return (TRegistro&)_reg; }
TipoIVA iva() const { return _iva; }
bool corrispettivi() const { return _corrisp; }
// bill deve essere il conto di ricavo
bool IVA2bill(const TCodiceIVA& iva, TBill& bill) const;
int tipomov() const;
bool saldaconto() const;
int link_m770() const;
char link_cespiti() const;
bool similar(const TCausale& c) const;
char sezione(int riga) const;
char sezione_clifo();
char sezione_ritsoc();
virtual bool read(const char* cod, int year);
TCausale(const char* code = "", int year = 0);
virtual ~TCausale() {}
};
#define RIGA_IVA_DETRAIBILE 3
#define RIGA_IVA_NON_DETRAIBILE 4
#define RIGA_RITENUTE_FISCALI 8
#define RIGA_RITENUTE_SOCIALI 9
#define RIGA_ABBUONI_PASSIVI 9
#define RIGA_ABBUONI_ATTIVI 10
#define RIGA_SPESE 11
#define RIGA_RITENUTE 12
#define RIGA_DIFFCAM 13
#endif