@eqproject/eqp-dynamic-module 2.3.2 → 2.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1917,6 +1917,7 @@ class NumericFieldTemplateComponent {
1917
1917
  updateField() {
1918
1918
  if (this.field.Formula) {
1919
1919
  this.record[this.field.Name] = UtilityHelperService.EvaluateFieldFormula(this.field.Formula, this.record, null);
1920
+ this.record[this.field.Name] = this.record[this.field.Name] == 0 ? 0 : (this.record[this.field.Name] / Math.pow(10, this.eqpNumericOptions.precision)).toFixed(this.eqpNumericOptions.precision);
1920
1921
  }
1921
1922
  if (this.field.VisibleIf) {
1922
1923
  this.field.InListView = UtilityHelperService.EvaluateFieldFormula(this.field.VisibleIf, this.record, null);
@@ -1927,7 +1928,8 @@ class NumericFieldTemplateComponent {
1927
1928
  */
1928
1929
  onRecordValueChange() {
1929
1930
  if (!this.field.Formula) {
1930
- this.record[this.field.Name] = this.record[this.field.Name] == 0 ? 0 : this.record[this.field.Name] / Math.pow(10, this.eqpNumericOptions.precision);
1931
+ this.record[this.field.Name] = this.record[this.field.Name] == 0 ? 0 : (this.record[this.field.Name] / Math.pow(10, this.eqpNumericOptions.precision)).toFixed(this.eqpNumericOptions.precision);
1932
+ console.log("emitted record", this.record);
1931
1933
  this.recordChange.emit(this.record);
1932
1934
  }
1933
1935
  }
@@ -2929,10 +2931,6 @@ class AddFormRecordComponent {
2929
2931
  field.ValuePairs = inverted;
2930
2932
  outputValuesArray[field.Name] = field.ValuePairs[record[field.Name]];
2931
2933
  }
2932
- else if (field.FieldType == FieldTypeEnum["Campo numerico"]) {
2933
- // this.debugLog("record[fieldName]", record[field.Name]);
2934
- outputValuesArray[field.Name] = record[field.Name];
2935
- }
2936
2934
  else {
2937
2935
  // this.debugLog("record[fieldName]", record[field.Name]);
2938
2936
  outputValuesArray[field.Name] = record[field.Name];
@@ -4139,7 +4137,7 @@ class NumericFilterTemplateComponent {
4139
4137
  if (mode == "active") {
4140
4138
  output = {
4141
4139
  key: this.field.Name,
4142
- value: (this.record[this.field.Name] / (Math.pow(10, this.field.DecimalPrecision))).toString(),
4140
+ value: (this.record[this.field.Name] / (Math.pow(10, this.field.DecimalPrecision))).toFixed(this.field.DecimalPrecision).toString(),
4143
4141
  logicoperator: this.selectedLogicOperator,
4144
4142
  fieldtype: this.field.FieldType
4145
4143
  };