PLAT#52236 Multi-wijzigen prijzen van taken (srtcontrole) kunnen indexeren
svn path=/Website/trunk/; revision=39245
This commit is contained in:
@@ -47,7 +47,8 @@ api2 = {
|
||||
case "currency":
|
||||
if (model.fields[formfields[i].name].relativeValuesAllowed) // reltive values are allowed
|
||||
{
|
||||
val = getFParamFloat(getFParam(formfields[i].frm, "").replace(/^(\+{1,2}|-{1,2})/, ""), null); // check float without (+ or - or ++ or --) sign
|
||||
// getFParamFloat just for checking the float part of the param
|
||||
getFParamFloat(getFParam(formfields[i].frm, "").replace(/^(\+{1,2}|-{1,2})/, ""), null); // check float without (+ or - or ++ or --) sign
|
||||
val = getFParam(formfields[i].frm, "").replace(/,/g,"."); // get string value after float checks when field has relativeValuesAllowed (retain ++ or -- for processing)
|
||||
}
|
||||
else
|
||||
@@ -790,11 +791,12 @@ api2 = {
|
||||
// Bouw een fields object zoals save2db dat verwacht/ kent
|
||||
update_fields: function _update_fields(params, model, jsondata, key)
|
||||
{
|
||||
var oldRelativeValues = {empty: true};
|
||||
var oldRelativeValues = {};
|
||||
var oldRelativeValuesLoaded = false;
|
||||
// Return old values from before edit (if any)
|
||||
function getOldRelativeValues(model, key)
|
||||
{
|
||||
if (oldRelativeValues.empty)
|
||||
if (oldRelativeValuesLoaded == false)
|
||||
{
|
||||
var fieldList = [];
|
||||
for (var fld in model.fields)
|
||||
@@ -812,9 +814,10 @@ api2 = {
|
||||
{
|
||||
oldRelativeValues[fieldList[index]] = oRs(fieldList[index]).Value;
|
||||
}
|
||||
oRs.Close();
|
||||
}
|
||||
}
|
||||
oldRelativeValues.empty = false;
|
||||
oldRelativeValuesLoaded = true;
|
||||
return oldRelativeValues;
|
||||
}
|
||||
// Return new_price OR price +/- percentage
|
||||
|
||||
Reference in New Issue
Block a user