Anzitutto ho tolto i dannatissimi ^M, poi ho modificato il programma
in modo che utilizzasse la tabella %VER. git-svn-id: svn://10.65.10.50/trunk@2770 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
2ba7d017b9
commit
e5f198e5a0
@ -5,9 +5,11 @@
|
||||
#include <config.h>
|
||||
#include <msksheet.h>
|
||||
#include <tabutil.h>
|
||||
#ifndef __CGLIB03_H
|
||||
#include "cglib03.h"
|
||||
#endif
|
||||
#include "cg4700.h"
|
||||
|
||||
#define ACCONTO_MENO_CREDITO real(200000.0)
|
||||
|
||||
class GesAcc_app : public TRelation_application
|
||||
{
|
||||
@ -81,12 +83,16 @@ bool GesAcc_app::msk_acconto(TMask_field& f, KEY k)
|
||||
{
|
||||
real credito (f.mask().get(F_CREDITO));
|
||||
real acconto (f.get());
|
||||
TInteressi_IVA_table ver;
|
||||
if (ver.read(f.mask().get_int(F_ANNO),12)!=NOERR)
|
||||
warning_box("Errore %d in lettura tabella versamenti ed interessi.",ver.status());
|
||||
real acconto_meno_credito = ver.get(I_ACCONTOIVA);
|
||||
if (!acconto.is_zero())
|
||||
{
|
||||
if (acconto.sign() < 0)
|
||||
return f.error_box("Introdurre un valore non negativo");
|
||||
if (acconto - credito < ACCONTO_MENO_CREDITO)
|
||||
return f.error_box("La differenza tra acconto e credito deve essere superiore a lire %s", ACCONTO_MENO_CREDITO.string("."));
|
||||
if (acconto - credito < acconto_meno_credito)
|
||||
return f.error_box("La differenza tra acconto e credito deve essere superiore a lire %s", acconto_meno_credito.string("."));
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user