{{-- {{ $name }} --}}

{{-- <!DOCTYPE html>
<html>
<head>
    <title>Invoice Table</title>
    <style>
        table {
            border-collapse: collapse;
            width: 60%;
        }
        th, td {
            border: 1px solid #444;
            padding: 8px;
            text-align: left;
        }
        th {
            background: #f2f2f2;
        }
    </style>
</head>
<body>
    {{-- <h5>{{ $name }}</h5> --}}
    {{-- <h5>{!! $name !!}</h5> --}}
    {{-- <div style="text-align: center; font-weight: bold;">
        {{ $company }}
    </div>
<br>
<h5>{!! $greeting !!}</h5>
    <table>
        <thead>
             <tr>
                <th style="text-align: center; border: 1px solid #444; padding: 8px; background: #f2f2f2;">No</th>
                <th style="text-align: center; border: 1px solid #444; padding: 8px; background: #f2f2f2;">Plant</th>
                <th style="text-align: center; border: 1px solid #444; padding: 8px; background: #f2f2f2;">Total Number Of Invoice</th>
                <th style="text-align: center; border: 1px solid #444; padding: 8px; background: #f2f2f2;">Scanned Number Of Invoice</th>
            </tr>
        </thead>
        <tbody>
            @foreach($tableData as $row) --}}
                {{-- <tr>
                    <td>{{ $row['no'] }}</td>
                    <td>{{ $row['plant'] }}</td>
                    <td>{{ $row['totalInvoice'] }}</td>
                    <td>{{ $row['scannedInvoice'] }}</td>
                </tr> --}}
                  {{-- <tr>
                    <td style="border: 1px solid #444; padding: 8px; text-align: center;">{{ $row['no'] }}</td>
                    <td style="border: 1px solid #444; padding: 8px; text-align: center; white-space: nowrap;">{{ $row['plant'] }}</td>
                    <td style="border: 1px solid #444; padding: 8px; text-align: center;">{{ $row['totalInvoice'] }}</td>
                    <td style="border: 1px solid #444; padding: 8px; text-align: center;">{{ $row['scannedInvoice'] }}</td>
                </tr>
            @endforeach
        </tbody>
    </table>
    <h5>{!! $wishes !!}</h5>
</body>
</html> --}}


<!DOCTYPE html>
<html>
<head>
    <title>Invoice Tables</title>
    <style>
        table {
            border-collapse: collapse;
            width: 60%;
            margin-bottom: 24px;
        }
        th, td {
            border: 1px solid #444;
            padding: 8px;
            text-align: center;
        }
        th {
            background: #f2f2f2;
        }
        h4 {
            margin-bottom: 8px;
        }
    </style>
</head>
<body>
    <div style="text-align: center; font-weight: bold;">
        {{ $company }}
    </div>
    <br>
    <p>{!! $greeting !!}</p>

    {{-- Serial Invoice Table --}}
    @if(!empty($serialTableData))
        <h4>Serial Invoice</h4>
        <table>
            <thead>
                <tr>
                    <th>No</th>
                    <th>Plant</th>
                    <th>Total Number of Invoice</th>
                    <th>Scanned Number of Invoice</th>
                    <th>Total Invoice Quantity</th>
                    <th>Scanned Invoice Quantity</th>
                </tr>
            </thead>
            <tbody>
                @foreach($serialTableData as $row)
                    <tr>
                        <td>{{ $row['no'] }}</td>
                        <td style="white-space: nowrap;">{{ $row['plant'] }}</td>
                        <td>{{ $row['totalInvoice'] }}</td>
                        <td>{{ $row['scannedInvoice'] }}</td>
                        <td>{{ $row['totalInvoiceQuan'] }}</td>
                        <td>{{ $row['scannedInvoiceQuan'] }}</td>
                    </tr>
                @endforeach
            </tbody>
        </table>
    @endif

    {{-- Material Invoice Table --}}
    @if(!empty($materialTableData))
        <h4>Material Invoice</h4>
        <table>
            <thead>
                <tr>
                    <th>No</th>
                    <th>Plant</th>
                    <th>Total Number of Invoice</th>
                    <th>Scanned Number of Invoice</th>
                    <th>Total Invoice Quantity</th>
                    <th>Scanned Invoice Quantity</th>
                </tr>
            </thead>
            <tbody>
                @foreach($materialTableData as $row)
                    <tr>
                        <td>{{ $row['no'] }}</td>
                        <td style="white-space: nowrap;">{{ $row['plant'] }}</td>
                        <td>{{ $row['totalInvoice'] }}</td>
                        <td>{{ $row['scannedInvoice'] }}</td>
                        <td>{{ $row['totalInvoiceQuan'] }}</td>
                        <td>{{ $row['scannedInvoiceQuan'] }}</td>
                    </tr>
                @endforeach
            </tbody>
        </table>
    @endif

    {{-- Bundle Invoice Table --}}
    @if(!empty($bundleTableData))
        <h4>Bundle Invoice</h4>
        <table>
            <thead>
                <tr>
                    <th>No</th>
                    <th>Plant</th>
                    <th>Total Number of Invoice</th>
                    <th>Scanned Number of Invoice</th>
                    <th>Total Invoice Quantity</th>
                    <th>Scanned Invoice Quantity</th>
                </tr>
            </thead>
            <tbody>
                @foreach($bundleTableData as $row)
                    <tr>
                        <td>{{ $row['no'] }}</td>
                        <td style="white-space: nowrap;">{{ $row['plant'] }}</td>
                        <td>{{ $row['totalInvoice'] }}</td>
                        <td>{{ $row['scannedInvoice'] }}</td>
                        <td>{{ $row['totalInvoiceQuan'] }}</td>
                        <td>{{ $row['scannedInvoiceQuan'] }}</td>
                    </tr>
                @endforeach
            </tbody>
        </table>
    @endif
    <p>{!! $wishes !!}</p>
</body>
</html>


