@extends('layouts.app') @section('title', __('lang_v1.edit_purchase_return')) @section('content')
{!! Form::open(['url' => action([\App\Http\Controllers\CombinedPurchaseReturnController::class, 'update']), 'method' => 'post', 'id' => 'purchase_return_form', 'files' => true ]) !!} @component('components.widget', ['class' => 'box-primary','icon' => 'fa fa-truck-loading text-danger', 'title' => __('lang_v1.edit_purchase_return')])
{!! Form::label('supplier_id', __('purchase.supplier') . ':*') !!} {!! Form::select('contact_id', [ $purchase_return->contact_id => $purchase_return->contact->name], $purchase_return->contact_id, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'required', 'id' => 'supplier_id']); !!}
{!! Form::label('ref_no', __('purchase.ref_no').':') !!} {!! Form::text('ref_no', $purchase_return->ref_no, ['class' => 'form-control bd-rd-7']); !!}
{!! Form::label('transaction_date', __('messages.date') . ':*') !!} {!! Form::text('transaction_date', @format_datetime($purchase_return->transaction_date), ['class' => 'form-control bd-rd-7', 'readonly', 'required']); !!}
{!! Form::label('document', __('purchase.attach_document') . ':') !!} {!! Form::file('document', ['id' => 'upload_document', 'accept' => implode(',', array_keys(config('constants.document_upload_mimes_types')))]); !!}

@lang('purchase.max_file_size', ['size' => (config('constants.document_size_limit') / 1000000)]) @includeIf('components.document_help_text')

@endcomponent @component('components.widget', ['class' => 'box-primary','icon' => 'fa fa-search text-primary', 'title' => __('stock_adjustment.search_products')])
{!! Form::text('search_product', null, ['class' => 'form-control bd-rd-7', 'id' => 'search_product_for_purchase_return', 'placeholder' => __('stock_adjustment.search_products')]); !!}
@if(session('business.enable_lot_number')) @endif @if(session('business.enable_product_expiry')) @endif @foreach($purchase_lines as $purchase_line) @include('purchase_return.partials.product_table_row', ['product' => $purchase_line, 'row_index' => $loop->index, 'edit' => true]) @php $row_index = $loop->iteration; @endphp @endforeach
@lang('sale.product') @lang('lang_v1.lot_number') @lang('product.exp_date') @lang('sale.qty') @lang('sale.unit_price') @lang('sale.subtotal')
{!! Form::label('tax_id', __('purchase.purchase_tax') . ':') !!} {!! Form::hidden('tax_amount', $purchase_return->tax_amount, ['id' => 'tax_amount']); !!}
@lang('stock_adjustment.total_amount'): {{$purchase_return->final_total}}

@endcomponent {!! Form::close() !!}
@stop @section('javascript') @endsection