No235, 3rd Floor, 2nd Stage, 13th Cross, Indiranagar, Bengaluru, Karnataka-560038
Party Name and Address:
{{ $detail->retailer?->company_name }}
{{ $detail->retailer?->address?->address }}
{{ $detail->retailer?->address?->pin_code }}
Payment Type: {{ $detail->payment_type }}
Date: {{ \Carbon\Carbon::parse($detail->created_at)->format('d-m-Y') }}
Order No: {{ $detail->order_no }}
GST No: {{ $detail->retailer?->document?->gst_no ?? 'N/A' }}
DL No: {{ $detail->retailer?->document?->license_no ?? 'N/A' }}
Phone No: {{ $detail->retailer?->phone }}
S. No |
Particulars |
Pack Size |
Qty |
Free |
PTR |
Disc |
GST |
Taxable Value |
@foreach ($orderDetails as $key => $orderItem)
@php
$freeProduct = \App\Models\Product::where('id', $orderItem->product_id)->first()->scheme;
if($freeProduct != null)
{
// Define a regex pattern for "10+5" format
$pattern1 = '/^\d+\+\d+$/';
// Define a regex pattern for "Neque quo amet ut v" format
$pattern2 = '/^[A-Za-z\s]+$/';
if (!preg_match($pattern1, $freeProduct) && !preg_match($pattern2, $freeProduct)) {
return;
}
$parts = explode('+', $freeProduct);
$baseQuantity = isset($parts[0]) ? (int)$parts[0] : 0;
$offerProductQuantity = isset($parts[1]) ? (int)$parts[1] : 0;
if($orderItem->quantity < $baseQuantity){
$offerProductQuantity = 0;
}elseif($orderItem->quantity == $baseQuantity){
$offerProductQuantity;
}else{
$cal1 = $orderItem->quantity / $baseQuantity;
$cal2 = floor($cal1);
$offerProductQuantity = intval(($cal2 > 0) ? ($cal2 * $offerProductQuantity) : ($cal1 * $offerProductQuantity));
}
}
@endphp
{{ ++$key }} |
{{ $orderItem->product?->name }} |
{{ $orderItem->product?->stripe }} |
{{ $orderItem->quantity }} |
@if ($orderItem->price != 0)
{{ $offerProductQuantity }}
@else
{{ 0 }}
@endif |
{{ $orderItem->price }} |
12 |
{{ $orderItem->product?->gst_percentage }} |
{{ $orderItem->price * $orderItem->quantity }} |
@endforeach
Total PTR: {{ $detail->total_price + $detail->points }}
Total GST: {{ $detail->gst }}
Credit Used: {{ $detail->points }}
Total Payable : {{ $detail->total_price + $detail->gst }}
Customer Order Instruction: