<style>
    .iconspan {
        float: right;
        margin-right: 16px !important;
        margin-top: -24px;
        position: relative;
        z-index: 2;
        color: black;
    }
    
    .tableFixHead          { overflow: auto; height: 100px; }
	.tableFixHead thead th { position: sticky; top: 0; z-index: 1; background-color:grey;}
	table  { border-collapse: collapse; width: 100%; }
	th, td { padding: 8px 16px;}

    td {
		vertical-align: middle!important;
		padding:0px!important;
		text-align:left!important;
		background-color: #eee;
	}

    td input, td select {
        padding:0px!important;
		border-radius:0px!important;
		border-color:transparent!important;
		background-color: white;
	}

    tr.highlight > td {
	    background: #3c8dbc!important;
	    color: #333!important;
	}
</style>
<div id="screen[index]" style="padding-top: 20px;"> 
    <div>
        <div class="col-md-7">
            <div class="row">
                <div class="col-sm-2" style="padding-right: 0px;">
                    <label style="text-align:left; white-space: nowrap;" for="" class="control-label">Customer Code</label>
                    <input type="text" class="form-control col-sm-2" id="txtSendCorporateGiftListCustomerCodeFilter">
                </div>
                <div class="col-sm-3" style="padding-right: 0px;">
                    <label style="text-align:left;" for="" class="control-label">Customer Name</label>
                    <input type="text" class="form-control col-sm-2" id="txtSendCorporateGiftListCustomerNameFilter">
                </div>
                <div class="col-sm-3" style="padding-right: 0px;min-width: 150px;">
                    <label style="text-align:left;white-space: nowrap;" for="" class="control-label">Contact Name</label>
                    <input type="text" class="form-control col-sm-2" id="txtSendCorporateGiftListContactNameFilter">
                </div>
                <div class="col-sm-2" style="padding-right: 0px;min-width: 150px;">
                    <label style="text-align:left;white-space: nowrap;" for="" class="control-label">Send Gift</label>
                    <select id="cobSendCorporateGiftListSendGiftFilter" class="form-control col-sm-1" >
                        <?php echo $this->getGiftMasterOption(); ?>
                    </select>
                </div>
                <div class="col-sm-1">
                    <div class="col-sm-12" style="padding-left: 0px;">
                        <br>
                        <a href="#" class="btn btn-secondary btn-md" style="background-color:grey;color:white;margin-top:5px;" onclick="filterSendCorporateGiftList();">Filter</a>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-md-12" id="errorShow"></div>

        <div class="col-md-12" style="margin-top: 20px;">
            <div class="tableFixHead" id="testData" style="height: 710px;overflow: auto;">
                <table class="table table-bordered" style="width: 100%; max-width: 100%; margin-bottom: 20px;" id="sendcorporategiftlist-table">
                </table>
            </div>
        </div>
    </div>

    <div class="modal fade" id="modalSendCorporateGiftEmailView" aria-modal="true" role="dialog">
        <div class="modal-dialog modal-md" role="document">
            <div class="modal-content">
                <div class="modal-header" style="background-color:#eb8015;">
                    <h4 class="modal-title" id="modalSendCorporateGiftEmailLabel" style="color: white;">Confirmation Send Email</h4>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <i aria-hidden="true" class="ki ki-close"></i>
                    </button>
                </div>
                <div class="modal-body" style="padding: 15px; padding-bottom: 10px;">
                    <div class="row" style="padding:0px 15px 0px 15px;">
                        <div class="form-horizontal">
                            <div class="form-group">
                                <label style="text-align:left; white-space: nowrap;" class="col-sm-4 control-label">Send From:</label>
                                <div class="col-sm-6">
                                    <select class="form-control" id="cobSendCorporateGiftEmailFrom">
                                        <?php echo $this->getCompanyFromOption();?>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label style="text-align:left; white-space: nowrap;" class="col-sm-4 control-label">CC Email:</label>
                                <div class="col-sm-6">
                                    <input type="text" class="form-control" id="txtSendCorporateGiftEmailCC">
                                </div>
                            </div>
                            <div class="form-group" style="display: none;">
                                <label style="text-align:left; white-space: nowrap;" class="col-sm-4 control-label">Send From:</label>
                                <div class="col-sm-6">
                                    <select class="form-control" id="cobSendCorporateGiftSendGift">
                                        <?php echo $this->getGiftMasterOption();?>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary font-weight-bold" data-dismiss="modal">Cancel</button>
                    <button type="button" class="btn btn-success" id="btnSendEmail"></i> SendEmail </button>
                </div>
            </div>
        </div>
    </div>

	<!-- button to trigger the things -->
    <button id="activatebuttonscreen[index]" onclick='reactivatescreen();' style="display: none;">activate screen button</button>
</div>

<div id="screen[index]a"></div>
<!-- the function index that you want to run -->
<script type="text/javascript">
    function reactivatescreen() {
        swal2("activation screen [index]");
    }
</script>

<script>
$(document).ready(function () {
    filterRow('sendcorporategiftlist-row-filter',this,false);
    // filterJournalInquiry() ;
});
</script>