Corretto ripristino stampa registri
git-svn-id: svn://10.65.10.50/trunk@1023 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
47ce8a782f
commit
80f7a4ef54
@ -141,7 +141,7 @@ BEGIN
|
||||
END
|
||||
|
||||
// Questo rimane quasi sempre nascosto
|
||||
STRING F_TIPO_MOV 2
|
||||
STRING F_TIPO_MOV 1
|
||||
BEGIN
|
||||
PROMPT 2 5 ""
|
||||
FIELD TIPOMOV
|
||||
|
@ -97,12 +97,12 @@ bool TRipristina_stampa::reg_restore(const TString& regist,
|
||||
|
||||
TRectype from(mov.curr()); from.zero();
|
||||
TRectype to(from);
|
||||
TString16 filter;
|
||||
TString80 filter;
|
||||
|
||||
from.put(MOV_DATAREG, d);
|
||||
to.put(MOV_DATAREG, dlast);
|
||||
if (!giornale)
|
||||
filter.format("%s==\"%s\"", MOV_REG, regist);
|
||||
filter.format("%s==\"%s\"", MOV_REG, (const char*)regist);
|
||||
|
||||
TCursor cursor(&rel, filter, 2, &from, &to);
|
||||
long last_num = 0L;
|
||||
@ -131,17 +131,25 @@ bool TRipristina_stampa::reg_restore(const TString& regist,
|
||||
|
||||
--d;
|
||||
if (d > inizio_anno) // Aggiorna data ultima stampa
|
||||
{
|
||||
reg.put("D3", d); // Data ultima stampa
|
||||
reg.put("I4", d.month()-1); // Ultimo mese di stampa liquidazione
|
||||
if (reg.get_int("I8") >= d.month())
|
||||
reg.zero("I8"); // Mese di ultima stampa credito precedente
|
||||
{
|
||||
reg.put("D3", d); // Data ultima stampa
|
||||
if (!giornale)
|
||||
{
|
||||
const int mese = d.month();
|
||||
if (reg.get_int("I4") > mese)
|
||||
reg.put("I4", mese); // Ultimo mese di stampa liquidazione
|
||||
if (reg.get_int("I8") >= mese)
|
||||
reg.zero("I8"); // Mese di ultima stampa credito precedente
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
reg.zero("D3");
|
||||
reg.zero("I4");
|
||||
reg.zero("I8");
|
||||
if (!giornale)
|
||||
{
|
||||
reg.zero("I4");
|
||||
reg.zero("I8");
|
||||
}
|
||||
}
|
||||
|
||||
ok = (reg.rewrite() == NOERR);
|
||||
@ -246,7 +254,7 @@ bool TRipristina_stampa::menu(MENU_TAG)
|
||||
if (yesno_box(mess))
|
||||
{
|
||||
switch (_op)
|
||||
{
|
||||
{
|
||||
case restore_inl:
|
||||
inl_restore(reg, year, month); break;
|
||||
default:
|
||||
@ -264,6 +272,6 @@ bool TRipristina_stampa::menu(MENU_TAG)
|
||||
int cg5400(int argc, char* argv[])
|
||||
{
|
||||
TRipristina_stampa a ;
|
||||
a.run(argc, argv, "Ripristino stampa registri");
|
||||
a.run(argc, argv, "Ripristino stampe");
|
||||
return 0;
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ BEGIN
|
||||
CHECKTYPE REQUIRED
|
||||
HELP "Anno IVA da cui ripristinare la stampa"
|
||||
WARNING "L'anno deve essere specificato"
|
||||
MESSAGE COPY,F_ESER
|
||||
END
|
||||
|
||||
STRING F_ESER 4
|
||||
@ -65,6 +66,7 @@ BEGIN
|
||||
DISPLAY "Descrizione @50" S0
|
||||
DISPLAY "Tipo" I0
|
||||
OUTPUT F_YEAR CODTAB[1,4]
|
||||
OUTPUT F_ESER CODTAB[1,4]
|
||||
OUTPUT F_REG CODTAB[5,7]
|
||||
OUTPUT F_DREG S0
|
||||
OUTPUT F_TIPO I0
|
||||
|
Loading…
x
Reference in New Issue
Block a user