diff --git a/ve/ve1100.cpp b/ve/ve1100.cpp index 4a170b84a..4b3234313 100755 --- a/ve/ve1100.cpp +++ b/ve/ve1100.cpp @@ -831,6 +831,7 @@ bool TStampa_Doc_Vendita::filter_rows(const TRelation * r) TString tr(s.get(0)); TString ar(s.get(1)); tr.trim();ar.trim(); + if (tr.empty() && ar.empty()) continue; if (tr.empty() && ar == codart) rt = FALSE; else if (tr == tiporiga) if (ar.empty() || (ar.not_empty() && ar == codart)) rt = FALSE; @@ -944,9 +945,13 @@ void TStampa_Doc_Vendita::print() { printer().open(); // apre la stampante TRectype arec= doc.curr(); // copia il record di fine cursore cur.setregion(darec, arec); // imposta il filtro sul cursore di stampa (nell'ordine giusto :-) - TProgind pi(cur.items(),"Stampa documenti in corso...",FALSE,TRUE,10); + const bool is_vis = printer().printtype() == screenvis; + TProgind* pi; + if (!is_vis) + pi = new TProgind(cur.items(),"Stampa documenti in corso...",FALSE,TRUE,10); for (cur= 0; cur.pos()addstatus(1L); tip.put("CODTAB", doc.get("TIPODOC")); // posiziona la tabella dei tipi di documento int err=tip.read(); // legge la tabella if (err==NOERR) { // se non ci sono errori procede con la stampa @@ -1004,6 +1009,7 @@ void TStampa_Doc_Vendita::print() { break; } } + if (!is_vis) delete pi; if (_form) { delete _form; diff --git a/ve/velib02.cpp b/ve/velib02.cpp index 8e5d52537..a083636be 100755 --- a/ve/velib02.cpp +++ b/ve/velib02.cpp @@ -81,7 +81,7 @@ void TDocumentoEsteso::compile_summary() { _condv->set_sconto(sconto); sc = 100.0 - _condv->sconto_val(); - price = ((price * sc) / 100.0); + price = (price * sc); } price.round(val ? _parm.pri_val : _parm.pri_lit); // prezzo scontato qta.round(val ? _parm.qta_val : _parm.qta_lit);