@lang('lang_v1.purchase_return_details') (@lang('purchase.ref_no'): #{{ $purchase->return_parent->ref_no ?? $purchase->ref_no}})

@if(!empty($purchase->return_parent))

@lang('lang_v1.purchase_return_details'):

@lang('lang_v1.return_date'): {{@format_date($purchase->return_parent->transaction_date)}}
@lang('purchase.supplier'): {!! $purchase->contact->contact_address !!}
@lang('purchase.business_location'): {{ $purchase->location->name }}

@lang('purchase.purchase_details'):

@lang('purchase.ref_no'): {{ $purchase->ref_no }}
@lang('messages.date'): {{@format_date($purchase->transaction_date)}}
@else

@lang('lang_v1.purchase_return_details'):

@lang('lang_v1.return_date'): {{@format_date($purchase->transaction_date)}}
@lang('purchase.supplier'): {!! $purchase->contact->contact_address !!}
@lang('purchase.business_location'): {{ $purchase->location->name }}
@endif @if(empty($purchase->return_parent)) @if($purchase->document_path)
 {{ __('purchase.download_document') }}
@endif @endif


@if(!empty($common_settings['enable_serial_number'])) @endif @php $total_before_tax = 0; @endphp @foreach($purchase->purchase_lines as $purchase_line) @if($purchase_line->quantity_returned == 0) @continue @endif @php $unit_name = $purchase_line->product->unit->short_name; if(!empty($purchase_line->sub_unit)) { $unit_name = $purchase_line->sub_unit->short_name; } @endphp @if(!empty($common_settings['enable_serial_number'])) @endif @endforeach
# @lang('product.product_name')Product Serial@lang('sale.unit_price') @lang('lang_v1.return_quantity') @lang('lang_v1.return_subtotal')
{{ $loop->iteration }} {{ $purchase_line->product->name }} @if( $purchase_line->product->type == 'variable') - {{ $purchase_line->variations->product_variation->name}} - {{ $purchase_line->variations->name}} @endif @if ($purchase_line->product->enable_serial_number == "1") @php $serial_numbers = App\SerialNumber::where('serial_purchase_code', $purchase_line->serial_purchase_code) ->where('is_p_return', 1) ->get(); @endphp @if (!empty($serial_numbers)) SN. @php $num_of_items = count($serial_numbers); $num_count = 0; foreach ($serial_numbers as $serial_number) { echo $serial_number->serial_number; $num_count = $num_count + 1; if ($num_count < $num_of_items) { if ($num_count % 4==0){ echo "
" ; } else { echo ", " ; } } } @endphp @endif @else No Serial @endif
{{ $purchase_line->purchase_price_inc_tax }} {{@format_quantity($purchase_line->quantity_returned)}} {{$unit_name}} @php $line_total = $purchase_line->purchase_price_inc_tax * $purchase_line->quantity_returned; $total_before_tax += $line_total ; @endphp {{$line_total}}
@lang('purchase.net_total_amount'): {{ $total_before_tax }}
@lang('lang_v1.total_return_tax'): (+) @if(!empty($purchase_taxes)) @foreach($purchase_taxes as $k => $v) {{$k}} - {{ $v }}
@endforeach @else 0.00 @endif
@lang('lang_v1.return_total'): {{ $purchase->return_parent->final_total ?? $purchase->final_total }}
{{ __('lang_v1.activities') }}:
@includeIf('activity_log.activities', ['activity_type' => 'sell'])