From d7f6c33f4ac507cac982c0eaccd52f8f918a5b27 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 10 Nov 1995 13:38:29 +0000 Subject: [PATCH] Corretta gestione partite extracontabili git-svn-id: svn://10.65.10.50/trunk@2126 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- sc/sc0100.cpp | 14 ++++++-------- sc/sc0100.h | 1 + sc/sc0101.cpp | 31 ++++++++++++++++++++++++++++++- sc/sc1200.cpp | 1 + 4 files changed, 38 insertions(+), 9 deletions(-) diff --git a/sc/sc0100.cpp b/sc/sc0100.cpp index 8fab077e5..787ffa4db 100755 --- a/sc/sc0100.cpp +++ b/sc/sc0100.cpp @@ -32,18 +32,16 @@ void TSaldaconto_app::open_files(int logicnum, ...) } } +void TSaldaconto_app::on_config_change() +{ + TPartita::carica_allineamento(); +} bool TSaldaconto_app::menu(MENU_TAG) { - KEY k; TMask& m = curr_mask(); - - do - { - k = m.run(); - if (k == K_ENTER) - edit_partite(m); - } while (k != K_QUIT); + while (m.run() == K_ENTER) + edit_partite(m); return 0; } diff --git a/sc/sc0100.h b/sc/sc0100.h index fe5df2eae..06f4d143f 100755 --- a/sc/sc0100.h +++ b/sc/sc0100.h @@ -24,6 +24,7 @@ protected: // TApplication virtual bool create(); virtual bool destroy(); virtual bool menu(MENU_TAG tag); + virtual void on_config_change(); protected: void open_files(int logicnum, ...); diff --git a/sc/sc0101.cpp b/sc/sc0101.cpp index a1e8ae3b4..b9a9e350a 100755 --- a/sc/sc0101.cpp +++ b/sc/sc0101.cpp @@ -132,7 +132,7 @@ bool TFattura_mask::pag_notify(TSheet_field& ps, int r, KEY k) mod = m_imp = TRUE; } if (newt != ts.get(4)) // modificato tipo pagamento - mod = m_tipo = TRUE; + mod = m_tipo = m_ulc = TRUE; if (newu != ts.get(5)) // modificato tipo pagamento mod = m_ulc = TRUE; @@ -423,6 +423,35 @@ bool TGame_mask::edit_fattura(TPartita& p, int nriga) p.rimuovi_riga(nriga); return ok; +} + +void TGame_mask::prima_nota(const long nreg) +{ + bool can_run = TRUE; + if (_changed) + { + can_run = yesno_box("Salvare le parite modificate?"); + if (can_run) + { + app().partite().rewrite(); + _changed = FALSE; // Resetta flag di cambiato + } + } + if (can_run) + { + app().partite().destroy(); // Distrugge tutte le partite in memoria + + const char* const pn = "cg2 -0"; + TExternal_app prima_nota(pn); + TString16 numreg; numreg << "1|" << nreg; + TMessage msg(pn, MSG_LN, numreg); + msg.send(); // Messaggio di collegamento al movimento nreg + prima_nota.run(); // Lancia la prima nota + + const int anno = get_int(P_ANNO); + const TString16 numero = get(P_NUMERO); + fill_partite(anno, numero); // Rilegge partite + } } /////////////////////////////////////////////////////////// diff --git a/sc/sc1200.cpp b/sc/sc1200.cpp index 451131578..f1bcfce20 100755 --- a/sc/sc1200.cpp +++ b/sc/sc1200.cpp @@ -74,6 +74,7 @@ void TCreatepart_app::on_config_change() TConfig cd(CONFIG_DITTA, "cg"); _num_cli = cd.get_bool("NrCliDx"); _num_for = cd.get_bool("NrForDx"); + TPartita::carica_allineamento(); } bool TCreatepart_app::zap_partite(int anno)