Magnifica gestione pagamenti
git-svn-id: svn://10.65.10.50/trunk@1925 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
faaecf5c85
commit
34ad90a94e
@ -275,7 +275,8 @@ bool TPrimanota_application::sub_cgs_imp(int n, const TImporto& imp)
|
|||||||
TImporto tot;
|
TImporto tot;
|
||||||
tot = cgs().row(n);
|
tot = cgs().row(n);
|
||||||
tot -= imp;
|
tot -= imp;
|
||||||
set_cgs_imp(n, tot.normalize());
|
tot.normalize();
|
||||||
|
set_cgs_imp(n, tot);
|
||||||
return tot.is_zero();
|
return tot.is_zero();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -742,8 +743,9 @@ bool TPrimanota_application::cg_notify(TSheet_field& cg, int r, KEY k)
|
|||||||
if (s < 0)
|
if (s < 0)
|
||||||
{
|
{
|
||||||
TConto cassa; app().causale().bill(2, cassa);
|
TConto cassa; app().causale().bill(2, cassa);
|
||||||
|
const TString desc(app().causale().desc_agg(2));
|
||||||
growth.swap_section(); growth.normalize();
|
growth.swap_section(); growth.normalize();
|
||||||
app().set_cgs_row(s, growth, cassa, app().causale().desc_agg(2), 'L');
|
app().set_cgs_row(s, growth, cassa, desc, 'L');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
app().sub_cgs_imp(s, growth);
|
app().sub_cgs_imp(s, growth);
|
||||||
@ -759,7 +761,7 @@ bool TPrimanota_application::cg_notify(TSheet_field& cg, int r, KEY k)
|
|||||||
case K_CTRL+K_INS: // Post inserimento
|
case K_CTRL+K_INS: // Post inserimento
|
||||||
if (app().is_pagamento())
|
if (app().is_pagamento())
|
||||||
{
|
{
|
||||||
const char tipo = app().curr_mask().get(S_TIPORIGA)[0];
|
const char tipo = cg.mask().get(S_TIPORIGA)[0];
|
||||||
if (tipo == 'K' || tipo == 'G')
|
if (tipo == 'K' || tipo == 'G')
|
||||||
{
|
{
|
||||||
const int k = tipo == 'K' ? 1 : 10;
|
const int k = tipo == 'K' ? 1 : 10;
|
||||||
|
@ -638,7 +638,8 @@ bool TPrimanota_application::notify_edit_pagamento(TPartita& p, TRectype& new_pa
|
|||||||
if (riga < 0)
|
if (riga < 0)
|
||||||
{
|
{
|
||||||
TBill conto_rit; causale().bill(11, conto_rit);
|
TBill conto_rit; causale().bill(11, conto_rit);
|
||||||
set_cgs_row(riga, grow_ritenute, conto_rit, causale().desc_agg(11), 'F');
|
const TString desc(causale().desc_agg(11));
|
||||||
|
set_cgs_row(riga, grow_ritenute, conto_rit, desc, 'F');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -680,7 +681,8 @@ bool TPrimanota_application::notify_edit_pagamento(TPartita& p, TRectype& new_pa
|
|||||||
{
|
{
|
||||||
const int rc = new_ap == 'A' ? 9 : 8;
|
const int rc = new_ap == 'A' ? 9 : 8;
|
||||||
TBill conto_abb; causale().bill(rc, conto_abb);
|
TBill conto_abb; causale().bill(rc, conto_abb);
|
||||||
app().set_cgs_row(riga_abb, new_abbuono, conto_abb, causale().desc_agg(rc), new_ap);
|
const TString desc(causale().desc_agg(rc));
|
||||||
|
app().set_cgs_row(riga_abb, new_abbuono, conto_abb, desc, new_ap);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
add_cgs_imp(riga_abb, new_abbuono);
|
add_cgs_imp(riga_abb, new_abbuono);
|
||||||
@ -704,7 +706,8 @@ bool TPrimanota_application::notify_edit_pagamento(TPartita& p, TRectype& new_pa
|
|||||||
if (riga_diffcam < 0)
|
if (riga_diffcam < 0)
|
||||||
{
|
{
|
||||||
TBill conto_diffcam; causale().bill(12, conto_diffcam);
|
TBill conto_diffcam; causale().bill(12, conto_diffcam);
|
||||||
set_cgs_row(riga_diffcam, grow_diffcam, conto_diffcam, causale().desc_agg(12), 'C');
|
const TString desc(causale().desc_agg(12));
|
||||||
|
set_cgs_row(riga_diffcam, grow_diffcam, conto_diffcam, desc, 'C');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user