Patch level : 10.0 290

Files correlati     : ve0.exe
Ricompilazione Demo : [ ]
Commento            :
Correto il richiamo del documento padre. Ora se il documento padre e' una boola di lavanderiea viene chiamato kv3 -0 invece che ve0 -0


git-svn-id: svn://10.65.10.50/trunk@18777 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2009-04-23 15:26:54 +00:00
parent 6c4c41ce69
commit 20c75cbf13
4 changed files with 31 additions and 14 deletions

@ -512,6 +512,8 @@ public:
// @cmember Assegna il documento corrente
void set_doc(TDocumento * doc) { _doc = doc; }
const TDocumento & doc() const { CHECK(_doc, "Documento nullo"); return *_doc;}
virtual bool edit(int logicnum = 0, const char * alternate_key_fields = NULL, const char* hint = NULL) const;
virtual void zero(const char * fieldname);
virtual void zero(char c = '\0');

@ -1321,3 +1321,20 @@ void TTipo_riga_documento::set_defaults(TSheet_field& s, int row) const
r.add(*tt, s.cid2index(i));
}
}
bool TRiga_documento::edit(int logicnum, const char* alternate_key_fields, const char* hint) const
{
TString app;
TString4 module = doc().tipo().module();
module.upper();
if (module == "CO")
app = "co0 -6";
else
if (module == "LV")
app = "lv3 -0";
else
if (module == "PE")
app = "pe0 -3";
return TRectype::edit(logicnum, alternate_key_fields, app);
}

@ -3381,7 +3381,7 @@ bool TDocumento_mask::codcont_handler( TMask_field& f, KEY key )
{
r.put(RDOC_CODART, cod);
const int row = s.insert(-1, FALSE);
const int row = s.insert(-1, false);
s.row(row);
r.autoload(s);
s.check_row(row, 0x2);

@ -1740,10 +1740,9 @@ bool codart_handler(TMask_field& f, KEY key )
{
pi.addstatus(1L);
TRiga_esplosione & r = (TRiga_esplosione &) components[i];
TRiga_documento & new_row = doc.insert_row(row + 1, tiporiga);
//sh.insert(row, false);
str_arr.insert(new TToken_string, row);
sh.insert(row, false, true);
TRiga_documento & new_row = doc[row + 1];
TDocumento::copy_data(new_row, curr_row);
new_row.put(RDOC_CODART, r.articolo());
new_row.put(RDOC_CODARTMAG, r.articolo());
@ -1763,7 +1762,6 @@ bool codart_handler(TMask_field& f, KEY key )
if (!valcomp)
{
new_row.zero(RDOC_PREZZO);
// new_row.autoload(sh); // Da rdoc a shee
sh.row(row).add("0", sh.cid2index(FR_PREZZO));
row_mask.reset(FR_PREZZO);
}
@ -2410,7 +2408,7 @@ bool link_handler( TMask_field& f, KEY key )
if (key == K_SPACE)
{
TSheet_field & sf = *f.mask().get_sheet();
const TDocumento_mask & m = (const TDocumento_mask & )sf.mask();
TDocumento_mask & m = (TDocumento_mask & )sf.mask();
TDocumento & d = (TDocumento &) m.doc();
int row = sf.selected();
const TRiga_documento & r = d[row + 1];
@ -2454,26 +2452,26 @@ bool link_handler( TMask_field& f, KEY key )
if (sht.checked(cur.pos()))
{
if (++processed < items_selected)
sf.insert(row, false); // call notify ?
d.insert_row(row + 1);
d[row + 1].put(RDOC_TIPORIGA, tipo);
sf.insert(row, false, true); // call notify ?
d[row + 1].autoload(sf);
TToken_string & shrow = sf.row(row);
shrow.add(tipo, sf.cid2index(FR_TIPORIGA));
shrow.add("", sf.cid2index(FR_CHECKED));
TMask & m = sf.sheet_row_mask(row);
TMask & row_mask = sf.sheet_row_mask(row);
m.set(FR_TIPORIGA, tipo);
row_mask.set(FR_TIPORIGA, tipo);
out_fnames.restart();
for (short id = out_id.get_int(0); id > 0; id = out_id.get_int())
{
const TString16 fn(out_fnames.get());
const TFieldref fr(fn, 0);
m.set(id, fr.read(cur.curr()));
shrow.add(m.get(id), sf.cid2index(id));
row_mask.set(id, fr.read(cur.curr()));
shrow.add(row_mask.get(id), sf.cid2index(id));
}
sf.check_row(row, 0x2);
d[row + 1].autosave(sf);
m.highlight_row(row);
row++;
}
cur.freeze(FALSE);