Patch level : 12.0 1174
Files correlati : fp0.exe Commento: Se c'erano due aliquote uguali ne spediva una sola.
This commit is contained in:
parent
4f30c582b6
commit
906f2d6a88
@ -94,7 +94,8 @@ public:
|
||||
TString& update_string();
|
||||
TString& filter_string();
|
||||
bool update();
|
||||
bool insert();
|
||||
bool insert(bool force = false);
|
||||
bool force_insert();
|
||||
TString& remove_string(bool id_riga = false);
|
||||
bool remove();
|
||||
bool search();
|
||||
@ -517,7 +518,7 @@ private:
|
||||
|
||||
const TRectype* find_parent_row(const TRectype& rdoc) const;
|
||||
int find_ancestors(const TRiga_documento& rdoc, TArray& ancestors) const;
|
||||
bool insert(TPaf_record& p);
|
||||
bool insert(TPaf_record& p, bool force = false);
|
||||
bool remove(TPaf_record& p);
|
||||
void reset(TPaf_record& p) const { TPaf_container::set_keys_paf(p, _hfatt, _bfatt); }
|
||||
bool save_paf();
|
||||
|
@ -678,9 +678,9 @@ TString & TPaf_record::filter_string()
|
||||
}
|
||||
|
||||
// Aggiunge un record al db
|
||||
bool TPaf_record::insert()
|
||||
bool TPaf_record::insert(bool force)
|
||||
{
|
||||
if (search())
|
||||
if (!force && search())
|
||||
return update();
|
||||
else
|
||||
return fp_db().sq_set_exec(insert_string(), false);
|
||||
@ -1148,7 +1148,7 @@ int TDoc_fp::find_ancestors(const TRiga_documento& rdoc, TArray& ancestors) cons
|
||||
return ancestors.items();
|
||||
}
|
||||
|
||||
bool TDoc_fp::insert(TPaf_record& p)
|
||||
bool TDoc_fp::insert(TPaf_record& p, bool force)
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
@ -1156,7 +1156,7 @@ bool TDoc_fp::insert(TPaf_record& p)
|
||||
_query.add(p.insert_string());
|
||||
else
|
||||
{
|
||||
ok = p.insert();
|
||||
ok = p.insert(force);
|
||||
if (!ok)
|
||||
{
|
||||
_log.log(2, fp_db().sq_get_token_text_error(1));
|
||||
@ -1599,7 +1599,7 @@ bool TDoc_fp::add_riepilogo_iva(TPaf_record& paf2200f, const TCodiceIVA& cod_iva
|
||||
// Elimino l'oggetto
|
||||
_riepilogo_agg.erase(cod_aliquota);
|
||||
// Inserisco
|
||||
return insert(paf2200f);
|
||||
return insert(paf2200f, true);
|
||||
}
|
||||
|
||||
bool TDoc_fp::add_cassa_previdenziale(TRiga_documento& rdoc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user