Aggiunto l'utilizzo della tabella %VER al posto dei parametri
fissi memorizzati dentro al programma. git-svn-id: svn://10.65.10.50/trunk@2771 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
e5f198e5a0
commit
23faa6f8a6
@ -10,10 +10,12 @@
|
||||
#include <progind.h>
|
||||
#include <utility.h>
|
||||
#include <config.h>
|
||||
#ifndef __CGLIB03_H
|
||||
#include "cglib03.h"
|
||||
#endif
|
||||
#include "cg4800a.h"
|
||||
#include "cg4800b.h"
|
||||
|
||||
#define ACCONTO_SENZA_CREDITO real(200000)
|
||||
#define ROUND_MILLELIRE (-3)
|
||||
|
||||
class VersAcc_app : public TApplication
|
||||
@ -23,16 +25,16 @@ class VersAcc_app : public TApplication
|
||||
TArray _nomiditte, _desc;
|
||||
TBit_array _selected;
|
||||
|
||||
TInteressi_IVA_table* _ver;
|
||||
TTable* _lim;
|
||||
TTable* _lia;
|
||||
TTable* _del;
|
||||
TTable* _ban;
|
||||
TTable* _ucc;
|
||||
|
||||
TProgind* _prind;
|
||||
|
||||
int _year;
|
||||
real _acconto, _credito, _diff, _impver;
|
||||
real _acconto, _credito, _diff, _impver, _acconto_senza_credito;
|
||||
bool _calcall, _da_stampare, _print;
|
||||
TDate _dataver;
|
||||
TString16 _abi, _cab, _con;
|
||||
@ -101,6 +103,7 @@ bool VersAcc_app::create()
|
||||
_ditte = new TArray_sheet(-1, -1, 0, 0, "Selezione Ditte",
|
||||
"@1|Cod.@5R|Ragione Sociale@50|Vers.");
|
||||
|
||||
_ver = new TInteressi_IVA_table();
|
||||
_del = new TTable("%DEL");
|
||||
_lia = new TTable("%LIA");
|
||||
_ban = new TTable("%BAN");
|
||||
@ -126,6 +129,7 @@ bool VersAcc_app::create()
|
||||
|
||||
bool VersAcc_app::destroy()
|
||||
{
|
||||
delete _ver;
|
||||
delete _lim;
|
||||
delete _lia;
|
||||
delete _del;
|
||||
@ -273,7 +277,10 @@ void VersAcc_app::vers_acc()
|
||||
" preparazione archivi \n"
|
||||
" \n",
|
||||
TRUE,TRUE,30);
|
||||
|
||||
|
||||
if (_ver->read(_year,12)!=NOERR)
|
||||
warning_box("Errore %d in lettura tabella versamenti ed interessi.",_ver->status());
|
||||
_acconto_senza_credito = _ver->get(I_ACCONTOIVA);
|
||||
for (int l = 0; l < _ditte->items(); l++)
|
||||
{
|
||||
if (_prind->iscancelled())
|
||||
@ -391,14 +398,14 @@ void VersAcc_app::lettura_delega()
|
||||
|
||||
if (_del->read() == NOERR)
|
||||
{
|
||||
if (_diff < ACCONTO_SENZA_CREDITO) //l'importo non e' dovuto
|
||||
if (_diff < _acconto_senza_credito) //l'importo non e' dovuto
|
||||
{
|
||||
//cancello la delega
|
||||
_del->remove();
|
||||
return;
|
||||
}
|
||||
|
||||
// se sono qui e' perche' l'importo e' dovuto (_diff >= ACCONTO_SENZA_CREDITO)
|
||||
// se sono qui e' perche' l'importo e' dovuto (_diff >= _acconto_senza_credito)
|
||||
bool stampata = _del->get_bool("B0");
|
||||
|
||||
_impver = _del->get_real("R0");
|
||||
@ -421,7 +428,7 @@ void VersAcc_app::lettura_delega()
|
||||
}
|
||||
else //non esiste la delega
|
||||
{
|
||||
if (_diff >= ACCONTO_SENZA_CREDITO)
|
||||
if (_diff >= _acconto_senza_credito)
|
||||
//creo record delega
|
||||
{
|
||||
crea_delega();
|
||||
|
@ -10,9 +10,11 @@
|
||||
#include <progind.h>
|
||||
#include <utility.h>
|
||||
#include <config.h>
|
||||
#ifndef __CGLIB03_H
|
||||
#include "cglib03.h"
|
||||
#endif
|
||||
#include "cg4900.h"
|
||||
|
||||
#define ACCONTO_MIN_DA_VERSARE real(200000.0)
|
||||
|
||||
class LiqAcc_app : public TApplication
|
||||
{
|
||||
@ -376,6 +378,10 @@ bool LiqAcc_app::video_vis()
|
||||
bool liqdiff = cnf.get_bool("GeLiDi");
|
||||
_tipo_acc = lia.get("S8");
|
||||
TString16 freqviva = lia.get("S7");
|
||||
TInteressi_IVA_table ver;
|
||||
if (ver.read(_year,12)!=NOERR)
|
||||
warning_box("Errore %d in lettura tabella versamenti ed interessi.",ver.status());
|
||||
real acconto_min_da_versare = ver.get(I_ACCONTOIVA);
|
||||
real acconto = ZERO;
|
||||
real iva_ven = ZERO;
|
||||
real iva_acq = ZERO;
|
||||
@ -399,7 +405,7 @@ bool LiqAcc_app::video_vis()
|
||||
non_fat = lia.get_real("R13");
|
||||
non_ann = lia.get_real("R14");
|
||||
|
||||
TToken_string ff(lia.get("S1"));
|
||||
TToken_string ff(lia.get("S1"),'!');
|
||||
real cre_pre (ff.get(0));
|
||||
real acq_intr (ff.get(1));
|
||||
|
||||
@ -479,14 +485,14 @@ if (acconto.sign() < 0)
|
||||
m.hide(F_ACCVER);
|
||||
m.hide(F_ACCNVER);
|
||||
}
|
||||
else if (acconto.sign() > 0 && acconto > ACCONTO_MIN_DA_VERSARE)
|
||||
else if (acconto.sign() > 0 && acconto > acconto_min_da_versare)
|
||||
{
|
||||
m.hide(F_CREEVI);
|
||||
m.hide(F_ACCNVER);
|
||||
m.show(F_ACCVER);
|
||||
m.field(F_ACCVER).set(acconto.string());
|
||||
}
|
||||
else if (acconto.sign() > 0 && acconto <= ACCONTO_MIN_DA_VERSARE)
|
||||
else if (acconto.sign() > 0 && acconto <= acconto_min_da_versare)
|
||||
{
|
||||
m.hide(F_CREEVI);
|
||||
m.show(F_ACCNVER);
|
||||
|
Loading…
x
Reference in New Issue
Block a user