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);
}
}
else if (event.getName().equals(Events.ON_CHANGE))
{
}
//default
else
{
@ -1109,9 +1112,11 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
}
private void hideBusyDialog() {
if (progressWindow != null) {
progressWindow.dispose();
progressWindow = null;
}
}
public void onQueryCallback()
{

View File

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