@if ($orderData->processing == 0 && $orderData->cancellation == 1)
This order has been cancelled.
@elseif ($orderData->processing == 0 && $orderData->cancellation == 0)
Cancellation has been requested for this order.
@endif
@php
$productData = DB::table('product')
->join('product_color', 'product.id', '=', 'product_color.product_id')
->select(
'product.id',
'product.product_name',
'product_color.color_image'
)
->where('product.id', $orderData->product_id)
->where('product_color.product_color', $orderData->color)
->first();
$color_code = $orderData->color;
// Map code to color name
$colorMapping = [
'#A78B8D' => 'Marblepink', '#61A8F8' => 'Babyblue', '#C55C82' => 'Pink', '#FF0000' => 'Red',
'#CAD3D0' => 'Clear', '#BA9978' => 'Beige', '#88DB86' => 'Applegreen', '#DEE4EE' => 'Marblewhite',
'#BDB8EE' => 'Marbleviolet', '#E9CBB9' => 'Marbleorange', '#FEF250' => 'Lemonyellow',
'#f4c2c2' => 'Babypink', '#D2C77D' => 'Metallicgold', '#DAD9C6' => 'Buttermilk',
'#E9C500' => 'Yellow', '#D3CBC4' => 'Graybeige', '#0F2D8D' => 'Blue', '#005E3A' => 'Green',
'#D6F2E6' => 'Marblegreen', '#BF8BFF' => 'Violet', '#6B4B36' => 'Brown', '#C0C0C0' => 'Silver',
'#808080' => 'Grey', '#6CD2FA' => 'Skyblue', '#D09305' => 'Orange', '#13598B' => 'Metallicblue',
'#9582BB' => 'Metallicviolet', '#A286F4' => 'Purple', '#62ADE6' => 'Marbleblue',
'#80355C' => 'Marblered', '#2FCBD4' => 'Avocadogreen', '#FFA07A' => 'Lightorange',
'#DDD3D1' => 'Marblebeige', '#F4C430' => 'Saffron', '#000000' => 'Black', '#D4AF37' => 'Marblegold',
'#FFFFFF' => 'Purewhite', '#B4B4B8' => 'Metallicsilver', '#58C3C2' => 'Marblegreen',
'#006A4E' => 'Bottlegreen', '#6F4E37' => 'Coffee', '#FFFDD0' => 'Cream', '#A9A9A9' => 'Darkgrey',
'#C40233' => 'Metalicred', '#3D7764' => 'Metalicgreen', '#F8B700' => 'Metalicyellow'
];
$colorName = $colorMapping[strtoupper($color_code)] ?? $colorMapping[$color_code] ?? 'Default Color';
@endphp
Items in Order
@if($productData && $productData->color_image)
 }})
@else

@endif
Payment Summary
Subtotal
LKR {{ number_format($subTotal, 2) }}
@if($taxAmount > 0)
Tax ({{ $orderData->tax_percentage }}%)
LKR {{ number_format($taxAmount, 2) }}
@endif
Shipping Fee
LKR {{ number_format($serviceFee, 2) }}
@if($discountAmount > 0)
Discount
- LKR {{ number_format($discountAmount, 2) }}
@endif
Total Paid
LKR {{ number_format($grandTotal, 2) }}