@extends('layouts.app') @section('title', __('lang_v1.sell_return')) @section('content')

@lang('lang_v1.sell_return')

{!! Form::hidden('location_id', $sell->location->id, ['id' => 'location_id', 'data-receipt_printer_type' => $sell->location->receipt_printer_type ]); !!} {!! Form::open(['url' => action([\App\Http\Controllers\SellReturnController::class, 'store']), 'method' => 'post', 'id' => 'sell_return_form' ]) !!} {!! Form::hidden('transaction_id', $sell->id); !!}

@lang('lang_v1.parent_sale')

@lang('sale.invoice_no'): {{ $sell->invoice_no }}
@lang('messages.date'): {{@format_date($sell->transaction_date)}}
@lang('contact.customer'): {{ $sell->contact->name }}
@lang('business.business_location'): {{ $sell->location->name }}
{!! Form::label('invoice_no', __('sale.invoice_no').':') !!} {!! Form::text('invoice_no', !empty($sell->return_parent->invoice_no) ? $sell->return_parent->invoice_no : null, ['class' => 'form-control']); !!}
{!! Form::label('transaction_date', __('messages.date') . ':*') !!}
@php $transaction_date = !empty($sell->return_parent->transaction_date) ? $sell->return_parent->transaction_date : 'now'; @endphp {!! Form::text('transaction_date', @format_datetime($transaction_date), ['class' => 'form-control', 'readonly', 'required']); !!}
@if (!$disable_return)
Exchange
@endif
@foreach($sell->sell_lines as $sell_line) {{-- @php $check_decimal = 'false'; if($sell_line->children_type != 'modifier') { if($sell_line->product->unit->allow_decimal == 0){ $check_decimal = 'true'; } $unit_name = $sell_line->product->unit->short_name; if(!empty($sell_line->sub_unit)) { $unit_name = $sell_line->sub_unit->short_name; if($sell_line->sub_unit->allow_decimal == 0){ $check_decimal = 'true'; } else { $check_decimal = 'false'; } } } @endphp --}} @php $check_decimal = 'false'; @endphp {{-- --}} @endforeach
# @lang('product.product_name') @lang('lang_v1.payment_type') @lang('lang_v1.payment') @lang('sale.unit_price') @lang('lang_v1.sell_quantity') @lang('lang_v1.return_quantity') @lang('lang_v1.return_subtotal')
{{ $loop->iteration }} {{ $sell_line->product->Title }} {{-- $sell_line->product->name --}} {{-- @if( $sell_line->product->type == 'variable') - {{ $sell_line->variations->product_variation->name}} - {{ $sell_line->variations->name}} @endif --}}
{{-- $sell_line->variations->sub_sku --}} {{ $sell_line->product->SellerSku }}
@if ($sell_line->payment_type) @foreach ($sell_line->payment_type as $key_sell_line => $item_sell_line) @if (count($sell_line->payment_type) == ($key_sell_line + 1)) {{ strtoupper($item_sell_line->method) }} @else {{ strtoupper($item_sell_line->method).', ' }} @endif @endforeach @else Payment Method Not Found @endif @if (count($sell_line->payment_type) > 1) @foreach ($sell_line->payment_type as $key_sell_line => $item_sell_line) @if (count($sell_line->payment_type) == ($key_sell_line + 1)) @if ($item_sell_line->is_return == 1) {{ 'Change Return: '. -@num_format($item_sell_line->amount) }} @else {{ strtoupper($item_sell_line->method).': '. @num_format($item_sell_line->amount) }} @endif @else @if ($item_sell_line->is_return == 1) {{ 'Change Return: '. -@num_format($item_sell_line->amount).', ' }} @else {{ strtoupper($item_sell_line->method).': '. @num_format($item_sell_line->amount).', ' }} @endif @endif @endforeach @else {{ @num_format((($sell_line->unit_price_inc_tax * $sell_line->quantity) + (($sell_line->unit_price_inc_tax * $sell_line->quantity) * ($sell->tax->amount/100) ) )) }} @endif {{ $sell_line->unit_price_inc_tax }}{{ $sell_line->formatted_qty }} {{$unit_name}}{{ $sell_line->formatted_qty }} @if ($sell_line->payment_type) @php $indexForeach = $loop->index; @endphp @foreach ($sell_line->payment_type as $key_sell_line => $item_sell_line) @if ($item_sell_line->is_return == 1) @else @endif @endforeach @endif
@php $tax_percent = 0; if(!empty($sell->tax)){ $tax_percent = $sell->tax->amount; } @endphp {!! Form::hidden('tax_id', $sell->tax_id); !!} {!! Form::hidden('tax_amount', $sell->tax_amount, ['id' => 'tax_amount']); !!} {!! Form::hidden('tax_percent', $sell->tax->amount ?? 0 , ['id' => 'tax_percent']); !!} {!! Form::hidden('total_return_discount_amount', null, ['id' => 'total_return_discount_amount']) !!}
@lang('lang_v1.total_return_discount'):  (-)
@lang('lang_v1.total_return_tax') - @if(!empty($sell->tax))({{$sell->tax->name}} - {{$sell->tax->amount}}%)@endif :  (+) {{ $sell->tax_amount }}
@lang('lang_v1.return_total'):   0

@if (!$disable_return)
@endif
@component('components.widget', ['class' => 'box-solid hide', 'id' => 'componen_exchange' ])
{!! Form::hidden('types_of_service_price_group', null, ['id' => 'types_of_service_price_group']) !!} {!! Form::hidden('default_price_group', null, ['id' => 'default_price_group']) !!}
{!! Form::text('search_product', null, ['class' => 'form-control mousetrap', 'id' => 'search_product', 'placeholder' => __('lang_v1.search_product_placeholder'), 'disabled' => $default_location ? false : true, 'autofocus' => $default_location ? false : true, ]); !!}
@php $hide_tax = ''; if( session()->get('business.enable_inline_tax') == 0){ $hide_tax = 'hide'; } @endphp
@if(!empty($pos_settings['inline_service_staff'])) @endif @if(!empty($common_settings['enable_product_warranty'])) @endif
@lang('sale.product') @lang('sale.qty') @lang('restaurant.service_staff') @lang('sale.unit_price') @lang('receipt.discount') @lang('sale.tax') @lang('sale.price_inc_tax') @lang('lang_v1.warranty') @lang('sale.subtotal')
@lang('sale.item'): 0      @lang( 'sale.sales_tax' ):(+) 0      @lang('sale.total'): 0

@endcomponent {!! Form::close() !!}
@stop @section('javascript') {{-- because using pos.js and need add bootstrap-multiselect --}} {{-- --}} {{-- --}} @if(in_array('tables' ,$enabled_modules) || in_array('modifiers' ,$enabled_modules) || in_array('service_staff' ,$enabled_modules)) @endif @endsection