Update BillPayments.php

Fix `grand_total` calculation. No $paid variable existed
This commit is contained in:
sausin 2018-12-20 22:54:09 +05:30 committed by GitHub
parent c809e94763
commit 4a67b52f0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,8 +54,8 @@ class BillPayments extends Controller
$bill->grand_total = money($total, $currency->code)->getAmount();
if (!empty($paid)) {
$bill->grand_total = $bill->total - $paid;
if ($bill->paid > 0) {
$bill->grand_total = $bill->total - $bill->paid;
}
$html = view('modals.bills.payment', compact('bill', 'accounts', 'currencies', 'currency', 'payment_methods'))->render();