
<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}</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" method="post">
                    <!--                    <div class="form-group">
                                            <label class="sr-only">الشهر</label>
                                            <input type="text" class="form-control awdatepicker" autocomplete="off" data-date-format="yyyy-mm" name="month" id="month">
                                        </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" 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>
                        <th>المنصرف</th>
                        <th>المنصرف خلال الشهر</th>
                        <th>المتبقى</th>
                    </tr>
                </thead>
                <tbody>
                    {assign var=i value=1}
                    {assign var=totalShare value=0}
                    {assign var=totalQuantity value=0}
                    {assign var=totalMonthQuantity value=0}
                    {assign var=totalRemain value=0}

                    {foreach $reportData as $data}
                    <!--{*assign var=share value=(5*$allDays*$data->noOfPersonsDa3m)*}-->
                    {assign var=share value=(5*$data->noOfDaysCalc*$data->noOfPersonsDa3m)}

                    {assign var=totalShare value=$totalShare+$share}
                    {assign var=totalQuantity value=$totalQuantity+$data->quantity}
                    {assign var=totalMonthQuantity value=$totalMonthQuantity+$data->takenInAMonthQuantity}
                    {assign var=totalRemain value=$totalRemain+($share - $data->takenInAMonthQuantity)}
                    <tr>
                        <td>{$data->clientcode}<!--{*$i*}--></td>
                        <td>{$data->cardNum}</td>
                        <td>{$data->clientname}</td>
                        <td>{$share}</td>
                        <td>{$data->quantity}</td>
                        <td>{$data->takenInAMonthQuantity}</td>
                        <td>{$share - $data->takenInAMonthQuantity}</td>
                    </tr>
                    {assign var=i value=$i+1}
                    {/foreach}
                </tbody>
                <tfoot>
                    <tr style="text-align: center;font-weight: bolder;">
                        <td colspan="3">الاجمالى</td>
                        <td>{$totalShare}</td>
                        <td>{$totalQuantity}</td>
                        <td>{$totalMonthQuantity}</td>
                        <td>{$totalRemain}</td>
                    </tr>
                </tfoot>
            </table>



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



        </div>

    </div>
</div>
