
    <div class="col-lg-6">
        <h4>{$smarty.const.PAYED_DEPT_BACK}تفاصيل قسط العميل</h4>
    </div>

    <input type="hidden" name="premiumItr" id="premiumItr" value="1"/>

    <div class="table-responsive">
        <table class="table billtable table-bordered table-black " id="wasteTable">
            <thead>
            <tr>
                <th class="wdt300"> {$smarty.const.PAYED_DEPT_INSTALLMENTS_DATE}</th>
                <th class="wdt300">{$smarty.const.PAYED_DEPT_VALUE}</th>
                <th class="wdt300">{$smarty.const.PAYED_DEPT_WHAT_PAID}</th>
                <th class="wdt300">{$smarty.const.PAYED_DEPT_RESIDUAL}</th>
                <th class="wdt300">{$smarty.const.PAYED_DEPT_PAID_UP}</th>
                <!--<th class="wdt50"></th>-->
            </tr>
            </thead>
            <tbody>
            {assign var=i value=1}
            {foreach $premiumData as $item}
            {if {$item->payed} eq 1}
            <tr class="danger"> {elseif {$item->payed} eq 0}
            <tr data-itr="1">
                {/if}

                <td>
                    <input type="text" class="form-control awdatepicker" value="{$item->date}" readonly autocomplete="off" data-date-format="yyyy-mm-dd" name="date1" id="date1">
                </td>
                <td>
                    <input type="number" name="Amount1" id="Amount1" min="0" class="form-control countAmount" value="{$item->value}" readonly />
                </td>
                <td>
                    <input type="number" name="Whatwaspaid" id="Whatwaspaid" min="0" class="form-control" value="{$item->rest}" readonly />
                </td>
                <td>
                    <input type="number" name="rest1" id="rest1" min="0" class="form-control " value="{$item->value - $item->rest}" readonly />
                </td>
                <td class="hidden-print">
                    <input type="text"  {if $i != 1}disabled{/if} name="payedDeptCurr" id="payedDeptCurr" value="0"
                           onKeyUp="populateDebtAfter('payedDeptCurr');"
                           class="form-control premiumpayedDeptCurr {if $clientnegative==1}numberinput{else}positivefloat{/if}"
                           placeholder="{$smarty.const.PAYED_DEPT_PAID_UP}"/>
                    <input type="hidden" name="premiumid" id="premiumid" value="{$item->id}"  {if $i != 1}disabled{/if}/>
                    <input type="hidden" name="premiumDetailId" id="premiumDetailId" value="{$item->premiumclientId}"  {if $i != 1}disabled{/if}/>
                    <input type="hidden" name="payedDept" id="payedDept" {if $i != 1}disabled{/if}
                           onKeyUp="populateDebtAfter('payedDept');"
                           class="premiumpayedDept {if $clientnegative==1}numberinput{else}positivefloat{/if} form-control"  />
                </td>

            </tr>
            {capture assign=i}{$i+1}{/capture}
            {/foreach}
            </tbody>
        </table>

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

        <div class="row">
            <div class="col-lg-12">
                <button type="button" class="btn btn-dark pull-left ft-nor">
                    {$smarty.const.PAYED_DEPT_INSTALLMENTS_TOTAL} <span class="badge wht-clo">
                                    <div id='allCost'>{$total}</div>
                                </span>
                </button>
            </div>
        </div>
    </div>


