Patch level : 12.00 1278
Files correlati : tp0.exe Le esenzioni nella dichiarazione di febbraio della sicart non venivano calcolate bene
This commit is contained in:
parent
4023a61763
commit
9e5769e3a5
@ -823,6 +823,7 @@ class TDocumento : public TMultiple_rectype // velib03
|
|||||||
TRiga_documento * _sconto; // Riga per lo sconto di testata
|
TRiga_documento * _sconto; // Riga per lo sconto di testata
|
||||||
TRiga_documento * _esenzione; // Riga per l' esenzione iva
|
TRiga_documento * _esenzione; // Riga per l' esenzione iva
|
||||||
TRiga_documento * _valfisc; // Riga di valenza fiscale per fatture 2019+
|
TRiga_documento * _valfisc; // Riga di valenza fiscale per fatture 2019+
|
||||||
|
bool _force_recalc;
|
||||||
|
|
||||||
bool _dirty_deny;
|
bool _dirty_deny;
|
||||||
|
|
||||||
@ -883,6 +884,8 @@ public:
|
|||||||
|
|
||||||
TCodgiac_livelli& livelli() const ;
|
TCodgiac_livelli& livelli() const ;
|
||||||
void dirty_fields();
|
void dirty_fields();
|
||||||
|
void force_recalc(bool on) { _force_recalc = on; }
|
||||||
|
bool force_recalc() { return _force_recalc; }
|
||||||
|
|
||||||
TAssoc_array& tabella_iva(bool solo_imponibili = false) { update_tabella_iva(solo_imponibili); return _tabella_iva; }
|
TAssoc_array& tabella_iva(bool solo_imponibili = false) { update_tabella_iva(solo_imponibili); return _tabella_iva; }
|
||||||
int riepilogo_iva_items() const { return _cod_iva.items();}
|
int riepilogo_iva_items() const { return _cod_iva.items();}
|
||||||
@ -1011,7 +1014,7 @@ public:
|
|||||||
void update_spese_aut(TString_array & spese, bool preserve_old = false, TSheet_field * sh = NULL, bool force = false);
|
void update_spese_aut(TString_array & spese, bool preserve_old = false, TSheet_field * sh = NULL, bool force = false);
|
||||||
void update_conai_qta();
|
void update_conai_qta();
|
||||||
void update_conai();
|
void update_conai();
|
||||||
void old_update_conai();
|
// void old_update_conai();
|
||||||
|
|
||||||
bool is_generic() const { return tipo_valido() && tipo().is_generic(); }
|
bool is_generic() const { return tipo_valido() && tipo().is_generic(); }
|
||||||
bool is_fattura() const { return tipo_valido() && tipo().is_fattura(); }
|
bool is_fattura() const { return tipo_valido() && tipo().is_fattura(); }
|
||||||
|
@ -261,20 +261,21 @@ void TDocumento::init()
|
|||||||
check_modules();
|
check_modules();
|
||||||
}
|
}
|
||||||
|
|
||||||
TDocumento::TDocumento() : TMultiple_rectype(LF_DOC)
|
TDocumento::TDocumento()
|
||||||
|
: TMultiple_rectype(LF_DOC), _force_recalc(false)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
TDocumento::TDocumento(const TDocumento & d)
|
TDocumento::TDocumento(const TDocumento & d)
|
||||||
: TMultiple_rectype(LF_DOC)
|
: TMultiple_rectype(LF_DOC), _force_recalc(false)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
copy(d);
|
copy(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
TDocumento::TDocumento(char provv, int anno, const char* codnum, long numdoc)
|
TDocumento::TDocumento(char provv, int anno, const char* codnum, long numdoc)
|
||||||
: TMultiple_rectype(LF_DOC)
|
: TMultiple_rectype(LF_DOC), _force_recalc(false)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
if (numdoc > 0)
|
if (numdoc > 0)
|
||||||
@ -284,7 +285,7 @@ TDocumento::TDocumento(char provv, int anno, const char* codnum, long numdoc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
TDocumento::TDocumento(const TDoc_key& key)
|
TDocumento::TDocumento(const TDoc_key& key)
|
||||||
: TMultiple_rectype(LF_DOC)
|
: TMultiple_rectype(LF_DOC), _force_recalc(false)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
const long ndoc = key.ndoc();
|
const long ndoc = key.ndoc();
|
||||||
@ -296,7 +297,7 @@ TDocumento::TDocumento(const TDoc_key& key)
|
|||||||
|
|
||||||
|
|
||||||
TDocumento::TDocumento(const TRectype& rec)
|
TDocumento::TDocumento(const TRectype& rec)
|
||||||
: TMultiple_rectype(LF_DOC)
|
: TMultiple_rectype(LF_DOC), _force_recalc(false)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
read(rec);
|
read(rec);
|
||||||
@ -1619,7 +1620,6 @@ int TDocumento::write_rewrite(TBaseisamfile & f, bool re) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
TLocalisamfile anamag(LF_ANAMAG);
|
TLocalisamfile anamag(LF_ANAMAG);
|
||||||
TLocalisamfile codalt(LF_CODCORR);
|
TLocalisamfile codalt(LF_CODCORR);
|
||||||
@ -1761,6 +1761,7 @@ int TDocumento::write_rewrite(TBaseisamfile & f, bool re) const
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
myself.force_recalc(false);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1815,6 +1816,7 @@ int TDocumento::remove(TBaseisamfile& f) const
|
|||||||
myself.plafond(true).remove(myself);
|
myself.plafond(true).remove(myself);
|
||||||
myself.auto_evasione();
|
myself.auto_evasione();
|
||||||
}
|
}
|
||||||
|
myself.force_recalc(false);
|
||||||
return TMultiple_rectype::remove(f);
|
return TMultiple_rectype::remove(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3035,6 +3037,7 @@ TDocumento& TDocumento::copy(const TDocumento & d)
|
|||||||
_auto_cod_modify_pend = d._auto_cod_modify_pend;
|
_auto_cod_modify_pend = d._auto_cod_modify_pend;
|
||||||
_row_auto_cod_changed = d._row_auto_cod_changed;
|
_row_auto_cod_changed = d._row_auto_cod_changed;
|
||||||
_qta_evasa_auto_changed = d._qta_evasa_auto_changed;
|
_qta_evasa_auto_changed = d._qta_evasa_auto_changed;
|
||||||
|
_force_recalc = d._force_recalc;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3336,7 +3339,7 @@ bool has_new_conai(const TDocumento& doc)
|
|||||||
*/
|
*/
|
||||||
void TDocumento::update_conai()
|
void TDocumento::update_conai()
|
||||||
{
|
{
|
||||||
if (main_app().has_module(DCAUT, CHK_DONGLE) && tipo().add_conai() && tipo().stato_bloccato() != stato()) // tipo().stati_iniziali_modifica().find(stato()) >= 0)
|
if (main_app().has_module(DCAUT, CHK_DONGLE) && tipo().add_conai() && (force_recalc() || tipo().stati_iniziali_modifica().find(stato()) >= 0))
|
||||||
{
|
{
|
||||||
TAssoc_array conai_aggiornati;
|
TAssoc_array conai_aggiornati;
|
||||||
const TRectype& cfven = clifor().vendite();
|
const TRectype& cfven = clifor().vendite();
|
||||||
|
@ -959,6 +959,7 @@ bool TDocumento_mask::on_key(KEY key)
|
|||||||
enable(DLG_SAVEREC);
|
enable(DLG_SAVEREC);
|
||||||
enable(DLG_DELREC);
|
enable(DLG_DELREC);
|
||||||
xvtil_statbar_set(TR("Modifica"));
|
xvtil_statbar_set(TR("Modifica"));
|
||||||
|
doc().force_recalc(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
warning_box("L'utente %s non puo' modificare questo documento",
|
warning_box("L'utente %s non puo' modificare questo documento",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user