JDBPalletHistory palhistfrom = new JDBPalletHistory(getHostID(), getSessionID());
JDBPalletHistory palhistto = new JDBPalletHistory(getHostID(), getSessionID());
JDBControl ctrl = new JDBControl(getHostID(), getSessionID());
String origin = ctrl.getKeyValue("DEFAULT_LOCATION");
JDBMHN mhn = new JDBMHN(getHostID(), getSessionID());
JDBMHNReasons mhnReasons = new JDBMHNReasons(getHostID(), getSessionID());
ResultSet rsFrom = palhistfrom.getInterfacingData(transactionRef, "STATUS CHANGE", "FROM", Long.valueOf(1), "SSCC", "asc");
ResultSet rsTo = palhistfrom.getInterfacingData(transactionRef, "STATUS CHANGE", "TO", Long.valueOf(1), "SSCC", "asc");
try
{
if (rsFrom.next())
{
if (rsTo.next())
{
palhistfrom.getPropertiesfromResultSet(rsFrom);
palhistto.getPropertiesfromResultSet(rsTo);
String mhnNumber = palhistto.getPallet().getMHNNumber();
String initiator = "";
String recorder = "";
String authorisor = "";
String decision = "";
String reason1 = "";
String reason2 = "";
String reason3 = "";
String dateCreated = "";
String dateExpected = "";
String dateResolved = "";
String comment = "";
String status = "";
String locn = "";
if (palhistto.getPallet().getMHNNumber().equals("") == false)
{
if (mhn.getMHNProperties(palhistto.getPallet().getMHNNumber()))
{
initiator = mhn.getInitiator();
recorder = mhn.getRecorder();
authorisor = mhn.getAuthorisor();
reason1 = mhn.getReason1();
reason2 = mhn.getReason2();
reason3 = mhn.getReason3();
dateCreated = JUtility.getISOTimeStampStringFormat(mhn.getDateCreated());
if (dateCreated.equals("Error"))
dateCreated = "";
dateExpected = JUtility.getISOTimeStampStringFormat(mhn.getDateExpected());
if (dateExpected.equals("Error"))
dateExpected = "";
dateResolved = JUtility.getISOTimeStampStringFormat(mhn.getDateResolved());
if (dateResolved.equals("Error"))
dateResolved = "";
comment = mhn.getComments();
status = mhn.getStatus();
}
}
try
{