@fluxhub/fluxhub-lib 10.0.167 → 10.0.169

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.
@@ -8809,17 +8809,18 @@
8809
8809
  }, 0);
8810
8810
  };
8811
8811
  FHCurrencyFieldComponent.prototype.writeValue = function (value) {
8812
- console.log('inif ', value, this.innerValue);
8812
+ console.log('inif ', parseFloat(value), value, this.innerValue);
8813
8813
  if (value == null)
8814
8814
  value = 0;
8815
- if (value !== this.innerValue) {
8815
+ if (parseFloat(value) !== this.innerValue) {
8816
8816
  console.log('typeof value ', typeof value);
8817
- if (typeof value == "string") {
8818
- if (this.decimal == 0)
8819
- value = parseFloat(value.split(".").join("").split(",").join(""));
8820
- else
8821
- value = parseFloat(value.split(".").join("").split(",").join("."));
8822
- }
8817
+ if (typeof value == "string")
8818
+ if (this.decimal == 0 || value.indexOf(',') != -1) {
8819
+ if (this.decimal == 0)
8820
+ value = parseFloat(value.split(".").join("").split(",").join(""));
8821
+ else
8822
+ value = parseFloat(value.split(".").join("").split(",").join("."));
8823
+ }
8823
8824
  this.innerValue = value;
8824
8825
  this.value = value;
8825
8826
  console.log('writeValue ini ', this.value, this.formattedAmount);