<?php if($receipt_details->invoice_heading == 'QUOTATION'): ?>
    <!-- ============================================ -->
    <!-- QUOTATION BLOCK - Only shown when invoice_heading = 'QUOTATION' -->
    <!-- ============================================ -->
    <!-- ============================================ -->
    <!-- INVOICE BLOCK - Only shown when invoice_heading is NOT 'QUOTATION' -->
    <!-- ============================================ -->
    <div class="receipt-container" style="color: #000000 !important; margin-top:-10px;">

        
        <div class="receipt-content">
            <!-- business information here -->
            <div class="row" style="color: #000000 !important;">
                <!-- Logo -->
                <?php if(empty($receipt_details->letter_head)): ?>
                    <?php if(!empty($receipt_details->logo)): ?>
                        <img style="max-height: auto; width: 100%;" src="<?php echo e($receipt_details->logo, false); ?>" class="img img-responsive center-block">
                    <?php endif; ?>
    <style>
        @media print {
            @page {
                margin: 10mm;
            }
            
            html, body {
                height: 100%;
                margin: 0;
                padding: 0;
            }
            
            .receipt-container {
                display: flex;
                flex-direction: column;
                min-height: 100vh;
                justify-content: space-between;
            }
            
            .receipt-content {
                flex: 1;
            }
            
            .receipt-footer {
                width: 100%;
                text-align: center;
                border-top: 0px solid #000;
                padding-top: 10px;
                margin-top: 20px;
                padding-bottom: 10px;
            }
        }
    </style>

                    <!-- Header text -->
                    <?php if(!empty($receipt_details->header_text)): ?>
                        <div class="col-xs-12">
                            <?php echo $receipt_details->header_text; ?>

                        </div>
                    <?php endif; ?>

                    <!-- business information here -->
                    <div class="col-xs-12 text-center">
                        <h2 class="text-center">
                            <!-- Shop & Location Name  -->
                            <?php if(!empty($receipt_details->display_name)): ?>
                                <?php echo e($receipt_details->display_name, false); ?>

                            <?php endif; ?>
                        </h2>

                        <!-- Address -->
                        <p>
                        <?php if(!empty($receipt_details->address)): ?>
                                <small class="text-center">
                                <?php echo $receipt_details->address; ?>

                                </small>
                        <?php endif; ?>
                        <?php if(!empty($receipt_details->contact)): ?>
                            <br/><?php echo $receipt_details->contact; ?>

                        <?php endif; ?>	
                        <?php if(!empty($receipt_details->contact) && !empty($receipt_details->website)): ?>
                            , 
                        <?php endif; ?>
                        <?php if(!empty($receipt_details->website)): ?>
                            <?php echo e($receipt_details->website, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->location_custom_fields)): ?>
                            <br><?php echo e($receipt_details->location_custom_fields, false); ?>

                        <?php endif; ?>
                        </p>
                        <p>
                        <?php if(!empty($receipt_details->sub_heading_line1)): ?>
                            <?php echo e($receipt_details->sub_heading_line1, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->sub_heading_line2)): ?>
                            <br><?php echo e($receipt_details->sub_heading_line2, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->sub_heading_line3)): ?>
                            <br><?php echo e($receipt_details->sub_heading_line3, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->sub_heading_line4)): ?>
                            <br><?php echo e($receipt_details->sub_heading_line4, false); ?>

                        <?php endif; ?>		
                        <?php if(!empty($receipt_details->sub_heading_line5)): ?>
                            <br><?php echo e($receipt_details->sub_heading_line5, false); ?>

                        <?php endif; ?>
                        </p>
                        <p>
                        <?php if(!empty($receipt_details->tax_info1)): ?>
                            <b><?php echo e($receipt_details->tax_label1, false); ?></b> <?php echo e($receipt_details->tax_info1, false); ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->tax_info2)): ?>
                            <b><?php echo e($receipt_details->tax_label2, false); ?></b> <?php echo e($receipt_details->tax_info2, false); ?>

                        <?php endif; ?>
                        </p>
                    <?php endif; ?>


                    <!-- Title of receipt -->
                    <!--<?php if(!empty($receipt_details->invoice_heading)): ?>-->
                    <!--    <h3 class="text-center">-->
                    <!--        <?php echo $receipt_details->invoice_heading; ?>-->
                    <!--    </h3>-->
                    <!--<?php endif; ?>-->
                </div>
                <?php if(!empty($receipt_details->letter_head)): ?>
                    <div class="col-xs-12 text-center">
                        <img style="width: 100%;margin-bottom: 10px;" src="<?php echo e($receipt_details->letter_head, false); ?>">
                    </div>
                <?php endif; ?>
            </div>

            
            <div style="padding-left: 5px; padding-right: 5px; padding-bottom: 15px;">
              
            <div class="col-xs-12 text-center">
                <!-- Invoice  number, Date  -->
                <p style="width: 100% !important" class="word-wrap">
                    <span class="pull-left text-left word-wrap">
                        <?php if(!empty($receipt_details->invoice_no_prefix)): ?>
                            <b><?php echo $receipt_details->invoice_no_prefix; ?></b>
                        <?php endif; ?>
                       <span style="border: 1px solid #000000; border-radius: 4px; padding: 2px 10px; display: inline-block;">
        <?php echo e($receipt_details->invoice_no, false); ?>

    </span>

                        <?php if(!empty($receipt_details->types_of_service)): ?>
                            <br/>
                            <span class="pull-left text-left">
                                <strong><?php echo $receipt_details->types_of_service_label; ?>:</strong>
                                <?php echo e($receipt_details->types_of_service, false); ?>

                                <!-- Waiter info -->
                                <?php if(!empty($receipt_details->types_of_service_custom_fields)): ?>
                                    <?php $__currentLoopData = $receipt_details->types_of_service_custom_fields; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <br><strong><?php echo e($key, false); ?>: </strong> <?php echo e($value, false); ?>

                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endif; ?>
                            </span>
                        <?php endif; ?>

                        <!-- Table information-->
                        <?php if(!empty($receipt_details->table_label) || !empty($receipt_details->table)): ?>
                            <br/>
                            <span class="pull-left text-left">
                                <?php if(!empty($receipt_details->table_label)): ?>
                                    <b><?php echo $receipt_details->table_label; ?></b>
                                <?php endif; ?>
                                <?php echo e($receipt_details->table, false); ?>


                                <!-- Waiter info -->
                            </span>
                        <?php endif; ?>

                      
                        <?php if(!empty($receipt_details->client_id_label)): ?>
                            <br/>
                            <b><?php echo e($receipt_details->client_id_label, false); ?></b> <?php echo e($receipt_details->client_id, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->customer_tax_label)): ?>
                            <br/>
                            <b><?php echo e($receipt_details->customer_tax_label, false); ?></b> <?php echo e($receipt_details->customer_tax_number, false); ?>

                        <?php endif; ?>
                        <!--<?php if(!empty($receipt_details->customer_custom_fields)): ?>-->
                        <!--    <br/><?php echo $receipt_details->customer_custom_fields; ?>-->
                        <!--<?php endif; ?>-->
                        <?php if(!empty($receipt_details->sales_person_label)): ?>
                            <br/>
                            <b><?php echo e($receipt_details->sales_person_label, false); ?></b> <?php echo e($receipt_details->sales_person, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->commission_agent_label)): ?>
                            <br/>
                            <strong><?php echo e($receipt_details->commission_agent_label, false); ?></strong> <?php echo e($receipt_details->commission_agent, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->customer_rp_label)): ?>
                            <br/>
                            <strong><?php echo e($receipt_details->customer_rp_label, false); ?></strong> <?php echo e($receipt_details->customer_total_rp, false); ?>

                        <?php endif; ?>
                    </span>

                    <span class="pull-right text-left">
                        <b><?php echo e($receipt_details->date_label, false); ?></b>
                        <?php
        $date_parts = explode('-', date('d-m-Y', strtotime($receipt_details->invoice_date)));
    ?>

    <span style="display: inline-block;">
        <span style="border: 1px solid #000000; border-radius: 3px; padding: 3px 5px;"><?php echo e($date_parts[0], false); ?></span>
        <span style="margin: 0 2px;"></span>
        <span style="border: 1px solid #000000; border-radius: 3px; padding: 3px 5px;"><?php echo e($date_parts[1], false); ?></span>
        <span style="margin: 0 2px;"></span>
        <span style="border: 1px solid #000000; border-radius: 3px; padding: 3px 5px;"><?php echo e($date_parts[2], false); ?></span>
    </span>

                        <?php if(!empty($receipt_details->due_date_label)): ?>
                        <br><b><?php echo e($receipt_details->due_date_label, false); ?></b> <?php echo e($receipt_details->due_date ?? '', false); ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->brand_label) || !empty($receipt_details->repair_brand)): ?>
                            <br>
                            <?php if(!empty($receipt_details->brand_label)): ?>
                                <b><?php echo $receipt_details->brand_label; ?></b>
                            <?php endif; ?>
                            <?php echo e($receipt_details->repair_brand, false); ?>

                        <?php endif; ?>


                        <?php if(!empty($receipt_details->device_label) || !empty($receipt_details->repair_device)): ?>
                            <br>
                            <?php if(!empty($receipt_details->device_label)): ?>
                                <b><?php echo $receipt_details->device_label; ?></b>
                            <?php endif; ?>
                            <?php echo e($receipt_details->repair_device, false); ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->model_no_label) || !empty($receipt_details->repair_model_no)): ?>
                            <br>
                            <?php if(!empty($receipt_details->model_no_label)): ?>
                                <b><?php echo $receipt_details->model_no_label; ?></b>
                            <?php endif; ?>
                            <?php echo e($receipt_details->repair_model_no, false); ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->serial_no_label) || !empty($receipt_details->repair_serial_no)): ?>
                            <br>
                            <?php if(!empty($receipt_details->serial_no_label)): ?>
                                <b><?php echo $receipt_details->serial_no_label; ?></b>
                            <?php endif; ?>
                            <?php echo e($receipt_details->repair_serial_no, false); ?><br>
                        <?php endif; ?>
                        <?php if(!empty($receipt_details->repair_status_label) || !empty($receipt_details->repair_status)): ?>
                            <?php if(!empty($receipt_details->repair_status_label)): ?>
                                <b><?php echo $receipt_details->repair_status_label; ?></b>
                            <?php endif; ?>
                            <?php echo e($receipt_details->repair_status, false); ?><br>
                        <?php endif; ?>
                        
                        <?php if(!empty($receipt_details->repair_warranty_label) || !empty($receipt_details->repair_warranty)): ?>
                            <?php if(!empty($receipt_details->repair_warranty_label)): ?>
                                <b><?php echo $receipt_details->repair_warranty_label; ?></b>
                            <?php endif; ?>
                            <?php echo e($receipt_details->repair_warranty, false); ?>

                            <br>
                        <?php endif; ?>
                        
                        <!-- Waiter info -->
                        <?php if(!empty($receipt_details->service_staff_label) || !empty($receipt_details->service_staff)): ?>
                            <br/>
                            <?php if(!empty($receipt_details->service_staff_label)): ?>
                                <b><?php echo $receipt_details->service_staff_label; ?></b>
                            <?php endif; ?>
                            <?php echo e($receipt_details->service_staff, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->shipping_custom_field_1_label)): ?>
                            <br><strong><?php echo $receipt_details->shipping_custom_field_1_label; ?> :</strong> <?php echo $receipt_details->shipping_custom_field_1_value ?? ''; ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->shipping_custom_field_2_label)): ?>
                            <br><strong><?php echo $receipt_details->shipping_custom_field_2_label; ?>:</strong> <?php echo $receipt_details->shipping_custom_field_2_value ?? ''; ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->shipping_custom_field_3_label)): ?>
                            <br><strong><?php echo $receipt_details->shipping_custom_field_3_label; ?>:</strong> <?php echo $receipt_details->shipping_custom_field_3_value ?? ''; ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->shipping_custom_field_4_label)): ?>
                            <br><strong><?php echo $receipt_details->shipping_custom_field_4_label; ?>:</strong> <?php echo $receipt_details->shipping_custom_field_4_value ?? ''; ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->shipping_custom_field_5_label)): ?>
                            <br><strong><?php echo $receipt_details->shipping_custom_field_2_label; ?>:</strong> <?php echo $receipt_details->shipping_custom_field_5_value ?? ''; ?>

                        <?php endif; ?>
                        
                        <?php if(!empty($receipt_details->sale_orders_invoice_no)): ?>
                            <br>
                            <strong><?php echo app('translator')->get('restaurant.order_no'); ?>:</strong> <?php echo $receipt_details->sale_orders_invoice_no ?? ''; ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->sale_orders_invoice_date)): ?>
                            <br>
                            <strong><?php echo app('translator')->get('lang_v1.order_dates'); ?>:</strong> <?php echo $receipt_details->sale_orders_invoice_date ?? ''; ?>

                        <?php endif; ?>

                        <!--<?php if(!empty($receipt_details->sell_custom_field_1_value)): ?>-->
                        <!--    <br>-->
                        <!--    <strong><?php echo e($receipt_details->sell_custom_field_1_label, false); ?>:</strong> <?php echo $receipt_details->sell_custom_field_1_value ?? ''; ?>-->
                        <!--<?php endif; ?>-->

                        <?php if(!empty($receipt_details->sell_custom_field_2_value)): ?>
                            <br>
                            <strong><?php echo e($receipt_details->sell_custom_field_2_label, false); ?>:</strong> <?php echo $receipt_details->sell_custom_field_2_value ?? ''; ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->sell_custom_field_3_value)): ?>
                            <br>
                            <strong><?php echo e($receipt_details->sell_custom_field_3_label, false); ?>:</strong> <?php echo $receipt_details->sell_custom_field_3_value ?? ''; ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->sell_custom_field_4_value)): ?>
                            <br>
                            <strong><?php echo e($receipt_details->sell_custom_field_4_label, false); ?>:</strong> <?php echo $receipt_details->sell_custom_field_4_value ?? ''; ?>

                        <?php endif; ?>

                    </span>
                </p>
            </div>
        </div>
        <div style="margin-top:-20px; padding-left: 20px; padding-right: 20px;">
      <!-- customer info -->
                       <?php if(!empty($receipt_details->customer_info)): ?>
        <?php
            // Split by <br> tags
            $lines = array_filter(array_map('trim', explode('<br>', $receipt_details->customer_info)));
            
            $customer_name = '';
            $address = '';
            $mobile = '';
            
            foreach ($lines as $line) {
                // Check if line contains "Name:"
                if (stripos($line, 'Name:') !== false) {
                    $customer_name = trim(str_ireplace('Name:', '', $line));
                    // Remove any extra commas or spaces
                    $customer_name = trim($customer_name, ', ');
                }
                // Check if line contains "Mobile:" (with or without bold tags)
                elseif (stripos($line, 'Mobile:') !== false || stripos($line, '<b>Mobile</b>:') !== false) {
                    // Remove any HTML tags and "Mobile:" label
                    $mobile = strip_tags($line);
                    $mobile = trim(str_ireplace(['Mobile:', 'mobile:'], '', $mobile));
                }
                // Otherwise it's address
                else {
                    // Strip any HTML tags
                    $address = strip_tags($line);
                    $address = trim($address);
                }
            }
            
            // If name is still empty, try to get it from first line
            if (empty($customer_name) && isset($lines[0])) {
                $first_line = strip_tags($lines[0]);
                if (stripos($first_line, 'Name:') !== false) {
                    $customer_name = trim(str_ireplace('Name:', '', $first_line));
                    $customer_name = trim($customer_name, ', ');
                } else {
                    $customer_name = $first_line;
                }
            }
            
            // If address is empty, try second line
            if (empty($address) && isset($lines[1])) {
                $address = strip_tags($lines[1]);
                $address = trim($address);
            }
        ?>
        
        <br/></br>
        <!-- Customer Name with rounded border - Full Width -->
    <?php if(!empty($customer_name)): ?>
        <div style="border: 1px solid #000000; border-radius: 4px; padding: 3px 8px; margin-top: 3px; display: block; width: 100%; box-sizing: border-box;">
            <strong>Name:</strong> <?php echo e($customer_name, false); ?>

        </div>
    <?php endif; ?>

    <!-- Address with rounded border - Full Width -->
    <?php if(!empty($address)): ?>
        <div style="border: 1px solid #000000; border-radius: 4px; padding: 3px 8px; margin-top: 3px; display: block; width: 100%; box-sizing: border-box; margin-top:6px;">
            <strong>Address:</strong> <?php echo e($address, false); ?>

        </div>
    <?php endif; ?>

    <!-- Mobile with rounded border - Full Width -->
    <?php if(!empty($mobile)): ?>
        <div style="border: 1px solid #000000; border-radius: 4px; padding: 3px 8px; margin-top: 3px; display: block; width: 30%; box-sizing: border-box;margin-top:6px;">
            <strong>Mobile:</strong> <?php echo e($mobile, false); ?>

        </div>
    <?php endif; ?>
    <?php endif; ?>

    </div>
        <div class="row" style="color: #000000 !important; padding-left: 15px; padding-right: 15px;">
            <?php if ($__env->exists('sale_pos.receipts.partial.common_repair_invoice')) echo $__env->make('sale_pos.receipts.partial.common_repair_invoice', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
        </div>

        <div class="row" style="color: #000000 !important; padding-left: 20px; padding-right: 20px;">
            <div class="col-xs-12">
                <br/>
                <?php
                    $p_width = 45;
                ?>
                <?php if(!empty($receipt_details->item_discount_label)): ?>
                    <?php
                        $p_width -= 10;
                    ?>
                <?php endif; ?>
                <?php if(!empty($receipt_details->discounted_unit_price_label)): ?>
                    <?php
                        $p_width -= 10;
                    ?>
                <?php endif; ?>
              <table class="table table-responsive table-slim" style="border: 0px solid #000000; border-collapse: collapse;">
        <thead>
            <tr>
                <th width="<?php echo e($p_width, false); ?>%" style="border: 1px solid #000000; padding: 5px;"><?php echo e($receipt_details->table_product_label, false); ?></th>
                <th class="text-right" width="15%" style="border: 1px solid #000000; padding: 5px;"><?php echo e($receipt_details->table_qty_label, false); ?></th>
                <th class="text-right" width="15%" style="border: 1px solid #000000; padding: 5px;"><?php echo e($receipt_details->table_unit_price_label, false); ?></th>
                <?php if(!empty($receipt_details->discounted_unit_price_label)): ?>
                    <th class="text-right" width="10%" style="border: 1px solid #000000; padding: 5px;"><?php echo e($receipt_details->discounted_unit_price_label, false); ?></th>
                <?php endif; ?>
                <?php if(!empty($receipt_details->item_discount_label)): ?>
                    <th class="text-right" width="10%" style="border: 1px solid #000000; padding: 5px;"><?php echo e($receipt_details->item_discount_label, false); ?></th>
                <?php endif; ?>
                <th class="text-right" width="15%" style="border: 1px solid #000000; padding: 5px;"><?php echo e($receipt_details->table_subtotal_label, false); ?></th>
            </tr>
        </thead>
        <tbody style = "">
            <?php $__empty_1 = true; $__currentLoopData = $receipt_details->lines; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $line): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <tr>
                    <td style="border: 1px solid #000000; padding: 5px;">
                        <?php if(!empty($line['image'])): ?>
                            <img src="<?php echo e($line['image'], false); ?>" alt="Image" width="50" style="float: left; margin-right: 8px;">
                        <?php endif; ?>
                        <?php if(!empty($line['sell_line_note'])): ?>
                            <?php echo $line['sell_line_note']; ?>

                            <?php if(!empty($line['sub_sku'])): ?>
                                - <?php echo e($line['sub_sku'], false); ?>

                            <?php endif; ?>
                        <?php elseif(!empty($line['product_description'])): ?>
                            <?php echo $line['product_description']; ?>

                            <?php if(!empty($line['sub_sku'])): ?>
                                - <?php echo e($line['sub_sku'], false); ?>

                            <?php endif; ?>
                        <?php else: ?>
                            <?php echo e($line['name'], false); ?> <?php echo e($line['product_variation'], false); ?> <?php echo e($line['variation'], false); ?>

                            <?php if(!empty($line['sub_sku'])): ?>
                                - <?php echo e($line['sub_sku'], false); ?>

                            <?php endif; ?>
                            <?php if(!empty($line['brand'])): ?>, <?php echo e($line['brand'], false); ?> <?php endif; ?> 
                            <?php if(!empty($line['cat_code'])): ?>, <?php echo e($line['cat_code'], false); ?><?php endif; ?>
                            <?php if(!empty($line['product_custom_fields'])): ?>, <?php echo e($line['product_custom_fields'], false); ?> <?php endif; ?>
                        <?php endif; ?>
                        <?php if(!empty($line['lot_number'])): ?><br> <?php echo e($line['lot_number_label'], false); ?>:  <?php echo e($line['lot_number'], false); ?> <?php endif; ?> 
                        <?php if(!empty($line['product_expiry'])): ?>, <?php echo e($line['product_expiry_label'], false); ?>:  <?php echo e($line['product_expiry'], false); ?> <?php endif; ?>

                        <?php if(!empty($line['warranty_name'])): ?> <br><small><?php echo e($line['warranty_name'], false); ?> </small><?php endif; ?> <?php if(!empty($line['warranty_exp_date'])): ?> <small>- <?php echo e(\Carbon::createFromTimestamp(strtotime($line['warranty_exp_date']))->format(session('business.date_format')), false); ?> </small><?php endif; ?>
                        <?php if(!empty($line['warranty_description'])): ?> <small> <?php echo e($line['warranty_description'] ?? '', false); ?></small><?php endif; ?>

                        <?php if($receipt_details->show_base_unit_details && $line['quantity'] && $line['base_unit_multiplier'] !== 1): ?>
                        <br><small>
                            1 <?php echo e($line['units'], false); ?> = <?php echo e($line['base_unit_multiplier'], false); ?> <?php echo e($line['base_unit_name'], false); ?> <br>
                            <?php echo e($line['base_unit_price'], false); ?> x <?php echo e($line['orig_quantity'], false); ?> = <?php echo e($line['line_total'], false); ?>

                        </small>
                        <?php endif; ?>
                    </td>
                    <td class="text-right" style="border: 1px solid #000000; padding: 5px;">
                        <?php echo e($line['quantity'], false); ?> <?php echo e($line['units'], false); ?> 

                        <?php if($receipt_details->show_base_unit_details && $line['quantity'] && $line['base_unit_multiplier'] !== 1): ?>
                        <br><small>
                            <?php echo e($line['quantity'], false); ?> x <?php echo e($line['base_unit_multiplier'], false); ?> = <?php echo e($line['orig_quantity'], false); ?> <?php echo e($line['base_unit_name'], false); ?>

                        </small>
                        <?php endif; ?>
                    </td>
                    <td class="text-right" style="border: 1px solid #000000; padding: 5px;"><?php echo e($line['unit_price_before_discount'], false); ?></td>
                    <?php if(!empty($receipt_details->discounted_unit_price_label)): ?>
                        <td class="text-right" style="border: 1px solid #000000; padding: 5px;">
                            <?php echo e($line['unit_price_inc_tax'], false); ?> 
                        </td>
                    <?php endif; ?>
                    <?php if(!empty($receipt_details->item_discount_label)): ?>
                        <td class="text-right" style="border: 1px solid #000000; padding: 5px;">
                            <?php echo e($line['total_line_discount'] ?? '0.00', false); ?>


                            <?php if(!empty($line['line_discount_percent'])): ?>
                                (<?php echo e($line['line_discount_percent'], false); ?>%)
                            <?php endif; ?>
                        </td>
                    <?php endif; ?>
                    <td class="text-right" style="border: 1px solid #000000; padding: 5px;"><?php echo e($line['line_total'], false); ?></td>
                </tr>
                <?php if(!empty($line['modifiers'])): ?>
                    <?php $__currentLoopData = $line['modifiers']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $modifier): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td style="border: 1px solid #000000; padding: 5px;">
                                <?php echo e($modifier['name'], false); ?> <?php echo e($modifier['variation'], false); ?> 
                                <?php if(!empty($modifier['sub_sku'])): ?>, <?php echo e($modifier['sub_sku'], false); ?> <?php endif; ?> <?php if(!empty($modifier['cat_code'])): ?>, <?php echo e($modifier['cat_code'], false); ?><?php endif; ?>
                                <?php if(!empty($modifier['sell_line_note'])): ?>(<?php echo $modifier['sell_line_note']; ?>) <?php endif; ?> 
                            </td>
                            <td class="text-right" style="border: 1px solid #000000; padding: 5px;"><?php echo e($modifier['quantity'], false); ?> <?php echo e($modifier['units'], false); ?> </td>
                            <td class="text-right" style="border: 1px solid #000000; padding: 5px;"><?php echo e($modifier['unit_price_inc_tax'], false); ?></td>
                            <?php if(!empty($receipt_details->discounted_unit_price_label)): ?>
                                <td class="text-right" style="border: 1px solid #000000; padding: 5px;"><?php echo e($modifier['unit_price_exc_tax'], false); ?></td>
                            <?php endif; ?>
                            <?php if(!empty($receipt_details->item_discount_label)): ?>
                                <td class="text-right" style="border: 1px solid #000000; padding: 5px;">0.00</td>
                            <?php endif; ?>
                            <td class="text-right" style="border: 1px solid #000000; padding: 5px;"><?php echo e($modifier['line_total'], false); ?></td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php endif; ?>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr>
                    <td colspan="4" style="border: 1px solid #000000; padding: 5px;">&nbsp;</td>
                    <?php if(!empty($receipt_details->discounted_unit_price_label)): ?>
                        <td style="border: 1px solid #000000; padding: 5px;"></td>
                    <?php endif; ?>
                    <?php if(!empty($receipt_details->item_discount_label)): ?>
                        <td style="border: 1px solid #000000; padding: 5px;"></td>
                    <?php endif; ?>
                </tr>
            <?php endif; ?>
        </tbody>
    </table>

       <div class="row" style="color: #000000 !important; padding-left: 0px; padding-right: 0px;">
        <!-- Left Column - Only Additional Notes -->
        <div class="col-xs-6">
            <table class="table table-slim" style="border-collapse: collapse;">
                <tr>
                    <td style="border: 1px solid #000; padding: 3px; vertical-align: top; min-height: 100px;">
                      
                      
                            <p style="margin: 5px 0 0 0; white-space: pre-line;">Transport Cost :<?php echo e($receipt_details->additional_notes, false); ?></p>
                       
                    </td>
                </tr>
                
                  <?php if(!empty($receipt_details->payments)): ?>
                        <?php $__currentLoopData = $receipt_details->payments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $payment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            
                            <tr>
                                <td style="padding: 5px 0; border: none;">
                                    <?php echo e($payment['method'], false); ?>

                                    <span style="float: right;"><?php echo e($payment['amount'], false); ?></span>
                                </td>
                            </tr>
                            <tr>
                                <td style="padding: 0 0 4px 0; border: none; font-size: 11px; color: #888;">
                                    <span style="float: right;"><?php echo e($payment['date'], false); ?></span>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
            </table>
        </div>

        <!-- Right Column - All Payments and Totals -->
        <div class="col-xs-6">
            <table class="table table-slim">
                <tbody>
                    <!-- Payments -->
                  

                    <!-- Subtotal -->
                    <?php if(!empty($receipt_details->subtotal_label)): ?>
                        <tr>
                            <td style="padding: 6px 0 2px 0; border-top: 1px solid #ddd;">
                                <?php echo $receipt_details->subtotal_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->subtotal, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if(!empty($receipt_details->total_quantity_label)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->total_quantity_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->total_quantity, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if(!empty($receipt_details->total_items_label)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->total_items_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->total_items, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if(!empty($receipt_details->total_exempt_uf)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo app('translator')->get('lang_v1.exempt'); ?>
                                <span style="float: right;"><?php echo e($receipt_details->total_exempt, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if(!empty($receipt_details->shipping_charges)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->shipping_charges_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->shipping_charges, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if(!empty($receipt_details->packing_charge)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->packing_charge_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->packing_charge, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if( !empty($receipt_details->discount) ): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->discount_label; ?>

                                <span style="float: right;">(-) <?php echo e($receipt_details->discount, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if( !empty($receipt_details->total_line_discount) ): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->line_discount_label; ?>

                                <span style="float: right;">(-) <?php echo e($receipt_details->total_line_discount, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if( !empty($receipt_details->additional_expenses) ): ?>
                        <?php $__currentLoopData = $receipt_details->additional_expenses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td style="padding: 2px 0; border: none;">
                                    <?php echo e($key, false); ?>:
                                    <span style="float: right;">(+) <?php echo e($val, false); ?></span>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>

                    <?php if( !empty($receipt_details->reward_point_label) ): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->reward_point_label; ?>

                                <span style="float: right;">(-) <?php echo e($receipt_details->reward_point_amount, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if( !empty($receipt_details->tax) ): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->tax_label; ?>

                                <span style="float: right;">(+) <?php echo e($receipt_details->tax, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if( $receipt_details->round_off_amount > 0): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->round_off_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->round_off, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <!-- Total -->
                   

                    <!-- Total Paid -->
                    <?php if(!empty($receipt_details->total_paid)): ?>
                        <tr>
                            <td style="padding: 6px 0 2px 0; border-top: 1px solid #ddd;">
                                <strong><?php echo $receipt_details->total_paid_label; ?></strong>
                                <strong style="float: right;"><?php echo e($receipt_details->total_paid, false); ?></strong>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <!-- Total Due -->
                    <?php if(!empty($receipt_details->total_due) && !empty($receipt_details->total_due_label)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->total_due_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->total_due, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if(!empty($receipt_details->total_previous_due)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->total_previous_due_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->total_previous_due, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if(!empty($receipt_details->all_due)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->all_bal_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->all_due, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>
                     <tr>
                        <td style="padding:0px 0 2px 0; border-top: 0px solid #000; font-weight: bold;">
                            <!--<?php echo $receipt_details->total_label; ?>-->
                            <!--<span style="float: right;"><?php echo e($receipt_details->total, false); ?></span>-->
                            <?php if(!empty($receipt_details->total_in_words)): ?>
                                <br>
                         <strong>  In word : </strong><?php echo e(ucfirst($receipt_details->total_in_words), false); ?>


                            <?php endif; ?>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>

            <div class="border-bottom col-md-12" style="padding-left: 15px; padding-right: 15px;">
                <?php if(empty($receipt_details->hide_price) && !empty($receipt_details->tax_summary_label) ): ?>
                    <!-- tax -->
                    <?php if(!empty($receipt_details->taxes)): ?>
                        <table class="table table-slim table-bordered">
                            <tr>
                                <th colspan="2" class="text-center"><?php echo e($receipt_details->tax_summary_label, false); ?></th>
                            </tr>
                            <?php $__currentLoopData = $receipt_details->taxes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td class="text-center"><b><?php echo e($key, false); ?></b></td>
                                    <td class="text-center"><?php echo e($val, false); ?></td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </table>
                    <?php endif; ?>
                <?php endif; ?>
            </div>

           
        </div>
        <div class="row" style="color: #000000 !important; padding-left: 15px; padding-right: 15px;">
            <?php if(!empty($receipt_details->footer_text)): ?>
            <div class="<?php if($receipt_details->show_barcode || $receipt_details->show_qr_code): ?> col-xs-8 <?php else: ?> col-xs-12 <?php endif; ?>">
                <?php echo $receipt_details->footer_text; ?>

            </div>
            <?php endif; ?>
            <?php if($receipt_details->show_barcode || $receipt_details->show_qr_code): ?>
                <div class="<?php if(!empty($receipt_details->footer_text)): ?> col-xs-4 <?php else: ?> col-xs-12 <?php endif; ?> text-center">
                    <?php if($receipt_details->show_barcode): ?>
                        
                        <img class="center-block" src="data:image/png;base64,<?php echo e(DNS1D::getBarcodePNG($receipt_details->invoice_no, 'C128', 2,30,array(39, 48, 54), true), false); ?>">
                    <?php endif; ?>
                    
                    <?php if($receipt_details->show_qr_code && !empty($receipt_details->qr_code_text)): ?>
                        <img class="center-block mt-5" src="data:image/png;base64,<?php echo e(DNS2D::getBarcodePNG($receipt_details->qr_code_text, 'QRCODE', 3, 3, [39, 48, 54]), false); ?>">
                    <?php endif; ?>
                </div>
            <?php endif; ?>
    <div style="position: fixed; bottom: 0; left: 0; right: 0; background: #ffffff; z-index: 999; padding: 10px 15px;">
    <div style="border: 0px solid #000; text-align: center; padding: 8px; padding-left: 15px; padding-right: 15px;">
        <span style="background-color: #000000; color: #ffffff; padding: 5px 10px; border-radius: 3px; border: 1px solid #000000;">
            বিঃদ্রঃ – বিক্রিত মাল ফেরত যোগ্য নহে।
        </span>
    </div>

    <?php if(!empty($receipt_details->sell_custom_field_1_value)): ?>
        <br>
        <!--<strong><?php echo e($receipt_details->sell_custom_field_1_label, false); ?>:</strong> <?php echo $receipt_details->sell_custom_field_1_value ?? ''; ?>-->
    <?php endif; ?>

    <?php
        $showSignature = false;
        $fieldValue = trim($receipt_details->sell_custom_field_1_value ?? '');
        
        if(!empty($fieldValue) && (stripos($fieldValue, 'Signature') !== false || stripos($fieldValue, 'Singnature') !== false)) {
            $showSignature = true;
        }
    ?>

    <div class="receipt-footer" style="
        width: 100%; 
        text-align: center; 
        padding-top: 10px; 
        margin-top: 0px; 
        padding-bottom: 0px;
        font-family: 'Rajdhani', sans-serif !important;
        font-weight: 700 !important;
        font-size: 14px;
        padding-left: 15px;
        padding-right: 15px;
    ">
        <div style="display: flex; justify-content: space-between; align-items: flex-end; margin-left: 0.0in; margin-right: 0.0in;">
            <div style="
                font-family: 'Rajdhani', sans-serif !important;
                font-weight: 650 !important;
                font-size: 14px;
                text-align: left;
                border-top: 0px solid #000;
                padding-top: 10px;
                display: inline-block;
            ">
                Customer's Signature
            </div>
            <div style="
                font-family: 'Rajdhani', sans-serif !important;
                font-weight: 650 !important;
                font-size: 14px;
                text-align: right;
                display: inline-block;
            ">
                <div style="display: flex; flex-direction: column; align-items: flex-end; border-top: 0px solid #000; padding-top: 10px;">
                    <?php if($showSignature): ?>
                        <img src="<?php echo e(url('img/sign.png'), false); ?>" alt="Signature" style="max-width: 120px; height: auto; margin-bottom: 5px;">
                    <?php endif; ?>
                    <span>On Behalf of Bangladesh Cable Suppliers.</span>
                </div>
            </div>
        </div>
    </div>
</div>
    </div> 
    </div> 
    </div> 
    </div> 

<?php else: ?>
<div class="receipt-container" style="color: #000000 !important; margin-top:-20px;">

        
        <div class="receipt-content">
            <!-- business information here -->
            <div class="row" style="color: #000000 !important;">
                <!-- Logo -->
            <?php if(empty($receipt_details->letter_head)): ?>
        <?php if(!empty($receipt_details->logo)): ?>
            <div style="height: 1.5in; width: 100%;"></div>
        <?php endif; ?>
    <style>
        @media print {
            @page {
                margin: 10mm;
            }
            
            html, body {
                height: 100%;
                margin: 0;
                padding: 0;
            }
            
            .receipt-container {
                display: flex;
                flex-direction: column;
                min-height: 100vh;
                justify-content: space-between;
            }
            
            .receipt-content {
                flex: 1;
            }
            
            .receipt-footer {
                width: 100%;
                text-align: center;
                border-top: 0px solid #000;
                padding-top: 10px;
                margin-top: 20px;
                padding-bottom: 10px;
            }
        }
    </style>

    


                    <!-- Header text -->
                    <?php if(!empty($receipt_details->header_text)): ?>
                        <div class="col-xs-12">
                            <?php echo $receipt_details->header_text; ?>

                        </div>
                    <?php endif; ?>

                    <!-- business information here -->
                    <div class="col-xs-12 text-center">
                        <h2 class="text-center">
                            <!-- Shop & Location Name  -->
                            <?php if(!empty($receipt_details->display_name)): ?>
                                <?php echo e($receipt_details->display_name, false); ?>

                            <?php endif; ?>
                        </h2>

                        <!-- Address -->
                        <p>
                        <?php if(!empty($receipt_details->address)): ?>
                                <small class="text-center">
                                <?php echo $receipt_details->address; ?>

                                </small>
                        <?php endif; ?>
                        <?php if(!empty($receipt_details->contact)): ?>
                            <br/><?php echo $receipt_details->contact; ?>

                        <?php endif; ?>	
                        <?php if(!empty($receipt_details->contact) && !empty($receipt_details->website)): ?>
                            , 
                        <?php endif; ?>
                        <?php if(!empty($receipt_details->website)): ?>
                            <?php echo e($receipt_details->website, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->location_custom_fields)): ?>
                            <br><?php echo e($receipt_details->location_custom_fields, false); ?>

                        <?php endif; ?>
                        </p>
                        <p>
                        <?php if(!empty($receipt_details->sub_heading_line1)): ?>
                            <?php echo e($receipt_details->sub_heading_line1, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->sub_heading_line2)): ?>
                            <br><?php echo e($receipt_details->sub_heading_line2, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->sub_heading_line3)): ?>
                            <br><?php echo e($receipt_details->sub_heading_line3, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->sub_heading_line4)): ?>
                            <br><?php echo e($receipt_details->sub_heading_line4, false); ?>

                        <?php endif; ?>		
                        <?php if(!empty($receipt_details->sub_heading_line5)): ?>
                            <br><?php echo e($receipt_details->sub_heading_line5, false); ?>

                        <?php endif; ?>
                        </p>
                        <p>
                        <?php if(!empty($receipt_details->tax_info1)): ?>
                            <b><?php echo e($receipt_details->tax_label1, false); ?></b> <?php echo e($receipt_details->tax_info1, false); ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->tax_info2)): ?>
                            <b><?php echo e($receipt_details->tax_label2, false); ?></b> <?php echo e($receipt_details->tax_info2, false); ?>

                        <?php endif; ?>
                        </p>
                    <?php endif; ?>


                    <!-- Title of receipt -->
                    <?php if(!empty($receipt_details->invoice_heading)): ?>
                        <h3 class="text-center">
                            <?php echo $receipt_details->invoice_heading; ?>

                        </h3>
                    <?php endif; ?>
                </div>
                <?php if(!empty($receipt_details->letter_head)): ?>
                    <div class="col-xs-12 text-center">
                        <img style="width: 100%;margin-bottom: 10px;" src="<?php echo e($receipt_details->letter_head, false); ?>">
                    </div>
                <?php endif; ?>
            </div>

            
            <div style="padding-left: 5px; padding-right: 5px; padding-bottom: 15px;">
              
            <div class="col-xs-12 text-center">
                <!-- Invoice  number, Date  -->
                <p style="width: 100% !important" class="word-wrap">
                    <span class="pull-left text-left word-wrap">
                        <?php if(!empty($receipt_details->invoice_no_prefix)): ?>
                            <b><?php echo $receipt_details->invoice_no_prefix; ?></b>
                        <?php endif; ?>
                       <span style="border: 1px solid #000000; border-radius: 4px; padding: 2px 10px; display: inline-block;">
        <?php echo e($receipt_details->invoice_no, false); ?>

    </span>

                        <?php if(!empty($receipt_details->types_of_service)): ?>
                            <br/>
                            <span class="pull-left text-left">
                                <strong><?php echo $receipt_details->types_of_service_label; ?>:</strong>
                                <?php echo e($receipt_details->types_of_service, false); ?>

                                <!-- Waiter info -->
                                <?php if(!empty($receipt_details->types_of_service_custom_fields)): ?>
                                    <?php $__currentLoopData = $receipt_details->types_of_service_custom_fields; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <br><strong><?php echo e($key, false); ?>: </strong> <?php echo e($value, false); ?>

                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endif; ?>
                            </span>
                        <?php endif; ?>

                        <!-- Table information-->
                        <?php if(!empty($receipt_details->table_label) || !empty($receipt_details->table)): ?>
                            <br/>
                            <span class="pull-left text-left">
                                <?php if(!empty($receipt_details->table_label)): ?>
                                    <b><?php echo $receipt_details->table_label; ?></b>
                                <?php endif; ?>
                                <?php echo e($receipt_details->table, false); ?>


                                <!-- Waiter info -->
                            </span>
                        <?php endif; ?>

                      
                        <?php if(!empty($receipt_details->client_id_label)): ?>
                            <br/>
                            <b><?php echo e($receipt_details->client_id_label, false); ?></b> <?php echo e($receipt_details->client_id, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->customer_tax_label)): ?>
                            <br/>
                            <b><?php echo e($receipt_details->customer_tax_label, false); ?></b> <?php echo e($receipt_details->customer_tax_number, false); ?>

                        <?php endif; ?>
                        <!--<?php if(!empty($receipt_details->customer_custom_fields)): ?>-->
                        <!--    <br/><?php echo $receipt_details->customer_custom_fields; ?>-->
                        <!--<?php endif; ?>-->
                        <?php if(!empty($receipt_details->sales_person_label)): ?>
                            <br/>
                            <b><?php echo e($receipt_details->sales_person_label, false); ?></b> <?php echo e($receipt_details->sales_person, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->commission_agent_label)): ?>
                            <br/>
                            <strong><?php echo e($receipt_details->commission_agent_label, false); ?></strong> <?php echo e($receipt_details->commission_agent, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->customer_rp_label)): ?>
                            <br/>
                            <strong><?php echo e($receipt_details->customer_rp_label, false); ?></strong> <?php echo e($receipt_details->customer_total_rp, false); ?>

                        <?php endif; ?>
                    </span>

                    <span class="pull-right text-left">
                        <b><?php echo e($receipt_details->date_label, false); ?></b>
                        <?php
        $date_parts = explode('-', date('d-m-Y', strtotime($receipt_details->invoice_date)));
    ?>

    <span style="display: inline-block;">
        <span style="border: 1px solid #000000; border-radius: 3px; padding: 3px 5px;"><?php echo e($date_parts[0], false); ?></span>
        <span style="margin: 0 2px;"></span>
        <span style="border: 1px solid #000000; border-radius: 3px; padding: 3px 5px;"><?php echo e($date_parts[1], false); ?></span>
        <span style="margin: 0 2px;"></span>
        <span style="border: 1px solid #000000; border-radius: 3px; padding: 3px 5px;"><?php echo e($date_parts[2], false); ?></span>
    </span>

                        <?php if(!empty($receipt_details->due_date_label)): ?>
                        <br><b><?php echo e($receipt_details->due_date_label, false); ?></b> <?php echo e($receipt_details->due_date ?? '', false); ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->brand_label) || !empty($receipt_details->repair_brand)): ?>
                            <br>
                            <?php if(!empty($receipt_details->brand_label)): ?>
                                <b><?php echo $receipt_details->brand_label; ?></b>
                            <?php endif; ?>
                            <?php echo e($receipt_details->repair_brand, false); ?>

                        <?php endif; ?>


                        <?php if(!empty($receipt_details->device_label) || !empty($receipt_details->repair_device)): ?>
                            <br>
                            <?php if(!empty($receipt_details->device_label)): ?>
                                <b><?php echo $receipt_details->device_label; ?></b>
                            <?php endif; ?>
                            <?php echo e($receipt_details->repair_device, false); ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->model_no_label) || !empty($receipt_details->repair_model_no)): ?>
                            <br>
                            <?php if(!empty($receipt_details->model_no_label)): ?>
                                <b><?php echo $receipt_details->model_no_label; ?></b>
                            <?php endif; ?>
                            <?php echo e($receipt_details->repair_model_no, false); ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->serial_no_label) || !empty($receipt_details->repair_serial_no)): ?>
                            <br>
                            <?php if(!empty($receipt_details->serial_no_label)): ?>
                                <b><?php echo $receipt_details->serial_no_label; ?></b>
                            <?php endif; ?>
                            <?php echo e($receipt_details->repair_serial_no, false); ?><br>
                        <?php endif; ?>
                        <?php if(!empty($receipt_details->repair_status_label) || !empty($receipt_details->repair_status)): ?>
                            <?php if(!empty($receipt_details->repair_status_label)): ?>
                                <b><?php echo $receipt_details->repair_status_label; ?></b>
                            <?php endif; ?>
                            <?php echo e($receipt_details->repair_status, false); ?><br>
                        <?php endif; ?>
                        
                        <?php if(!empty($receipt_details->repair_warranty_label) || !empty($receipt_details->repair_warranty)): ?>
                            <?php if(!empty($receipt_details->repair_warranty_label)): ?>
                                <b><?php echo $receipt_details->repair_warranty_label; ?></b>
                            <?php endif; ?>
                            <?php echo e($receipt_details->repair_warranty, false); ?>

                            <br>
                        <?php endif; ?>
                        
                        <!-- Waiter info -->
                        <?php if(!empty($receipt_details->service_staff_label) || !empty($receipt_details->service_staff)): ?>
                            <br/>
                            <?php if(!empty($receipt_details->service_staff_label)): ?>
                                <b><?php echo $receipt_details->service_staff_label; ?></b>
                            <?php endif; ?>
                            <?php echo e($receipt_details->service_staff, false); ?>

                        <?php endif; ?>
                        <?php if(!empty($receipt_details->shipping_custom_field_1_label)): ?>
                            <br><strong><?php echo $receipt_details->shipping_custom_field_1_label; ?> :</strong> <?php echo $receipt_details->shipping_custom_field_1_value ?? ''; ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->shipping_custom_field_2_label)): ?>
                            <br><strong><?php echo $receipt_details->shipping_custom_field_2_label; ?>:</strong> <?php echo $receipt_details->shipping_custom_field_2_value ?? ''; ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->shipping_custom_field_3_label)): ?>
                            <br><strong><?php echo $receipt_details->shipping_custom_field_3_label; ?>:</strong> <?php echo $receipt_details->shipping_custom_field_3_value ?? ''; ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->shipping_custom_field_4_label)): ?>
                            <br><strong><?php echo $receipt_details->shipping_custom_field_4_label; ?>:</strong> <?php echo $receipt_details->shipping_custom_field_4_value ?? ''; ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->shipping_custom_field_5_label)): ?>
                            <br><strong><?php echo $receipt_details->shipping_custom_field_2_label; ?>:</strong> <?php echo $receipt_details->shipping_custom_field_5_value ?? ''; ?>

                        <?php endif; ?>
                        
                        <?php if(!empty($receipt_details->sale_orders_invoice_no)): ?>
                            <br>
                            <strong><?php echo app('translator')->get('restaurant.order_no'); ?>:</strong> <?php echo $receipt_details->sale_orders_invoice_no ?? ''; ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->sale_orders_invoice_date)): ?>
                            <br>
                            <strong><?php echo app('translator')->get('lang_v1.order_dates'); ?>:</strong> <?php echo $receipt_details->sale_orders_invoice_date ?? ''; ?>

                        <?php endif; ?>

                        <!--<?php if(!empty($receipt_details->sell_custom_field_1_value)): ?>-->
                        <!--    <br>-->
                        <!--    <strong><?php echo e($receipt_details->sell_custom_field_1_label, false); ?>:</strong> <?php echo $receipt_details->sell_custom_field_1_value ?? ''; ?>-->
                        <!--<?php endif; ?>-->

                        <?php if(!empty($receipt_details->sell_custom_field_2_value)): ?>
                            <br>
                            <strong><?php echo e($receipt_details->sell_custom_field_2_label, false); ?>:</strong> <?php echo $receipt_details->sell_custom_field_2_value ?? ''; ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->sell_custom_field_3_value)): ?>
                            <br>
                            <strong><?php echo e($receipt_details->sell_custom_field_3_label, false); ?>:</strong> <?php echo $receipt_details->sell_custom_field_3_value ?? ''; ?>

                        <?php endif; ?>

                        <?php if(!empty($receipt_details->sell_custom_field_4_value)): ?>
                            <br>
                            <strong><?php echo e($receipt_details->sell_custom_field_4_label, false); ?>:</strong> <?php echo $receipt_details->sell_custom_field_4_value ?? ''; ?>

                        <?php endif; ?>

                    </span>
                </p>
            </div>
        </div>
      
        <?php
            // Split by <br> tags
            $lines = array_filter(array_map('trim', explode('<br>', $receipt_details->customer_info)));
            
            $customer_name = '';
            $address = '';
            $mobile = '';
            
            foreach ($lines as $line) {
                // Check if line contains "Name:"
                if (stripos($line, 'Name:') !== false) {
                    $customer_name = trim(str_ireplace('Name:', '', $line));
                    // Remove any extra commas or spaces
                    $customer_name = trim($customer_name, ', ');
                }
                // Check if line contains "Mobile:" (with or without bold tags)
                elseif (stripos($line, 'Mobile:') !== false || stripos($line, '<b>Mobile</b>:') !== false) {
                    // Remove any HTML tags and "Mobile:" label
                    $mobile = strip_tags($line);
                    $mobile = trim(str_ireplace(['Mobile:', 'mobile:'], '', $mobile));
                }
                // Otherwise it's address
                else {
                    // Strip any HTML tags
                    $address = strip_tags($line);
                    $address = trim($address);
                }
            }
            
            // If name is still empty, try to get it from first line
            if (empty($customer_name) && isset($lines[0])) {
                $first_line = strip_tags($lines[0]);
                if (stripos($first_line, 'Name:') !== false) {
                    $customer_name = trim(str_ireplace('Name:', '', $first_line));
                    $customer_name = trim($customer_name, ', ');
                } else {
                    $customer_name = $first_line;
                }
            }
            
            // If address is empty, try second line
            if (empty($address) && isset($lines[1])) {
                $address = strip_tags($lines[1]);
                $address = trim($address);
            }
        ?>
        <?php
        $customFieldValue = '';
        if(!empty($receipt_details->customer_custom_fields)) {
            $customFieldValue = strip_tags($receipt_details->customer_custom_fields);
            // Remove "Designation:" if it exists
            $customFieldValue = trim(str_ireplace('Designation:', '', $customFieldValue));
            $customFieldValue = trim($customFieldValue, ', ');
        }
    ?>

    <!-- Display custom field value without label -->

        <br/></br>

    <?php if(!empty($customFieldValue)): ?>
        <div style="margin-top:-20px; padding-left: 20px; padding-right: 20px;">
           <div style="border: 0px solid #000000; border-radius: 4px; padding: 3px 8px; margin-top: 3px; display: block; width: 100%; box-sizing: border-box;">
          To</br>  <?php echo e($customFieldValue, false); ?>

        </div>
    <?php endif; ?>
      
      
    
      <!-- customer info -->
                       <?php if(!empty($receipt_details->customer_info)): ?>
        <!-- Customer Name with rounded border - Full Width -->
    <?php if(!empty($customer_name)): ?>
        <div style="border: 0px solid #000000; border-radius: 4px; padding: 0px 8px; margin-top: 00px; display: block; width: 100%; box-sizing: border-box;">
             <?php echo e($customer_name, false); ?>

        </div>
    <?php endif; ?>

    <!-- Address with rounded border - Full Width -->
    <?php if(!empty($address)): ?>
        <div style="border: 0px solid #000000; border-radius: 4px; padding: 0px 8px; margin-top: 0px; display: block; width: 100%; box-sizing: border-box;">
           <?php echo e($address, false); ?>

        </div>
    <?php endif; ?>

    <!-- Mobile with rounded border - Full Width -->
    <?php if(!empty($mobile)): ?>
        <div style="border: 0px solid #000000; border-radius: 4px; padding: 0px 8px; margin-top:0px; display: block; width: 30%; box-sizing: border-box;">
            <strong>Mobile:</strong> <?php echo e($mobile, false); ?>

        </div>
    <?php endif; ?>
    <?php endif; ?>
    <div style="border: 0px solid #000000; border-radius: 4px; padding: 0px 8px; margin-top:0px; display: block; width: 100%; box-sizing: border-box;">
        <p style="text-align: justify; margin: 0;">
            <span style="font-weight: bold; text-decoration: underline; display: block; text-align: left; padding=bottom:10px; padding-top:10px;">Sub: Price offer of Power Cable.</span> <br>
         <strong>   Dear Sir,</strong><br><br>
            We 'BANGLADESH CABLE SUPPLIERS' well recognized since 1992 having 34 years of experience exclusively as Shipping Cable Suppliers. We are operating our cable supplier units with name and fame, enjoying wide reputation in the market for our consistent quality, true commitment and sincere customer services.<br>
            In response to our telephonic conversation we are pleased to quote below our prices, terms & conditions for sales of Shipping Cables for the electrical work of your prestigious project at Chittagong.
        </p>
    </div>
    </div>
        <div class="row" style="color: #000000 !important; padding-left: 15px; padding-right: 15px;">
            <?php if ($__env->exists('sale_pos.receipts.partial.common_repair_invoice')) echo $__env->make('sale_pos.receipts.partial.common_repair_invoice', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
        </div>

        <div class="row" style="color: #000000 !important; padding-left: 20px; padding-right: 20px;">
            <div class="col-xs-12">
                <br/>
                <?php
                    $p_width = 45;
                ?>
                <?php if(!empty($receipt_details->item_discount_label)): ?>
                    <?php
                        $p_width -= 10;
                    ?>
                <?php endif; ?>
                <?php if(!empty($receipt_details->discounted_unit_price_label)): ?>
                    <?php
                        $p_width -= 10;
                    ?>
                <?php endif; ?>
                   <strong> 1. Price </strong>
              <table class="table table-responsive table-slim" style="border: 0px solid #000000; border-collapse: collapse;">
        <thead>
            <tr>
                <th class="text-left" width="3%" style="border: 1px solid #000000; padding: 5px;">SL.</th>
                <th width="<?php echo e($p_width, false); ?>%" style="border: 1px solid #000000; padding: 5px;text-align:center;">Cable Size/Items</th>
                <th class="text-right" width="10%" style="border: 1px solid #000000; padding: 5px;"><?php echo e($receipt_details->table_qty_label, false); ?></th>
                    <th class="text-right" width="10%" style="border: 1px solid #000000; padding: 5px;">Unit</th>
                <th class="text-right" width="15%" style="border: 1px solid #000000; padding: 5px;"><?php echo e($receipt_details->table_unit_price_label, false); ?></th>
                <?php if(!empty($receipt_details->discounted_unit_price_label)): ?>
                    <th class="text-right" width="10%" style="border: 1px solid #000000; padding: 5px;"><?php echo e($receipt_details->discounted_unit_price_label, false); ?></th>
                <?php endif; ?>
                <?php if(!empty($receipt_details->item_discount_label)): ?>
                    <th class="text-right" width="10%" style="border: 1px solid #000000; padding: 5px;"><?php echo e($receipt_details->item_discount_label, false); ?></th>
                <?php endif; ?>
                <th class="text-right" width="25%" style="border: 1px solid #000000; padding: 5px;">Total Taka</th>
            </tr>
        </thead>
        <tbody>
            <?php $__empty_1 = true; $__currentLoopData = $receipt_details->lines; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $line): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <tr>
                    <td style="border: 1px solid #000000; padding: 5px;"><?php echo e($loop->iteration, false); ?></td>
                    <td style="border: 1px solid #000000; padding: 5px;">
                        <?php if(!empty($line['image'])): ?>
                            <img src="<?php echo e($line['image'], false); ?>" alt="Image" width="50" style="float: left; margin-right: 8px;">
                        <?php endif; ?>
                        <?php if(!empty($line['sell_line_note'])): ?>
                            <?php echo $line['sell_line_note']; ?>

                            <?php if(!empty($line['sub_sku'])): ?>
                                - <?php echo e($line['sub_sku'], false); ?>

                            <?php endif; ?>
                        <?php elseif(!empty($line['product_description'])): ?>
                            <?php echo $line['product_description']; ?>

                            <?php if(!empty($line['sub_sku'])): ?>
                                - <?php echo e($line['sub_sku'], false); ?>

                            <?php endif; ?>
                        <?php else: ?>
                            <?php echo e($line['name'], false); ?> <?php echo e($line['product_variation'], false); ?> <?php echo e($line['variation'], false); ?>

                            <?php if(!empty($line['sub_sku'])): ?>
                                - <?php echo e($line['sub_sku'], false); ?>

                            <?php endif; ?>
                            <?php if(!empty($line['brand'])): ?>, <?php echo e($line['brand'], false); ?> <?php endif; ?> 
                            <?php if(!empty($line['cat_code'])): ?>, <?php echo e($line['cat_code'], false); ?><?php endif; ?>
                            <?php if(!empty($line['product_custom_fields'])): ?>, <?php echo e($line['product_custom_fields'], false); ?> <?php endif; ?>
                        <?php endif; ?>
                        <?php if(!empty($line['lot_number'])): ?><br> <?php echo e($line['lot_number_label'], false); ?>:  <?php echo e($line['lot_number'], false); ?> <?php endif; ?> 
                        <?php if(!empty($line['product_expiry'])): ?>, <?php echo e($line['product_expiry_label'], false); ?>:  <?php echo e($line['product_expiry'], false); ?> <?php endif; ?>

                        <?php if(!empty($line['warranty_name'])): ?> <br><small><?php echo e($line['warranty_name'], false); ?> </small><?php endif; ?> <?php if(!empty($line['warranty_exp_date'])): ?> <small>- <?php echo e(\Carbon::createFromTimestamp(strtotime($line['warranty_exp_date']))->format(session('business.date_format')), false); ?> </small><?php endif; ?>
                        <?php if(!empty($line['warranty_description'])): ?> <small> <?php echo e($line['warranty_description'] ?? '', false); ?></small><?php endif; ?>

                        <?php if($receipt_details->show_base_unit_details && $line['quantity'] && $line['base_unit_multiplier'] !== 1): ?>
                        <br><small>
                            1 <?php echo e($line['units'], false); ?> = <?php echo e($line['base_unit_multiplier'], false); ?> <?php echo e($line['base_unit_name'], false); ?> <br>
                            <?php echo e($line['base_unit_price'], false); ?> x <?php echo e($line['orig_quantity'], false); ?> = <?php echo e($line['line_total'], false); ?>

                        </small>
                        <?php endif; ?>
                    </td>
                    <td class="text-right" style="border: 1px solid #000000; padding: 5px;">
                        <?php echo e($line['quantity'], false); ?> 
    </td>
    <td class="text-right" style="border: 1px solid #000000; padding: 5px;">
        <?php echo e($line['units'], false); ?> 
                        <?php if($receipt_details->show_base_unit_details && $line['quantity'] && $line['base_unit_multiplier'] !== 1): ?>
                        <br><small>
                            <?php echo e($line['quantity'], false); ?> x <?php echo e($line['base_unit_multiplier'], false); ?> = <?php echo e($line['orig_quantity'], false); ?> <?php echo e($line['base_unit_name'], false); ?>

                        </small>
                        <?php endif; ?>
                    </td>
                    <td class="text-right" style="border: 1px solid #000000; padding: 5px;"><?php echo e($line['unit_price_before_discount'], false); ?></td>
                    <?php if(!empty($receipt_details->discounted_unit_price_label)): ?>
                        <td class="text-right" style="border: 1px solid #000000; padding: 5px;">
                            <?php echo e($line['unit_price_inc_tax'], false); ?> 
                        </td>
                    <?php endif; ?>
                    <?php if(!empty($receipt_details->item_discount_label)): ?>
                        <td class="text-right" style="border: 1px solid #000000; padding: 5px;">
                            <?php echo e($line['total_line_discount'] ?? '0.00', false); ?>


                            <?php if(!empty($line['line_discount_percent'])): ?>
                                (<?php echo e($line['line_discount_percent'], false); ?>%)
                            <?php endif; ?>
                        </td>
                    <?php endif; ?>
                    <td class="text-right" style="border: 1px solid #000000; padding: 5px;"><?php echo e($line['line_total'], false); ?></td>
                </tr>
                <?php if(!empty($line['modifiers'])): ?>
                    <?php $__currentLoopData = $line['modifiers']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $modifier): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td style="border: 1px solid #000000; padding: 5px;">
                                <?php echo e($modifier['name'], false); ?> <?php echo e($modifier['variation'], false); ?> 
                                <?php if(!empty($modifier['sub_sku'])): ?>, <?php echo e($modifier['sub_sku'], false); ?> <?php endif; ?> <?php if(!empty($modifier['cat_code'])): ?>, <?php echo e($modifier['cat_code'], false); ?><?php endif; ?>
                                <?php if(!empty($modifier['sell_line_note'])): ?>(<?php echo $modifier['sell_line_note']; ?>) <?php endif; ?> 
                            </td>
                            <td class="text-right" style="border: 1px solid #000000; padding: 5px;"><?php echo e($modifier['quantity'], false); ?> <?php echo e($modifier['units'], false); ?> </td>
                            <td class="text-right" style="border: 1px solid #000000; padding: 5px;"><?php echo e($modifier['unit_price_inc_tax'], false); ?></td>
                            <?php if(!empty($receipt_details->discounted_unit_price_label)): ?>
                                <td class="text-right" style="border: 1px solid #000000; padding: 5px;"><?php echo e($modifier['unit_price_exc_tax'], false); ?></td>
                            <?php endif; ?>
                            <?php if(!empty($receipt_details->item_discount_label)): ?>
                                <td class="text-right" style="border: 1px solid #000000; padding: 5px;">0.00</td>
                            <?php endif; ?>
                            <td class="text-right" style="border: 1px solid #000000; padding: 5px;"><?php echo e($modifier['line_total'], false); ?></td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php endif; ?>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr>
                    <td colspan="4" style="border: 1px solid #000000; padding: 5px;">&nbsp;</td>
                    <?php if(!empty($receipt_details->discounted_unit_price_label)): ?>
                        <td style="border: 1px solid #000000; padding: 5px;"></td>
                    <?php endif; ?>
                    <?php if(!empty($receipt_details->item_discount_label)): ?>
                        <td style="border: 1px solid #000000; padding: 5px;"></td>
                    <?php endif; ?>
                </tr>
            <?php endif; ?>
        </tbody>
    </table>

       <div class="row" style="color: #000000 !important; padding-left: 0px; padding-right: 0px;">
        <!-- Left Column - Only Additional Notes -->
        <div class="col-xs-6">
            <table class="table table-slim" style="border-collapse: collapse;">
                  <tr>
                        <td style="padding:0px 0 2px 0; border-top: 0px solid #000; font-weight: bold;">
                            <!--<?php echo $receipt_details->total_label; ?>-->
                            <!--<span style="float: right;"><?php echo e($receipt_details->total, false); ?></span>-->
                            <?php if(!empty($receipt_details->total_in_words)): ?>
                           
                         <strong>  In word : </strong><?php echo e(ucfirst($receipt_details->total_in_words), false); ?>


                            <?php endif; ?>
                        </td>
                    </tr>
                
                  <?php if(!empty($receipt_details->payments)): ?>
                        <?php $__currentLoopData = $receipt_details->payments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $payment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            
                            <tr>
                                <td style="padding: 5px 0; border: none;">
                                    <?php echo e($payment['method'], false); ?>

                                    <span style="float: right;"><?php echo e($payment['amount'], false); ?></span>
                                </td>
                            </tr>
                            <tr>
                                <td style="padding: 0 0 4px 0; border: none; font-size: 11px; color: #888;">
                                    <span style="float: right;"><?php echo e($payment['date'], false); ?></span>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
            </table>
        </div>

        <!-- Right Column - All Payments and Totals -->
        <div class="col-xs-6">
            <table class="table table-slim">
                <tbody>
                 <!-- Subtotal -->
                    <?php if(!empty($receipt_details->subtotal_label)): ?>
                        <tr>
                            <td style="padding: 0px 0 0px 0; border-top: px solid #ddd; text-align:right;">
                             <strong>   Total Payable Amount :
                                <span style="float: right;"><?php echo e($receipt_details->subtotal, false); ?></span></strong>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if(!empty($receipt_details->total_quantity_label)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->total_quantity_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->total_quantity, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if(!empty($receipt_details->total_items_label)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->total_items_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->total_items, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if(!empty($receipt_details->total_exempt_uf)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo app('translator')->get('lang_v1.exempt'); ?>
                                <span style="float: right;"><?php echo e($receipt_details->total_exempt, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if(!empty($receipt_details->shipping_charges)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->shipping_charges_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->shipping_charges, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if(!empty($receipt_details->packing_charge)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->packing_charge_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->packing_charge, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if( !empty($receipt_details->discount) ): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->discount_label; ?>

                                <span style="float: right;">(-) <?php echo e($receipt_details->discount, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if( !empty($receipt_details->total_line_discount) ): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->line_discount_label; ?>

                                <span style="float: right;">(-) <?php echo e($receipt_details->total_line_discount, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if( !empty($receipt_details->additional_expenses) ): ?>
                        <?php $__currentLoopData = $receipt_details->additional_expenses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td style="padding: 2px 0; border: none;">
                                    <?php echo e($key, false); ?>:
                                    <span style="float: right;">(+) <?php echo e($val, false); ?></span>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>

                    <?php if( !empty($receipt_details->reward_point_label) ): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->reward_point_label; ?>

                                <span style="float: right;">(-) <?php echo e($receipt_details->reward_point_amount, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if( !empty($receipt_details->tax) ): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->tax_label; ?>

                                <span style="float: right;">(+) <?php echo e($receipt_details->tax, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if( $receipt_details->round_off_amount > 0): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->round_off_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->round_off, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <!-- Total -->
                   

                    <!-- Total Paid -->
                    <?php if(!empty($receipt_details->total_paid)): ?>
                        <tr>
                            <td style="padding: 6px 0 2px 0; border-top: 1px solid #ddd;">
                                <strong><?php echo $receipt_details->total_paid_label; ?></strong>
                                <strong style="float: right;"><?php echo e($receipt_details->total_paid, false); ?></strong>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <!-- Total Due -->
                    <?php if(!empty($receipt_details->total_due) && !empty($receipt_details->total_due_label)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->total_due_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->total_due, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if(!empty($receipt_details->total_previous_due)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->total_previous_due_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->total_previous_due, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>

                    <?php if(!empty($receipt_details->all_due)): ?>
                        <tr>
                            <td style="padding: 2px 0; border: none;">
                                <?php echo $receipt_details->all_bal_label; ?>

                                <span style="float: right;"><?php echo e($receipt_details->all_due, false); ?></span>
                            </td>
                        </tr>
                    <?php endif; ?>
                  
                </tbody>
            </table>
        </div>
    </div>
    <div class="terms-section">
        <div class="terms-item">
            <span class="terms-number">2.</span>
            <span class="terms-text"><strong>Payment :</strong> Advance payment to be made by pay order or A/C payee cheque with purchase order.</span>
        </div>
        <div class="terms-item">
            <span class="terms-number">3.</span>
            <span class="terms-text"><strong>Packing :</strong> Bundle of cable.</span>
        </div>
        <div class="terms-item">
            <span class="terms-number">4.</span>
            <span class="terms-text"><strong>Delivery :</strong> Delivery must be done within 3 (Three) days from the date hereof.</span>
        </div>
        <div class="terms-item">
            <span class="terms-number">5.</span>
            <span class="terms-text"><strong>Validity :</strong> Our offer will remain valid for 7 (Seven) days from the date hereof.</span>
        </div>
        <div class="terms-item">
            <span class="terms-number">6.</span>
            <span class="terms-text"><strong>Warranty/Replacement Facility :</strong> For 10 (Ten) Years.</span>
        </div>
        <br>
        <div class="terms-footer">
            <p>Should you require any further information or clarification, please do not hesitate to contact us.</p>
            <p>We assure you of our best services at all time.</p>
        </div>
    </div>
            <div class="border-bottom col-md-12" style="padding-left: 15px; padding-right: 15px;">
                <?php if(empty($receipt_details->hide_price) && !empty($receipt_details->tax_summary_label) ): ?>
                    <!-- tax -->
                    <?php if(!empty($receipt_details->taxes)): ?>
                        <table class="table table-slim table-bordered">
                            <tr>
                                <th colspan="2" class="text-center"><?php echo e($receipt_details->tax_summary_label, false); ?></th>
                            </tr>
                            <?php $__currentLoopData = $receipt_details->taxes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td class="text-center"><b><?php echo e($key, false); ?></b></td>
                                    <td class="text-center"><?php echo e($val, false); ?></td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </table>
                    <?php endif; ?>
                <?php endif; ?>
            </div>

           
        </div>

      
</div>
<div style="margin-top: 30px;">
    <div style="padding-left: 15px; padding-right: 15px; padding-top: 10px; border-bottom: 0px solid #000;">
        <strong>Best Regards</strong>
    </div>
</div>
        <div class="row" style="color: #000000 !important; padding-left: 15px; padding-right: 15px;">
            <?php if(!empty($receipt_details->footer_text)): ?>
            <div class="<?php if($receipt_details->show_barcode || $receipt_details->show_qr_code): ?> col-xs-8 <?php else: ?> col-xs-12 <?php endif; ?>">
                <?php echo $receipt_details->footer_text; ?>

            </div>
            <?php endif; ?>
            <?php if($receipt_details->show_barcode || $receipt_details->show_qr_code): ?>
                <div class="<?php if(!empty($receipt_details->footer_text)): ?> col-xs-4 <?php else: ?> col-xs-12 <?php endif; ?> text-center">
                    <?php if($receipt_details->show_barcode): ?>
                        
                        <img class="center-block" src="data:image/png;base64,<?php echo e(DNS1D::getBarcodePNG($receipt_details->invoice_no, 'C128', 2,30,array(39, 48, 54), true), false); ?>">
                    <?php endif; ?>
                    
                    <?php if($receipt_details->show_qr_code && !empty($receipt_details->qr_code_text)): ?>
                        <img class="center-block mt-5" src="data:image/png;base64,<?php echo e(DNS2D::getBarcodePNG($receipt_details->qr_code_text, 'QRCODE', 3, 3, [39, 48, 54]), false); ?>">
                    <?php endif; ?>
                </div>
            <?php endif; ?>

  <!-- Footer -->
<div class="footer" style="
    width: 100%; 
    text-align: center; 
    padding-top: 10px; 
    padding-bottom: 0px;
    border-top: 1px solid #ddd;
    margin-bottom: 0px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 999;
">
    <!--<img src="<?php echo e(asset('img/bfooter.png'), false); ?>" alt="Footer" style="max-width: 100%; height: auto; max-height: auto;">-->
   
</div>
            </div>
        </div>
    </div>

    </div> 
    </div> 
    </div> 
    </div>    

<?php endif; ?><?php /**PATH /home/saprocom/cable.sapro365.com/cable/resources/views/sale_pos/receipts/classic.blade.php ENDPATH**/ ?>