Patch level : 10.0

Files correlati     : ef0
Ricompilazione Demo : [ ]
Commento            :
Corretto salvataggio distinte in disposizione incassi/pagamenti


git-svn-id: svn://10.65.10.50/branches/R_10_00@22601 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2012-03-06 16:47:39 +00:00
parent 609bf2257b
commit 4b24f487c7
2 changed files with 4 additions and 8 deletions

View File

@ -111,7 +111,7 @@ int TDistinta::write(bool force, TToken_string* dati_dist)
else
nriga = effetto.get_int(EFF_NRIGADIST);
//riscrivo l'effetto con i dati della distinta a cui appartiene
err = effetto.rewrite_write(f);
err = effetto.rewrite(f);
if (err != NOERR)
break;
}

View File

@ -501,7 +501,6 @@ bool TPE_mask::fill_distinta(bool clear_all)
TToken_string& row = sheet.row(rows++);
if (fill_row(rs, row, partially_unassigned, dist_cont, clear_all))
{
row.add(eff.get(EFF_CUP), sheet.cid2index(F_CUP));
row.add(eff.get(EFF_CIG), sheet.cid2index(F_CIG));
row.add(eff.get(EFF_CODABI), sheet.cid2index(F_ABIAPP));
@ -572,13 +571,11 @@ TRectype& TPE_mask::new_row_effetto(TDistinta& dist, char tipocf, long codcf, co
if (main_app().has_module(CUAUT))
{
const TString & eff_cup = eff.get(EFF_CUP);
found = (cup == eff_cup) && (cig == eff.get(EFF_CIG));
}
if (found && main_app().has_module(NPAUT))
{
const TString & eff_contsep = eff.get(EFF_CONTSEP);
found &= (contsep == eff_contsep);
}
if (found)
@ -676,14 +673,14 @@ void TPE_mask::save_rate()
f.put(EFF_TIPODIST, tipodist);
f.put(EFF_NDIST, numdist);
f.put(EFF_NRIGADIST, 1);
if (f.read() != NOERR)
if (f.read(_isgteq) != NOERR || f.get_char(EFF_TIPODIST) != tipodist || f.get_long(EFF_NDIST) != numdist)
break;
const long nd = get_free_num();
TString msg; msg.format(FR("La distinta %ld è già presente: verrà rinumerata in %ld"), numdist, nd);
log.log(1, msg);
numdist = nd;
}
_is_new = FALSE;
_is_new = false;
}
TDistinta distinta(tipodist, numdist, _lock);
@ -908,9 +905,9 @@ bool TPE_mask::on_sheet_event(TOperable_field& o, TField_event e, long jolly)
long TPE_mask::get_free_num() const
{
const TString& tipodist = get(F_TIPODIST);
TLocalisamfile eff(LF_EFFETTI); eff.setkey(4);
TRectype& curr = eff.curr();
const TString& tipodist = get(F_TIPODIST);
curr.put(EFF_TIPODIST, tipodist);
curr.put(EFF_NDIST, 99999L);
const int err = eff.read(_isgreat);
@ -1204,7 +1201,6 @@ bool TPagamento_effetti::create()
int ef0A00(int argc, char* argv[])
{
int n = 0;
TPagamento_effetti pe;
pe.run(argc, argv, TR("Disposizioni incassi/pagamenti"));
return 0;