diff --git a/src/fp/fp0300.cpp b/src/fp/fp0300.cpp index 90e6a6856..7cb9b0b89 100644 --- a/src/fp/fp0300.cpp +++ b/src/fp/fp0300.cpp @@ -39,7 +39,6 @@ protected: void set_err_paf(); void fill(); void init(); - bool is_fattura(const TRectype& doc) const; void load_all_fields(); @@ -56,16 +55,6 @@ public: void save_all_fields() const; }; -bool TPA_mask::is_fattura(const TRectype& doc) const -{ - const TTipo_documento& td = cached_tipodoc(doc.get(DOC_TIPODOC)); - if (!td.is_fattura()) // Tengo per buone solo le fatture e le note di credito - return false; - - const TCodice_numerazione& cn = cached_numerazione(doc.get(DOC_CODNUM)); - return cn.tipo() == 2 && !cn.get_bool("B10"); // Controlla se fattura provvisioria esclusa da P.A. -} - void TPA_mask::save_all_fields() const { ini_set_string(CONFIG_DITTA, "fp", "dataini", get(F_DATAINI)); @@ -132,27 +121,6 @@ void TPA_mask::load_all_fields() set(F_VALCODEST, fp_settings().get_esp_est_cod()); } -TString& add_filter(const TString& field, const TString& from, const TString& to) -{ - TString& query = get_tmp_string(); - const TString qf = field.find('.') < 0 ? field : field.sub(field.find('.') + 1); - - if (from.full() && to.full()) - { - query << "&&(BETWEEN(" << field << ", #DA" << qf << ", #A" << qf << "))"; - } - else if (from.full()) - { - query << "&&(" << field << ">=#DA" << qf << ")"; - } - else if (to.full()) - { - query << "&&(" << field << "<=#A" << qf << ")"; - } - - return query; -} - void TPA_mask::fill() { // Salvo subito su file le impostazioni di esportazione, in fplib accedo ai file