<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 class="form-group">
                    <label class="sr-only"> اخفاء الاجمالى صفر</label>
                    <input type="checkbox" name="bure" id="bure" checked="checked" value="1">
                    <label for="bure"></label>
                </div>
                <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}
                                    <input type="hidden" id="iszero{$i}" class="iszeroClass" data-itr="{$i}" value="{if $data->theValue == 0}1{else}0{/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>


{literal}
<script>
    $(function () {

        $('#bure').live('change', function () {
            $('.iszeroClass').each(function () {
                var itr = $(this).data('itr');
                if ($('#bure').is(':checked') && $(this).val() == 1) {
                    $('#iszero' + itr).parent().parent().hide();
                } else {
                    $('#iszero' + itr).parent().parent().show();
                }
            })
        });
        $('#bure').change();


    });

</script>
{/literal}