close #420 Fixed: Reports - Income Summary - Paid Tab - Not adding income categories

This commit is contained in:
cuneytsenturk
2018-07-19 14:54:23 +03:00
parent 5a4bed7e04
commit 4c497c3f60
5 changed files with 30 additions and 0 deletions

View File

@ -101,6 +101,12 @@ class IncomeSummary extends Controller
private function setAmount(&$graph, &$totals, &$incomes, $items, $type, $date_field)
{
foreach ($items as $item) {
if ($item['table'] == 'invoice_payments') {
$invoice = $item->invoice;
$item->category_id = $invoice->category_id;
}
$date = Date::parse($item->$date_field)->format('F');
if (!isset($incomes[$item->category_id])) {