{{ __('main.sales_return') }}
@if ($customer_results && count($customer_results) > 0)
    @foreach ($customer_results as $item)
  • {{ $item->file_number }} - {{ $item->first_name }} - {{ $item->phone_number_1 }}
  • @endforeach
@elseif($customer_query != '' && count($customer_results) == 0)
  • {{ __('main.no_customers_found') }}
@endif
@if ($invoice_results && count($invoice_results) > 0)
    @foreach ($invoice_results as $item)
  • #{{ $item->invoice_number }}
  • @endforeach
@elseif($invoice_query != '' && count($invoice_results) == 0)
  • {{ __('main.no_invoices_found') }}
@endif
@if ($product_results && count($product_results) > 0)
    @foreach ($product_results as $item) @php $orderdetail = \App\Models\SalesReturnDetail::where('invoice_detail_id', $item->id)->get(); $sum = $orderdetail->sum('quantity'); $localtotalquantity = $item->quantity - $sum; @endphp @if ($localtotalquantity > 0)
  • {{ $item->item_name }}, Qty : {{ $item->quantity - $sum }}
  • @endif @endforeach
@elseif($products_query != '' && count($product_results) == 0)
  • {{ __('main.no_products_found') }}
@endif
@php $local_total = 0; @endphp @foreach ($cart as $key => $item) @endforeach
{{ __('main.particulars') }} {{ __('main.rate') }} {{ __('main.tax') }} % {{ __('main.tax_total') }} {{ __('main.purchased_qty') }} {{ __('main.returned_qty') }} {{ __('main.total') }}
{{ getFormattedCurrency($item['rate']) }}
{{ $selected_invoice->tax_percentage ?? 0 }} %
@php $itemtotal = 0; @endphp @if ($quantityarray[$key] > 0) @php $product = $item; $tax = $selected_invoice->tax_percentage ?? 0; $itemtaxtotal = 0; $selling_price = $item['rate']; $localrate = 0; $stop = 0; try { $selling_price = $item['total'] / $item['original_quantity']; } catch (\Exception $e) { $stop = 1; } if ($stop != 1) { if (getTaxType() == 2) { $selling_price = $item['total'] / $item['original_quantity']; $localrate = $selling_price * (100 / (100 + $tax ?? 15)); $itemtotallocal = $selling_price * $quantityarray[$key] * (100 / (100 + $tax ?? 15)); $itemtaxtotal = $selling_price * $quantityarray[$key] - $itemtotallocal ?? 0; $itemtotal = $selling_price * $quantityarray[$key]; } else { $selling_price = $item['rate']; $itemtotallocal = $selling_price * $quantityarray[$key]; $localrate = $selling_price; $itemtaxtotal = ($itemtotallocal * $tax) / 100; $itemtotal = $itemtotallocal + $itemtaxtotal; } } $local_total += $itemtotal; @endphp {{ getFormattedCurrency($itemtaxtotal) }} @else - @endif
{{ $item['quantity'] }} {{ getUnitType($item['unit_type']) }}
@if ($item['unit_type'] != '') {{ getUnitType($item['unit_type']) }} @endif
{{ getFormattedCurrency($itemtotal) }}
{{ __('main.details') }}
@if ($selected_customer)
{{ $selected_customer->file_number ?? '' }}
{{ $selected_customer->first_name ?? '' }}
{{ getCountryCode() }} {{ $selected_customer->phone_number_1 ?? '' }}

{{ __('main.total_balance') }}:
{{ $selected_customer->getBalance() }}
@endif @if ($selected_invoice)
{{ __('main.invoice') }} #:
#{{ $selected_invoice->invoice_number }}
{{ __('main.date') }}:
{{ \Carbon\Carbon::parse($selected_invoice->date)->format('d/m/Y') }}
@foreach ($selected_invoice->details as $item) @endforeach
{{ __('main.particulars') }} {{ __('main.rate') }} {{ __('main.qty') }} {{ __('main.total') }}
{{ $item->item_name }}
{{ getFormattedCurrency($item->rate) }} {{ $item->quantity }} @if ($item->unit_type) {{ getUnitType($item->unit_type) }} @endif {{ getFormattedCurrency($item->total) }}
{{ __('main.sub_total') }}:
{{ getFormattedCurrency($selected_invoice->sub_total) }}
{{ __('main.discount') }} :
{{ getFormattedCurrency($selected_invoice->discount) }}
{{ __('main.taxable_amount') }}:
{{ getFormattedCurrency($selected_invoice->taxable_amount) }}
{{ __('main.tax_amount') }} ({{ $selected_invoice->tax_percentage }}%):
{{ getFormattedCurrency($selected_invoice->tax_amount) }}
{{ __('main.invoice_total') }}:
{{ getFormattedCurrency($selected_invoice->total) }}
@endif