2015-02-23 20:25:48 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace FireflyIII\Helpers\Report;
|
|
|
|
|
|
|
|
use Carbon\Carbon;
|
2015-02-23 21:19:16 +01:00
|
|
|
use FireflyIII\Models\Account;
|
2015-05-16 15:43:58 +02:00
|
|
|
use FireflyIII\Models\Budget;
|
2015-02-23 20:25:48 +01:00
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface ReportQueryInterface
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Helpers\Report
|
|
|
|
*/
|
|
|
|
interface ReportQueryInterface
|
|
|
|
{
|
|
|
|
|
2015-05-20 06:49:03 +02:00
|
|
|
/**
|
2015-05-22 15:05:32 +02:00
|
|
|
* See ReportQueryInterface::incomeInPeriodCorrected
|
|
|
|
*
|
2015-05-20 06:49:03 +02:00
|
|
|
* This method returns all "expense" journals in a certain period, which are both transfers to a shared account
|
|
|
|
* and "ordinary" withdrawals. The query used is almost equal to ReportQueryInterface::journalsByRevenueAccount but it does
|
|
|
|
* not group and returns different fields.
|
|
|
|
*
|
|
|
|
* @param Carbon $start
|
|
|
|
* @param Carbon $end
|
|
|
|
* @param bool $includeShared
|
|
|
|
*
|
|
|
|
* @return Collection
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public function expenseInPeriodCorrected(Carbon $start, Carbon $end, $includeShared = false);
|
|
|
|
|
2015-02-23 21:19:16 +01:00
|
|
|
/**
|
|
|
|
* Get a users accounts combined with various meta-data related to the start and end date.
|
|
|
|
*
|
|
|
|
* @param Carbon $start
|
|
|
|
* @param Carbon $end
|
2015-05-15 20:07:51 +02:00
|
|
|
* @param bool $includeShared
|
2015-03-10 19:51:24 +01:00
|
|
|
*
|
|
|
|
* @return Collection
|
|
|
|
*/
|
2015-05-15 20:07:51 +02:00
|
|
|
public function getAllAccounts(Carbon $start, Carbon $end, $includeShared = false);
|
2015-03-10 19:51:24 +01:00
|
|
|
|
2015-05-16 08:05:04 +02:00
|
|
|
/**
|
2015-05-20 06:49:03 +02:00
|
|
|
* This method works the same way as ReportQueryInterface::incomeInPeriod does, but instead of returning results
|
|
|
|
* will simply list the transaction journals only. This should allow any follow up counting to be accurate with
|
|
|
|
* regards to tags.
|
2015-05-16 08:05:04 +02:00
|
|
|
*
|
|
|
|
* @param Carbon $start
|
|
|
|
* @param Carbon $end
|
|
|
|
* @param bool $includeShared
|
|
|
|
*
|
|
|
|
* @return Collection
|
|
|
|
*/
|
2015-05-20 06:49:03 +02:00
|
|
|
public function incomeInPeriodCorrected(Carbon $start, Carbon $end, $includeShared = false);
|
2015-02-23 20:25:48 +01:00
|
|
|
|
2015-12-11 09:39:17 +01:00
|
|
|
/**
|
|
|
|
* This method works the same way as ReportQueryInterface::incomeInPeriod does, but instead of returning results
|
|
|
|
* will simply list the transaction journals only. This should allow any follow up counting to be accurate with
|
|
|
|
* regards to tags. It will only get the incomes to the specified accounts.
|
|
|
|
*
|
|
|
|
* @param Carbon $start
|
|
|
|
* @param Carbon $end
|
|
|
|
* @param Collection $accounts
|
|
|
|
*
|
|
|
|
* @return Collection
|
|
|
|
*/
|
|
|
|
public function incomeInPeriodCorrectedForList(Carbon $start, Carbon $end, Collection $accounts);
|
|
|
|
|
2015-05-20 07:07:46 +02:00
|
|
|
/**
|
|
|
|
* Covers tags as well.
|
|
|
|
*
|
|
|
|
* @param Account $account
|
|
|
|
* @param Budget $budget
|
|
|
|
* @param Carbon $start
|
|
|
|
* @param Carbon $end
|
|
|
|
*
|
|
|
|
* @return float
|
|
|
|
*/
|
|
|
|
public function spentInBudgetCorrected(Account $account, Budget $budget, Carbon $start, Carbon $end);
|
|
|
|
|
2015-05-16 16:47:52 +02:00
|
|
|
/**
|
|
|
|
* @param Account $account
|
|
|
|
* @param Carbon $start
|
|
|
|
* @param Carbon $end
|
|
|
|
*
|
2015-06-13 10:02:36 +02:00
|
|
|
* @return string
|
2015-05-16 16:47:52 +02:00
|
|
|
*/
|
2015-07-06 22:12:35 +02:00
|
|
|
public function spentNoBudget(Account $account, Carbon $start, Carbon $end);
|
2015-05-16 15:43:58 +02:00
|
|
|
|
2015-05-16 14:51:23 +02:00
|
|
|
|
2015-03-29 08:14:32 +02:00
|
|
|
}
|