Skip to content

Commit

Permalink
Fixed error with date sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
yamelsenih committed Dec 6, 2024
1 parent 4790230 commit 093207b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/org/spin/report_engine/data/Cell.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
package org.spin.report_engine.data;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;

import org.compiere.util.Env;
import org.compiere.util.Util;
Expand Down Expand Up @@ -108,6 +110,9 @@ public Cell withValue(Object value) {
}

public String getCompareValue() {
if(value instanceof Timestamp && value != null) {
return new SimpleDateFormat("yyyy-MM-dd").format((Timestamp) value);
}
if(Util.isEmpty(displayValue)) {
if(value != null) {
return String.valueOf(value);
Expand Down

0 comments on commit 093207b

Please sign in to comment.