Boh. Io non ho fatto niente.
git-svn-id: svn://10.65.10.50/trunk@820 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d4a3b2a822
commit
002dc39cfb
830
ba/ba3200.cpp
830
ba/ba3200.cpp
@ -1,415 +1,415 @@
|
|||||||
// ba3200 Stampa tabelle
|
// ba3200 Stampa tabelle
|
||||||
//
|
//
|
||||||
// legge un file con estensione .rpt che descrive la stampa.
|
// legge un file con estensione .rpt che descrive la stampa.
|
||||||
// Vedi file leggimi.txt per il formato del file
|
// Vedi file leggimi.txt per il formato del file
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <mask.h>
|
#include <mask.h>
|
||||||
#include <printapp.h>
|
#include <printapp.h>
|
||||||
#include <relation.h>
|
#include <relation.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
|
|
||||||
#include <nditte.h>
|
#include <nditte.h>
|
||||||
|
|
||||||
#include "ba3.h"
|
#include "ba3.h"
|
||||||
#include "ba3200.h"
|
#include "ba3200.h"
|
||||||
|
|
||||||
#define FOOTER_LEN 4 // se non ridefinito nel .rpt
|
#define FOOTER_LEN 4 // se non ridefinito nel .rpt
|
||||||
|
|
||||||
class BA3200_application : public TPrintapp
|
class BA3200_application : public TPrintapp
|
||||||
{
|
{
|
||||||
TString _tabname;
|
TString _tabname;
|
||||||
TFilename _rptname;
|
TFilename _rptname;
|
||||||
TRelation* _rel;
|
TRelation* _rel;
|
||||||
TCursor *_cur;
|
TCursor *_cur;
|
||||||
TMask* _msk;
|
TMask* _msk;
|
||||||
TString _maskname;
|
TString _maskname;
|
||||||
int _logicnum;
|
int _logicnum;
|
||||||
TArray _string_roman;
|
TArray _string_roman;
|
||||||
TArray _field_roman;
|
TArray _field_roman;
|
||||||
bool _stampa_registri;
|
bool _stampa_registri;
|
||||||
bool _stampa_ca7; //tabella causali 770
|
bool _stampa_ca7; //tabella causali 770
|
||||||
bool _tabella_comune;
|
bool _tabella_comune;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual bool user_create() ;
|
virtual bool user_create() ;
|
||||||
virtual bool user_destroy() ;
|
virtual bool user_destroy() ;
|
||||||
virtual bool set_print(int) ;
|
virtual bool set_print(int) ;
|
||||||
|
|
||||||
virtual void set_page(int, int);
|
virtual void set_page(int, int);
|
||||||
virtual bool preprocess_page (int, int);
|
virtual bool preprocess_page (int, int);
|
||||||
virtual bool preprocess_print(int file, int counter);
|
virtual bool preprocess_print(int file, int counter);
|
||||||
|
|
||||||
void set_headers();
|
void set_headers();
|
||||||
void set_rows();
|
void set_rows();
|
||||||
void set_footers();
|
void set_footers();
|
||||||
void set_translations();
|
void set_translations();
|
||||||
void set_relations();
|
void set_relations();
|
||||||
BA3200_application() {}
|
BA3200_application() {}
|
||||||
virtual ~BA3200_application() {}
|
virtual ~BA3200_application() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
bool BA3200_application::set_print(int)
|
bool BA3200_application::set_print(int)
|
||||||
{
|
{
|
||||||
TRectype from(_rel->lfile().curr()); from.zero();
|
TRectype from(_rel->lfile().curr()); from.zero();
|
||||||
TRectype to (from);
|
TRectype to (from);
|
||||||
|
|
||||||
if (_msk->run() == K_ENTER)
|
if (_msk->run() == K_ENTER)
|
||||||
{
|
{
|
||||||
const int campi_maschera = _msk->fields();
|
const int campi_maschera = _msk->fields();
|
||||||
for (int i = 0; i < campi_maschera; i++)
|
for (int i = 0; i < campi_maschera; i++)
|
||||||
{
|
{
|
||||||
const TMask_field& campo_maschera = _msk->fld(i);
|
const TMask_field& campo_maschera = _msk->fld(i);
|
||||||
const char* val = campo_maschera.get();
|
const char* val = campo_maschera.get();
|
||||||
if (*val)
|
if (*val)
|
||||||
{
|
{
|
||||||
const TFieldref* campo_ref = campo_maschera.field();
|
const TFieldref* campo_ref = campo_maschera.field();
|
||||||
|
|
||||||
if (campo_ref != NULL && campo_ref->ok())
|
if (campo_ref != NULL && campo_ref->ok())
|
||||||
{
|
{
|
||||||
if (campo_maschera.in_group(1)) campo_ref->write(val, from);
|
if (campo_maschera.in_group(1)) campo_ref->write(val, from);
|
||||||
else
|
else
|
||||||
if (campo_maschera.in_group(2)) campo_ref->write(val, to);
|
if (campo_maschera.in_group(2)) campo_ref->write(val, to);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_cur->setregion (from, to);
|
_cur->setregion (from, to);
|
||||||
|
|
||||||
set_background();
|
set_background();
|
||||||
if (_stampa_ca7)
|
if (_stampa_ca7)
|
||||||
set_background("W1l{1 3 132 3}W1l{1 5 132 5}");
|
set_background("W1l{1 3 132 3}W1l{1 5 132 5}");
|
||||||
else set_background("W1l{1 3 132 3}W1l{1 6 132 6}");
|
else set_background("W1l{1 3 132 3}W1l{1 6 132 6}");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BA3200_application::set_page (int , int )
|
void BA3200_application::set_page (int , int )
|
||||||
{
|
{
|
||||||
_string_roman.destroy();
|
_string_roman.destroy();
|
||||||
_field_roman.destroy();
|
_field_roman.destroy();
|
||||||
set_rows();
|
set_rows();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BA3200_application::preprocess_page(int , int)
|
bool BA3200_application::preprocess_page(int , int)
|
||||||
{
|
{
|
||||||
const int items = _field_roman.items();
|
const int items = _field_roman.items();
|
||||||
|
|
||||||
if (items > 0)
|
if (items > 0)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < items; i++)
|
for (int i = 0; i < items; i++)
|
||||||
{
|
{
|
||||||
TString& fn = (TString &) _field_roman[i];
|
TString& fn = (TString &) _field_roman[i];
|
||||||
TFieldref fld(fn, 0);
|
TFieldref fld(fn, 0);
|
||||||
TString& s = (TString &) _string_roman[i];
|
TString& s = (TString &) _string_roman[i];
|
||||||
|
|
||||||
const int n = atoi(fld.read(_rel));
|
const int n = atoi(fld.read(_rel));
|
||||||
s = itor(n);
|
s = itor(n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Stampa tabella registri. Calcolo: pagine residue = pagine - stampate
|
// Stampa tabella registri. Calcolo: pagine residue = pagine - stampate
|
||||||
if (_stampa_registri)
|
if (_stampa_registri)
|
||||||
{
|
{
|
||||||
const int pagine = _cur->file().get_int("I2");
|
const int pagine = _cur->file().get_int("I2");
|
||||||
const int stampate = _cur->file().get_int("I1");
|
const int stampate = _cur->file().get_int("I1");
|
||||||
const int residue = pagine - stampate;
|
const int residue = pagine - stampate;
|
||||||
if (residue > 0)
|
if (residue > 0)
|
||||||
set_row(1, "@126g%4d", residue);
|
set_row(1, "@126g%4d", residue);
|
||||||
else
|
else
|
||||||
set_row(1, "@126g%4s", " ");
|
set_row(1, "@126g%4s", " ");
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BA3200_application::set_headers()
|
void BA3200_application::set_headers()
|
||||||
{
|
{
|
||||||
TString NomeTabella, sep, formato_intesta, testo_intesta;
|
TString NomeTabella, sep, formato_intesta, testo_intesta;
|
||||||
int LungRiga, riga_intesta=0, last_riga=1;
|
int LungRiga, riga_intesta=0, last_riga=1;
|
||||||
TToken_string line;
|
TToken_string line;
|
||||||
TString256 riga;
|
TString256 riga;
|
||||||
|
|
||||||
reset_header ();
|
reset_header ();
|
||||||
|
|
||||||
TScanner rpt(_rptname);
|
TScanner rpt(_rptname);
|
||||||
rpt.paragraph("Headers");
|
rpt.paragraph("Headers");
|
||||||
|
|
||||||
// Leggo la lunghezza della riga (usata per centrare l'intestazione)
|
// Leggo la lunghezza della riga (usata per centrare l'intestazione)
|
||||||
line = rpt.line();
|
line = rpt.line();
|
||||||
LungRiga = line.get_int();
|
LungRiga = line.get_int();
|
||||||
|
|
||||||
riga.spaces(LungRiga);
|
riga.spaces(LungRiga);
|
||||||
// Senno' nella stampa a 80 non ci sta ditta e data
|
// Senno' nella stampa a 80 non ci sta ditta e data
|
||||||
|
|
||||||
// Leggo il nome della tabella
|
// Leggo il nome della tabella
|
||||||
line = rpt.line();
|
line = rpt.line();
|
||||||
NomeTabella = line.get();
|
NomeTabella = line.get();
|
||||||
|
|
||||||
// Sulla prima riga di intestazione metto la ditta, la data e la pagina
|
// Sulla prima riga di intestazione metto la ditta, la data e la pagina
|
||||||
if (!_tabella_comune)
|
if (!_tabella_comune)
|
||||||
{
|
{
|
||||||
const long codditta = get_firm();
|
const long codditta = get_firm();
|
||||||
TString80 ragsoc;
|
TString80 ragsoc;
|
||||||
TLocalisamfile nditte(LF_NDITTE);
|
TLocalisamfile nditte(LF_NDITTE);
|
||||||
|
|
||||||
nditte.zero();
|
nditte.zero();
|
||||||
nditte.put(NDT_CODDITTA, codditta);
|
nditte.put(NDT_CODDITTA, codditta);
|
||||||
if (nditte.read() == NOERR)
|
if (nditte.read() == NOERR)
|
||||||
{
|
{
|
||||||
ragsoc = nditte.get(NDT_RAGSOC);
|
ragsoc = nditte.get(NDT_RAGSOC);
|
||||||
if (LungRiga < 100) ragsoc.cut(40);
|
if (LungRiga < 100) ragsoc.cut(40);
|
||||||
}
|
}
|
||||||
riga.overwrite(format("Ditta %4ld %s", codditta,(const char *)ragsoc));
|
riga.overwrite(format("Ditta %4ld %s", codditta,(const char *)ragsoc));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_stampa_ca7)
|
if (_stampa_ca7)
|
||||||
{
|
{
|
||||||
TDate d (_msk->get(F_DATASTAMPA));
|
TDate d (_msk->get(F_DATASTAMPA));
|
||||||
printer().setdate(d);
|
printer().setdate(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
riga.overwrite ("Data @< Pag. @#", riga.len()-22);
|
riga.overwrite ("Data @< Pag. @#", riga.len()-22);
|
||||||
|
|
||||||
set_header (last_riga++, "%s", (const char *)riga);
|
set_header (last_riga++, "%s", (const char *)riga);
|
||||||
|
|
||||||
// Centro il nome della tabella
|
// Centro il nome della tabella
|
||||||
// Per la stampa registri non va centrato.
|
// Per la stampa registri non va centrato.
|
||||||
// Lo lascio anche per le altre stampe
|
// Lo lascio anche per le altre stampe
|
||||||
// if (_stampa_registri)
|
// if (_stampa_registri)
|
||||||
NomeTabella.left_just (LungRiga);
|
NomeTabella.left_just (LungRiga);
|
||||||
/* else
|
/* else
|
||||||
NomeTabella.center_just (LungRiga); */
|
NomeTabella.center_just (LungRiga); */
|
||||||
if (_stampa_ca7)
|
if (_stampa_ca7)
|
||||||
NomeTabella.center_just (LungRiga);
|
NomeTabella.center_just (LungRiga);
|
||||||
|
|
||||||
set_header (last_riga++, "@b%s", (const char *)NomeTabella);
|
set_header (last_riga++, "@b%s", (const char *)NomeTabella);
|
||||||
|
|
||||||
// Aggiungo una riga vuota per separare prima intestazione
|
// Aggiungo una riga vuota per separare prima intestazione
|
||||||
//sep.fill ('-', LungRiga);
|
//sep.fill ('-', LungRiga);
|
||||||
//set_header (last_riga, "%s", (const char *)sep);
|
//set_header (last_riga, "%s", (const char *)sep);
|
||||||
|
|
||||||
line = rpt.line();
|
line = rpt.line();
|
||||||
while ( (line != "") && (line[0] != '[') )
|
while ( (line != "") && (line[0] != '[') )
|
||||||
{
|
{
|
||||||
riga_intesta = atoi (line.get());
|
riga_intesta = atoi (line.get());
|
||||||
formato_intesta = line.get();
|
formato_intesta = line.get();
|
||||||
testo_intesta = (const char *) line.get();
|
testo_intesta = (const char *) line.get();
|
||||||
if (riga_intesta)
|
if (riga_intesta)
|
||||||
set_header (last_riga+riga_intesta, (const char *)formato_intesta,
|
set_header (last_riga+riga_intesta, (const char *)formato_intesta,
|
||||||
(const char *)testo_intesta);
|
(const char *)testo_intesta);
|
||||||
line = rpt.line();
|
line = rpt.line();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (riga_intesta) last_riga += riga_intesta;
|
if (riga_intesta) last_riga += riga_intesta;
|
||||||
last_riga++;
|
last_riga++;
|
||||||
//set_header (last_riga, (const char *)sep);
|
//set_header (last_riga, (const char *)sep);
|
||||||
last_riga++;
|
last_riga++;
|
||||||
sep.fill(' ');
|
sep.fill(' ');
|
||||||
set_header (last_riga, (const char *)sep);
|
set_header (last_riga, (const char *)sep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BA3200_application::set_rows()
|
void BA3200_application::set_rows()
|
||||||
{
|
{
|
||||||
TToken_string line;
|
TToken_string line;
|
||||||
TFieldref campo;
|
TFieldref campo;
|
||||||
int from, to, riga_record;
|
int from, to, riga_record;
|
||||||
TString formato_campo, picture;
|
TString formato_campo, picture;
|
||||||
const char * name;
|
const char * name;
|
||||||
|
|
||||||
TScanner rpt(_rptname);
|
TScanner rpt(_rptname);
|
||||||
rpt.paragraph("Rows");
|
rpt.paragraph("Rows");
|
||||||
|
|
||||||
line = rpt.line();
|
line = rpt.line();
|
||||||
while ( (line != "") && (line[0] != '[') )
|
while ( (line != "") && (line[0] != '[') )
|
||||||
{
|
{
|
||||||
riga_record = line.get_int();
|
riga_record = line.get_int();
|
||||||
|
|
||||||
TString s(line.get());
|
TString s(line.get());
|
||||||
|
|
||||||
campo = s;
|
campo = s;
|
||||||
from = campo.from();
|
from = campo.from();
|
||||||
to = campo.to();
|
to = campo.to();
|
||||||
name = campo.name();
|
name = campo.name();
|
||||||
int logicnum = campo.file() == 0 ? _logicnum : campo.file();
|
int logicnum = campo.file() == 0 ? _logicnum : campo.file();
|
||||||
|
|
||||||
formato_campo = line.get();
|
formato_campo = line.get();
|
||||||
formato_campo.trim();
|
formato_campo.trim();
|
||||||
formato_campo.lower();
|
formato_campo.lower();
|
||||||
const int p = formato_campo.find("@m");
|
const int p = formato_campo.find("@m");
|
||||||
|
|
||||||
if (p != -1)
|
if (p != -1)
|
||||||
{
|
{
|
||||||
formato_campo.cut(p);
|
formato_campo.cut(p);
|
||||||
formato_campo << "#t";
|
formato_campo << "#t";
|
||||||
_string_roman.add(new TString);
|
_string_roman.add(new TString);
|
||||||
_field_roman.add(s);
|
_field_roman.add(s);
|
||||||
const int last = _string_roman.items() - 1;
|
const int last = _string_roman.items() - 1;
|
||||||
|
|
||||||
set_row (riga_record, formato_campo, _string_roman.objptr(last));
|
set_row (riga_record, formato_campo, _string_roman.objptr(last));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (formato_campo.find("@pn"))
|
if (formato_campo.find("@pn"))
|
||||||
picture = line.get();
|
picture = line.get();
|
||||||
else
|
else
|
||||||
picture = "";
|
picture = "";
|
||||||
|
|
||||||
if (to == -1)
|
if (to == -1)
|
||||||
if (picture != "")
|
if (picture != "")
|
||||||
set_row (riga_record, formato_campo, FLD(logicnum,name,picture) );
|
set_row (riga_record, formato_campo, FLD(logicnum,name,picture) );
|
||||||
else
|
else
|
||||||
set_row (riga_record, formato_campo, FLD(logicnum,name) );
|
set_row (riga_record, formato_campo, FLD(logicnum,name) );
|
||||||
else
|
else
|
||||||
set_row (riga_record, formato_campo, FLD(logicnum,name,from,to) );
|
set_row (riga_record, formato_campo, FLD(logicnum,name,from,to) );
|
||||||
}
|
}
|
||||||
|
|
||||||
line = (const char *) rpt.line();
|
line = (const char *) rpt.line();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BA3200_application::set_footers()
|
void BA3200_application::set_footers()
|
||||||
{
|
{
|
||||||
TToken_string line;
|
TToken_string line;
|
||||||
int footer_len, riga;
|
int footer_len, riga;
|
||||||
TString formato, testo;
|
TString formato, testo;
|
||||||
|
|
||||||
reset_footer();
|
reset_footer();
|
||||||
|
|
||||||
TScanner rpt(_rptname);
|
TScanner rpt(_rptname);
|
||||||
rpt.paragraph("Footers");
|
rpt.paragraph("Footers");
|
||||||
|
|
||||||
line = rpt.line();
|
line = rpt.line();
|
||||||
footer_len = line.get_int();
|
footer_len = line.get_int();
|
||||||
if (footer_len) printer().footerlen (footer_len);
|
if (footer_len) printer().footerlen (footer_len);
|
||||||
|
|
||||||
line = rpt.line();
|
line = rpt.line();
|
||||||
while ( (line != "") && (line[0] != '[') )
|
while ( (line != "") && (line[0] != '[') )
|
||||||
{
|
{
|
||||||
riga = line.get_int();
|
riga = line.get_int();
|
||||||
formato = line.get();
|
formato = line.get();
|
||||||
testo = line.get();
|
testo = line.get();
|
||||||
set_footer (riga, (const char *)formato, (const char*)testo);
|
set_footer (riga, (const char *)formato, (const char*)testo);
|
||||||
line = rpt.line();
|
line = rpt.line();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BA3200_application::set_translations()
|
void BA3200_application::set_translations()
|
||||||
{
|
{
|
||||||
TString campo, from, to;
|
TString campo, from, to;
|
||||||
TToken_string line;
|
TToken_string line;
|
||||||
int logicnum;
|
int logicnum;
|
||||||
|
|
||||||
TScanner rpt(_rptname);
|
TScanner rpt(_rptname);
|
||||||
rpt.paragraph("Translations");
|
rpt.paragraph("Translations");
|
||||||
|
|
||||||
line = rpt.line();
|
line = rpt.line();
|
||||||
while ( (line != "") && (line[0] != '[') )
|
while ( (line != "") && (line[0] != '[') )
|
||||||
{
|
{
|
||||||
logicnum = line.get_int();
|
logicnum = line.get_int();
|
||||||
campo = line.get();
|
campo = line.get();
|
||||||
from = line.get();
|
from = line.get();
|
||||||
to = line.get();
|
to = line.get();
|
||||||
set_translation (logicnum, (char*)(const char *)campo, (char*)(const char *)from, (char*)(const char *)to);
|
set_translation (logicnum, (char*)(const char *)campo, (char*)(const char *)from, (char*)(const char *)to);
|
||||||
line = rpt.line();
|
line = rpt.line();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BA3200_application::set_relations()
|
void BA3200_application::set_relations()
|
||||||
{
|
{
|
||||||
TToken_string line("", ',');
|
TToken_string line("", ',');
|
||||||
TString tab(16), expr(40);
|
TString tab(16), expr(40);
|
||||||
int key, linkto, alias, logicnum;
|
int key, linkto, alias, logicnum;
|
||||||
|
|
||||||
TScanner rpt(_rptname);
|
TScanner rpt(_rptname);
|
||||||
rpt.paragraph("Relations");
|
rpt.paragraph("Relations");
|
||||||
|
|
||||||
line = rpt.line();
|
line = rpt.line();
|
||||||
while ( (line != "") && (line[0] != '[') )
|
while ( (line != "") && (line[0] != '[') )
|
||||||
{
|
{
|
||||||
tab = line.get();
|
tab = line.get();
|
||||||
logicnum = atoi(tab);
|
logicnum = atoi(tab);
|
||||||
expr = line.get();
|
expr = line.get();
|
||||||
key = line.get_int();
|
key = line.get_int();
|
||||||
if (key == 0) key = 1;
|
if (key == 0) key = 1;
|
||||||
linkto = line.get_int();
|
linkto = line.get_int();
|
||||||
alias = line.get_int();
|
alias = line.get_int();
|
||||||
if (logicnum > 0)
|
if (logicnum > 0)
|
||||||
_rel->add(logicnum, expr, key, linkto, alias);
|
_rel->add(logicnum, expr, key, linkto, alias);
|
||||||
else
|
else
|
||||||
_rel->add(tab, expr, key, linkto, alias);
|
_rel->add(tab, expr, key, linkto, alias);
|
||||||
|
|
||||||
line = rpt.line();
|
line = rpt.line();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool BA3200_application::user_create()
|
bool BA3200_application::user_create()
|
||||||
{
|
{
|
||||||
_tabname = argv(2);
|
_tabname = argv(2);
|
||||||
|
|
||||||
TString16 t(_tabname);
|
TString16 t(_tabname);
|
||||||
|
|
||||||
_tabella_comune = (t[0] == '%');
|
_tabella_comune = (t[0] == '%');
|
||||||
if (_tabella_comune)
|
if (_tabella_comune)
|
||||||
t.ltrim(1);
|
t.ltrim(1);
|
||||||
|
|
||||||
_rptname << "batb" << t << ".rpt" ;
|
_rptname << "batb" << t << ".rpt" ;
|
||||||
|
|
||||||
// Flag per la stampa tabella registri
|
// Flag per la stampa tabella registri
|
||||||
_stampa_registri = (_tabname.upper() == "REG");
|
_stampa_registri = (_tabname.upper() == "REG");
|
||||||
_stampa_ca7 = (_tabname.upper() == "%CA7");
|
_stampa_ca7 = (_tabname.upper() == "%CA7");
|
||||||
|
|
||||||
if (!fexist(_rptname))
|
if (!fexist(_rptname))
|
||||||
fatal_box("Impossibile aprire il file '%s'", (const char*)_rptname);
|
fatal_box("Impossibile aprire il file '%s'", (const char*)_rptname);
|
||||||
|
|
||||||
_rel = new TRelation (_tabname);
|
_rel = new TRelation (_tabname);
|
||||||
_cur = new TCursor (_rel);
|
_cur = new TCursor (_rel);
|
||||||
t = _tabname;
|
t = _tabname;
|
||||||
|
|
||||||
if (t[0] == '%')
|
if (t[0] == '%')
|
||||||
t.ltrim(1);
|
t.ltrim(1);
|
||||||
|
|
||||||
|
|
||||||
_maskname << "bast" << t;
|
_maskname << "bast" << t;
|
||||||
_msk = new TMask (_maskname) ;
|
_msk = new TMask (_maskname) ;
|
||||||
|
|
||||||
add_cursor (_cur);
|
add_cursor (_cur);
|
||||||
add_file (_tabname);
|
add_file (_tabname);
|
||||||
|
|
||||||
_logicnum = _cur->file().num();
|
_logicnum = _cur->file().num();
|
||||||
|
|
||||||
reset_print ();
|
reset_print ();
|
||||||
|
|
||||||
printer().footerlen (FOOTER_LEN);
|
printer().footerlen (FOOTER_LEN);
|
||||||
for (int i=1; i <= FOOTER_LEN; i++) set_footer(i, "%s", " ");
|
for (int i=1; i <= FOOTER_LEN; i++) set_footer(i, "%s", " ");
|
||||||
|
|
||||||
#ifdef DBG1
|
#ifdef DBG1
|
||||||
set_fillchar ('.');
|
set_fillchar ('.');
|
||||||
#endif
|
#endif
|
||||||
set_relations();
|
set_relations();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BA3200_application::preprocess_print(int file, int counter)
|
bool BA3200_application::preprocess_print(int file, int counter)
|
||||||
{
|
{
|
||||||
set_headers();
|
set_headers();
|
||||||
set_footers();
|
set_footers();
|
||||||
set_translations();
|
set_translations();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BA3200_application::user_destroy()
|
bool BA3200_application::user_destroy()
|
||||||
{
|
{
|
||||||
delete _msk;
|
delete _msk;
|
||||||
delete _cur;
|
delete _cur;
|
||||||
delete _rel;
|
delete _rel;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ba3200(int argc, char* argv[])
|
int ba3200(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
BA3200_application a;
|
BA3200_application a;
|
||||||
a.run(argc, argv, "Stampa tabella");
|
a.run(argc, argv, "Stampa tabella");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
72
ba/ba3200.h
72
ba/ba3200.h
@ -1,36 +1,36 @@
|
|||||||
#ifndef __BA3200_H
|
#ifndef __BA3200_H
|
||||||
#define __BA3200_H
|
#define __BA3200_H
|
||||||
|
|
||||||
#define F_INIZIO0 100
|
#define F_INIZIO0 100
|
||||||
#define F_INIZIO1 101
|
#define F_INIZIO1 101
|
||||||
#define F_INIZIO2 102
|
#define F_INIZIO2 102
|
||||||
#define F_INIZIO3 103
|
#define F_INIZIO3 103
|
||||||
#define F_INIZIO4 104
|
#define F_INIZIO4 104
|
||||||
#define F_INIZIO5 105
|
#define F_INIZIO5 105
|
||||||
#define F_INIZIO6 106
|
#define F_INIZIO6 106
|
||||||
#define F_INIZIO7 107
|
#define F_INIZIO7 107
|
||||||
#define F_INIZIO8 108
|
#define F_INIZIO8 108
|
||||||
#define F_INIZIO9 109
|
#define F_INIZIO9 109
|
||||||
#define F_INIZIO10 110
|
#define F_INIZIO10 110
|
||||||
#define F_FINE1 201
|
#define F_FINE1 201
|
||||||
#define F_FINE2 202
|
#define F_FINE2 202
|
||||||
#define F_FINE3 203
|
#define F_FINE3 203
|
||||||
#define F_FINE4 204
|
#define F_FINE4 204
|
||||||
#define F_FINE5 205
|
#define F_FINE5 205
|
||||||
#define F_FINE6 206
|
#define F_FINE6 206
|
||||||
#define F_FINE7 207
|
#define F_FINE7 207
|
||||||
#define F_FINE8 208
|
#define F_FINE8 208
|
||||||
#define F_FINE9 209
|
#define F_FINE9 209
|
||||||
#define F_FINE10 210
|
#define F_FINE10 210
|
||||||
|
|
||||||
#define F_CODDITTA 211
|
#define F_CODDITTA 211
|
||||||
#define F_RAGSOC 212
|
#define F_RAGSOC 212
|
||||||
|
|
||||||
#define F_DATASTAMPA 213
|
#define F_DATASTAMPA 213
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
163
ba/prassi.mnu
163
ba/prassi.mnu
@ -1,3 +1,165 @@
|
|||||||
|
<<<<<<< prassi.mnu
|
||||||
|
0|Menu Principale|
|
||||||
|
0|Anagrafiche|1
|
||||||
|
0|Contabilita'|4|7
|
||||||
|
0|Terreni e fabbricati|tefa -t
|
||||||
|
0|Modello 740|740 -t
|
||||||
|
0|Modello 770|17|4
|
||||||
|
0|Manutenzione|15
|
||||||
|
1|Gestione Anagrafiche|1
|
||||||
|
1|Persone fisiche|ba4 -1 F
|
||||||
|
1|Persone giuridiche|ba4 -1 G
|
||||||
|
1|Ditte|ba4 -2
|
||||||
|
1|Ricerca Soci|ba5
|
||||||
|
1|Tabelle ministeriali|11
|
||||||
|
1|Tabelle|2
|
||||||
|
1|Stampa anagrafiche|ba6 -0
|
||||||
|
1|Stampa tabelle|3
|
||||||
|
1|Stampa tabelle ministeriali|12
|
||||||
|
1|Stampa numerazione registri|ba3 -2
|
||||||
|
2|Tabelle|1
|
||||||
|
2|Codici IVA|ba3 -0 %iva
|
||||||
|
2|Codici Attivita'|ba3 -0 %ais
|
||||||
|
2|Condizioni di pagamento|ba3 -6
|
||||||
|
2|Classificazione pagamenti|ba3 -0 %clr
|
||||||
|
2|Libri sociali|ba3 -0 %itl
|
||||||
|
2|Banche|ba3 -0 %ban
|
||||||
|
2|Codici statistici|ba3 -0 %stt
|
||||||
|
2|Cariche sociali|ba3 -0 %crs
|
||||||
|
2|Vecchi cod.Attivita'|ba3 -0 %ois
|
||||||
|
2|Stati esteri|ba3 -0 %sta
|
||||||
|
3|Stampa tabelle|3
|
||||||
|
3|Codici IVA|ba3 -1 %iva
|
||||||
|
3|Codici Attivita'|ba3 -1 %ais
|
||||||
|
3|Condizioni di pagamento|ba3 -1 %cpg
|
||||||
|
3|Classificazione pagamenti|ba3 -1 %clr
|
||||||
|
3|Libri sociali|ba3 -1 %itl
|
||||||
|
3|Banche|ba3 -1 %ban
|
||||||
|
3|Codici statistici|ba3 -1 %stt
|
||||||
|
3|Cariche sociali|ba3 -1 %crs
|
||||||
|
3|Vecchi cod.Attivita'|ba3 -1 %ois
|
||||||
|
3|Stati esteri|ba3 -1 %sta
|
||||||
|
4|Contabilita'|2
|
||||||
|
4|Persone fisiche|ba4 -1 F
|
||||||
|
4|Persone giuridiche|ba4 -1 G
|
||||||
|
4|Ditte|ba4 -2
|
||||||
|
4|Tabelle studio|5|7
|
||||||
|
4|Stampa tabelle studio|6|7
|
||||||
|
4|Scelta contabilita'|13|F,7
|
||||||
|
4|IVA|10|5
|
||||||
|
4|Parametri di studio|cg5 -0
|
||||||
|
4|Gestione Libro Unico|14|7
|
||||||
|
5|Tabelle studio|1|
|
||||||
|
5|Condizioni di pagamento|ba3 -6
|
||||||
|
5|Classificazione pagamenti|ba3 -0 %clr
|
||||||
|
5|Descrizioni aggiuntive|ba3 -0 %dpn
|
||||||
|
5|Codici IVA|ba3 -0 %iva
|
||||||
|
5|Codici Attivita'|ba3 -0 %ais
|
||||||
|
5|Libri sociali|ba3 -0 %itl
|
||||||
|
5|Banche|ba3 -0 %ban
|
||||||
|
5|IV direttiva CEE|ba3 -0 %ivd
|
||||||
|
5|Valute|ba3 -0 %val
|
||||||
|
5|Lingue|ba3 -0 %lng
|
||||||
|
6|Stampa tabelle studio|3
|
||||||
|
6|Condizioni di pagamento|ba3 -1 %cpg
|
||||||
|
6|Classificazione pagamenti|ba3 -1 %clr
|
||||||
|
6|Descrizioni aggiuntive|ba3 -1 %dpn
|
||||||
|
6|Codici IVA|ba3 -1 %iva
|
||||||
|
6|Codici Attivita'|ba3 -1 %ais
|
||||||
|
6|Libri sociali|ba3 -1 %itl
|
||||||
|
6|Banche|ba3 -1 %ban
|
||||||
|
6|IV direttiva CEE|ba3 -7 S
|
||||||
|
6|Valute|ba3 -1 %val
|
||||||
|
6|Lingue|ba3 -1 %lng
|
||||||
|
7|Tabelle ditta|2|7
|
||||||
|
7|Parametri ditta|cg5 -1
|
||||||
|
7|Registri|ba3 -0 reg
|
||||||
|
7|Piano dei conti|cg0 -0
|
||||||
|
7|Causali|cg0 -4
|
||||||
|
7|Clienti/Fornitori|cg0 -1
|
||||||
|
7|Banche|ba3 -0 %ban
|
||||||
|
7|Esercizi|ba3 -0 esc
|
||||||
|
8|Stampa tabelle ditta|3|7
|
||||||
|
8|Registri|ba3 -1 reg
|
||||||
|
8|Piano dei conti|cg1 -0
|
||||||
|
8|Causali|cg1 -6
|
||||||
|
8|Clienti/Fornitori|cg1 -1
|
||||||
|
8|Banche|ba3 -1 %ban
|
||||||
|
8|IV direttiva CEE|ba3 -7 D
|
||||||
|
9|Prima nota|2|7
|
||||||
|
9|Prima nota|cg2 -0
|
||||||
|
9|Elimina movimenti provvisori|cg2 -1
|
||||||
|
9|Ricalcolo saldi|cg4 -0
|
||||||
|
9|IVA|10|5
|
||||||
|
9|Lista movimenti|cg3 -0
|
||||||
|
9|Mastrini|cg3 -1
|
||||||
|
9|Riepiloghi|cg3 -4
|
||||||
|
9|Visualizzazione saldi|cg5 -2
|
||||||
|
9|Bilancio|cg1 -4
|
||||||
|
9|Bilancio IV direttiva CEE|cg1 -5
|
||||||
|
9|Giornale|cg3 -3
|
||||||
|
10|IVA|2|5
|
||||||
|
10|Parametri liquidazione|cg5 -3
|
||||||
|
10|Liquidazione|cg4 -2
|
||||||
|
10|Deleghe|ba3 -0 %del
|
||||||
|
10|Stampa deleghe|cg1 -3
|
||||||
|
10|Riepilogo progressivi|cg0 -3
|
||||||
|
10|Stampa registri|cg4 -3
|
||||||
|
10|Progressivi allegati|cg0 -2
|
||||||
|
10|Stampa allegati|cg3 -2
|
||||||
|
11|Tabelle ministeriali|1
|
||||||
|
11|Comuni|ba4 -0
|
||||||
|
11|Uffici concessioni|ba3 -0 %ucc
|
||||||
|
11|Uffici imposte dirette|ba3 -0 %uid
|
||||||
|
11|Uffici IVA|ba3 -0 %uiv
|
||||||
|
11|Uffici registro|ba3 -0 %ure
|
||||||
|
11|Centri servizio|ba3 -0 %ucs
|
||||||
|
12|Stampa tabelle ministeriali|3
|
||||||
|
12|Comuni|ba6 -1
|
||||||
|
12|Uffici concessioni|ba3 -1 %ucc
|
||||||
|
12|Uffici imposte dirette|ba3 -1 %uid
|
||||||
|
12|Uffici IVA|ba3 -1 %uiv
|
||||||
|
12|Uffici registro|ba3 -1 %ure
|
||||||
|
12|Centri servizio|ba3 -1 %ucs
|
||||||
|
13|Scelta contabilita'|
|
||||||
|
13|Tabelle ditta|7|7
|
||||||
|
13|Stampa tabelle ditta|8|7
|
||||||
|
13|Prima nota|9|7
|
||||||
|
13|Servizio|16|7
|
||||||
|
14|Gestione libro unico|7
|
||||||
|
14|Tabella libro unico|ba3 -4
|
||||||
|
14|Tabella vidimazioni|ba3 -0 %vid
|
||||||
|
14|Stampa indici libro unico|ba3 -5
|
||||||
|
15|Manutenzione|1
|
||||||
|
15|Archivi|ba1
|
||||||
|
15|Utenti|ba1 -3
|
||||||
|
15|Attivazione|ba1 -4
|
||||||
|
16|Servizio|
|
||||||
|
16|Copia Archivi|cg4 -1
|
||||||
|
16|Ripristino stampa registri|cg5 -4
|
||||||
|
17|Modello 770|5
|
||||||
|
17|Manutenzione dichiarazioni|18|F,4
|
||||||
|
17|Parametri di studio|773 -0
|
||||||
|
17|Tabella C.A.A.F.|773 -3 %caf
|
||||||
|
17|Tabella causali|773 -3 %ca7
|
||||||
|
17|Tabella enti previdenziali|773 -3 %ca7
|
||||||
|
17|Generazione versamenti|774 -0
|
||||||
|
17|Parametri generazione|ba3 -3 771400b
|
||||||
|
18|Manutenzione dichiarazioni|17
|
||||||
|
18|Manutenzione dati anagrafici|19
|
||||||
|
18|Scheda percipienti|770 -0
|
||||||
|
18|Archivio percipienti|775 -0
|
||||||
|
18|Quadro I|ba3 -3 771300a
|
||||||
|
18|Quadro L|771 -2
|
||||||
|
18|Prospetto dati generali|ba3 -3 771400a
|
||||||
|
19|Manutenzione dati anagrafici|18
|
||||||
|
19|Dichiarante|771 -0 A
|
||||||
|
19|Rappresentante|771 -0 C
|
||||||
|
19|Luogo scritture|771 -0 D
|
||||||
|
19|C.A.A.F.|771 -0 E
|
||||||
|
19|Direttore - professionista|771 -0 F
|
||||||
|
19|Dati vari|771 -0 G
|
||||||
|
=======
|
||||||
0|Menu Principale|
|
0|Menu Principale|
|
||||||
0|Anagrafiche|1
|
0|Anagrafiche|1
|
||||||
0|Contabilita'|4|7
|
0|Contabilita'|4|7
|
||||||
@ -159,3 +321,4 @@
|
|||||||
19|C.A.A.F.|771 -0 E
|
19|C.A.A.F.|771 -0 E
|
||||||
19|Direttore - professionista|771 -0 F
|
19|Direttore - professionista|771 -0 F
|
||||||
19|Dati vari|771 -0 G
|
19|Dati vari|771 -0 G
|
||||||
|
>>>>>>> 1.23
|
||||||
|
Loading…
x
Reference in New Issue
Block a user