@php $col_class = 'col-md-6'; if(!empty($accounts)){ $col_class = 'col-md-4'; } $readonly = $payment_line['method'] == 'advance' ? true : false; @endphp
{!! Form::label("amount_$row_index" ,__('sale.amount') . ':*') !!}
{!! Form::text("payment[$row_index][amount]", @num_format($payment_line['amount']), ['class' => 'form-control payment-amount input_number', 'required', 'id' => "amount_$row_index", 'placeholder' => __('sale.amount'), 'readonly' => $readonly]); !!}
@if(!empty($show_date))
{!! Form::label("paid_on_$row_index" , __('lang_v1.paid_on') . ':*') !!}
{!! Form::text("payment[$row_index][paid_on]", isset($payment_line['paid_on']) ? @format_datetime($payment_line['paid_on']) : @format_datetime('now'), ['class' => 'form-control paid_on', 'readonly', 'required']); !!}
@endif
{!! Form::label("method_$row_index" , __('lang_v1.payment_method') . ':*') !!}
@php $_payment_method = empty($payment_line['method']) && array_key_exists('cash', $payment_types) ? 'cash' : $payment_line['method']; @endphp {!! Form::select("payment[$row_index][method]", $payment_types, $_payment_method, ['class' => 'form-control col-md-12 payment_types_dropdown', 'required', 'id' => !$readonly ? "method_$row_index" : "method_advance_$row_index", 'style' => 'width:100%;', 'disabled' => $readonly]); !!} @if($readonly) {!! Form::hidden("payment[$row_index][method]", $payment_line['method'], ['class' => 'payment_types_dropdown', 'required', 'id' => "method_$row_index"]); !!} @endif
@php $pos_settings = !empty(session()->get('business.pos_settings')) ? json_decode(session()->get('business.pos_settings'), true) : []; $enable_cash_denomination_for_payment_methods = !empty($pos_settings['enable_cash_denomination_for_payment_methods']) ? $pos_settings['enable_cash_denomination_for_payment_methods'] : []; @endphp @if(!empty($pos_settings['enable_cash_denomination_on']) && $pos_settings['enable_cash_denomination_on'] == 'all_screens' && !empty($show_denomination))

@lang( 'lang_v1.cash_denominations' ) @if(!empty($pos_settings['cash_denominations'])) @php $total = 0; @endphp @foreach(explode(',', $pos_settings['cash_denominations']) as $dnm) @php $count = 0; $sub_total = 0; if(!empty($payment_line['denominations'])){ foreach($payment_line['denominations'] as $d) { if($d['amount'] == $dnm) { $count = $d['total_count']; $sub_total = $d['total_count'] * $d['amount']; $total += $sub_total; } } } @endphp @endforeach
@lang('lang_v1.denomination')   @lang('lang_v1.count')   @lang('sale.subtotal')
{{$dnm}} X {!! Form::number("payment[$row_index][denominations][$dnm]", $count, ['class' => 'form-control cash_denomination input-sm', 'min' => 0, 'data-denomination' => $dnm, 'style' => 'width: 100px; margin:auto;' ]); !!} = {{@num_format($sub_total)}}
@lang('sale.total') {{@num_format($total)}}

@lang('lang_v1.cash_denomination_error')

@else

@lang('lang_v1.denomination_add_help_text')

@endif
@endif @if(!empty($accounts))
{!! Form::label("account_$row_index" , __('lang_v1.payment_account') . ':') !!}
{!! Form::select("payment[$row_index][account_id]", $accounts, !empty($payment_line['account_id']) ? $payment_line['account_id'] : '' , ['class' => 'form-control select2 account-dropdown', 'id' => !$readonly ? "account_$row_index" : "account_advance_$row_index", 'style' => 'width:100%;', 'disabled' => $readonly]); !!}
@endif
@include('sale_pos.partials.payment_type_details')
{!! Form::label("note_$row_index", __('sale.payment_note') . ':') !!} {!! Form::textarea("payment[$row_index][note]", $payment_line['note'], ['class' => 'form-control', 'rows' => 3, 'id' => "note_$row_index"]); !!}