Corretta segnalazione di gia' stampato su registro

Corretto azzeramento data di ultima stampa nel ripristino stampa registri


git-svn-id: svn://10.65.10.50/trunk@1483 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1995-06-19 08:10:37 +00:00
parent 207f1d316b
commit 1145d25263
4 changed files with 19 additions and 20 deletions

View File

@ -201,23 +201,23 @@ BEGIN
GROUP 3
END
GROUPBOX DLG_NULL 78 8
BEGIN
PROMPT 1 10 "Voci di spesa per saldaconto"
END
NUMBER S_TOTDOC 15 0
BEGIN
PROMPT 1 10 "Totale documento "
PROMPT 2 11 "Totale documento "
HELP ""
FLAGS "R"
PICTURE "."
GROUP 5
END
GROUPBOX DLG_NULL 78 9
BEGIN
PROMPT 0 9 "Voci di spesa per saldaconto"
END
NUMBER S_SPESE 15 0
BEGIN
PROMPT 1 12 "Spese e rimborsi "
PROMPT 2 12 "Spese e rimborsi "
HELP ""
FLAGS "R"
PICTURE "."

View File

@ -1350,7 +1350,7 @@ bool TPrimanota_application::datareg_handler(TMask_field& f, KEY key)
gio.last_print().string(), ae);
if (error) return FALSE;
}
if (dr < gio.last_reg())
if (key == K_TAB && dr < gio.last_reg())
f.warning_box("La data dell'operazione e' antecedente al %s,\n"
"ultima registrazione sul libro giornale dell'esercizio %d",
gio.last_reg().string(), ae);
@ -1381,7 +1381,7 @@ bool TPrimanota_application::datareg_handler(TMask_field& f, KEY key)
reg.last_print().string(), (const char*)codreg, dr.year());
if (error) return FALSE;
}
if (dr < reg.last_reg())
if (key == K_TAB && dr < reg.last_reg())
f.warning_box("La data dell'operazione e' antecedente al %s,\n"
"ultima registrazione sul registro '%s' dell'anno %d",
reg.last_reg().string(), (const char*)codreg, dr.year());

View File

@ -7,7 +7,7 @@ END
NUMBER FS_IMPONIBILE 15
BEGIN
PROMPT 2 2 "Imponibile "
PROMPT 1 2 "Imponibile "
PICTURE "."
FLAGS "DR"
END
@ -21,7 +21,7 @@ END
NUMBER FS_SPESE 15
BEGIN
PROMPT 53 2 "Spese "
PROMPT 54 2 "Spese "
PICTURE "."
FLAGS "DR"
END

View File

@ -70,7 +70,7 @@ bool TRipristina_stampa::reg_restore(const TString& regist,
const int ld = TDate::last_day(month, year);
if (day > ld) day = ld;
TDate d(day, month, year);
TDate d(day, month, year); // Data di ripristino
TRectype from(mov.curr()); from.zero();
TRectype to(from);
@ -100,7 +100,6 @@ bool TRipristina_stampa::reg_restore(const TString& regist,
p.addstatus(1);
mov.read(_isequal, _lock);
mov.zero(fieldname); // Azzera flag STAMPATO o REGST
// if (giornale) mov.zero(MOV_NUMGIO); // Azzera numero riferimento giornale
ok = (mov.rewrite() == NOERR);
if (!ok)
@ -108,9 +107,9 @@ bool TRipristina_stampa::reg_restore(const TString& regist,
mov.get_long(MOV_NUMREG), mov.status());
}
--d;
if (d > inizio_anno) // Aggiorna data ultima stampa
{
--d;
reg.put("D3", d); // Data ultima stampa
if (!giornale)
{