details: https://code.openbravo.com/erp/devel/pi/rev/d45e9fe52bb3 changeset: 30062:d45e9fe52bb3 user: Mark <markmm82 <at> gmail.com> date: Mon Sep 12 15:06:46 2016 -0400 summary: Fixes issue 33937: Fixed trx date of inventory in Costing Background Process
Used the setTimestamp method instead of the setDate, by this way the details like the hours, minutes and seconds of the transactions are not lost. diffstat: src/org/openbravo/costing/CostingRuleProcess.java | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (30 lines): diff -r 7546b5e71d8b -r d45e9fe52bb3 src/org/openbravo/costing/CostingRuleProcess.java --- a/src/org/openbravo/costing/CostingRuleProcess.java Tue Sep 13 13:39:52 2016 +0000 +++ b/src/org/openbravo/costing/CostingRuleProcess.java Mon Sep 12 15:06:46 2016 -0400 @@ -301,7 +301,7 @@ Query queryInsert = OBDal.getInstance().getSession().createQuery(insert.toString()); queryInsert.setParameterList("orgs", childOrgs); - queryInsert.setDate("date", date); + queryInsert.setTimestamp("date", date); queryInsert.setString("client", client.getId()); int n1 = queryInsert.executeUpdate(); log4j.debug("InitializeOldTrx inserted " + n1 + " records. Took: " @@ -324,7 +324,7 @@ Query queryUpdate = OBDal.getInstance().getSession().createQuery(update.toString()); queryUpdate.setParameter("currency", client.getCurrency()); queryUpdate.setParameterList("orgs", childOrgs); - queryUpdate.setDate("date", date); + queryUpdate.setTimestamp("date", date); queryUpdate.setString("client", client.getId()); int n2 = queryUpdate.executeUpdate(); log4j.debug("InitializeOldTrx updated " + n2 + " records. Took: " @@ -718,7 +718,7 @@ update.append(" )"); Query queryUpdate = OBDal.getInstance().getSession().createQuery(update.toString()); - queryUpdate.setDate("date", startingDate); + queryUpdate.setTimestamp("date", startingDate); queryUpdate.setString("cr", ruleId); queryUpdate.executeUpdate(); ------------------------------------------------------------------------------ _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits