Patch level : 10.0 patch 549
Files correlati : lv0 Ricompilazione Demo : [ ] Commento : Se tento di cancellare un articolo in contratto e questo articolo è presente in una bolla da fatturare o in un buono di ritiro o prelievo ancora da associare non deve potermelo far fare git-svn-id: svn://10.65.10.50/trunk@19789 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ad483c3045
commit
b2411326a2
@ -311,6 +311,29 @@ bool TContratti_msk::on_field_event(TOperable_field& o,TField_event e,long jolly
|
||||
return false;
|
||||
}
|
||||
|
||||
//controllo articolo in buoni di ritiro
|
||||
const TString4 codnumbr = ini_get_string(CONFIG_DITTA, "lv", "NUM_RIT", NULL, 0);
|
||||
const TString4 tipodocbr = ini_get_string(CONFIG_DITTA, "lv", "TIPODOC_RIT", NULL, 0);
|
||||
const char statofbr = cache().get("%TIP", tipodocbr, "S2").mid(1,1)[0];
|
||||
|
||||
query.cut(0);
|
||||
query << "USE RDOC KEY 5\n"
|
||||
<< "SELECT (DOC.TIPODOC=\"" << tipodocbr << "\")&&(DOC.STATO<\"" << statofbr << "\")\n"
|
||||
<< "JOIN DOC INTO PROVV=PROVV ANNO=ANNO CODNUM=CODNUM NDOC=NDOC\n"
|
||||
<< "FROM CODART=\"" << codart << "\" ANNO=" << danno << "CODNUM=\"" << codnumbr << "\"\n"
|
||||
<< "TO CODART=\"" << codart << "\" ANNO=" << danno << "CODNUM=\"" << codnumbr << "\"\n";
|
||||
|
||||
TISAM_recordset brit(query);
|
||||
|
||||
if(brit.items() > 0)
|
||||
{
|
||||
TString str;
|
||||
str << "Non è possibile cancellare dal contratto l'articolo " << codart
|
||||
<< "in quanto è presente su " << brit.items() << " ancora da evadere";
|
||||
warning_box(str);
|
||||
return false;
|
||||
}
|
||||
|
||||
//controllo articolo in buoni di prelievo
|
||||
const TString4 codnumbp = ini_get_string(CONFIG_DITTA, "lv", "NUM_PRE", NULL, 0);
|
||||
const TString4 tipodocbp = ini_get_string(CONFIG_DITTA, "lv", "TIPODOC_PRE", NULL, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user