diff --git a/app/Http/Controllers/Modals/BillTransactions.php b/app/Http/Controllers/Modals/BillTransactions.php index 55ad771c0..e4c3d551c 100644 --- a/app/Http/Controllers/Modals/BillTransactions.php +++ b/app/Http/Controllers/Modals/BillTransactions.php @@ -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, diff --git a/app/Http/Controllers/Modals/InvoiceTransactions.php b/app/Http/Controllers/Modals/InvoiceTransactions.php index 7699a267c..693e10bff 100644 --- a/app/Http/Controllers/Modals/InvoiceTransactions.php +++ b/app/Http/Controllers/Modals/InvoiceTransactions.php @@ -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, diff --git a/resources/views/modals/invoices/payment.blade.php b/resources/views/modals/invoices/payment.blade.php index 7ee269c03..798d79c75 100644 --- a/resources/views/modals/invoices/payment.blade.php +++ b/resources/views/modals/invoices/payment.blade.php @@ -18,9 +18,7 @@ {{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'v-model' => 'transaction_form.account_id', 'v-error' => 'payment.errors.get("account_id")', 'v-error-message' => 'payment.errors.get("account_id")', 'change' => 'onChangePaymentAccount']) }} - @stack('currency_code_input_start') - {{ Form::textGroup('currency', trans_choice('general.currencies', 1), 'exchange-alt', ['disabled' => 'disabled', 'v-model' => 'transaction_form.currency', 'v-error' => 'payment.errors.get("currency")', 'v-error-message' => 'payment.errors.get("currency")'], $currencies[$invoice->currency_code]) }} - @stack('currency_code_input_end') + {{ Form::textGroup('currency', trans_choice('general.currencies', 1), 'exchange-alt', ['disabled' => 'disabled', 'v-model' => 'transaction_form.currency', 'v-error' => 'payment.errors.get("currency")', 'v-error-message' => 'payment.errors.get("currency")'], $currencies[$invoice->currency_code]) }} {{ Form::textareaGroup('description', trans('general.description'), '', null, ['rows' => '3', 'v-model' => 'transaction_form.description', 'v-error' => 'payment.errors.get("description")', 'v-error-message' => 'payment.errors.get("description")']) }} diff --git a/resources/views/purchases/bills/show.blade.php b/resources/views/purchases/bills/show.blade.php index 4b7d4448a..6cb0ade2b 100644 --- a/resources/views/purchases/bills/show.blade.php +++ b/resources/views/purchases/bills/show.blade.php @@ -623,4 +623,3 @@ @push('scripts_start') @endpush -