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

<style>



    @media print {
        table, tbody, thead, th, tr, td {
            font-size: 12px !important;
        }
        .mytd {
            max-width:20px; !important
        }

    }
</style>

<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">التقارير</a></li>
            <li class="active"> تقرير يوميه يوم </li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading"> تقرير يوميه يوم
                <a href="{$youtubes[126]->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">
                <form class="form-inline hidden-print" action="cashflowsController.php?do=show" method="post">

                    <div class="form-group  col-lg-3" style="padding-right: 0">

                        <label class="sr-only">الخزنة</label>
                        <select class="select2"  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  col-lg-3" style="padding-right: 0">

                        <label class="sr-only">اسم العمليه</label>
                        <select class="select2"  name="processid[]" id="processid" multiple="true">
                            {foreach $allprocess as $process}
                            <option value="{$process->processname}">{$process->processname}</option>
                            {/foreach}
                        </select>
                    </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="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 panel-m">
                <!-- Default panel contents -->
                <div class="panel-heading">{$message}</div>
                <div class="panel-body">
                    <hr/>
                    <table style="width:100% !important;" class="table table-black" border="1">
                        <thead>

                            <!--=================================================-->

                            <tr>
                                <!-- </div>
                                     <div class="col-lg-offset-8 col-lg-4">
                                   <div class="well well-sm">
                                     <h4 class="text-center">  اجمالى راس المال {$totalcapitalmoney} {$currency}</h4>
                                   </div>
                                 </div>-->
                            </tr>
                            <tr class="active">
                                <th colspan="4" style="text-align: center">
                                    تقرير يوميه يوم
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td colspan="2">
                                    <table style="width:100% !important;vertical-align:top;"  class="table-black" >
                                        <tr>


                                            <td></td>

                                            <td colspan="3"> <span style="text-decoration: underline; font-weight:bold;">وارد</span></td>
                                        </tr>

                                        {foreach $savedailyData as $mysavedailyData}
                                        {if {$mysavedailyData->savedailychangetype} eq 0}
                                        <tr>


                                            <td class="mytd" >{$mysavedailyData->savedailychangeamount}</td>
                                            <td  colspan=" 2" nowrap="nowrap">{$mysavedailyData->processname} {if !empty ($mysavedailyData->personName) } ({$mysavedailyData->personName}) {/if}</td>

                                            <td  colspan="2" class=" hidden-print" nowrap="nowrap"><a  class="color-white" href="{$mysavedailyData->link}"> التفاصيل</a></td>
                                        </tr>
                                        {/if}
                                        {/foreach}



                                        {foreach $Fixedassetsdata as $assetdata}
                                        <tr>

                                            <td>{$assetdata->sumasset}</td>
                                            <td  colspan=" 2" nowrap="nowrap"> {$assetdata->cattitel}</td>
                                        </tr>
                                        {/foreach}

                                        <td colspan="2"><div >
                                                <span >  {$changeAmountSumpluse} </span>
                                            </div></td>

                                        <td colspan="2"> <span style="font-weight:bold;"> اجمالى الوارد  </span></td>
                            </tr>
                    </table>
                    </td>
                    <td colspan="2" style="vertical-align:top;">
                        <table  style="width:100% !important; " class="table-black" >

                            <tr>

                                <td></td>
                                <td colspan="3"> <span style="text-decoration: underline; font-weight:bold;"> خارج </span></td>

                            </tr>


                            {foreach $savedailyData as $mysavedailyData}
                            {if {$mysavedailyData->savedailychangetype} eq 1}
                            <tr>


                                <td  class="mytd"  style="max-width:20px;">{$mysavedailyData->savedailychangeamount}</td>
                                <td nowrap="nowrap" colspan="2">{$mysavedailyData->processname} {if !empty ($mysavedailyData->personName) } ({$mysavedailyData->personName}) {/if}</td>
                                <td  colspan=" 2"  class=" hidden-print" nowrap="nowrap"><a class="color-white" href="{$mysavedailyData->link}"> التفاصيل</a></td>
                            </tr>
                            {/if}
                            {/foreach}


                            <tr>

                                <td ><div >
                                        <span>  {$changeAmountminse} </span>
                                    </div></td>

                                <td colspan="3"> <span style="font-weight:bold;">  اجمالى المدفوعات </span></td>
                            </tr>
                        </table>
                    </td>
                    </tr>

                    <tr class="foot">
                        <td colspan="2"  style="text-align:center !important" class="black-color">

                            صافى الرصيد
                        </td>
                        <td colspan="2" style="text-align:center !important" class="black-color">

                            {math equation=" y  - x " x={$changeAmountminse} y={$changeAmountSumpluse}}
                        </td>

                    </tr>
                    <!--<tr class="active">
                      <th>
                        <center>
                          مجموع
                        </center>
                      </th>
                      <th>{$forYou}</th>
                      <th>
                        <center>
                          مجموع
                        </center>
                      </th>
                      <th>{$forTox}</th>
                    </tr>-->

                    </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 hidden-print">طباعة</button>
                                </div>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
