Patch level : 10.0 patch 548
Files correlati : lv0 Ricompilazione Demo : [ ] Commento : Cambio articolo in contratto, se il nuovo articolo che sto imputando è presente in un'altra riga del contratto, mi deve avvisare e non devo poterlo fare git-svn-id: svn://10.65.10.50/trunk@19784 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
01e435a013
commit
c1243a0cb9
@ -433,6 +433,29 @@ bool TContratti_msk::on_field_event(TOperable_field& o,TField_event e,long jolly
|
||||
TSheet_field& ss = sfield(F_RIGHE);
|
||||
TMask& m = o.mask(); // maschera di riga!
|
||||
|
||||
const int rigasel = ss.selected();
|
||||
const TString80 art = o.get();
|
||||
|
||||
FOR_EACH_SHEET_ROW(ss, r, riga)
|
||||
{
|
||||
if(r == rigasel)
|
||||
continue;
|
||||
|
||||
if(riga->get(0) == codart)
|
||||
{
|
||||
TString msg;
|
||||
msg << "L'articolo " << codart << " è già presente a contratto e non è possibile reinserirlo.";
|
||||
warning_box(msg);
|
||||
|
||||
m.set(S_CODART, _artrig);
|
||||
TToken_string& row = ss.row(rigasel);
|
||||
row.add(_artrig, 0);
|
||||
ss.force_update(rigasel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//PROPONI PREZZO
|
||||
TToken_string key;
|
||||
key.add('C');
|
||||
|
Loading…
x
Reference in New Issue
Block a user