Aggiustati casini nel ricalcolo rate aggiunti in mia assenza
git-svn-id: svn://10.65.10.50/trunk@1936 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b978d91a20
commit
102ab2d8b4
@ -33,7 +33,7 @@ bool TPrimanota_application::pag_notify(TSheet_field&, int r, KEY k)
|
||||
const int impos = in_valuta ? 2 : 1;
|
||||
|
||||
// ts contiene la vecchia riga, ns la nuova
|
||||
TToken_string ts(36), ns(36);
|
||||
TToken_string ts(128), ns(128);
|
||||
TString16 banca;
|
||||
|
||||
bool doit = TRUE, m_imp = FALSE, m_perc = FALSE, m_pag = FALSE;
|
||||
@ -57,17 +57,17 @@ bool TPrimanota_application::pag_notify(TSheet_field&, int r, KEY k)
|
||||
newt = ns.get(4); // Tipo pagamento
|
||||
|
||||
// qui viene il bello, si fa per dire
|
||||
if (news != ts.get(3)) // modificata data scadenza
|
||||
if (news != ts.get(0)) // modificata data scadenza
|
||||
mod = m_scad = TRUE;
|
||||
if (newp != ts.get(1)) // modificata percentuale
|
||||
if (newp != ts.get(3)) // modificata percentuale
|
||||
mod = m_perc = TRUE;
|
||||
if (newi != ts.get(4)) // modificato importo
|
||||
if (newi != ts.get(impos)) // modificato importo
|
||||
{
|
||||
// se si modifica la percentuale l'importo non viene cagato
|
||||
if ((recalc && !m_perc) || (!recalc))
|
||||
mod = m_imp = TRUE;
|
||||
}
|
||||
if (newt != ts.get(2)) // modificato tipo pagamento
|
||||
if (newt != ts.get(4)) // modificato tipo pagamento
|
||||
mod = m_tipo = TRUE;
|
||||
break;
|
||||
case K_DEL:
|
||||
|
@ -1283,9 +1283,12 @@ void TPagamento::set_sheet(TSheet_field& sf, int sscad)
|
||||
const bool in_valuta = _cambio != 1.0;
|
||||
|
||||
// si istanzia uno sheet di primanota
|
||||
// sf.destroy();
|
||||
|
||||
for (int i = 0; i < n_rate(); i++)
|
||||
{
|
||||
{
|
||||
TToken_string& ts = sf.row(i);
|
||||
|
||||
ts.add((const char*)data_rata(i), 0); // 0 - Data scadenza
|
||||
if (in_valuta)
|
||||
{
|
||||
@ -1305,11 +1308,13 @@ void TPagamento::set_sheet(TSheet_field& sf, int sscad)
|
||||
ts.add(paid ? "X" : "", 10); // 10 - Pagaya
|
||||
sf.enable_cell(i,1,!paid); // importo
|
||||
sf.enable_cell(i,2,!paid); // in valuta
|
||||
sf.enable_cell(i,3,!paid); // percentuale
|
||||
}
|
||||
for (; i < sf.items(); i++)
|
||||
sf.destroy(i);
|
||||
sf.enable_cell(i,3,!paid); // percentuale
|
||||
}
|
||||
|
||||
// destroy remaining
|
||||
while (sf.items() > i)
|
||||
sf.destroy(sf.items()-1);
|
||||
|
||||
sf.enable_column(2, in_valuta);
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user