From b2edd8b480e8585d3c8434cb4486e851d10e6f7f Mon Sep 17 00:00:00 2001 From: villa Date: Wed, 6 Mar 1996 10:51:53 +0000 Subject: [PATCH] Aggiornata stampa mastrini per nuova gestione esercizi contabili git-svn-id: svn://10.65.10.50/trunk@2669 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg3200.cpp | 23 ++++++++++++++++++++--- cg/cg3200a.uml | 9 ++++----- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/cg/cg3200.cpp b/cg/cg3200.cpp index 00a04bb6b..30f0a35e6 100755 --- a/cg/cg3200.cpp +++ b/cg/cg3200.cpp @@ -1530,8 +1530,7 @@ bool TMastrini_application::preprocess_page(int file, int counter) { if ((_datareg >= _data_ini) && (_datareg <= _data_fine)) { - // Determino l' anno di competenza dell' operazione in esame - + // Determino l' anno di competenza dell' operazione in esame int anno = date2esc(_datareg_stampa); if (anno != _annoes) if (_numcarat == 1) @@ -2271,7 +2270,25 @@ bool TMastrini_application::set_print(int) if (_annomsk == 0) _anno_corrente = _anno_ghost; - _anno_precedente = _anno_corrente - 1; + // GNACK! NO! poooorco zeeus! poooorca giunoooone! + // _anno_precedente = _anno_corrente - 1; + _tabesc->zero(); + TString16 dep(format("%04d", _anno_corrente)); + _tabesc->put("CODTAB", dep); + _tabesc->read(); + TDate ini = _tabesc->get("D0"); + --ini; + for (_tabesc->first(); !_tabesc->eof(); _tabesc->next()) + { + if (_tabesc->get_date("D1") == ini) + { + _anno_precedente = _tabesc->get_int("CODTAB"); + break; + } + else if (_tabesc->get_date("D1") < ini) + _anno_precedente = _tabesc->get_int("CODTAB"); + } + // LA'! //Per la stampa in continuo riservo due righe di footer, mentre per le altre no. if (_nummast == 3) diff --git a/cg/cg3200a.uml b/cg/cg3200a.uml index 7e2df43f0..a5a4c608e 100755 --- a/cg/cg3200a.uml +++ b/cg/cg3200a.uml @@ -2,7 +2,6 @@ PAGE "Stampa Mastrini" -1 -1 78 20 - NUMBER F_CODDITTA 5 BEGIN PROMPT 4 1 "Ditta " @@ -44,11 +43,11 @@ END NUMBER F_ANNO 4 BEGIN - PROMPT 47 1 "Anno esercizio " - HELP "Anno esercizio di cui stampare i mastrini" + PROMPT 47 1 "Codice esercizio " + HELP "Codice esercizio di cui stampare i mastrini" USE ESC INPUT CODTAB F_ANNO - DISPLAY "Anno Esercizio" CODTAB + DISPLAY "Codice Esercizio" CODTAB DISPLAY "Data inizio esercizio" D0 DISPLAY "Data fine esercizio " D1 OUTPUT F_ANNO CODTAB @@ -61,7 +60,7 @@ END LIST F_TIPOCF_INI 25 BEGIN PROMPT 4 4 "Ricerca " - HELP "Indicare il tipo di mastrini da stamapare" + HELP "Indicare il tipo di mastrini da stampare" ITEM " |Gruppo/conto/sottoconto" MESSAGE HIDE,2@|HIDE,3@|RESET,2@|RESET,3@|SHOW,1@ ITEM "C|Clienti"