<script>

</script>
<style>
    .solidgraytop{
        border-top-style:solid;
        border-top-color:#ddd;
    }
    .solidgrayleft{
        border-left:solid;
        border-left-width:3px;
        border-color: #ddd;
    }
    .solidgrayright{
        border-right-style:solid;
        border-right-color:#ddd;
    }
    .solidgraybottom{
        border-top-style:solid;
        border-top-color:#ddd;
    }
    .hidetop{
        border-top:hidden !important;
    }
    .fromaccountstyle{
        font-weight:bold;
        font-size:17px;
        color:blue;
    }
    .toaccountstyle
    {
        font-weight:bold;
        font-size:17px;
        color:purple;
    }
    .mytotal{
        background-color:#ddd;
        font-weight:bold;
    }
    .nodata{
        background-color: #72B4EC;
        color: white;
        border-radius: 13px;
        margin: 14px;
        font-size: 24px;
        text-align: center;
        padding: 5px;
    }

</style>
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">اداره الموظفين</a></li>
            <li><a href="#">المرتبات</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>
            </div>
            <div class="panel-body">
                <form action="salaryReportController.php?do=salaryEntitlementEntry" method="post" class="form-inline hidden-print">

                    <table class="table table-black">
                        <tr>
                            <td><span style="float: right;font-size: 16px;font-weight: bold;">شهر</span></td>
                            <td colspan="2">
                                <div class="datepicker"><input type="text" name="from" id="from" value=""
                                                               class="form-control awdatepicker" autocomplete="off" data-date-format="yyyy-mm">
                                </div>
                            </td>

                            <td align="center" colspan="5"><input type="submit" value="بحث" style="width:80px;"></td>
                        </tr>
                </form>

                <form method="post" action="?do=dosalaryEntitlementEntry">
                    <!--                    {if isset($userSave)}
                                        <input type="hidden" name="saveid" value="{$userSave->saveid}" />
                                        {else}
                                        <tr>
                                            <td colspan="12"> <label class="col-lg-4 control-label">الخزنة</label>
                                                <div class="col-lg-4">
                                                    <select class="select2 wdt100" name="saveid" id="saveid">
                                                        {foreach $userSaves as $save}
                                                        <option value="{$save->saveid}" {if $smarty.session.saveid eq $save->saveid}selected{/if}>{$save->savename}</option>
                                                        {/foreach}
                                                    </select>
                                            </td>
                                        </tr>
                                        {/if}-->
                    <tr>


                        <td>رقم الموظف</td>
                        <td>اسم الموظف </td>
                        <td>المرتب الاساسى</td>
                        <td>الحوافز</td>
                        <td>المكافاه - وقت اضافى</td>
                        <td>الخصومات</td>
                        <td>المسحوبات</td>

                        <td>الغياب - تأخير</td>
                        <td>استئذان</td>
                        <td>دفع سلفه</td>
                        <td>باقي القبض السابق</td>
                        <td>صافى المرتب</td>
                        <td>الدين الحالى</td>

                    </tr>



                    <input name="salarymonthdate" type="hidden" value="{$salarymonthdate}" />
                    {foreach $allEmpsalary as $emp}

                    <tr>
                        <!--                        <td><input name="empid[]" type="checkbox" value="{$emp[0]}" /></td>-->

                        <td>{$emp[0]}</td>
                        <td>{$emp[1]}</td>
                        <td>{$emp[2]}</td>
                        <td>{$emp[3]}</td>
                        <td>{$emp[4]}</td>
                        <td>{$emp[5]}</td>
                        <td>{$emp[6]}</td>
                        <td>{$emp[7]}</td>
                        <td>{$emp[12]}</td>
                        <td>{$emp[9]}</td>
                        <td>{$emp[11]}</td>
                        <td>{$emp[8]}</td>
                        <td>{$emp[10]}</td>


                    </tr>

                    {/foreach}

                    <tr>
                        <td colspan="13">

                            <table class="table table-black">
                                <thead>
                                    <tr class="mytotal">
                                        <th>مدين</th>
                                        <th>دائن</th>
                                        <th>الحساب</th>
                                        <th>التاريخ</th>
                                        <th>البيان</th>
                                        <th class="solidgrayleft">بيان القيد</th>
                                    </tr>
                                </thead>
                                <tbody>

                                    <!--عكس القيد-->
                                    {assign var=i value=1}
                                    {foreach $dailyEntryDebtorArray as $data}
                                    <tr>
                                        <td class="solidgrayright">{$data->value}</td>
                                        <td class="solidgrayright"></td>
                                        <td> <span class="fromaccountstyle">من حــ/ </span> {$data->accountstreeid}-{$data->accountstreeName}</td>
                                        <td>{$dailyEntry->thedate}</td>
                                        <td class="solidgrayleft"></td>
                                        {if $i == 1}<td class="solidgrayleft solidgrayright" rowspan="{$rowSpan}">{$dailyEntry->entryComment}</td>{/if}
                                    </tr>
                                    {assign var=i value=$i+1}
                                    {/foreach}
                                    <!--عكس القيد-->
                                    {assign var=i value=1}
                                    {foreach $dailyEntryCreditorArray as $data}
                                    <tr {if $i== 1} class="solidgraytop" {/if}>
                                        <td class="solidgrayright"></td>
                                        <td class="solidgrayright">{$data->value}</td>
                                        <td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="toaccountstyle">الى حــ/ </span>{$data->accountstreeid}-{$data->accountstreeName}</td>
                                        <td>{$dailyEntry->thedate}</td>
                                        <td class="solidgrayleft"></td>
                                    </tr>
                                    {assign var=i value=$i+1}
                                    {/foreach}
                                    <!--                                    <tr class="mytotal">
                                                                            <td class="solidgrayright"></td>
                                                                            <td class="solidgrayright"></td>
                                                                            <td colspan="4" class="solidgrayleft" style="text-align:center;"></td>
                                                                        </tr>-->
                                    <tr class="mytotal">
                                        <td class="solidgrayright">{$dailyEntry->totaldebtor}</td>
                                        <td class="solidgrayright">{$dailyEntry->totalcreditor}</td>
                                        <td colspan="4" class="solidgrayleft" style="text-align:center;">الاجــــــــــمــــــــــالــــــى</td>
                                    </tr>

                                </tbody>
                            </table>


                        </td>
                    </tr>
                    <tr>
                        <td colspan="13" align="center"><input name="Receipt" value="تنفيذ" style="width:80px;"
                                                               type="submit" /></td>
                    </tr>
                    </table>




                </form>
            </div>
        </div>