

<tr>
    <td>
        {$itr}
    </td>
    <td>
        <select name="bindSettlement{$itr}" id="bindSettlement{$itr}" data-itr="{$itr}" data-placeholder="اختر"  class="select2 wdt100 bindSettlement" >
            <option value="-1"> اختر </option>
            <option value="1"> خزينة </option>
            <option value="0"> مصروفات </option>
        </select>
        <span id="bindSettlementError{$itr}" class=" alert-block alert-danger fade in" style="padding: 5px 5px 5px 5px; display: none ;">اختر مصروف  أولا</span>

    </td>
    <td>

        <div id="masroufDiv{$itr}" style="display: none;">
            <select name="expensestype{$itr}" id="expensestype{$itr}" data-placeholder="اختر"  class="select2" >
                <option value="-1"> اختر </option>
                {foreach $expensesType as $expense}
                <option value="{$expense->expensestypeid}">{$expense->expensestypename} </option>
                {/foreach}
            </select>
            <span id="expenseError{$itr}" class=" alert-block alert-danger fade in" style="padding: 5px 5px 5px 5px; display: none ;">اختر مصروف  أولا</span>


        </div>

        <div id="saveDiv{$itr}" style="display: none;">
            <select name="save{$itr}" id="save{$itr}" data-placeholder="اختر"  class="select2" >
                <option value="-1"> اختر </option>
                {foreach $saves as $save}
                <option value="{$save->saveid}">{$save->savename} </option>
                {/foreach}
            </select>
            <span id="saveError{$itr}" class=" alert-block alert-danger fade in" style="padding: 5px 5px 5px 5px; display: none ;">اختر الخزنة  أولا</span>
        </div>


    </td>
    <td>
        <select name="project{$itr}" id="project{$itr}" data-placeholder="اختر"  class="select2 wdt100" >
            <option value="-1"> اختر </option>
            {foreach $projects as $project}
            <option value="{$project->id}">{$project->name} </option>
            {/foreach}
        </select>

    </td>
    <td>
        <input name="value{$itr}" id="value{$itr}" type="text"  style="display: inline;"  class="form-control wds100 positivefloat" />
        <span id="valueError{$itr}" class=" alert-block alert-danger fade in" style="padding: 5px 5px 5px 5px; display: none ;"></span>
        <input class="form-control" name="oldValue{$itr}" id="oldValue{$itr}"   type="hidden" value="0"  />


    </td>
    <td>
        <textarea class="form-control" style="height: 100%;" rows="1" name="comment{$itr}" id="comment{$itr}"></textarea>
    </td>
    <!--td>
        <button type="button" id="remove1" class="removeproduct close flt-none" aria-hidden="true">&times;</button>
    </td-->
</tr>


{literal}
<script>
    var itr = $('#itr').val();
    $(".positiveNo").forcepositiveNum();
    $(".positivefloat").forcepositivefloat();
    $('#bindSettlement'+itr).select2();
    $('#expensestype'+itr).select2();
    $('#save'+itr).select2();
    $('#project'+itr).select2();
</script>
{/literal}