<head>
<style type="text/css">
button {
 	margin-left: 2px;
 	margin-right: 2px;
}

.modal-header {
	background-color: #3c8dbc;
	color: white;
}

</style>
</head>

<!-- Submit pop up Modal HTML -->
<div id="deleteGoodsDeliverConfirmationView" class="modal fade" style="overflow: auto;overflow-y: scroll;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="modalDeleteGoodsDeliverConfirmationTitle"></h4>
            </div>
            
            <div class="modal-body">
                <div id="modalDeleteGoodsDeliverConfirmationContent">
                
                </div>
            </div>
            
            <div class="modal-footer">
                <div id="modalDeleteGoodsDeliverConfirmationButton">
               </div>
            </div>
        </div>
    </div>
</div>

<!-- show GoodsDeliverInquiry Modal HTML -->
<div id="showGoodsDeliverInquiryView" class="modal fade" style="overflow: auto;overflow-y: scroll;" tabindex="-1" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog"  style="width: 60%;">
        <div class="modal-content">
            <div class="modal-header" id="modalShowGoodsDeliverInquiryContent">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="modalShowGoodsDeliverInquiryViewTitle" >Message</h4>
            </div>
            
            <div class="modal-body">
                <div id="modalShowGoodsDeliverInquiryViewContent">
                </div>
            </div>
            <div class="modal-footer">
                <div id="modalShowGoodsDeliverInquiryButtonContent">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
               </div>
            </div>
        </div>
    </div>
</div>
<!-- Add Project Modal HTML -->
<div id="addGoodsDeliverView" class="modal fade" style="overflow: auto;overflow-y: scroll;" tabindex="-1" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog" style="width: 55%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">Goods Deliver</h4>
            </div>
            <div class="modal-body">
	            <div id="modalAddGoodsDeliverContent">
	        	</div>
            </div>
            <div class="modal-footer">
            	<div id="modalAddGoodsDeliverFooter">
			   </div>
            </div>
        </div>
    </div>
</div>

<!-- show GoodsDeliver Modal HTML -->
<div id="showGoodsDeliverView" class="modal fade" style="overflow: auto;overflow-y: scroll;" tabindex="-1" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog"  style="width: 35%;">
        <div class="modal-content">
            <div class="modal-header" id="modalShowGoodsDeliverContent">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="modalShowGoodsDeliverViewTitle" >Message</h4>
            </div>
            
            <div class="modal-body">
                <div id="modalShowGoodsDeliverViewContent">
                </div>
            </div>
            <div class="modal-footer">
                <div id="modalShowGoodsDeliverButtonContent">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Yes</button>
               </div>
            </div>
        </div>
    </div>
</div>


<!-- message Modal HTML -->
<div id="messageView" class="modal fade" style="overflow: auto;overflow-y: scroll;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header" id="modalMessageHeaderContent">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="modalMessageViewTitle" >Message</h4>
            </div>
            
            <div class="modal-body">
	            <div id="modalMessageViewContent">
	        	</div>
            </div>
            
            <div class="modal-footer">
            	<div id="modalMessageButtonContent">
            		<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
			   </div>
            </div>
        </div>
    </div>
</div>

<!-- confirmation message Modal HTML -->
<div id="confirmationMessageView" class="modal fade" style="overflow: auto;overflow-y: scroll;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header" id="modalConfirmationMessageHeaderContent">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="modalConfirmationMessageViewTitle" >Message</h4>
            </div>
            
            <div class="modal-body">
	            <div id="modalConfirmationMessageViewContent">
	        	</div>
            </div>
            <div class="modal-footer">
            	<div id="modalcCnfirmationMessageButtonContent">
            		<button type="button" class="btn btn-default" data-dismiss="modal">Yes</button>
			   </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="GoodsDeliverLoadingModal" tabindex="-1" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="modalLoadingTitle">Processing...</h4>
            </div>
            <div class="modal-body">
                <div class="progress progress-striped active">
                    <div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:100%">
                        <span class="sr-only">70% Complete</span>
                      </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- show plan Modal HTML -->
<div id="showProspectDetail" class="modal fade" style="overflow: auto;overflow-y: scroll;" tabindex="-1" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog"  style="width: 50%;">
        <div class="modal-content">
            <div class="modal-header" id="modalShowPlanContent">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="modalShowPlanViewTitle" >Prospect Detail</h4>
            </div>
            
            <div class="modal-body">
                <div id="modalShowPlanViewContent">
                    <table class="table">
                        <thead>
                                <th>Name</th>
                                <th>Title</th>
                                <th>Office Phone</th>
                                <th>Mobile Phone</th>
                                <th>Email</th>
                                <th>Active</th>
                        </thead>
                        <tbody>

                        </tbody>
                    </table>
                </div>
            </div>
            <div class="modal-footer">
                <div id="modalShowPlanButtonContent">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
               </div>
            </div>
        </div>
    </div>
</div>

<input type="hidden" id="isManagerFilter" value="<?php echo isset($isManagerFilter) ? ($isManagerFilter ? 'true' : 'false' ) : 'false';?>" >

<div class="col-md-12" <?php echo isset($isManagerFilter) && $isManagerFilter ? "style='display:none'" : ''; ?>>
	<div class="filter-unit">
		<select class="form-control" id="dateFilterGDN">
           <?php echo $this->getDateFilterOption() ?>
        </select>
    </div>
    <div class="filter-unit">
		<select class="form-control" id="compFilterGDN" style="width:120px;">
           <?php echo $this->getCustomerOption() ?>
        </select>
	</div>
	<div class="filter-unit">
		<input type="text" class="form-control" placeholder="GDN Code..." id="txtFilterGRCode">
	</div>
	<div class="filter-unit">
		<a href="#" onclick="return filterGoodsDeliver();" class="btn btn-primary btn-sm"><span class="fa fa-plus"></span> Filter</a>
	</div>
	<?php if(!isset($isManagerFilter) || $isManagerFilter == false) { ?>
	<div class="claim-btn">
		<table>
			<tr>
				<td>
					<div>
                        <!-- <a onclick="return showAddGoodsDeliverInquiry();" role="button" class="btn btn-info btn-sm" data-toggle="modal"><span class="fa fa-info-circle"></span> Inquiry</a> -->
                        <a onclick="return showAddGoodsDeliver();" role="button" class="btn btn-primary btn-sm" data-toggle="modal"><span class="glyphicon glyphicon-plus"></span> Add</a>
					</div>
				</td>
			</tr>
		</table>
	</div>
	<?php } ?>
</div>

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

<div class="col-md-12" style="margin-top: 20px">
	<div class="box" id="testData">
		<table class="table table-striped" style="width: 100%; max-width: 100%; margin-bottom: 20px;" id="GoodsDeliver-table">
            <thead>
                <tr>
                    <th width="2%" style="min-width:100px;max-width:120px;">Date</th>
                    <th width="10%" style="min-width:120px">Customer</th>
                    <th width="5%" style="min-width:100px;max-width:120px;">GDN CODE</th>
                    <th width="5%" style="min-width:100px;max-width:120px;"></th>
                    <th width="25%" ></th>
                </tr>
            </thead>
            <tbody id="goods-deliver-table">
            </tbody>
		</table>
	</div>
</div>
<script>
$(document).ready(function () {
	filterGoodsDeliver();
});
</script>
