protected function updateWithLastInfo()
{
if ($this->OrderID) {
if ($latestLog = OrderStatusLog::get()->filter('OrderID', $this->OrderID)->sort('Created', 'DESC')->first()) {
$this->DispatchedBy = $latestLog->DispatchedBy;
$this->DispatchedOn = $latestLog->DispatchedOn;
$this->DispatchTicket = $latestLog->DispatchTicket;
$this->PaymentCode = $latestLog->PaymentCode;
$this->PaymentOK = $latestLog->PaymentOK;
}
}
}