From 25fabd96dfaa2fdfc9905274cae5a8b1a7899006 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 7 Mar 2007 15:35:38 +0000 Subject: [PATCH] Patch level : 4.0 649 Ricompilazione Demo : [ ] Commento : Riportata la versione 3.1 patch 848 git-svn-id: svn://10.65.10.50/trunk@15016 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ve/velib03.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ve/velib03.cpp b/ve/velib03.cpp index 863d28a42..7bdc4e85e 100755 --- a/ve/velib03.cpp +++ b/ve/velib03.cpp @@ -160,10 +160,10 @@ void TDocumento::init() _cod_occas = new TRecfield(*this, "OCFPI"); _provv_agente = new TProvvigioni_agente; + _sconto = _esenzione = NULL; _stato_originale = ' '; _dirty_deny = false; - _spese_updated = false; check_modules(); @@ -684,7 +684,6 @@ int TDocumento::read(TBaseisamfile& f, word op, word lockop) if (is_fattura()) set_riga_esenzione(); _stato_originale = stato(); - _spese_updated = get_bool(DOC_SPESEUPD); if (err == NOERR && tipo_valido() && tipo().statistiche() && _has_stat_ven) { @@ -876,8 +875,7 @@ int TDocumento::write_rewrite(TBaseisamfile & f, bool re) const if (!doc_bloccato) { - myself.put(DOC_SPESEUPD, _spese_updated); - if(tipo().spese_aut() && !_spese_updated) + if(tipo().spese_aut() && !get_bool("SPESEUPD")) { TString16 name("CODSP0"); TString_array spese; @@ -2290,7 +2288,8 @@ TRecord_array& TDocumento::body(int logicnum) const void TDocumento::update_spese_aut(TString_array & spese_aut, bool preserve_old, TSheet_field * sh) { - if (_spese_updated) + const bool updated = get_bool("SPESEUPD"); + if (updated) return; const bool interactive = sh != NULL; @@ -2386,7 +2385,7 @@ void TDocumento::update_spese_aut(TString_array & spese_aut, bool preserve_old, } } } - _spese_updated = true; + put("SPESEUPD", true); } real TDocumento::calc_conai_qta(int type)