Ultime cose pagamenti
git-svn-id: svn://10.65.10.50/trunk@2438 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c27648c433
commit
1b0596fb89
@ -246,10 +246,17 @@ bool TPrimanota_application::tipopag_handler(TMask_field& f, KEY key)
|
|||||||
if ((key == K_TAB || key == K_ENTER) && f.dirty())
|
if ((key == K_TAB || key == K_ENTER) && f.dirty())
|
||||||
{
|
{
|
||||||
TMask& m = f.mask();
|
TMask& m = f.mask();
|
||||||
const int t = m.get_int(105);
|
int t = m.get_int(105);
|
||||||
|
if (t <= 0)
|
||||||
|
{
|
||||||
|
t = 1;
|
||||||
|
f.set("1");
|
||||||
|
}
|
||||||
const char u = m.get(106)[0];
|
const char u = m.get(106)[0];
|
||||||
const TPagamento& pag = app().pagamento();
|
const TPagamento& pag = app().pagamento();
|
||||||
const char* s = pag.desc_tipo(t, u);
|
bool ok;
|
||||||
|
const char* s = pag.desc_tipo(t, u, &ok);
|
||||||
|
if (!ok) m.reset(106);
|
||||||
m.set(107, s);
|
m.set(107, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -744,9 +744,10 @@ const char* TPagamento::desc_tpr() const
|
|||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* TPagamento::desc_tipo(int tipo, char ulc) const
|
const char* TPagamento::desc_tipo(int tipo, char ulc, bool* ok) const
|
||||||
{
|
{
|
||||||
const char* o = "";
|
const char* o = "";
|
||||||
|
if (ok != NULL) *ok = TRUE;
|
||||||
if (ulc > ' ')
|
if (ulc > ' ')
|
||||||
{
|
{
|
||||||
const char key[] = { tipo+'0', ulc, '\0' };
|
const char key[] = { tipo+'0', ulc, '\0' };
|
||||||
@ -754,10 +755,12 @@ const char* TPagamento::desc_tipo(int tipo, char ulc) const
|
|||||||
clr.put("CODTAB", key);
|
clr.put("CODTAB", key);
|
||||||
|
|
||||||
const int err = clr.read();
|
const int err = clr.read();
|
||||||
if (err == NOERR)
|
if (err == NOERR)
|
||||||
o = clr.get("S0");
|
o = clr.get("S0");
|
||||||
|
else if (ok != NULL)
|
||||||
|
*ok = FALSE;
|
||||||
}
|
}
|
||||||
else
|
if (*o == '\0')
|
||||||
{
|
{
|
||||||
switch (tipo)
|
switch (tipo)
|
||||||
{
|
{
|
||||||
@ -771,7 +774,7 @@ const char* TPagamento::desc_tipo(int tipo, char ulc) const
|
|||||||
case 7: o = "Tratta accettata"; break;
|
case 7: o = "Tratta accettata"; break;
|
||||||
case 8: o = "Rapporti interban. diretti"; break;
|
case 8: o = "Rapporti interban. diretti"; break;
|
||||||
case 9: o = "Bonifici"; break;
|
case 9: o = "Bonifici"; break;
|
||||||
default: o = ""; break;
|
default: o = ""; if (ok != NULL) *ok = FALSE; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return o;
|
return o;
|
||||||
@ -1322,7 +1325,7 @@ bool TPagamento::read(TTable* t, TTable* r)
|
|||||||
_int_rate = t->get_int("I3");
|
_int_rate = t->get_int("I3");
|
||||||
|
|
||||||
#ifdef USE_DEFAULT_INT_RATE
|
#ifdef USE_DEFAULT_INT_RATE
|
||||||
if (_int_rate == 0) _int_rate = 30;
|
// if (_int_rate == 0) _int_rate = 30;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// aggiusta _inizio secondo INSCAD; vedi mese commerciale etc.
|
// aggiusta _inizio secondo INSCAD; vedi mese commerciale etc.
|
||||||
|
@ -105,7 +105,7 @@ public:
|
|||||||
const TString& name() const { return _name; }
|
const TString& name() const { return _name; }
|
||||||
const TString& code() const { return _code; }
|
const TString& code() const { return _code; }
|
||||||
const char* desc_tpr() const;
|
const char* desc_tpr() const;
|
||||||
const char* desc_tipo(int tipo, char ulc) const;
|
const char* desc_tipo(int tipo, char ulc, bool* ok = NULL) const;
|
||||||
|
|
||||||
// giorni scadenza fissi, aggiunti poi
|
// giorni scadenza fissi, aggiunti poi
|
||||||
void set_fixed_scad(int a, int ind) { _fixd[ind] = a; }
|
void set_fixed_scad(int a, int ind) { _fixd[ind] = a; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user