Corretto MI3449, relativo al controllo lunghezza importi

14 cifre in lista controllo movimenti da inviare a sistema.


git-svn-id: svn://10.65.10.50/trunk@5608 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
angelo 1997-11-13 11:49:11 +00:00
parent decfdd759a
commit 529948878a

View File

@ -1,6 +1,8 @@
#include "cglib04.h"
#include "cg6901.h"
#define MAX_SYSTEM real("100000000000") // Gli importi debbono essere minore di questo
HIDDEN inline TLista_archivi& app() { return (TLista_archivi&)main_app();}
bool TLista_archivi::create()
@ -490,6 +492,7 @@ void TLista_archivi::controlla_PNIVA(char file)
TString_array stampa(50);
int num;
long nreg_p = 0;
real importo;
_mov->setkey(1);
_mov->zero();
@ -535,7 +538,21 @@ void TLista_archivi::controlla_PNIVA(char file)
errore = TRUE;
stampa.add(" - Rilevato un codice di pagamento composto da 3 o piu' cifre");
}
importo = _mov->get_real(MOV_TOTDOC);
if (importo >= MAX_SYSTEM)
{
errore = TRUE;
stampa.add(" - Rilevato un totale documento eccedente le 11 cifre");
}
importo = _mov->get_real(MOV_CORRLIRE);
if (importo >= MAX_SYSTEM)
{
errore = TRUE;
stampa.add(" - Rilevato un corrispettivo in lire eccedente le 11 cifre");
}
num = 0;
bool prima = TRUE;
@ -671,6 +688,28 @@ void TLista_archivi::controlla_PNIVA(char file)
}
stampa.add(app);
}
importo = _rmov->get_real(RMV_IMPORTO);
if (importo >= MAX_SYSTEM)
{
errore = TRUE;
TString app;
if (prima)
{
stampa.add(" ");
stampa.add("Righe primanota");
stampa.add(" ");
prima = FALSE;
}
if (tit_riga)
app << "@r Rilevato un importo eccedente le 11 cifre";
else
{
app.format("%5s%03d", (const char*)"@b - ", nr);
app << " " << "@rRilevato un importo eccedente le 11 cifre";
}
stampa.add(app);
}
}
if (soliva)
@ -870,6 +909,50 @@ void TLista_archivi::controlla_PNIVA(char file)
stampa.add(app);
tit_riga = TRUE;
}
importo = _rmoviva->get_real(RMI_IMPONIBILE);
if (importo >= MAX_SYSTEM)
{
errore = TRUE;
TString app;
if (prima)
{
stampa.add(" ");
stampa.add("Righe iva");
stampa.add(" ");
prima = FALSE;
}
if (tit_riga)
app << "@r Rilevato imponibile eccedente le 11 cifre";
else
{
app.format("%5s%03d", (const char*)"@b - ", nr);
app << " " << "@rRilevato imponibile eccedente le 11 cifre";
}
stampa.add(app);
}
importo = _rmoviva->get_real(RMI_IMPOSTA);
if (importo >= MAX_SYSTEM)
{
errore = TRUE;
TString app;
if (prima)
{
stampa.add(" ");
stampa.add("Righe iva");
stampa.add(" ");
prima = FALSE;
}
if (tit_riga)
app << "@r Rilevata imposta eccedente le 11 cifre";
else
{
app.format("%5s%03d", (const char*)"@b - ", nr);
app << " " << "@rRilevato imposta eccedente le 11 cifre";
}
stampa.add(app);
}
}
}
@ -945,6 +1028,7 @@ void TLista_archivi::controlla_fatture(char file)
bool intesta = TRUE;
bool tit_riga = FALSE;
TString_array stampa(50);
real importo;
char tipo_p = ' ';
long sottoc_p = 0;
@ -1040,7 +1124,21 @@ void TLista_archivi::controlla_fatture(char file)
errore = TRUE;
stampa.add(" - Rilevato un conto cliente composto da 3 cifre");
}
importo = _part->get_real(PART_IMPTOTDOC);
if (importo >= MAX_SYSTEM)
{
errore = TRUE;
stampa.add(" - Rilevato totale documento eccedente le 11 cifre");
}
importo = _part->get_real(PART_IMPORTO);
if (importo >= MAX_SYSTEM)
{
errore = TRUE;
stampa.add(" - Rilevato importo eccedente le 11 cifre");
}
bool prima = TRUE;
_scad->setkey(1);
@ -1203,6 +1301,29 @@ void TLista_archivi::controlla_fatture(char file)
stampa.add(app);
tit_riga = TRUE;
}
importo = _scad->get_real(SCAD_IMPORTO);
if (importo >= MAX_SYSTEM)
{
errore = TRUE;
TString app;
if (prima)
{
stampa.add(" ");
stampa.add("Scadenze:");
stampa.add(" ");
prima = FALSE;
}
if (tit_riga)
app << "@r Rilevato un importo eccedente le 11 cifre";
else
{
app.format("%5s%04d", (const char*)"@b - rata ", nrata);
app << " " << "@rRilevato un importo eccedente le 11 cifre";
}
stampa.add(app);
tit_riga = TRUE;
}
}
_pagsca->zero();
@ -1342,6 +1463,28 @@ void TLista_archivi::controlla_fatture(char file)
stampa.add(app);
tit_riga = TRUE;
}
importo = _pagsca->get_real(PAGSCA_IMPORTO);
if (importo >= MAX_SYSTEM)
{
errore = TRUE;
TString app;
if (prima)
{
stampa.add(" ");
stampa.add("Pagamenti scadenze:");
stampa.add(" ");
prima = FALSE;
}
if (tit_riga)
app << "@r Rilevato un importo eccedente le 11 cifre";
else
{
app.format("%5srata %04d riga %04d", (const char*)"@b - ", nrata, nrigp);
app << " " << "@rRilevato un importo eccedente le 11 cifre";
}
stampa.add(app);
tit_riga = TRUE;
}
}
if (errore)