Corretti errori 1214 e MI036
Modificato il cursore sui movimenti usando la chiave 2 Corretta la lettura del tipo attivita' git-svn-id: svn://10.65.10.50/trunk@399 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4ebf73c70b
commit
0a868c3469
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "cg4300.h"
|
#include "cg4300.h"
|
||||||
#include "cg4300a.h"
|
#include "cg4300a.h"
|
||||||
|
#include <mov.h>
|
||||||
|
|
||||||
inline CG4300_App& app()
|
inline CG4300_App& app()
|
||||||
{ return (CG4300_App&)main_app(); }
|
{ return (CG4300_App&)main_app(); }
|
||||||
@ -44,7 +45,7 @@ void CG4300_App::user_create()
|
|||||||
_rel = new TRelation(LF_MOV);
|
_rel = new TRelation(LF_MOV);
|
||||||
_rel->add(LF_RMOVIVA,"NUMREG=NUMREG");
|
_rel->add(LF_RMOVIVA,"NUMREG=NUMREG");
|
||||||
|
|
||||||
_cur = new TCursor(_rel);
|
_cur = new TCursor(_rel, "", 2);
|
||||||
(*_cur) = 0;
|
(*_cur) = 0;
|
||||||
|
|
||||||
_pim = new TTable("PIM");
|
_pim = new TTable("PIM");
|
||||||
@ -151,8 +152,6 @@ void CG4300_App::user_destroy()
|
|||||||
|
|
||||||
bool CG4300_App::set_print(int n)
|
bool CG4300_App::set_print(int n)
|
||||||
{
|
{
|
||||||
TString yy = _year;
|
|
||||||
|
|
||||||
_descr_arr.destroy();
|
_descr_arr.destroy();
|
||||||
|
|
||||||
switch(n)
|
switch(n)
|
||||||
@ -163,11 +162,21 @@ bool CG4300_App::set_print(int n)
|
|||||||
{
|
{
|
||||||
if (_selected.ones() > 0l)
|
if (_selected.ones() > 0l)
|
||||||
{
|
{
|
||||||
if (_year != yy)
|
/* if (_year != yy)
|
||||||
{
|
{
|
||||||
TString cond(format("ANNOES=%s",(const char*)_year));
|
TString cond(format("ANNOES=%s",(const char*)_year));
|
||||||
_cur->setfilter(cond);
|
_cur->setfilter(cond);
|
||||||
}
|
}*/
|
||||||
|
TRectype & mov = _cur->curr();
|
||||||
|
TRectype from(_cur->curr()); from.zero();
|
||||||
|
TRectype to(mov);
|
||||||
|
TDate f(1, _recalc == one ? _month : 1, atoi(_year));
|
||||||
|
TDate t(1, _month, atoi(_year));
|
||||||
|
|
||||||
|
t.set_end_month();
|
||||||
|
from.put(MOV_DATAREG, f);
|
||||||
|
to.put(MOV_DATAREG, t);
|
||||||
|
_cur->setregion(from, to);
|
||||||
recalc_all();
|
recalc_all();
|
||||||
return _isprint;
|
return _isprint;
|
||||||
}
|
}
|
||||||
@ -178,11 +187,21 @@ bool CG4300_App::set_print(int n)
|
|||||||
_isprint = FALSE;
|
_isprint = FALSE;
|
||||||
if (set_deleghe())
|
if (set_deleghe())
|
||||||
{
|
{
|
||||||
if (_year != yy)
|
/* if (_year != yy)
|
||||||
{
|
{
|
||||||
TString cond(format("ANNOES=%s",(const char*)_year));
|
TString cond(format("ANNOES=%s",(const char*)_year));
|
||||||
_cur->setfilter(cond);
|
_cur->setfilter(cond);
|
||||||
}
|
} */
|
||||||
|
TRectype & mov = _cur->curr();
|
||||||
|
TRectype from(_cur->curr()); from.zero();
|
||||||
|
TRectype to(mov);
|
||||||
|
TDate f(1, _recalc == one ? _month : 1, atoi(_year));
|
||||||
|
TDate t(1, _month, atoi(_year));
|
||||||
|
|
||||||
|
t.set_end_month();
|
||||||
|
from.put(MOV_DATAREG, f);
|
||||||
|
to.put(MOV_DATAREG, t);
|
||||||
|
_cur->setregion(from, to);
|
||||||
extract_deleghe();
|
extract_deleghe();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -191,11 +210,21 @@ bool CG4300_App::set_print(int n)
|
|||||||
_isprint = TRUE;
|
_isprint = TRUE;
|
||||||
if (set_acconto())
|
if (set_acconto())
|
||||||
{
|
{
|
||||||
if (_year != yy)
|
/* if (_year != yy)
|
||||||
{
|
{
|
||||||
TString cond(format("ANNOES=%s",(const char*)_year));
|
TString cond(format("ANNOES=%s",(const char*)_year));
|
||||||
_cur->setfilter(cond);
|
_cur->setfilter(cond);
|
||||||
}
|
}*/
|
||||||
|
TRectype & mov = _cur->curr();
|
||||||
|
TRectype from(_cur->curr()); from.zero();
|
||||||
|
TRectype to(mov);
|
||||||
|
TDate f(1, _recalc == one ? _month : 1, atoi(_year));
|
||||||
|
TDate t(1, _month, atoi(_year));
|
||||||
|
|
||||||
|
t.set_end_month();
|
||||||
|
from.put(MOV_DATAREG, f);
|
||||||
|
to.put(MOV_DATAREG, t);
|
||||||
|
_cur->setregion(from, to);
|
||||||
recalc_acconti();
|
recalc_acconti();
|
||||||
return _isprint;
|
return _isprint;
|
||||||
}
|
}
|
||||||
|
@ -96,18 +96,21 @@ bool CG4300_App::update_firm(int month, bool recalc)
|
|||||||
TString cattiv(codatt);
|
TString cattiv(codatt);
|
||||||
|
|
||||||
cattiv << tipoatt;
|
cattiv << tipoatt;
|
||||||
look_pla(cattiv, TRUE);
|
if (look_pla(cattiv, FALSE))
|
||||||
|
{
|
||||||
_p8 = _pla->get_real("R5");
|
_p8 = _pla->get_real("R5");
|
||||||
_p8b = _pla->get_real("R6");
|
_p8b = _pla->get_real("R6");
|
||||||
_p9 = _pla->get_real("R7");
|
_p9 = _pla->get_real("R7");
|
||||||
_prorata = _pla->get_real("R8");
|
_prorata = _pla->get_real("R8");
|
||||||
_isplafond = !(_p8.is_zero() && _p8b.is_zero() &&
|
_isplafond = !(_p8.is_zero() && _p8b.is_zero() &&
|
||||||
_p9.is_zero());
|
_p9.is_zero());
|
||||||
|
_isservizio = _pla->get("S7") == "S";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
_isservizio = _nditte->curr(LF_ATTIV).get("TIPOATT") == "S";
|
||||||
_isviaggio = _nditte->curr(LF_ATTIV).get_bool("REG74TER");
|
_isviaggio = _nditte->curr(LF_ATTIV).get_bool("REG74TER");
|
||||||
_isagricolo = _nditte->curr(LF_ATTIV).get_bool("REGAGR");
|
_isagricolo = _nditte->curr(LF_ATTIV).get_bool("REGAGR");
|
||||||
_isbenzinaro = _nditte->curr(LF_ATTIV).get_bool("ART74/4");
|
_isbenzinaro = _nditte->curr(LF_ATTIV).get_bool("ART74/4");
|
||||||
_isservizio = _nditte->curr(LF_ATTIV).get("TIPOATT") == "S";
|
|
||||||
_freqviva = look_lia() ? _lia->get("S7") : _nditte->curr().get("FREQVIVA");
|
_freqviva = look_lia() ? _lia->get("S7") : _nditte->curr().get("FREQVIVA");
|
||||||
bool mens = _freqviva == "M";
|
bool mens = _freqviva == "M";
|
||||||
_isannual = (_month == 12 && !mens && !_isbenzinaro) ||
|
_isannual = (_month == 12 && !mens && !_isbenzinaro) ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user