Patch level : 12.0 1260
Files correlati : ve0.exe ve6.exe vetbnum.mml Commento: Controllo contabilizzazione fattre da rivevere per esercizio La contabilizzazione non cancellava i movimenti abnalaitici non più necessari
This commit is contained in:
parent
a0fbf53c56
commit
11d2cb1503
@ -3336,7 +3336,7 @@ bool has_new_conai(const TDocumento& doc)
|
||||
*/
|
||||
void TDocumento::update_conai()
|
||||
{
|
||||
if (main_app().has_module(DCAUT, CHK_DONGLE) && tipo().add_conai() && tipo().stati_iniziali_modifica().find(stato()) >= 0)
|
||||
if (main_app().has_module(DCAUT, CHK_DONGLE) && tipo().add_conai() && tipo().stato_bloccato() != stato()) // tipo().stati_iniziali_modifica().find(stato()) >= 0)
|
||||
{
|
||||
TAssoc_array conai_aggiornati;
|
||||
const TRectype& cfven = clifor().vendite();
|
||||
|
@ -4318,6 +4318,28 @@ error_type TContabilizzazione::write_anal(TDocumento& doc, const TMovimentoPN& m
|
||||
|
||||
canal.elabora(doc, numreg_cg, _viswin, _can_write, mov);
|
||||
}
|
||||
else
|
||||
{
|
||||
long numreganal = doc.get_long(DOC_NUMREGCA);
|
||||
|
||||
if (numreganal > 0)
|
||||
{
|
||||
TAnal_mov mov(numreganal);
|
||||
TLocalisamfile movana(LF_MOVANA);
|
||||
TString msg;
|
||||
int err;
|
||||
|
||||
if ((err = mov.remove(movana))== NOERR)
|
||||
{
|
||||
msg.format(FR("--- Cancellato il movimento analitico %ld"), numreganal);
|
||||
doc.put(DOC_NUMREGCA, 0L);
|
||||
}
|
||||
else
|
||||
msg.format(FR("--- Errore %d nel cancellare il movimento analitico %ld"), err, numreganal);
|
||||
_viswin->add_line(msg);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return _error;
|
||||
}
|
||||
|
@ -386,13 +386,13 @@ bool TDocument_report::load(const char* name)
|
||||
if (recset != NULL)
|
||||
{
|
||||
const TString use = recset->query_text();
|
||||
if (use.find("MATBASE") > 0)
|
||||
if (use.find("MATBASE") >= 0)
|
||||
sec->set_recordset(new TMateriali_base_recordset(use));
|
||||
else
|
||||
if (use.find("SCALARE") > 0)
|
||||
if (use.find("SCALARE") >= 0)
|
||||
sec->set_recordset(new TScalare_recordset(use));
|
||||
else
|
||||
if (use.find("USE") > 0 && use.find("DOC") > use.find("USE"))
|
||||
if (use.find("USE") >= 0 && use.find("DOC") > use.find("USE"))
|
||||
sec->set_recordset(new TDocument_recordset(use));
|
||||
else
|
||||
sec->set_recordset(use);
|
||||
|
Loading…
x
Reference in New Issue
Block a user