Corretti i seguenti errori:

MI2334, MI2335, MI2336, MI2337, MI2338, MI2339, MI2340, MI2341
MI2342, MI2343, MI2344, MI2345, MI2347, MI2348, MI2349, MI2350
MI2351, MI2352, MI2353, MI2354, MI2355, MI2356, MI2357, MI2358

tutti relativi a semplici errori sull'input del programma di
lista fatture per iva indetraibile/cost-ricavo/intracomunitarie


git-svn-id: svn://10.65.10.50/trunk@4802 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
angelo 1997-07-02 15:17:24 +00:00
parent 02705610a9
commit 33a4ac444b
2 changed files with 30 additions and 22 deletions

View File

@ -67,8 +67,8 @@ class TLista_fatture : public TPrintapp
TString _ragsoc;
TDate _date_from,
_date_to; // Estremi data
real //_tot_doc, //Non ha senso tenere il totale documenti visto che la stampa rappresenta le righe:
//infatti uno stesso documento puo' comparire per piu' tipi indetraibilita' o tipi costo/ricavo diversi
real _tot_doc, //Non ha senso tenere il totale documenti visto che la stampa rappresenta le righe:
//infatti uno stesso documento puo' comparire per piu' tipi indetraibilita' o tipi costo/ricavo diversi
_tot_imp,
_tot_iva, // Totali complessivi della stampa
_tp_doc,
@ -181,23 +181,34 @@ bool TLista_fatture::filter_func2(const TRelation *r)
bool TLista_fatture::date_handler(TMask_field& f, KEY key)
{
if (f.to_check(key) && key == K_ENTER)
if (key == K_TAB && f.mask().is_running())
{
if (f.get().empty())
if (f.dlg() == FLD_DATE_FROM)
return f.error_box("La data di inizio e' obbligatoria.");
else
return f.error_box("La data di fine e' obbligatoria.");
}
if (f.to_check(key))
{
TMask& m = f.mask();
TDate da(m.get_date(FLD_DATE_FROM));
TDate a(m.get_date(FLD_DATE_TO));
if (da > a)
return f.error_box("La data di fine deve essere minore della data di inizio.");
if (da.year() != a.year())
return f.error_box("Le date debbono appartenere allo stesso anno.");
if (a.ok() && da.ok()) // Solo se sono entrambi compilati
{
if (da > a)
return f.error_box("La data di fine deve essere maggiore della data di inizio.");
if (da.year() != a.year())
return f.error_box("Le date devono appartenere allo stesso anno.");
}
}
return TRUE;
}
bool TLista_fatture::mix_handler(TMask_field& f, KEY key)
{
if (f.to_check(key) && key == K_ENTER)
if (f.to_check(key))
{
TMask& m = f.mask();
short dlg1 = f.dlg();
@ -460,7 +471,7 @@ bool TLista_fatture::preprocess_page(int file, int counter)
{
if (_tipo != intra)
{
//_tot_doc += doc;
_tot_doc += doc;
_tp_doc += doc;
}
_print_all = TRUE;
@ -499,8 +510,8 @@ print_action TLista_fatture::postprocess_print(int file, int counter)
p.print(_pr);
_pr.set_style(boldstyle);
_pr.put("TOTALE GENERALE :",42);
//if (_tot_doc != 0.0)
// _pr.put(_tot_doc.string("###.###.###.###"),73);
if (_tot_doc != 0.0)
_pr.put(_tot_doc.string("###.###.###.###"),73);
if (_tot_imp != 0.0)
_pr.put(_tot_imp.string("###.###.###.###"),89);
if (_tot_iva != 0.0)
@ -616,22 +627,22 @@ void TLista_fatture::set_the_header()
s.format("Dalla data %s Alla data %s",(const char*)s1,(const char*)s2);
if (_tipo == indetraibile || _tipo == costo_ricavo)
{
s << "@45g Dal c. fornitore ";
s << "@45g Dal fornitore ";
if (_from_cf == 0L && _to_cf == 999999L)
s << " Al c. fornitore";
s << " Al fornitore";
else
{
s << _from_cf;
s << " Al c. fornitore ";
s << " Al fornitore ";
s << _to_cf;
}
s << "@94g Dal c. registro ";
s << "@94g Dal registro ";
if (_from_reg.empty() && _to_reg == "~~~")
s << " Al c. registro";
s << " Al registro";
else
{
s << _from_reg;
s << " Al codice registro ";
s << " Al registro ";
s << _to_reg;
}
if (_tipo == costo_ricavo)
@ -771,6 +782,7 @@ bool TLista_fatture::set_print(int m)
// Ciclo sulle ditte slezionate
const long items = _ditte->items();
printer().open();
for (int i = 0; i < items; i++)
{
if (_ditte->checked(i))
@ -778,7 +790,7 @@ bool TLista_fatture::set_print(int m)
_tipocrprec = -1;
_tipodetprec = -1;
_numregprec = -1L;
//_tot_doc = 0.0;
_tot_doc = 0.0;
_tot_imp = 0.0; _tot_iva = 0.0;
_tp_doc = 0.0; _tp_imp = 0.0; _tp_iva = 0.0;
_one_printed = FALSE; _print_all = TRUE;

View File

@ -5,15 +5,11 @@ PAGE "Lista fatture per IVA indetraibile" -1 -1 68 10
DATE FLD_DATE_FROM
BEGIN
PROMPT 1 2 "Dalla data "
VALIDATE NOT_EMPTY_FUNC
WARNING "Le data di inizio e' obbligatoria"
END
DATE FLD_DATE_TO
BEGIN
PROMPT 1 3 "Alla data "
VALIDATE NOT_EMPTY_FUNC
WARNING "Le data di fine e' obbligatoria"
END
GROUPBOX DLG_NULL 40 5