mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-08-13 06:24:43 -05:00
Added some (yet without function) information icons. [skip ci] [skip Scrutinizer]
This commit is contained in:
@@ -27,6 +27,9 @@ class BillLine
|
||||
/** @var string */
|
||||
protected $min;
|
||||
|
||||
/** @var int */
|
||||
private $transactionJournalId;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
@@ -91,6 +94,22 @@ class BillLine
|
||||
$this->min = $min;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getTransactionJournalId(): int
|
||||
{
|
||||
return $this->transactionJournalId ?? 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $transactionJournalId
|
||||
*/
|
||||
public function setTransactionJournalId(int $transactionJournalId)
|
||||
{
|
||||
$this->transactionJournalId = $transactionJournalId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
|
||||
@@ -80,11 +80,13 @@ class ReportHelper implements ReportHelperInterface
|
||||
|
||||
$entry = $journals->filter(
|
||||
function (TransactionJournal $journal) use ($bill) {
|
||||
return $journal->bill_id == $bill->id;
|
||||
return $journal->bill_id === $bill->id;
|
||||
}
|
||||
);
|
||||
if (!is_null($entry->first())) {
|
||||
$billLine->setAmount($entry->first()->journalAmount);
|
||||
$first = $entry->first();
|
||||
if (!is_null($first)) {
|
||||
$billLine->setTransactionJournalId($first->id);
|
||||
$billLine->setAmount($first->journalAmount);
|
||||
$billLine->setHit(true);
|
||||
} else {
|
||||
$billLine->setHit(false);
|
||||
@@ -93,7 +95,6 @@ class ReportHelper implements ReportHelperInterface
|
||||
$collection->addBill($billLine);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return $collection;
|
||||
|
||||
@@ -82,6 +82,7 @@ class BillRepository implements BillRepositoryInterface
|
||||
->get(
|
||||
[
|
||||
'transaction_journals.bill_id',
|
||||
'transaction_journals.id',
|
||||
DB::Raw('SUM(`transactions`.`amount`) as `journalAmount`'),
|
||||
]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user