Corretto handler sottoconto iva per tipo spesa/ricavo
git-svn-id: svn://10.65.10.50/trunk@4999 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
e051ab91f0
commit
2c8f0e3825
@ -1046,7 +1046,7 @@ TSheet_field& TPrimanota_application::ivas() const
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
TBill& TPrimanota_application::ivas_bill(TBill& c)
|
TBill& TPrimanota_application::ivas_bill(TBill& c)
|
||||||
{
|
{
|
||||||
if (iva() == iva_vendite)
|
if (iva() == iva_vendite)
|
||||||
@ -1060,7 +1060,8 @@ TBill& TPrimanota_application::ivas_bill(TBill& c)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Gestione del campo imponibile sullo sheet iva
|
// Gestione del campo imponibile sullo sheet iva
|
||||||
// Certified 90%
|
// Certified 90%
|
||||||
@ -1522,14 +1523,19 @@ bool TPrimanota_application::iva_sottoconto_handler(TMask_field& f, KEY key)
|
|||||||
TMask& m = f.mask();
|
TMask& m = f.mask();
|
||||||
const TEdit_field& e = (const TEdit_field&)f;
|
const TEdit_field& e = (const TEdit_field&)f;
|
||||||
const TRectype& piano = e.browse()->cursor()->curr();
|
const TRectype& piano = e.browse()->cursor()->curr();
|
||||||
const TCausale& caus = app().causale();
|
|
||||||
int spric = piano.get_int("TIPOSPRIC");
|
int spric = piano.get_int("TIPOSPRIC");
|
||||||
if ((spric == 2 || spric == 3) && !caus.corrispettivi())
|
|
||||||
{
|
|
||||||
const TString& td = caus.tipo_doc();
|
|
||||||
if (td == "FV" || td == "NC") spric = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (app().iva() == iva_vendite)
|
||||||
|
{
|
||||||
|
const TCausale& caus = app().causale();
|
||||||
|
if (spric == 2 || spric == 3)
|
||||||
|
{
|
||||||
|
const TString& td = caus.tipo_doc();
|
||||||
|
if (td == "FV" || td == "NC" || td == "ND")
|
||||||
|
spric = 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TString s; if (spric > 0) s << spric;
|
TString s; if (spric > 0) s << spric;
|
||||||
m.set(105, s, TRUE); // Setta il campo spesa-ricavo della riga IVA
|
m.set(105, s, TRUE); // Setta il campo spesa-ricavo della riga IVA
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user