added total unpaid amount to unpaid admin mining tax report
This commit is contained in:
@@ -45,7 +45,16 @@ class MiningTaxesAdminController extends Controller
|
||||
'status' => 'Deferred',
|
||||
])->paginate(50);
|
||||
|
||||
return view('miningtax.admin.display.unpaid')->with('invoices', $invoices);
|
||||
$totalAmount = Invoice::where([
|
||||
'status' => 'Pending',
|
||||
])->orWhere([
|
||||
'status' => 'Late',
|
||||
])->orWhere([
|
||||
'status' => 'Deferred',
|
||||
])->sum('invoice_amount');
|
||||
|
||||
return view('miningtax.admin.display.unpaid')->with('invoices', $invoices)
|
||||
->with('totalAmount', $totalAmount);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
</tbody>
|
||||
</table>
|
||||
{{ $invoices->links() }}
|
||||
<br>
|
||||
<h2>Total Amount Owed: {{ $totalAmount }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user