BF [ 1770177 ] Inventory Move Locator Error

This commit is contained in:
teo_sarca 2008-02-23 07:57:58 +00:00
parent 7a2e14d6b2
commit 9bc4f7c580
2 changed files with 12 additions and 1 deletions

View File

@ -371,7 +371,7 @@ public class VPAttribute extends JComponent
{
m_text.setText(vad.getM_AttributeSetInstanceName());
M_AttributeSetInstance_ID = vad.getM_AttributeSetInstance_ID();
if (m_GridTab != null)
if (m_GridTab != null && !vad.isNew())
m_GridTab.setValue("M_Locator_ID", vad.getM_Locator_ID());
changed = true;
}

View File

@ -138,6 +138,8 @@ public class VPAttributeDialog extends CDialog
private boolean m_productWindow = false;
/** Change */
private boolean m_changed = false;
/** Was New ASI was created ? */
private boolean m_newASI = false;
private CLogger log = CLogger.getCLogger(getClass());
/** Row Counter */
@ -522,6 +524,7 @@ public class VPAttributeDialog extends CDialog
else if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL))
{
m_changed = false;
m_newASI = false;
m_M_AttributeSetInstance_ID = 0;
m_M_Locator_ID = 0;
dispose();
@ -702,6 +705,7 @@ public class VPAttributeDialog extends CDialog
m_masi.save ();
m_M_AttributeSetInstance_ID = m_masi.getM_AttributeSetInstance_ID ();
m_M_AttributeSetInstanceName = m_masi.getDescription();
m_newASI = true;
}
// Save Instance Attributes
@ -792,6 +796,13 @@ public class VPAttributeDialog extends CDialog
return m_changed;
} // isChanged
/**
* @return true if new ASI was created
*/
public boolean isNew() {
return m_newASI;
}
} // VPAttributeDialog
/*****************************************************************************