From 78228faf85f174fce47d5dd468b1c1288ec3fa7a Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Sun, 26 Jun 2022 02:38:33 +0200 Subject: [PATCH] Patch level : 12.0 1174 Files correlati : cg5.exe Commento: Se ripristinavo il giornale e la data di ultima stampa non era fine mese i movimenti dopo quella non vevnivano ripristinati --- src/cg/cg5400.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cg/cg5400.cpp b/src/cg/cg5400.cpp index 1cc27b869..184371af8 100755 --- a/src/cg/cg5400.cpp +++ b/src/cg/cg5400.cpp @@ -44,11 +44,13 @@ bool TRipristina_stampa::reg_restore(const TString& regist, const TDate inizio_anno(1, 1, year); if (reg.read(_isequal, _lock) == NOERR) { - const TDate dlast(reg.get_date("D3")); - + TDate dlast(reg.get_date("D3")); const int ld = TDate::last_day(month, year); - if (day > ld) day = ld; - TDate d(day, month, year); // Data di ripristino + + dlast.set_end_month(); + if (day > ld) day = ld; + + TDate d(day, month, year); // Data di ripristino TRectype from(mov.curr()); from.zero(); TRectype to(from);