mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Some code cleanup [skip ci]
This commit is contained in:
parent
78deb1420d
commit
446eaf6588
@ -311,20 +311,6 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
return $paginator;
|
return $paginator;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get all journals that were recorded on this bill between these dates.
|
|
||||||
*
|
|
||||||
* @param Bill $bill
|
|
||||||
* @param Carbon $start
|
|
||||||
* @param Carbon $end
|
|
||||||
*
|
|
||||||
* @return Collection
|
|
||||||
*/
|
|
||||||
public function getJournalsInRange(Bill $bill, Carbon $start, Carbon $end): Collection
|
|
||||||
{
|
|
||||||
return $bill->transactionJournals()->before($end)->after($start)->get();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Bill $bill
|
* @param Bill $bill
|
||||||
*
|
*
|
||||||
@ -466,21 +452,6 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
return $avg;
|
return $avg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Bill $bill
|
|
||||||
*
|
|
||||||
* @return \Carbon\Carbon
|
|
||||||
*/
|
|
||||||
public function lastFoundMatch(Bill $bill): Carbon
|
|
||||||
{
|
|
||||||
$last = $bill->transactionJournals()->orderBy('date', 'DESC')->first();
|
|
||||||
if ($last) {
|
|
||||||
return $last->date;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Carbon::now()->addDays(2); // in the future!
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a bill and a date, this method will tell you at which moment this bill expects its next
|
* Given a bill and a date, this method will tell you at which moment this bill expects its next
|
||||||
* transaction. Whether or not it is there already, is not relevant.
|
* transaction. Whether or not it is there already, is not relevant.
|
||||||
|
@ -113,17 +113,6 @@ interface BillRepositoryInterface
|
|||||||
*/
|
*/
|
||||||
public function getJournals(Bill $bill, int $page, int $pageSize = 50): LengthAwarePaginator;
|
public function getJournals(Bill $bill, int $page, int $pageSize = 50): LengthAwarePaginator;
|
||||||
|
|
||||||
/**
|
|
||||||
* Get all journals that were recorded on this bill between these dates.
|
|
||||||
*
|
|
||||||
* @param Bill $bill
|
|
||||||
* @param Carbon $start
|
|
||||||
* @param Carbon $end
|
|
||||||
*
|
|
||||||
* @return Collection
|
|
||||||
*/
|
|
||||||
public function getJournalsInRange(Bill $bill, Carbon $start, Carbon $end): Collection;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Bill $bill
|
* @param Bill $bill
|
||||||
*
|
*
|
||||||
@ -166,14 +155,6 @@ interface BillRepositoryInterface
|
|||||||
*/
|
*/
|
||||||
public function getYearAverage(Bill $bill, Carbon $date): string;
|
public function getYearAverage(Bill $bill, Carbon $date): string;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Bill $bill
|
|
||||||
*
|
|
||||||
* @return \Carbon\Carbon
|
|
||||||
*/
|
|
||||||
public function lastFoundMatch(Bill $bill): Carbon;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a bill and a date, this method will tell you at which moment this bill expects its next
|
* Given a bill and a date, this method will tell you at which moment this bill expects its next
|
||||||
* transaction. Whether or not it is there already, is not relevant.
|
* transaction. Whether or not it is there already, is not relevant.
|
||||||
|
@ -73,6 +73,7 @@ return [
|
|||||||
'field_supports_markdown' => 'This field supports <a href="https://en.support.wordpress.com/markdown-quick-reference/">Markdown</a>.',
|
'field_supports_markdown' => 'This field supports <a href="https://en.support.wordpress.com/markdown-quick-reference/">Markdown</a>.',
|
||||||
|
|
||||||
// repeat frequencies:
|
// repeat frequencies:
|
||||||
|
'repeat_freq_yearly' => 'yearly',
|
||||||
'repeat_freq_monthly' => 'monthly',
|
'repeat_freq_monthly' => 'monthly',
|
||||||
'weekly' => 'weekly',
|
'weekly' => 'weekly',
|
||||||
'quarterly' => 'quarterly',
|
'quarterly' => 'quarterly',
|
||||||
|
Loading…
Reference in New Issue
Block a user