
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
	aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">&times;</span>
				</button>
				<h4 class="modal-title" id="myModalLabel">Choose Month</h4>
			</div>
			<div class="modal-body" id="modaltext"></div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
				<button type="button" class="btn btn-primary" id="showpay">Show</button>
			</div>
		</div>
	</div>
</div>

<style>
#loader-wrapper {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	/*z-index: 1000;*/
	opacity: 0.8;
	z-index: 1040;
	background-color: #000;
	display: none;
}

#spinner {
	display: none;
	position: relative;
	left: 50%;
	top: 50%;
	width: 150px;
	height: 150px;
	margin: -75px 0 0 -75px;
	border-radius: 50%;
	border: 3px solid transparent;
	border-top-color: #3498db;
	-webkit-animation: spin 2s linear infinite;
	/* Chrome, Opera 15+, Safari 5+ */
	animation: spin 2s linear infinite;
	/* Chrome, Firefox 16+, IE 10+, Opera */
}

#spinner:before {
	content: "";
	position: absolute;
	top: 5px;
	left: 5px;
	right: 5px;
	bottom: 5px;
	border-radius: 50%;
	border: 3px solid transparent;
	border-top-color: #e74c3c;
	-webkit-animation: spin 3s linear infinite;
	/* Chrome, Opera 15+, Safari 5+ */
	animation: spin 3s linear infinite;
	/* Chrome, Firefox 16+, IE 10+, Opera */
}

#spinner:after {
	content: "";
	position: absolute;
	top: 15px;
	left: 15px;
	right: 15px;
	bottom: 15px;
	border-radius: 50%;
	border: 3px solid transparent;
	border-top-color: #f9c922;
	-webkit-animation: spin 1.5s linear infinite;
	/* Chrome, Opera 15+, Safari 5+ */
	animation: spin 1.5s linear infinite;
	/* Chrome, Firefox 16+, IE 10+, Opera */
}

@
-webkit-keyframes spin { 0% {
	-webkit-transform: rotate(0deg); /* Chrome, Opera 15+, Safari 3.1+ */
	-ms-transform: rotate(0deg); /* IE 9 */
	transform: rotate(0deg); /* Firefox 16+, IE 10+, Opera */
}
100%
{
-webkit-transform:rotate(360 deg); /* Chrome, Opera 15+, Safari 3.1+ */
-ms-transform:rotate(360 deg); /* IE 9 */
transform:rotate(360 deg); /* Firefox 16+, IE 10+, Opera */
}
}
@
keyframes spin { 0% {
	-webkit-transform: rotate(0deg); /* Chrome, Opera 15+, Safari 3.1+ */
	-ms-transform: rotate(0deg); /* IE 9 */
	transform: rotate(0deg); /* Firefox 16+, IE 10+, Opera */
}
100%
{
-webkit-transform:rotate(360 deg); /* Chrome, Opera 15+, Safari 3.1+ */
-ms-transform:rotate(360 deg); /* IE 9 */
transform:rotate(360 deg); /* Firefox 16+, IE 10+, Opera */
}
}
</style>
<div id="loader-wrapper">
	<div id="spinner"></div>
</div>
<?php
// -----------------------------------------------get the data of company
$setting = $db->get_row ( "setting", array ("id" => 1 ) );
$empname = $db->get_all ( "employees");
$department = $db->get_all ( "departments" );
$query = $db->get_row ( "singaporetable", array ('id' => 1 ) );
?>
<script
	src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
	$("#emp").change(function(){
		 var eid= $(this).val();
		 
		 $.ajax({
			 type:'POST',
			 url:'<?php echo $link->link("daycalculate", Admin);?>',
			 data:'emp_id='+eid,
			 success:function(data){
				var value= data.split('////');
			    $('.paidday').val(value[0]);
				$('.presentday').val(value[1]);
				$('.weekoff').html(value[2]+"&nbsp;days");
				$("#weekoff_hidden").val(value[2]);
				$(".leave").val(value[3]);
				$(".extrawork").val(value[4]);
				$('.department').val(value[5]);
				$('.empcode').val(value[6]);
				$('.advance-taken').val(value[9]);
				$('.salary-remain').val(value[10]);
				
				if(value[7])
				{
					$("#joiningdate").html("Date Of Joining=&nbsp;"+value[7]+"<br>Not Marked="+value[8]+"days");
				}
				if(value[11] == 1)
				{
					$("#previous").show();
					$("#previous").click(function(){
						$.ajax({
							type:'POST',
							url:'<?php echo $link->link("daycalculate", Admin);?>',
							data:'sendid='+eid,
							success:function(data){
								$("#modaltext").html(data);		
								}
							});
						});
				}
				else 
				{
					$("#previous").hide();
				}
			}
		}); 
	});
	$("#showpay").click(function(){
		
		var getmonth= $("#year").val();
		window.open('<?php echo $link->link("viewpayslip", Admin,"?empid=");?>'+getmonth,'_blank');
		
		});
});
</script>
<div class="page-content">
	<div class="page-header position-relative">
		<h1>Salary Slip</h1>
	</div>
	<!--/.page-header-->

	<div class="row-fluid">
		<div class="span12">
			<!--PAGE CONTENT BEGINS-->
			<form method="post" action="">
				<div class="row-fluid">
					<div class="span12 center">
					<?php if(C_NAME !=''){?>
						<h1 class="text-warning"><?php echo C_NAME;?></h1>
					<?php } if(ADDRESS !=''){?>
						<h5 class="muted"><?php echo ADDRESS;?></h5>
					<?php }if($setting['telephone'] !='' || $setting['telephone2'] !=''){?>
						<h5>
							<span class="text-info">Ph:</span> <span class="muted"><?php
						if ($setting ['telephone'] != '') {
							echo $setting ['telephone'];
						}
						if ($setting ['telephone'] != '' && $setting ['telephone2'] != '') {
							echo '&nbsp;' . ',' . '&nbsp;';
						}
						if ($setting ['telephone2'] != '') {
							echo $setting ['telephone2'];
						}
						?></span>
						
					<?php }if($setting['fax'] !=''){?>
						, <span class="text-info">Fax:</span> <span class="muted"><?php echo $setting['fax'];?></span>
					<?php }if(C_EMAIL !=''){?>
						, <span class="text-info">Email:</span> <span class="muted"><?php echo C_EMAIL;?></span>
					<?php }if($setting['website'] !=''){?>
						, <span class="text-info">Website:</span> <span class="muted"><?php echo $setting['website'];?></span>
					<?php }?>				
						, <span class="text-info">Salary Slip For The Month Of:</span> <span
								class="muted"><?php
								$current_month = date ( "F", strtotime ( "-1 Months" ) );
								echo substr ( $current_month, 0, 3 );
							     if($current_month=="December")
									echo "&nbsp;-" . date ( Y,strtotime("-1 year"));
									else
									echo "&nbsp;-" . date ( Y);
								?></span>
						</h5>
					</div>
					<!-- <div class="span2">
						<button type="submit" name="submit"
							class="btn btn-minier btn-yellow">Save Column</button>
		 				<button type="submit" name="submit1"
							class="btn btn-minier btn-primary">Save Data</button>
					</div> -->
				</div>
				<!-- ./row-fluid -->
				<div class="space-12"></div>
				<div class="row-fluid">
					<div class="span12">
						<div class="row-fluid">
							<div class="span3 emp1">
								<div class="control-group">
									<label class="control-label" for="form-field-1"><b
										class="muted" style="font-size: 12px;">Employee Name</b></label>
								</div>
							</div>
							<div class="span3 emp2">
								<div class="control-group">
									<div class="controls">
										<select name="slip[empname]" id="emp" class="span10">
											<option value="" selected="selected" disabled>Please Choose</option>
											<?php
											foreach ( $empname as $row ) {
												?>
													<option value="<?php echo $row['e_id'];?>"><?php echo $row['e_name'];?></option>
												<?php
											
											}
											?>
										</select><br>
										<p class="btn btn-minier btn-warning" data-toggle="modal"
											data-target="#myModal" id="previous" style="display: none;">View
											Previous Slip</p>
										<span id="viewtempelate" style="display: none;"></span>
										<p class="text-error" id="joiningdate"></p>
									</div>
								</div>
							</div>
							<!-- <div class="span2" id="viewtempelate" style="display: none;"></div> -->
							<div class="span3 emp1">
								<div class="control-group">
									<label class="control-label" for="form-field-1"><b
										class="muted" style="font-size: 12px;">Department</b></label>
								</div>
							</div>
							<div class="span3">
								<div class="control-group">
									<div class="controls">
										<input type="text" id="form-field-1" name="slip[department]"
											class="span10 department" readonly="readonly"/>
									</div>
								</div>
							</div>
							<!-- <div class="span2">
								<div class="control-group">
									<label class="control-label" for="form-field-1"><b
										class="muted">PF Code</b></label>
								</div>
							</div>
							<div class="span3">
								<div class="control-group">
									<div class="controls">
										<input type="text" id="form-field-1" name="slip[pfcode]"
											class="span12" />
									</div>
								</div>
							</div> -->
						</div>
						<div class="row-fluid"></div>
					</div>
				</div>
				<!-- ./row-fluid -->

				<div class="row-fluid">
					<div class="span12">
						<div class="row-fluid">

							<div class="span3">
								<div class="control-group">
									<label class="control-label" for="form-field-1"><b
										class="muted" style="font-size: 12px;">Emp Code</b></label>
								</div>
							</div>
							<div class="span3">
								<div class="control-group">
									<div class="controls">
										<input type="text" id="form-field-1" name="slip[empcode]"
											class="span10 empcode" readonly="readonly"/>
									</div>
								</div>
							</div>

							<div class="span3">
								<div class="control-group">
									<label class="control-label" for="form-field-1"><b
										class="muted" style="font-size: 12px;">Employment Income</b></label>
								</div>
							</div>
							<div class="span3">
								<div class="control-group">
									<div class="controls">
										<input type="text" id="first"
											value="<?php echo $query['employment_income'];?>"
											name="slip[employment_income]"
											class="span10 assessable firsttwo" />&nbsp;<i
											class="icon-info tooltip-success" style="cursor: pointer;"
											data-rel="tooltip" data-placement="right"
											title="Enter your gross income for the previous year (including any bonuses, fixed allowances and any benifits in kind). DO NOT deduct CPF paid when you key in this figure."></i>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<!-- ./row-fluid -->

				<div class="row-fluid">
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Employee Expenses</b></label>
						</div>
						
					</div>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="second"
									value="<?php echo $query['employment_expences'];?>"
									name="slip[employment_expences]"
									class="span10 assessable firsttwo" /> &nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="Enter your allowable employment expences."></i>
							</div>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Net Employment Income</b></label>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="net"
									value="<?php echo ($query['employment_income']+$query['employment_expences']);?>"
									name="slip[net_employment_income]" class="span10" readonly="readonly" />
							</div>
						</div>
					</div>

				</div>
				<!-- ./row-fluid -->
				<div class="row-fluid">

					<!--<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Trade, Business, Profession Or Vacation</b></label>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="trade" name="slip[trade_income]"
									value="<?php echo $query['trade_income'];?>"
									class="span10 assessable" /> &nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="Enter your income from trade, business, profession or vocation in the previous year."></i>
							</div>
						</div>
					</div>-->
				</div>
				<!-- ./row-fluid -->
				<div class="row-fluid">
					<div class="span3">
						<div class="row-fluid">
							<div class="span7">
								<div class="control-group">
									<label class="control-label" for="form-field-1"> <b
										class="muted" style="font-size: 12px;">
											Num Of Days(<?php echo substr ( $current_month, 0, 3 );?>)
										</b>
									</label>
								</div>
							</div>
							<div class="span5">
								<input type="text" id="form-field-1" name="slip[paidday]"
									class="span12 paidday" />
							</div>
						</div>
						<div class="row-fluid">
							<span style="font-size: 12px;">Weeks Off:&nbsp;<span
								class="weekoff text-error">NILL</span></span>
						</div>
						<div class="row-fluid">
						
						<?php if($current_month=="December")
									echo '<input type="hidden" name="month_year" value="'.$current_month.'-'. date ( Y,strtotime("-1 year")).'">';
									else
									echo '<input type="hidden" name="month_year" value="'.$current_month.'-'. date ( Y).'">';
																?>
						
						</div>
					</div>
					<div class="span3">
						<div class="row-fluid">
							<div class="span7">
								<div class="control-group center">
									<label class="control-label" for="form-field-1"> <b
										class="muted" style="font-size: 12px;"> Num Of Days(Present) </b>
									</label>
								</div>
							</div>
							<div class="span5">
								<div class="control-group">
									<div class="controls">
										<input type="text" id="form-field-1" name="slip[presentday]"
											class="span12 presentday" />
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="span2">
						<div class="row-fluid">
							<div class="span7">
								<div class="control-group center">
									<label class="control-label" for="form-field-1"> <b
										class="muted" style="font-size: 12px;"> Total Leaves </b>
									</label>
								</div>
							</div>
							<div class="span5">
								<div class="control-group">
									<div class="controls">
										<input type="text" id="form-field-1" name="slip[total_leaves]"
											class="span12 leave" />
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="span4">
						<div class="row-fluid">
							<div class="span7">
								<div class="control-group">
									<label class="control-label" for="form-field-1"> <b
										class="muted" style="font-size: 12px;"> Num Of Weekend
											Presents </b>
									</label>
								</div>
							</div>
							<div class="span5">
								<div class="control-group">
									<div class="controls">
										<input type="text" id="form-field-1" name="slip[extrawork]"
											class="span12 extrawork" />
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<!-- ./row-fluid -->
				<div class="space-12"></div>
				<hr>
				<div class="space-12"></div>
				<div class="row-fluid">
					<!-- <div class="span6">
						<div
							class="span12 label label-large label-success arrowed-in arrowed-right">
							<b>Income (Earning)</b>
						</div>
					</div> -->
					<div class="span12">
						<div
							class="span12 label label-large label-important arrowed-in arrowed-right">
							<b>Reliefs (Deduction)</b>
						</div>
					</div>
				</div>
				<!-- ./row-fluid -->
				<div class="space-12"></div>
				<div class="row-fluid">
					<!-- <div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Dividends</b></label>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[dividends]"
									value="<?php echo $query['dividends'];?>"
									class="span10 assessable other" /> &nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="Enter your dividends received in the previous year."></i>
							</div>
						</div>
					</div>-->
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Earned Income Relief </b></label>
						</div>
					</div>
					<?php
					$var_earned = "<b>Enter the lower of your earned income or the following values:<br>-$1,000(if you are below 55)<br>-$6,000 (55 to 99)<br>-$8,000(60 and above)<br><br>For handicaped persons, the maximum earned income relief will be:<br>-$4,000(if you are below 55)<br>-$10,000 (55 to 59)<br>-$12,000 (60 and above)</b>";
					?>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1"
									value="<?php echo $query['earned_income_relief'];?>"
									name="slip[earned_income_relief]" class="span10 relief" />
								&nbsp;<i class="icon-info tooltip-success"
									style="cursor: pointer;" data-rel="tooltip"
									data-placement="left" title="<?php echo $var_earned;?>"></i>
							</div>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Spouse/handicapped spouse relief</b></label>
						</div>
					</div>
					<?php
					$var_spouse = "<b>Enter $2,000 for spouse relief or $3,000 for handicaped spouse relief. You are only eligible for spouse relief if the income of your spouse in the previous year is not more than $4,000.</b>";
					?>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[spouse_relief]"
									value="<?php echo $query['spouse_relief'];?>"
									class="span10 relief" /> &nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="<?php echo $var_spouse;?>"></i>
							</div>
						</div>
					</div>
				</div>
				<!-- ./row-fluid -->
				<div class="row-fluid">
					<!-- <div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Interest</b></label>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[interest]"
									value="<?php echo $query['interest'];?>"
									class="span10 assessable other" /> &nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="Enter your interest income received in the previous year if it is NOT from deposits with approved banks or licensed finance companies in Singapore"></i>
							</div>
						</div>
					</div>-->

				</div>
				<!-- ./row-fluid -->
				<div class="row-fluid">
					<!-- <div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Rent Form Property</b></label>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[property_rent]"
									value="<?php echo $query['property_rent'];?>"
									class="span10 assessable other" /> &nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="Enter your net rent from property in the previous year."></i>
							</div>
						</div>
					</div>-->
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Qualifying/handicapped child relief</b></label>
						</div>
					</div>
					<?php
					$var_handicapped = "<b>Qualifying child relief (QCR)<br>Enter $4,000 per child.<br><br>Handicapped child relief(HCR)<br>Enter $5,500 per handicapped child.</b>";
					?>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1"
									value="<?php echo $query['qualifying_relief'];?>"
									name="slip[qualifying_relief]" class="span10 relief" /> &nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="<?php echo $var_handicapped;?>"></i>
							</div>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Working mother's child relief</b></label>
						</div>
					</div>
					<?php
					$var_mother = "<b>Working Mother's Child Relief(WMCR)<br>Enter The Amount-<br>1st child- 15%of mother's earned income<br>2nd child- 20% of mother's earned income<br>3rd and each subsequent child- 25% of mother's earned income<br><br>Cumulative WMCR percentages are capped at 100% of mother's earned income.<br><br>Note: The sum of all child reliefs claimable is subject to a cap of $50,000 for each child.</b>";
					?>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[mother_relief]"
									value="<?php echo $query['mother_relief'];?>"
									class="span10 relief" />&nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="<?php echo $var_mother;?>"></i>
							</div>
						</div>
					</div>
				</div>
				<!-- ./row-fluid -->
				<div class="row-fluid">
					<!-- <div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Royalty, Charge, Estate/Trust Income</b></label>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1"
									value="<?php echo $query['royality_income'];?>"
									name="slip[royality_income]" class="span10 assessable other" />&nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="Enter your royalty, charge or estate/trust income received in the previous year."></i>
							</div>
						</div>
					</div>-->

				</div>
				<!-- ./row-fluid -->
				<div class="row-fluid">
					<!-- <div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Gains Or Profits Of An Income Nature </b></label>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1"
									value="<?php echo $query['gain_income_nature'];?>"
									name="slip[gain_income_nature]" class="span10 assessable other" />&nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="Enter your gains or profits of an income nature received in the previous year. These Include any income which does not fall within any of the other classifications of income stated above."></i>
							</div>
						</div>
					</div>-->
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Parent/handicapped parent relief</b></label>
						</div>
					</div>
					<?php
					$var_parent = "<b><u>Parent/handicapped parent relief</u><br>You can claim parent relief or handicapped parent relief for up to 2 dependants. The amount of relief for each dependent is as follows.<br><br><div class='row-fluid'>
										<div class='span4'>
											
										</div>
										<div class='span4'>
											<u>Staying With You</u>
										</div>
										<div class='span4'>
											<u>Not Staying With You</u>
										</div>
									</div><div class='row-fluid'>
										<div class='span4'>
											<b>Parent Relief</b>
										</div>
										<div class='span4'>
											<b>$7,000</b>
										</div>
										<div class='span4'>
											<b>$4,500</b>
										</div>
									</div>
									<div class='space-6'></div>
									<div class='row-fluid'>
										<div class='span4'>
											<b>Handicapped Parent Relief</b>
										</div>
										<div class='span4'>
											<b>$11,000</b>
										</div>
										<div class='span4'>
											<b>$8,000</b>
										</div>
									</div></b>";
					?>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[parent_relief]"
									value="<?php echo $query['parent_relief'];?>"
									class="span10 relief" />&nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="<?php echo $var_parent;?>"></i>
							</div>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Grandparent caregiver relief</b></label>
						</div>
					</div>
					<?php
					$var_grandparent = "<b><div class='row-fluid'>
										<div class='span12'>
											<h6><u>Grandparent caregiver relief</u></h6>
										</div>
									</div>
									<div class='row-fluid'>
										<div class='span12'>
											<p>Enter $3,000 if you are entitled to his relief. </p>
										</div>
									</div></b>";
					?>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1"
									value="<?php echo $query['grandparent_relief'];?>"
									name="slip[grandparent_relief]" class="span10 relief" />&nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="<?php echo $var_grandparent;?>"></i>
							</div>
						</div>
					</div>
				</div>
				<!-- ./row-fluid -->
				<div class="row-fluid">
					<!-- <div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">TOTAL OTHER INCOME</b></label>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[total_income]"
									value="<?php echo $query['total_income'];?>"
									class="span10 total_income" readonly />
							</div>
						</div>
					</div>-->

				</div>
				<!-- ./row-fluid -->
				<div class="row-fluid">
					<!-- <div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Approved Donations</b></label>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="approved_donation"
									value="<?php echo $query['approved_donations'];?>"
									name="slip[approved_donations]" class="span10" />&nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="Enter the amount donated (2.5 times) to approved Institutions of Public Character(IPC) in the previous year. For example, if your donate $100 to an approved IPC, you will be given a $250 deduction."></i>

							</div>
						</div>
					</div>-->
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Handicapped brother/sister relief</b></label>
						</div>
					</div>
					<?php
					$var_brothersis = "<b><div class='row-fluid'>
										<div class='span12'>
											<h6><u>Handicapped brother/sister relief</u></h6>
										</div>
									</div>
									<div class='row-fluid'>
										<div class='span12'>
											Enter upto $3,500 for each of your or your spouse's brothers or sisters who are handicapped and whom you maintained. 
										</div>
									</div></b>";
					?>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[brosis_relief]"
									value="<?php echo $query['brosis_relief'];?>"
									class="span10 relief" />&nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="<?php echo $var_brothersis;?>"></i>
							</div>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">CPF/provident Fund relief</b></label>
						</div>
					</div>
						<?php
						$var_cpf = "<b><div class='row-fluid'>
										<div class='span12'>
											<h6><u>CPF/provident fund relief</u></h6>
										</div>
									</div>
									<div class='row-fluid'>
										<div class='span12'>
											 Enter the amount of allowable CPF contribution. CPF capping rules apply.
										</div>
									</div></b>";
						?>
						<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[cpf_relief]"
									value="<?php echo $query['cpf_relief'];?>"
									class="span10 relief" />&nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="<?php echo $var_cpf;?>"></i>
							</div>
						</div>
					</div>
				</div>
				<!-- ./row-fluid -->
				<div class="row-fluid">
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Life Insurance relief</b></label>
						</div>
					</div><?php
					$var_insuarnce = "<b><div class='row-fluid'>
										<div class='span12'>
											<h6><u>Life Insurance relief</u></h6>
										</div>
									</div>
									<div class='row-fluid'>
										<div class='span12'>
											 You are eligible to claim life insurance relief up to a maximum of $5,000 if you have zero CPF contribution. Otherwise, you may claim the difference between the cap of $5,000 and your CPF contribution.
										</div>
									</div>
									<div class='space-6'></div>
									<div class='row-fluid'>
										For Example<br>
										CPF contribution:$3,000<br>
										Allowable life insurance relief:<br>
										$5,000- $3,000 =$2,000 
									</div>
									</b>";
					?>
						<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1"
									value="<?php echo $query['life_insurance_relief'];?>"
									name="slip[life_insurance_relief]" class="span10 relief" />&nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="<?php echo $var_insuarnce;?>"></i>
							</div>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Course Fee relief</b></label>
						</div>
					</div><?php
					$var_course = "<b><div class='row-fluid'>
										<div class='span12'>
											<h6><u>Course Fee relief</u></h6>
										</div>
									</div>
									<div class='row-fluid'>
										<div class='span12'>
											 Enter the amount of course fee incurred up to maximum of $5,000 in a year if you meet the qualifying conditionds.
										</div>
									</div>
									<div class='space-6'></div>
									<div class='row-fluid'>
										For Example<br>
										CPF contribution:$3,000<br>
										Allowable life insurance relief:<br>
										$5,000- $3,000 =$2,000 
									</div>
									</b>";
					?>
						<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1"
									value="<?php echo $query['coursefee_relief'];?>"
									name="slip[coursefee_relief]" class="span10 relief" />&nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="<?php echo $var_course;?>"></i>
							</div>
						</div>
					</div>
				</div>
				<!-- ./row-fluid -->
				<div class="row-fluid">
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Foreign maid leavy relief</b></label>
						</div>
					</div><?php
					$var_foreignmaid = "<b><div class='row-fluid'>
										<div class='span12'>
											<h6><u>Foreign maid leavy (FML) relief</u></h6>
										</div>
									</div>
									<div class='row-fluid'>
										<div class='span12'>
											 Enter twice the total foreign domestic worker levy paid  paid in the previous year, subject to the following cap amount:
										</div>
									</div>
									<div class='space-6'></div>
									<div class='row-fluid'>
										<div class='span10'>
											<u>Maximum Relief</u>
										</div>
										<div class='span2'>
										</div>
									</div>
									<div class='row-fluid'>
										<div class='span10'>
											Concessionary FML ($170 x 2 months + $120 x 10 months)
										</div>
										<div class='span2'>
											$3,080
										</div>
									</div>
								<div class='space-6'></div>
									<div class='row-fluid'>
										<div class='span10'>
											Without Concessionary FML ($265 per month)
										</div>
										<div class='span2'>
											$6,360
										</div>
									</div>
									</b>";
					?>
						<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[leavy_relief]"
									value="<?php echo $query['leavy_relief'];?>"
									class="span10 relief" />&nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="<?php echo $var_foreignmaid;?>"></i>
							</div>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">CPF cash top-up relief(self, dependent
									and medisave account)</b></label>
						</div>
					</div><?php
					$var_topup = "<b><div class='row-fluid'>
										<div class='span12'>
											<h6><u>CPF cash top-up relief</u></h6>
										</div>
									</div>
									<div class='space-6'></div>
									<div class='row-fluid'>
										<div class='span6'>
											 <u>CPF Top-ups</u>
										</div>
										<div class='span6'>
											<u>Maximum Relief</u>
										</div>
									</div>
									<div class='space-6'></div>
									<div class='row-fluid'>
										<div class='span6'>
											Your own minimum sum
										</div>
										<div class='span6'>
											$7,000
										</div>
									</div>
									<div class='space-6'></div>
									<div class='row-fluid'>
										<div class='span6'>
											Immediate family members<br>(grandparents/parents, spouse or siblings) top-ups
										</div>
										<div class='span6'>
											$7,000
										</div>
									</div>
									</b>";
					?>
						<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[cpf]"
									value="<?php echo $query['cpf'];?>" class="span10 relief" />&nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="<?php echo $var_topup;?>"></i>
							</div>
						</div>
					</div>
				</div>
				<!-- ./row-fluid -->
				<div class="row-fluid">
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Supplementary Retirement Scheme (SRS)
									relief</b></label>
						</div>
					</div><?php
					$var_srs = "<b><div class='row-fluid'>
										<div class='span12'>
											<h6><u>SRS relief</u></h6>
										</div>
									</div>
									<div class='space-6'></div>
									<div class='row-fluid'>
										<div class='span12'>
											 Enter the amount you/ your employer have contributed in the previous year, subject to a cap of $12,750 for a Singaporean/Singapore permanent Resident and $29,750 for a foreigner.
										</div>
									</div>
									</b>";
					?>
						<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[srs]"
									value="<?php echo $query['srs'];?>" class="span10 relief" />&nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="<?php echo $var_srs;?>"></i>
							</div>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">NSman(Self/Wife/Parent) relief</b></label>
						</div>
					</div><?php
					$var_nsman = "<b><div class='row-fluid'>
										<div class='span12'>
											<h6><u>NSman relief</u></h6>
										</div>
									</div>
									<div class='space-6'></div>
									<div class='row-fluid'>
										<div class='span12'>
											 For NSman (self) relief.
										</div>
									</div>
									<div class='row-fluid'>
										<div class='span6'>
											<u>Category Of NSman</u>
										</div>
										<div class='span3'>
											<u>Non-KAH</u>
										</div>
										<div class='span3'>
											<u>KAH</u>
										</div>
									</div>
									<div class='row-fluid'>
										<div class='span6'>
											No in-camp training in previous year
										</div>
										<div class='span3'>
											$1,500
										</div>
										<div class='span3'>
											$3,500
										</div>
									</div>
									<div class='space-6'></div>
									<div class='row-fluid'>
										<div class='span6'>
											Attended in-camp training in previous year
										</div>
										<div class='span3'>
											$3,000
										</div>
										<div class='span3'>
											$5,000
										</div>
									</div>
									<div class='space-6'></div>
									<div class='row-fluid'>
										<div class='span12'>
											Enter $750 if your son(s)/your husband are NSman.
										</div>
									</div>
									</b>";
					?>
						<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[nsman]"
									value="<?php echo $query['nsman'];?>" class="span10 relief" />&nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="<?php echo $var_nsman;?>"></i>
							</div>
						</div>
					</div>
				</div>
				<!-- ./row-fluid -->

				<!-- <div class="row-fluid">
					<div class="span6"></div>
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted">CHARGEABLE INCOME</b></label>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[chargeable_income]"
									class="span12" />
							</div>
						</div>
					</div>
				</div><!-- ./row-fluid -->
				<!-- <div class="row-fluid">
					<div class="span6"></div>
					<div class="span3">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted">Tax Payable On Chargeable Income</b></label>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[chargeable_tax]"
									class="span12" />
							</div>
						</div>
					</div>
				</div><!-- ./row-fluid -->
				<div class="row-fluid">
					<hr>
				</div>
				<div class="space-12"></div>
				<div class="row-fluid">
					<div class="span2">
						<div class="control-group">
							<label class="control-label" for="form-field-1"> <b class="muted"
								style="font-size: 12px;"> Assessable Income </b>
							</label>
						</div>
					</div>
					<!-- ./span2 -->
					<div class="span2">
						<input type="text" id="form-field-1" name="slip[assessableincome]"
							class="span12 assessableincome"
							value="<?php echo $query['assessable_income'];?>" readonly="readonly" />
					</div>
					<div class="span2">
						<div class="control-group">
							<label class="control-label" for="form-field-1"> <b class="muted"
								style="font-size: 12px;"> Chargeable Income </b>
							</label>
						</div>
					</div>
					<!-- ./span2 -->
					<div class="span2">
						<input type="text" id="form-field-1" name="slip[chargeableincome]"
							class="span12 charageable"
							value="<?php echo $query['chargeable_income'];?>" readonly="readonly" />
					</div>
					<div class="span2">
						<div class="control-group">
							<label class="control-label" for="form-field-1"> <b class="muted"
								style="font-size: 12px;"> Tax Payable On Chargeable Income </b>
							</label>
						</div>
					</div>
					<!-- ./span2 -->
					<div class="span2">
						<input type="text" name="slip[chargeableincometax]" class="span12"
							id="charageabletax"
							value="<?php echo $query['chargeable_tax'];?>" readonly="readonly" /><a
							href="<?php echo $link->link("incometax_slab", Admin);?>"
							target='_blank' class="btn btn-danger btn-small tooltip-success">View
							Tax Slab</a>
					</div>
				</div>
				<div class="space-12"></div>
				<hr>
				<div class="space-12"></div>
				<div class="row-fluid">
					<div class="span2">
						<div class="control-group">
							<label class="control-label" for="form-field-1"> <b class="muted"
								style="font-size: 12px;"> Parenthood Tax Rebate </b>
							</label>
						</div>
					</div><?php
					$var_parenthood = "
										<div class='row-fluid'>
											<div class='span12'>
												<u>Parenthood Tax Rebate</u>
											</div>
										</div>
										<div class='row-fluid'>
											<div class='span12'>
												1st child- $5000<br>
												2nd child- $10,000<br>
												3rd and each subsequent child- $20,000
											</div>
										</div>
										<div class='space-6'></div>
										<div class='row-fluid'>
											If you have been granted PTR previously and there is balance in your
											PTR account, refer to the PTR statement on the balance available to offset
											against your tax payable.
										</div>
										";
					?>
								
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="parenthood" name="slip[parenthood_tax]"
									value="<?php echo $query['parenthood_tax'];?>" class="span10" />&nbsp;<i
									class="icon-info tooltip-success" style="cursor: pointer;"
									data-rel="tooltip" data-placement="left"
									title="<?php echo $var_parenthood;?>"></i> <a
									class="btn btn-danger btn-small"
									href="http://www.iras.gov.sg/irasHome/page04_ektid1528.aspx"
									target="_blank">View Link</a>
							</div>
						</div>
					</div>
					<div class="span1"></div>
					<div class="span1"></div>
					<div class="span2">
						<div class="control-group">
							<label class="control-label" for="form-field-1"> <b class="muted"
								style="font-size: 12px;"> Net Tax Payable </b>
							</label>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="nettax" name="slip[nettax_payable]"
									class="span10" value="<?php echo $query['nettax_payable'];?>"
									readonly="readonly" />
							</div>
						</div>
					</div>
				</div>
				<div class="space-12"></div>
				<div class="row-fluid">
				<div class="span12">
				<div class="span2">
						<div class="control-group">
							<label class="control-label" for="form-field-1"> <b class="muted"
								style="font-size: 12px;"> Total Advance Taken </b>
							</label>
						</div>
					</div>
				<div class="span3">
								<div class="control-group">
									<div class="controls">
										<input type="text" id="net-advance" 
											class="span10 advance-taken" readonly="readonly"/>
									</div>
								</div>
							</div>	
				<div class="span2"></div>	
				<div class="span2">
						<div class="control-group">
							<label class="control-label" for="form-field-1"> <b class="muted"
								style="font-size: 12px;"> Total Salary Remaining </b>
							</label>
						</div>
					</div>
				<div class="span3">
								<div class="control-group">
									<div class="controls">
										<input type="text" id="net-remaining"
											class="span10 salary-remain" readonly/>
									</div>
								</div>
							</div>	
				</div>
				
				</div>
				<!-- ./row-fluid -->
				<!-- <div class="row-fluid">
					<div class="span2">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Prepared By</b></label>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1" name="slip[prepared_by]"
									class="span12" />
							</div>
						</div>
					</div>
					<div class="span1"></div>
					<div class="span1"></div>
					<div class="span2">
						<div class="control-group">
							<label class="control-label" for="form-field-1"><b class="muted"
								style="font-size: 12px;">Authorised Sign</b></label>
						</div>
					</div>
					<div class="span3">
						<div class="control-group">
							<div class="controls">
								<input type="text" id="form-field-1"
									name="slip[authorised_sign]" class="span12" />
							</div>
						</div>
					</div>
				</div>
				<hr>
				<div class="row-fluid">
					<div class="span12 center">
						<div class="span4"></div>
						<div class="span2">
							<div class="control-group">
								<label class="control-label" for="form-field-1"><b class="muted"
									style="font-size: 12px;">Employee Signature</b></label>
							</div>
						</div>
						<div class="span2">
							<div class="control-group">
								<div class="controls">
									<input type="text" id="form-field-1" name="slip[employee_sign]"
										class="span12" />
								</div>
							</div>
						</div>
						<div class="span4"></div>
					</div>
				</div>-->
				<div class="form-actions center">
					<input type="hidden" name="check" value="slip"> <input
						type="hidden" name="weekoff" value="" id="weekoff_hidden">
					<button class="btn btn-info btn-small" type="submit" name="submit">
						<i class="icon-ok"></i> Submit
					</button>

					&nbsp; &nbsp; &nbsp;
					<button class="btn btn-small" type="reset">
						<i class="icon-undo"></i> Reset
					</button>
				</div>
			</form>
			<!--PAGE CONTENT ENDS-->
		</div>
		<!--/.span-->
	</div>
	<!--/.row-fluid-->
</div>
<!--/.page-content-->


</div>
<!--/.main-content-->