Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Parameters isRange number #1393

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/store/modules/ADempiere/dictionary/browser/getters.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

// utils and helper methods
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
import { isDisplayedField, isMandatoryField } from '@/utils/ADempiere/dictionary/browser.js'
import { isNumberField } from '@/utils/ADempiere/references'
Expand Down Expand Up @@ -70,7 +71,7 @@ export default {
columnName
})

if (fieldItem.isRange && isNumberField(fieldItem.displayType)) {
if (fieldItem.isRange && !isNumberField(fieldItem.displayType)) {
const valueTo = rootGetters.getValueOfField({
containerUuid,
columnName: fieldItem.columnNameTo
Expand All @@ -83,13 +84,12 @@ export default {
}
}

if (isEmptyValue(value)) {
return
if (!isEmptyValue(value)) {
queryParams.push({
columnName,
value
})
}
queryParams.push({
columnName,
value
})
})

return queryParams
Expand Down
16 changes: 8 additions & 8 deletions src/store/modules/ADempiere/dictionary/process/getters.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

// utils and helper methods
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
import { isDisplayedField, isMandatoryField } from '@/utils/ADempiere/dictionary/process'
import { isDisplayedField, isMandatoryField } from '@/utils/ADempiere/dictionary/process.js'
import { isNumberField } from '@/utils/ADempiere/references'

/**
Expand Down Expand Up @@ -70,7 +71,7 @@ export default {
columnName
})

if (fieldItem.isRange && isNumberField(fieldItem.displayType)) {
if (fieldItem.isRange && !isNumberField(fieldItem.displayType)) {
const valueTo = rootGetters.getValueOfField({
containerUuid,
columnName: fieldItem.columnNameTo
Expand All @@ -83,13 +84,12 @@ export default {
}
}

if (isEmptyValue(value)) {
return
if (!isEmptyValue(value)) {
processParameters.push({
columnName,
value
})
}
processParameters.push({
columnName,
value
})
})

return processParameters
Expand Down