Correzioni al giornale
git-svn-id: svn://10.65.10.50/trunk@903 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7440188549
commit
caef648b65
@ -124,6 +124,7 @@ class CG3400_application : public TPrintapp
|
|||||||
static bool mask_b_warning (TMask_field& f, KEY k);
|
static bool mask_b_warning (TMask_field& f, KEY k);
|
||||||
|
|
||||||
static bool filter_func(const TRelation * r);
|
static bool filter_func(const TRelation * r);
|
||||||
|
static bool filtra_reg (const TRelation * r);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TRelation * _rel;
|
TRelation * _rel;
|
||||||
@ -221,6 +222,7 @@ public:
|
|||||||
const char* get_codiva_des(const char* codiva);
|
const char* get_codiva_des(const char* codiva);
|
||||||
void get_date_aep(int aep, TDate* in, TDate* fin);
|
void get_date_aep(int aep, TDate* in, TDate* fin);
|
||||||
void update_totals (char sezione, real& importo);
|
void update_totals (char sezione, real& importo);
|
||||||
|
void set_reg_filter(TMask& m);
|
||||||
|
|
||||||
CG3400_application() {};
|
CG3400_application() {};
|
||||||
virtual ~CG3400_application() {};
|
virtual ~CG3400_application() {};
|
||||||
@ -228,13 +230,26 @@ public:
|
|||||||
|
|
||||||
HIDDEN CG3400_application& app() { return (CG3400_application&) main_app(); }
|
HIDDEN CG3400_application& app() { return (CG3400_application&) main_app(); }
|
||||||
|
|
||||||
|
bool CG3400_application::filtra_reg(const TRelation * r)
|
||||||
|
{
|
||||||
|
const TRectype& rec = r->lfile().curr();
|
||||||
|
const int anno = atoi(rec.get("CODTAB").left(4));
|
||||||
|
|
||||||
|
if (app()._ae)
|
||||||
|
{
|
||||||
|
if (anno == app()._ae)
|
||||||
|
return TRUE;
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
bool CG3400_application::filter_func(const TRelation * r)
|
bool CG3400_application::filter_func(const TRelation * r)
|
||||||
{
|
{
|
||||||
bool ok = FALSE;
|
|
||||||
|
|
||||||
const TRectype& recmov = r->lfile().curr();
|
const TRectype& recmov = r->lfile().curr();
|
||||||
TRectype& recrmov = r->lfile(LF_RMOV).curr();
|
TRectype& recrmov = r->lfile(LF_RMOV).curr();
|
||||||
const long numreg = recmov.get_long("NUMREG");
|
const long numreg = recmov.get_long("NUMREG");
|
||||||
|
|
||||||
// In caso di NO libro con iva scarta quelli che non hanno righe contabili
|
// In caso di NO libro con iva scarta quelli che non hanno righe contabili
|
||||||
if (!app()._libro_giornale_iva_unico)
|
if (!app()._libro_giornale_iva_unico)
|
||||||
@ -662,11 +677,6 @@ int CG3400_application::stampa_intestazione_ditta()
|
|||||||
|
|
||||||
get_dati_ditta();
|
get_dati_ditta();
|
||||||
|
|
||||||
#if XVT_OS == XVT_OS_SCOUNIX
|
|
||||||
riga.fill('_');
|
|
||||||
set_header(r, riga);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
riga.fill('-');
|
riga.fill('-');
|
||||||
set_header(r, riga);
|
set_header(r, riga);
|
||||||
|
|
||||||
@ -713,36 +723,6 @@ int CG3400_application::set_headers()
|
|||||||
_ae
|
_ae
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
|
||||||
#if XVT_OS != XVT_OS_SCOUNIX
|
|
||||||
TString backg(30);
|
|
||||||
const int width = _stampa_width + 1;
|
|
||||||
|
|
||||||
if (_stampa_intesta || !_stampa_definitiva)
|
|
||||||
{
|
|
||||||
if (_libro_cronologico)
|
|
||||||
{
|
|
||||||
backg.format("W4l{1 1 %d 1}W4l{1 5 %d 5}W1l{1 8 %d 8}", width,width,width);
|
|
||||||
r++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
backg.format("W4l{1 1 %d 1}W4l{1 5 %d 5}W1l{1 7 %d 7}", width,width,width);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
r++;
|
|
||||||
if (_libro_cronologico)
|
|
||||||
backg.format("W4l{1 2 %d 2}W1l{1 5 %d 5}", width,width);
|
|
||||||
else
|
|
||||||
backg.format("W4l{1 2 %d 2}W1l{1 4 %d 4}", width,width);
|
|
||||||
}
|
|
||||||
set_background(backg);
|
|
||||||
// if (!_stampa_intesta || _stampa_definitiva) r++;
|
|
||||||
#else
|
|
||||||
riga.fill('_');
|
|
||||||
set_header(r, riga);
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
riga.fill('-');
|
riga.fill('-');
|
||||||
set_header(r++, riga);
|
set_header(r++, riga);
|
||||||
|
|
||||||
@ -783,11 +763,6 @@ int CG3400_application::set_headers()
|
|||||||
riga.fill('-');
|
riga.fill('-');
|
||||||
set_header(r, riga);
|
set_header(r, riga);
|
||||||
|
|
||||||
#if XVT_OS == XVT_OS_SCOUNIX
|
|
||||||
riga.fill('-');
|
|
||||||
set_header(r, riga);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1669,6 +1644,12 @@ HIDDEN int date2esc(const TDate& d, int* prevesc)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CG3400_application::set_reg_filter(TMask& m)
|
||||||
|
{
|
||||||
|
TEdit_field& reg = m.efield(CODREG);
|
||||||
|
reg.browse()->cursor()->set_filterfunction(filtra_reg);
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// MASCHERE
|
// MASCHERE
|
||||||
@ -1687,6 +1668,9 @@ bool CG3400_application::data_a_hndl (TMask_field& f, KEY k)
|
|||||||
{
|
{
|
||||||
const TDate data_a(f.get());
|
const TDate data_a(f.get());
|
||||||
TString16 dep(data_a.string());
|
TString16 dep(data_a.string());
|
||||||
|
|
||||||
|
app().set_reg_filter(m);
|
||||||
|
|
||||||
if (dep.empty()) return TRUE;
|
if (dep.empty()) return TRUE;
|
||||||
|
|
||||||
const int ae = date2esc(data_a); // Anno esercizio
|
const int ae = date2esc(data_a); // Anno esercizio
|
||||||
@ -1870,8 +1854,7 @@ void CG3400_application::init_print()
|
|||||||
else
|
else
|
||||||
_stampa_width = 198;
|
_stampa_width = 198;
|
||||||
|
|
||||||
// force_setpage(TRUE);
|
// Solo se _pagina_da diversa da 0
|
||||||
|
|
||||||
if (_pagina_da)
|
if (_pagina_da)
|
||||||
printer().set_from_page (_pagina_da - _pagine_stampate);
|
printer().set_from_page (_pagina_da - _pagine_stampate);
|
||||||
|
|
||||||
@ -1927,27 +1910,12 @@ bool CG3400_application::init_cursor()
|
|||||||
|
|
||||||
(*_cur) = 0L;
|
(*_cur) = 0L;
|
||||||
|
|
||||||
/***********************
|
|
||||||
if (_stampa_definitiva)
|
|
||||||
for ( ; _cur->pos() < _cur->items(); ++(*_cur))
|
|
||||||
{
|
|
||||||
#ifdef DBG
|
|
||||||
TString datareg(_cur->file().get("DATAREG"));
|
|
||||||
TString numreg(_cur->file().get("NUMREG"));
|
|
||||||
#endif
|
|
||||||
gia_stampati = _cur->file().get_bool("STAMPATO");
|
|
||||||
if (!gia_stampati) break; // basta trovarne uno ancora da stampare
|
|
||||||
}
|
|
||||||
*****/
|
|
||||||
// if (_cur->items() == 0L || (gia_stampati && _stampa_definitiva))
|
|
||||||
|
|
||||||
if (_cur->items() == 0L)
|
if (_cur->items() == 0L)
|
||||||
{
|
{
|
||||||
_cur->setfilter("");
|
_cur->setfilter("");
|
||||||
return warning_box ("Non ci sono movimenti da stampare nel periodo selezionato.\nLa stampa e' annullata");
|
return warning_box ("Non ci sono movimenti da stampare nel periodo selezionato.\nLa stampa e' annullata");
|
||||||
}
|
}
|
||||||
|
|
||||||
// _cur->setfilter("");
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#define DATA_DA 101
|
#define DATA_DA 101
|
||||||
#define DATA_A 102
|
#define DATA_A 102
|
||||||
#define STAMPA_DEF 103
|
#define STAMPA_DEF 103
|
||||||
#define PAGINA_DA 104
|
//#define PAGINA_DA 104
|
||||||
|
|
||||||
#define REG_DESC 107
|
#define REG_DESC 107
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Stampa libro giornale - maschera b
|
// Stampa libro giornale - maschera b
|
||||||
//
|
//
|
||||||
#define N_RIGA_STAMPATO 120
|
#define N_RIGA_STAMPATO 120
|
||||||
#define ULTIMA_DATA 121
|
#define ULTIMA_DATA 121
|
||||||
#define PROGR_DARE 122
|
#define PROGR_DARE 122
|
||||||
#define DLG_RIPRISTINA 123
|
#define DLG_RIPRISTINA 123
|
||||||
|
#define PAGINA_DA 124
|
Loading…
x
Reference in New Issue
Block a user