
<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">كشف حساب عميل باعداد العيش فى فترة<br />
                {if $message != ""}
                {$message}
                {/if}
                <a href="{$youtubes[261]->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="outputString" class="alert alert-block alert-success fade in hidden-print" style="display:none">
                    <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">&times;</button>
                    <p id="outputStringValue">{$outputString}</p>
                    <div class="clearfix"></div>
                </div>
                <form class="form-inline hidden-print" action="tamweenreports.php?do=clientda3minperiod" method="post">
                    <div class="form-group">
                        <label class="sr-only"> اسم العميل </label>
                        <select class="select2 wdt100" name="clientid" id="clientid" >
                            <option value="-1">اختر عميل </option>
                            <option value="-2"> كل العملاء</option>
                            {foreach $allClients as $data }
                            <option value="{$data->clientid}">{$data->clientname}</option>
                            {/foreach}
                        </select>
                    </div>
                    <br/>
                    <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" id="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" id="to">
                    </div>
                    <button type="submit" class="btn btn-primary">بحث</button>
                </form>
            </div>

            <hr/>


            <table class="table table-black dataTableClassNoPaging">
                <thead>
                    <tr>

                        <th>#</th>
                        <th>العميل</th>
                        <th>اليوم</th>
                        <th>المنصرف</th>
                    </tr>
                </thead>
                <tbody>
                    {assign var=i value=1}
                    {assign var=totalQuantity value=0}
                    {foreach $reportData as $data}
                    <!--{*assign var=share value=$share+(5*$allDays*$data->noOfPersonsDa3m)*}-->
                    {assign var=totalQuantity value=$totalQuantity+$data->quantity}
                    <tr>
                        <td>{$data->clientcode}<!--{*$i*}--></td>
                        <td>{$data->clientname}</td>
                        <td>{$data->billdate}</td>
                        <td>{$data->quantity}</td>
                    </tr>
                    {assign var=i value=$i+1}
                    {/foreach}
                </tbody>
            </table>
            <div class="clearfix"></div>
            <br/>
            <div class="col-lg-4 "><!-- col-lg-offset-8 -->
                <div class="well well-sm">
                    <h4 class="text-center">الحصة:  <span id="piecesCount">{$totalShare}</span></h4>
                </div>
            </div>
            <div class="col-lg-4 "><!-- col-lg-offset-8 -->
                <div class="well well-sm">
                    <h4 class="text-center">المنصرف:  <span id="piecesCount">{$totalQuantity}</span></h4>
                </div>
            </div>
            <div class="col-lg-4 "><!-- col-lg-offset-8 -->
                <div class="well well-sm">
                    <h4 class="text-center">المتبقى:  <span id="piecesCount">{$totalShare-$totalQuantity}</span></h4>
                </div>
            </div>
            <div class="clearfix"></div>



        </div>

    </div>
</div>
