Patch level : 12.0 no-patch

Files correlati     :
Commento            : Spostate due funzioni in fplib
This commit is contained in:
Tolla 2019-02-11 14:50:32 +01:00
parent cb7551773d
commit 658cd4098c

View File

@ -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