Stampa registri completa (senza ancora liquidazione)
git-svn-id: svn://10.65.10.50/trunk@216 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
efa6c4e8ee
commit
2b1c61fb33
@ -4,7 +4,7 @@
|
|||||||
#include "cg4400.h"
|
#include "cg4400.h"
|
||||||
#include "cg4400a.h"
|
#include "cg4400a.h"
|
||||||
|
|
||||||
HIDDEN TString256 TMP;
|
static TString256 TMP;
|
||||||
|
|
||||||
HIDDEN CG4400_application * app() { return (CG4400_application*) MainApp(); }
|
HIDDEN CG4400_application * app() { return (CG4400_application*) MainApp(); }
|
||||||
|
|
||||||
@ -71,17 +71,20 @@ bool mask_select (TMask_field& f, KEY k)
|
|||||||
{
|
{
|
||||||
if (app()->_selected[i]) continue;
|
if (app()->_selected[i]) continue;
|
||||||
TToken_string d = (const char*)((TToken_string&)app()->_nomiditte[i]);
|
TToken_string d = (const char*)((TToken_string&)app()->_nomiditte[i]);
|
||||||
TString cod = d.get(0);
|
TString cod = d.get(1);
|
||||||
app()->_ditte->add(d);
|
app()->_ditte->add(d);
|
||||||
|
|
||||||
if (!from.empty() || !to.empty())
|
if (!from.empty() || !to.empty())
|
||||||
{
|
{
|
||||||
if (from.empty()) from = "0";
|
if (from.empty()) from = "0";
|
||||||
if (to.empty()) to = "999999999";
|
if (to.empty()) to = "999999";
|
||||||
if (atol(cod) >= atol(from) && atol(cod) <= atol(to))
|
if (atol(cod) >= atol(from) && atol(cod) <= atol(to))
|
||||||
|
{
|
||||||
|
selected.set(chk++);
|
||||||
app()->_ditte->check(chk++);
|
app()->_ditte->check(chk++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// seleziona e aggiungi alle gia' selezionate
|
// seleziona e aggiungi alle gia' selezionate
|
||||||
if (app()->_ditte->run() == K_ENTER)
|
if (app()->_ditte->run() == K_ENTER)
|
||||||
{
|
{
|
||||||
@ -131,6 +134,35 @@ bool mask_annulla (TMask_field& f, KEY k)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool mask_from_to (TMask_field& f, KEY k)
|
||||||
|
{
|
||||||
|
if (k == K_TAB)
|
||||||
|
{
|
||||||
|
app()->_selected.reset();
|
||||||
|
TString from, to;
|
||||||
|
const short id = f.dlg();
|
||||||
|
from = f.mask().get(id-1);
|
||||||
|
to = f.mask().get(id);
|
||||||
|
int i;
|
||||||
|
if (!from.empty() || !to.empty())
|
||||||
|
{
|
||||||
|
long chk = 0l;
|
||||||
|
if (from.empty()) from = "0";
|
||||||
|
if (to.empty()) to = "999999";
|
||||||
|
|
||||||
|
for (i = 0; i < app()->_nomiditte.items(); i++)
|
||||||
|
{
|
||||||
|
TToken_string d = (const char*)((TToken_string&)app()->_nomiditte[i]);
|
||||||
|
TString cod = d.get(1);
|
||||||
|
|
||||||
|
if (atol(cod) >= atol(from) && atol(cod)<= atol(to))
|
||||||
|
app()->_selected.set(chk++);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
bool mask_mese (TMask_field& f, KEY k)
|
bool mask_mese (TMask_field& f, KEY k)
|
||||||
{
|
{
|
||||||
if (k == K_ENTER)
|
if (k == K_ENTER)
|
||||||
@ -1444,10 +1476,10 @@ bool CG4400_application::set_ditte(TMask& m)
|
|||||||
m.field(TIPO_STAMPA).set("1");
|
m.field(TIPO_STAMPA).set("1");
|
||||||
|
|
||||||
m.set_handler (TIPO_STAMPA, my_handler);
|
m.set_handler (TIPO_STAMPA, my_handler);
|
||||||
|
m.set_handler (A_CODICE, mask_from_to);
|
||||||
m.set_handler (DA_DATA, mask_data);
|
m.set_handler (DA_DATA, mask_data);
|
||||||
m.set_handler (A_DATA, mask_data);
|
m.set_handler (A_DATA, mask_data);
|
||||||
m.set_handler (MESE, mask_mese);
|
m.set_handler (MESE, mask_mese);
|
||||||
//m.set_handler (FINO_A_MESE, mask_fino_a_mese);
|
|
||||||
m.set_handler (CODICE_LIB_UN, mask_cod);
|
m.set_handler (CODICE_LIB_UN, mask_cod);
|
||||||
m.set_handler (DLG_SELECT, mask_select);
|
m.set_handler (DLG_SELECT, mask_select);
|
||||||
m.set_handler (F_ANNULLA, mask_annulla);
|
m.set_handler (F_ANNULLA, mask_annulla);
|
||||||
|
@ -24,14 +24,12 @@
|
|||||||
|
|
||||||
#include "cglib03.h"
|
#include "cglib03.h"
|
||||||
|
|
||||||
//const int MAXSTR = 255;
|
|
||||||
//static char __tmp[MAXSTR];
|
|
||||||
|
|
||||||
//enum STAMPA { bollati=1, unici=2 };
|
//enum STAMPA { bollati=1, unici=2 };
|
||||||
const int TABREG = (int)TTable::name2log("REG");
|
const int TABREG = (int)TTable::name2log("REG");
|
||||||
|
|
||||||
bool filter_func (const TRelation*);
|
bool filter_func (const TRelation*);
|
||||||
bool my_handler (TMask_field&, KEY);
|
bool my_handler (TMask_field&, KEY);
|
||||||
|
bool mask_from_to (TMask_field&, KEY);
|
||||||
bool mask_cod (TMask_field&, KEY);
|
bool mask_cod (TMask_field&, KEY);
|
||||||
bool mask_data (TMask_field&, KEY);
|
bool mask_data (TMask_field&, KEY);
|
||||||
bool mask_mese (TMask_field&, KEY);
|
bool mask_mese (TMask_field&, KEY);
|
||||||
@ -61,8 +59,8 @@ class CG4400_application : public TPrintapp
|
|||||||
{
|
{
|
||||||
friend bool filter_func (const TRelation *r);
|
friend bool filter_func (const TRelation *r);
|
||||||
friend bool mask_cod (TMask_field&, KEY);
|
friend bool mask_cod (TMask_field&, KEY);
|
||||||
|
friend bool mask_from_to (TMask_field&, KEY);
|
||||||
friend bool mask_mese (TMask_field&, KEY);
|
friend bool mask_mese (TMask_field&, KEY);
|
||||||
//friend bool mask_fino_a_mese (TMask_field&, KEY);
|
|
||||||
friend bool my_handler (TMask_field&, KEY);
|
friend bool my_handler (TMask_field&, KEY);
|
||||||
friend bool mask_select (TMask_field&, KEY);
|
friend bool mask_select (TMask_field&, KEY);
|
||||||
friend bool mask_verifica (TMask_field&, KEY);
|
friend bool mask_verifica (TMask_field&, KEY);
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include "cg4400.h"
|
#include "cg4400.h"
|
||||||
|
|
||||||
|
static TString256 tmp;
|
||||||
|
|
||||||
TRectype& TDati_ditta::look_com(const char * cod)
|
TRectype& TDati_ditta::look_com(const char * cod)
|
||||||
{
|
{
|
||||||
@ -39,8 +40,8 @@ TDati_ditta::~TDati_ditta()
|
|||||||
|
|
||||||
void TDati_ditta::get_dati_ditta ()
|
void TDati_ditta::get_dati_ditta ()
|
||||||
{
|
{
|
||||||
TString codanagr;
|
TString16 codanagr;
|
||||||
TString tipoa;
|
char tipoa;
|
||||||
|
|
||||||
_nditte->zero();
|
_nditte->zero();
|
||||||
_nditte->put(NDT_CODDITTA, _codditta);
|
_nditte->put(NDT_CODDITTA, _codditta);
|
||||||
@ -49,8 +50,8 @@ void TDati_ditta::get_dati_ditta ()
|
|||||||
if (_nditte->bad()) _nditte->zero();
|
if (_nditte->bad()) _nditte->zero();
|
||||||
|
|
||||||
_ragsoc = _nditte->get(NDT_RAGSOC);
|
_ragsoc = _nditte->get(NDT_RAGSOC);
|
||||||
codanagr = _nditte->curr().get(NDT_CODANAGR);
|
codanagr = _nditte->get(NDT_CODANAGR);
|
||||||
tipoa = _nditte->curr().get(NDT_TIPOA);
|
tipoa = _nditte->get_char(NDT_TIPOA);
|
||||||
|
|
||||||
_anag->setkey(1);
|
_anag->setkey(1);
|
||||||
_anag->zero();
|
_anag->zero();
|
||||||
@ -87,34 +88,20 @@ void TDati_ditta::get_dati_ditta ()
|
|||||||
|
|
||||||
const char * TDati_ditta::prima_riga()
|
const char * TDati_ditta::prima_riga()
|
||||||
{
|
{
|
||||||
//TString riga(_stampa_width);
|
|
||||||
//tmp = "";
|
|
||||||
TString tmp(132);
|
|
||||||
get_dati_ditta();
|
get_dati_ditta();
|
||||||
|
tmp << "Ditta " << _codditta << ' ' << _ragsoc << " Via " << _viafis << ' '
|
||||||
/*
|
<< _cap << ' ' << _comunefis << ' ' << _provfis;
|
||||||
riga.format("Ditta %d %s Via %s %s %s %s", _codditta,
|
|
||||||
(const char *)_ragsoc,(const char *)_viafis, (const char *)_cap,
|
|
||||||
(const char *)_comunefis, (const char *)_provfis);
|
|
||||||
*/
|
|
||||||
tmp.format("Ditta %ld ", _codditta);
|
|
||||||
tmp << format("%s %s %s %s %s",
|
|
||||||
(const char *)_ragsoc,(const char *)_viafis, (const char *)_cap,
|
|
||||||
(const char *)_comunefis, (const char *)_provfis);
|
|
||||||
//tmp = riga;
|
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * TDati_ditta::seconda_riga()
|
const char * TDati_ditta::seconda_riga()
|
||||||
{
|
{
|
||||||
//TString riga(_stampa_width);
|
tmp = "";
|
||||||
//tmp = "";
|
|
||||||
TString tmp(132);
|
|
||||||
tmp = "Data @<";
|
tmp = "Data @<";
|
||||||
tmp.right_just(_stampa_width-15);
|
tmp.right_just(_stampa_width-15);
|
||||||
tmp.overwrite (format ("Partita iva %s @26gCodice fiscale %s",
|
tmp.overwrite (format ("Partita iva %s @26gCodice fiscale %s",
|
||||||
(const char*)_paiva, (const char*)_cofi));
|
(const char*)_paiva, (const char*)_cofi));
|
||||||
//tmp = riga;
|
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user