<?php

/* $Id: SelectCustomer.php 7133 2015-02-07 03:23:51Z daintree $*/

include('includes/session.inc');
$Title = _('HRMS');
include('includes/header.inc');
include('includes/SQL_CommonFunctions.inc');
echo '<link href="' . $RootPath . '/css/evergreen2'.'/default.css" rel="stylesheet" type="text/css" media="screen"/>';


//echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png"> </p>';
      
	echo '<div class="col-sm-9">';
		//echo '<div class="aflpanel" style="margin-bottom:10px">';
		
    include('xcrud/xcrud.php');
    $xcrud = Xcrud::get_instance();
	$xcrud->table('rostering');
	

	
	///1st level main table
	
	$xcrud->relation('client','debtorsmaster','debtorno','name');
	
  $xcrud->relation('patrol_location','guardforceclient','clientid','patrollocation','','','','','','debtorno','client');
 	 $xcrud->relation('account_number','debtoraccount','account_number','account_number','','','','','','debtorno','client');
	$xcrud->table_name('Guardforce Client Rostering Period Management');
	
			
    $xcrud->change_type('status','select','pending','pending,approved');
	
	$approvedby=stripslashes($_SESSION['UsersRealName']);
	//$xcrud->columns('approved_by',true);
     
	//$xcrud->fields('approved_by',true);
	
	$xcrud->validation_required(array('period' => 1,'start_date','end_date','client','patrol_location'));
	$xcrud->duplicate_button();
    $xcrud->disabled('department,total_hours,expected_cost');
	
	$xcrud->benchmark(true);
	
	
	
	
	
	
	echo $xcrud->render();
	
	

echo '</div>';
echo '</div>';

include('includes/footer.inc'); 

?>

