Merge b22b9a788cd1

This commit is contained in:
Heng Sin Low 2013-08-01 21:48:13 +08:00
commit 62dcd54f19
3 changed files with 27 additions and 9 deletions

View File

@ -40,7 +40,7 @@ public class MRegistration extends X_A_Registration
/** /**
* *
*/ */
private static final long serialVersionUID = -5178339895228217372L; private static final long serialVersionUID = -2301393326847864746L;
/** /**
* Standard Constructor * Standard Constructor
@ -91,7 +91,7 @@ public class MRegistration extends X_A_Registration
* Get All Attributes * Get All Attributes
* @return Registration Attributes * @return Registration Attributes
*/ */
public MRegistrationAttribute[] getAttributes() public MRegistrationAttribute[] getRegistrationAttributes()
{ {
if (m_allAttributes == null) if (m_allAttributes == null)
m_allAttributes = MRegistrationAttribute.getAll(getCtx()); m_allAttributes = MRegistrationAttribute.getAll(getCtx());
@ -201,7 +201,7 @@ public class MRegistration extends X_A_Registration
saveEx(); saveEx();
int count = 0; int count = 0;
// read values for all attributes // read values for all attributes
MRegistrationAttribute[] attributes = getAttributes(); MRegistrationAttribute[] attributes = getRegistrationAttributes();
for (int i = 0; i < attributes.length; i++) for (int i = 0; i < attributes.length; i++)
{ {
MRegistrationAttribute attribute = attributes[i]; MRegistrationAttribute attribute = attributes[i];

View File

@ -319,7 +319,7 @@ public class MShippingTransaction extends X_M_ShippingTransaction
/* StringBuilder sql = new StringBuilder(); /* StringBuilder sql = new StringBuilder();
sql.append("SELECT CompanyName, ContactName, PhoneNumber, EMail, C_Location_ID "); sql.append("SELECT CompanyName, ContactName, PhoneNumber, EMail, C_Location_ID ");
sql.append("FROM X_ShippingSenderInfo_V "); sql.append("FROM M_ShippingSenderInfo_V ");
sql.append("WHERE M_ShippingTransaction_ID = ?"); sql.append("WHERE M_ShippingTransaction_ID = ?");
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
@ -355,8 +355,8 @@ public class MShippingTransaction extends X_M_ShippingTransaction
MWarehouse warehouse = new MWarehouse(getCtx(), getM_Warehouse_ID(), get_TrxName()); MWarehouse warehouse = new MWarehouse(getCtx(), getM_Warehouse_ID(), get_TrxName());
partyInfo = new PartyInfo(); partyInfo = new PartyInfo();
partyInfo.setCompanyName(sender.getDescription()); partyInfo.setCompanyName(sender.getName());
partyInfo.setContactName(senderContact.getDescription()); partyInfo.setContactName(senderContact.getName());
partyInfo.setPhoneNumber(sender.getInfo().getPhone()); partyInfo.setPhoneNumber(sender.getInfo().getPhone());
partyInfo.setEmail(senderContact.getEMail()); partyInfo.setEmail(senderContact.getEMail());
partyInfo.setLocationId(warehouse.getC_Location_ID()); partyInfo.setLocationId(warehouse.getC_Location_ID());
@ -376,7 +376,7 @@ public class MShippingTransaction extends X_M_ShippingTransaction
/* StringBuilder sql = new StringBuilder(); /* StringBuilder sql = new StringBuilder();
sql.append("SELECT CompanyName, ContactName, PhoneNumber, EMail, C_Location_ID "); sql.append("SELECT CompanyName, ContactName, PhoneNumber, EMail, C_Location_ID ");
sql.append("FROM X_ShippingRecipientInfo_V "); sql.append("FROM M_ShippingRecipientInfo_V ");
sql.append("WHERE M_ShippingTransaction_ID = ?"); sql.append("WHERE M_ShippingTransaction_ID = ?");
PreparedStatement pstmt = null; PreparedStatement pstmt = null;

View File

@ -105,7 +105,7 @@ public abstract class PO
/** /**
* *
*/ */
private static final long serialVersionUID = 8742545079591136114L; private static final long serialVersionUID = -341748204028700040L;
public static final String LOCAL_TRX_PREFIX = "POSave"; public static final String LOCAL_TRX_PREFIX = "POSave";
@ -251,7 +251,9 @@ public abstract class PO
private int m_idOld = 0; private int m_idOld = 0;
/** Custom Columns */ /** Custom Columns */
private HashMap<String,String> m_custom = null; private HashMap<String,String> m_custom = null;
/** Attributes */
private HashMap<String,Object> m_attributes = null;
/** Zero Integer */ /** Zero Integer */
protected static final Integer I_ZERO = new Integer(0); protected static final Integer I_ZERO = new Integer(0);
/** Accounting Columns */ /** Accounting Columns */
@ -4515,4 +4517,20 @@ public abstract class PO
ois.defaultReadObject(); ois.defaultReadObject();
log = CLogger.getCLogger(getClass()); log = CLogger.getCLogger(getClass());
} }
public void setAttribute(String columnName, Object value) {
if (m_attributes == null)
m_attributes = new HashMap<String, Object>();
m_attributes.put(columnName, value);
}
public Object getAttribute(String columnName) {
if (m_attributes != null)
return m_attributes.get(columnName);
return null;
}
public HashMap<String,Object> getAttributes() {
return m_attributes;
}
} // PO } // PO