modifica programma emissione effetti con emissione riba elettroniche

git-svn-id: svn://10.65.10.50/trunk@4125 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
paola 1997-02-10 11:22:42 +00:00
parent f5f15a494b
commit 92217b167a
14 changed files with 1007 additions and 133 deletions

View File

@ -5,6 +5,7 @@ JOIN 13 TO 20 INTO COM==COMCF
JOIN %BAN ALIAS 201 INTO CODTAB[1,5]==CODABI
JOIN %BAN ALIAS 203 INTO CODTAB==CODABI+CODCAB
JOIN %BAN ALIAS 202 INTO CODTAB==CODABIP+CODCABP
JOIN %BAN ALIAS 204 INTO CODTAB[1,5]==CODABIP
END
DESCRIPTION
@ -15,7 +16,8 @@ BEGIN
13->* "Comuni"
201@->* "Tabella banche"
202@->* "Tabella banche"
203@->* "Tabella banche"
203@->* "Tabella banche"
204@->* "Tabella banche"
END
GENERAL
@ -31,7 +33,7 @@ STRING 1 50
BEGIN
KEY "denominazione banca presentazione"
PROMPT 5 1 ""
FIELD 202@->S0
MESSAGE _BANCAP
END
STRING 2 20

View File

@ -2,7 +2,7 @@
#include <checks.h>
#include "ef0.h"
#define usage "Error - usage : %s -{0|1|2}"
#define usage "Error - usage : %s -{0|1|2|3|4|5}"
int main(int argc, char** argv)
{

View File

@ -155,10 +155,10 @@ END
SPREADSHEET F_SHEET_RIGHE 76 7
BEGIN
PROMPT 2 10 "RIGHE EFFETTO"
ITEM "Importo fatt.@18"
ITEM "Importo effet.@18"
ITEM "Imp.fatt.val.@18"
ITEM "Imp.effet.val.@18"
ITEM "Importo fatt.@20"
ITEM "Importo effet.@14"
ITEM "Imp.fatt.val.@20"
ITEM "Imp.effet.val.@14"
ITEM "Anno partita"
ITEM "Nr. partita"
ITEM "Nr. riga"

View File

@ -2,26 +2,30 @@
PAGE "Righe Effetto" -1 -1 76 13
NUMBER F_IMPFATT 18 2
NUMBER F_IMPFATT 20 2
BEGIN
PROMPT 2 1 "Importo fattura "
PROMPT 2 1 "Importo fattura "
PICTURE "###.###.###.###,@@"
END
NUMBER F_IMPEFF 18 2
NUMBER F_IMPEFF 14 2
BEGIN
PROMPT 2 2 "Importo effett. "
PROMPT 2 2 "Importo effett. "
PICTURE "###.###.###,@@"
NUM_EXPR #F_IMPFATT>=#F_IMPEFF
WARNING "L'importo dell'effetto non puo' superare l'importo della fattura"
END
NUMBER F_IMPFATTVAL 18 3
NUMBER F_IMPFATTVAL 20 3
BEGIN
PROMPT 2 3 "Imp. fatt. val "
PICTURE "###.###.###.###,@@@"
END
NUMBER F_IMPEFFVAL 18 3
NUMBER F_IMPEFFVAL 15 3
BEGIN
PROMPT 2 4 "Imp. effet. val "
PICTURE "###.###.###,@@@"
NUM_EXPR #F_IMPFATTVAL>=#F_IMPEFFVAL
WARNING "L'importo dell'effetto in valuta non puo' superare l'importo della fattura in valuta"
END

View File

@ -3,9 +3,9 @@
#include "cession.h"
#include "ef0101.h"
//////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
// definizione dei metodi della classe TEffetto //
//////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
// costruttore di default
TEffetto::TEffetto()
@ -21,14 +21,14 @@ TEffetto::TEffetto(TRectype& rec)
read(f,rec);
}
//setta i campi per la prima chiave (nprogtr) del file
// setta i campi per la prima chiave (nprogtr) del file degli effetti
void TEffetto::put_key(TRectype& rec, long numeff) const
{
CHECKD(numeff >= 0, "Numero effetto non valido ", numeff);
rec.put(EFF_NPROGTR, numeff);
}
//setta i campi per la quarta chiave (tipodist+ndist+nrigadist) del file
// setta i campi per la quarta chiave (tipodist+ndist+nrigadist) del file degli effetti
void TEffetto::put_key(TRectype& rec,char tipodist, long ndist, long nrigadist)
{
CHECK(tipodist == 'I' || tipodist == 'S' || tipodist == 'B' || tipodist == 0, "Tipo distinta");
@ -84,14 +84,13 @@ int TEffetto::next(TBaseisamfile& f)
return err;
}
// permette di leggere il record passato nel file passato, comune alla lettura
// per chiave 1 e per chiave 4
// permette di leggere il record passato nel file passato, comune alla lettura per chiave 1 e per chiave 4
int TEffetto::leggi(TLocalisamfile &f, const TRectype& r)
{
int err = TRectype::read(f);
const long nu = numero();
TRectype *k_reff = new TRectype(LF_REFFETTI),// necessari per poter andare a leggere i due record array
*k_cess = new TRectype(LF_CESS); // cessionari e righe effetto
*k_cess = new TRectype(LF_CESS); // cessionari e righe effetto
put_key(*k_reff, nu); // setto la chiave per poter leggere dai due
put_key(*k_cess, nu); // record array
if (err == NOERR)

View File

@ -6,14 +6,12 @@
#include <recarray.h>
#endif
/////////////////////////////////////////////////////////////
// definizione dell'oggetto Effetto con la classe TEffetto //
/////////////////////////////////////////////////////////////
// definizione dell'oggetto Effetto con la classe TEffetto
class TEffetto:public TRectype
{
TRecord_array _righe,// righe dell'effetto
_cess;// cessionari dell'effetto
TRecord_array _righe,// righe dell'effetto
_cess;// cessionari dell'effetto
protected:
// ritorna la prossima chiave
long get_next_key(const long codcf) const;
@ -72,13 +70,13 @@ public:
long nrgdist() const { return get_long("NRIGADIST"); }
// restituisce l'importo dell'effetto
long importo() const { return get_long("IMPORTO"); }
//setta i campi per la quarta chiave del file
// setta i campi per la quarta chiave del file
void put_key(TRectype& rec,char tipodist, long ndist, long nrigadist = 0);
//setta i campi per la prima chiave del file
// setta i campi per la prima chiave del file
void put_key(TRectype& rec,long numeff) const;
//restituisce true se l'effetto si riferisce ad una sola fattura
// restituisce true se l'effetto si riferisce ad una sola fattura
bool fatt(long num);
//restituisce i dati relativi alle fatture a cui si riferisce l'effetto
// restituisce i dati relativi alle fatture a cui si riferisce l'effetto
TToken_string* dati_fatt(long num);
// costruttore di default
TEffetto();
@ -86,4 +84,4 @@ public:
TEffetto(TRectype& rec);
// distruttore di default
virtual ~TEffetto() {}
};
};

View File

@ -110,13 +110,14 @@ const char* TVariazione_distinte::get_next_key()
return format("%d|%ld", F_NUMBER, ndist);
}
while (err == NOERR) //se esitono già delle distinte:
{ // le leggo tutte e ne prendo il
effetti.setkey(4); // numero, al verificarsi della fine file
err = effetti.next(); // ho l'ultimo numero utilizzato
long n = effetti.get_long(EFF_NDIST);// incrementandolo avrò il numero che cercavo.
if (n > ndist)
ndist = n;
}
{ // le leggo tutte e ne prendo il
long n = effetti.get_long(EFF_NDIST);// numero, al verificarsi della fine file
// ho l'ultimo numero utilizzato
if (n > ndist) // incrementandolo avrò il numero che cercavo.
ndist = n;
effetti.setkey(4);
err = effetti.next();
}
return format("%d|%ld",F_NUMBER,++ndist); // ritorna una stringa costruita utilizzando il numero della distinta
}
@ -420,7 +421,7 @@ bool TVariazione_distinte::user_destroy()
//Permette di caricare lo sheet per la selezione delle riba da aggiungere alla distinta:
// vengono presi tutti gli effetti sul file LF_EFFETTI che non hanno ancora un riferimento ad
// una distinta; inoltre è possibile inserire nella distinta effettiaventi lo stesso tipo di pagamento.
// una distinta; inoltre è possibile inserire nella distinta effetti aventi lo stesso tipo di pagamento.
void TVariazione_distinte::carica_riba(int tipopag)
{
// deve caricare solo quegli effetti che non hanno riferimento alla distinta
@ -857,7 +858,7 @@ void TVariazione_distinte::calcola()
}
}
//Handler per il calcolo dei totali relativi alla selezione effetti per la distinta
//Notify per il calcolo dei totali relativi alla selezione effetti per la distinta
// nella maschera di scelta delle riba (ef0300c)
bool TVariazione_distinte::imp_notify(TSheet_field& s, int r, KEY key)
{
@ -881,7 +882,7 @@ void TVariazione_distinte::aggiungi()
m2->run();
}
//Handler per il calcolo dei totali relativi alla distinta
//Notify per il calcolo dei totali relativi alla distinta
// nella maschera della relap (ef0300a)
bool TVariazione_distinte::impdist_notify(TSheet_field& s, int r, KEY key)
{

View File

@ -28,9 +28,9 @@ public:
// rimuove la distinta del tipo e numero passati
int remove(char tipodist, long ndist);
// restituisce il tipo di distinta
const char tipodist() const { return ((TRectype&)_righe_dist[0]).get_char(EFF_TIPODIST); }
const char tipodist() const { return ((TRectype&)_righe_dist[0]).get_char("TIPODIST"); }
// restituisce il numero di distinta
const long ndist() const { return ((TRectype&)_righe_dist[0]).get_long(EFF_NDIST); }
const long ndist() const { return ((TRectype&)_righe_dist[0]).get_long("NDIST"); }
// costruttore di default
TDistinta() {};
// costruttore distinta del tipo e numero passato

View File

@ -51,8 +51,8 @@ BEGIN
DISPLAY "Data scadenza" DATASCAD
OUTPUT F_A_RIBA NPROGTR
CHECKTYPE NORMAL
/*NUM_EXPR {#THIS_FIELD>=#F_DA_RIBA}
WARNING "Limite superiore non valido"*/
NUM_EXPR {#THIS_FIELD>=#F_DA_RIBA}
WARNING "Limite superiore non valido"
END
GROUPBOX DLG_NULL 55 3
@ -72,7 +72,7 @@ BEGIN
DISPLAY "Nr. progressivo" NPROGTR
OUTPUT F_DA_DATA DATASCAD
OUTPUT F_DA_RIBA NPROGTR
CHECKTYPE NORMAL
//CHECKTYPE NORMAL
END
DATA F_A_DATA
@ -86,9 +86,9 @@ BEGIN
DISPLAY "Nr. progressivo" NPROGTR
OUTPUT F_A_DATA DATASCAD
OUTPUT F_A_RIBA NPROGTR
CHECKTYPE NORMAL
/*VALIDATE DATE_CMP_FUNC >= F_DA_DATA
WARNING "Data limite superiore non valida" */
//CHECKTYPE NORMAL
VALIDATE DATE_CMP_FUNC >= F_DA_DATA
WARNING "Data limite superiore non valida"
END
BUTTON DLG_OK 9 2

View File

@ -1,31 +1,38 @@
#include <applicat.h>
#include <applicat.h>
#include <urldefid.h>
#include <form.h>
#include <mask.h>
#include <relation.h>
#include <utility.h>
#include <urldefid.h>
#include <printer.h>
#include <progind.h>
#include <lffiles.h>
#include <effetti.h>
#include <reffetti.h>
#include <dos.h>
#include <errno.h>
#include "ef0.h"
#include "ef0301.h"
#include "ef0500.h"
#include "filetext.h"
class TRiba_form;
class TDistinta_form;
class TRiba_file;
///////////////////////////////////////////////////////////////////////////////////////////////
// Classe per l'emissione di effetti e distinte su carta o su floppy //
///////////////////////////////////////////////////////////////////////////////////////////////
enum fo{kb360 = 1, kb720 = 2, kb1200 = 3, kb1440 = 4};
class TEmissione: public TApplication
{
fo _foutput;
TMask* _msk;
TRelation* _firmrel; // relazione di gestione dei dati della ditta corrente
TLocalisamfile *_eff, *_reff, *_cession;
TRiba_form *_formrb;
TDistinta_form *_formdse;
TRelation* _rel;
TCursor* _cur;
TRiba_form* _formrb;
TDistinta_form* _formdse;
TRiba_file* _trasfile;
int _base_page_no; // numero della pagina base per la stampa del numero di pagina
protected:
virtual bool create(void);
@ -36,7 +43,14 @@ protected:
virtual void print_rb(char tipost, int ndist, char tipodist, int ncopie, const bool is_vis);
virtual void print_dse(char tipost, int ndist, char tipodist, int ncopie, const bool is_vis);
virtual void print(void);
void floppy(void);
void floppy(void);
void save_data_emis(void);
void header_rb(void);
void footer_ef(void);
void inizializza_cur(void);
void inizializza_file(void);
void record(THash_object& lavoro);
bool ok_write(void);
void aggiorna_rb(TCursor*);
void aggiorna_dist(TCursor*);
static bool annulla_handler(TMask_field& f, KEY k);
@ -77,6 +91,25 @@ public:
TDistinta_form(const char*, TRelation *);
virtual ~TDistinta_form();
};
////////////////////////////////////////////////////////////////////////////
// Classe TRiba_file customizzata dalla TFile_text //
///////////////////////////////////////////////////////////////////////////
class TRiba_file: public TFile_text
{
long _nditta;
real _tot_importi;
protected:
virtual void validate(TCursor& cur,TRecord_text &rec, TToken_string &val, TString& str);
public:
TRiba_file(const TString& file_name, const TString& config_name):TFile_text(file_name, config_name){}
virtual ~TRiba_file(){}
void set_ditta(long nditta){_nditta = nditta;}
const long ditta(void) const {return _nditta;}
void set_tot_importi(real importo){_tot_importi = importo;}
void add_tot_importi(real importo){_tot_importi += importo;}
const real tot_importi(void) const {return _tot_importi;}
};
// creazione dell'applicazione
bool TEmissione::create()
@ -88,9 +121,16 @@ bool TEmissione::create()
_firmrel= new TRelation(LF_NDITTE);
_firmrel->add(LF_ANAG, "TIPOA=TIPOA|CODANAGR=CODANAGR");
_firmrel->add(LF_UNLOC,"CODDITTA=CODDITTA"); // si posiziona sulla prima unita' locale della ditta
_eff = new TLocalisamfile(LF_EFFETTI);
_reff = new TLocalisamfile(LF_REFFETTI);
_cession = new TLocalisamfile(LF_CESS);
_rel = new TRelation(LF_EFFETTI);
_rel->add(LF_REFFETTI, "NPROGTR=NPROGTR");
_rel->add(LF_CESS, "NPROGTR=NPROGTR");
_rel->add(LF_CLIFO, "TIPOCF=\"C\"|CODCF=CODCF");
_rel->add("%BAN", "CODTAB[1,5]=CODABI", 1, 0, 401);
_rel->add("%BAN", "CODTAB=CODABI+CODCAB", 1, 0, 402);
_rel->add(LF_COMUNI, "STATO=STATOCF|COM=COMCF",1,LF_CLIFO);
_cur = NULL;
_trasfile = new TRiba_file("riba_el", "riba.ini");
_trasfile->set_ditta(get_firm());
_msk->set_handler(DLG_CANCEL, annulla_handler);
dispatch_e_menu(BAR_ITEM(1));
return TRUE;
@ -102,10 +142,14 @@ bool TEmissione::destroy()
if (_formrb) delete _formrb;
if (_formdse) delete _formdse;
delete _msk;
delete _firmrel;
delete _eff;
delete _reff;
delete _cession;
delete _firmrel;
delete _rel;
delete _cur;
if ( _trasfile)
{
_trasfile->close();
delete _trasfile;
}
return TApplication::destroy();
}
@ -141,10 +185,144 @@ void TEmissione::conferma()
}
// gestione emissione su floppy
void TEmissione::floppy()
void TEmissione::floppy()
{
}
inizializza_cur();
inizializza_file();
long n_eff = _cur->items();
bool condition = !ok_write();
if (condition)
error_box("Impossibile continuare discetto pieno");
else
{
TProgind* pi;
pi = new TProgind(n_eff,"Emissione Ri.Ba. su floppy...",FALSE,TRUE,10);
TAssoc_array& tracciati = _trasfile->tracciati();
header_rb();
for (*_cur = 0; _cur->pos() < n_eff; ++(*_cur))
{
pi->addstatus(1L);
save_data_emis();
THash_object* lavoro = tracciati.get_hashobj();
for (int i = 0; lavoro != NULL; i++)
{
record(*lavoro);
lavoro = tracciati.get_hashobj();
}
}
footer_ef();
delete pi;
}
}
void TEmissione::save_data_emis()
{
const TDate data_emis = _msk->get_date(F_DATAEMIS);
TLocalisamfile& effetti = _cur->file();
TEffetto effetto = effetti.curr();
long numero = effetto.numero();
effetto.put("NUMEMISS", numero);
effetto.put("DATAEMISS", data_emis);
effetti.rewrite();
_cur->relation()->rewrite();
}
void TEmissione::header_rb()
{
TRecord_text rec;
*_cur = 0;
rec.set_type("RB");
_trasfile->autoload(rec, *_cur);
_trasfile->write(rec);
}
void TEmissione::footer_ef()
{
TRecord_text rec;
*_cur = 0;
rec.set_type("EF");
_trasfile->autoload(rec, *_cur);
_trasfile->write(rec);
_trasfile->write_file()->seekp(0, ios::end);
}
void TEmissione::inizializza_cur()
{
const int ndist = _msk->get_int(F_NUMBER);
const char tipodist = _msk->get(F_TIPODIST)[0];
TRectype from(_rel->lfile().curr()),
to(_rel->lfile().curr());
from.zero();
from.put("TIPODIST", tipodist);
from.put("NDIST", ndist);
to = from;
_cur = new TCursor(_rel,"",4,&from,&to);
_cur->freeze();
}
void TEmissione::inizializza_file()
{
TString unita = _msk->get(F_UNITA);
unita << ":\\ribael.dat";
TFilename file(unita);
_trasfile->open(file,'w');
_trasfile->set_tot_importi(0.0);
_foutput = (fo)_msk->get_int(F_FOR_OUT);
}
void TEmissione::record(THash_object& lavoro)
{
TString chiave = lavoro.key();
if (chiave !="EF" && chiave !="RB")
{
TTracciato_record& oggetto = (TTracciato_record&)lavoro.obj();
const TString& tipo = oggetto.type();
TRecord_text rec(tipo);
_trasfile->autoload(rec, *_cur, &tipo);
_trasfile->write(rec);
}
}
bool TEmissione::ok_write()
{
long elem = _cur->items();
int dim = _trasfile->recordsize();
long nbyte = (elem*7+2)*dim;
struct _diskfree_t diskspace;
char unita = _msk->get(F_UNITA)[0];
unsigned drive;
switch(unita)
{
case 'a' :
drive = 1;
break;
case 'b' :
drive = 2;
break;
}
_dos_getdiskfree(drive, &diskspace);
unsigned long available_clusters = (unsigned long) diskspace.avail_clusters;
unsigned long sectors_per_cluster = (unsigned long) diskspace.sectors_per_cluster;
unsigned long bytes_per_sector = (unsigned long) diskspace.bytes_per_sector;
unsigned long free_space = available_clusters * sectors_per_cluster * bytes_per_sector;
switch (_foutput)
{
case kb360 :
return free_space + nbyte < 360000L;
break;
case kb720 :
return free_space + nbyte < 720000L;
break;
case kb1200 :
return free_space + nbyte < 1200000L;
break;
case kb1440 :
return free_space + nbyte < 1440000L;
break;
}
return TRUE;
}
// aggiorna, su file, numero e data di emissione ed il flag di stampa
// su tutti gli effetti nel cursore
void TEmissione::aggiorna_rb(TCursor* cur)
@ -211,7 +389,7 @@ void TEmissione::print_rb(char tipost, int ndist, char tipodist, int ncopie, con
}
}
if (tipost == 'D') // se emetto riba in definitiva ...
aggiorna_rb(fcur); // ... devo aggiornare data, numero emissine e flag di stampa effetto
aggiorna_rb(fcur); // ... devo aggiornare data, numero emissione e flag di stampa effetto
}
// gestione emissione su carta delle distinte
@ -242,7 +420,7 @@ void TEmissione::print_dse(char tipost, int ndist, char tipodist, int ncopie, co
pi->addstatus(1L); // aggiorna la barra d'attesa
_formdse->print(); // stampa il form
_base_page_no = printer().getcurrentpage() -1; // stampa numero di pagina (solo nella distinta)
}
}
if (tipost == 'D') // se emetto distinta in definitiva ...
aggiorna_dist(fcur); // ... devo aggiornare flag di stampa distinta
}
@ -257,12 +435,12 @@ void TEmissione::print()
int emis = _msk->get_int(F_EMIS);
int ndist = _msk->get_int(F_NUMBER);
char tipodist = _msk->get(F_TIPODIST)[0];
_eff->put("TIPODIST",tipodist);
_eff->put("NDIST",ndist);
_eff->put("NRIGADIST",1);
_eff->setkey(4);
_eff->read();
long codabi = _eff->get_long("CODABIP");
_rel->lfile().put("TIPODIST",tipodist);
_rel->lfile().put("NDIST",ndist);
_rel->lfile().put("NRIGADIST",1);
_rel->lfile().setkey(4);
_rel->read();
long codabi = _rel->lfile().get_long("CODABIP");
char tipost = _msk->get(F_TIPOST)[0];
char tipord = _msk->get(F_TIPORD)[0];
// se emetto riba istanzio il form per le riba
@ -311,7 +489,21 @@ TRiba_form::TRiba_form(const char* name): TForm()
bool TRiba_form::validate(TForm_item &cf, TToken_string &s)
{
const TString code(s.get(0)); // prende il primo parametro, il codice del messaggio
TString valore;
TString valore;
if (code == "_BANCAP")
{
TCursor* cur = cursor();
TRectype & ban = cur->curr(-204);
valore.cut(0);
valore << ban.get("S0");
valore.trim();
ban = cur->curr(-202);
valore << " " << ban.get("S0");
valore.trim();
cf.set(valore);
cf.put_paragraph(valore);
cf.set("");
}
if (code == "_FATT")
{
// gestione dei campi relativi alle/a fatture/a a cui si riferisce un effetto
@ -324,7 +516,7 @@ bool TRiba_form::validate(TForm_item &cf, TToken_string &s)
TLocalisamfile &eff = fcur->file(LF_EFFETTI);
TEffetto effetto = eff.curr();
long num = effetto.numero();
bool condition = (effetto.fatt(num));
bool condition = (effetto.fatt(num));//TRUE se effetto non raggruppato
TToken_string* dati = effetto.dati_fatt(num);
TString in(s.get());
if (in[0]=='!')
@ -355,8 +547,11 @@ bool TRiba_form::validate(TForm_item &cf, TToken_string &s)
// "!IMPFATT" se 1 sola fattura ne stampa l' importo
if (in == "IMPFATT")
{
if (condition)
cf.set(dati->get(2));
if (condition)
{
real importo(dati->get(2));
cf.set(importo.string("###.###.###.###,@@"));
}
}
}
valore = cf.get();
@ -397,6 +592,20 @@ bool TDistinta_form::validate(TForm_item &cf, TToken_string &s)
{
const TString code(s.get(0)); // prende il primo parametro, il codice del messaggio
TString valore;
if (code == "_BANCAP")
{
TCursor* cur = cursor();
TRectype & ban = cur->curr(-204);
valore.cut(0);
valore << ban.get("S0");
valore.trim();
ban = cur->curr(-202);
valore << " " << ban.get("S0");
valore.trim();
cf.set(valore);
cf.put_paragraph(valore);
cf.set("");
}
if (code == "_DITTA")
{
// gestione di campi della ditta corrente
@ -408,7 +617,17 @@ bool TDistinta_form::validate(TForm_item &cf, TToken_string &s)
{
in.ltrim(1);
// "!RAGSOC" prende la ragione sociale della ditta corrente
if (in=="RAGSOC") cf.set(_firmrel->lfile().get("RAGSOC"));
if (in=="RAGSOC")
{
const TString ragsoc = _firmrel->lfile().get("RAGSOC");
valore.cut(0);
valore = ragsoc.left(30);
valore.trim();
TString str = ragsoc.right(20);
str.trim();
valore << " " << str;
cf.set(valore);
}
}
valore = cf.get();
cf.put_paragraph(valore);
@ -469,15 +688,15 @@ bool TDistinta_form::validate(TForm_item &cf, TToken_string &s)
//"!TOTALE" calcola il totale presentato prendendo i totale degli effetti nel cursore di stampa
if (in == "TOTALE")
{
long totale = 0;
real totale = 0.0;
TLocalisamfile &eff = fcur->file(LF_EFFETTI);
for (*fcur = 0; fcur->pos() < i; ++(*fcur))
{
TEffetto effetto = eff.curr();
long imp = effetto.importo();
real imp = (real)effetto.importo();
totale +=imp;
}
cf.set(format("%ld",totale));
cf.set(totale.string("###.###.###.###,@@"));
}
}
valore = cf.get();
@ -495,6 +714,186 @@ bool TDistinta_form::validate(TForm_item &cf, TToken_string &s)
return TForm::validate(cf, s);
}
// gestione dei messaggi estesi nei campi
void TRiba_file:: validate(TCursor& cur,TRecord_text &rec, TToken_string &s, TString& str)
{
const TString code(s.get(0));
TString valore;
if (code == "_FISSO")
{
TString in(s.get());
if (in[0]=='!')
{
in.ltrim(1);
in.trim();
valore = in;
}
}
if (code == "_NRIBA")
{
int items = (int)cur.items();
TString in(s.get());
if (in[0]=='!')
{
in.ltrim(1);
if (in=="NUM")
{
valore.cut(0);
valore << cur.pos() + 1;
}
if (in=="TOT")
{
valore.cut(0);
valore << items;
}
if (in=="NREC")
{
valore.cut(0);
int rec = items * 7 + 2;
valore << rec;
}
}
}
if (code == "_DITTA")
{
TLocalisamfile ditte(LF_NDITTE);
ditte.put("CODDITTA",ditta());
ditte.read();
TString in(s.get());
if (in[0]=='!')
{
in.ltrim(1);
if (in=="RAGSOC")
{
const TString ragsoc = ditte.get("RAGSOC");
in = s.get();
if (in == "0")
{
valore.cut(0);
valore = ragsoc.left(30);
valore.trim();
TString str = ragsoc.right(20);
str.trim();
valore << " " << str;
}
else
{
TParagraph_string string(ragsoc,24);
string.restart();
int indice = atoi(in);
if (in == "1") valore = string.get(indice-1);
if (in == "2") valore = string.get(indice-1);
if (in == "3") valore = string.get(indice-1);
if (in == "4") valore = string.get(indice-1);
}
}
}
}
if (code == "_DEBITORE")
{
TRectype& clifo = cur.curr(LF_CLIFO);
TRectype& comuni = cur.curr(LF_COMUNI);
TString in(s.get());
if (in[0]=='!')
{
in.ltrim(1);
if (in=="RAGSOC")
{
TString ragsoc = clifo.get("RAGSOC");
in = s.get();
TParagraph_string string(ragsoc,30);
string.restart();
int indice = atoi(in);
if (in == "1") valore = string.get(indice-1);
if (in == "2") valore = string.get(indice-1);
}
if (in=="INDIRIZZO")
{
valore.cut(0);
valore << clifo.get("INDCF");
valore.trim();
valore << " " << clifo.get_int("CIVCF");
valore.trim();
valore << " " << clifo.get("LOCALITACF");
valore.trim();
}
if (in=="PIAZZA")
{
valore.cut(0);
valore << comuni.get("DENCOM");
valore.trim();
valore << " " << comuni.get("PROVCOM");
valore.trim();
}
}
}
if (code == "_BANCA")
{
TRectype & ban = cur.curr(-401);
valore.cut(0);
valore << ban.get("S0");
valore.trim();
ban = cur.curr(-402);
valore << " " << ban.get("S0");
valore.trim();
}
if (code == "_FATT")
{
TLocalisamfile &eff = cur.file();
TEffetto effetto = eff.curr();
long num = effetto.numero();
TToken_string* dati = effetto.dati_fatt(num);
int elem = dati->items();
TString descfatt;
for (int i = 0; i < elem; i+=3)
{
descfatt << dati->get(i);
descfatt << " ";
descfatt << dati->get(i+1);
descfatt << " ";
}
int l = descfatt.len();
TString in(s.get());
if (in[0]=='!')
{
in.ltrim(1);
if (in == "1")
{
valore = descfatt.left(40);
valore.trim();
}
if (in == "2")
{
valore = descfatt.mid(40, l);
}
}
}
if (code == "_IMPORTO")
{
TString in(s.get());
if (in[0]=='!')
{
in.ltrim(1);
if (in=="ADD")
{
real importo(str);
add_tot_importi(importo);
valore.cut(0);
valore << importo.string(13,1);
}
if (in=="TOT")
{
valore.cut(0);
real importo = tot_importi();
valore << importo.string("############@,@");
set_tot_importi(0.0);
}
}
}
str = valore;
}
int ef0500(int argc, char* argv[])
{
TEmissione a ;

View File

@ -1,15 +1,26 @@
#include "ef0500.h"
PAGE "Emissione Effetti" -1 -1 78 20
PAGE "Emissione Effetti" -1 -1 77 19
GROUPBOX DLG_NULL 77 3
RADIOBUTTON F_TIPOEMIS 76
BEGIN
PROMPT 1 0 " "
ITEM "1| Emissione RI.BA. su floppy"
MESSAGE DISABLE,2@|DISABLE,4@|DISABLE,5@
MESSAGE ENABLE,1@
ITEM "2| Emissione RI.BA. su moduli cartacei"
MESSAGE DISABLE,1@
MESSAGE ENABLE,2@
END
GROUPBOX DLG_NULL 76 3
BEGIN
PROMPT 1 0 ""
END
PROMPT 1 4 ""
END
LIST F_TIPODIST 18
BEGIN
PROMPT 2 1 "Tipo Distinta "
PROMPT 2 5 "Tipo Distinta "
KEY 4
ITEM "I| All'incasso"
ITEM "B| Salvo buon fine"
@ -18,7 +29,7 @@ END
NUMBER F_NUMBER 7
BEGIN
PROMPT 45 1 "Numero Distinta "
PROMPT 43 5 "Numero Distinta "
FLAGS "R"
KEY 4
USE LF_EFFETTI KEY 4 SELECT NRIGADIST = 1
@ -42,19 +53,7 @@ BEGIN
FLAGS "D"
END
RADIOBUTTON F_TIPOEMIS 32
BEGIN
PROMPT 25 3 "Tipo Emissione "
ITEM "1| Emissione RI.BA. su floppy"
MESSAGE DISABLE,2@|DISABLE,4@|DISABLE,5@
MESSAGE ENABLE,1@
ITEM "2| Emissione RI.BA. su carta"
MESSAGE DISABLE,1@
MESSAGE ENABLE,2@
END
GROUPBOX DLG_NULL 77 3
GROUPBOX DLG_NULL 76 3
BEGIN
PROMPT 1 7 ""
GROUP 1
@ -63,14 +62,14 @@ END
LIST F_UNITA 9
BEGIN
PROMPT 2 8 "Unità di output "
ITEM "A| Drive A"
ITEM "B| Drive B"
ITEM "a| Drive A"
ITEM "b| Drive B"
GROUP 1
END
LIST F_FOR_OUT 7
BEGIN
PROMPT 45 8 "Formato unità output "
PROMPT 43 8 "Formato unità output "
ITEM "1|360 Kb"
ITEM "2|720 Kb"
ITEM "3|1,2 Mb"
@ -78,7 +77,7 @@ BEGIN
GROUP 1
END
GROUPBOX DLG_NULL 77 5
GROUPBOX DLG_NULL 76 5
BEGIN
PROMPT 1 10 ""
GROUP 2
@ -112,7 +111,7 @@ END
LIST F_TIPOST 14
BEGIN
PROMPT 45 12 "Tipo di Stampa "
PROMPT 43 12 "Tipo di Stampa "
ITEM "P| Provvisoria"
ITEM "D| Definitiva"
GROUP 2
@ -120,7 +119,7 @@ END
BOOLEAN F_RIST
BEGIN
PROMPT 45 13 "Ristampo RI.BA."
PROMPT 43 13 "Ristampo RI.BA."
GROUP 5
END

View File

@ -121,7 +121,7 @@ void TPrint_effetti_app::st_tot_mese()
_pr.reset();
}
// stampa l'intestazione per mese data scadenza
// stampa l'intestazione per mese data scadenza (dopo la "rottura" per mese)
void TPrint_effetti_app::st_header_scad(const TDate* scad)
{
TString year = scad->string();
@ -132,7 +132,7 @@ void TPrint_effetti_app::st_header_scad(const TDate* scad)
_pr.reset();
}
// stampa intestazione per banca di presentazione
// stampa intestazione per banca di presentazione (dopo la "rottura" per banca)
void TPrint_effetti_app::st_header_ban(const TString* ban)
{
TString s = (look_tab("%BAN",*ban));
@ -143,7 +143,7 @@ void TPrint_effetti_app::st_header_ban(const TString* ban)
_pr.reset();
}
// stampa intestazione per distinta di presentazione
// stampa intestazione per distinta di presentazione (dopo la "rottura" per distinta)
void TPrint_effetti_app::st_header_dist(const char tipodist)
{
TString s = "Distinte";
@ -167,7 +167,7 @@ void TPrint_effetti_app::st_header_dist(const char tipodist)
_pr.reset();
}
// stampa intestazione per cliente
// stampa intestazione per cliente (dopo la "rottura" per cliente)
void TPrint_effetti_app::st_header_cliente(const TString* cli)
{
_pr.put(*cli,1);
@ -250,7 +250,7 @@ void TPrint_effetti_app::header_cliente()
set_header(j, (const char *)(TString(132).fill('-')));
}
// svolge operazioni di chiusura di totali pendenti dalla stampa che è ormai terminata
// svolge operazioni di chiusura dei totali pendenti dalla stampa che è ormai terminata
print_action TPrint_effetti_app::postprocess_print(int file, int counter)
{
TString s;
@ -362,7 +362,7 @@ print_action TPrint_effetti_app::postprocess_print(int file, int counter)
return NEXT_PAGE;
}
// setta secondo il tipo di stampa la pagina logica
// setta, secondo il tipo di stampa scelto, la pagina logica
void TPrint_effetti_app::set_page(int file, int counter)
{
switch(_pr_type)
@ -473,19 +473,17 @@ bool TPrint_effetti_app::preprocess_page(int file, int counter)
// scarico i dati, dal record corrente del cursore, che mi necessitano per effettuare la "rorrura della stampa"
TRectype & rec = current_cursor()->curr();
TDate scad = rec.get_date (EFF_DATASCAD);
TString ban = rec.get (EFF_CODABIP);
if (ban=="00000")
ban = "";
long dist = rec.get_long (EFF_NDIST);
char tipodist = rec.get_char(EFF_TIPODIST);
long cliente = rec.get_long (EFF_CODCF);
real importo = rec.get_real(EFF_IMPORTO);
// elaboro le seguenti stringhe per essere stampate
// elaboro le seguenti stringhe per la stampa
if (ban=="00000")
ban = "";
_ban = get_field(LF_EFFETTI, EFF_CODABIP);
if (_ban=="00000")
_ban = "";
@ -502,8 +500,8 @@ bool TPrint_effetti_app::preprocess_page(int file, int counter)
s = get_field(LF_EFFETTI, EFF_CODVAL);
(s.empty())?_val = s:_val = "Lit.";
// se è la prima volta che stampo devo inizializzare i dati di controllo "rottura stampa" e stampare gli header relativi
// alle diverse stampe
// se è la prima volta che stampo devo inizializzare i dati di controllo "rottura stampa" e stampare l' header relativo
// alla stampa selezionata
if (_prima_volta)
{
_prima_volta = FALSE;
@ -540,9 +538,12 @@ bool TPrint_effetti_app::preprocess_page(int file, int counter)
}
else
{
// stampo la lista delle fatture dell'effetto
// se effetto raggruppato stampo la lista delle fatture a cui si riferisce (dalla seconda
// poichè la prima viene sempre stampata nella pagina logica)
TEffetto effetto = *_rec_prec;
long num = effetto.numero();
long num = effetto.numero();
// prendo dall'effetto tutti i dati relativi alle fatture, che vengono inseriti nella Token_String nell'ordine
// NUMERO FATTURA|DATA FATTURA|IMPORTO FATTURA
TToken_string* dati = effetto.dati_fatt(num);
int elem = dati->items();
if (elem > 3)
@ -550,9 +551,9 @@ bool TPrint_effetti_app::preprocess_page(int file, int counter)
TString descfatt;
for (int i = 3; i < elem; i+=3)
{
descfatt = dati->get(i+1);
descfatt = dati->get(i+1);// prendo la data della fattura
descfatt << " ";
descfatt << dati->get(i);
descfatt << dati->get(i);// prendo il numero della fattura
_pr.reset();
if (_pr_type == st_scadenza || _pr_type == st_cliente )
_pr.put(descfatt, 111);
@ -731,18 +732,21 @@ bool TPrint_effetti_app::preprocess_page(int file, int counter)
return TRUE;
}
// permette di eseguire qualcosa prima della richiesta del un processo di stampa
bool TPrint_effetti_app::preprocess_print(int file, int counter)
{
// forza la rilettura di set_page
reset_print();
return TRUE;
}
// richiamo la maschera di scelta tipo di stampa ed inizializzo cursori di stampa
bool TPrint_effetti_app::set_print(int)
{
disable_links();
set_multiple_link(FALSE);
// richiamo la maschera di scelta del tipo di stampa
TMask mask("ef0600a.msk");
mask.run();
@ -757,12 +761,14 @@ bool TPrint_effetti_app::set_print(int)
TDate data_stampa (mask.get(F_DATA_STAMPA));// la data di stampa
_data_stampa = data_stampa.string();
// inizializzo i record di scelta del cursore
TRectype from(current_cursor()->curr());
from.zero();
TRectype to(from);
TString cod_from, cod_to, filter;
// a seconda del tipo di stampa scelta , seleziono il curore da utilizzare ed imposto i campi per la regione e il filtro del cursore
switch(_pr_type)
{
case st_scadenza:
@ -823,8 +829,8 @@ bool TPrint_effetti_app::set_print(int)
break;
}
current_cursor()->setfilter(filter,TRUE);
current_cursor()->setregion(from, to);
current_cursor()->setfilter(filter,TRUE); // setta il filtro del cursore
current_cursor()->setregion(from, to); // setta la regione del cursore
set_real_picture("###.###.##@,@@");// setta il formato di stampa di tutti i reali
_prima_volta=TRUE;
return TRUE;
@ -835,7 +841,8 @@ bool TPrint_effetti_app::user_create()
{
_rel = new TRelation(LF_EFFETTI);
_rel->add(LF_REFFETTI, "NPROGTR==NPROGTR");
_rel->add(LF_CESS, "NPROGTR==NPROGTR");// solo per poter usare l'oggetto effetto (mi serve il file aperto)
_rel->add(LF_CESS, "NPROGTR==NPROGTR");// aggiunto solo per poter usare l'oggetto TEffetto
// (serve il file aperto anche se non viene usato direttamente)
_rel->add(LF_CLIFO, "TIPOCF=='C'|CODCF==CODCF");
_cur_1 = add_cursor(new TCursor(_rel,"",3));//STAMPA PER SCADENZA
@ -858,7 +865,9 @@ bool TPrint_effetti_app::user_create()
bool TPrint_effetti_app::user_destroy()
{
if (_rel)
delete _rel;
delete _rel;
if (_rec_prec)
delete _rec_prec;
return TRUE;
}

View File

@ -495,7 +495,7 @@ int TFile_text::open(TFilename name, char mode)
{
_read_file = new ifstream(name, ios::binary);
if (!ok_r())
fatal_box("Impossibile aprire il file %s in lettura", (const char *)name);
error_box("Impossibile aprire il file %s in lettura", (const char *)name);
}
if (mode == 'w')//apertura in scrittura

463
ef/riba.ini Executable file
View File

@ -0,0 +1,463 @@
[MAIN]
TYPEFIELD = 1
DECSEP = ,
RECORDSEP =
RECORDSIZE = 120
FIELDSEP =
[TYPE FISSO]
FILLER = ' '
DECIMAL = 0
LENGTH = 0
[TYPE IMPORTO]
PICTURE = ##########@,@
FILLER = 0
DECIMAL = 1
ALIGN = R
LENGTH = 13
[TYPE DATA]
PICTURE = ggmmaa
DECIMAL = 0
LENGTH = 6
[TYPE NUMERO]
FILLER = '0'
DECIMAL = 0
ALIGN = R
LENGTH = 0
[TYPE STRINGA]
FILLER = ' '
DECIMAL = 0
ALIGN = L
LENGTH = 0
[HEADER RB]
NAME(0)=CAMPO BLANK
TYPE(0)=FISSO
POSITION(0)=0
LENGTH(0)=1
NAME(1)=TIPO RECORD
POSITION(1)=1
LENGTH(1)=2
MESSAGE(1)=_FISSO,!RB
NAME(2)=CODICE MITTENTE
POSITION(2)=3
LENGTH(2)=5
MESSAGE(2)=_FISSO,!00000
NAME(3)=CODICE DESTINATARIO
FIELD(3)=31->CODABIP
POSITION(3)=8
LENGTH(3)=5
NAME(4)=DATA EMISSIONE
TYPE(4)=DATA
FIELD(4)=31->DATAEMISS
POSITION(4)=13
LENGTH(4)=6
NAME(5)=RAGIONE SOCIALE MITTENTE
TYPE(5)=STRINGA
POSITION(5)=19
LENGTH(5)=26
MESSAGE(5) = _DITTA,!RAGSOC,1
NAME(6)=CAMPO ALTERABILE
TYPE(6)=FISSO
POSITION(6)=45
LENGTH(6)=75
[RECORD 14]
NAME(0) = CAMPO BLANK
TYPE(0) = FISSO
POSITION(0) = 0
LENGTH(0) = 1
NAME(1) = TIPO RECORD
POSITION(1) = 1
LENGTH(1) = 2
MESSAGE(1) = _FISSO,!14
NAME(2) = NUMERO PROGRESSIVO RIBA
TYPE(2) = NUMERO
POSITION(2) = 3
LENGTH(2) = 7
MESSAGE(2) = _NRIBA,!NUM
NAME(3) = CAMPO ALTERABILE
TYPE(3) = FISSO
POSITION(3) = 10
LENGTH(3) = 6
NAME(4) = CAMPO BLANK
TYPE(4) = FISSO
POSITION(4) = 16
LENGTH(4) = 6
NAME(5) = DATA DI SCADENZA
TYPE(5) = DATA
FIELD(5) = 31->DATASCAD
POSITION(5) = 22
LENGTH(5) = 6
NAME(6) = CAUSALE
POSITION(6) = 28
LENGTH(6) = 5
MESSAGE(6) = _FISSO,!300000
NAME(7) = IMPORTO
TYPE(7) = IMPORTO
FIELD(7) = 31->IMPORTO
POSITION(7) = 33
LENGTH(7) = 13
MESSAGE(7)=_IMPORTO,!ADD
NAME(8) = SEGNO
POSITION(8) = 46
LENGTH(8) = 1
MESSAGE(8) = _FISSO,!-
NAME(9) = CODABI BANCA PRESENTAZIONE
FIELD(9) = 31->CODABIP
POSITION(9) = 47
LENGTH(9) = 5
NAME(10) = CODCAB BANCA PRESENTAZIONE
FIELD(10) = 31->CODCABP
POSITION(10) = 52
LENGTH(10) = 5
NAME(11) = CAMPO BLANK
TYPE(11) = FISSO
POSITION(11) = 58
LENGTH(11) = 12
NAME(12) = CODICE ABI BANCA DOMICILIATARIA (FACOLTATIVO)
TYPE(12) = FISSO
POSITION(12) = 70
LENGTH(12) = 5
NAME(13) = CODICE CAB BANCA DOMICILIATARIA (FACOLTATIVO)
TYPE(13) = FISSO
POSITION(13) = 75
LENGTH(13) = 5
NAME(14) = RIFERIMENTO DEBITORE (FACOLTATIVO)
TYPE(14) = FISSO
POSITION(14) = 80
LENGTH(14) = 12
NAME(15) = CODICE AZIENDA (FACOLTATIVO)
TYPE(15) = FISSO
POSITION(15) = 91
LENGTH(15) = 5
NAME(16) = CODICE FISSO (FACOLTATIVO)
TYPE(16) = FISSO
POSITION(16) = 91
LENGTH(16) = 1
NAME(17) = CODICE CLIENTE DEBITORE (FACOLTATIVO)
TYPE(17) = FISSO
POSITION(17) = 97
LENGTH(17) = 16
NAME(18) = CAMPO BLANK
TYPE(18) = FISSO
POSITION(18) = 113
LENGTH(18) = 7
[RECORD 20]
NAME(0)=CAMPO BLANK
TYPE(0)=FISSO
POSITION(0)=0
LENGTH(0)=1
NAME(1)=TIPO RECORD
POSITION(1)=1
LENGTH(1)=2
MESSAGE(1)=_FISSO,!20
NAME(2)=NUMERO PROGRESSIVO RIBA
TYPE(2)=NUMERO
POSITION(2)=3
LENGTH(2)=7
MESSAGE(2) = _NRIBA,!NUM
NAME(3)=DESCRIZIONE MITTENTE (CREDITORE) SEGMENTO 1
TYPE(3)=STRINGA
POSITION(3)=10
LENGTH(3)=24
MESSAGE(3)=_DITTA,!RAGSOC,1
NAME(4)=DESCRIZIONE MITTENTE SEGMENTO 2
TYPE(4)=STRINGA
POSITION(4)=34
LENGTH(4)=24
MESSAGE(4)=_DITTA,!RAGSOC,2
NAME(5)=DESCRIZIONE MITTENTE SEGMENTO 3
TYPE(5)=STRINGA
POSITION(5)=59
LENGTH(5)=24
MESSAGE(5)=_DITTA,!RAGSOC,3
NAME(6)=DESCRIZIONE MITTENTE SEGMENTO 4
TYPE(6)=STRINGA
POSITION(6)=83
LENGTH(6)=24
MESSAGE(6)=_DITTA,!RAGSOC,4
NAME(7)=CAMPO BLANK
TYPE(7)=FISSO
POSITION(7)=106
LENGTH(7)=14
[RECORD 30]
NAME(0)=CAMPO BLANK
TYPE(0)=FISSO
POSITION(0)=0
LENGTH(0)=1
NAME(1)=TIPO RECORD
POSITION(1)=1
LENGTH(1)=2
MESSAGE(1)=_FISSO,!30
NAME(2)=NUMERO PROGRESSIVO RIBA
TYPE(2)=NUMERO
POSITION(2)=3
LENGTH(2)=7
MESSAGE(2) = _NRIBA,!NUM
NAME(3)=DESCRIZIONE DEBITORE SEGMENTO 1
TYPE(3)=STRINGA
POSITION(3)=10
LENGTH(3)=30
MESSAGE(3) = _DEBITORE,!RAGSOC,1
NAME(4)=DESCRIZIONE DEBITORE SEGMENTO 2
TYPE(4)=STRINGA
POSITION(4)=40
LENGTH(4)=30
MESSAGE(4) = _DEBITORE,!RAGSOC,2
NAME(5)=CAMPO BLANK
TYPE(5)=FISSO
POSITION(5)=70
LENGTH(5)=50
[RECORD 40]
NAME(0)=CAMPO BLANK
TYPE(0)=FISSO
POSITION(0)=0
LENGTH(0)=1
NAME(1)=TIPO RECORD
POSITION(1)=1
LENGTH(1)=2
MESSAGE(1)=_FISSO,!40
NAME(2)=NUMERO PROGRESSIVO RIBA
TYPE(2)=NUMERO
POSITION(2)=3
LENGTH(2)=7
MESSAGE(2) = _NRIBA,!NUM
NAME(3)=INDIRIZZO DEBITORE: VIA,NUMERO CIVICO, NOME FRAZIONE
TYPE(3)=STRINGA
POSITION(3)=10
LENGTH(3)=30
MESSAGE(3) = _DEBITORE,!INDIRIZZO
NAME(4)=INDIRIZZO DEBITORE: CAP
TYPE(4)=NUMERO
FIELD(4)=20->CAPCF
POSITION(4)=40
LENGTH(4)=5
NAME(5)=INDIRIZZO DEBITORE: COMUNE E SIGLA PROVINCIA
TYPE(5)=STRINGA
POSITION(5)=45
LENGTH(5)=25
MESSAGE(5) = _DEBITORE,!PIAZZA
NAME(6)=BANCA DOMICILIATARIA IN CHIARO (DENOMINAZIONE BANCA E SPORTELLO)
TYPE(6)=STRINGA
POSITION(6)=70
LENGTH(6)=50
MESSAGE(6) = _BANCA
[RECORD 50]
NAME(0)=CAMPO BLANK
TYPE(0)=FISSO
POSITION(0)=0
LENGTH(0)=1
NAME(1)=TIPO RECORD
POSITION(1)=1
LENGTH(1)=2
MESSAGE(1)=_FISSO,!50
NAME(2)=NUMERO PROGRESSIVO RIBA
TYPE(2)=NUMERO
POSITION(2)=3
LENGTH(2)=7
MESSAGE(2) = _NRIBA,!NUM
NAME(3)=RIFERIMENTI AL DEBITO SEGMENTO 1
TYPE(3)=STRINGA
POSITION(3)=10
LENGTH(3)=40
MESSAGE(3) = _FATT,!1
NAME(4)=RIFERIMENTI AL DEBITO SEGMENTO 2
TYPE(4)=STRINGA
POSITION(4)=50
LENGTH(4)=40
MESSAGE(4) = _FATT,!2
NAME(5)=CAMPO BLANK
TYPE(5)=FISSO
POSITION(5)=90
LENGTH(5)=30
[RECORD 51]
NAME(0)=CAMPO BLANK
TYPE(0)=FISSO
POSITION(0)=0
LENGTH(0)=1
NAME(1)=TIPO RECORD
POSITION(1)=1
LENGTH(1)=2
MESSAGE(1)=_FISSO,!51
NAME(2)=NUMERO PROGRESSIVO RIBA
TYPE(2)=NUMERO
POSITION(2)=3
LENGTH(2)=7
MESSAGE(2) = _NRIBA,!NUM
NAME(3)=NUMERO RICEVUTA
TYPE(3)=NUMERO
FIELD(3)=31->NPROGTR
POSITION(3)=10
LENGTH(3)=10
NAME(4)=FIRMA EMITTENTE
TYPE(4)=STRINGA
POSITION(4)=20
LENGTH(4)=20
MESSAGE(4) = _DITTA,!RAGSOC,1
NAME(5)=PROVINCIA INTENDENZA DI FINANZA
TYPE(5)=FISSO
POSITION(5)=40
LENGTH(5)=15
NAME(6)=N. AUTORIZZAZIONE
POSITION(6)=55
LENGTH(6)=10
MESSAGE(6)=_FISSO,!0000000000
NAME(7)=DATA AUTORIZZAZIONE
TYPE(7)=FISSO
POSITION(7)=66
LENGTH(7)=6
MESSAGE(7)=_FISSO,!000000
NAME(8)=CAMPO BLANK
TYPE(8)=FISSO
POSITION(8)=72
LENGTH(8)=48
[RECORD 70]
NAME(0)=CAMPO BLANK
TYPE(0)=FISSO
POSITION(0)=0
LENGTH(0)=1
NAME(1)=TIPO RECORD
POSITION(1)=1
LENGTH(1)=2
MESSAGE(1)=_FISSO,!70
NAME(2)=NUMERO PROGRESSIVO RIBA
TYPE(2)=NUMERO
POSITION(2)=3
LENGTH(2)=7
MESSAGE(2) = _NRIBA,!NUM
NAME(3)=CAMPO ALTERABILE
TYPE(3)=FISSO
POSITION(3)=10
LENGTH(3)=110
[FOOTER EF]
NAME(0)=CAMPO BLANK
TYPE(0)=FISSO
POSITION(0)=0
LENGTH(0)=1
NAME(1)=TIPO RECORD
POSITION(1)=1
LENGTH(1)=2
MESSAGE(1)=_FISSO,!EF
NAME(2)=CODICE MITTENTE
POSITION(2)=3
LENGTH(2)=5
MESSAGE(2)=_FISSO,!00000
NAME(3)=CODICE DESTINATARIO
FIELD(3)=31->CODABIP
POSITION(3)=8
LENGTH(3)=5
NAME(4)=DATA EMISSIONE
TYPE(4)=DATA
FIELD(4)=31->DATAEMISS
POSITION(4)=13
LENGTH(4)=6
NAME(5)=RAGIONE SOCIALE MITTENTE
TYPE(5)=STRINGA
POSITION(5)=19
LENGTH(5)=26
MESSAGE(5) = _DITTA,!RAGSOC,1
NAME(6)=NUMERO RICEVUTE NEL FLUSSO
TYPE(6)=NUMERO
POSITION(6)=45
LENGTH(6)=7
MESSAGE(6) = _NRIBA,!TOT
NAME(7)=IMPORTO TOTALE DEL FLUSSO
TYPE(7)=IMPORTO
POSITION(7)=52
LENGTH(7)=15
PICTURE(7)= ############@,@
MESSAGE(7)=_IMPORTO,!TOT
NAME(8)=ZERO FILLED
TYPE(8)=NUMERO
POSITION(8)=67
LENGTH(8)=15
NAME(9)=NUMERO RECORD
TYPE(9)= NUMERO
POSITION(9)=82
LENGTH(9)=7
MESSAGE(9) = _NRIBA,!REC
NAME(10)=CAMPO ALTERABILE
TYPE(10)=FISSO
POSITION(10)=89
LENGTH(10)=31