@php
    $total_qty = 0;
    $total_price = 0;
@endphp

    <!DOCTYPE html>
<html>
<head>
</head>
<body>
<style>
    table {
        font-family: 'aealarabiya', sans-serif;
        border-collapse: collapse;
        width: 100%;
        border-color:#2770c0;
    }

    td, th {
        border: 2px solid #2770c0;
        text-align: center;
        padding: 8px;
        width: 10px;
    }

    body{
        font-family: 'Lato', sans-serif;
        font-family:  'aealarabiya', sans-serif;
    }
</style>

<table width="100%" style=" font-family: aealarabiya, sans-serif; border-collapse: collapse;">
    <thead style="background-color: #fdf2cc">
    <tr>
        <th style="background-color: #fdf2cc" rowspan="2">الصنف</th>
        <th style="background-color: #fdf2cc" colspan="2"> المبيعات</th>
    </tr>
    <tr>
        <th style="background-color: #fdf2cc">كمية</th>
        <th style="background-color: #fdf2cc">قيمة</th>
    </tr>
    </thead>
    @foreach($report as $key=> $row)
        <tr >
            <td >{{ $row->product->currentDescription->title }}</td>
            <td >{{ $row->qty }}</td>
            <td >{{ $row->price }}</td>
        </tr>
        @php
            $total_qty += $row->qty;
            $total_price += $row->price;
        @endphp
    @endforeach
    <tr>
        <td>الاجمالي</td>
        <td >{{ $total_qty }}</td>
        <td >{{ $total_price }}</td>
    </tr>
</table>
