Merge Invoice and Bill into Document
This commit is contained in:
@@ -12,7 +12,7 @@ use App\Events\Report\RowsShowing;
|
||||
use App\Exports\Common\Reports as Export;
|
||||
use App\Models\Banking\Transaction;
|
||||
use App\Models\Common\Report as Model;
|
||||
use App\Models\Sale\Invoice;
|
||||
use App\Models\Document\Document;
|
||||
use App\Traits\Charts;
|
||||
use App\Traits\DateTime;
|
||||
use App\Utilities\Chartjs;
|
||||
@@ -355,7 +355,7 @@ abstract class Report
|
||||
|
||||
$amount = $item->getAmountConvertedToDefault(false, $with_tax);
|
||||
|
||||
$type = (($item instanceof Invoice) || (($item instanceof Transaction) && ($item->type == 'income'))) ? 'income' : 'expense';
|
||||
$type = ($item->type === Document::INVOICE_TYPE || $item->type === 'income') ? 'income' : 'expense';
|
||||
|
||||
if (($check_type == false) || ($type == 'income')) {
|
||||
$this->row_values[$table][$item->$id_field][$date] += $amount;
|
||||
|
||||
Reference in New Issue
Block a user