Skip to content

Commit

Permalink
fix: Report field date is rangue without picker range. (adempiere#1209)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt authored Jul 24, 2023
1 parent 34401f2 commit 4e5c4c7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/utils/ADempiere/dataUtils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
* Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com
* Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com
* Contributor(s): Edwin Betancourt [email protected] https://github.com/EdwinBetanc0urt
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

// utils and helper methods
// Utils and Helper Methods
// import { getToken } from '@/utils/auth'
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'

Expand Down Expand Up @@ -176,6 +176,7 @@ export const OPERATORS_LIST = [
OPERATOR_LIKE,
OPERATOR_NOT_LIKE,
OPERATOR_GREATER,
OPERATOR_GREATER_EQUAL,
OPERATOR_LESS,
OPERATOR_LESS_EQUAL,
OPERATOR_BETWEEN,
Expand Down
8 changes: 6 additions & 2 deletions src/utils/ADempiere/dictionaryUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,18 +261,22 @@ export function generateField({

// Overwrite some values
if (field.isRange) {
field.operator = OPERATOR_GREATER_EQUAL.operator
field.operator = OPERATOR_BETWEEN.operator
if (field.isNumericField) {
field.operator = OPERATOR_GREATER_EQUAL.operator
}

field.columnNameTo = `${columnName}_To`
field.elementNameTo = `${field.elementName}_To`
if (typeRange) {
field.operator = OPERATOR_LESS_EQUAL.operator
field.uuid = `${field.uuid}_To`
field.columnName = field.columnNameTo
field.elementName = field.elementNameTo
field.name = `${field.name} To`
field.value = parsedDefaultValueTo
field.defaultValue = field.defaultValueTo
field.parsedDefaultValue = field.parsedDefaultValueTo
field.operator = OPERATOR_LESS_EQUAL.operator

// increment order sequence
field.sequence = field.sequence > 0 ? field.sequence + 1 : 0
Expand Down

0 comments on commit 4e5c4c7

Please sign in to comment.