FSN#39393 SQL expressie kolommen niet verwijderen of wijzigen

svn path=/Website/branches/v2016.3/; revision=32838
This commit is contained in:
Erik Groener
2017-02-15 13:34:58 +00:00
parent 34fb847deb
commit ff8cc5082c

View File

@@ -166,7 +166,7 @@ function model_reportcolumns(usrrap_key, params)
// Een zelf toegevoegd veld mag ook verwijderd worden.
if (obj.expression)
{
this.REST_DELETE = generic_REST_DELETE(this); //this._REST_DELETE;
this.REST_DELETE = generic_REST_DELETE(this);
}
}
};
@@ -179,6 +179,17 @@ function model_reportcolumns(usrrap_key, params)
this.hook_pre_delete = function (params, columns_key)
{
var sql = "SELECT 1"
+ " FROM fac_usrrap_cols"
+ " WHERE fac_usrrap_cols_expression IS NOT NULL"
+ " AND fac_usrrap_cols_key = " + columns_key;
var oRs = Oracle.Execute(sql, true);
if (oRs.eof)
abort_with_warning(L("lcl_cnt_Del_Fails_Auth"));
oRs.Close();
user.checkAuthorization("WEB_FACTAB");
this.REST_DELETE = generic_REST_DELETE(this);
};