@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 !!}
GSTIN No: {!! $purchase->contact->tax_number !!}
Mobile No: {!! $purchase->contact->mobile !!}
@lang('purchase.business_location'): {{ $purchase->location->name }}
Address: {{ $purchase->location->custom_field1 }}
Mobile No: {{ $purchase->location->mobile }}
GSTIN No: {{ $purchase->location->custom_field2 }}

@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 !!}
Mobile No: {!! $purchase->contact->mobile !!}
GSTIN No: {!! $purchase->contact->tax_number !!}
@lang('purchase.business_location'): {{ $purchase->location->name }}
Address: {{ $purchase->location->custom_field1 }}
Mobile No: {{ $purchase->location->mobile }}
GSTIN No: {{ $purchase->location->custom_field2 }}
@endif @if(empty($purchase->return_parent)) @if($purchase->document_path)
 {{ __('purchase.download_document') }}
@endif @endif


@php $total_before_tax = 0; $total_basic_cost=0; $total_quantity=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 {{--- ----}} @php //$total_taxes +=($purchase_line->unit_price_inc_tax- (($purchase_line->purchase_price_inc_tax/(100+$purchase_line->product->product_tax->amount))*100))* $purchase_line->quantity_returned; @endphp @endforeach
# @lang('product.product_name') @lang('lang_v1.return_quantity') @lang('Basic Cost') @lang('Cost Price') @lang('GST') @lang('MRP') @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 {{@format_quantity($purchase_line->quantity_returned)}} {{$unit_name}} {{ $purchase_line->pp_without_discount}} {{ $purchase_line->purchase_price_inc_tax }} {{ round(($purchase_line->purchase_price_inc_tax*100 /(100+$purchase_line->product->product_tax->amount))*$purchase_line->product->product_tax->amount*0.01 * $purchase_line->quantity_returned,2) }}
{{ $purchase_line->product->product_tax->name }}
{{ $purchase_line->item_tax }}
@if(!empty($taxes[$purchase_line->tax_id])) @if (array_key_exists($taxes[$purchase_line->tax_id], $taxDist)) @php $taxDist[$taxes[$purchase_line->tax_id]] = $taxDist[$taxes[$purchase_line->tax_id]] + ($purchase_line->item_tax * $purchase_line->quantity_returned); @endphp @else @php $taxDist[$taxes[$purchase_line->tax_id]] = $purchase_line->item_tax * $purchase_line->quantity_returned; @endphp @endif ( {{ $taxes[$purchase_line->tax_id]}} ) @endif
{{ $purchase_line->product->product_tax->name }}
{{ $purchase_line->variations->product_mrp}} @php $total_quantity +=$purchase_line->quantity_returned; $line_total = $purchase_line->purchase_price_inc_tax * $purchase_line->quantity_returned; $total_before_tax += $line_total ; $total_basic_cost += $purchase_line->pp_without_discount * $purchase_line->quantity_returned; @endphp {{$line_total}}
Total Quantity : {{ $total_quantity }} Pcs
@if(!empty($purchaseLines)) @endif
@lang('Total Basic Cost'): {{ $total_basic_cost }}
@if(!empty($purchaseLines)) @foreach($purchaseLines as $v) {{$v['key']}}
@endforeach @endif CGST :
SGST :
@if(!empty($purchaseLines)) @foreach($purchaseLines as $v) CGST : {{ round($v['value']/2,2) }} SGST : {{ round($v['value']/2,2) }}
@endforeach @else 0.00 @endif
@if(!empty($purchaseLines)) @foreach($purchaseLines as $v) {{ $v['value'] }}
@endforeach @else 0.00 @endif {{$netTotalTaxAmount/2}}
{{$netTotalTaxAmount/2}}
@lang('lang_v1.return_total'): {{ $purchase->return_parent->final_total ?? $purchase->final_total }}
{{ __('lang_v1.activities') }}:
@includeIf('activity_log.activities', ['activity_type' => 'sell'])