From a715eedd5023005e7d2ee8074593b336e2cbb536 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 13 Oct 2009 14:04:16 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : ve0 Ricompilazione Demo : [ ] Commento : Ricalcolo corretto della giacenza in seguito alla pressione del bottone Anteprima e non solo Stampa git-svn-id: svn://10.65.10.50/trunk@19430 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ve/ve0100.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/ve/ve0100.cpp b/ve/ve0100.cpp index 9baf9acc2..9886276a7 100755 --- a/ve/ve0100.cpp +++ b/ve/ve0100.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -9,7 +10,6 @@ #include "veini.h" #include "vepriv.h" -#include "veuml.h" #include "veuml1.h" #include "verig.h" #include "velib04.h" @@ -191,7 +191,11 @@ void TMotore_application::init_modify_mode( TMask& m ) m.enable(DLG_ELABORA); m.disable(F_STATO); - cached_article_balances(NULL); // Azzera cache delle giacenze + if (m.id2pos(F_CURGIAC)>0 && m.efield(F_CURGIAC).shown()) + { + cached_article_balances(NULL); // Azzera cache delle giacenze + edit_mask().update_giacenza(); // Aggiorna giacenza riga corrente + } TString80 key; key << m.get(F_CODNUM); @@ -949,12 +953,17 @@ bool TMotore_application::save_and_print(bool savedoc, TPrtype mode) const TTipo_documento& tipo = doc.tipo(); TFilename rep; - if (tipo.main_print_profile(rep, 0)) + + int filter = has_module(RSAUT) ? 2 : 1; + while (filter > 0 && !tipo.main_print_profile(rep, filter)) + filter--; + + if (filter > 0) { const bool da_stampare = doc.stampabile(); TString commandline; - if (rep.ends_with(".rep")) + if (filter == 2) commandline = "ve1 -2"; // Esiste il nuovo report :-) else commandline = "ve1 -0"; // Esiste il vecchio form :-( @@ -983,7 +992,7 @@ bool TMotore_application::save_and_print(bool savedoc, TPrtype mode) TDocumento& maindoc = m.doc(); maindoc.read(); // Aggiorna STATO e MOVMAG generati da ve1 - // Lo stato del documento vive di vita propria + // Lo stato del documento vive di vita propria const char sfs = maindoc.tipo().stato_finale_stampa(); maindoc.stato(sfs); const char str_sfs[2] = { sfs, '\0' };