<table class="table table-black">
    <thead>
        <tr style="font-weight:bold;background-color:#BDBDBD;">
            <th>مدين</th>
            <th>دائن</th>
            <th>البيان</th>
            <th>التاريخ</th>
        </tr>
    </thead>
    <tbody>
        {assign var=debtorTotal value=0}
        {assign var=creditorTotal value=0}
        {foreach $allDailyEntery as $dailyEntery}
        {foreach $dailyEntery->from as $debtor}
        <tr style="border-top-style:solid; border-top-color:#eed3d7;">
            <td>{$debtor->value}</td>
            <td></td>
            <td> من حــ/ {$debtor->accountstreeName}</td>
            <td>{$dailyEntery->thedate}</td>
        </tr>
        {assign var=debtorTotal value=$debtorTotal+ $debtor->value}
        {/foreach}
        {foreach $dailyEntery->to as $creditor}
        <tr>
            <td></td>
            <td>{$creditor->value}</td>
            <td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; الى حــ/ {$creditor->accountstreeName}</td>
            <td>{$dailyEntery->thedate}</td>
        </tr>
        {assign var=creditorTotal value=$creditorTotal+ $creditor->value}
        {/foreach}
        {/foreach}

        <tr style="font-weight:bold;background-color:#BDBDBD;">
            <td>{$debtorTotal}</td>
            <td>{$creditorTotal}</td>
            <td colspan="3" style="text-align:center">الاجــــــــــمــــــــــالــــــى</td>

        </tr>

    </tbody>
</table>