Patch level : 12.0 no-patch
Files correlati : Commento : TMovimneto_contabile Aggiunti costruttori TMovimento_contabile(const TMovimento_contabile& mov); TMovimento_contabile(long numreg); TMovimento_contabile(const TRectype& mov); Aggiunte funzioni di copia virtual TMovimento_contabile & copy(const TMovimento_contabile & mov); virtual TObject* dup() const; virtual TMovimento_contabile& operator =(const TMovimento_contabile& mov); virtual TRectype& operator =(const TRectype & mov); Tolto il localisamfile dalle read
This commit is contained in:
parent
dbd80da360
commit
6970ea2f9b
@ -30,6 +30,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __PROGIND_H
|
#ifndef __PROGIND_H
|
||||||
|
class TDocumento;
|
||||||
class TProgind;
|
class TProgind;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1008,15 +1009,23 @@ public:
|
|||||||
int iva_rows() const { return iva().rows(); }
|
int iva_rows() const { return iva().rows(); }
|
||||||
bool solo_IVA() const { return iva_rows() > 0 && cg_rows() == 0; }
|
bool solo_IVA() const { return iva_rows() > 0 && cg_rows() == 0; }
|
||||||
|
|
||||||
virtual int readat(TBaseisamfile& f, TRecnotype nrec, word lockop = _nolock);
|
virtual int readat(TRecnotype nrec, word lockop = _nolock);
|
||||||
virtual int read(TBaseisamfile & f, word op = _isequal, word lockop = _nolock);
|
virtual int read(word op = _isequal, word lockop = _nolock);
|
||||||
virtual int TMovimento_contabile::remove();
|
virtual int TMovimento_contabile::remove();
|
||||||
|
|
||||||
|
virtual TMovimento_contabile & copy(const TMovimento_contabile & mov);
|
||||||
|
virtual TObject* dup() const { return new TMovimento_contabile(*this); }
|
||||||
|
virtual TMovimento_contabile& operator =(const TMovimento_contabile& mov) { return copy(mov); }
|
||||||
|
virtual TRectype& operator =(const TRectype & mov);
|
||||||
|
|
||||||
void adjust_rowtypes();
|
void adjust_rowtypes();
|
||||||
real imponibile(const char * codiva = nullptr) const ;
|
real imponibile(const char * codiva = nullptr) const ;
|
||||||
real imposta(const char * codiva = nullptr) const ;
|
real imposta(const char * codiva = nullptr) const ;
|
||||||
|
|
||||||
TMovimento_contabile();
|
TMovimento_contabile();
|
||||||
|
TMovimento_contabile(const TMovimento_contabile& mov);
|
||||||
|
TMovimento_contabile(long numreg);
|
||||||
|
TMovimento_contabile(const TRectype& mov);
|
||||||
virtual ~TMovimento_contabile() {}
|
virtual ~TMovimento_contabile() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -89,9 +89,34 @@ TMovimento_contabile::TMovimento_contabile()
|
|||||||
add_file(LF_RMOVIVA, RMV_NUMRIG);
|
add_file(LF_RMOVIVA, RMV_NUMRIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TMovimento_contabile::readat(TBaseisamfile& f, TRecnotype nrec, word lockop)
|
TMovimento_contabile::TMovimento_contabile(const TMovimento_contabile& mov)
|
||||||
|
: TMultiple_rectype(LF_MOV), _old_iva(LF_RMOVIVA, RMI_NUMRIG)
|
||||||
{
|
{
|
||||||
const int err = TMultiple_rectype::readat(f, nrec, lockop);
|
copy(mov);
|
||||||
|
}
|
||||||
|
|
||||||
|
TMovimento_contabile::TMovimento_contabile(long numreg)
|
||||||
|
: TMultiple_rectype(LF_MOV), _old_iva(LF_RMOVIVA, RMI_NUMRIG)
|
||||||
|
{
|
||||||
|
add_file(LF_RMOV, RMV_NUMRIG);
|
||||||
|
add_file(LF_RMOVIVA, RMV_NUMRIG);
|
||||||
|
put(MOV_NUMREG, numreg);
|
||||||
|
read(_isequal, _nolock);
|
||||||
|
}
|
||||||
|
|
||||||
|
TMovimento_contabile::TMovimento_contabile(const TRectype& mov)
|
||||||
|
: TMultiple_rectype(LF_MOV), _old_iva(LF_RMOVIVA, RMI_NUMRIG)
|
||||||
|
{
|
||||||
|
add_file(LF_RMOV, RMV_NUMRIG);
|
||||||
|
add_file(LF_RMOVIVA, RMV_NUMRIG);
|
||||||
|
*this = mov;
|
||||||
|
read(_isequal, _nolock);
|
||||||
|
}
|
||||||
|
|
||||||
|
int TMovimento_contabile::readat(TRecnotype nrec, word lockop)
|
||||||
|
{
|
||||||
|
TLocalisamfile f(LF_MOV);
|
||||||
|
const int err = TMultiple_rectype::readat(f, nrec, lockop);
|
||||||
|
|
||||||
if (err == NOERR)
|
if (err == NOERR)
|
||||||
{
|
{
|
||||||
@ -110,9 +135,9 @@ int TMovimento_contabile::readat(TBaseisamfile& f, TRecnotype nrec, word lockop)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TMovimento_contabile::read(TBaseisamfile & f, word op, word lockop)
|
int TMovimento_contabile::read( word op, word lockop)
|
||||||
{
|
{
|
||||||
const int err = TMultiple_rectype::read(f, op, lockop);
|
const int err = TMultiple_rectype::read(op, lockop);
|
||||||
|
|
||||||
if (err == NOERR)
|
if (err == NOERR)
|
||||||
{
|
{
|
||||||
@ -255,6 +280,21 @@ int TMovimento_contabile::write_rewrite(TBaseisamfile& f, bool re) const
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TMovimento_contabile& TMovimento_contabile::copy(const TMovimento_contabile & mov)
|
||||||
|
{
|
||||||
|
TMultiple_rectype::operator=((TMultiple_rectype &)mov);
|
||||||
|
|
||||||
|
_old_iva = mov._old_iva;
|
||||||
|
_olddataliq = mov._olddataliq;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
TRectype & TMovimento_contabile::operator =(const TRectype & mov)
|
||||||
|
{
|
||||||
|
return TMultiple_rectype::operator=(mov);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void TMovimento_contabile::find_movcoll()
|
void TMovimento_contabile::find_movcoll()
|
||||||
{
|
{
|
||||||
if (get_long(MOV_MOVCOLL) == 0L)
|
if (get_long(MOV_MOVCOLL) == 0L)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user