
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#e8ebef">
@php
    $logo = logo_get_setting();
@endphp
    <tr>
        <td align="center" valign="top" class="container" style="padding:50px 10px;">
            <!-- Container -->
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td align="center">
                        <table width="650" border="0" cellspacing="0" cellpadding="0" class="mobile-shell" style="border: 1px solid #4697cb;">
                            <tr>
                                <td class="td" bgcolor="#ffffff" style="width:650px; min-width:650px; font-size:0pt; line-height:0pt; padding:0; margin:0; font-weight:normal;">
                                    <!-- Header -->
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
                                        <tr>
                                            <td class="p30-15-0" style="padding: 10px 20px 10px 10px;border-bottom: 2px solid #4697cb;">
                                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                        <th class="column" style="font-size:0pt; line-height:0pt; padding:0; margin:0; font-weight:normal;">
                                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                <tr>
                                                                    <td class="img m-center" style=" text-align:left;"><img src="{{ $logo }}" height="100%" border="0" alt="Amirdham logo" style="margin-left: auto;  margin-right: auto;display: block;" /></td>
                                                                </tr>
                                                            </table>
                                                        </th>
                                                        
                                                    </tr>
                                                </table>
                                                
                                            </td>
                                        </tr>
                                    </table>
                                    <!-- END Header -->

                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff" style="padding: 10px;">
                                        <tr>
                                            <td>
                                            <table style="width: 100%;margin:20px 0px;border-collapse: collapse;padding: 10px;">
                                                <tr>
                                                    <th style="border: 1px solid #d9d9d9;padding: 12px;color: #000;font-family:'Ubuntu', Arial,sans-serif; font-size:14px;">S.no</th>
                                                    <th style="border: 1px solid #d9d9d9;color: #000;font-family:'Ubuntu', Arial,sans-serif; font-size:14px;">Product Name</th>
                                                    <th style="border: 1px solid #d9d9d9;color: #000;font-family:'Ubuntu', Arial,sans-serif; font-size:14px;">Sub Total</th>
                                                    <th style="border: 1px solid #d9d9d9;color: #000;font-family:'Ubuntu', Arial,sans-serif; font-size:14px;">Qty</th>
                                                    <th style="border: 1px solid #d9d9d9;color: #000;font-family:'Ubuntu', Arial,sans-serif; font-size:14px;">Total</th>
                                                </tr>
                                                <?php
                                                    $OrderPageDetails = $order_details->orderitems;
                                                ?>
                                                @if(count($OrderPageDetails) > 0)
                                                @foreach($OrderPageDetails as $key => $details)
                                                <?php
                                                    $sub_total_2 = $details->discount_amount * $details->quantity;
                                                ?>
                                                <tr>
                                                    <td style="border: 1px solid #d9d9d9;text-align:center;padding: 12px;font-family:'Ubuntu', Arial,sans-serif; font-size:13px;color: #000;"> {{ $key + 1 }}</td>
                                                    <td style="border: 1px solid #d9d9d9;text-align:center;font-family:'Ubuntu', Arial,sans-serif; font-size:13px;color: #000;"> {{ $details->product_name }} </td>
                                                    <td style="border: 1px solid #d9d9d9;text-align:center;font-family:'Ubuntu', Arial,sans-serif; font-size:13px;color: #000;"> {{ number_format($details->discount_amount, 2) }}</td>
                                                    <td style="border: 1px solid #d9d9d9;text-align:center;font-family:'Ubuntu', Arial,sans-serif; font-size:13px;color: #000;"> {{ $details->quantity }}</td>
                                                    <td style="border: 1px solid #d9d9d9;text-align:center;font-family:'Ubuntu', Arial,sans-serif; font-size:13px;color: #000;"> {{ number_format($sub_total_2, 2) }}</td>
                                                </tr>
                                                @endforeach
                                                <?php
                                                    $total = $order_details->total_discount_amount - $order_details->discount_amount;
                                                ?>
                                                
                                                <tr>
                                                    <td style="border: 1px solid #d9d9d9;text-align:right;padding: 12px;font-family:'Ubuntu', Arial,sans-serif; font-size:13px; color:#000;" colspan="4">Sub Total </td>
                                                    <td style="border: 1px solid #d9d9d9;text-align:center;font-family:'Ubuntu', Arial,sans-serif; font-size:13px; color:#000;">{{ number_format($order_details->total_discount_amount, 2) }}</td>
                                                </tr>
                                                @if($order_details->discount_amount != 0 || $order_details->discount_amount != "")
                                                <tr>
                                                    <td style="border: 1px solid #d9d9d9;text-align:right;padding: 12px;font-family:'Ubuntu', Arial,sans-serif; font-size:13px; color:#000;" colspan="4">Discount Amount (-) </td>
                                                    <td style="border: 1px solid #d9d9d9;text-align:center;font-family:'Ubuntu', Arial,sans-serif; font-size:13px; color:#000;">{{ number_format($order_details->discount_amount, 2) }}</td>
                                                </tr>
                                                @endif
                                                <tr>
                                                    <td style="border: 1px solid #d9d9d9;text-align:right;padding: 12px;font-family:'Ubuntu', Arial,sans-serif; font-size:13px; color:#000;" colspan="4">Total </td>
                                                    <td style="border: 1px solid #d9d9d9;text-align:center;font-family:'Ubuntu', Arial,sans-serif; font-size:13px; color:#000;">{{ number_format($total, 2) }}</td>
                                                </tr>
                                                @endif
                                            </table>
                                            </td>
                                        </tr>
                                    </table>

                                    

                                    <!-- Intro -->
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
                                        <tr>
                                            <td class="p30-15" style="padding: 20px 30px 20px 30px;">
                                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                    
                                                    <tr>
                                                        <td class="h5 center blue pb30" style="font-family:'Ubuntu', Arial,sans-serif; font-size:15px; line-height:26px; text-align:left; color:#000;font-weight: 700;padding-top: 10px;padding-bottom: 10px;text-align: center;">Thanks you for using Amirdham!</td>
                                                    </tr>
                                                    <tr>
                                                        <td style="font-size:13px;text-align: center;line-height: 18px; color:#000;">
                                                            Got Questions? Please get in touch with our <br> Email: <a href="mailto:support@webbitech.com">support@webbitech.com</a>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                    <!-- END Intro -->
                                </td>
                            </tr>
                            <tr>
                                <td class="text-footer" style="padding-top: 30px; color:#1f2125; font-family:'Fira Mono', Arial,sans-serif; font-size:12px; line-height:22px; text-align:center;">This email was sent from a notification-only address that cannot accept incoming email. Please do not reply to this message.
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <!-- END Container -->
        </td>
    </tr>
</table>