Corretta la ricostruzione saldi con uso della funzione
synchronize_bodies della TMov_mag Corretto l'azzeramento RIMIN in ricostruzione saldi git-svn-id: svn://10.65.10.50/trunk@4953 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6c3267b742
commit
5507e9b4cf
@ -353,7 +353,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
// IO ad alto livello
|
// IO ad alto livello
|
||||||
const char *get_next_key() ;
|
const char *get_next_key() ;
|
||||||
virtual int read(TBaseisamfile& f, word op = _isequal, word lockop = _nolock);
|
virtual void synchronize_bodies();
|
||||||
virtual int remove(TBaseisamfile& f) const ;
|
virtual int remove(TBaseisamfile& f) const ;
|
||||||
void add_automatiche();
|
void add_automatiche();
|
||||||
virtual int write(TBaseisamfile& f) const ;
|
virtual int write(TBaseisamfile& f) const ;
|
||||||
@ -368,7 +368,7 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool rebuild_balances(TString16 annoes, bool reset_giac=FALSE);
|
bool rebuild_balances(const TString16 annoes, bool reset_giac=FALSE);
|
||||||
|
|
||||||
#define FORM_MAXGIACLEV 4 // numero di livelli giacenza nel form
|
#define FORM_MAXGIACLEV 4 // numero di livelli giacenza nel form
|
||||||
#define FORM_MAXARTLEV 8 // numero di livelli codice nel form
|
#define FORM_MAXARTLEV 8 // numero di livelli codice nel form
|
||||||
|
@ -959,22 +959,23 @@ void TMov_mag::set_body_key(TRectype & rowrec)
|
|||||||
rowrec.put("NUMREG",get("NUMREG"));
|
rowrec.put("NUMREG",get("NUMREG"));
|
||||||
}
|
}
|
||||||
|
|
||||||
int TMov_mag::read(TBaseisamfile& f, word op , word lockop)
|
|
||||||
{
|
|
||||||
int res=TMultiple_rectype::read(f,op,lockop);
|
|
||||||
|
|
||||||
|
void TMov_mag::synchronize_bodies()
|
||||||
|
{
|
||||||
|
TMultiple_rectype::synchronize_bodies();
|
||||||
// reset delle strutture per il controlli delle variazioni dei saldi
|
// reset delle strutture per il controlli delle variazioni dei saldi
|
||||||
_annoes=get("ANNOES");
|
if (autoload_enabled())
|
||||||
lines_to_add.destroy();
|
{
|
||||||
lines_to_subtract.destroy();
|
_annoes=get("ANNOES");
|
||||||
|
lines_to_add.destroy();
|
||||||
const int nrows = rows();
|
lines_to_subtract.destroy();
|
||||||
|
const int nrows = rows();
|
||||||
for (int i = 1; i<= nrows; i++)
|
for (int i = 1; i<= nrows; i++)
|
||||||
line_deleted(line2key(i), line2data(i));
|
line_deleted(line2key(i), line2data(i));
|
||||||
return res;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int TMov_mag::remove(TBaseisamfile& f) const
|
int TMov_mag::remove(TBaseisamfile& f) const
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
@ -1334,7 +1335,7 @@ int TMov_mag::codice_esercizio(TDate &d)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//**********************
|
//**********************
|
||||||
bool rebuild_balances(TString16 annoes, bool reset_giac)
|
bool rebuild_balances(const TString16 annoes, bool reset_giac)
|
||||||
{
|
{
|
||||||
TArray used_files;
|
TArray used_files;
|
||||||
used_files.add(new TLocalisamfile(LF_RMOVMAG),LF_RMOVMAG);
|
used_files.add(new TLocalisamfile(LF_RMOVMAG),LF_RMOVMAG);
|
||||||
@ -1360,7 +1361,7 @@ bool rebuild_balances(TString16 annoes, bool reset_giac)
|
|||||||
while (!mag.eof() && currcode==mag.get("CODART"))
|
while (!mag.eof() && currcode==mag.get("CODART"))
|
||||||
{
|
{
|
||||||
mag.put("GIAC",0);
|
mag.put("GIAC",0);
|
||||||
mag.put("RIM",0);
|
mag.put("RIM",0);mag.put("VALRIM",0);
|
||||||
mag.put("ACQ",0);mag.put("VALACQ",0);
|
mag.put("ACQ",0);mag.put("VALACQ",0);
|
||||||
mag.put("ENT",0);mag.put("VALENT",0);
|
mag.put("ENT",0);mag.put("VALENT",0);
|
||||||
mag.put("VEN",0);mag.put("VALVEN",0);
|
mag.put("VEN",0);mag.put("VALVEN",0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user