Patch level : 4.0 451
Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione 3.1 650 git-svn-id: svn://10.65.10.50/trunk@14162 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
58c3dd20f2
commit
738f746953
@ -1702,7 +1702,7 @@ void TReport_window::draw_field(const TReport_field& rf)
|
||||
set_color(rf.fore_color(), rf.back_color());
|
||||
|
||||
TString str = rf.picture();
|
||||
advanced_draw_paragraph(*this, str, r, rf.horizontal_alignment(), rf.vertical_alignment(), _default_row_height);
|
||||
advanced_draw_text_line(*this, str, r, rf.horizontal_alignment(), rf.vertical_alignment());
|
||||
}
|
||||
break;
|
||||
default :
|
||||
@ -1736,7 +1736,7 @@ void TReport_window::draw_field(const TReport_field& rf)
|
||||
str << rf.id();
|
||||
else
|
||||
str = rf.field();
|
||||
advanced_draw_paragraph(*this, str, r, rf.horizontal_alignment(), rf.vertical_alignment(), _default_row_height);
|
||||
advanced_draw_text_line(*this, str, r, rf.horizontal_alignment(), rf.vertical_alignment());
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1891,73 +1891,6 @@ bool TPrimanota_application::sheet_mastrino_handler(TMask_field& f, KEY k)
|
||||
return true;
|
||||
}
|
||||
|
||||
void TPrimanota_application::link_mastrino(const TBill& bill) const
|
||||
{
|
||||
if (bill.ok())
|
||||
{
|
||||
TPrimanota_application& a = app();
|
||||
const TMask& cm = a.curr_mask();
|
||||
|
||||
int anno = cm.get_int(F_ANNOES);
|
||||
if (anno <= 0)
|
||||
{
|
||||
TDate date = cm.get(F_DATACOMP);
|
||||
if (!date.ok())
|
||||
{
|
||||
date = cm.get_date(F_DATAREG);
|
||||
if (!date.ok())
|
||||
date = TDate(TODAY);
|
||||
}
|
||||
anno = a._esercizi.date2esc(date);
|
||||
}
|
||||
|
||||
TFilename ininame; ininame.tempdir(); ininame.add("mastrino.ini");
|
||||
if (anno > 0)
|
||||
{
|
||||
TConfig ini(ininame, "Transaction");
|
||||
ini.set("Action", "Modify");
|
||||
ini.set_paragraph("24");
|
||||
ini.set(RMV_ANNOES, anno);
|
||||
ini.set(RMV_TIPOC, bill.tipo());
|
||||
ini.set(RMV_GRUPPO, bill.gruppo());
|
||||
ini.set(RMV_CONTO, bill.conto());
|
||||
ini.set(RMV_SOTTOCONTO, bill.sottoconto());
|
||||
}
|
||||
if (ininame.exist())
|
||||
{
|
||||
TString cmd;
|
||||
cmd << "cg3 -5 -i" << ininame;
|
||||
TExternal_app app(cmd);
|
||||
app.run();
|
||||
xvt_fsys_removefile(ininame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool TPrimanota_application::mastrino_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k == K_SPACE)
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
TBill bill; bill.get(m, F_GRUPPO, F_CONTO, F_SOTTOCONTO);
|
||||
app().link_mastrino(bill);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPrimanota_application::sheet_mastrino_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k == K_SPACE)
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
const char tipo = m.get(CG_TIPO)[0];
|
||||
const short id_sotto = CG_SOTTOCONTO + (tipo <= ' ' ? 0 : (tipo == 'C' ? 100 : 200));
|
||||
TBill bill; bill.get(m, CG_GRUPPO, CG_CONTO, id_sotto, CG_TIPO);
|
||||
app().link_mastrino(bill);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Handlers dei campi della testata
|
||||
///////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user