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:
parent
207f1d316b
commit
1145d25263
@ -201,23 +201,23 @@ BEGIN
|
|||||||
GROUP 3
|
GROUP 3
|
||||||
END
|
END
|
||||||
|
|
||||||
|
GROUPBOX DLG_NULL 78 8
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 10 "Voci di spesa per saldaconto"
|
||||||
|
END
|
||||||
|
|
||||||
NUMBER S_TOTDOC 15 0
|
NUMBER S_TOTDOC 15 0
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 10 "Totale documento "
|
PROMPT 2 11 "Totale documento "
|
||||||
HELP ""
|
HELP ""
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
PICTURE "."
|
PICTURE "."
|
||||||
GROUP 5
|
GROUP 5
|
||||||
END
|
END
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 78 9
|
|
||||||
BEGIN
|
|
||||||
PROMPT 0 9 "Voci di spesa per saldaconto"
|
|
||||||
END
|
|
||||||
|
|
||||||
NUMBER S_SPESE 15 0
|
NUMBER S_SPESE 15 0
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 12 "Spese e rimborsi "
|
PROMPT 2 12 "Spese e rimborsi "
|
||||||
HELP ""
|
HELP ""
|
||||||
FLAGS "R"
|
FLAGS "R"
|
||||||
PICTURE "."
|
PICTURE "."
|
||||||
|
@ -1350,7 +1350,7 @@ bool TPrimanota_application::datareg_handler(TMask_field& f, KEY key)
|
|||||||
gio.last_print().string(), ae);
|
gio.last_print().string(), ae);
|
||||||
if (error) return FALSE;
|
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"
|
f.warning_box("La data dell'operazione e' antecedente al %s,\n"
|
||||||
"ultima registrazione sul libro giornale dell'esercizio %d",
|
"ultima registrazione sul libro giornale dell'esercizio %d",
|
||||||
gio.last_reg().string(), ae);
|
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());
|
reg.last_print().string(), (const char*)codreg, dr.year());
|
||||||
if (error) return FALSE;
|
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"
|
f.warning_box("La data dell'operazione e' antecedente al %s,\n"
|
||||||
"ultima registrazione sul registro '%s' dell'anno %d",
|
"ultima registrazione sul registro '%s' dell'anno %d",
|
||||||
reg.last_reg().string(), (const char*)codreg, dr.year());
|
reg.last_reg().string(), (const char*)codreg, dr.year());
|
||||||
|
@ -7,7 +7,7 @@ END
|
|||||||
|
|
||||||
NUMBER FS_IMPONIBILE 15
|
NUMBER FS_IMPONIBILE 15
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Imponibile "
|
PROMPT 1 2 "Imponibile "
|
||||||
PICTURE "."
|
PICTURE "."
|
||||||
FLAGS "DR"
|
FLAGS "DR"
|
||||||
END
|
END
|
||||||
@ -21,7 +21,7 @@ END
|
|||||||
|
|
||||||
NUMBER FS_SPESE 15
|
NUMBER FS_SPESE 15
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 53 2 "Spese "
|
PROMPT 54 2 "Spese "
|
||||||
PICTURE "."
|
PICTURE "."
|
||||||
FLAGS "DR"
|
FLAGS "DR"
|
||||||
END
|
END
|
||||||
|
@ -70,7 +70,7 @@ bool TRipristina_stampa::reg_restore(const TString& regist,
|
|||||||
|
|
||||||
const int ld = TDate::last_day(month, year);
|
const int ld = TDate::last_day(month, year);
|
||||||
if (day > ld) day = ld;
|
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 from(mov.curr()); from.zero();
|
||||||
TRectype to(from);
|
TRectype to(from);
|
||||||
@ -99,8 +99,7 @@ bool TRipristina_stampa::reg_restore(const TString& regist,
|
|||||||
{
|
{
|
||||||
p.addstatus(1);
|
p.addstatus(1);
|
||||||
mov.read(_isequal, _lock);
|
mov.read(_isequal, _lock);
|
||||||
mov.zero(fieldname); // Azzera flag STAMPATO o REGST
|
mov.zero(fieldname); // Azzera flag STAMPATO o REGST
|
||||||
// if (giornale) mov.zero(MOV_NUMGIO); // Azzera numero riferimento giornale
|
|
||||||
|
|
||||||
ok = (mov.rewrite() == NOERR);
|
ok = (mov.rewrite() == NOERR);
|
||||||
if (!ok)
|
if (!ok)
|
||||||
@ -108,19 +107,19 @@ bool TRipristina_stampa::reg_restore(const TString& regist,
|
|||||||
mov.get_long(MOV_NUMREG), mov.status());
|
mov.get_long(MOV_NUMREG), mov.status());
|
||||||
}
|
}
|
||||||
|
|
||||||
--d;
|
if (d > inizio_anno) // Aggiorna data ultima stampa
|
||||||
if (d > inizio_anno) // Aggiorna data ultima stampa
|
|
||||||
{
|
{
|
||||||
reg.put("D3", d); // Data ultima stampa
|
--d;
|
||||||
|
reg.put("D3", d); // Data ultima stampa
|
||||||
if (!giornale)
|
if (!giornale)
|
||||||
{
|
{
|
||||||
const int mese = d.month();
|
const int mese = d.month();
|
||||||
if (reg.get_int("I4") > mese)
|
if (reg.get_int("I4") > mese)
|
||||||
reg.put("I4", (long) mese); // Ultimo mese di stampa liquidazione
|
reg.put("I4", (long)mese); // Ultimo mese di stampa liquidazione
|
||||||
if (reg.get_int("I8") >= mese)
|
if (reg.get_int("I8") >= mese)
|
||||||
reg.zero("I8"); // Mese di ultima stampa credito precedente
|
reg.zero("I8"); // Mese di ultima stampa credito precedente
|
||||||
|
|
||||||
TTable lim("LIM"); // Azzera i flag di stampa liquidazione
|
TTable lim("LIM"); // Azzera i flag di stampa liquidazione
|
||||||
lim.put("CODTAB", format("%04d%02d", year, mese+1));
|
lim.put("CODTAB", format("%04d%02d", year, mese+1));
|
||||||
for (int err = lim.read(_isgteq); err == NOERR; err = lim.next())
|
for (int err = lim.read(_isgteq); err == NOERR; err = lim.next())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user