FSN#39393 SQL expressie kolommen niet verwijderen of wijzigen

svn path=/Website/branches/v2016.3/; revision=32723
This commit is contained in:
Erik Groener
2017-02-06 15:41:39 +00:00
parent a362edfbd1
commit 1b2d13c40e

View File

@@ -385,6 +385,12 @@ function model_reportcolumns(usrrap_key, params)
if (!valid_char.test(jsondata.name))
abort_with_warning(L("lcl_rap_column_invalid"));
if (user.has("WEB_FACTAB") && (jsondata.expression || !jsondata.id))
{
this.fields.expression.readonly = false;
this.fields.name.insertonly = false;
}
var dbfields = api2.update_fields(params, this, jsondata); // Build updater
var sql = buildUpdate("fac_usrrap_cols", dbfields, { noValidateToken: true }) + " fac_usrrap_cols_key = " + the_key;
@@ -418,7 +424,9 @@ function model_reportcolumns(usrrap_key, params)
return { key: col_key, warning: "" };
}
// REST_DELETE: not supported
this._REST_DELETE = generic_REST_DELETE(this);
if (rap_key > 0)
{
@@ -436,6 +444,7 @@ function model_reportcolumns(usrrap_key, params)
if (params.internal || user.has("WEB_FACTAB"))
{
this.REST_POST = this._REST_POST; // Voor de clone-report
this.REST_DELETE = this._REST_DELETE;
}
}