<table class="table table-black">
    <thead>
        <tr class="mytotal">
            <th class="solidgrayright">#</th>
            <th class="solidgrayright">رقم القيد</th>
            <th>مدين</th>
            <th>دائن</th>
            <th>الحساب</th>
            <th>التاريخ</th>
            <th>البيان</th>
            <th class="solidgrayleft">بيان القيد</th>
            <th class="solidgrayleft">عكس القيد</th>
        </tr>
    </thead>
    <tbody>
        {assign var=i value=1}
        {assign var=debtorTotal value=0}
        {assign var=creditorTotal value=0}
        {foreach $allDailyEntery as $dailyEntery}
        {if $dailyEntery->id !=""}

        <!--عكس القيد-->
        {if $dailyEntery->reverseofid != 0 && $dailyEntery->reverseofid != -10}
        <tr class="solidgraytop" style="background-color: #FCE4EC">
            {else}
        <tr class="solidgraytop">
            {/if}

            <td class="solidgrayleft solidgrayright">{$i}</td>
            {assign var=i value=$i+1}
            <td class="solidgrayleft solidgrayright">{$dailyEntery->id}</td>
            {else}

            <!--عكس القيد-->
            {if $dailyEntery->reverseofid > 0}
        <tr style="background-color: #FCE4EC">
            {else}
        <tr>
            {/if}

            <td class="hidetop solidgrayleft solidgrayright"></td>
            <td class="hidetop solidgrayleft solidgrayright"></td>
            {/if}



            {if $dailyEntery->type eq 0}
            <td>{$dailyEntery->value}</td>
            <td></td>
            <td> <span class="fromaccountstyle">من حــ/ </span> {$dailyEntery->accountstreeName}</td>
            <td>{$dailyEntery->dDateTime}</td>
            <td>{$dailyEntery->dComment}</td>
            {assign var=debtorTotal value=$debtorTotal+ $dailyEntery->value}
            {else}
            <td></td>
            <td>{$dailyEntery->value}</td>
            <td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="toaccountstyle">الى حــ/ </span>{$dailyEntery->accountstreeName}</td>
            <td>{$dailyEntery->dDateTime}</td>
            <td>{$dailyEntery->dComment}</td>
            {assign var=creditorTotal value=$creditorTotal+ $dailyEntery->value}
            {/if}




            {if $dailyEntery->id !=""}
            <td class="solidgrayleft solidgrayright">{$dailyEntery->entryComment}</td>
            {if $dailyEntery->reverseofid != 0 || $dailyEntery->reverseofid == -10}
            <td class="solidgrayleft solidgrayright"><a class="btn btn-default btn-lg printicon" href="dailyentry.php?do=print&id={$dailyEntery->id}" target="_blank"></a></td>
            {else}
            <td class="solidgrayleft solidgrayright">
                <a class="btn btn-default btn-lg undoicon" href="dailyentry.php?do=reverse&id={$dailyEntery->id}"></a>
                <a class="btn btn-default btn-lg printicon" href="dailyentry.php?do=print&id={$dailyEntery->id}" target="_blank"></a>
            </td>
            {/if}
            {else}
            <td class="hidetop solidgrayleft solidgrayright"></td>
            <td class="hidetop solidgrayleft solidgrayright"></td>
            {/if}
        </tr>
        {/foreach}
        <tr class="mytotal">
            <td class="solidgrayright"></td>
            <td class="solidgrayright"></td>
            <td></td>
            <td></td>
            <td></td>
            <td colspan="4" class="solidgrayleft" style="text-align:center;"></td>

        </tr>
        <!--tr class="mytotal">
            <td class="solidgrayright"></td>
            <td class="solidgrayright"></td>
            <td>{$debtorTotal}</td>
            <td>{$creditorTotal}</td>
            <td colspan="3" class="solidgrayleft" style="text-align:center;">الاجــــــــــمــــــــــالــــــى</td>

        </tr-->

    </tbody>
</table>