diff --git a/ve/ve1300.cpp b/ve/ve1300.cpp index 0bc8cd04f..19248dd2b 100755 --- a/ve/ve1300.cpp +++ b/ve/ve1300.cpp @@ -302,7 +302,7 @@ protected: public: bool print(const TRecordset& doc, TReport_book& book, bool def, word copies, - bool alleg, bool arc, bool signature); + bool alleg, bool arc, bool signature, word printed_copies = 0); int extra_copies() const { return _extra_copies; } TReport_doc(const char* name); @@ -359,7 +359,7 @@ int TReport_doc::set_printed_status(TDocumento& doc) const return err; } -bool TReport_doc::print(const TRecordset& doc, TReport_book& book, bool definitive, word copie, bool can_allegate, bool arc, bool signature) +bool TReport_doc::print(const TRecordset& doc, TReport_book& book, bool definitive, word copie, bool can_allegate, bool arc, bool signature, word printed_copies) { bool printed = true; @@ -372,7 +372,7 @@ bool TReport_doc::print(const TRecordset& doc, TReport_book& book, bool definiti { for (int c = 1; c <= copie; c++) { - set_copy(c, copie); + set_copy(c + printed_copies, copie + printed_copies); // Tenta di stampare gli allegati solo sull'ultima copia definitiva if (c == copie && can_allegate) { @@ -982,7 +982,7 @@ protected: const TString& get_mail_address() const; virtual bool get_next_mail(TToken_string& to, TToken_string& cc, TToken_string& ccn, TString& subj, TString& text, TToken_string& attach, short& ui) const ; - void print_extra_copies(TReport_doc& report, const TRecordset& doc, TReport_book& book) const; + void print_extra_copies(TReport_doc& report, const TRecordset& doc, TReport_book& book, word printed_copies) const; bool nome_report(const TRecordset& doc, int quale, TFilename& profilo) const; public: @@ -1117,11 +1117,11 @@ bool TReport_doc_app::destroy() } void TReport_doc_app::print_extra_copies(TReport_doc& report, const TRecordset& doc, - TReport_book& book) const + TReport_book& book, word printed_copies) const { const int extra_copies = report.extra_copies(); if (extra_copies > 0) - report.print(doc, book, false, extra_copies, false, false, false); + report.print(doc, book, false, extra_copies, false, false, false, printed_copies); } // Quale 0=standard,1=aggiuntivo,2=mail @@ -1238,7 +1238,7 @@ bool TReport_doc_app::print_loop(TRecordset& doc, TOutput_mode mode, bool is_def if (!report.print(doc, book, is_definitive, copies, true, arc, signature)) break; if (!paperless) - print_extra_copies(report, doc, book); + print_extra_copies(report, doc, book, copies); } } //if(profilo.custom_path()... else @@ -1268,7 +1268,7 @@ bool TReport_doc_app::print_loop(TRecordset& doc, TOutput_mode mode, bool is_def { allegato.print(doc, book, false, copies, false, arc, signature); if (!paperless) - print_extra_copies(allegato, doc, book); + print_extra_copies(allegato, doc, book, copies); } }