Corretta gestione insoluti nel nuovo saldaconto per Nuova Bienne
git-svn-id: svn://10.65.10.50/branches/R_10_00@22704 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8572e8db24
commit
3da47503ab
@ -43,7 +43,7 @@ bool TNew_game_mask::on_field_event(TOperable_field& o, TField_event e, long jol
|
||||
ok = p.last() <= 0;
|
||||
}
|
||||
if (!ok)
|
||||
error_box("La partita %d/%s esiste già", anno, (const char*)part);
|
||||
error_box(FR("La partita %d/%s esiste già"), anno, (const char*)part);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -511,18 +511,21 @@ bool TEasySolder_mask::on_field_event(TOperable_field& o, TField_event e, long j
|
||||
real residuo = m.get(S_RESIDUO);
|
||||
if (residuo.is_zero())
|
||||
{
|
||||
const int anno = m.get_int(S_ANNO);
|
||||
const TString8 num = m.get(S_PARTITA);
|
||||
const int nriga = m.get_int(S_RIGAF);
|
||||
const int nrata = m.get_int(S_RATA);
|
||||
TPartita& game = app().partite().partita(_conto, anno, num);
|
||||
const int anno = m.get_int(S_ANNO);
|
||||
const TString8 num = m.get(S_PARTITA);
|
||||
const int nriga = m.get_int(S_RIGAF);
|
||||
const int nrata = m.get_int(S_RATA);
|
||||
const TPartita& game = app().partite().partita(_conto, anno, num);
|
||||
|
||||
|
||||
if (game.esiste(nriga, nrata))
|
||||
residuo = game.rata(nriga, nrata).residuo(true).valore();
|
||||
}
|
||||
if (!residuo.is_zero())
|
||||
{
|
||||
m.set(S_IMPORTO, residuo);
|
||||
m.set(S_SALDO, true);
|
||||
if (_tipomov != tm_insoluto && _tipomov != tm_nota_credito)
|
||||
m.set(S_SALDO, true);
|
||||
if (in_valuta())
|
||||
{
|
||||
const real residuo_eur = val2eur(residuo);
|
||||
@ -938,7 +941,7 @@ void TEasySolder_mask::fill_sheet()
|
||||
const TString& codval = get(G_VALUTA);
|
||||
const real cambio = get(G_CAMBIO);
|
||||
|
||||
s.enable_column(S_SALDO, _tipomov != tm_insoluto);
|
||||
s.enable_column(S_SALDO, _tipomov != tm_insoluto && _tipomov != tm_nota_credito);
|
||||
|
||||
const bool in_val = in_valuta();
|
||||
s.enable_column(S_IMPORTO_EUR, in_val);
|
||||
|
Loading…
x
Reference in New Issue
Block a user