Fixes issue 21590: Standard matching algorithm not considering transaction date
authorIoritz Cia <ioritz.cia@openbravo.com>
Fri, 14 Sep 2012 14:21:28 +0200
changeset 17972 4e6bdb057dbd
parent 17971 1ba52792abc2
child 17973 861d5861059e
child 18300 3670474e9186
Fixes issue 21590: Standard matching algorithm not considering transaction date
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/algorithm/StandardMatchingAlgorithm.java
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/algorithm/StandardMatchingAlgorithm.java	Fri Sep 14 13:17:34 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/algorithm/StandardMatchingAlgorithm.java	Fri Sep 14 14:21:28 2012 +0200
@@ -34,12 +34,14 @@
   public FIN_MatchedTransaction match(FIN_BankStatementLine line,
       List<FIN_FinaccTransaction> excluded) throws ServletException {
     List<FIN_FinaccTransaction> transactions = MatchTransactionDao.getMatchingFinancialTransaction(
-        line.getBankStatement().getAccount().getId(), line.getReferenceNo(),
-        (line.getCramount().subtract(line.getDramount())), line.getBpartnername(), excluded);
+        line.getBankStatement().getAccount().getId(), line.getTransactionDate(),
+        line.getReferenceNo(), (line.getCramount().subtract(line.getDramount())),
+        line.getBpartnername(), excluded);
     if (!transactions.isEmpty())
       return new FIN_MatchedTransaction(transactions.get(0), FIN_MatchedTransaction.STRONG);
     transactions = MatchTransactionDao.getMatchingFinancialTransaction(line.getBankStatement()
-        .getAccount().getId(), line.getCramount().subtract(line.getDramount()), excluded);
+        .getAccount().getId(), line.getTransactionDate(),
+        line.getCramount().subtract(line.getDramount()), excluded);
     if (!transactions.isEmpty())
       return new FIN_MatchedTransaction(transactions.get(0), FIN_MatchedTransaction.WEAK);