<table class="table">
    <thead>
        <tr>
            <th style="padding: 7px 0; font-size: 18px;">{$listObj.name} => {$offerName} </th>
        </tr>
    </thead>
</table>

<table class="table table-striped table-bordered table-hover rtl" id="orgOfferInvests">
    <thead>
        <tr>
            <th>التحليل </th>
            <th class="wds15">السعر الأصلى </th>
            <th class="wds15"> سعر التعاقد  </th>
            <th class="wds15">نسبة التحمل   </th>
            <th class="wds15">نوع  التحمل   </th>
        </tr>
    </thead>
    <tbody>
        {foreach $offerInvs as $offerInv}
        <tr>
            <td>{$offerInv.name}</td>
            <td>{$offerInv.price}</td>
            <td>
                <input type="text" class="form-control updateOrgDis"  data-listId="{$listId}"
                       data-offerId="{$offerInv.invoffer_id}"
                       data-cat="4"    data-detectId="{$offerInv.id}" data-colName="contract_price"
                       value="{$offerInv['orgDiscount']['contract_price']}">
            </td>

            <td>
                <input type="text" class="form-control updateOrgDis"  data-listId="{$listId}"
                       data-cat="4"    data-detectId="{$offerInv.id}" data-colName="patient_hold"
                       data-offerId="{$offerInv.invoffer_id}"
                       value="{$offerInv['orgDiscount']['patient_hold']}">
            </td>

            <td>
                <div class="md-radio-inline">
                    <div class="md-radio">
                        <input type="radio" data-colName="discount_type"  name="discount_type2_{$offerInv.id}"
                               data-listId="{$listId}"  value="1"   data-offerId="{$offerInv.invoffer_id}"
                               {if  $offerInv['orgDiscount']['discount_type'] == 1} checked  {/if}
                               class="form-control updateOrgDis"  id="discount_type1_{$offerInv.id}"
                               data-detectId="{$offerInv.id}"  data-cat="4" >  <label for="discount_type1_{$offerInv.id}">
                            <span></span>
                            <span class="check"></span>
                            <span class="box"></span>
                            نسبة %          </label>
                    </div>

                    <div class="md-radio">
                        <input type="radio" data-colName="discount_type"  name="discount_type2_{$offerInv.id}"
                               data-listId="{$listId}"   value="0"   data-offerId="{$offerInv.invoffer_id}"
                               {if  $offerInv['orgDiscount']['discount_type'] != 1} checked  {/if}
                               class="form-control updateOrgDis"  id="discount_type0_{$offerInv.id}"
                               data-detectId="{$offerInv.id}"  data-cat="4" >  <label for="discount_type0_{$offerInv.id}">
                            <span></span>
                            <span class="check"></span>
                            <span class="box"></span>
                            قيمة         </label>
                    </div>
                </div>
            </td>
        </tr>
        {/foreach}
    </tbody>
</table>


{literal}
<script>
    $('#orgOfferInvests').dataTable({
        "lengthMenu": [
            [50, 100, 150, -1],
            [50, 100, 150, "All"] // change per page values here
        ],
        // set the initial value
        "pageLength": 10,
        "language": {
            "lengthMenu": " _MENU_"
        },
        "columnDefs": [{// set default column settings
                'orderable': true,
                'targets': [0]
            }, {
                "searchable": true,
                "targets": [0]
            }],
        "order": [
            [0, "asc"]
        ] // set first column as a default sort by asc
    });
</script>
{/literal}