Patch level :4.0 818

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :corretto errore di cambio stato in caso di elaborazione differita di un documento (tipo elaborazione: generazione effetti)


git-svn-id: svn://10.65.10.50/trunk@15795 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2007-11-26 16:08:33 +00:00
parent 3db237c307
commit b31aff8711

View File

@ -2860,16 +2860,18 @@ bool TDocumento_mask::elabora_handler( TMask_field& f, KEY key )
bool do_checks = false; bool do_checks = false;
const char stato_iniziale = m.doc().stato(); const char stato_iniziale = m.doc().stato();
while (selection->run() == K_ENTER) while (selection->run() == K_ENTER) //NON riportare modifiche dalla 3.1!! Già sistemato
{ {
m.mask2doc(); m.mask2doc();
const bool processed = selection->elabora(); const bool processed = selection->elabora();
do_checks |= processed; do_checks |= processed;
if (m.doc().stato() != stato_iniziale) if (m.doc().stato() != stato_iniziale)
break; break;
if (processed) if (processed)
{ {
m.doc2mask(FALSE); m.doc2mask(false);
TSheet_field& ss = m.sfield(F_SHEET); TSheet_field& ss = m.sfield(F_SHEET);
for (int i = 0; i < ss.items(); i++) for (int i = 0; i < ss.items(); i++)
{ {
@ -2878,11 +2880,13 @@ bool TDocumento_mask::elabora_handler( TMask_field& f, KEY key )
m.ss_notify(ss,i,K_ENTER); m.ss_notify(ss,i,K_ENTER);
} }
} }
if (!m.get_bool(F_TYPE)) // non aggiunge al documento attuale if (!m.get_bool(F_TYPE)) // non aggiunge al documento attuale
break; break;
} }
if (do_checks) if (do_checks) //NON riportare modifiche dalla 3.1!! Già sistemato
{ {
m.doc2mask(false);
// Provoca decodifiche necessarie // Provoca decodifiche necessarie
const int tutti = m.fields(); const int tutti = m.fields();
int i; int i;
@ -2898,7 +2902,7 @@ bool TDocumento_mask::elabora_handler( TMask_field& f, KEY key )
delete selection; delete selection;
} }
} }
return TRUE; return true;
} }
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////