<meta charset="utf-8">
<table>
    <table>
        <tr>
            <th></th><th></th><th></th><th></th>
            <th>{$bill->clientname} </th><th>اسم المورد</th>
            <th></th><th></th><th></th><th></th>
            <th>{$bill->receivedate} </th><th>تاريخ الاستلام</th>
        </tr>
        <tr>
            <th></th><th></th><th></th><th></th>
            <th>{$bill->billno} </th><th>رقم الفاتورة </th>
            <th></th><th></th><th></th><th></th>
            <th>{$bill->comment} </th><th>التعليق </th>
        </tr>
        <tr>
            <th></th><th></th><th></th><th></th>
            <th>{$bill->billdate} </th><th>تاريخ الفاتورة</th>
            <th></th><th></th><th></th><th></th>
            <th>{$bill->alloweddays}</th><th>الحد الأقصى للسداد</th>
        </tr>
<!--        <tr>
            <th></th><th></th><th></th><th></th>
            <th>{$bill->alloweddays}</th><th>الحد الأقصى للسداد</th>
            <th></th><th></th><th></th><th></th>
        </tr>-->
        {if $bill->kashftype == 1}
        <tr>
            <th></th><th></th><th></th><th></th>
            <th>{$bill->kashfplace}</th><th>مكان الكشف</th>
            <th></th><th></th><th></th><th></th>
            <th>{$bill->kashfdate}</th><th>تاريخ الكشف</th>

        </tr>
        {/if}
    </table>

    <table class="table billtable table-bordered table-black" >
        <thead>
            <tr>
                <th></th>
                <th></th>
                <th></th>
                <th></th>
                <th></th>
                <th></th>
                <th></th>
                <th class="wdt100n">الاجمالى</th>
                <th class="wdt80">السعر</th>
                <th class="wdt100n">العدد</th>
                <th class="wdt240">ملاحظات</th>
                <th class="wdt400">اسم المنتج</th>

            </tr>
        </thead>
        <tbody id="productsTable">
            {foreach $billProducts as $product}
            <tr>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td>{$product->producttotalprice}</td>
                <td>{$product->productprice}</td>
                <td>{$product->productno}</td>
                <td>{$product->note}</td>
                <td>{$product->productName}</td>
            </tr>

            {/foreach}
        </tbody>
    </table>
    <table>
        <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>{$bill->productstotalprice}</td><td>إجمالي المشتريات</td></tr>
    </table>
    <table>
        <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>{$bill->kashfdiscount}</td><td>الخصم</td></tr>
        <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>{$bill->netbillvalue}</td><td>الاجمالى</td></tr>
        <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>{if $bill->discounttype == 1} مباشر {else if $bill->discounttype == 2}نسبة{/if}</td><td>نوع الخصم</td></tr>
        <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>{$bill->discountvalue}</td><td>قيمة الخصم</td></tr>
        <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>{$bill->finalnetbillvalue}</td><td>الصافى</td></tr>
    </table>
</table>