/** * Counts all associated InventoryTransactions * @return int */ public function CountInventoryTransactions() { if (is_null($this->intInventoryLocationId)) { return 0; } return InventoryTransaction::CountByInventoryLocationId($this->intInventoryLocationId); }