Patch level : 10.0 patch 548

Files correlati     : lv3
Ricompilazione Demo : [ ]
Commento            :
Aggiunto un controllo per sapere se un articolo è o meno a contratto per il cliente


git-svn-id: svn://10.65.10.50/trunk@19766 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca83 2009-12-14 14:38:21 +00:00
parent 207d7ec964
commit 3046eb0169

View File

@ -814,7 +814,28 @@ void TEvasione_ter_msk::evadi_da_terminale()
set(F_TQTADACON, qr.get_qta_da_con());
}
else
warning_box(TR("Non è stato possibile sommare il pacco a nessuna riga del buono"));
{
TDoc_key kdoc(get_date(F_TDATADOC).year(), ini_get_string(CONFIG_DITTA, "lv", "NUM_PRE", NULL, 0), get_long(F_TNDOC));
TBuono_prelievo bpre(kdoc);
const long codcf = bpre.codcf();
const int codcont = bpre.codcont();
TLaundry_contract cont(codcf, codcont);
const TRectype& rcont = cont.row(rp.articolo());
if (!rcont.empty())
{
TString msg;
msg << "L'articolo " << rp.articolo() << " non è a contratto ma non presente sul buono";
warning_box(msg);
}
else
{
TString msg;
msg << "L'articolo " << rp.articolo() << " non è previsto per questo cliente";
warning_box(msg);
}
}
}
}
}