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;
	}