/** * Returns an Account object the created the most recent transaction for this inventory model * * @return Object Account */ public function GetLastTransactionUser() { $objExpansionMap[InventoryTransaction::ExpandTransaction][Transaction::ExpandCreatedByObject] = true; $strOrderBy = 'inventory_transaction__transaction_id__creation_date DESC'; $strLimit = '0,1'; $InventoryTransactionArray = InventoryTransaction::LoadArrayByInventoryModelId($this->InventoryModelId, $strOrderBy, $strLimit, $objExpansionMap); $Account = $InventoryTransactionArray[0]->Transaction->CreatedByObject; return $Account; }