From c218175559186ecc0767583e88b464d359d3bab6 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 20 Dec 2013 17:08:19 +0800 Subject: [PATCH 1/3] 1003646 Print Dunning Letter - Null Pointer Exception. --- .../adempiere/webui/process/DunningPrint.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/DunningPrint.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/DunningPrint.java index 27a8080009..df2cc725a2 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/DunningPrint.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/DunningPrint.java @@ -123,7 +123,7 @@ public class DunningPrint extends SvrProcess int count = 0; int errors = 0; MDunningRunEntry[] entries = run.getEntries(false); - List pdfList = new ArrayList(); + final List pdfList = new ArrayList(); for (int i = 0; i < entries.length; i++) { MDunningRunEntry entry = entries[i]; @@ -258,6 +258,18 @@ public class DunningPrint extends SvrProcess return msgreturn.toString(); } + AEnv.executeAsyncDesktopTask(new Runnable() { + @Override + public void run() { + showReports(pdfList); + } + }); + + StringBuilder msgreturn = new StringBuilder("@Printed@=").append(count); + return msgreturn.toString(); + } // doIt + + private void showReports(List pdfList) { if (pdfList.size() > 1) { try { File outFile = File.createTempFile("DunningPrint", ".pdf"); @@ -278,8 +290,6 @@ public class DunningPrint extends SvrProcess log.log(Level.SEVERE, e.getLocalizedMessage(), e); } } - StringBuilder msgreturn = new StringBuilder("@Printed@=").append(count); - return msgreturn.toString(); - } // doIt + } } // DunningPrint From fe8d50e213b20b9c2fe08f16d4c26ce849a6f559 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 20 Dec 2013 17:56:52 +0800 Subject: [PATCH 2/3] 1003581 IDEMPIERE-1584 -- Custom sort order is lost when updating a record. Fixed retain sort order for detail tabs. --- org.adempiere.base/src/org/compiere/model/GridTable.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/org.adempiere.base/src/org/compiere/model/GridTable.java b/org.adempiere.base/src/org/compiere/model/GridTable.java index 2cbe2efa1b..f673bfcaa7 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTable.java +++ b/org.adempiere.base/src/org/compiere/model/GridTable.java @@ -2965,6 +2965,11 @@ public class GridTable extends AbstractTableModel m_changed = false; m_rowChanged = -1; m_inserting = false; + if (m_lastSortColumnIndex >= 0) + { + loadComplete(); + sort(m_lastSortColumnIndex, m_lastSortedAscending); + } if (fireEvents) { fireTableDataChanged(); fireDataStatusIEvent(DATA_REFRESH_MESSAGE, ""); From 149316e79e28bf07d55ac02c0c95478f976be6b1 Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Fri, 20 Dec 2013 18:38:21 +0800 Subject: [PATCH 3/3] IDEMPIERE-1632 When match 1 receipt linked 1 PO with two invoice. 2 new matchPO is create with error post --- .../src/org/compiere/acct/Doc_MatchPO.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java b/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java index 536124971a..ebbad798fd 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java @@ -134,6 +134,19 @@ public class Doc_MatchPO extends Doc return facts; } + if (m_M_InOutLine_ID == 0) + { + MMatchPO[] matchPOs = MMatchPO.getOrderLine(getCtx(), m_oLine.getC_OrderLine_ID(), getTrxName()); + for (MMatchPO matchPO : matchPOs) + { + if (matchPO.getM_InOutLine_ID() > 0 && matchPO.getC_InvoiceLine_ID() == 0) + { + m_M_InOutLine_ID = matchPO.getM_InOutLine_ID(); + break; + } + } + } + if (m_M_InOutLine_ID == 0) // No posting if not matched to Shipment { p_Error = "No posting if not matched to Shipment";