diff --git a/ve/ve1100.cpp b/ve/ve1100.cpp index 592f3089e..6ec68b148 100755 --- a/ve/ve1100.cpp +++ b/ve/ve1100.cpp @@ -159,13 +159,6 @@ TDocumento_form::TDocumento_form(TRectype& doc, TRelation& rel, bool definitiva, _form = this; const TString4 tipodoc(doc.get(DOC_TIPODOC)); - const TTipo_documento& tipo = __tipi.tipo(tipodoc); - if (tipo.empty()) - { - error_box(FR("Tipo di documento non valido: '%s'"), (const char*)tipodoc); - return; - } - bool found = false; TFilename nomeform; const TTipo_documento & tipo = __tipi.tipo(tipodoc); @@ -177,7 +170,10 @@ TDocumento_form::TDocumento_form(TRectype& doc, TRelation& rel, bool definitiva, } if (tipo.printable()) { // se non ci sono errori procede con la stampa - nomeform = aggiuntivo ? tipo.additional_print_profile() : tipo.main_print_profile(); // legge il nome del form di stampa + if (aggiuntivo) + tipo.additional_print_profile(nomeform); + else + tipo.main_print_profile(nomeform); // legge il nome del form di stampa nomeform.trim(); TFilename test(nomeform); test.ext("frm"); @@ -1433,7 +1429,9 @@ void TStampaDoc_application::print_selected() extdoc.scadenze_reset(); // Stampa eventuali documenti allegati - const TFilename formagg = extdoc.tipo().additional_print_profile(); + TFilename formagg; + + extdoc.tipo().additional_print_profile(formagg); const int ncopie2 = extdoc.tipo().get_int("I2"); if (!formagg.blank() && ncopie2 > 0) // Se esiste un tipo documento da accodare diff --git a/ve/ve1300.cpp b/ve/ve1300.cpp index 67899bb64..0df4730bf 100755 --- a/ve/ve1300.cpp +++ b/ve/ve1300.cpp @@ -907,7 +907,9 @@ bool TReport_doc_app::print_loop(const TString& query) } // Stampa eventuali allegati - TString16 codalleg = tipo.additional_print_profile(); + TFilename codalleg; + + tipo.additional_print_profile(codalleg); codalleg.trim(); if (codalleg.not_empty()) { diff --git a/ve/velib.h b/ve/velib.h index 50f47637f..b25351280 100755 --- a/ve/velib.h +++ b/ve/velib.h @@ -184,8 +184,6 @@ protected: public: TObject* dup() const { return new TFormula_documento(_tab == "%FRD" ? _documento : _riga, codice(), NULL, true); } - -public: const TString& codice() const { return get("CODTAB");} const TString& name() const { return codice();} TExpr_documento* expr() const { return _expr;} @@ -413,6 +411,7 @@ public: const int search_years() const { return _search_years;} const TToken_string& search_nums() const { return _search_nums;} const int max_rows_art() const { return _max_rows_art;} + bool no_desc() const { return _no_desc;} const TString& provv() const { return _field_provv;} const int incr_perc_prezzo() const { return _incrp;} @@ -628,7 +627,6 @@ protected: virtual const TString & get_str(const char* fieldname) const ; virtual bool key_complete() { return numero() > 0; } - virtual bool renum() { return renum_ndoc() > 0;} void set_riga_sconto(); int write_rewrite(TBaseisamfile & f, bool re) const; virtual TDocumento & copy(const TDocumento & d); @@ -644,6 +642,8 @@ protected: int set_row_ids(); public: + virtual bool renum() { return renum_ndoc() > 0;} + long renum_ndoc(long numdoc = 0); const TString& codiva_spese() const ; const TString& codiva_bolli() const ; @@ -728,7 +728,6 @@ public: static void copy_data(TRectype& dst, const TRectype& src); static void copy_data(TRiga_documento& dst, const TRiga_documento& src); void copy_contents(const TDocumento& src, bool copy_header = true); - long renum_ndoc(long numdoc = 0); void set_fields(TAuto_variable_rectype & rec); void set_riga_esenzione(); diff --git a/ve/velib01.cpp b/ve/velib01.cpp index 2b6bd2b0c..e5777e0c9 100755 --- a/ve/velib01.cpp +++ b/ve/velib01.cpp @@ -119,11 +119,11 @@ TSpesa_prest::TSpesa_prest(const TRectype& rec) { } -TSpesa_prest::genere() const +char TSpesa_prest::genere() const { const TString & tipo = get("COD"); if (tipo == "SPP") - return RIGA_SPESEDOC: + return RIGA_SPESEDOC; else if (tipo == "PRS") return RIGA_PRESTAZIONI; diff --git a/ve/velib03a.cpp b/ve/velib03a.cpp index 08171a1f1..3f74a1ae0 100755 --- a/ve/velib03a.cpp +++ b/ve/velib03a.cpp @@ -836,11 +836,6 @@ TFormula_documento::TFormula_documento(const TRectype& rec) _expr = new TExpr_documento(expr_string(), et); } -TObject* TFormula_documento::dup() const -{ - return new TFormula_documento(*this); -} - TFormula_documento::~TFormula_documento() { if (_expr) diff --git a/ve/velib04.h b/ve/velib04.h index b69f3b5e8..3b259ace5 100755 --- a/ve/velib04.h +++ b/ve/velib04.h @@ -88,6 +88,7 @@ public: bool riferimenti_in_testa() const { return get_bool("B2"); } bool ignora_descrizioni() const { return get_bool("B3"); } char tipo_numerazione() const { return get_bool("B4") ? 'P' : 'D'; } + bool protocollo_da_registro() const { return get_bool("B4"); } bool prezzo_da_ordine() const { return get_bool("B5"); } bool aggiorna_testata_se_vuoto() const { return get_bool("B6"); } bool ordina_per_codice() const { return get_bool("B7"); } diff --git a/ve/velib06.cpp b/ve/velib06.cpp index ec4d51eae..28a0b2a13 100755 --- a/ve/velib06.cpp +++ b/ve/velib06.cpp @@ -1042,9 +1042,6 @@ TVariable_mask* TDocumento_mask::riga_mask(int numriga) const TCursor * cur = browse->cursor(); if (cur) { - codmag = c.default_mag(); - if (c.has_default_dep()) - codmag << c.default_dep(); const int num = cur->file().num(); if (num == LF_ANAMAG || num == LF_CODCORR) {