Aggiunto oggett TInteressi_IVA_table per utilizzare la tabella %VER.
git-svn-id: svn://10.65.10.50/trunk@2767 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ccb742cacc
commit
1b68829bf2
@ -1,8 +1,53 @@
|
||||
#ifndef __CGLIB03_H
|
||||
#include "cglib03.h"
|
||||
#endif
|
||||
|
||||
///////////////////////////////////
|
||||
// classe TInteressi_IVA_table //
|
||||
// per la lettura versamenti e //
|
||||
// e interessi IVA dalla tabella //
|
||||
///////////////////////////////////
|
||||
|
||||
TInteressi_IVA_table::TInteressi_IVA_table()
|
||||
{
|
||||
_ver = new TTable("%VER");
|
||||
}
|
||||
|
||||
TInteressi_IVA_table::~TInteressi_IVA_table()
|
||||
{
|
||||
delete _ver;
|
||||
}
|
||||
|
||||
int TInteressi_IVA_table::read(int anno, int mese)
|
||||
{
|
||||
TString k;
|
||||
k.format("%d%02d",anno,mese);
|
||||
_ver->zero();_ver->put("CODTAB",k);
|
||||
if (_ver->read(_isgteq) == NOERR)
|
||||
{
|
||||
TString cod = _ver->get("CODTAB");
|
||||
|
||||
if (cod > k)
|
||||
if (_ver->prev() != NOERR)
|
||||
_ver->zero();
|
||||
}
|
||||
else
|
||||
if (_ver->last() != NOERR)
|
||||
_ver->zero();
|
||||
return _ver->status();
|
||||
}
|
||||
|
||||
real TInteressi_IVA_table::get(int what)
|
||||
{
|
||||
TString fieldname;
|
||||
fieldname.format("R%d",what);
|
||||
return _ver->get_real(fieldname);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////
|
||||
// TRigaiva_array
|
||||
// Tabella per il calcolo degli imponibili Iva
|
||||
|
||||
#include "cglib03.h"
|
||||
///////////////////////////////////////////////
|
||||
|
||||
bool TRigaiva_array::add_riga(const real& imponibile, const real& imposta, const real& imponibilep, const real& impostap, const char* codiva, const int tipodet, const int tipocr, bool intra, const int tipoatt)
|
||||
{
|
||||
|
36
cg/cglib03.h
36
cg/cglib03.h
@ -1,10 +1,12 @@
|
||||
// cglib03.h
|
||||
// TRigaiva_array
|
||||
// Tabella per il calcolo degli imponibili Iva
|
||||
|
||||
#ifndef __CGLIB03_H
|
||||
#define __CGLIB03_H
|
||||
|
||||
#ifndef __TABUTIL_H
|
||||
#include <tabutil.h>
|
||||
#endif
|
||||
|
||||
#ifndef __REAL_H
|
||||
#include <real.h>
|
||||
#endif
|
||||
@ -13,6 +15,34 @@
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
// Defines per TInteressi_IVA_table. Servono per comporre i nomi dei campi
|
||||
|
||||
#define P_1_TRIMESTRE 0
|
||||
#define P_2_TRIMESTRE 1
|
||||
#define P_3_TRIMESTRE 2
|
||||
#define P_4_TRIMESTRE 3
|
||||
#define P_ANNUALE 4
|
||||
#define I_PERIODICO 5
|
||||
#define I_ANNUALE 6
|
||||
#define I_ACCONTOIVA 7
|
||||
#define I_INTEGRATIVO 8
|
||||
#define I_CESSAZIONE 9
|
||||
#define I_ART74 10
|
||||
#define B_LIQ_DIFF 11
|
||||
#define B_LIQ_NORM 12
|
||||
|
||||
class TInteressi_IVA_table : public TObject
|
||||
{
|
||||
TTable *_ver;
|
||||
|
||||
public:
|
||||
int read(int anno, int mese);
|
||||
int status() { return _ver->status();}
|
||||
real get(int what);
|
||||
TInteressi_IVA_table();
|
||||
~TInteressi_IVA_table();
|
||||
};
|
||||
|
||||
struct TDociva : public TObject
|
||||
{
|
||||
TString _descrdoc;
|
||||
@ -43,6 +73,8 @@ struct TRigaiva : public TObject
|
||||
{}
|
||||
};
|
||||
|
||||
// TRigaiva_array
|
||||
// Tabella per il calcolo degli imponibili Iva
|
||||
class TRigaiva_array : public TArray
|
||||
{
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user