Invoice/Bill transaction styles

This commit is contained in:
Cüneyt Şentürk
2020-02-19 18:44:53 +03:00
parent b778aa01f6
commit 7a8f7dd303
4 changed files with 5 additions and 13 deletions

View File

@ -57,12 +57,10 @@ class BillTransactions extends Controller
$bill->grand_total = money($total, $currency->code)->getAmount();
if (!empty($paid)) {
$bill->grand_total = round($bill->total - $paid, $currency->precision) ;
$bill->grand_total = round($bill->total - $paid, $currency->precision);
}
$rand = rand();
$html = view('modals.bills.payment', compact('bill', 'accounts', 'currencies', 'currency', 'payment_methods', 'rand'))->render();
$html = view('modals.bills.payment', compact('bill', 'accounts', 'currencies', 'currency', 'payment_methods'))->render();
return response()->json([
'success' => true,

View File

@ -53,17 +53,14 @@ class InvoiceTransactions extends Controller
}
$total = money($invoice->total, $currency->code, true)->format();
//$total = money(0, $currency->code, true)->format();
$invoice->grand_total = money($total, $currency->code)->getAmount();
if (!empty($paid)) {
$invoice->grand_total = round($invoice->total - $paid, $currency->precision) ;
$invoice->grand_total = round($invoice->total - $paid, $currency->precision);
}
$rand = rand();
$html = view('modals.invoices.payment', compact('invoice', 'accounts', 'currencies', 'currency', 'payment_methods', 'rand'))->render();
$html = view('modals.invoices.payment', compact('invoice', 'accounts', 'currencies', 'currency', 'payment_methods'))->render();
return response()->json([
'success' => true,