Skip to content

Commit

Permalink
same coding style invoicepayment
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Dec 25, 2018
1 parent c2c101f commit a4c5233
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Http/Controllers/Modals/BillPayments.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function create(Bill $bill)

$payment_methods = Modules::getPaymentMethods();

$bill->paid = $this->getPaid($bill);
$paid = $this->getPaid($bill);

// Get Bill Totals
foreach ($bill->totals as $bill_total) {
Expand All @@ -54,8 +54,8 @@ public function create(Bill $bill)

$bill->grand_total = money($total, $currency->code)->getAmount();

if ($bill->paid > 0) {
$bill->grand_total = $bill->total - $bill->paid;
if (!empty($paid)) {
$bill->grand_total = $bill->total - $paid;
}

$html = view('modals.bills.payment', compact('bill', 'accounts', 'currencies', 'currency', 'payment_methods'))->render();
Expand Down

0 comments on commit a4c5233

Please sign in to comment.