<meta charset="UTF-8">
<style>
    .solidgraytop{
        border-top-style:solid;
        border-top-color:#000;
    }
    .solidgrayleft{
        border-left:solid;
        border-left-width:3px;
        border-color: #000;
    }
    .solidgrayright{
        border-right-style:solid;
        border-right-color:#000;
    }
    .solidgraybottom{
        border-top-style:solid;
        border-top-color:#000;
    }
    .hidetop{
        border-top:hidden !important;
    }
    .fromaccountstyle{
        font-weight:bold;
        font-size:17px;
        color:blue;
    }
    .toaccountstyle
    {
        font-weight:bold;
        font-size:17px;
        color:purple;
    }
    .mytotal{
        background-color:#000;
        font-weight:bold;
    }
    .nodata{
        background-color: #72B4EC;
        color: white;
        border-radius: 13px;
        margin: 14px;
        font-size: 24px;
        text-align: center;
        padding: 5px;
    }
    .table {
        font-family: arail;
        direction: rtl;
        border-collapse: collapse;
    }
    .table th{
        border-top:3px solid #000;
        border-right:3px solid #000;
        border-left:3px solid #000;
        padding: 5px 3px;
        background: #333;
        color: #fff;
    }
    .table td{
        text-align: right;
        padding-right: 3px;

    }

    .xno ,.xrq, .xmdn ,.xdan{
        width:5% !important;
    }
    .xdate {
        wudth:8%;
    }
    .xacc {
        min-width: 20%;
    }
    .xbyn {
        min-width: 42% !important;
    }
    .xbyq {
        min-width: 10% !important;
    }
    .bold {
        font-size: 14px;
    }
    @media print {
        @page {
            margin: 0px !important;
        }
    }

</style>

<center>
    <img src="{$path}/images/upload/{$Programsettingdata->logo}" width="150px" height="100px" />



    <div style="clear:both"></div>
    <br/>
    <table class="table table-black">
        <thead>
            <tr>
                <th class="xno">#</th>
                <th class="xrq">ر.ق</th>
                <th class="xmdn">مدين</th>
                <th class="xdan">دائن</th>
                <th class="xacc"> الحساب</th>
                <th class="xdate">التاريخ</th>
                <th class="xbyn">البيان</th>
                <th class="xbyq">بيان القيد</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}
                {else}
                {/if}
                {else}
                <td class="hidetop solidgrayleft solidgrayright"></td>
                {/if}
            </tr>
            {/foreach}
            <tr style="border-top:3px solid #000;"> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr>
            <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr>
            <tr class="bold">
                <td colspan="4"><b>المحاسب</b></td>
                <td colspan="2" style="text-align: center"><b>المراجع</b></td>
                <td colspan="2" style="text-align: left;padding-left: 50px;"><b>المدير</b></td>
            </tr>

        </tbody>
    </table>

</center>
{literal}
<script>
    //print_Custom('mycustomheader');
    window.print();
    setTimeout(window.close, 1500);
</script>
{/literal}