
<div id="screen[index]" style="width: 100%;height:100%"> 
    <div class="card card-custom card-stretch">
        <div class="card-body" style="padding:0.75rem">
            <ul class="nav nav-tabs nav-tabs-line nav-tabs-line-brand" id="myTab" role="tablist" style="display:none;">
                <li class="nav-item">
                    <a class="nav-link active" id="general-tab" data-toggle="tab" 
                        style="padding-top:0"
                        href="#general">
                        <i class="flaticon-suitcase"></i> General
                    </a>
                </li>
            </ul>
            <div class="tab-content" id="myTabContent">
                <div class="tab-pane fade active show" id="general" role="tabpanel" aria-labelledby="general-tab">
                    <div class="row">
                        <div class="col-lg-12">
                            <!--begin::Form-->
                                <div class="card-body row" style="padding-bottom:0px">
                                    <input text="text" style="display:none" class="form-control" id="txtActivityUserID" value="<?php echo $_SESSION[SE_USERID]; ?>">
                                    <input text="number" style="display:none" class="form-control" id="countIndex" value="0">
                                    <input text="text" style="display:none" class="form-control" id="txtActivityUserName">
                                    <input text="text" style="display:none" class="form-control" id="txtActivityID">
                                    <input text="text" style="display:none" class="form-control" id="txtActivityNowDate" value="<?php echo date_create('now')->format('d/m/Y'); ?>">

                                    <div class="col-lg-3">
                                        <div class="form-group row">
                                            <label class="col-lg-4 col-form-label" >BU #:</label>
                                            <div class="col-lg-8">
                                                <select class="form-control" id="cobActivityBuID" onchange="getJobList()">
                                                    <?php echo $this->getCompanyOptionSR(); ?>
                                                </select>
                                                <span class="form-text text-muted"></span>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label class="col-lg-4 col-form-label" >Job #:</label>
                                            <div class="col-lg-8">
                                                <select class="form-control" id="txtActivityJobNumber" onchange="getJobDetail()">
                                                    <?php //echo $this->getJobNumberOption();?>
                                                </select>
                                                <span class="form-text text-muted"></span>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label class="col-lg-4 col-form-label">Cust. Code:</label>
                                            <div class="col-lg-8">
                                               <input type="text" class="form-control" id="txtActivityCustCode" disabled="disabled">
                                               <span class="form-text text-muted"></span>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label class="col-lg-4 col-form-label text-danger"><b>Service #:</b></label>
                                            <div class="col-lg-8">
                                                <input type="text" class="form-control" id="txtActivityCode">
                                            </div>
                                        </div>
                                        
                                    </div>
                                    <div style="width: 50px;">&nbsp;</div>
                                    <div class="col-lg-3">
                                        <div class="form-group row">
                                            <label class="col-lg-4 col-form-label">Job Title:</label>
                                            <div class="col-lg-8">
                                                <input type="text" class="form-control" id="txtActivityJobName" disabled="disabled">
                                                <span class="form-text text-muted"></span>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label class="col-lg-4 col-form-label" >Cust. Name:</label>
                                            <div class="col-lg-8">
                                                <input type="text" class="form-control" id="txtActivityCustName" disabled="disabled">
                                                <span class="form-text text-muted"></span>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label class="col-lg-4 col-form-label" >Consultant:</label>
                                            <div class="col-lg-8">
                                                <select class="form-control" id="txtActivityUser">
                                                    <?php echo $this->getUserOpt();?>
                                                </select>
                                                <span class="form-text text-muted"></span>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label class="col-lg-4 col-form-label" >Service Title:</label>
                                            <div class="col-lg-8">
                                                <input type="text" class="form-control" id="txtActivityTitle">
                                                <span class="form-text text-muted"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div style="width: 60px;">&nbsp;</div>
                                    <div class="col-lg-3">
                                        <div class="form-group row">
                                            <div class="col-lg-7" style="display:none;">
                                                <select class="form-control" id="cobActivityCustPMName">
                                                </select>
                                            </div>
                                            <label class="col-lg-4 col-form-label">Cust. PM Name:</label>
                                            <div class="col-lg-8">
                                                <input type="text" class="form-control" id="txtActivityCustPMName" disabled="disabled">
                                                <span class="form-text text-muted"></span>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label class="col-lg-4 col-form-label">Cust. Rep.:</label>
                                            <div class="col-lg-8">
                                                <select class="form-control" id="cobActivityCustRep" >
                                                </select>
                                                <span class="form-text text-muted"></span>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label class="col-lg-4 col-form-label">Bill Status:</label>
                                            <div class="col-lg-8">
                                                <select class="form-control" id="cobActivityBill">
                                                    <?php echo $this->optBill();?>
                                                </select>
                                                <span class="form-text text-muted"></span>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label class="col-lg-4 col-form-label">Service Type:</label>
                                            <div class="col-lg-8">
                                                <select class="form-control" id="cobActivitySite">
                                                    <?php echo $this->optSite();?>
                                                </select>
                                                <span class="form-text text-muted"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-12">
                                        <div class="form-group row">
                                            <label class="col-lg-1 col-form-label">Remarks:</label>
                                            <div class="col-lg-9" style="padding-right:50px;">
                                                <textarea class="form-control" rows="3" id="txtActivityRemarks"></textarea>
                                                <span class="form-text text-muted"></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            <!--end::Form-->
                        </div>
                        <div class="col-sm-2" style="display: none" id="txtActivityTaskCombDiv">
                            <select id="txtActivityTaskComb" class="form-control txtActivityTaskComb">
                            </select>
                        </div>
                        <div class="col-sm-2" style="display: none" id="txtActivityBreakCombDiv">
                            <select id="txtActivityBreakComb" class="form-control txtActivityBreakComb">
                                <?php echo $this->optBreak();?>
                            </select>
                        </div>

                        <div class="col-lg-12" >
                            <div class=" kt-datatable kt-datatable--default kt-datatable--brand kt-datatable--loaded">
                            <table class="kt-datatable__table" > 
                                <thead class="kt-datatable__head" style="background-color: #E0E0E0">
                                    <tr class="dnd-moved kt-datatable__row" style="left: 0px;">
                                        <th data-field="svcid" class="kt-datatable__cell" id="col_svcid" style="display: none;">
                                            <span>ID</span>
                                        </th>
                                        <th style="width:17%" data-field="taskname" class="kt-datatable__cell" id="col_taskname">Task Name</th>
                                        <th style="width:15%" data-field="taskdesc" class="kt-datatable__cell" id="col_taskdesc">Description</th>
                                        <th style="width:5%" data-field="taskphase" class="kt-datatable__cell" id="col_taskphase">Phase</th>
                                        <th style="width:10%" data-field="startdate" class="kt-datatable__cell" id="col_startdate">Start Date</th>
                                        <th style="width:10%" data-field="enddate" class="kt-datatable__cell" id="col_enddate">End Date</th>
                                        <th style="width:6%" data-field="starttime" class="kt-datatable__cell" id="col_starttime">Start Time</th>
                                        <th style="width:6%" data-field="endtime" class="kt-datatable__cell" id="col_endtime">End Time</th>
                                        <th style="width:5%" data-field="hours" class="kt-datatable__cell" id="col_hours">Hours</th>
                                        <th style="width:5%" data-field="break" class="kt-datatable__cell" id="col_break">Break</th>
                                        <th style="width:5%" data-field="aftbreak" class="kt-datatable__cell" id="col_aftbreak">After Break</th>
                                        <th style="width:5%" data-field="override" class="kt-datatable__cell" id="col_override">Override</th>
                                        <th style="width:5%" data-field="balance" class="kt-datatable__cell" id="col_balance">Balance</th>
                                        <th colspan="2" data-field="action" class="kt-datatable__cell" id="col_action">Action</th>
                                    </tr>
                                </thead>
                                <tbody class="kt-datatable__body" id="activity-list-table">

                                </tbody>
                            </table>
                            <br>
                            <div class="col-lg-12 text-right" style="padding-right: 5px;">
                                <button type="button" class="btn btn-success btn-sm btn-icon btn-icon-md btnAddDetail" id="btnAddActivityList" onclick="javascript:addTimeTracker(this);"><i class="fa fa-plus"></i></button>
                            </div>
                            </div>
                        </div>

                        <div class="col-lg-12">
                            <div class="form-group row">
                                <label class="col-lg-10 col-form-label text-right">Total:</label>
                                <div class="col-lg-1">
                                    <input type="text" class="form-control text-right" value="0" id="txtTimeTrackerTotal" disabled="disabled">
                                    <span class="form-text text-muted"></span>
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-lg-10 col-form-label text-right">Total Override:</label>
                                <div class="col-lg-1">
                                    <input type="text" class="form-control text-right" value="0" id="txtTimeTrackerTotalOverride">
                                    <span class="form-text text-muted"></span>
                                </div>
                            </div>
                            <br>
                        </div>

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

        <div class="col-lg-12 text-right" id="btnActivity" style="padding-right: 30px;padding-bottom:20px">
        </div>

    </div>
    <!--end::Portlet-->
    <!-- button to trigger the things -->
    <button id="activatebuttonscreen[index]" onclick='reactivatescreen[index]();' style="display: none;">activate screen button</button>
<!-- end:: Content -->
</div>
<div id="screen[index]a" > 
</div>
<script>
    $(document).ready(function () {
        filterRow("activity_row_filter", this, false);
    });
</script>