<div class="row">
    <div class="container">
        <!--show-------------------------------------------------------------------------------------------->
        <div class="panel panel-default">
            <!-- Default panel contents -->
            <div class="panel-heading">
                <h3 class="panel-title"><strong> ميزان المراجعة</strong></h3>
                <a href="{$youtubes[222]->url}" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
            </div>
            <div class="panel-body">
                <div id="dailyEntryTable">

                    <table class="table table-black">
                        <thead>
                            <tr class="mytotal">
                                <th class="solidgrayright">#</th>
                                <th>الكود</th>
                                <th>الحساب</th>
                                <th>مدين</th>
                                <th>دائن</th>

                            </tr>
                        </thead>
                        <tbody>
                            {assign var=i value=1}
                            {foreach $balanceArray as $data}
                            <tr>
                                <td>{$i}</td>
                                <td>{$data->layingOrder}</td>
                                <td>{$data->customName}</td>

                                <td>
                                    {if ($data->accountNature == 0 && $data->theValue >0) ||  ($data->accountNature == 1 && $data->theValue <0)}

                                    {if $data->theValue < 0}{assign var=val value=$data->theValue*-1}{else}{assign var=val value=$data->theValue}{/if}
                                    {$val}

                                    {/if}
                                </td>
                                <td>
                                    {if ($data->accountNature == 1 && $data->theValue >0) ||  ($data->accountNature == 0 && $data->theValue <0)}

                                    {if $data->theValue < 0}{assign var=val value=$data->theValue*-1}{else}{assign var=val value=$data->theValue}{/if}
                                    {$val}

                                    {/if}
                                </td>

                            </tr>
                            {assign var=i value=$i+1}
                            {/foreach}
                            <tr style="background-color: gray">
                                <td colspan="3" style="text-align: center">الاجــمــالــى</td>
                                <td>{$totalDebtor}</td>
                                <td>{$totalCreditor}</td>
                            </tr>
                        </tbody>
                    </table>

                </div>
                </br>
            </div>
        </div>
    </div>
</div>








<div id="accountsTree" style="display:none">
    <option value=""></option>
    {foreach $accountsTree as $element}
    <option value="{$element->id}">{$element->id}-{$element->name}</option>
    {/foreach}
</div>
