*** empty log message ***
git-svn-id: svn://10.65.10.50/trunk@4 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ed742ea403
commit
b0ab13f0fc
@ -54,6 +54,7 @@ TMask* TPrimanota_application::load_mask(int n)
|
||||
m->set_handler(F_VISVAL, visval_handler);
|
||||
m->set_handler(F_OCCASEDIT, occas_handler);
|
||||
m->set_handler(F_SOLAIVA, solaiva_handler);
|
||||
m->set_handler(F_SHEETIVA, iva_handler);
|
||||
{
|
||||
TSheet_field& is = (TSheet_field&)m->field(F_SHEETIVA);
|
||||
is.set_notify(iva_notify);
|
||||
|
@ -594,6 +594,38 @@ bool TPrimanota_application::iva_notify(int r, KEY k)
|
||||
}
|
||||
|
||||
|
||||
// Handler dello sheet di contabilita'
|
||||
// Certified 90%
|
||||
bool TPrimanota_application::iva_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k != K_ENTER) return TRUE;
|
||||
|
||||
real imp;
|
||||
for (int r = 0; r < app().ivas().items(); r++)
|
||||
{
|
||||
TToken_string& row = app().ivas().row(r);
|
||||
imp += real(row.get(0)); // imponibile
|
||||
row.get(); // IVA
|
||||
imp += real(row.get()); // imposta
|
||||
}
|
||||
|
||||
const TMask& m = f.mask();
|
||||
real tot(m.get(F_TOTALE));
|
||||
tot += real(m.get(F_RITFIS));
|
||||
tot += real(m.get(F_RITSOC));
|
||||
|
||||
if (imp != tot)
|
||||
{
|
||||
TString16 t(tot.string("."));
|
||||
TString16 i(imp.string("."));
|
||||
return error_box("La somma del totale documento e delle ritenute (%s) e' diverso dalla "
|
||||
"somma degli imponibili e delle imposte (%s)", t, i);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Handlers dei campi della testata
|
||||
///////////////////////////////////////////////////////////
|
||||
|
@ -70,6 +70,7 @@ class TPrimanota_application : public TRelation_application
|
||||
static bool conto_handler(TMask_field& f, KEY key);
|
||||
|
||||
static bool iva_notify(int r, KEY key);
|
||||
static bool iva_handler(TMask_field& f, KEY key);
|
||||
static bool cg_notify(int r, KEY key);
|
||||
static bool cg_handler(TMask_field& f, KEY key);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user