Patch level : 10.0
Files correlati : Ricompilazione Demo : [ ] Commento : Corretto collegamento ad analitica in caso di movimenti gia'inseriti precedentemente git-svn-id: svn://10.65.10.50/trunk@20551 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
57a09a50cb
commit
262befbc79
@ -1292,16 +1292,7 @@ int TPrimanota_application::write(const TMask& m)
|
|||||||
link_m770();
|
link_m770();
|
||||||
link_cesp(m, "Insert");
|
link_cesp(m, "Insert");
|
||||||
link_intra(m, "Insert");
|
link_intra(m, "Insert");
|
||||||
|
link_anal(m, "Insert");
|
||||||
//Aggiunte in data 28/05/2010 per evitare un eventaule doppio movimento
|
|
||||||
//il problema si è presentato con le personalizzazioni dell'ATS ps0713
|
|
||||||
TLocalisamfile movana(LF_MOVANA);
|
|
||||||
movana.setkey(3);
|
|
||||||
movana.put("NUMREGCG", numreg);
|
|
||||||
int err = movana.read();
|
|
||||||
|
|
||||||
TString8 par = err == NOERR ? "Modify" : "Insert";
|
|
||||||
link_anal(m, par);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lasterr = err;
|
lasterr = err;
|
||||||
@ -2213,7 +2204,6 @@ bool TPrimanota_application::link_anal(const TMask& msk, const char* action)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
long nExist = 0L;
|
|
||||||
if (action[0] == 'I')
|
if (action[0] == 'I')
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -2222,24 +2212,28 @@ bool TPrimanota_application::link_anal(const TMask& msk, const char* action)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Controllo se esiste gia' il movimento
|
||||||
|
long nExist = 0L;
|
||||||
|
TLocalisamfile movana(LF_MOVANA);
|
||||||
|
movana.setkey(3);
|
||||||
|
movana.put(MOVANA_NUMREGCG, msk.get(F_NUMREG));
|
||||||
|
if (movana.read() == NOERR)
|
||||||
|
nExist = movana.get_long(MOVANA_NUMREG);
|
||||||
|
|
||||||
|
if (!nExist)
|
||||||
|
{
|
||||||
|
if (action[0] == 'R') // Nulla da cancellare
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (!bAnalBill) // Non c'erano e non ci sono tuttora conti analitici
|
||||||
|
return false;
|
||||||
|
action = "Insert"; // Il movimento e' andato perduto!
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Se sono in modo Modify o Remove, controllo se esiste il movimento
|
if (action[0] == 'I')
|
||||||
TLocalisamfile movana(LF_MOVANA);
|
action = "Modify"; // Il movimento e' stato inserito preventivamente
|
||||||
movana.setkey(3);
|
|
||||||
movana.put(MOVANA_NUMREGCG, msk.get(F_NUMREG));
|
|
||||||
if (movana.read() == NOERR)
|
|
||||||
nExist = movana.get_long(MOVANA_NUMREG);
|
|
||||||
|
|
||||||
if (!nExist)
|
|
||||||
{
|
|
||||||
if (action[0] == 'R') // Nulla da cancellare
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (!bAnalBill) // Non c'erano e non ci sono tuttora conti analitici
|
|
||||||
return false;
|
|
||||||
action = "Insert"; // Il movimento e' andato perduto!
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TFilename ini; ini.tempdir();
|
TFilename ini; ini.tempdir();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user