@extends('layouts.app') @php $title = __('lang_v1.add_sell_return'); @endphp @section('title', $title) @section('content')

{{$title}}

{!! Form::open(['url' => action([\App\Http\Controllers\SellReturnController::class, 'store']), 'method' => 'post', 'id' => 'add_sell_return_form', 'files' => true ]) !!} @component('components.widget', ['class' => 'box-solid'])
{{--
{!! Form::label('contact_id', __('sale.return_from') . ':*') !!}
{!! Form::select('location_id', $business_locations, $default_location->id ?? null, ['class' => 'form-control input-sm', 'id' => 'location_id', 'required', 'autofocus'], $bl_attributes); !!} @show_tooltip(__('tooltip.sale_location'))
--}}
{!! Form::label('contact_id', __('sale.return_store') . ':*') !!}
{!! Form::select('select_location_id', $business_locations, $default_location->id ?? null, ['class' => 'form-control input-sm', 'id' => 'select_location_id', 'required', 'autofocus'], $bl_attributes); !!} @show_tooltip(__('tooltip.sale_location'))
{!! Form::label('contact_id', __('contact.customer') . ':*') !!}
@if(!empty($walk_in_customer['price_calculation_type']) && $walk_in_customer['price_calculation_type'] == 'selling_price_group') @endif {!! Form::select('contact_id', [], null, ['class' => 'form-control mousetrap', 'id' => 'customer_id', 'placeholder' => 'Enter Customer name / phone', 'required']); !!}
@lang('account.customer_due'):
@lang('lang_v1.billing_address'):
{!! $walk_in_customer['contact_address'] ?? '' !!}

@lang('lang_v1.shipping_address'):
{{$walk_in_customer['supplier_business_name'] ?? ''}},
{{$walk_in_customer['name'] ?? ''}},
{{$walk_in_customer['shipping_address'] ?? ''}}
{!! Form::label('transaction_date', __('Return date') . ':*') !!}
{!! Form::text('transaction_date', $default_datetime, ['class' => 'form-control', 'readonly', 'required']); !!}
@can('edit_invoice_number')
{!! Form::label('invoice_no', 'Return '.__('sale.invoice_no') . ':') !!} {!! Form::text('invoice_no', null, ['class' => 'form-control', 'placeholder' => __('sale.invoice_no')]); !!}

@lang('lang_v1.keep_blank_to_autogenerate')

@endcan
{!! Form::label('return_note',__('sale.return_note')) !!} {!! Form::textarea('sale_note', null, ['class' => 'form-control', 'id' => 'return_note', 'rows' => 3]); !!}
@endcomponent @component('components.widget', ['class' => 'box-solid'])
{!! Form::text('search_sell_product', null, ['class' => 'form-control mousetrap', 'id' => 'search_sell_product', 'placeholder' => __('lang_v1.search_product_placeholder'),'disabled' => is_null($default_location)? true : false, 'autofocus' => is_null($default_location)? false : true,]); !!}
@php $hide_tax = 'hide'; @endphp
@if(!empty($common_settings['enable_product_warranty'])) @endif
@lang('sale.product') @lang('sale.qty') @lang('sale.unit_price') @lang('sale.tax') @lang('sale.price_inc_tax') @lang('lang_v1.warranty') @lang('sale.subtotal')
@lang('sale.item'): 0      @lang('sale.total'): 0
@endcomponent @component('components.widget', ['class' => 'box-solid hide'])
{!! Form::label('discount_type', __( 'purchase.discount_type' ) . ':') !!} {!! Form::select('discount_type', [ '' => __('lang_v1.none'), 'fixed' => __( 'lang_v1.fixed' ), 'percentage' => __( 'lang_v1.percentage' )], '', ['class' => 'form-control']); !!}
{!! Form::label('discount_amount', __( 'purchase.discount_amount' ) . ':') !!} {!! Form::text('discount_amount', 0, ['class' => 'form-control input_number']); !!}
@endcomponent @php $payment_body_id = 'payment_rows_div'; @endphp @can('sell.payments') @component('components.widget', ['class' => 'box-solid', 'id' => $payment_body_id, 'title' => __('Add Return payment')])
@lang('lang_v1.advance_balance'): {!! Form::hidden('advance_balance', null, ['id' => 'advance_balance', 'data-error-msg' => __('lang_v1.required_advance_balance_not_available')]); !!}
@include('sell_return.partials.payment_row_form', ['row_index' => 0, 'show_date' => true, 'show_denomination' => true])
{{--

@lang('lang_v1.change_return'):
0 {!! Form::hidden("change_return", $change_return['amount'], ['class' => 'form-control change_return input_number', 'required', 'id' => "change_return"]); !!} @if(!empty($change_return['id'])) @endif
{!! Form::label("change_return_method" , __('lang_v1.change_return_payment_method') . ':*') !!}
@php $_payment_method = empty($change_return['method']) && array_key_exists('cash', $payment_types) ? 'cash' : $change_return['method']; $_payment_types = $payment_types; if(isset($_payment_types['advance'])) { unset($_payment_types['advance']); } @endphp {!! Form::select("payment[change_return][method]", $_payment_types, $_payment_method, ['class' => 'form-control col-md-12 payment_types_dropdown', 'id' => 'change_return_method', 'style' => 'width:100%;']); !!}
@if(!empty($accounts))
{!! Form::label("change_return_account" , __('lang_v1.change_return_payment_account') . ':') !!}
{!! Form::select("payment[change_return][account_id]", $accounts, !empty($change_return['account_id']) ? $change_return['account_id'] : '' , ['class' => 'form-control select2', 'id' => 'change_return_account', 'style' => 'width:100%;']); !!}
@endif @include('sale_pos.partials.payment_type_details', ['payment_line' => $change_return, 'row_index' => 'change_return'])
--}}
@lang('lang_v1.balance'): 0.00
@endcomponent @endcan
{!! Form::hidden('is_save_and_print', 0, ['id' => 'is_save_and_print']); !!}
{!! Form::close() !!}
@include('sale_pos.partials.configure_search_modal') @stop @section('javascript') @if(in_array('tables' ,$enabled_modules) || in_array('modifiers' ,$enabled_modules) || in_array('service_staff' ,$enabled_modules)) @endif @endsection