Patch level : 12.0 1062
Files correlati : ve0.exe ve6.exe Commento : Modificato calcolo plafond Contabilizzazione con causale per tipo documenti SDI
This commit is contained in:
parent
95279dd5bf
commit
1091feb25a
@ -883,7 +883,7 @@ public:
|
|||||||
const TRiepilogo_iva * riepilogo_iva(int index) const { return (index >= 0 && index < _cod_iva.items()) ? riepilogo_iva(_cod_iva.row(index)) : NULL; }
|
const TRiepilogo_iva * riepilogo_iva(int index) const { return (index >= 0 && index < _cod_iva.items()) ? riepilogo_iva(_cod_iva.row(index)) : NULL; }
|
||||||
TCli_for& clifor(bool force_reload = false) const;
|
TCli_for& clifor(bool force_reload = false) const;
|
||||||
TLi_manager & plafond(bool force_reload = false);
|
TLi_manager & plafond(bool force_reload = false);
|
||||||
const real importo_plafond() const;
|
const real importo_plafond(bool diff = false) const;
|
||||||
const real importo_plafond_salvato() const;
|
const real importo_plafond_salvato() const;
|
||||||
TOccasionale& occas() const;
|
TOccasionale& occas() const;
|
||||||
const TAgente& agente(bool first = true) const;
|
const TAgente& agente(bool first = true) const;
|
||||||
|
@ -2801,7 +2801,7 @@ TCli_for& TDocumento::clifor(bool force_reload) const
|
|||||||
return cf;
|
return cf;
|
||||||
}
|
}
|
||||||
|
|
||||||
const real TDocumento::importo_plafond() const
|
const real TDocumento::importo_plafond(bool diff) const
|
||||||
{
|
{
|
||||||
real importo_plafond;
|
real importo_plafond;
|
||||||
|
|
||||||
@ -2816,6 +2816,8 @@ const real TDocumento::importo_plafond() const
|
|||||||
}
|
}
|
||||||
if (is_nota_credito())
|
if (is_nota_credito())
|
||||||
importo_plafond = -importo_plafond;
|
importo_plafond = -importo_plafond;
|
||||||
|
if (diff)
|
||||||
|
importo_plafond -= importo_plafond_salvato();
|
||||||
return importo_plafond;
|
return importo_plafond;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "../m770/scperc.h"
|
#include "../m770/scperc.h"
|
||||||
#include "../m770/rver.h"
|
#include "../m770/rver.h"
|
||||||
#include "../m770/perc.h"
|
#include "../m770/perc.h"
|
||||||
|
#include "../f9/f9lib.h"
|
||||||
|
|
||||||
|
|
||||||
void TMovimentoPN_VE::destroy_iva_row(int i)
|
void TMovimentoPN_VE::destroy_iva_row(int i)
|
||||||
@ -1037,8 +1038,26 @@ TCausale* TContabilizzazione::get_caus(const TDocumento& doc, const int year) co
|
|||||||
{
|
{
|
||||||
TString4 codcaus;
|
TString4 codcaus;
|
||||||
TToken_string key;
|
TToken_string key;
|
||||||
|
static TCategorie_doc __cats;
|
||||||
|
|
||||||
if (_fld_cms_cont.full())
|
if (main_app().has_module(F9AUT, CHK_DONGLE))
|
||||||
|
{
|
||||||
|
const TString & tipodoc = doc.get(DOC_TIPODOCSDI);
|
||||||
|
|
||||||
|
if (tipodoc.full())
|
||||||
|
{
|
||||||
|
#ifdef NEW_FP
|
||||||
|
TClasse_doc * classe = __cats.tipo2class(tipodoc);
|
||||||
|
|
||||||
|
if (classe != nullptr)
|
||||||
|
|
||||||
|
codcaus = classe->caus_cont();
|
||||||
|
#else
|
||||||
|
codcaus =__cats.tipo2caus_cont(tipodoc);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (codcaus.blank() && _fld_cms_cont.full())
|
||||||
{
|
{
|
||||||
const TString& cms = doc.commessa_principale();
|
const TString& cms = doc.commessa_principale();
|
||||||
if (cms.full())
|
if (cms.full())
|
||||||
@ -1065,13 +1084,10 @@ TCausale* TContabilizzazione::get_caus(const TDocumento& doc, const int year) co
|
|||||||
codcaus = doc.tipo().causale(); // Istanzia la causale del documento corrente...
|
codcaus = doc.tipo().causale(); // Istanzia la causale del documento corrente...
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_caus != NULL && _caus->codice() == codcaus && _caus->reg().year() == year)
|
if (_caus != nullptr && _caus->codice() == codcaus && _caus->reg().year() == year)
|
||||||
return _caus;
|
return _caus;
|
||||||
if (_caus != NULL)
|
if (_caus != nullptr)
|
||||||
{
|
safe_delete(_caus);
|
||||||
delete _caus;
|
|
||||||
_caus = NULL;
|
|
||||||
}
|
|
||||||
if (codcaus.full())
|
if (codcaus.full())
|
||||||
_caus = new TCausale(codcaus, year);
|
_caus = new TCausale(codcaus, year);
|
||||||
|
|
||||||
|
@ -3065,7 +3065,7 @@ bool codcms_handler(TMask_field& f, KEY key)
|
|||||||
} //if (main_app().has_module(CTAUT) && (...
|
} //if (main_app().has_module(CTAUT) && (...
|
||||||
|
|
||||||
//aggiornamento automatico del campo codice contabilita' separata nel caso di commessa che ce lo abbia
|
//aggiornamento automatico del campo codice contabilita' separata nel caso di commessa che ce lo abbia
|
||||||
if (main_app().has_module(NPAUT, CHK_DONGLE) && f.running_check(key))
|
if (mask.id2pos(F_CONTSEP) >= 0 && main_app().has_module(NPAUT, CHK_DONGLE) && mask.get(F_CONTSEP).full() && f.running_check(key))
|
||||||
{
|
{
|
||||||
const TString& contsep = cache().get(LF_COMMESSE, codcms, COMMESSE_CONTSEP);
|
const TString& contsep = cache().get(LF_COMMESSE, codcms, COMMESSE_CONTSEP);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user