mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 18:44:16 +00: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 */
|
/** @var string */
|
||||||
protected $min;
|
protected $min;
|
||||||
|
|
||||||
|
/** @var int */
|
||||||
|
private $transactionJournalId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -91,6 +94,22 @@ class BillLine
|
|||||||
$this->min = $min;
|
$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
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
|
@@ -80,11 +80,13 @@ class ReportHelper implements ReportHelperInterface
|
|||||||
|
|
||||||
$entry = $journals->filter(
|
$entry = $journals->filter(
|
||||||
function (TransactionJournal $journal) use ($bill) {
|
function (TransactionJournal $journal) use ($bill) {
|
||||||
return $journal->bill_id == $bill->id;
|
return $journal->bill_id === $bill->id;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (!is_null($entry->first())) {
|
$first = $entry->first();
|
||||||
$billLine->setAmount($entry->first()->journalAmount);
|
if (!is_null($first)) {
|
||||||
|
$billLine->setTransactionJournalId($first->id);
|
||||||
|
$billLine->setAmount($first->journalAmount);
|
||||||
$billLine->setHit(true);
|
$billLine->setHit(true);
|
||||||
} else {
|
} else {
|
||||||
$billLine->setHit(false);
|
$billLine->setHit(false);
|
||||||
@@ -93,7 +95,6 @@ class ReportHelper implements ReportHelperInterface
|
|||||||
$collection->addBill($billLine);
|
$collection->addBill($billLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $collection;
|
return $collection;
|
||||||
|
@@ -82,6 +82,7 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
->get(
|
->get(
|
||||||
[
|
[
|
||||||
'transaction_journals.bill_id',
|
'transaction_journals.bill_id',
|
||||||
|
'transaction_journals.id',
|
||||||
DB::Raw('SUM(`transactions`.`amount`) as `journalAmount`'),
|
DB::Raw('SUM(`transactions`.`amount`) as `journalAmount`'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if balanceEntry.getSpent != 0 %}
|
{% if balanceEntry.getSpent != 0 %}
|
||||||
<span class="text-danger">{{ (balanceEntry.getSpent)|formatAmountPlain }}</span>
|
<span class="text-danger">{{ (balanceEntry.getSpent)|formatAmountPlain }}</span>
|
||||||
|
<i class="fa fa-fw text-muted fa-info-circle"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if balanceEntry.getLeft != 0 %}
|
{% if balanceEntry.getLeft != 0 %}
|
||||||
<span class="text-success">{{ (balanceEntry.getLeft)|formatAmountPlain }}</span>
|
<span class="text-success">{{ (balanceEntry.getLeft)|formatAmountPlain }}</span>
|
||||||
|
@@ -15,33 +15,30 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for line in bills.getBills %}
|
{% for line in bills.getBills %}
|
||||||
{% if not line.isActive %}
|
<tr>
|
||||||
<tr class="text-muted">
|
<td data-value="{{ line.getBill.name }}">
|
||||||
{% else %}
|
<a href="{{ route('bills.show',line.getBill.id) }}">{{ line.getBill.name }}</a>
|
||||||
<tr>
|
</td>
|
||||||
{% endif %}
|
<td data-value="{{ line.getMin }}">{{ line.getMin|formatAmount }}</td>
|
||||||
<td data-value="{{ line.getBill.name }}">
|
<td data-value="{{ line.getMax }}">{{ line.getMax|formatAmount }}</td>
|
||||||
<a href="{{ route('bills.show',line.getBill.id) }}">{{ line.getBill.name }}</a>
|
{% if line.isHit %}
|
||||||
|
<td data-value="{{ line.getAmount }}">
|
||||||
|
<a href="{{ route('transactions.show', line.getTransactionJournalId) }}">
|
||||||
|
{{ line.getAmount|formatAmount }}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
{% if not line.isHit and line.isActive %}
|
||||||
|
<td data-value="0" class="bg-success">{{ 'notCharged'|_ }}</td>
|
||||||
|
{% endif %}
|
||||||
{% if not line.isActive %}
|
{% if not line.isActive %}
|
||||||
({{ 'inactive'|_|lower }})
|
<td data-value="-1"> </td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
<td data-value="{{ (line.getMax - line.getAmount) }}">
|
||||||
<td data-value="{{ line.getMin }}">{{ line.getMin|formatAmount }}</td>
|
{% if line.isActive %}
|
||||||
<td data-value="{{ line.getMax }}">{{ line.getMax|formatAmount }}</td>
|
{{ (line.getMax + line.getAmount)|formatAmount }}
|
||||||
{% if line.isHit %}
|
{% endif %}
|
||||||
<td data-value="{{ line.getAmount }}">{{ line.getAmount|formatAmount }}</td>
|
</td>
|
||||||
{% endif %}
|
|
||||||
{% if not line.isHit and line.isActive %}
|
|
||||||
<td data-value="0" class="bg-success">{{ 'notCharged'|_ }}</td>
|
|
||||||
{% endif %}
|
|
||||||
{% if not line.isActive %}
|
|
||||||
<td data-value="-1"> </td>
|
|
||||||
{% endif %}
|
|
||||||
<td data-value="{{ (line.getMax - line.getAmount) }}">
|
|
||||||
{% if line.isActive %}
|
|
||||||
{{ (line.getMax + line.getAmount)|formatAmount }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@@ -39,12 +39,13 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% if budgetLine.getSpent != 0 %}
|
{% if budgetLine.getSpent != 0 %}
|
||||||
{{ budgetLine.getSpent|formatAmount }}
|
{{ budgetLine.getSpent|formatAmount }} <i class="fa fa-fw text-muted fa-info-circle"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if budgetLine.getSpent == 0 %}
|
{% if budgetLine.getSpent == 0 %}
|
||||||
{{ budgetLine.getSpent|formatAmount }}
|
{{ budgetLine.getSpent|formatAmount }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% if(budgetLine.getOverspent == 0) %}
|
{% if(budgetLine.getOverspent == 0) %}
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{ 'categories'|_ }}</th>
|
<th>{{ 'categories'|_ }}</th>
|
||||||
<th>{{ 'spent'|_ }}</th>
|
<th colspan="2">{{ 'spent'|_ }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -17,6 +17,9 @@
|
|||||||
<a href="{{ route('categories.show',cat.id) }}">{{ cat.name }}</a>
|
<a href="{{ route('categories.show',cat.id) }}">{{ cat.name }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ cat.spent|formatAmount }}</td>
|
<td>{{ cat.spent|formatAmount }}</td>
|
||||||
|
<td style="width:20px;">
|
||||||
|
<i class="fa fa-fw fa-info-circle text-muted"></i>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@@ -15,7 +15,10 @@
|
|||||||
<a href="{{ route('accounts.show',expense.id) }}">{{ expense.name }}</a>
|
<a href="{{ route('accounts.show',expense.id) }}">{{ expense.name }}</a>
|
||||||
{% if expense.count > 1 %}
|
{% if expense.count > 1 %}
|
||||||
<br/>
|
<br/>
|
||||||
<small>{{ expense.count }} {{ 'transactions'|_|lower }}</small>
|
<small>
|
||||||
|
{{ expense.count }} {{ 'transactions'|_|lower }}
|
||||||
|
<i class="fa fa-fw text-muted fa-info-circle"></i>
|
||||||
|
</small>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ (expense.amount)|formatAmount }}</td>
|
<td>{{ (expense.amount)|formatAmount }}</td>
|
||||||
|
Reference in New Issue
Block a user