/** * Counts all associated InventoryTransactionsAsSource * @return int */ public function CountInventoryTransactionsAsSource() { if (is_null($this->intLocationId)) { return 0; } return InventoryTransaction::CountBySourceLocationId($this->intLocationId); }