@php $appName = \App\Models\Setting::get_value('app_name'); if($appName == "" || $appName == null){ $appName = "eGrocer"; } $supportEmail = \App\Models\Setting::get_value('support_email'); if($supportEmail == "" || $supportEmail == null){ $supportEmail = ""; } $supportNumber = \App\Models\Setting::get_value('support_number'); if($supportNumber == "" || $supportNumber == null){ $supportNumber = ""; } $logo = \App\Models\Setting::get_value('logo'); $currency = \App\Models\Setting::get_value('currency') ?? '$'; @endphp @if(\Request::route()->getName() == "customerInvoice")
Sold By
{{ $order->store_name }}Name: {{ $order->seller_name }}
Email: {{ $order->seller_email }}
Mobile No. : {{ $order->seller_mobile }}
Pan Number : {{ $order->pan_number }}
{{ $order->tax_name }} : {{ $order->tax_number }}
@if($order->delivery_boy_name)Delivery By : {{ $order->delivery_boy_name ?? "" }}
@elseDelivery By : Not Assigned
@endifProduct Details:
| Sr No. | Name | Unit | Price | Tax {{ $currency }} (%) | Qty | SubTotal ( {{ $currency }} ) |
|---|---|---|---|---|---|---|
| {{ $index+1 }} |
{{ $item->product_name }} |
{{ $item->variant_name }} |
{{ ($item->discounted_price != 0 && $item->discounted_price != "") ? $item->discounted_price : $item->price }} | {{ $item->tax_amount. " (" .$item->tax_percentage."%)" }} |
@php
// Use regex to extract the number and the word
preg_match('/(\d+)\s*(\w+)/', $item->variant_name, $matches);
// Get the number (10 in this case)
$number = isset($matches[1]) ? (int)$matches[1] : 0;
// Get the word (e.g., Gatta)
$word = isset($matches[2]) ? $matches[2] : '';
// Multiply with the quantity
$new_quantity = $item->quantity * $number;
// Create the new string
$string_quantity = $new_quantity . ' ' . $word;
@endphp
{{ $string_quantity }} |
{{ $item->sub_total }} |
@php
$total_tax_amount = $total_tax_amount + $item->tax_amount;
$total_sub_total = $total_sub_total + $item->sub_total;
@endphp
@php
$new_quantity = $item->quantity * $number;
$total_quantity = $total_quantity + $new_quantity;
$new_total_quantity = $total_quantity . ' ' . $word;
@endphp
| Total | {{ $total_tax_amount }} |
{{ $new_total_quantity }} |
{{ $total_sub_total }} |
Payment Method : {{ strtoupper($order->payment_method) }}
| Total Order Price ({{ $currency }}) | {{ $order->total }} |
|---|---|
| Delivery Charge ({{ $currency }}) | {{ $order->delivery_charge }} |
| Discount {{ $currency }} (%) | @php $discount_in_rupees = 0; if ( $order->discount > 0) { $discounted_amount = $order->total * $order->discount / 100; $final_total = $order->total - $discounted_amount; $discount_in_rupees = $order->total - $final_total; } @endphp{{ '- ' . $discount_in_rupees . ' (' . $order->discount . '%)'}} |
| Promo ({{ $order->promo_code }}) Discount ({{ $currency }}) | {{ '- ' . $order->promo_discount }} |
| Wallet Used ({{ $currency }}) | {{ '- ' . $order->wallet_balance }} |
| Final Total ({{ $currency }}) | {{ '= ' . $order->final_total}} |