From c49d1e9f2c3407e3ea9033f6be34e825925f12e4 Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Tue, 28 Feb 2023 11:42:14 +0100 Subject: [PATCH] Patch level : 12.0 1248 Files correlati : ve0.exe ve5.exe ve6.eex vetbtip.msk Commento: La lista Documenti avanzata non stampava in certe situazioni perche nel filtro anava un codice numerazione con i doppii apici all'inizio --- src/ve/ve1100.cpp | 6 +++--- src/ve/ve1700.cpp | 22 ++++++++++++++-------- src/ve/ve1800.cpp | 4 ++-- src/ve/ve1900.cpp | 6 +++--- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/ve/ve1100.cpp b/src/ve/ve1100.cpp index 864ef5a7a..fccdea1d5 100755 --- a/src/ve/ve1100.cpp +++ b/src/ve/ve1100.cpp @@ -1399,7 +1399,7 @@ void TStampaDoc_application::print_selected(KEY k) if (_interattivo) { - if (k == 'A') + if (k == K_VISUALIZE) pr.set_printtype(screenvis); else pr.set_printtype(winprinter); @@ -2023,8 +2023,8 @@ bool TStampaDoc_application::create() _selection_mask->sfield(F_SHEETNUMS).sheet_mask().set_handler(102, tipodoc_handler); } - TButton_tool& ap = (TButton_tool&)_selection_mask->field(DLG_PREVIEW); - ap.set_exit_key('A'); + // TButton_tool& ap = (TButton_tool&)_selection_mask->field(DLG_PREVIEW); + // ap.set_exit_key('A'); if (argc>3) { // lettura dei parametri iniziali dalla linea di comando diff --git a/src/ve/ve1700.cpp b/src/ve/ve1700.cpp index 6f17e07e2..d0e560c5b 100644 --- a/src/ve/ve1700.cpp +++ b/src/ve/ve1700.cpp @@ -165,7 +165,7 @@ bool TStampa_lista_docs_mask::on_field_event(TOperable_field& o, TField_event e, TToken_string & row = s.row(s.selected()); TArray_sheet as(-1,-1,70,20,TR("Tipi documento"),HR("Codice|Descrizione@50")); //costruisce uno sheet di selezione dei tipi doc - const TCodice_numerazione& cn = cached_numerazione(row.get(1)); + const TCodice_numerazione& cn = cached_numerazione(row.get(0)); for (int t = cn.ntipi_doc()-1; t >= 0; t--) { const TString4 tipodoc = cn.tipo_doc(t); @@ -206,7 +206,7 @@ TStampa_lista_docs_mask::TStampa_lista_docs_mask() " |CODCF|RAGSOC", TR("Selezione Clienti/Fornitori"), HR("@1|Codice@6R|Descrizione@50"), 0, 1) { - ((TButton_tool&)field(DLG_PREVIEW)).set_exit_key('A'); +// ((TButton_tool&)field(DLG_PREVIEW)).set_exit_key('A'); } /////////////////////////////////////////////////////////// @@ -336,7 +336,7 @@ TCursor* TLista_documenti_recordset::cursor() const TString from_num("ZZZZ"); TString to_num; - for (int j=0; j str) + if (from_num > str) from_num = str; if (to_num < str) to_num = str; + ::add_term(docfilter, DOC_CODNUM, "==", stringify(str)); } str = riga.get(); if (str.full()) @@ -459,8 +459,9 @@ void TListaDoc_application::main_loop() TLista_documenti_report report(&m); m.set(F_REPORT, "ve17001"); + KEY k; - while (m.run() != K_QUIT) + while ((k = m.run()) != K_QUIT) { TReport_book book; TFilename report_name = m.get(F_REPORT); @@ -469,8 +470,13 @@ void TListaDoc_application::main_loop() report_name = "ve17001"; report.load(report_name); book.add(report); - if (book.pages() > 0) - book.print_or_preview(); + if (book.pages() > 0) + { + if (k == K_VISUALIZE) + book.preview(); + else + book.print_or_preview(); + } } } diff --git a/src/ve/ve1800.cpp b/src/ve/ve1800.cpp index 19ce6e714..ba56db186 100644 --- a/src/ve/ve1800.cpp +++ b/src/ve/ve1800.cpp @@ -22,8 +22,8 @@ void TListaFido_app::main_loop() TDocument_report report; m.set(F_REPORT, "ve18001"); - ((TButton_tool&)m.field(DLG_PREVIEW)).set_exit_key(K_VISUALIZE); - ((TButton_tool&)m.field(DLG_PRINT)).set_exit_key(K_PRINT); +// ((TButton_tool&)m.field(DLG_PREVIEW)).set_exit_key(K_VISUALIZE); +// ((TButton_tool&)m.field(DLG_PRINT)).set_exit_key(K_PRINT); m.show(F_DADATA, ini_get_bool(CONFIG_STUDIO, "Main", "MYGOD")); m.set(F_ADATA, today); m.set(F_GIORNIRISK, ini_get_int(CONFIG_DITTA, "ve", "FIDO_RISKDAYS")); diff --git a/src/ve/ve1900.cpp b/src/ve/ve1900.cpp index 56da846b4..45ceb11c0 100644 --- a/src/ve/ve1900.cpp +++ b/src/ve/ve1900.cpp @@ -22,8 +22,8 @@ void TMetodiPagamentoClienti_app::main_loop() TDocument_report report; m.set(F_REPORT, "ve19001"); - ((TButton_tool&)m.field(DLG_PREVIEW)).set_exit_key('A'); - ((TButton_tool&)m.field(DLG_PRINT)).set_exit_key('P'); +// ((TButton_tool&)m.field(DLG_PREVIEW)).set_exit_key('A'); +// ((TButton_tool&)m.field(DLG_PRINT)).set_exit_key('P'); KEY k; @@ -44,7 +44,7 @@ void TMetodiPagamentoClienti_app::main_loop() book.add(report); if (book.pages() > 0) - if (k == 'A') + if (k == K_VISUALIZE) book.preview(); else book.print();