IDEMPIERE-421 NPE - Payment Info

This commit is contained in:
Carlos Ruiz 2012-10-12 17:17:09 -05:00
parent b04008451d
commit e565badf79
2 changed files with 28 additions and 11 deletions

View File

@ -1093,6 +1093,9 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
contentPanel.setSelectedIndex(0); contentPanel.setSelectedIndex(0);
} }
} }
else if (event.getName().equals(Events.ON_CHANGE))
{
}
//default //default
else else
{ {
@ -1108,9 +1111,11 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
progressWindow.doHighlighted(); progressWindow.doHighlighted();
} }
private void hideBusyDialog() { private void hideBusyDialog() {
progressWindow.dispose(); if (progressWindow != null) {
progressWindow = null; progressWindow.dispose();
progressWindow = null;
}
} }
public void onQueryCallback() public void onQueryCallback()

View File

@ -311,11 +311,17 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
if (fDateFrom.getValue() != null || fDateTo.getValue() != null) if (fDateFrom.getValue() != null || fDateTo.getValue() != null)
{ {
Date f = fDateFrom.getValue(); Timestamp from = null;
Timestamp from = new Timestamp(f.getTime()); if (fDateFrom.getValue() != null) {
Date f = fDateFrom.getValue();
from = new Timestamp(f.getTime());
}
Date t = fDateTo.getValue(); Timestamp to = null;
Timestamp to = new Timestamp(t.getTime()); if (fDateTo.getValue() != null) {
Date t = fDateTo.getValue();
to = new Timestamp(t.getTime());
}
if (from == null && to != null) if (from == null && to != null)
sql.append(" AND TRUNC(p.DateTrx) <= ?"); sql.append(" AND TRUNC(p.DateTrx) <= ?");
@ -368,11 +374,17 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
if (fDateFrom.getValue() != null || fDateTo.getValue() != null) if (fDateFrom.getValue() != null || fDateTo.getValue() != null)
{ {
Date f = fDateFrom.getValue(); Timestamp from = null;
Timestamp from = new Timestamp(f.getTime()); if (fDateFrom.getValue() != null) {
Date f = fDateFrom.getValue();
from = new Timestamp(f.getTime());
}
Date t = fDateTo.getValue(); Timestamp to = null;
Timestamp to = new Timestamp(t.getTime()); if (fDateTo.getValue() != null) {
Date t = fDateTo.getValue();
to = new Timestamp(t.getTime());
}
log.fine("Date From=" + from + ", To=" + to); log.fine("Date From=" + from + ", To=" + to);