@extends('layouts.business.master') @section('title') {{ __('Pos Sale') }} @endsection @section('main_content')

{{ __('Purchases Return') }}

@csrf
@usercan('purchases.price') @endusercan @foreach ($purchase->details as $detail) @php // Calculate the discounted price per unit $original_price = $detail->productPurchasePrice; $discounted_price_per_unit = $original_price - $original_price * $discount_per_unit_factor; $sub_total = $discounted_price_per_unit * $detail->quantities; @endphp @usercan('purchases.price') @endforeach
{{ __('Image') }} {{ __('Items') }} {{ __('Code') }} {{ __('Qty') }}{{ __('Purchase Price') }}{{ __('Returned Qty') }} {{ __('Sub Total') }}
{{ $detail->product->productName ?? '' }} {{ $detail->product->productCode ?? '' }} {{ $detail->quantities ?? 0 }}{{ currency_format($discounted_price_per_unit, currency: business_currency()) }} @endusercan
{{ currency_format(0) }}
{{ __('Return Amount ' . currency_format($purchase->totalAmount, currency: business_currency())) }}
{{ __('Cancel') }}
@php $currency = business_currency(); @endphp {{-- Hidden input fields to store currency details --}} @endsection @push('js') @endpush