Пример #1
0
<?php
include ("inc/dbconnection.php");
include ("inc/function.php");
$date_releaving = "";
$reason_realeaving = "";
$emp_id = "";
$id = $_POST["str1"];
if (isset($_POST["str4"])) {
    $date_releaving = getdbDateSepretoe($_POST["str4"]);
    $reason_realeaving = $_POST["str5"];
    $emp_id = $_POST["str6"];
}

//echo $weekly_off;
if ($id == 1) {
    $sql_check1 = "update " . $mysql_table_prefix . "account_detail set date_releaving  ='$date_releaving',
                reason_realeaving='$reason_realeaving' where emp_id='$emp_id'";

    $result_check1 = mysql_query($sql_check1) or die("Query Failed " . mysql_error());
    ?>
    <div id="div_update_releave">
        <table width="100%" cellpadding="2" cellspacing="2" align="center" border="0" class="border">
            <tr>
                <td colspan="2" class="blackHead">Relieving Detail</td>
            </tr>
            <tr>
                <td align="left" valign="top">
                    <table width="100%" cellpadding="2" cellspacing="2" align="center" border="0" class="border">
                        <tr>
                            <td class="text_1">Date of Leaving</td>
                            <?= $date_releaving = getDatetime($date_releaving) ?>
																				$side_allowance=0;
																				$prof_tax=0;
																				$tds=0;
																				$start_date="01";
																				$Total=0;

																				$flag=0;
																				$grand_days=0;
																								
																				$emp_id=$row_dept['emp_id'];
																				
																				$employee_typ=getofficeDetail('employee_typ',$emp_id);
																				
																				$start_date =getdbDateSepretoe($_POST['txt_date_from']);
																				
																				$end_date = getdbDateSepretoe($_POST['txt_date_to']);
																				
																				$day1 = substr($_POST['txt_date_from'],0,2); 
																				$month1 = substr($_POST['txt_date_from'],3,2);
																				$year1 = substr($_POST['txt_date_from'],6,4);
																				
																				$day2 = substr($_POST['txt_date_to'],0,2); 
																				$month2 = substr($_POST['txt_date_to'],3,2);
																				$year2 = substr($_POST['txt_date_to'],6,4);
																				
																				//$day1 = $day1 + 1;
																				
																				
																				$date = mktime(0,0,0,$month1,$day1,$year1); //Gets Unix timestamp START DATE
																				$date1 = mktime(0,0,0,$month2,$day2,$year2); //Gets Unix timestamp END DATE
																				$difference = $date1-$date; //Calcuates Difference
<? include ("inc/dbconnection.php");?>
<? include ("inc/function.php");?>
<?
if(isset($_GET["id"]))
{
	 $dept_id = $_GET["id"];
	 $emp_id = $_GET["str"];
	 $dept_from_date = getdbDateSepretoe($_GET["date"]);
}
if($emp_id!="")
{
 $sql_check1 = "update ".$mysql_table_prefix."designation_employee set	
																to_date  = '$dept_from_date'
																where emp_id='$emp_id' and to_date ='0000-00-00'";
																
$result_check1=mysql_query($sql_check1) or die ("Query Failed ".mysql_error());

$sql_check = "insert into  ".$mysql_table_prefix."designation_employee set	
																emp_id  ='$emp_id',
																designation_id ='$dept_id',
																from_date ='$dept_from_date',
																to_date ='0000-00-00'";
																
$result_check=mysql_query($sql_check) or die ("Query Failed ".mysql_error());

$emp_type=getdesignationMaster('emp_category','rec_id',$dept_id);

$sql_update = "update ".$mysql_table_prefix."official_detail set 
																emp_category ='$emp_type'
																where emp_id = '$emp_id'";
Пример #4
0
	e1.style.visibility = (e1.style.visibility == "visible") ? "hidden" : "visible";
	
}
</script>
<?
$Page = "add_holiday.php";
$PageTitle = "Add Holiday";
$PageFor = "Holiday";
$PageKey = "rec_id";
$PageKeyValue = "";
$Message = "";
if(isset($_POST["btn_submit"]))
{
	$PageKeyValue = $_POST[$PageKey];
	$holiday_name = $_POST["holiday_name"];
	$holiday_Date = getdbDateSepretoe($_POST["holiday_Date"]);
	
	if($PageKeyValue == "")
	{
		$sql = "insert into mpc_holiday_master set
													holiday_name  = '$holiday_name',
													holiday_date  = '$holiday_Date'
													";
		mysql_query($sql) or die ("Error in ".$sql."<br>".mysql_errno()." : ".mysql_error());
		$Message = "$PageFor Inserted";
	}	
	else
	{
		if($mode != "subcategory")
		{					
			  $sql = "update mpc_holiday_master set
Пример #5
0
<?php 
//////////// *************** Delete Loan ************** ///////////////
if (isset($_POST["btn_del"])) {
    $rec_id = $_POST["hidden_overlay"];
    $sql = "delete from mpc_loan_employee where rec_id = '" . $rec_id . "'";
    mysql_query($sql) or die("Invalid query : " . $sql . "<br>" . mysql_errno() . " : " . mysql_error());
    $sql = "delete from mpc_loan_installments where loan_id = '" . $rec_id . "'";
    mysql_query($sql) or die("Invalid query : " . $sql . "<br>" . mysql_errno() . " : " . mysql_error());
    $msg = "Loan Sucessfully Deleted";
}
//////******************** Edit Loan **************///////
if (isset($_POST['loan_id'])) {
    $loan_id = $_POST["loan_id"];
    $txt_loan = $_POST["txt_loan"];
    $installments_decided = $_POST["installments_decided"];
    $txt_date = getdbDateSepretoe($_POST["txt_date"]);
    $sql_up = "update mpc_loan_employee set \n\t\t\t\t\t\t\t\t\t\t\tloan_amount = '{$txt_loan}',\n\t\t\t\t\t\t\t\t\t\t\tinstallments_decided = '{$installments_decided}',\n\t\t\t\t\t\t\t\t\t\t\tloan_date = '{$txt_date}' \n\t\t\t\t\t\t\t\t\t\t\twhere rec_id= '{$loan_id}'";
    //echo $sql_up;
    $result_up = mysql_query($sql_up) or die("Query Failed " . mysql_error());
    if ($result_up) {
        $msg = "Loan Updated!!";
    } else {
        $msg = "Error In Updating Loan!!";
    }
}
if (isset($_GET['start'])) {
    if ($_GET['start'] == 'All') {
        $start = 0;
    } else {
        $start = $_GET['start'];
    }
Пример #6
0
<?
////////////////////// Markin attendence //////////////
if(isset($_POST['btn_submit']))
{
	if($_POST['no_refresh'] == $_SESSION['no_refresh'])
	{	
		//echo "WARNING: Do not try to refresh the page.";
	}
	else
	{	
		$id = $_POST['loan_id'];
		$i=0;
		foreach($id as $loan_id)
		{
			$deduction=$_POST['deduction'][$i];
			$deduction_date=getdbDateSepretoe($_POST['deduction_date_'.$i]);
			$deduction_by = $_POST['deduction_by'][$i];
			$loan_left = $_POST['loan_left'][$i];
		
			if($deduction!="")
			{
				$sql_check = "insert into ".$mysql_table_prefix."loan_installments set	
																						loan_id ='$loan_id',
																						installments ='$deduction',
																						installment_date ='$deduction_date',
																						installment_by ='$deduction_by'";
																			
				$result_check=mysql_query($sql_check) or die ("Query Failed ".mysql_error());
				
				if($deduction==$loan_left)
				{
    $msg = "Designation Entry Sucessfully Deleted";
}
?>
<?
@$current_date = date('Y-m-d');
////////////////////// Markin attendence //////////////
if (isset($_POST['emp_category'])) {
    if ($_POST['no_refresh'] == $_SESSION['no_refresh']) {
        //echo "WARNING: Do not try to refresh the page.";
    } else {
        $rec_id = $_POST["hidden_overlay"];
        $id = $_POST['emp_id'];
        $emp_category = $_POST['emp_category'];
        $designation = $_POST['designation'];
        $txt_to_date = getdbDateSepretoe($_POST['txt_to_date']);
        $txt_from_date = getdbDateSepretoe($_POST['txt_from_date']);


        $sql = "select * from mpc_designation_employee where emp_id = '$id'";
        $result = mysql_query($sql) or die("Error in : " . $sql . "<br>" . mysql_errno() . " : " . mysql_error());
        $row = mysql_fetch_array($result);
        $rec_id = $row['rec_id'];





        $sql = "SELECT * FROM " . $mysql_table_prefix . "designation_employee where emp_id = '$id' and ((
		'$txt_from_date'>=from_date and '$txt_from_date'<=to_date) or ('$txt_to_date'>=to_date))and rec_id !='$designation_id'";
        $result = mysql_query($sql) or die("Error in : " . $sql . "<br>" . mysql_errno() . " : " . mysql_error());
        if (mysql_num_rows($result) > 0) {
Пример #8
0
////////////////////// Markin attendence //////////////
if (isset($_POST['btn_submit'])) {
    if ($_POST['no_refresh'] == $_SESSION['no_refresh']) {
        //echo "WARNING: Do not try to refresh the page.";
    } else {
        $id = $_POST['emp_id'];
        $i = 0;
        foreach ($id as $emp_id) {
            $salary_fine = $_POST['salary_fine'][$i];
            $salary_damage = $_POST['salary_damage'][$i];
            $salary_canteen = $_POST['salary_canteen'][$i];
            $salary_society_welfare = $_POST['salary_society_welfare'][$i];
            $salary_electrical = $_POST['salary_electrical'][$i];
            $salarly_security = $_POST['salarly_security'][$i];
            $salary_house_rent = $_POST['salary_house_rent'][$i];
            $salary_deduction_date = getdbDateSepretoe($_POST['salary_deduction_date' . $i]);
            $sql_check = "insert into " . $mysql_table_prefix . "salary_deduction set	
																						emp_id ='$emp_id',
																						salary_fine ='$salary_fine',
																						salary_damage ='$salary_damage',
																						salary_canteen ='$salary_canteen',
																						salary_society_welfare ='$salary_society_welfare',
																						salary_electrical ='$salary_electrical',
																						salarly_security ='$salarly_security',
																						salary_house_rent='$salary_house_rent',
																						salary_deduction_date ='$salary_deduction_date'";

            $result_check = mysql_query($sql_check) or die("Query Failed " . mysql_error());

            $i++;
        }
Пример #9
0
                                                                </td>
                                                                <td width="15%" align="left">
                                                                <?php 
echo getofficeDetail('employee_typ', $emp_id);
?>
&nbsp;
                                                                </td>
                                                                <td width="15%" align="left">
                                                                <?php 
echo getdesignationMaster('emp_category', 'rec_id', getdesignationDetail('designation_id', $emp_id, getdbDateSepretoe($txt_from_date)));
?>
&nbsp;
                                                                </td>
                                                                <td width="15%" align="left">
                                                                <?php 
echo getSalaryDetail('basic', $emp_id, getdbDateSepretoe($txt_from_date));
?>
&nbsp;
                                                                </td>
                                                                <td width="15%" align="left">
                                                                <?php 
echo getDatetime(getofficeDetail('date_joining', $emp_id));
?>
&nbsp;
                                                                </td>
                                                                <td width="15%" align="left">
                                                                <?php 
echo getDatetime($row['dob']);
?>
&nbsp;
                                                                </td>
</td>
                                    <td align="center"><?php 
        echo $row_emp['ticket_no'];
        ?>
</td>
                                	<td align="left">
                                    	<?php 
        echo $row_emp['first_name'];
        ?>
 <?php 
        echo $row_emp['last_name'];
        ?>
                                   	</td>
                                     <td align="left">
                                    	<?php 
        echo getdesignationMaster('designation_name', 'rec_id', getdesignationDetail('designation_id', $row_emp['emp_id'], getdbDateSepretoe($date)));
        ?>
                                    </td>
                                    <td align="center">
                                    	<?php 
        echo $row_emp['attendance_status'];
        ?>
                                    </td>
                                   
                                </tr>                                
                                <?php 
        $s++;
    }
}
?>
		                                              	
Пример #11
0
$date_releaving = "";
$reason_realeaving = "";
$emp_id = "";
$from_date = "";
if (isset($_POST["str1"])) {
    $basic = $_POST['str1'];
    $lta = $_POST['str3'];
    $convence = $_POST['str4'];
    $medical = $_POST['str5'];
    $hra = $_POST['str6'];
    $side_allowance = $_POST['str7'];
    $p_tax = $_POST['str8'];
    $tds = $_POST['str9'];
    $other_gain = $_POST['str10'];
    $emp_id = $_POST['str11'];
    $date = getdbDateSepretoe($_POST['str12']);
    $ip = $_SERVER['REMOTE_ADDR'];
}
//echo $weekly_off;
$sql_update = "update " . $mysql_table_prefix . "salary_master set \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto_date = '{$date}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tInsertDate = now(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIpAddress = '{$ip}'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhere emp_id = '{$emp_id}' and to_date='0000-00-00'";
$result_check = mysql_query($sql_update) or die("Query Failed " . mysql_error());
$sql_insert_salary = "insert into " . $mysql_table_prefix . "salary_master set \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\temp_id = '{$emp_id}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbasic = '{$basic}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tleave_travel_allow = '{$lta}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thra = '{$hra}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside_allowance = '{$side_allowance}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconvence = '{$convence}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttds = '{$tds}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tother_deductions = '{$other_gain}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmedical = '{$medical}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprofessional_tax = '{$p_tax}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom_date = '{$date}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tInsertBy = '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tInsertDate = now(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIpAddress = '{$ip}'";
$result_check = mysql_query($sql_insert_salary) or die("Query Failed " . mysql_error());
$total_earning = $basic + $convence + $medical + $side_allowance + $lta + $hra;
?>
<div id="div_hide" style="display:block;" >
<table width="100%" cellpadding="2" cellspacing="2" align="center" border="0" class="border">
	<tr>
    	<td colspan="2" class="blackHead">Salary Detail (Effective From date <?php 
echo $_POST['str12'];
?>
<? include ("inc/dbconnection.php");?>
<? include ("inc/function.php");?>
<?
//if(isset($_GET["id"]))
//{
	echo $dept_id = $_GET["id"];echo "<br>";
	echo $main_dept_id=getdeptDetail('reference_id','rec_id',$dept_id);echo "<br>";
	echo $emp_id = $_GET["str"];
	echo $dept_from_date = getdbDateSepretoe($_GET["date"]);echo "<br>"; 
	
//}
if($emp_id !="")
{    
 $sql_check1 = "update ".$mysql_table_prefix."department_employee set	
																to_date  ='$dept_from_date'
																where emp_id='$emp_id' and to_date ='0000-00-00'";
																
$result_check1=mysql_query($sql_check1) or die ("Query Failed ".mysql_error());

//Udate department in employee master table.
$query ="update ".$mysql_table_prefix."employee_master set department ='$main_dept_id' where emp_id = '$emp_id'";
mysql_query($query);

$sql_check = "insert into  ".$mysql_table_prefix."department_employee set	
																			emp_id  ='$emp_id',
																			dept_id ='$dept_id',
																			from_date ='$dept_from_date',
																			to_date ='0000-00-00'";
																
$result_check=mysql_query($sql_check) or die ("Query Failed ".mysql_error());
}