Patch level :2.2 164
Files correlati :stampa rendiconto Ricompilazione Demo : [ ] Commento :eliminata l'obbligatorieta' delle date. Terminata l'implementazione della prima tranche delle richieste di adolfo. git-svn-id: svn://10.65.10.50/trunk@13318 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
69ed72afb7
commit
639a90e25e
@ -93,11 +93,11 @@ bool TPrint_rendiconto_ca_mask::on_field_event(TOperable_field& o, TField_event
|
|||||||
if (!data.empty() && esc.date2esc(data) != anno)
|
if (!data.empty() && esc.date2esc(data) != anno)
|
||||||
return error_box(TR("La data deve appartenere all'anno selezionato"));
|
return error_box(TR("La data deve appartenere all'anno selezionato"));
|
||||||
}
|
}
|
||||||
else //se l'esercizio è vuoto le date diventano obbligatorie!!
|
/* else //se l'esercizio è vuoto le date diventano obbligatorie!!
|
||||||
{
|
{
|
||||||
if (o.empty())
|
if (o.empty())
|
||||||
return error_box(TR("La data è obbligatoria in quanto manca l'esercizio"));
|
return error_box(TR("La data è obbligatoria in quanto manca l'esercizio"));
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case F_REPORT:
|
case F_REPORT:
|
||||||
@ -1001,6 +1001,7 @@ void TPrint_rendiconto_ca_recordset::set_filter(const TPrint_rendiconto_ca_mask&
|
|||||||
if (_tmp != NULL)
|
if (_tmp != NULL)
|
||||||
delete _tmp;
|
delete _tmp;
|
||||||
|
|
||||||
|
//crea in memoria il nuovo file temporaneo e lo azzera (non si sa mai..)
|
||||||
_tmp = new TExternisamfile(dbf, trr);
|
_tmp = new TExternisamfile(dbf, trr);
|
||||||
_tmp->zap();
|
_tmp->zap();
|
||||||
|
|
||||||
@ -1018,7 +1019,7 @@ void TPrint_rendiconto_ca_recordset::set_filter(const TPrint_rendiconto_ca_mask&
|
|||||||
_codfas = rel.curr().get(RMOVANA_CODFASE);
|
_codfas = rel.curr().get(RMOVANA_CODFASE);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char tc = msk.get(F_PIANO)[0]; // Contabile o Analitico?
|
const char tc = msk.get(F_PIANO)[0]; // Piano dei conti Contabile o Analitico?
|
||||||
const short dlg_da = tc == 'C' ? F_PDC1_INI : F_PAN1_INI;
|
const short dlg_da = tc == 'C' ? F_PDC1_INI : F_PAN1_INI;
|
||||||
const short dlg_al = tc == 'C' ? F_PDC1_FIN : F_PAN1_FIN;
|
const short dlg_al = tc == 'C' ? F_PDC1_FIN : F_PAN1_FIN;
|
||||||
|
|
||||||
@ -1139,25 +1140,25 @@ void TPrint_rendiconto_ca::main_loop()
|
|||||||
{
|
{
|
||||||
while (_mask->run() == K_ENTER)
|
while (_mask->run() == K_ENTER)
|
||||||
{
|
{
|
||||||
//costruzione della query x il report in base ai parametri della maschera
|
|
||||||
TSheet_field& sheet = _mask->sfield(F_RIGHE);
|
TSheet_field& sheet = _mask->sfield(F_RIGHE);
|
||||||
const int n_righe_sheet = sheet.items();
|
const int n_righe_sheet = sheet.items();
|
||||||
//se lo sheet è vuoto aggiunge una riga vuota
|
//se lo sheet è vuoto aggiunge una riga vuota
|
||||||
if (n_righe_sheet == 0)
|
if (n_righe_sheet == 0)
|
||||||
sheet.insert();
|
sheet.insert();
|
||||||
|
|
||||||
//report e book
|
//report e book dei report
|
||||||
TReport_book book; //book dei report
|
TReport_book book;
|
||||||
TString path = _mask->get(F_REPORT);
|
TString path = _mask->get(F_REPORT);
|
||||||
if (path.empty())
|
if (path.empty())
|
||||||
path = "ca3700a";
|
path = "ca3700a";
|
||||||
TPrint_rendiconto_ca_rep rep;
|
TPrint_rendiconto_ca_rep rep;
|
||||||
rep.load(path);
|
rep.load(path);
|
||||||
|
|
||||||
FOR_EACH_SHEET_ROW(sheet, r, row)
|
FOR_EACH_SHEET_ROW(sheet, r, row) //per ogni cdc/cms che appare nello sheet di pag.1 della msk..
|
||||||
{
|
{
|
||||||
rep.set_filter(*_mask, r);
|
rep.set_filter(*_mask, r); //..chiama il metodone globale che crea e compila il file..
|
||||||
book.add(rep);
|
//..temporaneo i cui dati riempiranno il report
|
||||||
|
book.add(rep); //aggiunge il report relativo alla cdc/cms corrente al book
|
||||||
}
|
}
|
||||||
|
|
||||||
book.print_or_preview(); //stampa il book dei report
|
book.print_or_preview(); //stampa il book dei report
|
||||||
|
Loading…
x
Reference in New Issue
Block a user