<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-9">
            <div class="row">
                <div class="col-sm-2" style="padding-right: 0px;">
                    <label style="text-align:left;" for="" class="control-label">Name</label>
                    <input type="text" class="form-control col-sm-2" id="txtCorporateGiftInquiryName">
                </div>
                <div class="col-sm-2" style="padding-right: 0px;">
                    <label style="text-align:left;" for="" class="control-label">Phone</label>
                    <input type="text" class="form-control col-sm-2" id="txtCorporateGiftInquiryPhone">
                </div>
                <div class="col-sm-2" style="padding-right: 0px;">
                    <label style="text-align:left;" for="" class="control-label">Delivery Date From</label>
                    <input type="date" class="form-control col-sm-2" id="txtCorporateGiftInquiryDeliveryDateFrom">
                </div>
                <div class="col-sm-2" style="padding-right: 0px;">
                    <label style="text-align:left;" for="" class="control-label">Delivery Date To</label>
                    <input type="date" class="form-control col-sm-2" id="txtCorporateGiftInquiryDeliveryDateTo">
                </div>
                <div class="col-sm-1" style="padding-right: 0px;min-width: 150px;">
                    <label style="text-align:left;white-space: nowrap;" for="" class="control-label">Corporate Gift</label>
                    <select id="cobCorporateGiftInquiryGift" 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="filterCorporateGiftInquiry();">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="corporategiftinquiry-table">
                </table>
            </div>
        </div>
    </div>
	<!-- button to trigger the things -->
    <button id="activatebuttonscreen[index]" onclick='reactivatescreen();' style="display: none;">activate screen button</button>
</div>

<div class="modal fade" id="modalCorporateGiftInquiryEmailView" aria-modal="true" role="dialog">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header" style="background-color:#eb8015;">
                <h4 class="modal-title" id="modalCorporateGIftInquiryEmailLabel" style="color: white;">Edit Delivery Detail</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-2 control-label">Company:</label>
                            <div class="col-sm-10">
                                <input type="hidden" class="form-control" id="txtCorporateGiftEditGiftID" disabled>
                                <input type="hidden" class="form-control" id="txtCorporateGiftEditScheduleID" disabled>
                                <input type="text" class="form-control" id="txtCorporateGiftEditCompany" disabled>
                            </div>
                        </div>
                        <div class="form-group">
                            <label style="text-align:left; white-space: nowrap;" class="col-sm-2 control-label">Company Address:</label>
                            <div class="col-sm-10">
                                <textarea class="form-control" id="txtCorporateGiftEditAddress" disabled></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label style="text-align:left; white-space: nowrap;" class="col-sm-2 control-label">Name:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="txtCorporateGiftEditName" disabled>
                            </div>
                            <label style="text-align:left; white-space: nowrap;" class="col-sm-2 control-label">Phone:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="txtCorporateGiftEditPhone" disabled>
                            </div>
                        </div>
                        <div class="form-group">
                            <label style="text-align:left; white-space: nowrap;" class="col-sm-2 control-label">Gift Type:</label>
                            <div class="col-sm-4">
                                <select class="form-control" id="txtCorporateGiftEditGiftType">
                                    <option value="">-- Select Gift Type --</option>
                                </select>
                            </div>
                            <label style="text-align:left; white-space: nowrap;" class="col-sm-2 control-label">Total Gift:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="txtCorporateGiftEditTotalGift">
                            </div>
                        </div>
                        <div class="form-group">
                            <label style="text-align:left; white-space: nowrap;" class="col-sm-2 control-label">Remarks:</label>
                            <div class="col-sm-10">
                                <textarea class="form-control" id="txtCorporateGiftEditRemarks"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label style="text-align:left; white-space: nowrap;" class="col-sm-2 control-label">Delivery Date Time:</label>
                            <div class="col-sm-5">
                                <select class="form-control" id="txtCorporateGiftEditDeliveryDate" onchange="getDeliveryTime()">
                                    <option value="">-- Select Delivery Date --</option>
                                </select>
                            </div>
                            <div class="col-sm-5">
                                <select class="form-control" id="txtCorporateGiftEditDeliveryTime">
                                    <option value="">-- Select Delivery Time --</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label style="text-align:left; white-space: nowrap;" class="col-sm-2 control-label">Email Date Time:</label>
                            <div class="col-sm-5">
                                <input type="text" class="form-control" id="txtCorporateGiftEditEmailDate" disabled>
                            </div>
                            <div class="col-sm-5">
                                <input type="text" class="form-control" id="txtCorporateGiftEditEmailTime" disabled>
                            </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="btnGiftUpdate" onclick="updateSchedule()"></i> Update </button>
            </div>
        </div>
    </div>
</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('corporategift-row-filter',this,false);
    // filterJournalInquiry() ;
});
</script>