<style>
    .myresult {
        -webkit-print-color-adjust: exact;
    }
    .nodata{
        background-color: #72B4EC;
        color: white;
        border-radius: 13px;
        margin: 14px;
        font-size: 24px;
        text-align: center;
        padding: 5px;
    }
    .borderRight{ border-right: 3px solid #E57373;}
    .borderTop{ border-top: 3px solid #E57373;}
    .borderThin{ border-top: 1px solid #E0E0E0;}//E57373
</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[196]->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="restaurantplaystation.php?do=dayReport" method="post">
                    <div class="form-group">
                        <label class="sr-only">الجهاز</label>
                        <select class="select2 wdt100" name="restaurantplaystationId" id="restaurantplaystationId">
                            <option value="0"> -- كل الاجهزة --</option>
                            {foreach $restaurantPlaystation as $data}
                            <option value="{$data->id}">{$data->name}</option>
                            {/foreach}
                        </select>
                    </div>
                    <br/>
                    <div class="form-group">
                        <label class="sr-only">من التاريخ</label>
                        <div  class="input-group date form_datetime col-md-5" data-date="" data-date-format="yyyy-mm-dd  h:i:s" data-link-field="dtp_input1">
                            <input class="form-control" size="16" type="text" value="" name="datefrom" id="datefrom" readonly="" >
                            <span class="input-group-addon " style="width: 0%;"><span class=" glyphicon glyphicon-remove col-lg-4"></span></span>
                            <span class="input-group-addon"  style="width: 0%;"><span class="glyphicon glyphicon-th col-lg-4"></span></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="sr-only">إلى التاريخ</label>
                        <div  class="input-group date form_datetime col-md-5" data-date="" data-date-format="yyyy-mm-dd  h:i:s" data-link-field="dtp_input1">
                            <input class="form-control" size="16" type="text" value="" name="dateto" id="dateto" readonly="" >
                            <span class="input-group-addon " style="width: 0%;"><span class=" glyphicon glyphicon-remove col-lg-4"></span></span>
                            <span class="input-group-addon" style="width: 0%;"><span class="glyphicon glyphicon-th col-lg-4"></span></span>
                        </div>
                    </div>
                    <div class="clearfix"></div>

                    <br />
                    <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">
                    {if $playstationPlay > 0}
                    <hr/>
                    <table class="willprint table-black" style="width: 100%"><!--dataTableClass-->
                        <thead>
                            <tr>
                                <th>#</th>
                                <th>رقم الفاتورة</th>
                                <th>التاريخ</th>
                                <!--<th>طباعة</th>-->

                                <th>اسم الجهاز</th>
                                <th>وقت البداية</th>
                                <th>وقت النهاية</th>
                                <th>وقت اللعب</th>
                                <th>السعر</th>
                                <th>الخصم</th>
                                <th>اجمالى</th>

                                <th>الاجمالى العام</th>
                            </tr>
                        </thead>
                        <tbody>
                            {assign var=i value=1}
                            {assign var=lastSellBillId value=0}
                            {assign var=total value=0}
                            {assign var=totalOnePlay value=0}
                            {foreach $playstationPlay as $data}
                            <tr {if $lastSellBillId == $data->allMovesUnitedSellBillId}{else}class="borderTop"{/if}>
                                {if $lastSellBillId == $data->allMovesUnitedSellBillId}
                                <td></td>
                                <td></td>
                                <td></td>
                                <!--<td></td>-->
                                {else}
                                <td>{$i}{assign var=i value=$i+1}</td>
                                <td><a href="sellbillController.php?do=showDetail&sellbillid={$data->allMovesUnitedSellBillId}" target="_blank"><u style="color: blue;">{$data->allMovesUnitedSellBillId}</u></a></td>
                                <td>{$data->startsysDate}</td>
                                <!--<td><a href="sellbillprintController.php?do=printResBill&id={$data->id}" target="_blank" ype="button" class="btn btn-default btn-lg printicon"></a></td>-->
                                {/if}
                                <td class="borderThin">{$data->name} / {if $data->priceIs == 0} فردى {else} زوجى {/if}</td>
                                <td class="borderThin">{$data->startTime}</td>
                                <td class="borderThin">{$data->endTime}</td>
                                <td class="borderThin">{$data->duration}</td>
                                <td class="borderThin">{if $data->priceIs == 0} {$data->hourPrice} {else} {$data->hourPriceMulti} {/if}</td>
                                <td class="borderThin">{$data->discount}</td>
                                <td class="borderThin">{$data->totalPrice}{assign var=totalOnePlay value=$totalOnePlay+$data->totalPrice}</td>
                                <!--{*if $lastSellBillId == $data->allMovesUnitedSellBillId*}-->
                                {if $data->sellBillId > 0}
                                <td>{$totalOnePlay}</td>
                                {assign var=total value=$total+$totalOnePlay}
                                {assign var=totalOnePlay value=0}
                                {else}
                                <td></td>
                                {/if}
                            </tr>
                            {assign var=lastSellBillId value=$data->allMovesUnitedSellBillId}

                            {/foreach}
                            <tr class="borderTop"><td colspan="12"></td></tr>
                        </tbody>
                    </table>
                    <div class="clearfix"></div>
                    <br/>
                    <div class="col-lg-offset-8 col-lg-4 ">
                        <div class="well well-sm">
                            <h4 class="text-center">الإجمالى:  {$total}</h4>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                    <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>
                    {else}
                    <div class="nodata">عفوا لا توجد نتائج</div>
                    {/if}

                    <div class="clearfix"></div>
                </div>
            </div>
        </div>

        </html>
