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