57 lines
1.1 KiB
C++
57 lines
1.1 KiB
C++
|
#include "cg5500.h"
|
||
|
#include <utility.h>
|
||
|
|
||
|
bool Visliq_app::look_lim(int m)
|
||
|
{
|
||
|
bool ok = FALSE;
|
||
|
|
||
|
_lim_r->zero();
|
||
|
(*_lim_mese) = format("%d",m);
|
||
|
(*_lim_anno) = _year;
|
||
|
|
||
|
TString s = _lim_r->get("CODTAB");
|
||
|
_lim->read();
|
||
|
return _lim->good();
|
||
|
}
|
||
|
|
||
|
bool Visliq_app::look_del(int month, int type)
|
||
|
{
|
||
|
long ditta = get_firm();
|
||
|
_del->zero();
|
||
|
(*_del_ditta) = ditta;
|
||
|
(*_del_anno) = _year;
|
||
|
(*_del_mese) = month;
|
||
|
(*_del_tipo) = type;
|
||
|
TString ctab = _del->get("CODTAB");
|
||
|
_del->read();
|
||
|
|
||
|
return _del->good();
|
||
|
}
|
||
|
|
||
|
bool Visliq_app::look_lia(int year)
|
||
|
{
|
||
|
if (year == 0) year = _year;
|
||
|
TString16 y; y << year;
|
||
|
|
||
|
_lia->zero();
|
||
|
_lia->put("CODTAB", y);
|
||
|
_lia->read();
|
||
|
|
||
|
return _lia->good();
|
||
|
}
|
||
|
|
||
|
|
||
|
bool Visliq_app::is_trim(int x)
|
||
|
// TRUE se il mese passato e' un trimestre
|
||
|
{ return x == 3 || x == 6 || x == 9 || x == 12; }
|
||
|
|
||
|
bool Visliq_app::is_month_ok(int x, int month)
|
||
|
// TRUE se il mese passato e' compatibile con il regime
|
||
|
// di liquidazione e (opz) non e' maggiore di quello scelto
|
||
|
{
|
||
|
if (month == -1) month = x;
|
||
|
return _freqviva == "M" ?
|
||
|
( x > 0 && x <= month) :
|
||
|
( x <= month && is_trim(x));
|
||
|
}
|