Aggiunta stampa descrizione della ragione sociale della ditta
git-svn-id: svn://10.65.10.50/trunk@513 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
2b92018af0
commit
62e085f20e
@ -10,6 +10,8 @@
|
|||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
|
|
||||||
|
#include <nditte.h>
|
||||||
|
|
||||||
#include "ba3.h"
|
#include "ba3.h"
|
||||||
#include "ba3200.h"
|
#include "ba3200.h"
|
||||||
|
|
||||||
@ -107,7 +109,7 @@ bool BA3200_application::preprocess_page(int , int)
|
|||||||
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)
|
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", " ");
|
||||||
@ -120,6 +122,17 @@ 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;
|
||||||
|
TString80 ragsoc;
|
||||||
|
TString256 riga;
|
||||||
|
long codditta = get_firm();
|
||||||
|
|
||||||
|
TLocalisamfile nditte(LF_NDITTE);
|
||||||
|
nditte.zero();
|
||||||
|
nditte.put(NDT_CODDITTA, codditta);
|
||||||
|
if (nditte.read() == NOERR)
|
||||||
|
ragsoc = nditte.get(NDT_RAGSOC);
|
||||||
|
else
|
||||||
|
ragsoc = "";
|
||||||
|
|
||||||
reset_header ();
|
reset_header ();
|
||||||
|
|
||||||
@ -130,15 +143,29 @@ void BA3200_application::set_headers()
|
|||||||
line = rpt.line();
|
line = rpt.line();
|
||||||
LungRiga = line.get_int();
|
LungRiga = line.get_int();
|
||||||
|
|
||||||
|
riga.spaces(LungRiga);
|
||||||
|
// Senno' nella stampa a 80 non ci sta ditta e data
|
||||||
|
if (LungRiga < 100) ragsoc.cut(40);
|
||||||
|
|
||||||
// Leggo il nome della tabella
|
// Leggo il nome della tabella
|
||||||
line = rpt.line();
|
line = rpt.line();
|
||||||
NomeTabella = line.get();
|
NomeTabella = line.get();
|
||||||
|
|
||||||
// Centro il nome della tabella e aggiungo il numero di pagina
|
// Sulla prima riga di intestazione metto la ditta, la data e la pagina
|
||||||
NomeTabella.center_just (LungRiga);
|
riga.overwrite(format("Ditta %4ld %s", codditta,(const char *)ragsoc));
|
||||||
NomeTabella.overwrite ("Pag. @#", NomeTabella.len()-8);
|
riga.overwrite ("Data @< Pag. @#", riga.len()-22);
|
||||||
set_header (last_riga, "%s", (const char *)NomeTabella);
|
|
||||||
last_riga++;
|
set_header (last_riga++, "%s", (const char *)riga);
|
||||||
|
|
||||||
|
// Centro il nome della tabella
|
||||||
|
// Per la stampa registri non va centrato.
|
||||||
|
// Lo lascio anche per le altre stampe
|
||||||
|
// if (_stampa_registri)
|
||||||
|
NomeTabella.left_just (LungRiga);
|
||||||
|
/* else
|
||||||
|
NomeTabella.center_just (LungRiga); */
|
||||||
|
|
||||||
|
set_header (last_riga++, "%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);
|
||||||
@ -302,10 +329,8 @@ void BA3200_application::user_create()
|
|||||||
{
|
{
|
||||||
_rptname << "batb" << _tabname << ".rpt" ;
|
_rptname << "batb" << _tabname << ".rpt" ;
|
||||||
|
|
||||||
if (_tabname.upper() == "REG")
|
// Flag per la stampa tabella registri
|
||||||
_stampa_registri = TRUE;
|
_stampa_registri = (_tabname.upper() == "REG");
|
||||||
else
|
|
||||||
_stampa_registri = FALSE;
|
|
||||||
|
|
||||||
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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user