Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
fix: Zero context values with decimals. (#2983)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt authored Nov 14, 2024
1 parent cdad288 commit 4c74b25
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/utils/ADempiere/contextUtils/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,14 @@ export class evaluator {
// if both values are empty, but not equal (" ", NaN, null, undefined)
const isBothEmptyValues = isEmptyValue(value1) && isEmptyValue(value2)

// parse to number to evaluate "0" with "0.00"
if (!Number.isNaN(value1)) {
value1 = Number(value1)
}
if (!Number.isNaN(value2)) {
value2 = Number(value2)
}

let isValueLogic
switch (operand) {
case '=':
Expand Down

0 comments on commit 4c74b25

Please sign in to comment.