public static function getAmount($category=null, $type=null, $referenceid=null, $uid=null)
	{
		$model = self::all()
			->select('amount');

		if ($category)
		{
			$model->whereEquals('category', $category);
		}

		if ($type)
		{
			$model->whereEquals('type', $type);
		}

		if ($referenceid)
		{
			$model->whereEquals('referenceid', $referenceid);
		}

		if ($uid)
		{
			$model->whereEquals('uid', $uid);
		}

		$row = $model->row();

		return $row->amount;
	}
public static function getAmount($category=null, $type=null, $referenceid=null, $uid=null)
	{
		$model = self::all()
			->select('amount');

		if ($category)
		{
			$model->whereEquals('category', $category);
		}

		if ($type)
		{
			$model->whereEquals('type', $type);
		}

		if ($referenceid)
		{
			$model->whereEquals('referenceid', $referenceid);
		}

		if ($uid)
		{
			$model->whereEquals('uid', $uid);
		}

		$row = $model->row();

		return $row->amount;
	}
public static function getAmount ( $ category = null , $ type = null , $ referenceid = null , $ uid = null ) { $ model = self :: all ( ) -> select ( 'amount' ) ; if ( $ category ) { $ model -> whereEquals ( 'category' , $ category ) ; } if ( $ type ) { $ model -> whereEquals ( 'type' , $ type ) ; } if ( $ referenceid ) { $ model -> whereEquals ( 'referenceid' , $ referenceid ) ; } if ( $ uid ) { $ model -> whereEquals ( 'uid' , $ uid ) ; } $ row = $ model -> row ( ) ; return $ row -> amount ; }
Get get the transaction amount for a category, type, reference item and, optionally, user

@param   string   $category     Transaction category (royalties, etc)
@param   string   $type         Transaction type (deposit, withdraw, etc)
@param   integer  $referenceid  Reference ID (resource ID, etc)
@param   integer  $uid          User ID
@return  integer
Get get the transaction amount for a category type reference item and optionally user