@extends('layouts.app') @section('title', __('app.sell_return')) @section('content') @include('layouts.partials.breadcrumb',['page_title'=> __( 'app.sell_return') , 'bread_crumbs'=>array( array('title'=>__('app.add_sell_return'),'url'=>'/sell-return'),array('title'=>__('app.sell_return'),'url'=>''))])
{!! 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('sale.invoice_no'): {{ $sell->invoice_no }}
@lang('messages.date'): {{@format_date($sell->transaction_date)}}
@lang('contact.customer'): {{ $sell->contact->name }}
@lang('purchase.business_location'): {{ $sell->location->name }}
@lang('sale.invoice_no'): {{ $sell->invoice_no }}
@lang('messages.date'): {{@format_date($sell->transaction_date)}}
@lang('contact.customer'): {{ $sell->contact->name }}
@lang('purchase.business_location'): {{ $sell->location->name }}
@foreach($sell->sell_lines as $sell_line) @php $check_decimal = 'false'; 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 @endforeach
# @lang('product.product_name') @lang('app.unit_price') @lang('app.sell_quantity') @lang('app.already_return') @lang('app.return_quantity') @lang('app.return_subtotal')
{{ $loop->iteration }} {{ $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->unit_price_inc_tax }} {{ $sell_line->formatted_qty }} {{$unit_name}} {{@format_quantity($sell_line->quantity_returned)}} {{$unit_name}} @php /* */ @endphp
@php $discount_type = !empty($sell->return_parent->discount_type) ? $sell->return_parent->discount_type : $sell->discount_type; $discount_amount = !empty($sell->return_parent->discount_amount) ? $sell->return_parent->discount_amount : $sell->discount_amount; //dd($sell); // exit; //Added by BA $remaining_discount_amount_on_business_end = $sell->discount_amount - (!empty($sell->return_parent->discount_amount) ? $sell->return_parent->discount_amount : 0) //$discount_amount;//$sell->return_parent->discount_amount - $sell->discount_amount; @endphp @if($sell->discount_amount > 0)
{!! Form::label('discount_type', __( 'purchase.invoice_total_discount' ) . ':') !!} {{ ucfirst($sell->discount_type) }} @format_currency($sell->discount_amount)
@endif @if(!empty($sell->return_parent->discount_amount) && $sell->return_parent->discount_amount > 0)
{!! Form::label('discount_amount', __( 'purchase.already_discounted_amount' ) . ':') !!} @format_currency($sell->return_parent->discount_amount)
@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', 0, ['id' => 'tax_amount']); !!} {!! Form::hidden('tax_percent', $tax_percent, ['id' => 'tax_percent']); !!}

@lang('app.total_return_discount'):  (-)

@lang('app.product_return_total'): 0

@lang('app.return_total') : 0

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