From 8f1d2a9b7ccd5eb3dc5735e1dfd3ded37b264588 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 14 May 2003 14:15:09 +0000 Subject: [PATCH] Patch level : 2.0 470 Files correlati : sc0.exe sc1.exe Ricompilazione Demo : [ ] Commento : EP20046 Inserendo movimento extracontabile incasso\pagamento nella maschera"pagamento" Non funziona il collegamento a tabella banche EP20047 cliccanbo sul bottone elabora Errore dell'applicazione SC2 (E' corretto che il bottone elabora sia attivo se non ci sono dati inseriti?) EP20048 Dando conferma ai messsaggi proposti Errore in compattamento dati file 28:-69 EP20062 non stampa su carta se stampante in visualizzazione git-svn-id: svn://10.65.10.50/trunk@11129 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- sc/sc0100.cpp | 6 ------ sc/sc1200.cpp | 32 +++++++++++++++----------------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/sc/sc0100.cpp b/sc/sc0100.cpp index 27b563ec9..145dddc1c 100755 --- a/sc/sc0100.cpp +++ b/sc/sc0100.cpp @@ -1,10 +1,4 @@ -#include - -#define XVT_INCL_NATIVE -#define STRICT - #include -#include #include #include "sc0100.h" diff --git a/sc/sc1200.cpp b/sc/sc1200.cpp index 64b0bb875..ec14d79d4 100755 --- a/sc/sc1200.cpp +++ b/sc/sc1200.cpp @@ -18,9 +18,8 @@ class TCreatepart_app : public TSkeleton_application bool _num_cli, _num_for; TString _desccl, _descfo; TDate _today; - + protected: // Applicat - virtual void on_firm_change(); virtual void on_config_change(); virtual bool create(); @@ -29,6 +28,7 @@ protected: // Applicat protected: static bool data_handler(TMask_field& f, KEY key); + bool is_full(int logicnum) const; void zap_file(int logicnum) const; bool zap_partite() const; int crea_partite(int anno_es, int anno_rif, int next_anno_es); @@ -48,11 +48,6 @@ bool TCreatepart_app::create() return TSkeleton_application::create(); } -void TCreatepart_app::on_firm_change() -{ - _esc.update(); -} - void TCreatepart_app::on_config_change() { TConfig cd(CONFIG_DITTA, "cg"); @@ -100,18 +95,21 @@ bool TCreatepart_app::data_handler(TMask_field& f, KEY key) void TCreatepart_app::zap_file(int logicnum) const { TSystemisamfile f(logicnum); - f.packfile(FALSE, TRUE); + f.zap(); +} + +bool TCreatepart_app::is_full(int logicnum) const +{ + TLocalisamfile f(logicnum); + const int err = f.last(); + return err == NOERR; } bool TCreatepart_app::zap_partite() const { bool ok = TRUE; - TSystemisamfile partite(LF_PARTITE); - partite.open(); - bool zap = partite.items() != 0; - partite.close(); - + bool zap = is_full(LF_PARTITE); if (zap) { zap = yesno_box(TR("Il saldaconto non e' vuoto.\n" @@ -136,10 +134,9 @@ bool TCreatepart_app::zap_partite() const char TCreatepart_app::is_clifo(int g, int c, long s, int& indbil) { - TString16 key; - - key.format("%d|%d", g, c); - const TRectype conti = cache().get(LF_PCON, key); + TString16 key; + key.format("%d|%d|0", g, c); + const TRectype& conti = cache().get(LF_PCON, key); if (conti.empty()) { @@ -279,6 +276,7 @@ void TCreatepart_app::main_loop() m.set_handler(F_DATA, data_handler); int anno_es = _esc.last(); + m.set(F_ANNO, anno_es); if (_esc.date2esc(_today) != anno_es) _today = _esc[anno_es].inizio();