Modifiche iniziali liquidazione; inizio cg5 -3 (parametri liquidazione)
git-svn-id: svn://10.65.10.50/trunk@328 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
e7201e699c
commit
3d4b0b3999
@ -167,6 +167,7 @@ class CG4300_App : public TPrintapp
|
||||
TProgind* _prind;
|
||||
int _row;
|
||||
TArray _vend_arr; // tabella vendite per ventilazione
|
||||
TArray _corr_arr; // tabella corrispettivi
|
||||
TArray _vent_arr; // tabella acquisti per ventilazione
|
||||
TArray _descr_arr; // things to be printed
|
||||
TArray _errors; // errors to notify
|
||||
@ -276,6 +277,9 @@ public:
|
||||
void describe_annual(const char* codatt);
|
||||
void describe_consistence(const char* codatt);
|
||||
|
||||
// corrispettivi
|
||||
void recalc_corrispettivi (int month, const char* codatt);
|
||||
|
||||
// ventilasiun
|
||||
void recalc_ventilation (int month, const char* codatt);
|
||||
|
||||
|
@ -107,7 +107,7 @@ bool CG4300_App::update_firm(int month, bool recalc)
|
||||
_isagricolo = _nditte->curr(LF_ATTIV).get_bool("REGAGR");
|
||||
_isbenzinaro = _nditte->curr(LF_ATTIV).get_bool("ART74/4");
|
||||
_isservizio = _nditte->curr(LF_ATTIV).get("TIPOATT") == "S";
|
||||
_freqviva = _nditte->curr().get("FREQVIVA");
|
||||
_freqviva = look_lia() ? _lia->get("S7") : _nditte->curr().get("FREQVIVA");
|
||||
bool mens = _freqviva == "M";
|
||||
_isannual = (_month == 12 && !mens && !_isbenzinaro) ||
|
||||
(_month == 13 && (mens || _isbenzinaro));
|
||||
@ -190,6 +190,7 @@ bool CG4300_App::update_att(int month, const char* codatt, bool recalc)
|
||||
zero_att(month,codatt);
|
||||
recalc_att(month,codatt);
|
||||
recalc_ventilation(month, codatt);
|
||||
recalc_corrispettivi(month, codatt);
|
||||
if (month == 12) recalc_annual(codatt);
|
||||
}
|
||||
return ok || calc;
|
||||
@ -462,6 +463,14 @@ void CG4300_App::recalc_att(int month, const char* codatt)
|
||||
_pim_r->put("I0",LORDO);
|
||||
add_vendite(month, reg, imponibile);
|
||||
}
|
||||
else
|
||||
if (corrisp)
|
||||
{
|
||||
lor += imponibile;
|
||||
lor += imposta;
|
||||
_pim_r->put("I0",LORDO);
|
||||
add_corrisp(month, reg, imponibile);
|
||||
}
|
||||
else
|
||||
{
|
||||
// netti e imposta separata
|
||||
@ -643,7 +652,8 @@ void CG4300_App::write_liq(int month, const char* codatts)
|
||||
|
||||
if (month == 12)
|
||||
{
|
||||
look_lia(TRUE);
|
||||
if (!look_lia(TRUE))
|
||||
_lia->put("S7", (const char *) _freqviva);
|
||||
_lia->put("R1", vol_aff);
|
||||
_lia->rewrite();
|
||||
}
|
||||
|
@ -95,6 +95,25 @@ void CG4300_App::add_vendite(int month, const char* codreg, real& r)
|
||||
vi->_totale += r;
|
||||
}
|
||||
|
||||
void CG4300_App::add_corrisp(int month, const char* codreg, real& r)
|
||||
{
|
||||
_VendItem* vi = NULL;
|
||||
|
||||
for (int i = 0; i < _vend_arr.items(); i++)
|
||||
{
|
||||
vi = (_VendItem*)&_corr_arr[i];
|
||||
if (vi->_codreg == codreg && vi->_month == month)
|
||||
break;
|
||||
}
|
||||
if (i == _vend_arr.items())
|
||||
{
|
||||
_corr_arr.add(vi = new _VendItem);
|
||||
vi->_codreg = codreg;
|
||||
vi->_month = month;
|
||||
}
|
||||
vi->_totale += r;
|
||||
}
|
||||
|
||||
|
||||
bool CG4300_App::look_pim(int month, const char* codatt, const char* codreg,
|
||||
const char* tipocr, const char* codiva,
|
||||
|
@ -96,6 +96,10 @@ void CG4300_App::describe_plafond(int month, const char* codatt)
|
||||
_descr_arr.add(d);
|
||||
}
|
||||
|
||||
// ricalcolo dei corrispettivi
|
||||
void CG4300_App::recalc_corrispettivi(int month, const char* codatt)
|
||||
{
|
||||
}
|
||||
|
||||
// ricalcolo della malefica ventilazione
|
||||
void CG4300_App::recalc_ventilation(int month, const char* codatt)
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "cg5.h"
|
||||
|
||||
#define usage "Error - usage : %s -{0,1}"
|
||||
#define usage "Error - usage : %s -{0,1,3}"
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
@ -13,6 +13,7 @@ int main(int argc,char** argv)
|
||||
{
|
||||
case 0: cg5000(argc,argv) ; break;
|
||||
case 1: cg5100(argc,argv) ; break;
|
||||
case 3: cg5300(argc,argv) ; break;
|
||||
default: fatal_box(usage, argv[0]) ;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user