2015-02-23 13:25:48 -06:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace FireflyIII\Helpers\Report;
|
|
|
|
|
|
|
|
use Carbon\Carbon;
|
2015-02-23 14:19:16 -06:00
|
|
|
use FireflyIII\Models\Account;
|
2015-05-16 08:43:58 -05:00
|
|
|
use FireflyIII\Models\Budget;
|
2015-02-23 13:25:48 -06:00
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface ReportQueryInterface
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Helpers\Report
|
|
|
|
*/
|
|
|
|
interface ReportQueryInterface
|
|
|
|
{
|
|
|
|
|
2015-12-11 09:36:40 -06:00
|
|
|
/**
|
2016-01-01 04:32:08 -06:00
|
|
|
* This method returns all the "in" transaction journals for the given account and given period. The amount
|
|
|
|
* is stored in "journalAmount".
|
2015-12-11 09:36:40 -06:00
|
|
|
*
|
2016-01-01 04:32:08 -06:00
|
|
|
* @param Collection $accounts
|
2015-12-18 09:38:50 -06:00
|
|
|
* @param Carbon $start
|
|
|
|
* @param Carbon $end
|
2015-12-11 09:36:40 -06:00
|
|
|
*
|
|
|
|
* @return Collection
|
|
|
|
*/
|
2016-01-01 04:32:08 -06:00
|
|
|
public function income(Collection $accounts, Carbon $start, Carbon $end);
|
2015-12-11 09:36:40 -06:00
|
|
|
|
2016-01-01 04:32:08 -06:00
|
|
|
/**
|
|
|
|
* This method returns all the "out" transaction journals for the given account and given period. The amount
|
|
|
|
* is stored in "journalAmount".
|
|
|
|
*
|
|
|
|
* @param Collection $accounts
|
|
|
|
* @param Carbon $start
|
|
|
|
* @param Carbon $end
|
|
|
|
*
|
|
|
|
* @return Collection
|
|
|
|
*/
|
|
|
|
public function expense(Collection $accounts, Carbon $start, Carbon $end);
|
2015-12-11 02:39:17 -06:00
|
|
|
|
2015-05-20 00:07:46 -05:00
|
|
|
/**
|
|
|
|
* Covers tags as well.
|
|
|
|
*
|
|
|
|
* @param Account $account
|
|
|
|
* @param Budget $budget
|
|
|
|
* @param Carbon $start
|
|
|
|
* @param Carbon $end
|
|
|
|
*
|
|
|
|
* @return float
|
|
|
|
*/
|
2015-12-13 02:41:22 -06:00
|
|
|
public function spentInBudget(Account $account, Budget $budget, Carbon $start, Carbon $end);
|
2015-05-20 00:07:46 -05:00
|
|
|
|
2015-05-16 09:47:52 -05:00
|
|
|
/**
|
|
|
|
* @param Account $account
|
|
|
|
* @param Carbon $start
|
|
|
|
* @param Carbon $end
|
|
|
|
*
|
2015-06-13 03:02:36 -05:00
|
|
|
* @return string
|
2015-05-16 09:47:52 -05:00
|
|
|
*/
|
2015-07-06 15:12:35 -05:00
|
|
|
public function spentNoBudget(Account $account, Carbon $start, Carbon $end);
|
2015-05-16 08:43:58 -05:00
|
|
|
|
2015-12-31 01:26:04 -06:00
|
|
|
/**
|
|
|
|
* Returns an array of the amount of money spent in the given accounts (on withdrawals, opening balances and transfers)
|
|
|
|
* grouped by month like so: "2015-01" => '123.45'
|
|
|
|
*
|
|
|
|
* @param Collection $accounts
|
2016-01-01 05:41:00 -06:00
|
|
|
* @param Carbon $start
|
|
|
|
* @param Carbon $end
|
2015-12-31 01:26:04 -06:00
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function spentPerMonth(Collection $accounts, Carbon $start, Carbon $end);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns an array of the amount of money spent in the given accounts (on withdrawals, opening balances and transfers)
|
|
|
|
* grouped by month like so: "2015-01" => '123.45'
|
|
|
|
*
|
|
|
|
* @param Collection $accounts
|
2016-01-01 05:41:00 -06:00
|
|
|
* @param Carbon $start
|
|
|
|
* @param Carbon $end
|
2015-12-31 01:26:04 -06:00
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function earnedPerMonth(Collection $accounts, Carbon $start, Carbon $end);
|
|
|
|
|
2015-05-16 07:51:23 -05:00
|
|
|
|
2015-03-29 01:14:32 -05:00
|
|
|
}
|