<style>
    .myresult {
        -webkit-print-color-adjust: exact;
    }
</style>

<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">المصروفات والايرادات</a></li>
            <li><a href="settlementsaveController.php?do=show">الخزن</a></li>
            <li class="active">معالجة عجز خزنة</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading" style="padding:5px 15px 15px">
                <h3 class="panel-title" style="display: inline-block;">عرض معالجات العجز</h3>
                <a href="{$youtubes[84]->url}" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
                <a href="settlementsaveController.php" class="hidden-print"><input type="button"  id="submit" style="margin-left: 12px" class="btn btn-primary pull-left " value="إضافة جديد"/></a>
            </div>

            <div class="panel-body">
                <form class="form-inline hidden-print" action="settlementsaveController.php?do=show" method="post">
                    <div class="form-group">
                        <label class="sr-only">الخزنة</label>
                        <select class="select2 wdt100"  name="saveid" id="saveid" >
                            <option value="-1">اختر خزنة</option>


                            {foreach $saveData as $save}


                            <option value="{$save->saveid}">{$save->savename}</option>

                            {/foreach}


                        </select>
                    </div>
                    <div class="form-group">
                        <label class="sr-only">  انواع معالجة  عجز </label>
                        <select class="select2 wdt100" name="typesimpotencetreatmentid" id="typesimpotencetreatmentid" >
                            <option value="-1"> اختر  نوع</option>
                            {foreach $typesimpotencetreatmentData as $typesimpotencetreatment}
                            <option value="{$typesimpotencetreatment->typesimpotencetreatmentid}">{$typesimpotencetreatment->typesimpotencetreatmentname}</option>
                            {/foreach}
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="sr-only"> اختر مورد</label>
                        <select class="select2 wdt100" name="supplierid" id="supplierid" >
                            <option value="-1"> اختر مورد</option>
                            <option value="-2"> كل الموردين</option>
                            {foreach $supplierData as $supplier}
                            <option value="{$supplier->supplierid}">{$supplier->suppliername}</option>
                            {/foreach}
                        </select>
                    </div>
                    <br/>
                    <div class="form-group">
                        <label class="sr-only">من التاريخ</label>
                        <input type="text" class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd" name="from" >
                    </div>
                    <div class="form-group">
                        <label class="sr-only">إلى التاريخ</label>
                        <input type="text" class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd" name="to" >
                    </div>
                    <button type="submit" class="btn btn-primary">بحث</button>
                </form>
            </div>
            <div class="panel panel-default">
                <!-- Default panel contents -->
                <div class="panel-heading">{$message}</div>
                <div class="panel-body">
                    <hr/>
                    <table class="table table-black">
                        <thead>
                            <tr>
                                <th>اسم الخزينة</th>
                                <th>اسم العملية</th>
                                <th>اسم المورد</th>
                                <th>نوع معالجة العجز</th>
                                <th>المبلغ قبل </th>
                                <th>القيمة المتغيرة</th>
                                <th>المبلغ بعد</th>
                                <th>التاريخ</th>
                                <th>التعليق</th>
                                <th class="hidden-print">قيد اليومية</th>
                            </tr>
                        </thead>
                        <tbody>

                            {foreach $savedailyData as $savedaily}
                            <tr {if $savedaily.impotencetreatmentsuppliersavetype eq 0} style="background:#f7f7f7" {/if}>
                                <td>{$savedaily.savename}</td>
                                <td>{if $savedaily.impotencetreatmentsuppliersavetype eq 0}
                                    تسوية خزنة بالإضافة
                                    {else}  تسوية خزنة بالنقص  {/if}</td>
                                <td>{$savedaily.suppliername}</td>
                                <td>{$savedaily.typesimpotencetreatmentname}</td>
                                <td>{$savedaily.impotencetreatmentsuppliersavebefore}</td>
                                <td>{$savedaily.impotencetreatmentsuppliersavetamount}</td>
                                <td>{$savedaily.impotencetreatmentsuppliersaveafter}</td>
                                <td>{$savedaily.impotencetreatmentsuppliersavedate}</td>
                                <td>{$savedaily.impotencetreatmentsuppliersavecomment}</td>
                                <td class="hidden-print"><a href="dailyentry.php?id={$savedaily.dailyentryid}" target="_blank" type="button" class="btn btn-default btn-lg editicon"> </a></td>
                            </tr>
                            {/foreach}

                        </tbody>

                    </table>
                    <div class="clearfix"></div>
                    <hr />
                    <div  class="noprint">
                        <div class="col-lg-12">
                            <div class="form-group">
                                <div class="col-lg-4">
                                    <button type="button" onclick="print_Custom('mycustomheader');" class="btn btn-success pull-right">طباعة</button>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>