From 7381e397aac90f6badf9c346efb052ce3e87e06f Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Fri, 11 Dec 2020 07:12:44 +0100 Subject: [PATCH] Patch level : 12.0 no-patch Files correlati : Commento : Corretto invio bolle Major --- src/ps/flexform_xml.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/ps/flexform_xml.cpp b/src/ps/flexform_xml.cpp index 73728f5a5..b825e1811 100644 --- a/src/ps/flexform_xml.cpp +++ b/src/ps/flexform_xml.cpp @@ -98,18 +98,23 @@ void TFlexform_xml_ddt::export_docs(const TString & codnum, long codcli, int yea TLista_documenti docs; TString header("Esportazione ddt"); TCodice_numerazione num_ddt(codnum); - TToken_string tipi = num_ddt.tipi_doc(); - TToken_string stati("1|2|3|4|5|6|7|8|9"); + TToken_string tipi("*"); // = num_ddt.tipi_doc(); + const int items = tipi.items(); + TToken_string stati("*"); const int ndocs = docs.read('D', 'C', codcli, year, tipi, stati, nulldate, nulldate, codnum, from, to); - TProgress_monitor bar(ndocs, header); - - for (int n = 0; n < ndocs && bar.add_status(); n++) + + if (ndocs > 0) { - const TDocumento & doc = docs[n]; + TProgress_monitor bar(ndocs, header); - add_doc(doc, log); + for (int n = 0; n < ndocs && bar.add_status(); n++) + { + const TDocumento & doc = docs[n]; + + add_doc(doc, log); + } + export_doc(); } - export_doc(); } TFlexform_xml_ddt::TFlexform_xml_ddt(const char* xml_name) : TEsa_xml(xml_name)