Corretta gestione totali documento nella prima pagina delle fatture extra
git-svn-id: svn://10.65.10.50/trunk@2635 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
9364f68d85
commit
3ea8c74b38
@ -355,7 +355,7 @@ BEGIN
|
||||
PROMPT 35 14 "Tot. in valuta "
|
||||
FIELD LF_PARTITE->IMPTOTVAL
|
||||
GROUP 3
|
||||
PICTURE ".3"
|
||||
PICTURE ".3"
|
||||
VALIDATE REQIF_FUNC 1 E_TOTALE
|
||||
END
|
||||
|
||||
|
@ -109,8 +109,9 @@ TFattura_mask::~TFattura_mask()
|
||||
real TFattura_mask::totale_rate(bool val) const
|
||||
{
|
||||
const TPagamento& pag = pagamento();
|
||||
real tot = pag.importo_da_dividere(val);
|
||||
tot += pag.importo_da_non_dividere(val);
|
||||
real tot;
|
||||
for (int r = pag.n_rate()-1; r >= 0; r--)
|
||||
tot += pag.importo_rata(r, val);
|
||||
return tot;
|
||||
}
|
||||
|
||||
@ -766,8 +767,8 @@ void TFattura_mask::write_scadenze() const
|
||||
bool sposta = newgame != NULL;
|
||||
if (sposta)
|
||||
{
|
||||
sposta = yesno_box("Si desidera spostare la fattura ed i "
|
||||
"pagamenti relativi nella nuova partita?");
|
||||
sposta = yesno_box("Si desidera spostare la fattura e gli eventuali\n"
|
||||
"pagamenti relativi nella partita %d %s?", anno, (const char*)numpart);
|
||||
}
|
||||
if (sposta)
|
||||
{
|
||||
@ -903,12 +904,15 @@ bool TSaldaconto_app::totale_handler(TMask_field& f, KEY k)
|
||||
k = K_TAB;
|
||||
}
|
||||
|
||||
if (k == K_TAB && f.focusdirty())
|
||||
{
|
||||
app().gioca_cambi(m);
|
||||
if (k == K_TAB)
|
||||
{
|
||||
if (is_fatt)
|
||||
{
|
||||
update_rate(m);
|
||||
if (f.focusdirty())
|
||||
{
|
||||
app().gioca_cambi(m);
|
||||
update_rate(m);
|
||||
}
|
||||
real tot(f.get());
|
||||
tot -= m.get_real(E_IMPOSTE);
|
||||
m.set(FS_IMPONIBILI, tot);
|
||||
@ -959,12 +963,13 @@ bool TSaldaconto_app::totale_handler(TMask_field& f, KEY k)
|
||||
|
||||
bool TSaldaconto_app::imposte_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (key == K_TAB && f.focusdirty())
|
||||
{
|
||||
if (key == K_TAB)
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
if (is_fattura(m))
|
||||
{
|
||||
update_rate(m);
|
||||
if (f.focusdirty())
|
||||
update_rate(m);
|
||||
m.set(FS_IMPOSTE, f.get());
|
||||
}
|
||||
}
|
||||
@ -989,7 +994,7 @@ bool TSaldaconto_app::totval_handler(TMask_field& f, KEY key)
|
||||
}
|
||||
|
||||
if (key == K_TAB && f.focusdirty())
|
||||
{
|
||||
{
|
||||
app().gioca_cambi(m, m.insert_mode() ? 0x1 : 0x0);
|
||||
if (is_fatt)
|
||||
update_rate(m);
|
||||
|
Loading…
x
Reference in New Issue
Block a user