Patch level : 12.0 no-patch
Files correlati : Commento : Spostate due funzioni in fplib
This commit is contained in:
parent
cb7551773d
commit
658cd4098c
@ -39,7 +39,6 @@ protected:
|
|||||||
void set_err_paf();
|
void set_err_paf();
|
||||||
void fill();
|
void fill();
|
||||||
void init();
|
void init();
|
||||||
bool is_fattura(const TRectype& doc) const;
|
|
||||||
|
|
||||||
void load_all_fields();
|
void load_all_fields();
|
||||||
|
|
||||||
@ -56,16 +55,6 @@ public:
|
|||||||
void save_all_fields() const;
|
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
|
void TPA_mask::save_all_fields() const
|
||||||
{
|
{
|
||||||
ini_set_string(CONFIG_DITTA, "fp", "dataini", get(F_DATAINI));
|
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());
|
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()
|
void TPA_mask::fill()
|
||||||
{
|
{
|
||||||
// Salvo subito su file le impostazioni di esportazione, in fplib accedo ai file
|
// Salvo subito su file le impostazioni di esportazione, in fplib accedo ai file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user