mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Remove dead code.
This commit is contained in:
@@ -40,10 +40,6 @@ class BalanceLine
|
||||
*
|
||||
*/
|
||||
public const ROLE_TAGROLE = 2;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public const ROLE_DIFFROLE = 3;
|
||||
|
||||
/** @var Collection */
|
||||
protected $balanceEntries;
|
||||
@@ -167,9 +163,6 @@ class BalanceLine
|
||||
if (self::ROLE_TAGROLE === $this->getRole()) {
|
||||
return (string)trans('firefly.coveredWithTags');
|
||||
}
|
||||
if (self::ROLE_DIFFROLE === $this->getRole()) {
|
||||
return (string)trans('firefly.leftUnbalanced');
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
@@ -36,33 +36,6 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class PopupReport implements PopupReportInterface
|
||||
{
|
||||
/**
|
||||
* @param $account
|
||||
* @param $attributes
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function balanceDifference($account, $attributes): Collection
|
||||
{
|
||||
// row that displays difference
|
||||
/** @var JournalCollectorInterface $collector */
|
||||
$collector = app(JournalCollectorInterface::class);
|
||||
$collector
|
||||
->setAccounts(new Collection([$account]))
|
||||
->setTypes([TransactionType::WITHDRAWAL])
|
||||
->setRange($attributes['startDate'], $attributes['endDate'])
|
||||
->withoutBudget();
|
||||
$journals = $collector->getJournals();
|
||||
|
||||
return $journals->filter(
|
||||
function (Transaction $transaction) {
|
||||
$tags = $transaction->transactionJournal->tags()->where('tagMode', 'balancingAct')->count();
|
||||
|
||||
return 0 === $tags;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Budget $budget
|
||||
* @param Account $account
|
||||
|
@@ -32,14 +32,6 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
interface PopupReportInterface
|
||||
{
|
||||
/**
|
||||
* @param $account
|
||||
* @param $attributes
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function balanceDifference($account, $attributes): Collection;
|
||||
|
||||
/**
|
||||
* @param Budget $budget
|
||||
* @param Account $account
|
||||
|
Reference in New Issue
Block a user