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
@ -274,8 +274,9 @@ bool TPrimanota_application::sub_cgs_imp(int n, const TImporto& imp)
|
||||
{
|
||||
TImporto tot;
|
||||
tot = cgs().row(n);
|
||||
tot -= imp;
|
||||
set_cgs_imp(n, tot.normalize());
|
||||
tot -= imp;
|
||||
tot.normalize();
|
||||
set_cgs_imp(n, tot);
|
||||
return tot.is_zero();
|
||||
}
|
||||
|
||||
@ -742,8 +743,9 @@ bool TPrimanota_application::cg_notify(TSheet_field& cg, int r, KEY k)
|
||||
if (s < 0)
|
||||
{
|
||||
TConto cassa; app().causale().bill(2, cassa);
|
||||
const TString desc(app().causale().desc_agg(2));
|
||||
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
|
||||
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
|
||||
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')
|
||||
{
|
||||
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)
|
||||
{
|
||||
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
|
||||
{
|
||||
@ -680,7 +681,8 @@ bool TPrimanota_application::notify_edit_pagamento(TPartita& p, TRectype& new_pa
|
||||
{
|
||||
const int rc = new_ap == 'A' ? 9 : 8;
|
||||
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
|
||||
add_cgs_imp(riga_abb, new_abbuono);
|
||||
@ -688,7 +690,7 @@ bool TPrimanota_application::notify_edit_pagamento(TPartita& p, TRectype& new_pa
|
||||
if (deleting != riga_contabile)
|
||||
{
|
||||
// Aggiunge l'abbuono con la sezione invertita
|
||||
sub_cgs_imp(riga_contabile-1, new_abbuono);
|
||||
sub_cgs_imp(riga_contabile-1, new_abbuono);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -704,7 +706,8 @@ bool TPrimanota_application::notify_edit_pagamento(TPartita& p, TRectype& new_pa
|
||||
if (riga_diffcam < 0)
|
||||
{
|
||||
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
|
||||
{
|
||||
|
@ -76,14 +76,14 @@ public:
|
||||
bool ratapagata(int n) const { return _rata_sfield(n,6)[0] > ' ';}
|
||||
real tlit_rata(int n) const { return _rata_rfield(n,7);}
|
||||
|
||||
char inizio_scadenza() const { return _inscad; }
|
||||
bool mese_commerciale() const { return _mcomm; }
|
||||
bool rate_differenziate() const { return _rdiff; }
|
||||
int tipo_prima_rata() const { return _tpr; }
|
||||
int decs() const { return _round; }
|
||||
char inizio_scadenza() const { return _inscad; }
|
||||
bool mese_commerciale() const { return _mcomm; }
|
||||
bool rate_differenziate() const { return _rdiff; }
|
||||
int tipo_prima_rata() const { return _tpr; }
|
||||
int decs() const { return _round; }
|
||||
|
||||
const TString& name() const { return _name; }
|
||||
const TString& code() const { return _code; }
|
||||
const TString& name() const { return _name; }
|
||||
const TString& code() const { return _code; }
|
||||
const char* desc_tpr() const;
|
||||
const char* desc_tipo(int) const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user