removed redundant code from invoice/bill show
This commit is contained in:
@ -47,19 +47,6 @@ class Bills extends Controller
|
||||
*/
|
||||
public function show(Document $bill)
|
||||
{
|
||||
// Get Bill Totals
|
||||
foreach ($bill->totals_sorted as $bill_total) {
|
||||
$bill->{$bill_total->code} = $bill_total->amount;
|
||||
}
|
||||
|
||||
$total = money($bill->total, $bill->currency_code, true)->format();
|
||||
|
||||
$bill->grand_total = money($total, $bill->currency_code)->getAmount();
|
||||
|
||||
if (!empty($bill->paid)) {
|
||||
$bill->grand_total = round($bill->total - $bill->paid, config('money.' . $bill->currency_code . '.precision'));
|
||||
}
|
||||
|
||||
return view('purchases.bills.show', compact('bill'));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user