Correzioni allíntestazione registri

git-svn-id: svn://10.65.10.50/trunk@1340 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1995-05-10 09:05:02 +00:00
parent f655016b27
commit 5ec628193d
3 changed files with 70 additions and 36 deletions

View File

@ -13,8 +13,8 @@ class BA3300_application : public TPrintapp
TMask* _msk;
TTable* _tab; // Tabella dei registri
TString _cod_reg, _comulc, _ragsoc, _indulc, _civulc, _capulc, _com, _prov, _cofi, _paiv, _tipoa;
long _codice_ditta, _agg, _codanagr;
TString _cod_reg, _comulc, _ragsoc, _indulc, _civulc, _capulc, _com, _prov, _cofi, _paiv;
long _codice_ditta, _agg;
long _num_pag, _pag_ini, _pag_fin;
int _cod_anno;
bool _inizia_dopo;
@ -23,11 +23,12 @@ class BA3300_application : public TPrintapp
TLocalisamfile* _unloc;
TLocalisamfile* _comuni;
public:
protected:
bool menu (MENU_TAG m) { return TPrintapp::menu(m) ; }
virtual bool user_destroy();
virtual bool user_create() ;
virtual void on_firm_change();
bool set_print(int);
const char* decodifica_reg ();
@ -35,7 +36,9 @@ public:
virtual void set_page (int, int);
virtual print_action postprocess_page (int, int);
BA3300_application();
public:
BA3300_application() {}
~BA3300_application() {}
};
print_action BA3300_application::postprocess_page(int, int counter)
@ -104,17 +107,17 @@ void BA3300_application::set_page(int , int counter)
set_row (2, "@52gCODICE FISCALE %-16s", (const char*) _cofi);
set_row (2, "@85gPARTITA I.V.A. %-11s", (const char*) _paiv);
set_row (2, "@120gPag. %ld", contatore);
set_row (4, "@50gN. ........ DI REPERTORIO");
set_row (5, "@50gIL PRESENTE LIBRO DELLA@75g%-50s", (const char*) _ragsoc);
set_row (25, "@50gN. ........ DI REPERTORIO");
set_row (27, "@50gIL PRESENTE LIBRO DELLA@75g%-50s", (const char*) _ragsoc);
s = _indulc;
s << " " << _civulc;
set_row (6, "@50g%-52s", (const char*) s);
set_row (29, "@50g%-52s", (const char*) s);
s = _capulc;
s << " " << _com << " " << _prov;
set_row (7, "@50g%-62s", (const char*) s);
set_row (8, "@50gCONSTA DI %ld PAGINE UTILI, BOLLATE E NUMERATE", _num_pag - 2);
set_row (9, "@50gE VIENE OGGI VIDIMATO, il .........");
set_row (31, "@50g%-62s", (const char*) s);
set_row (33, "@50gCONSTA DI %ld PAGINE UTILI, BOLLATE E NUMERATE", _num_pag - (_inizia_dopo ? 1 : 0));
set_row (35, "@50gE VIENE OGGI VIDIMATO, il .........");
}
else
{
@ -130,32 +133,28 @@ void BA3300_application::set_page(int , int counter)
}
}
BA3300_application::BA3300_application()
{
}
void BA3300_application::on_firm_change()
bool BA3300_application::set_print(int)
{
KEY tasto;
TString16 app;
_msk->reset();
_nditte->setkey(1);
_codice_ditta = get_firm();
_nditte->curr().zero();
_nditte->curr().put(N_CODDITTA,_codice_ditta);
_nditte->read();
app=_nditte->curr().get(N_CODDITTA);
_msk->set(F_CODDITTA,app);
_ragsoc="Societa' ";
_nditte->read();
if (_nditte->bad())
return;
_msk->set(F_CODDITTA, _codice_ditta);
_ragsoc="SOCIETA' ";
_ragsoc << _nditte->curr().get(N_RAGSOC);
_tipoa =_nditte->curr().get(N_TIPOA);
_codanagr =atol(_nditte->curr().get(N_CODANAGR));
const TString16 tipoa =_nditte->curr().get(N_TIPOA);
const long codanagr =atol(_nditte->curr().get(N_CODANAGR));
_msk->set(F_RAGSOC,_ragsoc);
_unloc->setkey(1);
_unloc->curr().zero();
_unloc->curr().put(N_CODDITTA,app);
_unloc->curr().put(N_CODDITTA, _codice_ditta);
_unloc->curr().put(N_CODULC,"1");
_unloc->read();
_indulc=_unloc->curr().get(N_INDULC);
@ -178,19 +177,20 @@ bool BA3300_application::set_print(int)
_anag->setkey(1);
_anag->curr().zero();
_anag->curr().put(N_TIPOA,_tipoa);
_anag->curr().put(N_CODANAGR,_codanagr);
_anag->curr().put(N_TIPOA,tipoa);
_anag->curr().put(N_CODANAGR,codanagr);
_anag->read();
_cofi=_anag->curr().get(N_COFI);
_msk->set(F_COFI,_cofi);
_paiv=_anag->curr().get(N_PAIV);
_msk->set(F_PAIV,_paiv);
_msk->set(F_LUNG,66);
tasto = _msk->run();
}
if (tasto == K_ENTER)
bool BA3300_application::set_print(int)
{
//on_firm_change();
if (_msk->run() == K_ENTER)
{
printer().formlen(_msk->get_int(F_LUNG));
_cod_reg = _msk->get(F_CODICE);
@ -199,6 +199,15 @@ bool BA3300_application::set_print(int)
_pag_fin = _msk->get_long(F_NPAGFI);
_inizia_dopo = _msk->get_bool(F_PRIMO);
_num_pag = (_pag_fin - _pag_ini) + 1;
_ragsoc = _msk->get(F_RAGSOC);
_indulc= _msk->get(F_INDIRIZZO);
_civulc= _msk->get(F_CIV);
_capulc= _msk->get(F_CAP);
_comulc= _msk->get(F_CODCOM);
_com= _msk->get(F_COM);
_prov= _msk->get(F_PROV);
_paiv = _msk->get(F_PAIV);
_cofi = _msk->get(F_COFI);
if (_inizia_dopo) _num_pag++;
enable_print_menu();
return TRUE;
@ -214,7 +223,7 @@ static bool codice_handler (TMask_field& field, KEY key)
const TEdit_field& e = (const TEdit_field&)field;
const TLocalisamfile& t = e.browse()->cursor()->file();
const long num = t.get_long("I2");
field.mask().set(F_NPAGINI, num+1);
field.mask().set(F_NPAGINI, 0L);
field.mask().set(F_NPAGFI, 0L);
}
return TRUE;

View File

@ -42,6 +42,7 @@
#define F_CODCOM 116
#define F_COM 117
#define F_PROV 118
#define F_STATO 119
#endif // __BA3300_H

View File

@ -1,6 +1,6 @@
#include "ba3300.h"
PAGE "Stampa fogli libro bollato" -1 -1 74 20
PAGE "Stampa fogli libro bollato" -1 -1 76 20
NUMBER F_ANNO 4
BEGIN
@ -53,7 +53,7 @@ BEGIN
WARNING "Registro assente"
END
STRING F_RAGSOC 60
STRING F_RAGSOC 60 50
BEGIN
PROMPT 3 7 "Ragione sociale "
HELP "Ragione sociale dell'intestatario del registro"
@ -94,17 +94,41 @@ BEGIN
PROMPT 60 9 "Prov."
HELP "Provincia dell'intestatario del registro"
END
LIST F_STATO 18
BEGIN
PROMPT 3 10 "Stato "
FIELD LF_ANAG->STATOPAIV
HELP "Codice dello stato cui si riferisce la partita IVA"
ITEM " |Italia o extra CEE"
ITEM "BE|Belgio"
ITEM "DE|Germania"
ITEM "DK|Danimarca"
ITEM "EL|Grecia"
ITEM "ES|Spagna"
ITEM "FR|Francia"
ITEM "GB|Gran Bretagna"
ITEM "IE|Irlanda"
ITEM "IT|Italia"
ITEM "LU|Lussemburgo"
ITEM "NL|Olanda"
ITEM "PT|Portogallo"
END
STRING F_COFI 16
BEGIN
PROMPT 3 10 "Codice fiscale "
HELP "Codice fiscale dell'intestatario del registro"
PROMPT 3 11 "Codice fiscale "
HELP "Codice fiscale dell'intestatario del registro"
VALIDATE CF_FUNC F_STATO
WARNING "Codice fiscale errato"
END
STRING F_PAIV 12
BEGIN
PROMPT 44 10 "Partita I.V.A "
PROMPT 44 11 "Partita I.V.A "
HELP "Partita IVA dell'intestatario del registro"
VALIDATE PI_FUNC F_STATO
WARNING "Partita IVA errata"
END
NUMBER F_NPAGINI 6