IDEMPIERE-1268 Payment Allocation is getting deleted from completed Payment record.

This commit is contained in:
Heng Sin Low 2013-08-13 22:47:06 +08:00
parent 744329b375
commit d06505315c
1 changed files with 3 additions and 2 deletions

View File

@ -1389,6 +1389,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
boolean changed = e.isChanged() || e.isInserting(); boolean changed = e.isChanged() || e.isInserting();
boolean readOnly = adTabbox.getSelectedGridTab().isReadOnly(); boolean readOnly = adTabbox.getSelectedGridTab().isReadOnly();
boolean processed = "Y".equals(Env.getContext(Env.getCtx(), getWindowNo(), "Processed", true));
boolean insertRecord = !readOnly; boolean insertRecord = !readOnly;
if (!detailTab) if (!detailTab)
{ {
@ -1401,7 +1402,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
} }
toolbar.enableNew(!changed && insertRecord && !tabPanel.getGridTab().isSortTab()); toolbar.enableNew(!changed && insertRecord && !tabPanel.getGridTab().isSortTab());
toolbar.enableRefresh(!changed); toolbar.enableRefresh(!changed);
toolbar.enableDelete(!changed && !readOnly && !tabPanel.getGridTab().isSortTab()); toolbar.enableDelete(!changed && !readOnly && !tabPanel.getGridTab().isSortTab() && !processed);
// //
if (readOnly && adTabbox.getSelectedGridTab().isAlwaysUpdateField()) if (readOnly && adTabbox.getSelectedGridTab().isAlwaysUpdateField())
{ {
@ -1410,7 +1411,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
} }
else else
{ {
adTabbox.updateDetailPaneToolbar(changed, readOnly); adTabbox.updateDetailPaneToolbar(changed, readOnly || processed);
} }
toolbar.enableIgnore(adTabbox.needSave(true, false) || toolbar.enableIgnore(adTabbox.needSave(true, false) ||
adTabbox.getSelectedGridTab().isNew() || adTabbox.getSelectedGridTab().isNew() ||