Merge pull request #689 from sausin/patch-1

Fix calculation to show correct amount in modal
This commit is contained in:
Cüneyt Şentürk 2018-12-25 12:45:15 +03:00 committed by GitHub
commit 592fe710b2
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();