From f8c76d915eb1d2fa46498ed239c3b40c124ebbf7 Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Wed, 2 Aug 2023 19:40:41 +0200 Subject: [PATCH] Patch level : 12.00 1276 Files correlati : cg42.exe Commento : Corretta intestazione registri riepilogativi IL ricalco saldi permette di fare piu' registri uno dopo l'altro --- src/cg/cg4100.cpp | 18 ++++++------------ src/cg/cg4400.cpp | 5 ++++- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/cg/cg4100.cpp b/src/cg/cg4100.cpp index f39d92366..33c517a08 100755 --- a/src/cg/cg4100.cpp +++ b/src/cg/cg4100.cpp @@ -42,20 +42,12 @@ class CG4100_App : public TSkeleton_application TMask* _msk; public: - bool set_parms(); virtual void main_loop(); void sort_all(); bool sort_sal(); }; -bool CG4100_App::set_parms() -{ - _msk->run(); - _year = _msk->get_int(FLD_CG41_YEAR); - return _msk->last_key() == K_ENTER; -} - void CG4100_App::main_loop() { if (fexist("__sal__.sav")) @@ -63,15 +55,17 @@ void CG4100_App::main_loop() _msk = new TMask("cg4100b"); - sort_sal(); - + while (_msk->run() == K_ENTER) + { + _year = _msk->get_int(FLD_CG41_YEAR); + sort_sal(); + } delete _msk; } bool CG4100_App::sort_sal() { - if (!set_parms()) - return FALSE; + TSystemisamfile saldi(LF_SALDI); saldi.open(_excllock); TLocalisamfile mov(LF_MOV); diff --git a/src/cg/cg4400.cpp b/src/cg/cg4400.cpp index 4c1d4abaa..7ef76e4eb 100755 --- a/src/cg/cg4400.cpp +++ b/src/cg/cg4400.cpp @@ -2337,6 +2337,8 @@ bool TStampa_registri_app::preprocess_print(int file, int counter) get_dati_ditta(); set_print_zero(); } + else + get_dati_ditta(); return true; } @@ -2968,7 +2970,8 @@ int TStampa_registri_app::stampa_intestazione() int r = 1; TString riga(_stampa_width); -// get_dati_ditta(); + if (_ragsoc.blank()) + get_dati_ditta(); riga.format(FR("Ditta %ld %s %s %s %s %s"), get_firm(), (const char*)_ragsoc, (const char*)_viafis, (const char*)_cap, (const char*)_comunefis,