Merged release-1.0c into release-2.0

This commit is contained in:
Elaine Tan 2013-12-20 19:52:07 +08:00
commit c1e857b4b8
3 changed files with 32 additions and 4 deletions

View File

@ -139,6 +139,19 @@ public class Doc_MatchPO extends Doc
return facts; 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 if (m_M_InOutLine_ID == 0) // No posting if not matched to Shipment
{ {
p_Error = "No posting if not matched to Shipment"; p_Error = "No posting if not matched to Shipment";

View File

@ -2965,6 +2965,11 @@ public class GridTable extends AbstractTableModel
m_changed = false; m_changed = false;
m_rowChanged = -1; m_rowChanged = -1;
m_inserting = false; m_inserting = false;
if (m_lastSortColumnIndex >= 0)
{
loadComplete();
sort(m_lastSortColumnIndex, m_lastSortedAscending);
}
if (fireEvents) { if (fireEvents) {
fireTableDataChanged(); fireTableDataChanged();
fireDataStatusIEvent(DATA_REFRESH_MESSAGE, ""); fireDataStatusIEvent(DATA_REFRESH_MESSAGE, "");

View File

@ -123,7 +123,7 @@ public class DunningPrint extends SvrProcess
int count = 0; int count = 0;
int errors = 0; int errors = 0;
MDunningRunEntry[] entries = run.getEntries(false); MDunningRunEntry[] entries = run.getEntries(false);
List<File> pdfList = new ArrayList<File>(); final List<File> pdfList = new ArrayList<File>();
for (int i = 0; i < entries.length; i++) for (int i = 0; i < entries.length; i++)
{ {
MDunningRunEntry entry = entries[i]; MDunningRunEntry entry = entries[i];
@ -258,6 +258,18 @@ public class DunningPrint extends SvrProcess
return msgreturn.toString(); 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<File> pdfList) {
if (pdfList.size() > 1) { if (pdfList.size() > 1) {
try { try {
File outFile = File.createTempFile("DunningPrint", ".pdf"); File outFile = File.createTempFile("DunningPrint", ".pdf");
@ -278,8 +290,6 @@ public class DunningPrint extends SvrProcess
log.log(Level.SEVERE, e.getLocalizedMessage(), e); log.log(Level.SEVERE, e.getLocalizedMessage(), e);
} }
} }
StringBuilder msgreturn = new StringBuilder("@Printed@=").append(count); }
return msgreturn.toString();
} // doIt
} // DunningPrint } // DunningPrint