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

Commit

Permalink
Fix: Receiving Order Display Logic (#2987)
Browse files Browse the repository at this point in the history
* Fix: Receiving Order Display Logic

* Fix: Receiving Order Display Logic

* Update evaluator.js

---------

Co-authored-by: Edwin Betancourt <[email protected]>
  • Loading branch information
Ricargame and EdwinBetanc0urt authored Nov 15, 2024
1 parent 3c51e37 commit 9ca99db
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/utils/ADempiere/contextUtils/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,19 @@ 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"
// parse to number to evaluate `0` number with `"0.00"` string
if (!Number.isNaN(value1)) {
value1 = Number(value1)
const convertedNumber1 = Number(value1)
if (!isEmptyValue(convertedNumber1)) {
value1 = convertedNumber1
}
}
if (!Number.isNaN(value2)) {
value2 = Number(value2)
const convertedNumber2 = Number(value2)
if (!isEmptyValue(convertedNumber2)) {
value2 = convertedNumber2
}
}

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

0 comments on commit 9ca99db

Please sign in to comment.