diff --git a/cg/cg2102.cpp b/cg/cg2102.cpp index fe2b07589..bfa4ec9ec 100755 --- a/cg/cg2102.cpp +++ b/cg/cg2102.cpp @@ -1046,7 +1046,7 @@ TSheet_field& TPrimanota_application::ivas() const return s; } - +/* TBill& TPrimanota_application::ivas_bill(TBill& c) { if (iva() == iva_vendite) @@ -1060,7 +1060,8 @@ TBill& TPrimanota_application::ivas_bill(TBill& c) } } return c; -} +} +*/ // Gestione del campo imponibile sullo sheet iva // Certified 90% @@ -1522,14 +1523,19 @@ bool TPrimanota_application::iva_sottoconto_handler(TMask_field& f, KEY key) TMask& m = f.mask(); const TEdit_field& e = (const TEdit_field&)f; const TRectype& piano = e.browse()->cursor()->curr(); - const TCausale& caus = app().causale(); 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; m.set(105, s, TRUE); // Setta il campo spesa-ricavo della riga IVA }