UB form does not allow float attributes to have value >10^7
There is an attribute:
{
"name": "budgetPPU",
"caption": "Budget Price Per Unit",
"dataType": "Float",
"allowNull": false
},
UB form does not allow it to have value 10'000'000 or more. It should.
Underlying DB column has no problem with the following:
update mdm_SkuItem set budgetPPU = 1000000000000.000001 where id = 3000000027449
It maintains all the precision an signs.
I did a workaround - I have no idea if it fully correct, but it pushes limit far enough to hit string length limit :) :
validator: function (val) {
let minValue = -8999000000000000
let maxValue = 8999000000000000
if (Number(val.replace(/[^0-9]/, '').replace(',', '.')) < maxValue &&
Number(val.replace(/[^0-9]/, '').replace(',', '.')) > minValue
) {
let rv = val.replace('-', '').match(/[0-9]*[^0-9]{1}([0-9]+)/)
if ((rv && rv.length > 1 && rv[1].length <= this.decimalPrecision) || !rv || rv.length === 1) {
return true
}
}
return UB.i18n('numberOfSignificantDigits')
}
},
But I would really appreciate if you put your eye here: https://git-pub.intecracy.com/unitybase/ubjs/blob/master/packages/adminui-pub/_src/app/core/UBUtil.js#L549 and make sure it works as needed.
Thx!