</div>
</td>
</tr>
</tbody>

</table>
<a class="btn btn-success btn-xs printResults "  href="javascript:;" style=" float: right;"  >
    <i class="fa fa-print"></i> print
</a>

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

</div>

<input type="hidden" id="controllName" value="invsdept"/>


<div id="printDiv"></div>
<div id="calculatorDiv"></div>
<div id="editModalDiv"></div>


{literal}
<script>
    $(document).ready(function (e) {
        $('.updateInvest').each(function () {
            var value = $(this).val();
            var element = $(this);
            var text = '';
            if (element.is('select') && value > 0) {
                text = $(this).select2('data').text;
            }

            if (element.is('select')) {
                value = text;
            }

            $.post(hosturl + '/controllers/' + $('#controllName').val() + '.php?ac=checkRange', {
                id: $(this).attr("data-id"),
                value: value,
                tableName: $(this).attr("data-tableName"),
                colName: $(this).attr("data-colName")
            }, function (res) {
                if (Number(res) == 1) {
                    if (element.is('input')) {
                        element.css(
                                {
                                    "background-color": "#FFFF99"
                                    , "border": "1px solid red"
                                    , "animation": " fadein 6s"
                                    , "transition": "opacity 0.5s"
                                });
                    }

                    if (element.is('select')) {
                        element.parent().css(
                                {
                                    "background-color": "#FFFF99"
                                    , "border": "1px solid red"
                                    , "animation": " fadein 6s"
                                    , "transition": "opacity 0.5s"
                                });
                    }
                } else {

                    if (element.is('input')) {
                        element.css({'background-color': '#fff', "border": "1px solid #000000"});
                    }

                    if (element.is('select')) {
                        element.parent().css({'background-color': '#fff', "border": "none"});
                    }

                }
            });


        });
    });
</script>
{/literal}




