worked on asset section in master -vadivel J
This commit is contained in:
commit
6d46208131
@ -380,6 +380,7 @@ $routes->get('inprocess', 'Inprocess::index');
|
|||||||
// Sales Controller
|
// Sales Controller
|
||||||
$routes->get('sales_dashboard', 'Sales::sales_dashboard');
|
$routes->get('sales_dashboard', 'Sales::sales_dashboard');
|
||||||
$routes->get('invoicedetails/ViewInvoice', 'Sales::ViewInvoice');
|
$routes->get('invoicedetails/ViewInvoice', 'Sales::ViewInvoice');
|
||||||
|
$routes->get('getInvoiceAttachment', 'Sales::getInvoiceAttachments');
|
||||||
$routes->get('getInvoiceAttachments', 'Sales::getInvoiceAttachments');
|
$routes->get('getInvoiceAttachments', 'Sales::getInvoiceAttachments');
|
||||||
$routes->get('deleteAttachment', 'Sales::deleteAttachment');
|
$routes->get('deleteAttachment', 'Sales::deleteAttachment');
|
||||||
$routes->post('saveAttachment', 'Sales::saveAttachment');
|
$routes->post('saveAttachment', 'Sales::saveAttachment');
|
||||||
|
|||||||
@ -386,7 +386,7 @@ class Emergencypurchaseorder extends BaseController
|
|||||||
function addNewRevenuePurchaseOrder()
|
function addNewRevenuePurchaseOrder()
|
||||||
{
|
{
|
||||||
|
|
||||||
print_r($this->request->getPost());die;
|
// print_r($this->request->getPost());die;
|
||||||
$txtspl = $this->request->getPost('txtSpecial');
|
$txtspl = $this->request->getPost('txtSpecial');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,6 @@ class Employeedetails extends BaseController
|
|||||||
$this->session = session();
|
$this->session = session();
|
||||||
helper('form'); //$this->load->library('form_validation');
|
helper('form'); //$this->load->library('form_validation');
|
||||||
$this->isLoggedIn();
|
$this->isLoggedIn();
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* This function is used to load the Employee details
|
* This function is used to load the Employee details
|
||||||
@ -202,20 +201,22 @@ class Employeedetails extends BaseController
|
|||||||
|
|
||||||
function AddNewEmployee()
|
function AddNewEmployee()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$photo = $this->request->getFile('photo');
|
$photo = $this->request->getFile('photo');
|
||||||
$Picture = "";
|
$Picture = "";
|
||||||
|
if (isset($photo)) {
|
||||||
if ($photo->isValid() && !$photo->hasMoved()) {
|
if ($photo->isValid() && !$photo->hasMoved()) {
|
||||||
$uploadDir = ROOTPATH . 'public/uploads/images/';
|
$uploadDir = ROOTPATH . 'public/uploads/images/';
|
||||||
$allowedTypes = ['jpg', 'jpeg', 'png', 'gif'];
|
$allowedTypes = ['jpg', 'jpeg', 'png', 'gif'];
|
||||||
if (in_array($photo->getExtension(), $allowedTypes)) {
|
if (in_array($photo->getExtension(), $allowedTypes)) {
|
||||||
$newName = $photo->getRandomName();
|
$newName = $photo->getRandomName();
|
||||||
if(!is_dir($uploadDir)) { mkdir($uploadDir, 0777, true); }
|
if (!is_dir($uploadDir)) {
|
||||||
|
mkdir($uploadDir, 0777, true);
|
||||||
|
}
|
||||||
$photo->move($uploadDir, $newName);
|
$photo->move($uploadDir, $newName);
|
||||||
$Picture = $newName;
|
$Picture = $newName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// $Profile = $this->request->getPost('photo');
|
// $Profile = $this->request->getPost('photo');
|
||||||
$FirstName = $this->request->getPost('FirstName');
|
$FirstName = $this->request->getPost('FirstName');
|
||||||
$FatherName = $this->request->getPost('FatherName');
|
$FatherName = $this->request->getPost('FatherName');
|
||||||
@ -290,22 +291,49 @@ class Employeedetails extends BaseController
|
|||||||
|
|
||||||
//echo $DOB;
|
//echo $DOB;
|
||||||
$Employee = array(
|
$Employee = array(
|
||||||
'FirstName' => $FirstName, 'FatherName' => $FatherName,
|
'FirstName' => $FirstName,
|
||||||
'Gender' => $Gender, 'DateofBirth' => $DOB, 'ContactNumber' => $ContactNumber, 'EmailId' => $EmailId,
|
'FatherName' => $FatherName,
|
||||||
'BloodGroup' => $BloodGroup, 'MartialStatus' => $MartialStatus, 'DateofJoining' => $DOJ,
|
'Gender' => $Gender,
|
||||||
'PreviousYearsOfExp' => $Previousexperience, 'Designation' => $desigination,
|
'DateofBirth' => $DOB,
|
||||||
'Departmentcode' => $departmentCode, 'PresentAddress' => $CurrentAddress,
|
'ContactNumber' => $ContactNumber,
|
||||||
'PermanentAddress' => $permanentaddress, 'EmergencyContactName' => $emergencycontactname,
|
'EmailId' => $EmailId,
|
||||||
'EmergencyContactNumber' => $emergencycontactnumber, 'Edu_Qualification' => $eduqualifaction,
|
'BloodGroup' => $BloodGroup,
|
||||||
'Additional_Qualification' => $addqualification, 'AadharNo' => $aadharno, 'PANNo' => $panno,
|
'MartialStatus' => $MartialStatus,
|
||||||
'BankAccountNo' => $accountno, 'IFSCCode' => $ifsccode, 'BankBranchName' => $bankbranchname,
|
'DateofJoining' => $DOJ,
|
||||||
'BankAddress' => $bankaddress, 'PassportNo' => $passportno, 'Passport_Valid_till' => $Valid,
|
'PreviousYearsOfExp' => $Previousexperience,
|
||||||
'IsActive' => $IsActive, 'ProfilePic' => $Picture, 'Reference_Name' => $referredby,
|
'Designation' => $desigination,
|
||||||
'Reference_ContactNumber' => $referrercontno, 'Remarks' => $addinfo, 'CreatedBy' => $createdby,
|
'Departmentcode' => $departmentCode,
|
||||||
'personalEmailId' => $comEmailId, 'DriverLicense' => $driverlicense,
|
'PresentAddress' => $CurrentAddress,
|
||||||
'LicenseValidtill' => $License_ExpiryDate, 'VoterID' => $VoterID, 'PFNO' => $PFno, 'ESI' => $ESIno,
|
'PermanentAddress' => $permanentaddress,
|
||||||
'NomineeDetails' => $Nominee , 'is_management_team' => $is_management_team , 'esi_applicable'=>$esi_applicable,
|
'EmergencyContactName' => $emergencycontactname,
|
||||||
'pf_applicable'=>$pf_applicable,'work_location'=>$work_location
|
'EmergencyContactNumber' => $emergencycontactnumber,
|
||||||
|
'Edu_Qualification' => $eduqualifaction,
|
||||||
|
'Additional_Qualification' => $addqualification,
|
||||||
|
'AadharNo' => $aadharno,
|
||||||
|
'PANNo' => $panno,
|
||||||
|
'BankAccountNo' => $accountno,
|
||||||
|
'IFSCCode' => $ifsccode,
|
||||||
|
'BankBranchName' => $bankbranchname,
|
||||||
|
'BankAddress' => $bankaddress,
|
||||||
|
'PassportNo' => $passportno,
|
||||||
|
'Passport_Valid_till' => $Valid,
|
||||||
|
'IsActive' => $IsActive,
|
||||||
|
'ProfilePic' => $Picture,
|
||||||
|
'Reference_Name' => $referredby,
|
||||||
|
'Reference_ContactNumber' => $referrercontno,
|
||||||
|
'Remarks' => $addinfo,
|
||||||
|
'CreatedBy' => $createdby,
|
||||||
|
'personalEmailId' => $comEmailId,
|
||||||
|
'DriverLicense' => $driverlicense,
|
||||||
|
'LicenseValidtill' => $License_ExpiryDate,
|
||||||
|
'VoterID' => $VoterID,
|
||||||
|
'PFNO' => $PFno,
|
||||||
|
'ESI' => $ESIno,
|
||||||
|
'NomineeDetails' => $Nominee,
|
||||||
|
'is_management_team' => $is_management_team,
|
||||||
|
'esi_applicable' => $esi_applicable,
|
||||||
|
'pf_applicable' => $pf_applicable,
|
||||||
|
'work_location' => $work_location
|
||||||
);
|
);
|
||||||
|
|
||||||
//print_r($Employee);die();
|
//print_r($Employee);die();
|
||||||
@ -316,14 +344,13 @@ class Employeedetails extends BaseController
|
|||||||
// Get the uploaded files
|
// Get the uploaded files
|
||||||
$files = $this->request->getFiles();
|
$files = $this->request->getFiles();
|
||||||
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
|
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
|
||||||
if(isset($files['emp_file']))
|
if (isset($files['emp_file'])) {
|
||||||
{
|
|
||||||
foreach ($files['emp_file'] as $index => $file) {
|
foreach ($files['emp_file'] as $index => $file) {
|
||||||
if ($file->isValid() && !$file->hasMoved()) {
|
if ($file->isValid() && !$file->hasMoved()) {
|
||||||
// Move the file to the desired directory
|
// Move the file to the desired directory
|
||||||
$newName = $file->getRandomName();
|
$newName = $file->getRandomName();
|
||||||
$file->move(ROOTPATH . 'public/uploads/images/emp_files', $newName);
|
$file->move(ROOTPATH . 'public/uploads/images/emp_files', $newName);
|
||||||
$path = ROOTPATH . 'public/uploads/images/emp_files/'.$newName;
|
$path = ROOTPATH . 'public/uploads/images/emp_files/' . $newName;
|
||||||
// Store the file information in the database
|
// Store the file information in the database
|
||||||
$this->empFiles->save([
|
$this->empFiles->save([
|
||||||
'file_name' => $fileNames[$index], // User-entered file name
|
'file_name' => $fileNames[$index], // User-entered file name
|
||||||
@ -353,25 +380,28 @@ class Employeedetails extends BaseController
|
|||||||
|
|
||||||
// $this->session->set_flashdata('Success', 'New Employee created successfully!');
|
// $this->session->set_flashdata('Success', 'New Employee created successfully!');
|
||||||
$this->session->setFlashdata('success', 'New Employee created successfully!');
|
$this->session->setFlashdata('success', 'New Employee created successfully!');
|
||||||
|
return json_encode('true');
|
||||||
// echo "<script>alert('New Employee Created successfully!');</script>";
|
// echo "<script>alert('New Employee Created successfully!');</script>";
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// $this->session->set_flashdata('Error', 'New Employee details not saved');
|
// $this->session->set_flashdata('Error', 'New Employee details not saved');
|
||||||
$this->session->setFlashdata('error', 'Record Not Saved!');
|
$this->session->setFlashdata('error', 'Record Not Saved!');
|
||||||
|
return json_encode('false');
|
||||||
// echo "<script>alert('Record Not Saved!');</script>";
|
// echo "<script>alert('Record Not Saved!');</script>";
|
||||||
// redirect('employeeListing', 'refresh');
|
// redirect('employeeListing', 'refresh');
|
||||||
}
|
}
|
||||||
return redirect()->route('employeeListing');
|
// return redirect()->route('employeeListing');
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function deleteEmployeeFile(){
|
function deleteEmployeeFile()
|
||||||
|
{
|
||||||
$id = $this->request->getPost('id');
|
$id = $this->request->getPost('id');
|
||||||
$update = $this->empFiles->set(['is_active' => 0])->where('id',$id)->update();
|
$update = $this->empFiles->set(['is_active' => 0])->where('id', $id)->update();
|
||||||
if($update){
|
if ($update) {
|
||||||
return true;
|
return true;
|
||||||
}else{
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -379,8 +409,6 @@ class Employeedetails extends BaseController
|
|||||||
* This function is used to load the add new Employee form with dropdown values */
|
* This function is used to load the add new Employee form with dropdown values */
|
||||||
function addemployee()
|
function addemployee()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$GenderConfigID = 'C013';
|
$GenderConfigID = 'C013';
|
||||||
$MartialConfigID = 'C012';
|
$MartialConfigID = 'C012';
|
||||||
$QualificationConfigID = 'C014';
|
$QualificationConfigID = 'C014';
|
||||||
@ -396,16 +424,17 @@ class Employeedetails extends BaseController
|
|||||||
$data['BloodGroup'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
|
$data['BloodGroup'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
|
||||||
$data['Location'] = $this->employeedetails_model->getConfigValue($LocationConfigID);
|
$data['Location'] = $this->employeedetails_model->getConfigValue($LocationConfigID);
|
||||||
$data['Department'] = $this->employeedetails_model->getDepartment();
|
$data['Department'] = $this->employeedetails_model->getDepartment();
|
||||||
$data['hra_rate'] = $this->appConfig->where('config_key',1)->get()->getRow()->config_value;
|
$data['hra_rate'] = $this->appConfig->where('config_key', 1)->get()->getRow()->config_value;
|
||||||
$data['pf_rate'] = $this->appConfig->where('config_key',2)->get()->getRow()->config_value;
|
$data['pf_rate'] = $this->appConfig->where('config_key', 2)->get()->getRow()->config_value;
|
||||||
$data['esi_rate'] = $this->appConfig->where('config_key',3)->get()->getRow()->config_value;
|
$data['esi_rate'] = $this->appConfig->where('config_key', 3)->get()->getRow()->config_value;
|
||||||
$this->global['pageTitle'] = 'Add New Employee';
|
$this->global['pageTitle'] = 'Add New Employee';
|
||||||
|
|
||||||
// if($this->role == ROLE_ADMIN || $this->DEPCode == HR)
|
// if($this->role == ROLE_ADMIN || $this->DEPCode == HR)
|
||||||
// {
|
// {
|
||||||
|
|
||||||
|
|
||||||
$this->loadViews("addEmployee", $this->global, $data, NULL);
|
// $this->loadViews("addEmployee", $this->global, $data, NULL);
|
||||||
|
$this->loadViews("addEmployeenew", $this->global, $data, NULL);
|
||||||
|
|
||||||
|
|
||||||
// }
|
// }
|
||||||
@ -449,7 +478,6 @@ class Employeedetails extends BaseController
|
|||||||
$query = $this->employeedetails_model->checkAadharExists($id);
|
$query = $this->employeedetails_model->checkAadharExists($id);
|
||||||
$response = ($query !== null && !empty($query)) ? $query[0]['AadharNo'] : null;
|
$response = ($query !== null && !empty($query)) ? $query[0]['AadharNo'] : null;
|
||||||
return $this->response->setJSON($response);
|
return $this->response->setJSON($response);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -503,7 +531,9 @@ class Employeedetails extends BaseController
|
|||||||
if (in_array($photo->getExtension(), $allowedTypes)) {
|
if (in_array($photo->getExtension(), $allowedTypes)) {
|
||||||
// Generate unique file name
|
// Generate unique file name
|
||||||
$newName = $photo->getRandomName();
|
$newName = $photo->getRandomName();
|
||||||
if(!is_dir($uploadDir)) { mkdir($uploadDir, 0777, true); }
|
if (!is_dir($uploadDir)) {
|
||||||
|
mkdir($uploadDir, 0777, true);
|
||||||
|
}
|
||||||
// Move the uploaded file to the upload directory
|
// Move the uploaded file to the upload directory
|
||||||
$photo->move($uploadDir, $newName);
|
$photo->move($uploadDir, $newName);
|
||||||
|
|
||||||
@ -544,12 +574,12 @@ class Employeedetails extends BaseController
|
|||||||
$data['Location'] = $this->employeedetails_model->getConfigValue($LocationConfigID);
|
$data['Location'] = $this->employeedetails_model->getConfigValue($LocationConfigID);
|
||||||
$data['DepartmentList'] = $this->employeedetails_model->getDepartment();
|
$data['DepartmentList'] = $this->employeedetails_model->getDepartment();
|
||||||
$data['EmpDetails'] = $this->employeedetails_model->viewemployee($EmpID);
|
$data['EmpDetails'] = $this->employeedetails_model->viewemployee($EmpID);
|
||||||
$data['emp_data'] = $this->empFiles->where('emp_id',$EmpID)->where('is_active',1)->findAll();
|
$data['emp_data'] = $this->empFiles->where('emp_id', $EmpID)->where('is_active', 1)->findAll();
|
||||||
$data['empPay'] = $this->emppaydate_model->getEmpPayData($EmpID);
|
$data['empPay'] = $this->emppaydate_model->getEmpPayData($EmpID);
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'View Employee';
|
$this->global['pageTitle'] = 'View Employee';
|
||||||
|
|
||||||
$this->loadViews("editEmployee", $this->global, $data, NULL);
|
$this->loadViews("editEmployeenew", $this->global, $data, NULL);
|
||||||
}
|
}
|
||||||
/* To Check the email exists in the database or not for the employee*/
|
/* To Check the email exists in the database or not for the employee*/
|
||||||
function checkMailEmp()
|
function checkMailEmp()
|
||||||
@ -604,41 +634,57 @@ class Employeedetails extends BaseController
|
|||||||
$ModifyPictureName = $this->request->getPost('ModifyImage');
|
$ModifyPictureName = $this->request->getPost('ModifyImage');
|
||||||
$Picture = "";
|
$Picture = "";
|
||||||
if ($PictureName != '') {
|
if ($PictureName != '') {
|
||||||
|
|
||||||
//echo 'Exists';
|
//echo 'Exists';
|
||||||
//$Picture = $PictureName;
|
//$Picture = $PictureName;
|
||||||
if (strlen((string)$ModifyPictureName) == 0) {
|
if (strlen((string)$ModifyPictureName) == 0) {
|
||||||
//echo 'Exists But Not replace';
|
//echo 'Exists But Not replace';
|
||||||
$Picture = $PictureName;
|
$Picture = $PictureName;
|
||||||
} else {
|
} else {
|
||||||
|
// echo "<pre>";
|
||||||
|
// // print_r($this->request->getPost());
|
||||||
|
// print_r($this->request->getFile('photo'));
|
||||||
|
// die;
|
||||||
//echo 'Exists But Replace';
|
//echo 'Exists But Replace';
|
||||||
//$Picture = $ModifyPictureName;
|
//$Picture = $ModifyPictureName;
|
||||||
//$Picture = $this->editimage($ModifyPictureName);
|
//$Picture = $this->editimage($ModifyPictureName);
|
||||||
$photo = $this->request->getFile('ModifyImage');
|
$photo = $this->request->getFile('ModifyImage');
|
||||||
|
if (!$photo || !$photo->isValid()) {
|
||||||
|
$photo = $this->request->getFile('photo');
|
||||||
|
}
|
||||||
|
if (isset($photo)) {
|
||||||
if ($photo->isValid() && !$photo->hasMoved()) {
|
if ($photo->isValid() && !$photo->hasMoved()) {
|
||||||
$uploadDir = ROOTPATH . 'public/uploads/images/';
|
$uploadDir = ROOTPATH . 'public/uploads/images/';
|
||||||
$allowedTypes = ['jpg', 'jpeg', 'png', 'gif'];
|
$allowedTypes = ['jpg', 'jpeg', 'png', 'gif'];
|
||||||
if (in_array($photo->getExtension(), $allowedTypes)) {
|
if (in_array($photo->getExtension(), $allowedTypes)) {
|
||||||
$newName = $photo->getRandomName();
|
$newName = $photo->getRandomName();
|
||||||
if(!is_dir($uploadDir)) { mkdir($uploadDir, 0777, true); }
|
if (!is_dir($uploadDir)) {
|
||||||
|
mkdir($uploadDir, 0777, true);
|
||||||
|
}
|
||||||
$photo->move($uploadDir, $newName);
|
$photo->move($uploadDir, $newName);
|
||||||
$Picture = $newName;
|
$Picture = $newName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
//echo 'Not Exists';
|
//echo 'Not Exists';
|
||||||
$photo = $this->request->getFile('photo');
|
$photo = $this->request->getFile('photo');
|
||||||
|
if (isset($photo)) {
|
||||||
if ($photo->isValid() && !$photo->hasMoved()) {
|
if ($photo->isValid() && !$photo->hasMoved()) {
|
||||||
$uploadDir = ROOTPATH . 'public/uploads/images/';
|
$uploadDir = ROOTPATH . 'public/uploads/images/';
|
||||||
$allowedTypes = ['jpg', 'jpeg', 'png', 'gif'];
|
$allowedTypes = ['jpg', 'jpeg', 'png', 'gif'];
|
||||||
if (in_array($photo->getExtension(), $allowedTypes)) {
|
if (in_array($photo->getExtension(), $allowedTypes)) {
|
||||||
$newName = $photo->getRandomName();
|
$newName = $photo->getRandomName();
|
||||||
if(!is_dir($uploadDir)) { mkdir($uploadDir, 0777, true); }
|
if (!is_dir($uploadDir)) {
|
||||||
|
mkdir($uploadDir, 0777, true);
|
||||||
|
}
|
||||||
$photo->move($uploadDir, $newName);
|
$photo->move($uploadDir, $newName);
|
||||||
$Picture = $newName;
|
$Picture = $newName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//echo $Picture;
|
//echo $Picture;
|
||||||
|
|
||||||
$FirstName = $this->request->getPost('FirstName');
|
$FirstName = $this->request->getPost('FirstName');
|
||||||
@ -720,23 +766,52 @@ class Employeedetails extends BaseController
|
|||||||
$License_ExpiryDate = null;
|
$License_ExpiryDate = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
//echo $DOB;
|
// echo $DOB;die;
|
||||||
$Employee = array(
|
$Employee = array(
|
||||||
'FirstName' => $FirstName, 'LastName' => $LastName, 'FatherName' => $FatherName, 'Gender' => $Gender,
|
'FirstName' => $FirstName,
|
||||||
'DateofBirth' => $DOB, 'ContactNumber' => $ContactNumber, 'EmailId' => $EmailId,
|
'LastName' => $LastName,
|
||||||
'BloodGroup' => $BloodGroup, 'MartialStatus' => $MartialStatus, 'DateofJoining' => $DOJ,
|
'FatherName' => $FatherName,
|
||||||
'PreviousYearsOfExp' => $Previousexperience, 'Designation' => $desigination,
|
'Gender' => $Gender,
|
||||||
'Departmentcode' => $departmentCode, 'PresentAddress' => $CurrentAddress,
|
'DateofBirth' => $DOB,
|
||||||
'PermanentAddress' => $permanentaddress, 'EmergencyContactName' => $emergencycontactname,
|
'ContactNumber' => $ContactNumber,
|
||||||
'EmergencyContactNumber' => $emergencycontactnumber, 'Edu_Qualification' => $eduqualifaction,
|
'EmailId' => $EmailId,
|
||||||
'Additional_Qualification' => $addqualification, 'AadharNo' => $aadharno, 'PANNo' => $panno,
|
'BloodGroup' => $BloodGroup,
|
||||||
'BankAccountNo' => $accountno, 'IFSCCode' => $ifsccode, 'BankBranchName' => $bankbranchname,
|
'MartialStatus' => $MartialStatus,
|
||||||
'BankAddress' => $bankaddress, 'PassportNo' => $passportno, 'Passport_Valid_till' => $Valid,
|
'DateofJoining' => $DOJ,
|
||||||
'IsActive' => $IsActive, 'ProfilePic' => $Picture, 'Reference_Name' => $referredby,
|
'PreviousYearsOfExp' => $Previousexperience,
|
||||||
'Reference_ContactNumber' => $referrercontno, 'Remarks' => $addinfo, 'UpdatedBY' => $UpdatedBY,
|
'Designation' => $desigination,
|
||||||
'personalEmailId' => $comEmailId, 'DriverLicense' => $driverlicense, 'LicenseValidtill' => $License_ExpiryDate,
|
'Departmentcode' => $departmentCode,
|
||||||
'VoterID' => $VoterID, 'PFNO' => $pfno, 'ESI' => $esino, 'NomineeDetails' => $Nominee,'is_management_team' => $is_management_team ,
|
'PresentAddress' => $CurrentAddress,
|
||||||
'esi_applicable'=>$esi_applicable,'pf_applicable'=>$pf_applicable,'work_location'=>$work_location
|
'PermanentAddress' => $permanentaddress,
|
||||||
|
'EmergencyContactName' => $emergencycontactname,
|
||||||
|
'EmergencyContactNumber' => $emergencycontactnumber,
|
||||||
|
'Edu_Qualification' => $eduqualifaction,
|
||||||
|
'Additional_Qualification' => $addqualification,
|
||||||
|
'AadharNo' => $aadharno,
|
||||||
|
'PANNo' => $panno,
|
||||||
|
'BankAccountNo' => $accountno,
|
||||||
|
'IFSCCode' => $ifsccode,
|
||||||
|
'BankBranchName' => $bankbranchname,
|
||||||
|
'BankAddress' => $bankaddress,
|
||||||
|
'PassportNo' => $passportno,
|
||||||
|
'Passport_Valid_till' => $Valid,
|
||||||
|
'IsActive' => $IsActive,
|
||||||
|
'ProfilePic' => $Picture,
|
||||||
|
'Reference_Name' => $referredby,
|
||||||
|
'Reference_ContactNumber' => $referrercontno,
|
||||||
|
'Remarks' => $addinfo,
|
||||||
|
'UpdatedBY' => $UpdatedBY,
|
||||||
|
'personalEmailId' => $comEmailId,
|
||||||
|
'DriverLicense' => $driverlicense,
|
||||||
|
'LicenseValidtill' => $License_ExpiryDate,
|
||||||
|
'VoterID' => $VoterID,
|
||||||
|
'PFNO' => $pfno,
|
||||||
|
'ESI' => $esino,
|
||||||
|
'NomineeDetails' => $Nominee,
|
||||||
|
'is_management_team' => $is_management_team,
|
||||||
|
'esi_applicable' => $esi_applicable,
|
||||||
|
'pf_applicable' => $pf_applicable,
|
||||||
|
'work_location' => $work_location
|
||||||
);
|
);
|
||||||
//print_r($Employee);die();
|
//print_r($Employee);die();
|
||||||
$result = $this->employeedetails_model->UpdateEmployee($Employee, $EmpId);
|
$result = $this->employeedetails_model->UpdateEmployee($Employee, $EmpId);
|
||||||
@ -744,14 +819,13 @@ class Employeedetails extends BaseController
|
|||||||
// Get the uploaded files
|
// Get the uploaded files
|
||||||
$files = $this->request->getFiles();
|
$files = $this->request->getFiles();
|
||||||
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
|
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
|
||||||
if(isset($files['emp_file']))
|
if (isset($files['emp_file'])) {
|
||||||
{
|
|
||||||
foreach ($files['emp_file'] as $index => $file) {
|
foreach ($files['emp_file'] as $index => $file) {
|
||||||
if ($file->isValid() && !$file->hasMoved()) {
|
if ($file->isValid() && !$file->hasMoved()) {
|
||||||
// Move the file to the desired directory
|
// Move the file to the desired directory
|
||||||
$newName = $file->getRandomName();
|
$newName = $file->getRandomName();
|
||||||
$file->move(ROOTPATH . 'public/uploads/images/emp_files', $newName);
|
$file->move(ROOTPATH . 'public/uploads/images/emp_files', $newName);
|
||||||
$path = ROOTPATH . 'public/uploads/images/emp_files/'.$newName;
|
$path = ROOTPATH . 'public/uploads/images/emp_files/' . $newName;
|
||||||
// Store the file information in the database
|
// Store the file information in the database
|
||||||
$this->empFiles->save([
|
$this->empFiles->save([
|
||||||
'file_name' => $fileNames[$index], // User-entered file name
|
'file_name' => $fileNames[$index], // User-entered file name
|
||||||
@ -780,19 +854,19 @@ class Employeedetails extends BaseController
|
|||||||
|
|
||||||
if ($result + $empPayUpdate > 0) {
|
if ($result + $empPayUpdate > 0) {
|
||||||
$this->session->setFlashdata('success', 'You Have Successfully updated the Employee Record!');
|
$this->session->setFlashdata('success', 'You Have Successfully updated the Employee Record!');
|
||||||
|
return json_encode(true);
|
||||||
} else {
|
} else {
|
||||||
$this->session->setFlashdata('error', 'Record Not Updated!');
|
$this->session->setFlashdata('error', 'Record Not Updated!');
|
||||||
|
return json_encode(false);
|
||||||
}
|
}
|
||||||
return redirect()->route('employeeListing');
|
// return redirect()->route('employeeListing');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function exportemployee()
|
function exportemployee()
|
||||||
{
|
{
|
||||||
|
|
||||||
$exportData = $this->employeedetails_model->export_excel();
|
$exportData = $this->employeedetails_model->export_excel();
|
||||||
|
|
||||||
$file_name = 'Employee_Details' .' '. '.xls'; //save our workbook as this file name
|
$file_name = 'Employee_Details' . ' ' . '.xls'; //save our workbook as this file name
|
||||||
$spreadsheet = new Spreadsheet();
|
$spreadsheet = new Spreadsheet();
|
||||||
$sheet = $spreadsheet->getActiveSheet();
|
$sheet = $spreadsheet->getActiveSheet();
|
||||||
$sheet->mergeCells('L3:S3');
|
$sheet->mergeCells('L3:S3');
|
||||||
@ -800,46 +874,46 @@ class Employeedetails extends BaseController
|
|||||||
$sheet->setTitle('Employee details');
|
$sheet->setTitle('Employee details');
|
||||||
|
|
||||||
$headers = [
|
$headers = [
|
||||||
'L3'=>'RESICO Employee Details',
|
'L3' => 'RESICO Employee Details',
|
||||||
'A5'=>'EmpID',
|
'A5' => 'EmpID',
|
||||||
'B5'=>'FirstName-LastName',
|
'B5' => 'FirstName-LastName',
|
||||||
'C5'=>'FatherName',
|
'C5' => 'FatherName',
|
||||||
'D5'=>'Gender',
|
'D5' => 'Gender',
|
||||||
'E5'=>'Date of Birth',
|
'E5' => 'Date of Birth',
|
||||||
'F5'=>'ContactNumber',
|
'F5' => 'ContactNumber',
|
||||||
'G5'=>'EmailId',
|
'G5' => 'EmailId',
|
||||||
'H5'=>'BloodGroup',
|
'H5' => 'BloodGroup',
|
||||||
'I5'=>'MartialStatus',
|
'I5' => 'MartialStatus',
|
||||||
'J5'=>'DateofJoining',
|
'J5' => 'DateofJoining',
|
||||||
'K5'=>'PreviousYearsOfExp',
|
'K5' => 'PreviousYearsOfExp',
|
||||||
'L5'=>'Designation',
|
'L5' => 'Designation',
|
||||||
'M5'=>'DepartmentName',
|
'M5' => 'DepartmentName',
|
||||||
'N5'=>'PresentAddress',
|
'N5' => 'PresentAddress',
|
||||||
'O5'=>'PermanentAddress',
|
'O5' => 'PermanentAddress',
|
||||||
'P5'=>'EmergencyContactName',
|
'P5' => 'EmergencyContactName',
|
||||||
'Q5'=>'EmergencyContactNumber',
|
'Q5' => 'EmergencyContactNumber',
|
||||||
'R5'=>'Edu_Qualification',
|
'R5' => 'Edu_Qualification',
|
||||||
'S5'=>'Additional_Qualification',
|
'S5' => 'Additional_Qualification',
|
||||||
'T5'=>'Reference_Name',
|
'T5' => 'Reference_Name',
|
||||||
'U5'=>'Reference_ContactNumber',
|
'U5' => 'Reference_ContactNumber',
|
||||||
'V5'=>'BankStatemant',
|
'V5' => 'BankStatemant',
|
||||||
'W5'=>'AadharNo',
|
'W5' => 'AadharNo',
|
||||||
'X5'=>'PANNo',
|
'X5' => 'PANNo',
|
||||||
'Y5'=>'PassportNo',
|
'Y5' => 'PassportNo',
|
||||||
'Z5'=>'Passport_Valid_till',
|
'Z5' => 'Passport_Valid_till',
|
||||||
'AA5'=>'Voter ID',
|
'AA5' => 'Voter ID',
|
||||||
'AB5'=>'Driving License',
|
'AB5' => 'Driving License',
|
||||||
'AC5'=>'Driving License Expiry Date',
|
'AC5' => 'Driving License Expiry Date',
|
||||||
'AD5'=>'Official Email ID',
|
'AD5' => 'Official Email ID',
|
||||||
'AE5'=>'IsActive',
|
'AE5' => 'IsActive',
|
||||||
'AF5'=>'PFNO',
|
'AF5' => 'PFNO',
|
||||||
'AG5'=>'ESI',
|
'AG5' => 'ESI',
|
||||||
'AH5'=>'Nominee Details',
|
'AH5' => 'Nominee Details',
|
||||||
// 'AI5'=>'PF_Balance',
|
// 'AI5'=>'PF_Balance',
|
||||||
// 'AJ5'=>'PF_Bal_On',
|
// 'AJ5'=>'PF_Bal_On',
|
||||||
'AI5'=>'Remarks',
|
'AI5' => 'Remarks',
|
||||||
'AJ5'=>'CreatedBy',
|
'AJ5' => 'CreatedBy',
|
||||||
'AK5'=>'UpdatedBY'
|
'AK5' => 'UpdatedBY'
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($headers as $cell => $value) {
|
foreach ($headers as $cell => $value) {
|
||||||
@ -848,49 +922,51 @@ class Employeedetails extends BaseController
|
|||||||
$sheet->getStyle($cell)->getFont()->setBold(true);
|
$sheet->getStyle($cell)->getFont()->setBold(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($exportData){
|
if ($exportData) {
|
||||||
$i = 6;$s = 1;
|
$i = 6;
|
||||||
|
$s = 1;
|
||||||
foreach ($exportData as $data) {
|
foreach ($exportData as $data) {
|
||||||
$rowData = [
|
$rowData = [
|
||||||
'A'. $i,$data['EmpID'],
|
'A' . $i,
|
||||||
'B'. $i=>$data['FirstName'].'-'.$data['LastName'],
|
$data['EmpID'],
|
||||||
'C'. $i=>$data['FatherName'],
|
'B' . $i => $data['FirstName'] . '-' . $data['LastName'],
|
||||||
'D'. $i=>$data['Gender'],
|
'C' . $i => $data['FatherName'],
|
||||||
'E'. $i=>$data['DateofBirth'],
|
'D' . $i => $data['Gender'],
|
||||||
'F'. $i=>$data['ContactNumber'],
|
'E' . $i => $data['DateofBirth'],
|
||||||
'G'. $i=>$data['EmailId'],
|
'F' . $i => $data['ContactNumber'],
|
||||||
'H'. $i=>$data['BloodGroup'],
|
'G' . $i => $data['EmailId'],
|
||||||
'I'. $i=>$data['MartialStatus'],
|
'H' . $i => $data['BloodGroup'],
|
||||||
'J'. $i=>$data['DateofJoining'],
|
'I' . $i => $data['MartialStatus'],
|
||||||
'K'. $i=>$data['PreviousYearsOfExp'],
|
'J' . $i => $data['DateofJoining'],
|
||||||
'L'. $i=>$data['Designation'],
|
'K' . $i => $data['PreviousYearsOfExp'],
|
||||||
'M'. $i=>$data['DepartmentName'],
|
'L' . $i => $data['Designation'],
|
||||||
'N'. $i=>$data['PresentAddress'],
|
'M' . $i => $data['DepartmentName'],
|
||||||
'O'. $i=>$data['PermanentAddress'],
|
'N' . $i => $data['PresentAddress'],
|
||||||
'P'. $i=>$data['EmergencyContactName'],
|
'O' . $i => $data['PermanentAddress'],
|
||||||
'Q'. $i=>$data['EmergencyContactNumber'],
|
'P' . $i => $data['EmergencyContactName'],
|
||||||
'R'. $i=>$data['Edu_Qualification'],
|
'Q' . $i => $data['EmergencyContactNumber'],
|
||||||
'S'. $i=>$data['Additional_Qualification'],
|
'R' . $i => $data['Edu_Qualification'],
|
||||||
'T'. $i=>$data['Reference_Name'],
|
'S' . $i => $data['Additional_Qualification'],
|
||||||
'U'. $i=>$data['Reference_ContactNumber'],
|
'T' . $i => $data['Reference_Name'],
|
||||||
'V'. $i=>$data['BankAccountNo'].'-'.$data['IFSCCode'].'-'.$data['BankBranchName'].$data['BankAddress'],
|
'U' . $i => $data['Reference_ContactNumber'],
|
||||||
'W'. $i=>$data['AadharNo'],
|
'V' . $i => $data['BankAccountNo'] . '-' . $data['IFSCCode'] . '-' . $data['BankBranchName'] . $data['BankAddress'],
|
||||||
'X'. $i=>$data['PANNo'],
|
'W' . $i => $data['AadharNo'],
|
||||||
'Y'. $i=>$data['PassportNo'],
|
'X' . $i => $data['PANNo'],
|
||||||
'Z'. $i=>$data['Passport_Valid_till'],
|
'Y' . $i => $data['PassportNo'],
|
||||||
'AA'. $i=>$data['VoterID'],
|
'Z' . $i => $data['Passport_Valid_till'],
|
||||||
'AB'. $i=>$data['DriverLicense'],
|
'AA' . $i => $data['VoterID'],
|
||||||
'AC'. $i=>$data['LicenseValidtill'],
|
'AB' . $i => $data['DriverLicense'],
|
||||||
'AD'. $i=>$data['personalEmailId'],
|
'AC' . $i => $data['LicenseValidtill'],
|
||||||
'AE'. $i=>$data['IsActive'],
|
'AD' . $i => $data['personalEmailId'],
|
||||||
'AF'. $i=>$data['PFNO'],
|
'AE' . $i => $data['IsActive'],
|
||||||
'AG'. $i=>$data['ESI'],
|
'AF' . $i => $data['PFNO'],
|
||||||
'AH'. $i=>$data['NomineeDetails'],
|
'AG' . $i => $data['ESI'],
|
||||||
|
'AH' . $i => $data['NomineeDetails'],
|
||||||
// 'AI'. $i=>$data['PF_Balance'],
|
// 'AI'. $i=>$data['PF_Balance'],
|
||||||
// 'AJ'. $i=>$data['PF_Bal_On'],
|
// 'AJ'. $i=>$data['PF_Bal_On'],
|
||||||
'AI'. $i=>$data['Remarks'],
|
'AI' . $i => $data['Remarks'],
|
||||||
'AJ'. $i=>$data['CreatedByName'],
|
'AJ' . $i => $data['CreatedByName'],
|
||||||
'AK'. $i=>$data['UpdatedByName'],
|
'AK' . $i => $data['UpdatedByName'],
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($rowData as $cell => $value) {
|
foreach ($rowData as $cell => $value) {
|
||||||
@ -900,7 +976,6 @@ class Employeedetails extends BaseController
|
|||||||
$i++;
|
$i++;
|
||||||
$s++;
|
$s++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// $writer = new Xlsx($spreadsheet);
|
// $writer = new Xlsx($spreadsheet);
|
||||||
// $writer->save($file_name);
|
// $writer->save($file_name);
|
||||||
@ -920,7 +995,7 @@ class Employeedetails extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
||||||
header('Content-Disposition: attachment;filename="'. $file_name .'"');
|
header('Content-Disposition: attachment;filename="' . $file_name . '"');
|
||||||
header('Cache-Control: max-age=0');
|
header('Cache-Control: max-age=0');
|
||||||
header('Expires: 0');
|
header('Expires: 0');
|
||||||
header('Pragma: public');
|
header('Pragma: public');
|
||||||
@ -928,6 +1003,4 @@ class Employeedetails extends BaseController
|
|||||||
$writer->save('php://output');
|
$writer->save('php://output');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@ -78,12 +78,6 @@ class Emppaydate extends BaseController
|
|||||||
|
|
||||||
function addNewemppay()
|
function addNewemppay()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$EmpID = $this->request->getPost('EmpID');
|
$EmpID = $this->request->getPost('EmpID');
|
||||||
$Loan_Amount = $this->request->getPost('Loan_Amount');
|
$Loan_Amount = $this->request->getPost('Loan_Amount');
|
||||||
$Load_Issued_date = $this->request->getPost('loan_issued_date');
|
$Load_Issued_date = $this->request->getPost('loan_issued_date');
|
||||||
@ -97,12 +91,8 @@ class Emppaydate extends BaseController
|
|||||||
$Paid_Amount = $this->request->getPost('Paid_Amount');
|
$Paid_Amount = $this->request->getPost('Paid_Amount');
|
||||||
$CreateBy = $this->session->get('userId');
|
$CreateBy = $this->session->get('userId');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$loandetails = array('EmpID' => $EmpID, 'Loan_Amount' => $Loan_Amount, 'Loan_Issued_Date' => $Load_Issued_date, 'Monthly_Due' => $Due_Amount, 'Due_Start_Date' => $Due_Started, 'No_of_Dues' => $No_Of_Dues, 'Paid_Due' => $Paid_due, 'Remaining_Due' => $Remaining_Due, 'Paid_Amount' => $Paid_Amount, 'is_Active' => 1, 'Created_By' => $CreateBy);
|
$loandetails = array('EmpID' => $EmpID, 'Loan_Amount' => $Loan_Amount, 'Loan_Issued_Date' => $Load_Issued_date, 'Monthly_Due' => $Due_Amount, 'Due_Start_Date' => $Due_Started, 'No_of_Dues' => $No_Of_Dues, 'Paid_Due' => $Paid_due, 'Remaining_Due' => $Remaining_Due, 'Paid_Amount' => $Paid_Amount, 'is_Active' => 1, 'Created_By' => $CreateBy);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($Loan_Amount != 0) {
|
if ($Loan_Amount != 0) {
|
||||||
$result2 = $this->emppaydate_model->addLoanInfo($loandetails, 'add');
|
$result2 = $this->emppaydate_model->addLoanInfo($loandetails, 'add');
|
||||||
if ($result2 > 0) {
|
if ($result2 > 0) {
|
||||||
@ -112,7 +102,7 @@ class Emppaydate extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return redirect()->to('/emppayListings');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -123,6 +113,7 @@ class Emppaydate extends BaseController
|
|||||||
|
|
||||||
$data['emppay'] = $this->emppaydate_model->getUserInfo($paydataid);
|
$data['emppay'] = $this->emppaydate_model->getUserInfo($paydataid);
|
||||||
|
|
||||||
|
// print_r($data);die;
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Edit Employee Pay Monthly Details ';
|
$this->global['pageTitle'] = 'Edit Employee Pay Monthly Details ';
|
||||||
|
|
||||||
@ -152,15 +143,8 @@ class Emppaydate extends BaseController
|
|||||||
$Paid_Amount = $this->request->getPost('Paid_Amount');
|
$Paid_Amount = $this->request->getPost('Paid_Amount');
|
||||||
$Last_Mod_By = $this->session->get('userId');
|
$Last_Mod_By = $this->session->get('userId');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$loandetails = array('Loan_ID' => $loan_ID, 'EmpID' => $EmpID, 'Loan_Amount' => $Loan_Amount, 'Loan_Issued_Date' => $Load_Issued_date, 'Monthly_Due' => $Due_Amount, 'Due_Start_Date' => $Due_Started, 'No_of_Dues' => $No_Of_Dues, 'Paid_Due' => $Paid_due, 'Remaining_Due' => $Remaining_Due, 'Paid_Amount' => $Paid_Amount, 'is_Active' => 1, 'Last_Mod_By' => $Last_Mod_By);
|
$loandetails = array('Loan_ID' => $loan_ID, 'EmpID' => $EmpID, 'Loan_Amount' => $Loan_Amount, 'Loan_Issued_Date' => $Load_Issued_date, 'Monthly_Due' => $Due_Amount, 'Due_Start_Date' => $Due_Started, 'No_of_Dues' => $No_Of_Dues, 'Paid_Due' => $Paid_due, 'Remaining_Due' => $Remaining_Due, 'Paid_Amount' => $Paid_Amount, 'is_Active' => 1, 'Last_Mod_By' => $Last_Mod_By);
|
||||||
|
|
||||||
|
|
||||||
if ($Loan_Amount != 0 and $loan_ID != '') {
|
if ($Loan_Amount != 0 and $loan_ID != '') {
|
||||||
$result2 = $this->emppaydate_model->addLoanInfo($loandetails, 'update');
|
$result2 = $this->emppaydate_model->addLoanInfo($loandetails, 'update');
|
||||||
if ($result2 > 0) {
|
if ($result2 > 0) {
|
||||||
@ -177,19 +161,16 @@ class Emppaydate extends BaseController
|
|||||||
echo "<script>alert('Something Went Wrong..! Loan Information Not Saved. Try later..!');</script>";
|
echo "<script>alert('Something Went Wrong..! Loan Information Not Saved. Try later..!');</script>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return redirect()->to('/emppayListings');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function deleteEmpPay()
|
function deleteEmpPay()
|
||||||
{
|
{
|
||||||
$EmpID = $this->request->getPost('id');
|
$LoanID = $this->request->getPost('id');
|
||||||
//echo $EmpID;
|
//echo $EmpID;
|
||||||
$result = $this->emppaydate_model->deleteEmployeePay($EmpID);
|
$result = $this->emppaydate_model->deleteEmployeePay($LoanID);
|
||||||
if ($result == 1) {
|
if ($result == 1) {
|
||||||
echo "Deleted Sucessfully..!";
|
echo "Deleted Sucessfully..!";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -37,7 +37,9 @@ class Login extends BaseController
|
|||||||
return view('login');
|
return view('login');
|
||||||
} else {
|
} else {
|
||||||
// redirect('/dashboard');
|
// redirect('/dashboard');
|
||||||
return redirect()->to('/dashboard');
|
// return redirect()->to('/dashboard');
|
||||||
|
return redirect()->to('/sales_dashboard');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -53,7 +55,9 @@ class Login extends BaseController
|
|||||||
return view('login');
|
return view('login');
|
||||||
} else {
|
} else {
|
||||||
// return view('login');
|
// return view('login');
|
||||||
return redirect()->to('/dashboard');
|
// return redirect()->to('/dashboard');
|
||||||
|
return redirect()->to('/sales_dashboard');
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,9 +111,11 @@ class Login extends BaseController
|
|||||||
$DEPCode = $res->DEPCode;
|
$DEPCode = $res->DEPCode;
|
||||||
|
|
||||||
if ($DEPCode == SECURITY) {
|
if ($DEPCode == SECURITY) {
|
||||||
return redirect()->to(site_url('/dashboard'));
|
// return redirect()->to(site_url('/dashboard'));
|
||||||
|
return redirect()->to(site_url('/sales_dashboard'));
|
||||||
} else {
|
} else {
|
||||||
return redirect()->to(site_url('/dashboard'));
|
return redirect()->to(site_url('/sales_dashboard'));
|
||||||
|
// return redirect()->to(site_url('/dashboard'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -61,12 +61,84 @@ class Payslip extends BaseController
|
|||||||
public function callsp()
|
public function callsp()
|
||||||
{
|
{
|
||||||
|
|
||||||
$payon = $this->request->getPost('payon');
|
// $result = $this->payroll_model->model_sp($this->request->getPost('payon'), $this->request->getPost('employee'));
|
||||||
$employee = $this->request->getPost('employee');
|
// return $result;
|
||||||
$result = $this->payroll_model->model_sp($payon, $employee);
|
// die;
|
||||||
// $result = $this->db->last_query();
|
|
||||||
return $result;
|
$PayOn = $this->request->getPost('payon');
|
||||||
//$this->db->call_function('model_sp');
|
$EmpId = $this->request->getPost('employee');
|
||||||
|
|
||||||
|
$res = $this->payroll_model->getMonthlyPayDetails($EmpId, $PayOn);
|
||||||
|
$result = $res[0];
|
||||||
|
$loan = [];
|
||||||
|
$loanHistory = [];
|
||||||
|
$loan_id = 0;
|
||||||
|
if(is_null($result->Loan_ID)){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
if($result->Loan_Recovered > 0)
|
||||||
|
{
|
||||||
|
$loan_id = $result->Loan_ID;
|
||||||
|
|
||||||
|
$loan = [
|
||||||
|
'Paid_Due' => $result->Paid_Due + 1,
|
||||||
|
'Remaining_Due' => $result->Remaining_Due - 1,
|
||||||
|
'Paid_Amount' => $result->Paid_Amount + $result->Loan_Recovered,
|
||||||
|
];
|
||||||
|
|
||||||
|
$loanHistory = [
|
||||||
|
'Loan_ID' => $loan_id,
|
||||||
|
'Due_Amount' => $result->Loan_Recovered,
|
||||||
|
'Balance_Amount' => $result->Loan_Amount - ($result->Paid_Amount + $result->Loan_Recovered),
|
||||||
|
'Due_Date' => $PayOn,
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// print_r($data);die;
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'PayOn' => $result->Month_Year,
|
||||||
|
'EmpID' => $result->EmpID,
|
||||||
|
'TotalCalDays' => $result->TotalCalDays,
|
||||||
|
'NoofDaysWorked' => $result->Days_worked,
|
||||||
|
'LOP' => $result->LOP_Days,
|
||||||
|
'Paid_Leave' => $result->Paid_leave,
|
||||||
|
'ActualSalary' => $result->ActualSalary,
|
||||||
|
'PerDaySalary' => $result->PerDaySalary,
|
||||||
|
'WorkedSalary' => $result->WorkedSalary,
|
||||||
|
'Basic' => $result->Basic,
|
||||||
|
'HRA' => $result->HRA,
|
||||||
|
'OT_Hrs_Worked' => $result->OT_Hrs_Worked,
|
||||||
|
'OTSalary' => $result->OTSalary,
|
||||||
|
'ESI' => $result->ESI,
|
||||||
|
'PF' => $result->PF,
|
||||||
|
'OtherDeductions' => $result->Other_Deductions,
|
||||||
|
'Festival_Bonus' => $result->Festival_Bonus,
|
||||||
|
'TotalSalary' => $result->Estimate,
|
||||||
|
'Advance' => $result->Loan_Recovered,
|
||||||
|
'BalanceAdvance' => 0,
|
||||||
|
'LessAdvance' => 0,
|
||||||
|
'BankAccountNumber' => $result->BankAccountNo,
|
||||||
|
'PFNumber' => $result->PFNO,
|
||||||
|
'ESINumber' => $result->ESINO,
|
||||||
|
'UANNO' => $result->PFNO,
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
$insert = $this->payroll_model->insertPayroll($data);
|
||||||
|
if($insert){
|
||||||
|
if(count($loan)){
|
||||||
|
$this->payroll_model->updateLoan($loan_id,$result->EmpID,$loan);
|
||||||
|
}
|
||||||
|
if(count($loanHistory)){
|
||||||
|
$this->payroll_model->insertLoanHistory($loanHistory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $insert;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -615,9 +687,9 @@ class Payslip extends BaseController
|
|||||||
// die;
|
// die;
|
||||||
|
|
||||||
$employeeSalary[] = round($salaryInCurrentday);
|
$employeeSalary[] = round($salaryInCurrentday);
|
||||||
$esi[] = number_format($esiAmount,2);
|
$esi[] = number_format($esiAmount,2, '.', '');
|
||||||
$pf[] = number_format($pfAmount,2);
|
$pf[] = number_format($pfAmount,2, '.', '');
|
||||||
$ot[] = number_format($totSalayOT,2);
|
$ot[] = number_format($totSalayOT,2, '.', '');
|
||||||
}
|
}
|
||||||
$data['empSalary'] = $employeeSalary;
|
$data['empSalary'] = $employeeSalary;
|
||||||
$data['esi'] = $esi;
|
$data['esi'] = $esi;
|
||||||
@ -638,7 +710,7 @@ class Payslip extends BaseController
|
|||||||
$data['month'] = $this->monthlypay_model->monthlyListing($current);
|
$data['month'] = $this->monthlypay_model->monthlyListing($current);
|
||||||
$data['dropdownvalue'] = $current;
|
$data['dropdownvalue'] = $current;
|
||||||
$data['fresh'] = $this->monthlypay_model->getEmpPayDetailsforMonthInputs($current);
|
$data['fresh'] = $this->monthlypay_model->getEmpPayDetailsforMonthInputs($current);
|
||||||
//dd($data['fresh']);
|
// dd($data['fresh']);
|
||||||
|
|
||||||
|
|
||||||
$employeeSalary = [];
|
$employeeSalary = [];
|
||||||
@ -750,9 +822,9 @@ class Payslip extends BaseController
|
|||||||
// die;
|
// die;
|
||||||
|
|
||||||
$employeeSalary[] = round($salaryInCurrentday);
|
$employeeSalary[] = round($salaryInCurrentday);
|
||||||
$esi[] = number_format($esiAmount,2);
|
$esi[] = number_format($esiAmount,2, '.', '');
|
||||||
$pf[] = number_format($pfAmount,2);
|
$pf[] = number_format($pfAmount,2, '.', '');
|
||||||
$ot[] = number_format($totSalayOT,2);
|
$ot[] = number_format($totSalayOT,2, '.', '');
|
||||||
}
|
}
|
||||||
$data['empSalary'] = $employeeSalary;
|
$data['empSalary'] = $employeeSalary;
|
||||||
$data['esi'] = $esi;
|
$data['esi'] = $esi;
|
||||||
@ -863,11 +935,7 @@ class Payslip extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// $Incentives_first = explode(".", $Incentives);
|
|
||||||
// if (!is_numeric($Incentives) || (strlen((string)$Incentives)) > 8 || (strlen((string)$Incentives_first[0])) > 5) {
|
|
||||||
// //echo $EmpID . "-Loan Recoverd Invalid Data!";
|
|
||||||
// $ErrorFlag++;
|
|
||||||
// }
|
|
||||||
|
|
||||||
$Festivalbonus_first = explode(".", $Festival_Bonus);
|
$Festivalbonus_first = explode(".", $Festival_Bonus);
|
||||||
if (!is_numeric($Festival_Bonus) || (strlen((string)$Festival_Bonus)) > 8 || (strlen((string)$Festivalbonus_first[0])) > 5) {
|
if (!is_numeric($Festival_Bonus) || (strlen((string)$Festival_Bonus)) > 8 || (strlen((string)$Festivalbonus_first[0])) > 5) {
|
||||||
@ -905,26 +973,53 @@ class Payslip extends BaseController
|
|||||||
|
|
||||||
$EmpID = $j['Emp ID'];
|
$EmpID = $j['Emp ID'];
|
||||||
$DaysWorked = $j['Days Worked'];
|
$DaysWorked = $j['Days Worked'];
|
||||||
|
$TotalCalDays = isset($j['Total Days']) ? $j['Total Days'] : 0.00 ;
|
||||||
|
$ActualSalary = isset($j['Basic Salary']) ? $j['Basic Salary'] : 0.00 ;
|
||||||
|
$WorkedSalary = isset($j['Worked Salary']) ? $j['Worked Salary'] : 0.00 ;
|
||||||
|
$PerDaySalary = isset($j['Pre Day Salary']) ? $j['Pre Day Salary'] : 0.00 ;
|
||||||
|
$Basic = isset($j['Basic Salary(0.7)']) ? $j['Basic Salary(0.7)'] : 0.00 ;
|
||||||
|
$HRA = isset($j['HRA Salary(0.3)']) ? $j['HRA Salary(0.3)'] : 0.00 ;
|
||||||
|
$OTSalary = isset($j['Over Time']) ? $j['Over Time'] : 0.00 ;
|
||||||
|
$ESI = isset($j['ESI']) ? $j['ESI'] : 0.00 ;
|
||||||
|
$PF = isset($j['PF']) ? $j['PF'] : 0.00 ;
|
||||||
$LOP_Days = isset($j['LOP Days']) ? $j['LOP Days'] : 0.00;
|
$LOP_Days = isset($j['LOP Days']) ? $j['LOP Days'] : 0.00;
|
||||||
$Paid_leave = isset($j['Paid Leave']) ? $j['Paid Leave'] : 0.00;
|
$Paid_leave = isset($j['Paid Leave']) ? $j['Paid Leave'] : 0.00;
|
||||||
$OT_Hrs_Worked = isset($j['OT Hrs']) ? $j['OT Hrs'] : 0.00;
|
$OT_Hrs_Worked = isset($j['OT Hrs']) ? $j['OT Hrs'] : 0.00;
|
||||||
$Loan_Recovered = isset($j['Auto Loan Due ₹']) ? $j['Auto Loan Due ₹'] : 0.00;
|
$Loan_Recovered = isset($j['Auto Loan Due ₹']) ? $j['Auto Loan Due ₹'] : 0.00;
|
||||||
// if (is_string($Loan_Recovered)) {
|
|
||||||
// $Loan_Recovered = strtoupper($Loan_Recovered);
|
|
||||||
// }
|
|
||||||
// $Incentives = isset($j['Incentives in ₹']) ? $j['Incentives in ₹'] : 0.00 ;
|
|
||||||
$Festival_Bonus = isset($j['Festival Bonus in ₹']) ? $j['Festival Bonus in ₹'] : 0.00;
|
$Festival_Bonus = isset($j['Festival Bonus in ₹']) ? $j['Festival Bonus in ₹'] : 0.00;
|
||||||
$tds_Deductions = isset($j['TDS Deductions in ₹']) ? $j['TDS Deductions in ₹'] : 0.00;
|
$tds_Deductions = isset($j['TDS Deductions in ₹']) ? $j['TDS Deductions in ₹'] : 0.00;
|
||||||
$Estimate = isset($j['Estimate in ₹']) ? $j['Estimate in ₹'] : 0.00;
|
$Estimate = isset($j['Estimate in ₹']) ? $j['Estimate in ₹'] : 0.00;
|
||||||
$Created_By = $this->session->get('userId');
|
$Created_By = $this->session->get('userId');
|
||||||
|
|
||||||
$monthlypaydata = array('Month_Year' => $month, 'EmpID' => $EmpID, 'Days_worked' => $DaysWorked, 'LOP_Days' => $LOP_Days, 'Paid_leave' => $Paid_leave, 'OT_Hrs_Worked' => $OT_Hrs_Worked, 'Festival_Bonus' => $Festival_Bonus, 'Other_Deductions' => $tds_Deductions, 'Estimate' => $Estimate, 'Created_By' => $Created_By ,'Loan_Recovered'=>$Loan_Recovered);
|
$monthlypaydata = array(
|
||||||
|
'Month_Year' => $month,
|
||||||
|
'EmpID' => $EmpID,
|
||||||
|
'Days_worked' => $DaysWorked,
|
||||||
|
'LOP_Days' => $LOP_Days,
|
||||||
|
'Paid_leave' => $Paid_leave,
|
||||||
|
'OT_Hrs_Worked' => $OT_Hrs_Worked,
|
||||||
|
'Festival_Bonus' => $Festival_Bonus,
|
||||||
|
'Other_Deductions' => $tds_Deductions,
|
||||||
|
'Estimate' => $Estimate,
|
||||||
|
'Created_By' => $Created_By,
|
||||||
|
'Loan_Recovered' => $Loan_Recovered,
|
||||||
|
'TotalCalDays' => $TotalCalDays,
|
||||||
|
'ActualSalary' => $ActualSalary,
|
||||||
|
'WorkedSalary' => $WorkedSalary,
|
||||||
|
'PerDaySalary' => $PerDaySalary,
|
||||||
|
'Basic' => $Basic,
|
||||||
|
'HRA' => $HRA,
|
||||||
|
'OTSalary' => $OTSalary,
|
||||||
|
'ESI' => $ESI,
|
||||||
|
'PF' => $PF,
|
||||||
|
);
|
||||||
// print_r($monthlypaydata); die;
|
// print_r($monthlypaydata); die;
|
||||||
$result = $this->monthlypay_model->saveMonthlyData_model($monthlypaydata);
|
$result = $this->monthlypay_model->saveMonthlyData_model($monthlypaydata);
|
||||||
$total = $total + $result;
|
$total = $total + $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$total = $total - 1;
|
|
||||||
//echo "<script> alert($ErrorEmpId + '- are have Invalid Data!'); </script>";
|
//echo "<script> alert($ErrorEmpId + '- are have Invalid Data!'); </script>";
|
||||||
if (!empty($ErrorEmpId)) {
|
if (!empty($ErrorEmpId)) {
|
||||||
echo $ErrorEmpId . "- are have Invalid Data!";
|
echo $ErrorEmpId . "- are have Invalid Data!";
|
||||||
@ -1018,63 +1113,55 @@ class Payslip extends BaseController
|
|||||||
public function PrintPdf()
|
public function PrintPdf()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
// $EmpID = 'RIPL056';
|
||||||
|
// $Payon = '08-2024';
|
||||||
|
// $m = date("M", mktime(0, 0, 0, (int)$Payon, 10));
|
||||||
|
// $y = substr((string)$Payon, 3);
|
||||||
|
// //echo "EmpID" . $EmpID;
|
||||||
|
// $Data['PayDetails'] = $this->payroll_model->GetPayslipdata($Payon, $EmpID);
|
||||||
|
|
||||||
|
// $fname = $Data['PayDetails'][0]->FName;
|
||||||
|
// $filename = 'PayslipFor-' . $EmpID . ' ' . $fname . ' ' . $m . ' ' . $y;
|
||||||
|
|
||||||
|
// $totalsalary = $Data['PayDetails'][0]->TotalSalary;
|
||||||
|
// $totalsalaryinwords = $this->convertNumber(round($totalsalary));
|
||||||
|
// $Data['amtinwords'] = $totalsalaryinwords;
|
||||||
|
// // dd ($Data);
|
||||||
|
// echo view("payslipgenerateprint", $Data);
|
||||||
|
// die;
|
||||||
|
|
||||||
$filename = " ";
|
$filename = " ";
|
||||||
$html = "";
|
$html = "";
|
||||||
$All = $this->request->getPost('All');
|
$All = $this->request->getPost('All');
|
||||||
// if ($All == '') {
|
|
||||||
// $this->validator->setRules([
|
|
||||||
// 'Employee' => [
|
|
||||||
// 'label' => 'Employee',
|
|
||||||
// 'rules' => 'trim|callback_Employee_validate',
|
|
||||||
// ]
|
|
||||||
// ]);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// $this->validator->setRules([
|
|
||||||
// 'PayOn' => [
|
|
||||||
// 'label' => 'PayOn',
|
|
||||||
// 'rules' => 'trim|callback_PayOn_validate',
|
|
||||||
// ]
|
|
||||||
// ]);
|
|
||||||
|
|
||||||
// if ($this->validator->run() == FALSE) {
|
|
||||||
// $this->viewGenerator();
|
|
||||||
// } else {
|
|
||||||
$Payon = $this->request->getPost('PayOn');
|
$Payon = $this->request->getPost('PayOn');
|
||||||
|
|
||||||
$m = date("M", mktime(0, 0, 0, (int)$Payon, 10));
|
$m = date("M", mktime(0, 0, 0, (int)$Payon, 10));
|
||||||
//$y =date("Y",mktime(0, 0, 0, $Payon, 10));
|
|
||||||
//$m=date("M-Y",mktime(0,0,0,$month,1,$year));
|
|
||||||
$y = substr((string)$Payon, 3);
|
$y = substr((string)$Payon, 3);
|
||||||
//echo "Payon" . $Payon;
|
|
||||||
|
|
||||||
if ($All != '') {
|
if ($All != '') {
|
||||||
$filename = 'PayslipFor-' . $m . '-' . $y;
|
$filename = 'PayslipFor-' . $m . '-' . $y;
|
||||||
$result = $this->payroll_model->getEmpAll($Payon);
|
$result = $this->payroll_model->getEmpAll($Payon);
|
||||||
// print_r($result);
|
|
||||||
// die();
|
|
||||||
|
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
for ($i = 0; $i < count($result); $i++) {
|
for ($i = 0; $i < count($result); $i++) {
|
||||||
|
|
||||||
$EmpID = $result[$i]['EmpId'];
|
$EmpID = $result[$i]['EmpId'];
|
||||||
//print_r(
|
|
||||||
//$EmpID );
|
|
||||||
// die();
|
|
||||||
$Data['PayDetails'] = $this->payroll_model->GetPayslipdata($Payon, $EmpID);
|
$Data['PayDetails'] = $this->payroll_model->GetPayslipdata($Payon, $EmpID);
|
||||||
//
|
|
||||||
|
|
||||||
$totalsalary = $Data['PayDetails'][0]->LessAdvance;
|
$totalsalary = $Data['PayDetails'][0]->LessAdvance;
|
||||||
$totalsalaryinwords = $this->convertNumber(round($totalsalary));
|
$totalsalaryinwords = $this->convertNumber(round($totalsalary));
|
||||||
$Data['amtinwords'] = $totalsalaryinwords;
|
$Data['amtinwords'] = $totalsalaryinwords;
|
||||||
// print_r ($Data);
|
|
||||||
// exit();
|
|
||||||
//$Data['Count'] = $i;
|
|
||||||
|
|
||||||
$html .= view("payslipgenerateprint", $Data);
|
$html .= view("payslipgenerateprint", $Data);
|
||||||
|
|
||||||
// print_r ($Data);
|
|
||||||
// exit();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1088,45 +1175,12 @@ class Payslip extends BaseController
|
|||||||
$totalsalary = $Data['PayDetails'][0]->LessAdvance;
|
$totalsalary = $Data['PayDetails'][0]->LessAdvance;
|
||||||
$totalsalaryinwords = $this->convertNumber(round($totalsalary));
|
$totalsalaryinwords = $this->convertNumber(round($totalsalary));
|
||||||
$Data['amtinwords'] = $totalsalaryinwords;
|
$Data['amtinwords'] = $totalsalaryinwords;
|
||||||
//print_r ($Data);
|
// print_r ($Data);
|
||||||
//exit();
|
// exit();
|
||||||
$html = view("payslipgenerateprint", $Data);
|
$html = view("payslipgenerateprint", $Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// $php = $this->output->get_output();
|
|
||||||
|
|
||||||
// // Load library
|
|
||||||
// $this->load->library('dompdf_gen');
|
|
||||||
|
|
||||||
// if($All != '')
|
|
||||||
// {
|
|
||||||
// $filename = 'Payslip-'.$Payon.'.pdf' ;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// $filename = 'Payslip-'.$EmpID . '-' .$Payon.'.pdf' ;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// require_once(APPPATH .'third_party/dompdf/dompdf_config.inc.php');
|
|
||||||
// $dompdf = new DOMPDF();
|
|
||||||
// $dompdf->set_paper('A4', 'portrait');
|
|
||||||
// $dompdf->load_html($php);
|
|
||||||
|
|
||||||
// $dompdf->render();
|
|
||||||
|
|
||||||
// // add the header
|
|
||||||
// $canvas = $dompdf->get_canvas();
|
|
||||||
// $font = Font_Metrics::get_font("helvetica", "bold");
|
|
||||||
|
|
||||||
// // the same call as in my previous example
|
|
||||||
// $canvas->page_text(72, 18, "Page: {PAGE_NUM} of {PAGE_COUNT}",
|
|
||||||
// $font, 6, array(0,0,0));
|
|
||||||
|
|
||||||
// $dompdf->stream($filename);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// $mpdf = new mPDF('utf-8', 'A4-P', 10, 10, 10, 10, 10, 24, 4, 6);
|
|
||||||
$mpdf = new Mpdf([
|
$mpdf = new Mpdf([
|
||||||
'mode' => 'utf-8',
|
'mode' => 'utf-8',
|
||||||
'format' => 'A4-P',
|
'format' => 'A4-P',
|
||||||
@ -1147,7 +1201,7 @@ class Payslip extends BaseController
|
|||||||
$mpdf->SetTitle('Resico:Payslip');
|
$mpdf->SetTitle('Resico:Payslip');
|
||||||
|
|
||||||
$mpdf->Output("Payslip-" . $filename . ".pdf", 'D');
|
$mpdf->Output("Payslip-" . $filename . ".pdf", 'D');
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function updatePayslip()
|
function updatePayslip()
|
||||||
|
|||||||
@ -5,18 +5,21 @@ namespace App\Controllers;
|
|||||||
use App\Controllers\BaseController;
|
use App\Controllers\BaseController;
|
||||||
|
|
||||||
use App\Models\Ipinvoice_model;
|
use App\Models\Ipinvoice_model;
|
||||||
|
use App\Models\Ipattachment_model;
|
||||||
require_once 'vendor/autoload.php';
|
require_once 'vendor/autoload.php';
|
||||||
|
|
||||||
|
|
||||||
class Sales extends BaseController
|
class Sales extends BaseController
|
||||||
{
|
{
|
||||||
protected $ipinvoice_model;
|
protected $ipinvoice_model;
|
||||||
|
protected $ipattachment_model;
|
||||||
protected $session;
|
protected $session;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->ipinvoice_model = new Ipinvoice_model();
|
$this->ipinvoice_model = new Ipinvoice_model();
|
||||||
|
$this->ipattachment_model = new Ipattachment_model();
|
||||||
$this->session = session();
|
$this->session = session();
|
||||||
$this->isLoggedIn();
|
$this->isLoggedIn();
|
||||||
}
|
}
|
||||||
@ -91,8 +94,7 @@ class Sales extends BaseController
|
|||||||
|
|
||||||
// Invoice Attachments
|
// Invoice Attachments
|
||||||
function getInvoiceAttachments(){
|
function getInvoiceAttachments(){
|
||||||
$data['invoiceAttachment'] = $this->ipinvoice_model->getinvoiceAttachment($this->request->getGet('invoice_id'));
|
$data['invoiceAttachment'] = $this->ipinvoice_model->getinvoiceAttachment($this->request->getGet('invoice_number'));
|
||||||
|
|
||||||
return json_encode($data);
|
return json_encode($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,12 +7,14 @@ use App\Controllers\BaseController;
|
|||||||
use CodeIgniter\Validation\Exceptions\ValidationException;
|
use CodeIgniter\Validation\Exceptions\ValidationException;
|
||||||
|
|
||||||
use App\Models\Costcenter_model;
|
use App\Models\Costcenter_model;
|
||||||
|
use App\Models\Department_model;
|
||||||
use App\Models\Dashboard_model;
|
use App\Models\Dashboard_model;
|
||||||
use App\Models\Employeedetails_model;
|
use App\Models\Employeedetails_model;
|
||||||
use App\Models\User_model;
|
use App\Models\User_model;
|
||||||
use App\Models\Ipinvoice_model;
|
use App\Models\Ipinvoice_model;
|
||||||
use App\Models\Ipattachment_model;
|
use App\Models\Ipattachment_model;
|
||||||
use App\Models\Zohobooks_api_model;
|
use App\Models\Zohobooks_api_model;
|
||||||
|
|
||||||
require_once 'vendor/autoload.php';
|
require_once 'vendor/autoload.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,6 +28,7 @@ require_once 'vendor/autoload.php';
|
|||||||
class User extends BaseController
|
class User extends BaseController
|
||||||
{
|
{
|
||||||
protected $costcenter_model;
|
protected $costcenter_model;
|
||||||
|
protected $department_model;
|
||||||
protected $dahsboard_Model;
|
protected $dahsboard_Model;
|
||||||
protected $employeedetails_model;
|
protected $employeedetails_model;
|
||||||
protected $user_model;
|
protected $user_model;
|
||||||
@ -42,6 +45,7 @@ class User extends BaseController
|
|||||||
|
|
||||||
$this->dahsboard_Model = new Dashboard_model();
|
$this->dahsboard_Model = new Dashboard_model();
|
||||||
$this->costcenter_model = new Costcenter_model();
|
$this->costcenter_model = new Costcenter_model();
|
||||||
|
$this->department_model = new Department_model();
|
||||||
$this->employeedetails_model = new employeedetails_model();
|
$this->employeedetails_model = new employeedetails_model();
|
||||||
$this->user_model = new User_model();
|
$this->user_model = new User_model();
|
||||||
$this->ipinvoice_model = new Ipinvoice_model();
|
$this->ipinvoice_model = new Ipinvoice_model();
|
||||||
@ -104,7 +108,7 @@ class User extends BaseController
|
|||||||
|
|
||||||
$data['capitalbud'] = $this->dahsboard_Model->capitalbud();
|
$data['capitalbud'] = $this->dahsboard_Model->capitalbud();
|
||||||
|
|
||||||
$data['typebal'] = [];// $this->dahsboard_Model->typebal();
|
$data['typebal'] = []; // $this->dahsboard_Model->typebal();
|
||||||
|
|
||||||
|
|
||||||
/* HR DASHBOARD Controller Start*/
|
/* HR DASHBOARD Controller Start*/
|
||||||
@ -250,8 +254,7 @@ class User extends BaseController
|
|||||||
$working = array();
|
$working = array();
|
||||||
$overtime = array();
|
$overtime = array();
|
||||||
//$holid = array();
|
//$holid = array();
|
||||||
for ($i = 1; $i <= $dat; $i++)
|
for ($i = 1; $i <= $dat; $i++) {
|
||||||
{
|
|
||||||
$Working[] = 'WH' . $i;
|
$Working[] = 'WH' . $i;
|
||||||
$overtime[] = 'OT' . $i;
|
$overtime[] = 'OT' . $i;
|
||||||
|
|
||||||
@ -377,11 +380,11 @@ class User extends BaseController
|
|||||||
|
|
||||||
$date = $this->request->getPost("id");
|
$date = $this->request->getPost("id");
|
||||||
|
|
||||||
$daydate = format_date($date,0,'Y-m');
|
$daydate = format_date($date, 0, 'Y-m');
|
||||||
|
|
||||||
$daydate = $daydate . '-01';
|
$daydate = $daydate . '-01';
|
||||||
|
|
||||||
$WH = 'WH' . format_date($date,0,'j');
|
$WH = 'WH' . format_date($date, 0, 'j');
|
||||||
|
|
||||||
$yesterday = $this->dahsboard_Model->attyesterday($WH, $daydate);
|
$yesterday = $this->dahsboard_Model->attyesterday($WH, $daydate);
|
||||||
|
|
||||||
@ -404,7 +407,7 @@ class User extends BaseController
|
|||||||
$data['today'] = $values;
|
$data['today'] = $values;
|
||||||
$data['absname'] = $absEmp;
|
$data['absname'] = $absEmp;
|
||||||
|
|
||||||
$OT = 'OT' .format_date($date,0,'j');
|
$OT = 'OT' . format_date($date, 0, 'j');
|
||||||
|
|
||||||
$CUR_month = date('t');
|
$CUR_month = date('t');
|
||||||
|
|
||||||
@ -485,7 +488,7 @@ class User extends BaseController
|
|||||||
$working = array();
|
$working = array();
|
||||||
$overtime = array();
|
$overtime = array();
|
||||||
//$holid = array();
|
//$holid = array();
|
||||||
$len = format_date($date,0,'d');
|
$len = format_date($date, 0, 'd');
|
||||||
for ($i = 1; $i <= $len; $i++) //echo $dat; die;
|
for ($i = 1; $i <= $len; $i++) //echo $dat; die;
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -701,7 +704,6 @@ class User extends BaseController
|
|||||||
if ($CURMONTH == $doj_month && $CURYEAR == $doj_year) {
|
if ($CURMONTH == $doj_month && $CURYEAR == $doj_year) {
|
||||||
|
|
||||||
$data['CUR_month'] = $CURDATE - $doj_day + 1;
|
$data['CUR_month'] = $CURDATE - $doj_day + 1;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$data['CUR_month'] = $date;
|
$data['CUR_month'] = $date;
|
||||||
}
|
}
|
||||||
@ -918,8 +920,14 @@ class User extends BaseController
|
|||||||
// {
|
// {
|
||||||
$data['EmpList'] = $this->user_model->getAllEmployees();
|
$data['EmpList'] = $this->user_model->getAllEmployees();
|
||||||
$data['roles'] = $this->user_model->getUserRoles();
|
$data['roles'] = $this->user_model->getUserRoles();
|
||||||
// $data['Department'] = $this->costcenter_model->getDepartment();
|
$data['Department'] = json_decode(json_encode($this->department_model->departmentListing()), true);
|
||||||
|
|
||||||
|
// echo "<pre>";
|
||||||
|
// print_r($data['Department']);
|
||||||
|
// die;
|
||||||
|
|
||||||
|
// echo "<pre>";
|
||||||
|
// print_r($data['Department']);die;
|
||||||
$this->global['pageTitle'] = 'Add New User';
|
$this->global['pageTitle'] = 'Add New User';
|
||||||
$this->loadViews("addUser", $this->global, $data, NULL);
|
$this->loadViews("addUser", $this->global, $data, NULL);
|
||||||
// }
|
// }
|
||||||
@ -1000,7 +1008,7 @@ class User extends BaseController
|
|||||||
$email = $this->request->getPost('MailID');
|
$email = $this->request->getPost('MailID');
|
||||||
$SelectedDepartment = (string)$this->request->getPost('txtSelectedDepartment');
|
$SelectedDepartment = (string)$this->request->getPost('txtSelectedDepartment');
|
||||||
$comma_separated = explode(':', $SelectedDepartment);
|
$comma_separated = explode(':', $SelectedDepartment);
|
||||||
if(count($comma_separated)== 1 && in_array('DEP27', $comma_separated)){
|
if (count($comma_separated) == 1 && in_array('DEP27', $comma_separated)) {
|
||||||
$roleId = '6';
|
$roleId = '6';
|
||||||
}
|
}
|
||||||
$userInfo = [
|
$userInfo = [
|
||||||
@ -1167,7 +1175,7 @@ class User extends BaseController
|
|||||||
{
|
{
|
||||||
$this->global['pageTitle'] = 'Change Password';
|
$this->global['pageTitle'] = 'Change Password';
|
||||||
|
|
||||||
$this->loadViews("changePassword", $this->global, NULL, NULL);
|
$this->loadViews("changePassword", $this->global, [], NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1178,29 +1186,27 @@ class User extends BaseController
|
|||||||
{
|
{
|
||||||
helper('form'); //$this->load->library('form_validation');
|
helper('form'); //$this->load->library('form_validation');
|
||||||
|
|
||||||
$this->validator->setRules(['oldPassword', 'Old password'=> 'required|max_length[20]']);
|
// $this->validator->setRules(['oldPassword', 'Old password'=> 'required|max_length[20]']);
|
||||||
$this->validator->setRules(['newPassword', 'New password'=> 'required|max_length[20]']);
|
// $this->validator->setRules(['newPassword', 'New password'=> 'required|max_length[20]']);
|
||||||
$this->validator->setRules(['cNewPassword', 'Confirm new password'=> 'required|matches[newPassword]|max_length[20]']);
|
// $this->validator->setRules(['cNewPassword', 'Confirm new password'=> 'required|matches[newPassword]|max_length[20]']);
|
||||||
|
|
||||||
if ($this->validator->run() == FALSE) {
|
// if ($this->validator->run() == FALSE) {
|
||||||
$this->loadChangePass();
|
|
||||||
} else {
|
|
||||||
$oldPassword = $this->request->getPost('oldPassword');
|
$oldPassword = $this->request->getPost('oldPassword');
|
||||||
$newPassword = $this->request->getPost('newPassword');
|
$newPassword = $this->request->getPost('newPassword');
|
||||||
|
$cNewPassword = $this->request->getPost('newPassword');
|
||||||
|
if($newPassword === $cNewPassword && $oldPassword != $newPassword) {
|
||||||
$resultPas = $this->user_model->matchOldPassword($this->vendorId, $oldPassword);
|
$resultPas = $this->user_model->matchOldPassword($this->vendorId, $oldPassword);
|
||||||
|
|
||||||
if (empty($resultPas)) {
|
if (empty($resultPas)) {
|
||||||
$this->session->setFlashdata('nomatch', 'Your old password not correct');
|
$this->session->setFlashdata('nomatch', 'Your old password not correct');
|
||||||
return redirect()->route('loadChangePass');
|
return redirect()->route('loadChangePass');
|
||||||
} else {
|
} else {
|
||||||
$usersData = array(
|
$usersData = array(
|
||||||
'password' => getHashedPassword($newPassword), 'updatedBy' => $this->vendorId,
|
'password' => getHashedPassword($newPassword),
|
||||||
|
'updatedBy' => $this->vendorId,
|
||||||
'updatedDtm' => date('Y-m-d H:i:sa')
|
'updatedDtm' => date('Y-m-d H:i:sa')
|
||||||
);
|
);
|
||||||
|
$this->session->setFlashdata('error', 'Password updation failed');
|
||||||
$result = $this->user_model->changePassword($this->vendorId, $usersData);
|
$result = $this->user_model->changePassword($this->vendorId, $usersData);
|
||||||
|
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
$this->session->setFlashdata('success', 'Password updation successful');
|
$this->session->setFlashdata('success', 'Password updation successful');
|
||||||
} else {
|
} else {
|
||||||
@ -1227,7 +1233,6 @@ class User extends BaseController
|
|||||||
|
|
||||||
$data['fy'] = $this->user_model->fincalYear();
|
$data['fy'] = $this->user_model->fincalYear();
|
||||||
$data['per'] = $this->user_model->deliver_perform($fa, $aa, $m);
|
$data['per'] = $this->user_model->deliver_perform($fa, $aa, $m);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['fy'] = $this->user_model->fincalYear();
|
$data['fy'] = $this->user_model->fincalYear();
|
||||||
@ -1272,30 +1277,28 @@ class User extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function zohobooks_api_fetch_all(){
|
function zohobooks_api_fetch_all()
|
||||||
|
{
|
||||||
// print_r($_GET);
|
// print_r($_GET);
|
||||||
// echo isset($_GET['from']) ? $_GET['from'] : 'n';
|
// echo isset($_GET['from']) ? $_GET['from'] : 'n';
|
||||||
// echo isset($_GET['to']) ? $_GET['to'] : 'n';
|
// echo isset($_GET['to']) ? $_GET['to'] : 'n';
|
||||||
// die();
|
// die();
|
||||||
try{
|
try {
|
||||||
// if (isset($_POST['sync']) || $_GET['from'] != null && $_GET['to'] != null)
|
// if (isset($_POST['sync']) || $_GET['from'] != null && $_GET['to'] != null)
|
||||||
// {
|
// {
|
||||||
// $ch=curl_init();
|
// $ch=curl_init();
|
||||||
//$this->load->helper('zohobooks_fetch_api_helper');
|
//$this->load->helper('zohobooks_fetch_api_helper');
|
||||||
helper('zohobook');
|
helper('zohobook');
|
||||||
$Zohobook_model = model('Zohobook_api_model');
|
$Zohobook_model = model('Zohobook_api_model');
|
||||||
if(isset($_GET['from']) && $_GET['from'] != null && isset($_GET['to']) && $_GET['to'] != null)
|
if (isset($_GET['from']) && $_GET['from'] != null && isset($_GET['to']) && $_GET['to'] != null) {
|
||||||
{
|
|
||||||
$date_today = $_GET['to'];
|
$date_today = $_GET['to'];
|
||||||
$date_yesterday = $_GET['from'];
|
$date_yesterday = $_GET['from'];
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$date_today = date('Y-m-d');
|
$date_today = date('Y-m-d');
|
||||||
$date_yesterday = date('Y-m-d',strtotime('-3 day',strtotime($date_today)));
|
$date_yesterday = date('Y-m-d', strtotime('-3 day', strtotime($date_today)));
|
||||||
}
|
}
|
||||||
// echo $date_today.'--'.$date_yesterday;die;
|
// echo $date_today.'--'.$date_yesterday;die;
|
||||||
$chk_acc_token_val = $Zohobook_model->get_data('zohobook_accesstoken','id' , 1);
|
$chk_acc_token_val = $Zohobook_model->get_data('zohobook_accesstoken', 'id', 1);
|
||||||
// print_r($chk_acc_token_val);//die();
|
// print_r($chk_acc_token_val);//die();
|
||||||
$date = new \DateTime($chk_acc_token_val[0]['created_at']);
|
$date = new \DateTime($chk_acc_token_val[0]['created_at']);
|
||||||
//print_r($date);
|
//print_r($date);
|
||||||
@ -1304,32 +1307,36 @@ class User extends BaseController
|
|||||||
//echo '****************';
|
//echo '****************';
|
||||||
//print_r(date('Y-m-d h:i:s'));
|
//print_r(date('Y-m-d h:i:s'));
|
||||||
$token = 0;
|
$token = 0;
|
||||||
if ($date->format('Y-m-d H:i:s') > date('Y-m-d H:i:s')) { $token = $chk_acc_token_val[0]['token']; }
|
if ($date->format('Y-m-d H:i:s') > date('Y-m-d H:i:s')) {
|
||||||
else { $token = generateNewToken(); $tokendata['token'] = $token; $Zohobook_model->customUpdate($tokendata , 1,'zohobook_accesstoken'); }
|
$token = $chk_acc_token_val[0]['token'];
|
||||||
|
} else {
|
||||||
|
$token = generateNewToken();
|
||||||
|
$tokendata['token'] = $token;
|
||||||
|
$Zohobook_model->customUpdate($tokendata, 1, 'zohobook_accesstoken');
|
||||||
|
}
|
||||||
// $token = generateNewToken(); $tokendata['token'] = $token;
|
// $token = generateNewToken(); $tokendata['token'] = $token;
|
||||||
//$Zohobook_model->update($tokendata , 1,'zohobook_accesstoken');
|
//$Zohobook_model->update($tokendata , 1,'zohobook_accesstoken');
|
||||||
$result = getheringInvoiceDetails($date_today , $date_yesterday , $token);
|
$result = getheringInvoiceDetails($date_today, $date_yesterday, $token);
|
||||||
$headers_new = $result['headers_new'];
|
$headers_new = $result['headers_new'];
|
||||||
$res = json_decode($result['data'],true);
|
$res = json_decode($result['data'], true);
|
||||||
$inv_array = $res['invoices'];
|
$inv_array = $res['invoices'];
|
||||||
// print_r($inv_array);
|
// print_r($inv_array);
|
||||||
// echo "rrrr";
|
// echo "rrrr";
|
||||||
// die();
|
// die();
|
||||||
foreach($inv_array as $inv){
|
foreach ($inv_array as $inv) {
|
||||||
$invoice_id = $inv['invoice_id'];
|
$invoice_id = $inv['invoice_id'];
|
||||||
//filter only einvoice status pushed invoices only
|
//filter only einvoice status pushed invoices only
|
||||||
//&& isset($inv['einvoice_details']) && isset($inv['einvoice_details']['status']) && ($inv['einvoice_details']['status'] == 'pushed')
|
//&& isset($inv['einvoice_details']) && isset($inv['einvoice_details']['status']) && ($inv['einvoice_details']['status'] == 'pushed')
|
||||||
if($invoice_id !== "" ){
|
if ($invoice_id !== "") {
|
||||||
$organization_id = '776847408';
|
$organization_id = '776847408';
|
||||||
$result2=getheringInvoiceSubDetails($invoice_id,$organization_id,$headers_new);
|
$result2 = getheringInvoiceSubDetails($invoice_id, $organization_id, $headers_new);
|
||||||
$resall = json_decode($result2,true);
|
$resall = json_decode($result2, true);
|
||||||
$res2[] = $resall['invoice'];
|
$res2[] = $resall['invoice'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$insert_count = 0;
|
$insert_count = 0;
|
||||||
$update_count = 0;
|
$update_count = 0;
|
||||||
foreach($res2 as $rs)
|
foreach ($res2 as $rs) {
|
||||||
{
|
|
||||||
$gst_no = $rs['gst_no'];
|
$gst_no = $rs['gst_no'];
|
||||||
$invoice_number = $rs['invoice_number'];
|
$invoice_number = $rs['invoice_number'];
|
||||||
$invoice_date = $rs['date'];
|
$invoice_date = $rs['date'];
|
||||||
@ -1338,35 +1345,33 @@ class User extends BaseController
|
|||||||
$invoice_url = $rs['invoice_url'];
|
$invoice_url = $rs['invoice_url'];
|
||||||
$einvoice_number = $rs['einvoice_details']['inv_ref_num'];
|
$einvoice_number = $rs['einvoice_details']['inv_ref_num'];
|
||||||
|
|
||||||
$invoice_time=$rs['created_time'];
|
$invoice_time = $rs['created_time'];
|
||||||
$time_array = explode("T", $invoice_time);
|
$time_array = explode("T", $invoice_time);
|
||||||
$time_array = explode("+",$time_array[1]);
|
$time_array = explode("+", $time_array[1]);
|
||||||
$invoice_time = $time_array[0];
|
$invoice_time = $time_array[0];
|
||||||
|
|
||||||
$sql_invoice_chk = $Zohobook_model->ip_invoices($invoice_number , $invoice_date);
|
$sql_invoice_chk = $Zohobook_model->ip_invoices($invoice_number, $invoice_date);
|
||||||
if($sql_invoice_chk <= 0)
|
if ($sql_invoice_chk <= 0) {
|
||||||
{
|
|
||||||
|
|
||||||
$gst_sql = $Zohobook_model->ip_clients($gst_no);
|
$gst_sql = $Zohobook_model->ip_clients($gst_no);
|
||||||
if($gst_sql)
|
if ($gst_sql) {
|
||||||
{
|
|
||||||
$client_id = $gst_sql[0]['client_id'];
|
$client_id = $gst_sql[0]['client_id'];
|
||||||
log_message('error', 'Data fetch success DB : ip_clients , client_id : '.$client_id);
|
log_message('error', 'Data fetch success DB : ip_clients , client_id : ' . $client_id);
|
||||||
}
|
} else {
|
||||||
else
|
log_message('error', 'No data => Data fetch failed DB : ip_clients ' . $gst_no);
|
||||||
{
|
|
||||||
log_message('error', 'No data => Data fetch failed DB : ip_clients '.$gst_no);
|
|
||||||
$gst_no_data['client_tax_code'] = $gst_no;
|
$gst_no_data['client_tax_code'] = $gst_no;
|
||||||
$gst_inserted_id = $Zohobook_model->customInsert($gst_no_data,'ip_clients');
|
$gst_inserted_id = $Zohobook_model->customInsert($gst_no_data, 'ip_clients');
|
||||||
$client_id = $gst_inserted_id;
|
$client_id = $gst_inserted_id;
|
||||||
log_message('error', 'New Data Created : DB : ip_clients , client_id : '.$client_id);
|
log_message('error', 'New Data Created : DB : ip_clients , client_id : ' . $client_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||||
$charactersLength = strlen($characters);
|
$charactersLength = strlen($characters);
|
||||||
$randomString = '';
|
$randomString = '';
|
||||||
for ($i = 0; $i < 16; $i++) { $randomString .= $characters[rand(0, $charactersLength - 1)]; }
|
for ($i = 0; $i < 16; $i++) {
|
||||||
|
$randomString .= $characters[rand(0, $charactersLength - 1)];
|
||||||
|
}
|
||||||
$url_key = $randomString;
|
$url_key = $randomString;
|
||||||
|
|
||||||
$ip_invoices['user_id'] = 1;
|
$ip_invoices['user_id'] = 1;
|
||||||
@ -1383,10 +1388,9 @@ class User extends BaseController
|
|||||||
$ip_invoices['status'] = $status;
|
$ip_invoices['status'] = $status;
|
||||||
$ip_invoices['e_invoice_number'] = $einvoice_number;
|
$ip_invoices['e_invoice_number'] = $einvoice_number;
|
||||||
$ip_invoices['invoice_url'] = $invoice_url;
|
$ip_invoices['invoice_url'] = $invoice_url;
|
||||||
$invoice_insert_id = $Zohobook_model->customInsert($ip_invoices,'ip_invoices');
|
$invoice_insert_id = $Zohobook_model->customInsert($ip_invoices, 'ip_invoices');
|
||||||
if($invoice_insert_id)
|
if ($invoice_insert_id) {
|
||||||
{
|
log_message('error', 'Data insert success DB : ip_invoices client id :' . $client_id);
|
||||||
log_message('error', 'Data insert success DB : ip_invoices client id :'. $client_id);
|
|
||||||
$insert_count = $insert_count + 1;
|
$insert_count = $insert_count + 1;
|
||||||
//start invoice level custom fields
|
//start invoice level custom fields
|
||||||
|
|
||||||
@ -1394,17 +1398,17 @@ class User extends BaseController
|
|||||||
|
|
||||||
$batch_no = isset($rs['custom_fields'][5]['value']) ? $rs['custom_fields'][5]['value'] : "";
|
$batch_no = isset($rs['custom_fields'][5]['value']) ? $rs['custom_fields'][5]['value'] : "";
|
||||||
// $batch_no = "";
|
// $batch_no = "";
|
||||||
$vehicle_number = isset($rs['custom_field_hash']['cf_vehicle_number']) ? $rs['custom_field_hash']['cf_vehicle_number']: '';
|
$vehicle_number = isset($rs['custom_field_hash']['cf_vehicle_number']) ? $rs['custom_field_hash']['cf_vehicle_number'] : '';
|
||||||
$transport_mode =isset($rs['custom_field_hash']['cf_transport_mode']) ? $rs['custom_field_hash']['cf_transport_mode'] : '';
|
$transport_mode = isset($rs['custom_field_hash']['cf_transport_mode']) ? $rs['custom_field_hash']['cf_transport_mode'] : '';
|
||||||
$purchase_order_date = isset($rs['custom_field_hash']['cf_purchase_order_date'])?$rs['custom_field_hash']['cf_purchase_order_date']:'';
|
$purchase_order_date = isset($rs['custom_field_hash']['cf_purchase_order_date']) ? $rs['custom_field_hash']['cf_purchase_order_date'] : '';
|
||||||
$driver = isset($rs['custom_field_hash']['cf_driver']) ? $rs['custom_field_hash']['cf_driver'] : '';
|
$driver = isset($rs['custom_field_hash']['cf_driver']) ? $rs['custom_field_hash']['cf_driver'] : '';
|
||||||
$place_of_supply = isset($rs['custom_field_hash']['cf_place_of_supply']) ? $rs['custom_field_hash']['cf_place_of_supply']:'';
|
$place_of_supply = isset($rs['custom_field_hash']['cf_place_of_supply']) ? $rs['custom_field_hash']['cf_place_of_supply'] : '';
|
||||||
// batch_no
|
// batch_no
|
||||||
$ip_invoice_custom_b['invoice_id'] = $invoice_insert_id;
|
$ip_invoice_custom_b['invoice_id'] = $invoice_insert_id;
|
||||||
$ip_invoice_custom_b['invoice_custom_fieldid'] = 62;
|
$ip_invoice_custom_b['invoice_custom_fieldid'] = 62;
|
||||||
$ip_invoice_custom_b['invoice_custom_fieldvalue'] = $batch_no;
|
$ip_invoice_custom_b['invoice_custom_fieldvalue'] = $batch_no;
|
||||||
$result_invoice_custom_insert = $Zohobook_model->customInsert($ip_invoice_custom_b,'ip_invoice_custom');
|
$result_invoice_custom_insert = $Zohobook_model->customInsert($ip_invoice_custom_b, 'ip_invoice_custom');
|
||||||
if($result_invoice_custom_insert)
|
if ($result_invoice_custom_insert)
|
||||||
log_message('error', 'Data insert success DB : ip_invoice_custom ');
|
log_message('error', 'Data insert success DB : ip_invoice_custom ');
|
||||||
else
|
else
|
||||||
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
|
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
|
||||||
@ -1412,8 +1416,8 @@ class User extends BaseController
|
|||||||
$ip_invoice_custom_v['invoice_id'] = $invoice_insert_id;
|
$ip_invoice_custom_v['invoice_id'] = $invoice_insert_id;
|
||||||
$ip_invoice_custom_v['invoice_custom_fieldid'] = 8;
|
$ip_invoice_custom_v['invoice_custom_fieldid'] = 8;
|
||||||
$ip_invoice_custom_v['invoice_custom_fieldvalue'] = $vehicle_number;
|
$ip_invoice_custom_v['invoice_custom_fieldvalue'] = $vehicle_number;
|
||||||
$res_vehicle = $Zohobook_model->customInsert($ip_invoice_custom_v,'ip_invoice_custom');
|
$res_vehicle = $Zohobook_model->customInsert($ip_invoice_custom_v, 'ip_invoice_custom');
|
||||||
if($res_vehicle)
|
if ($res_vehicle)
|
||||||
log_message('error', 'Data insert success DB : ip_invoice_custom ');
|
log_message('error', 'Data insert success DB : ip_invoice_custom ');
|
||||||
else
|
else
|
||||||
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
|
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
|
||||||
@ -1421,8 +1425,8 @@ class User extends BaseController
|
|||||||
$ip_invoice_custom_t['invoice_id'] = $invoice_insert_id;
|
$ip_invoice_custom_t['invoice_id'] = $invoice_insert_id;
|
||||||
$ip_invoice_custom_t['invoice_custom_fieldid'] = 7;
|
$ip_invoice_custom_t['invoice_custom_fieldid'] = 7;
|
||||||
$ip_invoice_custom_t['invoice_custom_fieldvalue'] = $transport_mode;
|
$ip_invoice_custom_t['invoice_custom_fieldvalue'] = $transport_mode;
|
||||||
$res_transport_mode = $Zohobook_model->customInsert($ip_invoice_custom_t,'ip_invoice_custom');
|
$res_transport_mode = $Zohobook_model->customInsert($ip_invoice_custom_t, 'ip_invoice_custom');
|
||||||
if($res_transport_mode)
|
if ($res_transport_mode)
|
||||||
log_message('error', 'Data insert success DB : ip_invoice_custom ');
|
log_message('error', 'Data insert success DB : ip_invoice_custom ');
|
||||||
else
|
else
|
||||||
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
|
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
|
||||||
@ -1430,8 +1434,8 @@ class User extends BaseController
|
|||||||
$ip_invoice_custom_p['invoice_id'] = $invoice_insert_id;
|
$ip_invoice_custom_p['invoice_id'] = $invoice_insert_id;
|
||||||
$ip_invoice_custom_p['invoice_custom_fieldid'] = 15;
|
$ip_invoice_custom_p['invoice_custom_fieldid'] = 15;
|
||||||
$ip_invoice_custom_p['invoice_custom_fieldvalue'] = $purchase_order_date;
|
$ip_invoice_custom_p['invoice_custom_fieldvalue'] = $purchase_order_date;
|
||||||
$res_purchase_order_date =$Zohobook_model->customInsert($ip_invoice_custom_p,'ip_invoice_custom');
|
$res_purchase_order_date = $Zohobook_model->customInsert($ip_invoice_custom_p, 'ip_invoice_custom');
|
||||||
if($res_purchase_order_date)
|
if ($res_purchase_order_date)
|
||||||
log_message('error', 'Data insert success DB : ip_invoice_custom ');
|
log_message('error', 'Data insert success DB : ip_invoice_custom ');
|
||||||
else
|
else
|
||||||
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
|
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
|
||||||
@ -1439,8 +1443,8 @@ class User extends BaseController
|
|||||||
$ip_invoice_custom_d['invoice_id'] = $invoice_insert_id;
|
$ip_invoice_custom_d['invoice_id'] = $invoice_insert_id;
|
||||||
$ip_invoice_custom_d['invoice_custom_fieldid'] = 58;
|
$ip_invoice_custom_d['invoice_custom_fieldid'] = 58;
|
||||||
$ip_invoice_custom_d['invoice_custom_fieldvalue'] = $driver;
|
$ip_invoice_custom_d['invoice_custom_fieldvalue'] = $driver;
|
||||||
$res_driver = $Zohobook_model->customInsert($ip_invoice_custom_d,'ip_invoice_custom');
|
$res_driver = $Zohobook_model->customInsert($ip_invoice_custom_d, 'ip_invoice_custom');
|
||||||
if($res_driver)
|
if ($res_driver)
|
||||||
log_message('error', 'Data insert success DB : ip_invoice_custom ');
|
log_message('error', 'Data insert success DB : ip_invoice_custom ');
|
||||||
else
|
else
|
||||||
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
|
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
|
||||||
@ -1448,20 +1452,18 @@ class User extends BaseController
|
|||||||
$ip_invoice_custom_d['invoice_id'] = $invoice_insert_id;
|
$ip_invoice_custom_d['invoice_id'] = $invoice_insert_id;
|
||||||
$ip_invoice_custom_d['invoice_custom_fieldid'] = 10;
|
$ip_invoice_custom_d['invoice_custom_fieldid'] = 10;
|
||||||
$ip_invoice_custom_d['invoice_custom_fieldvalue'] = $place_of_supply;
|
$ip_invoice_custom_d['invoice_custom_fieldvalue'] = $place_of_supply;
|
||||||
$res_place = $Zohobook_model->customInsert($ip_invoice_custom_d,'ip_invoice_custom');
|
$res_place = $Zohobook_model->customInsert($ip_invoice_custom_d, 'ip_invoice_custom');
|
||||||
if($res_place)
|
if ($res_place)
|
||||||
log_message('error', 'Data insert success DB : ip_invoice_custom ');
|
log_message('error', 'Data insert success DB : ip_invoice_custom ');
|
||||||
else
|
else
|
||||||
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
|
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
|
||||||
//end invoice level custom fields
|
//end invoice level custom fields
|
||||||
|
|
||||||
//if line items available
|
//if line items available
|
||||||
if(isset($rs['line_items']) && count($rs['line_items']) > 0)
|
if (isset($rs['line_items']) && count($rs['line_items']) > 0) {
|
||||||
{
|
log_message('error', 'Processing line items' . count($rs['line_items']));
|
||||||
log_message('error', 'Processing line items'.count($rs['line_items']));
|
|
||||||
|
|
||||||
for($i = 0; $i< count($rs['line_items']);$i++)
|
for ($i = 0; $i < count($rs['line_items']); $i++) { //start insert line items
|
||||||
{ //start insert line items
|
|
||||||
$sku = $rs['line_items'][$i]['sku'];
|
$sku = $rs['line_items'][$i]['sku'];
|
||||||
|
|
||||||
|
|
||||||
@ -1475,36 +1477,30 @@ class User extends BaseController
|
|||||||
$sgst = $rs['line_items'][$i]['line_item_taxes'][0]['tax_name'];
|
$sgst = $rs['line_items'][$i]['line_item_taxes'][0]['tax_name'];
|
||||||
$cgst = $cgst[4];
|
$cgst = $cgst[4];
|
||||||
$sgst = $sgst[4];
|
$sgst = $sgst[4];
|
||||||
$cgst = $cgst.'.000';
|
$cgst = $cgst . '.000';
|
||||||
$getcgsttax = $Zohobook_model->ip_tax_rates($cgst);
|
$getcgsttax = $Zohobook_model->ip_tax_rates($cgst);
|
||||||
if($getcgsttax)
|
if ($getcgsttax) {
|
||||||
{
|
|
||||||
$cgsttaxid = $getcgsttax[0]['tax_rate_id'];
|
$cgsttaxid = $getcgsttax[0]['tax_rate_id'];
|
||||||
log_message('error', 'Data fetch success DB : ip_tax_rates cgst'. $cgst);
|
log_message('error', 'Data fetch success DB : ip_tax_rates cgst' . $cgst);
|
||||||
}
|
} else {
|
||||||
else
|
log_message('error', 'No data => Data fetch failed DB : ip_tax_rates ' . $cgst);
|
||||||
{
|
|
||||||
log_message('error', 'No data => Data fetch failed DB : ip_tax_rates '. $cgst);
|
|
||||||
$cgst_data['tax_rate_percent'] = $cgst;
|
$cgst_data['tax_rate_percent'] = $cgst;
|
||||||
$getcgsttax = $Zohobook_model->customInsert($cgst_data,'ip_tax_rates');
|
$getcgsttax = $Zohobook_model->customInsert($cgst_data, 'ip_tax_rates');
|
||||||
$cgsttaxid = $getcgsttax;
|
$cgsttaxid = $getcgsttax;
|
||||||
log_message('error', 'New Data Created : DB : ip_tax_rates , tax_rate_id : '.$cgsttaxid);
|
log_message('error', 'New Data Created : DB : ip_tax_rates , tax_rate_id : ' . $cgsttaxid);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sgst = $sgst.'.000';
|
$sgst = $sgst . '.000';
|
||||||
$getsgsttax = $Zohobook_model->ip_tax_rates($sgst);
|
$getsgsttax = $Zohobook_model->ip_tax_rates($sgst);
|
||||||
if($getsgsttax)
|
if ($getsgsttax) {
|
||||||
{
|
|
||||||
$sgsttaxid = $getsgsttax[0]['tax_rate_id'];
|
$sgsttaxid = $getsgsttax[0]['tax_rate_id'];
|
||||||
log_message('error', 'Data fetch success DB : ip_tax_rates sgst'. $sgst);
|
log_message('error', 'Data fetch success DB : ip_tax_rates sgst' . $sgst);
|
||||||
}
|
} else {
|
||||||
else
|
log_message('error', 'No data => Data fetch failed DB : ip_tax_rates ' . $sgst);
|
||||||
{
|
|
||||||
log_message('error', 'No data => Data fetch failed DB : ip_tax_rates '. $sgst);
|
|
||||||
$sgst_data['tax_rate_percent'] = $sgst;
|
$sgst_data['tax_rate_percent'] = $sgst;
|
||||||
$getsgsttax = $Zohobook_model->customInsert($sgst_data,'ip_tax_rates');
|
$getsgsttax = $Zohobook_model->customInsert($sgst_data, 'ip_tax_rates');
|
||||||
$sgsttaxid = $getsgsttax;
|
$sgsttaxid = $getsgsttax;
|
||||||
log_message('error', 'New Data Created : DB : ip_tax_rates , tax_rate_id : '.$sgsttaxid);
|
log_message('error', 'New Data Created : DB : ip_tax_rates , tax_rate_id : ' . $sgsttaxid);
|
||||||
}
|
}
|
||||||
|
|
||||||
$item_subtotal = $rs['line_items'][$i]['item_total'];
|
$item_subtotal = $rs['line_items'][$i]['item_total'];
|
||||||
@ -1521,23 +1517,20 @@ class User extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
$sku_sql = $Zohobook_model->ip_products($sku);
|
$sku_sql = $Zohobook_model->ip_products($sku);
|
||||||
if(!empty($sku_sql))
|
if (!empty($sku_sql)) {
|
||||||
{
|
|
||||||
$product_id = $sku_sql[0]['product_id'];
|
$product_id = $sku_sql[0]['product_id'];
|
||||||
log_message('error', 'Data fetch success DB : ip_products , product_id : '.$product_id);
|
log_message('error', 'Data fetch success DB : ip_products , product_id : ' . $product_id);
|
||||||
}
|
} else {
|
||||||
else
|
log_message('error', 'No data => Data fetch failed DB : ip_products ' . $sku);
|
||||||
{
|
|
||||||
log_message('error', 'No data => Data fetch failed DB : ip_products '. $sku);
|
|
||||||
$sku_data['product_name'] = $item_name;
|
$sku_data['product_name'] = $item_name;
|
||||||
$sku_data['product_description'] = $item_description;
|
$sku_data['product_description'] = $item_description;
|
||||||
$sku_data['sku'] = $sku;
|
$sku_data['sku'] = $sku;
|
||||||
$sku_inserted_id = $Zohobook_model->customInsert($sku_data,'ip_products');
|
$sku_inserted_id = $Zohobook_model->customInsert($sku_data, 'ip_products');
|
||||||
$product_id = $sku_inserted_id;
|
$product_id = $sku_inserted_id;
|
||||||
log_message('error', '$sku_sql => Data fetch failed DB : ip_products '. $sku_sql);
|
log_message('error', '$sku_sql => Data fetch failed DB : ip_products ' . $sku_sql);
|
||||||
|
|
||||||
log_message('error', 'sku'.$sku);
|
log_message('error', 'sku' . $sku);
|
||||||
log_message('error', 'New Data Created : DB : product_id , product_id : '.$product_id);
|
log_message('error', 'New Data Created : DB : product_id , product_id : ' . $product_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
//#1
|
//#1
|
||||||
@ -1553,11 +1546,11 @@ class User extends BaseController
|
|||||||
$ip_invoice_items['item_product_unit'] = $item_product_unit;
|
$ip_invoice_items['item_product_unit'] = $item_product_unit;
|
||||||
$ip_invoice_items['Sgst_item_tax_rate_id'] = $sgsttaxid;
|
$ip_invoice_items['Sgst_item_tax_rate_id'] = $sgsttaxid;
|
||||||
$ip_invoice_items['Cgst_item_tax_rate_id'] = $cgsttaxid;
|
$ip_invoice_items['Cgst_item_tax_rate_id'] = $cgsttaxid;
|
||||||
$item_insert_id = $Zohobook_model->customInsert($ip_invoice_items,'ip_invoice_items');
|
$item_insert_id = $Zohobook_model->customInsert($ip_invoice_items, 'ip_invoice_items');
|
||||||
if($item_insert_id)
|
if ($item_insert_id)
|
||||||
log_message('error', 'Data insert success DB : ip_invoice_items => Sgst_item_tax_rate_id :'. $sgsttaxid);
|
log_message('error', 'Data insert success DB : ip_invoice_items => Sgst_item_tax_rate_id :' . $sgsttaxid);
|
||||||
else
|
else
|
||||||
log_message('error', 'Data insert failed DB : ip_invoice_items => Sgst_item_tax_rate_id :'. $sgsttaxid);
|
log_message('error', 'Data insert failed DB : ip_invoice_items => Sgst_item_tax_rate_id :' . $sgsttaxid);
|
||||||
|
|
||||||
//tax amount -- ip_invoice_item_amounts - table
|
//tax amount -- ip_invoice_item_amounts - table
|
||||||
$ip_invoice_item_amounts['item_id'] = $item_insert_id;
|
$ip_invoice_item_amounts['item_id'] = $item_insert_id;
|
||||||
@ -1568,28 +1561,20 @@ class User extends BaseController
|
|||||||
$ip_invoice_item_amounts['item_cgst_amt'] = $item_cgst_amt;
|
$ip_invoice_item_amounts['item_cgst_amt'] = $item_cgst_amt;
|
||||||
$ip_invoice_item_amounts['item_discount'] = $item_discount;
|
$ip_invoice_item_amounts['item_discount'] = $item_discount;
|
||||||
$ip_invoice_item_amounts['item_igst_amt'] = $item_igst_amt;
|
$ip_invoice_item_amounts['item_igst_amt'] = $item_igst_amt;
|
||||||
$result_tax_amount_insert = $Zohobook_model->customInsert($ip_invoice_item_amounts,'ip_invoice_item_amounts');
|
$result_tax_amount_insert = $Zohobook_model->customInsert($ip_invoice_item_amounts, 'ip_invoice_item_amounts');
|
||||||
if($result_tax_amount_insert)
|
if ($result_tax_amount_insert)
|
||||||
log_message('error', 'Data insert success DB : ip_invoice_item_amounts ');
|
log_message('error', 'Data insert success DB : ip_invoice_item_amounts ');
|
||||||
else
|
else
|
||||||
log_message('error', 'Data insert failed DB : ip_invoice_item_amounts ');
|
log_message('error', 'Data insert failed DB : ip_invoice_item_amounts ');
|
||||||
|
|
||||||
} //end line items insert
|
} //end line items insert
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
log_message('error', 'Line Items not found in API result');
|
log_message('error', 'Line Items not found in API result');
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
log_message('error', 'Data insert failed DB : ip_invoice_items client id :' . $client_id);
|
||||||
}
|
}
|
||||||
else
|
} else // update invoice status, especially for cancelled invoices
|
||||||
{
|
|
||||||
log_message('error', 'Data insert failed DB : ip_invoice_items client id :'. $client_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
else // update invoice status, especially for cancelled invoices
|
|
||||||
{
|
{
|
||||||
// if($status == "void" || $status == "sent" || $status == "overdue")
|
// if($status == "void" || $status == "sent" || $status == "overdue")
|
||||||
// {
|
// {
|
||||||
@ -1598,13 +1583,10 @@ class User extends BaseController
|
|||||||
// echo 'script' . $invoice_number. $status;
|
// echo 'script' . $invoice_number. $status;
|
||||||
// print_r( $sql_invoice_update);
|
// print_r( $sql_invoice_update);
|
||||||
// echo '<br>';
|
// echo '<br>';
|
||||||
$sql_invoice_update = $Zohobook_model->sql_invoice_update($sql_invoice_update,$invoice_number,$invoice_date,'ip_invoices');
|
$sql_invoice_update = $Zohobook_model->sql_invoice_update($sql_invoice_update, $invoice_number, $invoice_date, 'ip_invoices');
|
||||||
if($sql_invoice_update)
|
if ($sql_invoice_update) {
|
||||||
{
|
|
||||||
log_message('error', 'Data update success DB : ip_invoices ');
|
log_message('error', 'Data update success DB : ip_invoices ');
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
log_message('error', 'Data update failed DB : ip_invoices ');
|
log_message('error', 'Data update failed DB : ip_invoices ');
|
||||||
}
|
}
|
||||||
$update_count = $update_count + 1;
|
$update_count = $update_count + 1;
|
||||||
@ -1612,7 +1594,8 @@ class User extends BaseController
|
|||||||
}
|
}
|
||||||
// echo 'new invoice inserted count- ' . $insert_count . '/' . 'status updated count - ' . $update_count;
|
// echo 'new invoice inserted count- ' . $insert_count . '/' . 'status updated count - ' . $update_count;
|
||||||
|
|
||||||
}$response = [
|
}
|
||||||
|
$response = [
|
||||||
'status' => true,
|
'status' => true,
|
||||||
'message' => "Successfully data inserted. Total inserted: " . $insert_count . ", Total Updated: " . $update_count
|
'message' => "Successfully data inserted. Total inserted: " . $insert_count . ", Total Updated: " . $update_count
|
||||||
];
|
];
|
||||||
@ -1620,12 +1603,11 @@ class User extends BaseController
|
|||||||
|
|
||||||
// curl_close($ch);
|
// curl_close($ch);
|
||||||
// }
|
// }
|
||||||
}
|
} catch (\Exception $e) {
|
||||||
catch (\Exception $e) {
|
|
||||||
$data['err'] = $e->getMessage();
|
$data['err'] = $e->getMessage();
|
||||||
// $db = \Config\Database::connect();
|
// $db = \Config\Database::connect();
|
||||||
// $data['last_query'] = $db->getLastQuery();;
|
// $data['last_query'] = $db->getLastQuery();;
|
||||||
$Zohobook_model->customInsert($data,'zohobook_api_err');
|
$Zohobook_model->customInsert($data, 'zohobook_api_err');
|
||||||
log_message('error', "Data insertion failed : " . $e->getMessage());
|
log_message('error', "Data insertion failed : " . $e->getMessage());
|
||||||
|
|
||||||
return json_encode("Data insertion failed : " . $e->getMessage());
|
return json_encode("Data insertion failed : " . $e->getMessage());
|
||||||
@ -1633,7 +1615,8 @@ class User extends BaseController
|
|||||||
}
|
}
|
||||||
// END zoho API
|
// END zoho API
|
||||||
|
|
||||||
function fetchEmployeeDetails() {
|
function fetchEmployeeDetails()
|
||||||
|
{
|
||||||
$EmpID = $this->request->getPost('EmpID');
|
$EmpID = $this->request->getPost('EmpID');
|
||||||
|
|
||||||
if (!$EmpID) {
|
if (!$EmpID) {
|
||||||
|
|||||||
@ -48,9 +48,9 @@ if (!function_exists('generateCopyrightNotice')) {
|
|||||||
{
|
{
|
||||||
$current_year = date('Y');
|
$current_year = date('Y');
|
||||||
if ($current_year > 2024) {
|
if ($current_year > 2024) {
|
||||||
return " Copyright © 2024 - $current_year ";
|
return " © 2024 - $current_year ";
|
||||||
} else {
|
} else {
|
||||||
return " Copyright © $current_year ";
|
return " © $current_year ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use CodeIgniter\Model;
|
use CodeIgniter\Model;
|
||||||
@ -17,18 +18,17 @@ class Emppaydate_model extends Model
|
|||||||
{
|
{
|
||||||
$builder = $this->db->table('t_loan_master')
|
$builder = $this->db->table('t_loan_master')
|
||||||
->select('t_loan_master.*,t_emp_pay_data.*,t_employee_details.FirstName')
|
->select('t_loan_master.*,t_emp_pay_data.*,t_employee_details.FirstName')
|
||||||
->join('t_employee_details','t_loan_master.EmpID = t_employee_details.EmpID','LEFT')
|
->join('t_employee_details', 't_loan_master.EmpID = t_employee_details.EmpID', 'LEFT')
|
||||||
->join('t_emp_pay_data','t_loan_master.EmpID = t_emp_pay_data.EmpID','LEFT');
|
->join('t_emp_pay_data', 't_loan_master.EmpID = t_emp_pay_data.EmpID', 'LEFT');
|
||||||
$query =$builder->get();
|
$query = $builder->get();
|
||||||
$result = $query->getResult();
|
$result = $query->getResult();
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteEmployeePay($EmpID)
|
function deleteEmployeePay($Loan_ID)
|
||||||
{
|
{
|
||||||
$query = $this->db->table('t_emp_pay_data')->delete(['EmpID' => $EmpID]);
|
$query = $this->db->table('t_loan_master')->delete(['Loan_ID' => $Loan_ID]);
|
||||||
return $query;
|
return $query;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -47,21 +47,19 @@ class Emppaydate_model extends Model
|
|||||||
return $emppay;
|
return $emppay;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addLoanInfo($dataarray,$string)
|
function addLoanInfo($dataarray, $string)
|
||||||
{
|
{
|
||||||
if($string == 'add'){
|
if ($string == 'add') {
|
||||||
$builder = $this->db->table('t_loan_master');
|
$builder = $this->db->table('t_loan_master');
|
||||||
$builder->insert($dataarray);
|
$builder->insert($dataarray);
|
||||||
|
|
||||||
$loanid = $this->db->affectedRows();
|
$loanid = $this->db->affectedRows();
|
||||||
return $loanid;
|
return $loanid;
|
||||||
}
|
} else if ($string == 'update') {
|
||||||
else if($string == 'update')
|
|
||||||
{
|
|
||||||
$loanid = $dataarray['Loan_ID'];
|
$loanid = $dataarray['Loan_ID'];
|
||||||
|
|
||||||
$this->db->table('t_loan_master')
|
$this->db->table('t_loan_master')
|
||||||
->where('Loan_ID',$loanid)
|
->where('Loan_ID', $loanid)
|
||||||
->update($dataarray);
|
->update($dataarray);
|
||||||
|
|
||||||
$loanid = $this->db->affectedRows();
|
$loanid = $this->db->affectedRows();
|
||||||
@ -74,7 +72,7 @@ class Emppaydate_model extends Model
|
|||||||
join t_employee_details on t_emp_pay_data.EmpID=t_employee_details.EmpID
|
join t_employee_details on t_emp_pay_data.EmpID=t_employee_details.EmpID
|
||||||
left join t_loan_master on t_emp_pay_data.EmpID=t_loan_master.EmpID and t_loan_master.is_Active = 1
|
left join t_loan_master on t_emp_pay_data.EmpID=t_loan_master.EmpID and t_loan_master.is_Active = 1
|
||||||
where t_emp_pay_data.Pay_Data_ID = ?;';
|
where t_emp_pay_data.Pay_Data_ID = ?;';
|
||||||
$query = $this->db->query($sql,array($paydataid));
|
$query = $this->db->query($sql, array($paydataid));
|
||||||
|
|
||||||
return $query->getResult();
|
return $query->getResult();
|
||||||
}
|
}
|
||||||
@ -84,7 +82,7 @@ class Emppaydate_model extends Model
|
|||||||
$sql = 'select t_emp_pay_data.Pay_Data_ID,t_emp_pay_data.EmpID,t_emp_pay_data.Basic_Pay,t_emp_pay_data.HRA_Rate,t_emp_pay_data.Allowances,t_emp_pay_data.Food_Allowances,t_emp_pay_data.Incentives,t_emp_pay_data.PF_Rate,t_emp_pay_data.ESI_Rate,t_emp_pay_data.HRA_Amount,t_emp_pay_data.TotalSalary from t_emp_pay_data
|
$sql = 'select t_emp_pay_data.Pay_Data_ID,t_emp_pay_data.EmpID,t_emp_pay_data.Basic_Pay,t_emp_pay_data.HRA_Rate,t_emp_pay_data.Allowances,t_emp_pay_data.Food_Allowances,t_emp_pay_data.Incentives,t_emp_pay_data.PF_Rate,t_emp_pay_data.ESI_Rate,t_emp_pay_data.HRA_Amount,t_emp_pay_data.TotalSalary from t_emp_pay_data
|
||||||
|
|
||||||
where t_emp_pay_data.EmpID = ?;';
|
where t_emp_pay_data.EmpID = ?;';
|
||||||
$query = $this->db->query($sql,array($EmpID));
|
$query = $this->db->query($sql, array($EmpID));
|
||||||
|
|
||||||
return $query->getRow();
|
return $query->getRow();
|
||||||
}
|
}
|
||||||
@ -93,7 +91,7 @@ class Emppaydate_model extends Model
|
|||||||
function editemppay($emppaydatas)
|
function editemppay($emppaydatas)
|
||||||
{
|
{
|
||||||
|
|
||||||
$EmpID=$emppaydatas['EmpID'];
|
$EmpID = $emppaydatas['EmpID'];
|
||||||
//echo $paydateid;
|
//echo $paydateid;
|
||||||
//print_r($emppaydatas);die();
|
//print_r($emppaydatas);die();
|
||||||
$this->db->table('t_emp_pay_data')
|
$this->db->table('t_emp_pay_data')
|
||||||
@ -113,7 +111,4 @@ class Emppaydate_model extends Model
|
|||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@ -342,10 +342,21 @@ class Inwardgateregister_model extends Model
|
|||||||
function ViewigrListing()
|
function ViewigrListing()
|
||||||
{
|
{
|
||||||
|
|
||||||
$builder = $this->db->table('t_igr_master igr')
|
// $builder = $this->db->table('t_igr_master igr')
|
||||||
->select('igr.*,PO.IsOpenOrder,PO.DeliveryDate,sup.SupplierName,PO.POType')
|
// ->select('igr.*,PO.IsOpenOrder,PO.DeliveryDate,sup.SupplierName,PO.POType,trans.name as TransporterName')
|
||||||
|
// ->join('t_purchaseorder_master PO', 'igr.PONO = PO.PONO')
|
||||||
|
// ->join('t_supplierdetailsn` sup', 'PO.SupplierID = sup.SupplierID')
|
||||||
|
// ->join('t_transporter` trans', 'igr.TransporterId = trans.id' , 'left')
|
||||||
|
// ->where('igr.IGRStatus !=', MRIR_CREATED)
|
||||||
|
// ->orderBy('igr.CreatedDate', 'desc');
|
||||||
|
|
||||||
|
$builder = $this->db->table('t_igr_details igr_details')
|
||||||
|
->select('igr.*,PO.IsOpenOrder,PO.DeliveryDate,sup.SupplierName,PO.POType,trans.name as TransporterName,item.MaterialName, igr_details.QuantityAsPerInvoice as ReceivedQuantity , igr_details.NetWeight as NetWeight')
|
||||||
|
->join('t_igr_master igr', 'igr_details.IGRNo = igr.IGRNo')
|
||||||
->join('t_purchaseorder_master PO', 'igr.PONO = PO.PONO')
|
->join('t_purchaseorder_master PO', 'igr.PONO = PO.PONO')
|
||||||
->join('t_supplierdetailsn` sup', 'PO.SupplierID = sup.SupplierID')
|
->join('t_supplierdetailsn` sup', 'PO.SupplierID = sup.SupplierID')
|
||||||
|
->join('t_transporter` trans', 'igr.TransporterId = trans.id' , 'left')
|
||||||
|
->join('t_materialmaster` item', 'igr_details.MaterialCode = item.MaterialCode' , 'left')
|
||||||
->where('igr.IGRStatus !=', MRIR_CREATED)
|
->where('igr.IGRStatus !=', MRIR_CREATED)
|
||||||
->orderBy('igr.CreatedDate', 'desc');
|
->orderBy('igr.CreatedDate', 'desc');
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|||||||
@ -84,7 +84,7 @@ class Monthlypay_model extends Model
|
|||||||
$month = '0' . $month;
|
$month = '0' . $month;
|
||||||
}
|
}
|
||||||
|
|
||||||
//echo $month;
|
|
||||||
|
|
||||||
$current = '01-' . $current;
|
$current = '01-' . $current;
|
||||||
//echo $current;
|
//echo $current;
|
||||||
@ -100,7 +100,7 @@ class Monthlypay_model extends Model
|
|||||||
//echo $lastdate;
|
//echo $lastdate;
|
||||||
|
|
||||||
//left join t_payroll on t_employee_details.EmpID = t_payroll.EmpID and month(t_payroll.PayOn) = month(?) and year(t_payroll.PayOn) = year(?)
|
//left join t_payroll on t_employee_details.EmpID = t_payroll.EmpID and month(t_payroll.PayOn) = month(?) and year(t_payroll.PayOn) = year(?)
|
||||||
$sql = "select t_emp_pay_data.EmpID,t_emp_pay_data.*,t_employee_details.FirstName,t_employee_details.DateofJoining,t_employee_details.Designation,t_employee_details.esi_applicable,t_employee_details.pf_applicable,t_employee_details.is_management_team,t_attendance.Days_Worked as Days_worked,t_attendance.Absent as LOP_Days,t_attendance.Paid_Leave as Paid_leave,t_attendance.Total_OTHrs as OT_Hrs_Worked,t_attendance.NoofDays,t_attendance.sunday_count,t_loan_master.Loan_ID,t_loan_master.Monthly_Due,t_loan_master.Due_Start_Date as DueDate,t_loan_master.Loan_Amount,t_loan_master.Paid_Amount,t_payroll.Key,t_monthly_pay_inputs.Incentives as MonthlyIncentives,t_monthly_pay_inputs.Loan_Recovered,t_monthly_pay_inputs.Estimate,t_monthly_pay_inputs.Festival_Bonus,t_monthly_pay_inputs.Other_Deductions,t_loan_history .Balance_Amount
|
$sql = "select t_emp_pay_data.EmpID,t_emp_pay_data.*,t_employee_details.FirstName,t_employee_details.DateofJoining,t_employee_details.Designation,t_employee_details.esi_applicable,t_employee_details.pf_applicable,t_employee_details.is_management_team,t_attendance.Days_Worked as Days_worked,t_attendance.Absent as LOP_Days,t_attendance.Paid_Leave as Paid_leave,t_attendance.Total_OTHrs as OT_Hrs_Worked,t_attendance.NoofDays,t_attendance.sunday_count,t_loan_master.Loan_ID,t_loan_master.Monthly_Due,t_loan_master.Due_Start_Date as DueDate,t_loan_master.Loan_Amount,t_loan_master.Paid_Amount,t_payroll.Key,t_monthly_pay_inputs.Loan_Recovered,t_monthly_pay_inputs.Estimate,t_monthly_pay_inputs.Festival_Bonus,t_monthly_pay_inputs.Other_Deductions,t_loan_history .Balance_Amount
|
||||||
from t_emp_pay_data
|
from t_emp_pay_data
|
||||||
left join t_employee_details on t_employee_details.EmpID = t_emp_pay_data.EmpID
|
left join t_employee_details on t_employee_details.EmpID = t_emp_pay_data.EmpID
|
||||||
left join t_payroll on t_employee_details.EmpID = t_payroll.EmpID and t_payroll.PayOn = ?
|
left join t_payroll on t_employee_details.EmpID = t_payroll.EmpID and t_payroll.PayOn = ?
|
||||||
@ -113,6 +113,9 @@ class Monthlypay_model extends Model
|
|||||||
order by t_employee_details.EmpID";
|
order by t_employee_details.EmpID";
|
||||||
|
|
||||||
$query = $this->db->query($sql, array($month, $month, $lastdate, $current, $current));
|
$query = $this->db->query($sql, array($month, $month, $lastdate, $current, $current));
|
||||||
|
// Get the last executed query
|
||||||
|
// $last_query = $this->db->getLastQuery();
|
||||||
|
// echo $last_query;
|
||||||
return $query->getResult();
|
return $query->getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -371,7 +374,7 @@ join t_departmentdetails as Dep on Dep.DEPCode=Emp.Departmentcode where Emp.IsA
|
|||||||
$pre_year = $curr_split[0];
|
$pre_year = $curr_split[0];
|
||||||
$curr_year = $curr_split[1];
|
$curr_year = $curr_split[1];
|
||||||
|
|
||||||
$sql = "select t_monthly_pay_inputs.EmpID,t_employee_details.FirstName,t_employee_details.LastName,sum(Incentives) as Incentives,sum(Festival_Bonus) as Bonus
|
$sql = "select t_monthly_pay_inputs.EmpID,t_employee_details.FirstName,t_employee_details.LastName,sum(Festival_Bonus) as Bonus
|
||||||
from t_monthly_pay_inputs
|
from t_monthly_pay_inputs
|
||||||
join t_employee_details on t_monthly_pay_inputs.EmpID = t_employee_details.EmpID
|
join t_employee_details on t_monthly_pay_inputs.EmpID = t_employee_details.EmpID
|
||||||
where
|
where
|
||||||
@ -393,7 +396,7 @@ join t_departmentdetails as Dep on Dep.DEPCode=Emp.Departmentcode where Emp.IsA
|
|||||||
$pre_year = $curr_split[0];
|
$pre_year = $curr_split[0];
|
||||||
$curr_year = $curr_split[1];
|
$curr_year = $curr_split[1];
|
||||||
|
|
||||||
$sql = "select t_monthly_pay_inputs.EmpID,t_monthly_pay_inputs.Month_Year,t_employee_details.FirstName,t_employee_details.LastName,sum(Incentives) as Incentives,sum(Festival_Bonus) as Bonus
|
$sql = "select t_monthly_pay_inputs.EmpID,t_monthly_pay_inputs.Month_Year,t_employee_details.FirstName,t_employee_details.LastName,sum(Festival_Bonus) as Bonus
|
||||||
from t_monthly_pay_inputs
|
from t_monthly_pay_inputs
|
||||||
join t_employee_details on t_monthly_pay_inputs.EmpID = t_employee_details.EmpID
|
join t_employee_details on t_monthly_pay_inputs.EmpID = t_employee_details.EmpID
|
||||||
and t_monthly_pay_inputs.EmpID = ?
|
and t_monthly_pay_inputs.EmpID = ?
|
||||||
|
|||||||
@ -376,8 +376,10 @@ class Payroll_model extends Model
|
|||||||
function getEmpID()
|
function getEmpID()
|
||||||
{
|
{
|
||||||
|
|
||||||
$builder = $this->db->table('t_employee_details')
|
$builder = $this->db->table('t_employee_details E')
|
||||||
->select('EmpID,FirstName,LastName');
|
->select('E.EmpID, E.FirstName, E.LastName')
|
||||||
|
->join('t_loan_master LM', 'LM.EmpID = E.EmpID', 'left')
|
||||||
|
->where('LM.Loan_ID IS NULL');
|
||||||
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
return $query->getResult();
|
return $query->getResult();
|
||||||
@ -487,4 +489,42 @@ class Payroll_model extends Model
|
|||||||
//return $query_count;
|
//return $query_count;
|
||||||
return $query->getResult();
|
return $query->getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getMonthlyPayDetails($EmpId, $PayOn)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table('t_monthly_pay_inputs MonthlyPay ')
|
||||||
|
->select('MonthlyPay.*, E.BankAccountNo , E.PFNO , E.ESI as ESINO , L.*')
|
||||||
|
->join('t_employee_details as E', 'MonthlyPay.EmpID = E.EmpID', 'left')
|
||||||
|
->join('t_loan_master as L', 'MonthlyPay.EmpID = L.EmpID and L.is_Active = 1', 'left')
|
||||||
|
->where('MonthlyPay.EmpID', $EmpId)
|
||||||
|
->where('MonthlyPay.Month_Year', $PayOn);
|
||||||
|
|
||||||
|
$query = $builder->get();
|
||||||
|
return $query->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
function insertPayroll($data)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table('t_payroll');
|
||||||
|
$builder->insert($data);
|
||||||
|
$count = $this->db->affectedRows();
|
||||||
|
return $count;
|
||||||
|
}
|
||||||
|
function insertLoanHistory($data)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table('t_loan_history');
|
||||||
|
$builder->insert($data);
|
||||||
|
$count = $this->db->affectedRows();
|
||||||
|
return $count;
|
||||||
|
}
|
||||||
|
function updateLoan($LoanID,$EmpID,$data)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table('t_loan_master')
|
||||||
|
->where('Loan_ID', $LoanID)
|
||||||
|
->where('EmpID', $EmpID)
|
||||||
|
->update($data);
|
||||||
|
$count = $this->db->affectedRows();
|
||||||
|
return $count;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -134,16 +134,19 @@ class User_model extends Model
|
|||||||
* @param number $userId : This is user id
|
* @param number $userId : This is user id
|
||||||
* @return boolean $result : TRUE / FALSE
|
* @return boolean $result : TRUE / FALSE
|
||||||
*/
|
*/
|
||||||
function deleteUser($userId, $userInfo)
|
function deleteUser($userId)
|
||||||
{
|
{
|
||||||
|
// Delete the user record
|
||||||
$this->db->table('tbl_users')
|
$this->db->table('tbl_users')
|
||||||
->where('userId', $userId)
|
->where('userId', $userId)
|
||||||
->update($userInfo);
|
->delete();
|
||||||
|
|
||||||
|
// Return the number of affected rows to confirm the deletion
|
||||||
return $this->db->affectedRows();
|
return $this->db->affectedRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is used to match users password for change password
|
* This function is used to match users password for change password
|
||||||
* @param number $userId : This is user id
|
* @param number $userId : This is user id
|
||||||
@ -157,7 +160,6 @@ class User_model extends Model
|
|||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|
||||||
$user = $query->getResult();
|
$user = $query->getResult();
|
||||||
|
|
||||||
if (!empty($user)) {
|
if (!empty($user)) {
|
||||||
if (password_verify($oldPassword, $user[0]->password)) {
|
if (password_verify($oldPassword, $user[0]->password)) {
|
||||||
|
|
||||||
@ -215,7 +217,9 @@ class User_model extends Model
|
|||||||
$builder = $this->db->table('t_employee_details EMP')
|
$builder = $this->db->table('t_employee_details EMP')
|
||||||
->select('EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,EMP.EmailId,EMP.ContactNumber,DEPT.DEPCode,DEPT.DepartmentName')
|
->select('EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,EMP.EmailId,EMP.ContactNumber,DEPT.DEPCode,DEPT.DepartmentName')
|
||||||
->join('t_departmentdetails DEPT', 'EMP.Departmentcode = DEPT.DEPCode')
|
->join('t_departmentdetails DEPT', 'EMP.Departmentcode = DEPT.DEPCode')
|
||||||
->where('EMP.IsActive ', 1);
|
->join('tbl_users U', 'EMP.EmpID = U.EmpID', 'left')
|
||||||
|
->where('EMP.IsActive ', 1)
|
||||||
|
->where('U.EmpID IS NULL');
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
return $query->getResult();
|
return $query->getResult();
|
||||||
}
|
}
|
||||||
@ -311,10 +315,9 @@ GROUP BY financial_year ";
|
|||||||
|
|
||||||
function findEmp($EmpId)
|
function findEmp($EmpId)
|
||||||
{
|
{
|
||||||
$builder = $this->db->table('tbl_users')
|
$builder = $this->db->table('t_employee_details')
|
||||||
->select('tbl_users.*, t_employee_details.*')
|
->select('t_employee_details.*')
|
||||||
->join('t_employee_details', 'tbl_users.EmpID = t_employee_details.EmpID' ,'left')
|
->where('t_employee_details.EmpID', $EmpId);
|
||||||
->where('tbl_users.EmpID', $EmpId);
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|
||||||
return $query->getResult();
|
return $query->getResult();
|
||||||
|
|||||||
@ -129,7 +129,7 @@
|
|||||||
<?php echo 'From Date'; ?>
|
<?php echo 'From Date'; ?>
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="date" name="from_date" id="max-date" class="form-control datepicker">
|
<input name="from_date" id="max-date" class="form-control datepicker">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -138,7 +138,7 @@
|
|||||||
<?php echo 'To Date'; ?>
|
<?php echo 'To Date'; ?>
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="date" name="to_date" id="min-date" class="form-control datepicker">
|
<input name="to_date" id="min-date" class="form-control datepicker">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
1431
app/Views/addEmployeenew.php
Normal file
1431
app/Views/addEmployeenew.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -81,22 +81,6 @@
|
|||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<label for="Department">Department</label>
|
|
||||||
<select class="form-control required" id="Department" name="Department">
|
|
||||||
<option value="0">Select Department</option>
|
|
||||||
<?php
|
|
||||||
if (!empty($departments)) {
|
|
||||||
foreach ($departments as $dt) {
|
|
||||||
?>
|
|
||||||
<option value="<?php echo $dt->departmentId ?>"><?php echo $dt->departments ?></option>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row" style="margin-top:20px">
|
<div class="form-row" style="margin-top:20px">
|
||||||
|
|
||||||
@ -194,7 +178,6 @@
|
|||||||
$("#Designation").val(data.userInfo[0].Designation);
|
$("#Designation").val(data.userInfo[0].Designation);
|
||||||
$("#MailID").val(data.userInfo[0].EmailId);
|
$("#MailID").val(data.userInfo[0].EmailId);
|
||||||
$("#ContactNo").val(data.userInfo[0].ContactNumber);
|
$("#ContactNo").val(data.userInfo[0].ContactNumber);
|
||||||
$("#Department").val(data.userInfo[0].DepartmentName);
|
|
||||||
} else {
|
} else {
|
||||||
alert('Employee not found');
|
alert('Employee not found');
|
||||||
}
|
}
|
||||||
@ -210,7 +193,6 @@
|
|||||||
$("#Designation").val('');
|
$("#Designation").val('');
|
||||||
$("#MailID").val('');
|
$("#MailID").val('');
|
||||||
$("#ContactNo").val('');
|
$("#ContactNo").val('');
|
||||||
$("#Department").val('');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -218,20 +200,17 @@
|
|||||||
$('#addPop').click(function() {
|
$('#addPop').click(function() {
|
||||||
if ($('#distriList option:selected').val() != null) {
|
if ($('#distriList option:selected').val() != null) {
|
||||||
if ($('#distriList option:selected').val() == 0) {
|
if ($('#distriList option:selected').val() == 0) {
|
||||||
alert('please select Department');
|
|
||||||
} else {
|
} else {
|
||||||
var tempSelect = $('#distriList option:selected').val();
|
var tempSelect = $('#distriList option:selected').val();
|
||||||
var tempText = $('#distriList option:selected').text();
|
var tempText = $('#distriList option:selected').text();
|
||||||
var o = new Option(tempText, tempSelect);
|
var o = new Option(tempText, tempSelect);
|
||||||
var hidval = tempSelect;
|
var hidval = tempSelect;
|
||||||
var orgVal = $('#txtSelectedDepartment').val();
|
|
||||||
var Selectedval = ''
|
var Selectedval = ''
|
||||||
if (orgVal != '') {
|
if (orgVal != '') {
|
||||||
Selectedval = orgVal + ':' + hidval;
|
Selectedval = orgVal + ':' + hidval;
|
||||||
} else {
|
} else {
|
||||||
Selectedval = hidval
|
Selectedval = hidval
|
||||||
}
|
}
|
||||||
$('#txtSelectedDepartment').val(Selectedval);
|
|
||||||
$(o).html(tempText);
|
$(o).html(tempText);
|
||||||
$("#selectDistriList").append(o);
|
$("#selectDistriList").append(o);
|
||||||
$('#distriList option:selected').remove();
|
$('#distriList option:selected').remove();
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
|
||||||
$("#loan_issued_date").datepicker({
|
$("#loan_issued_date").datepicker({
|
||||||
@ -19,55 +19,44 @@ $(document).ready(function() {
|
|||||||
changeYear: true,
|
changeYear: true,
|
||||||
yearRange: '-100:+1'
|
yearRange: '-100:+1'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.num {
|
.num {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<div class="content-page">
|
||||||
<div class="content-wrapper">
|
<div class="content">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Start Content-->
|
||||||
<section class="content-header">
|
<div class="container-fluid">
|
||||||
<center><b>
|
<!-- start page title -->
|
||||||
<h3 class="box-title">Add Employee Pay</h3>
|
<div class="row" style="margin-bottom: 10px;">
|
||||||
</b></center>
|
<div class="col-6">
|
||||||
</section>
|
<div class="page-title-box page-title-box-alt">
|
||||||
|
<h4 class="page-title">Create Loan</h4>
|
||||||
<section class="content">
|
|
||||||
<div style="text-align:right;">
|
|
||||||
<a href="<?php echo base_url() ?>emppayListings" class="btn btn-success" value="Back" />Back</a>
|
|
||||||
</div>
|
</div>
|
||||||
<br>
|
</div>
|
||||||
|
<div class="col-6 text-right">
|
||||||
|
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>emppayListings"><span class="bold">Back</span></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- end page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- left column -->
|
<div class="col-12">
|
||||||
<div class="col-md-12">
|
<div class="card">
|
||||||
<!-- general form elements -->
|
<div class="card-body">
|
||||||
|
<h4 class="header-title">Loan Details</h4>
|
||||||
<div class="box box-success">
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
<!-- form start -->
|
<div class="p-2">
|
||||||
|
<form role="form" id="addemppaydate" action="<?php echo base_url() ?>emppaydate/addNewemppay" method="post" name="addform">
|
||||||
<form role="form" id="addemppaydate" action="<?php echo base_url() ?>emppaydate/addNewemppay"
|
|
||||||
method="post" name="addform">
|
|
||||||
|
|
||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
|
<!-- Supplier Information -->
|
||||||
|
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
|
||||||
<legend>Loan Details</legend>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span for="EmpID">Employee ID</span>
|
<span for="EmpID">Employee ID</span>
|
||||||
@ -75,30 +64,25 @@ $(document).ready(function() {
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$Employee = array("-1"=>'Select Employee');
|
$Employee = array("-1" => 'Select Employee');
|
||||||
|
|
||||||
if(!empty($empdetails)){
|
|
||||||
foreach($empdetails as $emp){
|
|
||||||
$EmpID=$emp->EmpID;
|
|
||||||
$Employee+= array($EmpID => $emp->EmpID . "-" . $emp->FirstName);
|
|
||||||
|
|
||||||
|
if (!empty($empdetails)) {
|
||||||
|
foreach ($empdetails as $emp) {
|
||||||
|
$EmpID = $emp->EmpID;
|
||||||
|
$Employee += array($EmpID => $emp->EmpID . "-" . $emp->FirstName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$js = array('id'=> 'emp');
|
$js = array('id' => 'emp');
|
||||||
echo form_dropdown('EmpID', $Employee,set_value('EmpID'),'class="form-control"',$js);
|
echo form_dropdown('EmpID', $Employee, set_value('EmpID'), 'class="form-control"', $js);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
|
|
||||||
<span for="Pay_Data_ID">Loan Amount</span>
|
<span for="Pay_Data_ID">Loan Amount</span>
|
||||||
<input type="text" class="form-control num" id="Loan_Amount"
|
<input type="text" class="form-control num" id="Loan_Amount"
|
||||||
name="Loan_Amount" value="0.00" pattern="([0-9]{1,7}([.][0-9]{1,2})?)"
|
name="Loan_Amount" value="0.00" pattern="([0-9]{1,7}([.][0-9]{1,2})?)"
|
||||||
@ -106,10 +90,6 @@ $(document).ready(function() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -119,8 +99,6 @@ $(document).ready(function() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -131,6 +109,8 @@ $(document).ready(function() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -161,61 +141,68 @@ $(document).ready(function() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<input type="hidden" id="remaining_due" name="remaining_due" value="0">
|
<input type="hidden" id="remaining_due" name="remaining_due" value="0">
|
||||||
<input type="hidden" id="paid_due" name="paid_due" value="0">
|
<input type="hidden" id="paid_due" name="paid_due" value="0">
|
||||||
</div>
|
</div>
|
||||||
<div class="box-footer" style="text-align:right">
|
|
||||||
<input type="submit" class="btn btn-success" value="Submit"
|
|
||||||
onmouseover="finalCheck();" />
|
|
||||||
<input type="reset" class="btn btn-success" value="Reset" />
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-12 text-right">
|
||||||
|
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
|
||||||
|
<input type="submit" onmouseover="finalCheck();" value="Submit" class="btn btn-success">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
$listErrors = session()->getFlashdata('listErrors');
|
||||||
|
if ($listErrors) {
|
||||||
|
?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="alert alert-danger alert-dismissable">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<?php echo session()->getFlashdata('listErrors'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div><!-- /.box-body -->
|
|
||||||
|
|
||||||
|
|
||||||
</form><!-- form closed -->
|
|
||||||
|
|
||||||
|
|
||||||
</div><!-- -->
|
|
||||||
</div><!-- -->
|
|
||||||
<div class="col-md-4">
|
|
||||||
<?php
|
<?php
|
||||||
helper('form');
|
helper('form');
|
||||||
$error = session()->getFlashdata('error');
|
$error = session()->getFlashdata('error');
|
||||||
if($error)
|
if ($error) {
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-danger alert-dismissable">
|
<div class="alert alert-danger alert-dismissable">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<?php echo session()->getFlashdata('error'); ?>
|
<?php echo session()->getFlashdata('error'); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$success = session()->getFlashdata('success');
|
$success = session()->getFlashdata('success');
|
||||||
if($success)
|
if ($success) {
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-success alert-dismissable">
|
<div class="alert alert-success alert-dismissable">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<?php echo session()->getFlashdata('success'); ?>
|
<?php echo session()->getFlashdata('success'); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<!-- end row -->
|
||||||
|
</div>
|
||||||
|
</div> <!-- end card -->
|
||||||
|
</div><!-- end col -->
|
||||||
|
</div>
|
||||||
|
<!-- end row -->
|
||||||
|
</div> <!-- container -->
|
||||||
|
</div> <!-- content -->
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> <!-- first row closed-->
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!--content-wrapper closed-->
|
<!--content-wrapper closed-->
|
||||||
<script src="<?php echo base_url(); ?>public/assets/js/addUser.js" type="text/javascript"></script>
|
<script src="<?php echo base_url(); ?>public/assets/js/addUser.js" type="text/javascript"></script>
|
||||||
<script>
|
<script>
|
||||||
function calculalteHRA() {
|
function calculalteHRA() {
|
||||||
//var empid=document.getElementById('emp').value;
|
//var empid=document.getElementById('emp').value;
|
||||||
//alert(empid);
|
//alert(empid);
|
||||||
var Totalsalary = document.getElementById('Total_salary').value;
|
var Totalsalary = document.getElementById('Total_salary').value;
|
||||||
@ -233,11 +220,11 @@ function calculalteHRA() {
|
|||||||
document.getElementById('Basic_Pay').value = basic;
|
document.getElementById('Basic_Pay').value = basic;
|
||||||
document.getElementById('HRA_Amount').value = temp;
|
document.getElementById('HRA_Amount').value = temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function duecalculation() {
|
function duecalculation() {
|
||||||
var totaldue = 0;
|
var totaldue = 0;
|
||||||
var loan = document.getElementById('Loan_Amount').value;
|
var loan = document.getElementById('Loan_Amount').value;
|
||||||
var due = document.getElementById('monthly_due').value;
|
var due = document.getElementById('monthly_due').value;
|
||||||
@ -268,9 +255,9 @@ function duecalculation() {
|
|||||||
dateCalulation();
|
dateCalulation();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function dateCalulation() {
|
function dateCalulation() {
|
||||||
//alert('j');
|
//alert('j');
|
||||||
var loanamount = document.getElementById('Loan_Amount').value;
|
var loanamount = document.getElementById('Loan_Amount').value;
|
||||||
if (loanamount == 0.00 || loanamount == "") {
|
if (loanamount == 0.00 || loanamount == "") {
|
||||||
@ -287,9 +274,9 @@ function dateCalulation() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function finalCheck() {
|
function finalCheck() {
|
||||||
var loanamount = document.getElementById('Loan_Amount').value;
|
var loanamount = document.getElementById('Loan_Amount').value;
|
||||||
if (loanamount != "" && loanamount != 0.00) {
|
if (loanamount != "" && loanamount != 0.00) {
|
||||||
var idate = document.getElementById('loan_issued_date').value;
|
var idate = document.getElementById('loan_issued_date').value;
|
||||||
@ -299,5 +286,5 @@ function finalCheck() {
|
|||||||
alert("Enter All Loan Information Correctly...!");
|
alert("Enter All Loan Information Correctly...!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -2309,7 +2309,6 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
$attributes = array('class' => 'form-label-left CreatealterPO ', 'name' => 'CreatealterPO', 'id' => 'CreatealterPO');
|
$attributes = array('class' => 'form-label-left CreatealterPO ', 'name' => 'CreatealterPO', 'id' => 'CreatealterPO');
|
||||||
|
|
||||||
echo form_open(base_url() . '/purchaseorder/addalterPO/', $attributes); ?>
|
echo form_open(base_url() . '/purchaseorder/addalterPO/', $attributes); ?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -2559,7 +2558,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<label>Purchase Order Date</label>
|
<label>Purchase Order Date</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'PODate', 'value' => set_value('PODate', $CurrentDate), 'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 'onkeypress' => 'return false;');
|
$formattedDate = $dt->format('Y-m-d');
|
||||||
|
$data = array('type' => 'date', 'name' => 'PODate', 'value' => set_value('PODate', $formattedDate), 'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 'onkeypress' => 'return false;');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@ -2787,7 +2787,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<div class="modal-body" style="padding:0px;">
|
<div class="modal-body" style="padding:0px;">
|
||||||
<!-- <div class="col-md-4 pad"><strong>Select Item Code</strong>
|
<!-- <div class="col-md-4 pad"><strong>Select Item Code</strong>
|
||||||
<select id="emergencyitemcode" name="emergencyitemcode" class = "form-control select2">
|
<select id="emergencyitemcode" name="emergencyitemcode" class = "form-control select2">
|
||||||
<!-- <option value="1"> select material code</option>
|
<!-- <option value="1"> select material code</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</div>-->
|
</div>-->
|
||||||
@ -2845,7 +2845,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
|
|
||||||
<label for="images">Select file<br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
<label for="images">Select file<br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
|
|
||||||
<!-- <legend>Multiple File</legend> -->
|
<!-- <legend>Multiple File</legend> -->
|
||||||
@ -2872,16 +2872,16 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
|
|
||||||
<!--<thead>
|
<!--<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>MaterialCode1</th>
|
<th>MaterialCode1</th>
|
||||||
<th>DeliveryChallanDate</th>
|
<th>DeliveryChallanDate</th>
|
||||||
<th>DeliveryChallanNo</th>
|
<th>DeliveryChallanNo</th>
|
||||||
<th>VehicleNo</th>
|
<th>VehicleNo</th>
|
||||||
<th>CourierNo</th>
|
<th>CourierNo</th>
|
||||||
<th>Quantity12</th>
|
<th>Quantity12</th>
|
||||||
<th>File</th>
|
<th>File</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>-->
|
</thead>-->
|
||||||
|
|
||||||
<tbody id="specialappend">
|
<tbody id="specialappend">
|
||||||
|
|
||||||
@ -2907,7 +2907,6 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<!-- </form> -->
|
<!-- </form> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="servicemodel" class="modal fade" data-backdrop-limit="1" role="dialog" aria-labelledby="myModalLabel">
|
<div id="servicemodel" class="modal fade" data-backdrop-limit="1" role="dialog" aria-labelledby="myModalLabel">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
|
|
||||||
@ -2924,7 +2923,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<!-- <div class="col-md-4">
|
<!-- <div class="col-md-4">
|
||||||
<input type = "file" size = "20" input accept=".docx,.pdx,.doc.JPG,.PNG,.jpg" id="images1" name="images1" onChange="sfilecheck();"/>
|
<input type = "file" size = "20" input accept=".docx,.pdx,.doc.JPG,.PNG,.jpg" id="images1" name="images1" onChange="sfilecheck();"/>
|
||||||
<label for="images">Select Company file<br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
<label for="images">Select Company file<br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
@ -3102,9 +3101,9 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<h4>Edit Service Purchase Order Item </h4>
|
<h4>Edit Service Purchase Order Item </h4>
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div>
|
||||||
<div align="left">
|
<div class="modal-body p-4">
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Req No<span class="badge mandatory">*</span></label>
|
<label>Req No<span class="badge mandatory">*</span></label>
|
||||||
<div>
|
<div>
|
||||||
@ -3146,7 +3145,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Item Code<span class="badge mandatory">*</span></label>
|
<label>Item Code<span class="badge mandatory">*</span></label>
|
||||||
<div>
|
<div>
|
||||||
@ -3242,7 +3241,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="col-md-12">
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@ -3278,8 +3277,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12" style="padding:0px;">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-6" align="right">
|
<div class="col-md-6" align="right">
|
||||||
|
|
||||||
CGST In %
|
CGST In %
|
||||||
@ -3307,7 +3305,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="row">
|
||||||
<div class="col-md-6" align="right">
|
<div class="col-md-6" align="right">
|
||||||
|
|
||||||
SGST In %
|
SGST In %
|
||||||
@ -3335,7 +3333,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="row">
|
||||||
<div class="col-md-6" align="right">
|
<div class="col-md-6" align="right">
|
||||||
|
|
||||||
IGST In %
|
IGST In %
|
||||||
@ -3364,8 +3362,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="row">
|
||||||
<div class="col-md-5 col-md-offset-4" align="right">
|
<div class="col-md-9" align="right">
|
||||||
<label>Other Allowances <?php echo "($INRSYM)" ?></label>
|
<label>Other Allowances <?php echo "($INRSYM)" ?></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@ -3377,8 +3375,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="row">
|
||||||
<div class="col-md-5 col-md-offset-4" align="right">
|
<div class="col-md-9" align="right">
|
||||||
<label> <?php echo "Total Order Amount In ($INRSYM)"; ?></label>
|
<label> <?php echo "Total Order Amount In ($INRSYM)"; ?></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@ -3390,17 +3388,21 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12" style="padding: 0px 30px 10px 30px;">
|
<div class="row" style="padding: 0px 30px 10px 30px;">
|
||||||
|
<div class="col-md-12">
|
||||||
<label>Service Description<span class="badge mandatory">*</span></label> <?php
|
<label>Service Description<span class="badge mandatory">*</span></label> <?php
|
||||||
$data = array('name' => 'EdittxtSpcialInstructionSingle', 'value' => set_value('EdittxtSpcialInstructionSingle'), 'id' => 'EdittxtSpcialInstructionSingle', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
|
$data = array('name' => 'EdittxtSpcialInstructionSingle', 'value' => set_value('EdittxtSpcialInstructionSingle'), 'id' => 'EdittxtSpcialInstructionSingle', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
|
||||||
echo form_textarea($data); ?>
|
echo form_textarea($data); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<input type="hidden" id="hiddenServiceuserid" name="hiddenServiceuserid" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12 text-right">
|
||||||
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
|
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||||
<a class="btn btn-success font EditService" ID="Edit"> <span class="bold">Update Service</span></a>
|
<a class="btn btn-success font EditService" ID="Edit"> <span class="bold">Update Service</span></a>
|
||||||
</div>
|
</div>
|
||||||
@ -3416,14 +3418,14 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<!-- Modal content-->
|
<!-- Modal content-->
|
||||||
<form>
|
<form>
|
||||||
<div class="modal-content" style="width:1150px;">
|
<div class="modal-content" style="width:1000px;">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<center>
|
<center>
|
||||||
<h4>Edit Revenue Purchase Order Line Item </h4>
|
<h4>Edit Revenue Purchase Order Line Item </h4>
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div>
|
||||||
<div align="left">
|
<div class="modal-body p-4">
|
||||||
<div class="col-md-12">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label>Req No<span class="badge mandatory">*</span></label>
|
<label>Req No<span class="badge mandatory">*</span></label>
|
||||||
<div>
|
<div>
|
||||||
@ -3464,7 +3466,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="row">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<label>Item Code<span class="badge mandatory">*</span></label>
|
<label>Item Code<span class="badge mandatory">*</span></label>
|
||||||
<div>
|
<div>
|
||||||
@ -3486,7 +3488,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-1">
|
||||||
<label>UOM</label>
|
<label>UOM</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
@ -3495,7 +3497,6 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6" style="padding: 0px;">
|
|
||||||
<div class="col-md-2" style="padding-right:0px;">
|
<div class="col-md-2" style="padding-right:0px;">
|
||||||
<label>Quantity<span class="badge mandatory">*</span></label>
|
<label>Quantity<span class="badge mandatory">*</span></label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -3514,7 +3515,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-1">
|
||||||
<label>Per</label> <?php
|
<label>Per</label> <?php
|
||||||
$data = array('name' => 'editrevenueEmergPer', 'value' => set_value('editrevenueEmergPer'), 'id' => 'editrevenueEmergPer', 'class' => 'form-control');
|
$data = array('name' => 'editrevenueEmergPer', 'value' => set_value('editrevenueEmergPer'), 'id' => 'editrevenueEmergPer', 'class' => 'form-control');
|
||||||
echo form_input($data); ?>
|
echo form_input($data); ?>
|
||||||
@ -3529,8 +3530,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="row">
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-4"></div>
|
<div class="col-md-4"></div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label>Discount Type </label>
|
<label>Discount Type </label>
|
||||||
@ -3572,7 +3572,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12" style="text-align:left;">
|
<div class="row" style="text-align:left;">
|
||||||
<div class="col-md-4"></div>
|
<div class="col-md-4"></div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label>Packaging Type </label>
|
<label>Packaging Type </label>
|
||||||
@ -3614,7 +3614,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="row">
|
||||||
<div class="col-md-4"></div>
|
<div class="col-md-4"></div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label>Freight Type </label>
|
<label>Freight Type </label>
|
||||||
@ -3670,7 +3670,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
@ -3692,8 +3692,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row" id="SGSTEditModel">
|
||||||
<div class="col-md-12" id="SGSTEditModel">
|
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
@ -3715,7 +3714,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12" id="IGSTEditModel">
|
<div class="row" id="IGSTEditModel">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
@ -3737,7 +3736,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
@ -3750,8 +3749,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
@ -3764,24 +3762,24 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
<label><?php echo "Revenue Description"; ?></label>
|
<label><?php echo "Revenue Description"; ?></label>
|
||||||
<div class="form-group">
|
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'Edit_Service_Description', 'value' => set_value('Edit_Service_Description'), 'id' => 'Edit_Service_Description', 'class' => 'form-control', 'rows' => '2', 'cols' => '100');
|
$data = array('name' => 'Edit_Service_Description', 'value' => set_value('Edit_Service_Description'), 'id' => 'Edit_Service_Description', 'class' => 'form-control', 'rows' => '2', 'cols' => '100');
|
||||||
echo form_textarea($data);;
|
echo form_textarea($data);;
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-offset-9 col-md-3">
|
|
||||||
<a class="btn btn-secondary waves-effect" data-dismiss="modal" value="Cancel">Cancel</a>
|
|
||||||
<a class="btn btn-success EditRevenue" ID="EditRevenue"> <span class="bold">Edit Revenue</span></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<input type="hidden" id="hiddenRevenueuserid" name="hiddenRevenueuserid" />
|
||||||
|
|
||||||
<!-- footer for revenue po -->
|
<!-- footer for revenue po -->
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
<div class="col-md-12 text-right">
|
||||||
|
<a class="btn btn-secondary waves-effect" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||||
|
<a class="btn btn-success EditRevenue" ID="EditRevenue"> <span class="bold">Edit Revenue</span></a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -3829,7 +3827,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-1">
|
||||||
<label>UOM</label>
|
<label>UOM</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
@ -3838,8 +3836,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6" style="padding:0px;display: flex;">
|
<div class="col-md-2">
|
||||||
<div class="col-md-3">
|
|
||||||
<label>Quantity<span class="badge mandatory">*</span></label>
|
<label>Quantity<span class="badge mandatory">*</span></label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
@ -3848,7 +3845,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-2">
|
||||||
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge mandatory"></label>
|
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge mandatory"></label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
@ -3857,12 +3854,12 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-1">
|
||||||
<label>Per</label> <?php
|
<label>Per</label> <?php
|
||||||
$data = array('name' => 'addrevenueEmergPer', 'value' => set_value('addrevenueEmergPer'), 'id' => 'addrevenueEmergPer', 'class' => 'form-control');
|
$data = array('name' => 'addrevenueEmergPer', 'value' => set_value('addrevenueEmergPer'), 'id' => 'addrevenueEmergPer', 'class' => 'form-control');
|
||||||
echo form_input($data); ?>
|
echo form_input($data); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-2">
|
||||||
<label><?php echo "Basic Amt ($INRSYM)"; ?></label>
|
<label><?php echo "Basic Amt ($INRSYM)"; ?></label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
@ -3872,7 +3869,6 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
@ -4106,12 +4102,10 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<label><?php echo "Revenue Description"; ?></label>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
<label><?php echo "Revenue Description"; ?></label>
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'Add_Service_Description', 'value' => set_value('Add_Service_Description'), 'id' => 'Add_Service_Description', 'class' => 'form-control', 'rows' => '2', 'cols' => '100');
|
$data = array('name' => 'Add_Service_Description', 'value' => set_value('Add_Service_Description'), 'id' => 'Add_Service_Description', 'class' => 'form-control', 'rows' => '2', 'cols' => '100');
|
||||||
echo form_textarea($data);;
|
echo form_textarea($data);;
|
||||||
@ -4412,7 +4406,6 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
|
|
||||||
<!-- model for import PO -->
|
<!-- model for import PO -->
|
||||||
|
|
||||||
<div class="modal fade" id="IMPORT" role="dialog">
|
<div class="modal fade" id="IMPORT" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<!-- Modal content-->
|
<!-- Modal content-->
|
||||||
@ -5378,7 +5371,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<table id="serviceTax" class="table table-bordered table-hover" style="background-color:#fff;">
|
<table id="serviceTax" class="table table-bordered table-hover" style="background-color:#fff;">
|
||||||
<thead >
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>SNo</th>
|
<th>SNo</th>
|
||||||
<th>Requisition No</th>
|
<th>Requisition No</th>
|
||||||
@ -5593,7 +5586,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- </section> -->
|
<!-- </section> -->
|
||||||
<script type="text/html" id="RevenueList">
|
<!-- <script type="text/html" id="RevenueList">
|
||||||
<tr id="<%=index%>">
|
<tr id="<%=index%>">
|
||||||
<td align="left"><%=index%></td>
|
<td align="left"><%=index%></td>
|
||||||
<td align="left"><%=ReqNo%></td>
|
<td align="left"><%=ReqNo%></td>
|
||||||
@ -5612,7 +5605,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</script>
|
</script> -->
|
||||||
<script>
|
<script>
|
||||||
var index = '1';
|
var index = '1';
|
||||||
var userid = '';
|
var userid = '';
|
||||||
@ -5700,7 +5693,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
populateValueMainFormForRevenue();
|
populateValueMainFormForRevenue();
|
||||||
|
|
||||||
|
|
||||||
if(index -1 == 0){
|
if (index - 1 == 0) {
|
||||||
$('#ServiceAppend').empty();
|
$('#ServiceAppend').empty();
|
||||||
}
|
}
|
||||||
index = parseInt(index) + 1;
|
index = parseInt(index) + 1;
|
||||||
@ -5708,7 +5701,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
var template = jQuery("#RevenueList").html();
|
var template = jQuery("#RevenueList").html();
|
||||||
|
|
||||||
var html = `
|
var html = `
|
||||||
<tr>
|
<tr id="${temp}">
|
||||||
<td>${temp}</td>
|
<td>${temp}</td>
|
||||||
<td>${Reqnumber}</td>
|
<td>${Reqnumber}</td>
|
||||||
<td>${materialCode}</td>
|
<td>${materialCode}</td>
|
||||||
@ -5719,11 +5712,17 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<td>${basicval}</td>
|
<td>${basicval}</td>
|
||||||
<td>${TotalTaxValue}</td>
|
<td>${TotalTaxValue}</td>
|
||||||
<td>${TotalOrderValue}</td>
|
<td>${TotalOrderValue}</td>
|
||||||
|
<td>
|
||||||
|
<a data-target='#EDITREVENUE' data-id="${temp}" data-index="${index}" data-userid="${temp}" data-toggle="modal" href="#EDITREVENUE">
|
||||||
|
<i class="ri-pencil-fill"></i>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
<a href='#' onclick="DeleteRevenueRow('${temp}')" class="link" data-id="${temp}" data-index="${index}" data-userid="${temp}" id="Del">
|
||||||
|
<span class="ri-delete-bin-7-fill"></span>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#RevenueAppend').append(html);
|
$('#RevenueAppend').append(html);
|
||||||
// $('#serviceTax').row.add($(html)).draw();
|
// $('#serviceTax').row.add($(html)).draw();
|
||||||
|
|
||||||
@ -5766,6 +5765,9 @@ if (!empty($INRSYMBOL)) {
|
|||||||
addHidden(theForm, "RevenueIgst" + temp, Igst);
|
addHidden(theForm, "RevenueIgst" + temp, Igst);
|
||||||
addHidden(theForm, "RevenueAfterIgst" + temp, AfterIgst);
|
addHidden(theForm, "RevenueAfterIgst" + temp, AfterIgst);
|
||||||
$('#txtRowCount1').val(temp);
|
$('#txtRowCount1').val(temp);
|
||||||
|
|
||||||
|
$('#hiddenRevenueuserid').val(temp);
|
||||||
|
|
||||||
clearRevenueModalFields();
|
clearRevenueModalFields();
|
||||||
$('#REVENUE').modal('hide');
|
$('#REVENUE').modal('hide');
|
||||||
|
|
||||||
@ -5923,6 +5925,10 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
$('#Deliverydt').attr({
|
||||||
|
'data-provide': 'datepicker',
|
||||||
|
'data-date-format': 'dd-mm-yyyy'
|
||||||
|
});
|
||||||
|
|
||||||
// Initialize the DataTable
|
// Initialize the DataTable
|
||||||
var table = $('#serviceTax').DataTable({
|
var table = $('#serviceTax').DataTable({
|
||||||
@ -6344,6 +6350,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
if (validateServiceTax()) {
|
if (validateServiceTax()) {
|
||||||
// alert('inside Addservice');
|
// alert('inside Addservice');
|
||||||
var temp = index;
|
var temp = index;
|
||||||
|
console.log('temp = ' + temp);
|
||||||
var Reqnumber = $('#purpose').val();
|
var Reqnumber = $('#purpose').val();
|
||||||
var departmentName = $('#DepartmentName').val();
|
var departmentName = $('#DepartmentName').val();
|
||||||
var AvilBudget = $('#AvalBuget').val();
|
var AvilBudget = $('#AvalBuget').val();
|
||||||
@ -6389,7 +6396,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
populateValueMainFormForServiceTax();
|
populateValueMainFormForServiceTax();
|
||||||
|
|
||||||
if(index - 1 == 0){
|
if (index - 1 == 0) {
|
||||||
$('#ServiceAppend').empty();
|
$('#ServiceAppend').empty();
|
||||||
$('#RevenueAppend').empty();
|
$('#RevenueAppend').empty();
|
||||||
}
|
}
|
||||||
@ -6398,7 +6405,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
var template = jQuery("#ServiceList").html();
|
var template = jQuery("#ServiceList").html();
|
||||||
|
|
||||||
var html = `
|
var html = `
|
||||||
<tr>
|
<tr id="${temp}">
|
||||||
<td>${temp}</td>
|
<td>${temp}</td>
|
||||||
<td>${Reqnumber}</td>
|
<td>${Reqnumber}</td>
|
||||||
<td>${materialCode}</td>
|
<td>${materialCode}</td>
|
||||||
@ -6409,10 +6416,18 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<td>${basicval}</td>
|
<td>${basicval}</td>
|
||||||
<td>${TotalTaxValue}</td>
|
<td>${TotalTaxValue}</td>
|
||||||
<td>${TotalOrderValue}</td>
|
<td>${TotalOrderValue}</td>
|
||||||
|
<td>
|
||||||
|
<a data-target='#EDITSERVICE' data-id="${temp}" data-index="${index}" data-userid="${temp}" data-toggle="modal" href="#EDITSERVICE">
|
||||||
|
<i class="ri-pencil-fill"></i>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
<a href='#' onclick="DeleteRow('${temp}')" class="link" data-id="${temp}" data-index="${index}" data-userid="${temp}" id="Del">
|
||||||
|
<span class="ri-delete-bin-7-fill"></span>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
`;
|
`;
|
||||||
console.log("index");
|
console.log("index = " + index);
|
||||||
console.log(index);
|
|
||||||
|
|
||||||
$('#ServiceAppend').append(html);
|
$('#ServiceAppend').append(html);
|
||||||
|
|
||||||
@ -6447,6 +6462,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
addHidden(theForm, "FrequencySchedule" + temp, FrequencySchedule);
|
addHidden(theForm, "FrequencySchedule" + temp, FrequencySchedule);
|
||||||
|
|
||||||
$('#txtRowCount').val(temp);
|
$('#txtRowCount').val(temp);
|
||||||
|
$('#hiddenServiceuserid').val(temp);
|
||||||
$('#SERVICE').modal('hide');
|
$('#SERVICE').modal('hide');
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -6562,22 +6578,25 @@ if (!empty($INRSYMBOL)) {
|
|||||||
/**
|
/**
|
||||||
* This function is used to edit the service seleted po
|
* This function is used to edit the service seleted po
|
||||||
*/
|
*/
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
var EditGetMaterialData;
|
var EditGetMaterialData;
|
||||||
|
|
||||||
$("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
$("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
||||||
tinyMCE.triggerSave();
|
tinyMCE.triggerSave();
|
||||||
|
var userid = $(e.relatedTarget).data('userid');
|
||||||
EditGetMaterialData = '';
|
console.log("userid:", userid);
|
||||||
|
console.log($('#Reqnumber' + userid).val());
|
||||||
userid = $(e.relatedTarget).data('userid');
|
|
||||||
var tr = document.getElementById(userid);
|
var tr = document.getElementById(userid);
|
||||||
var cellval = tr.cells;
|
var cellval = tr.cells;
|
||||||
var id = $('#Reqnumber' + userid).val();
|
|
||||||
|
|
||||||
|
// Ensure the following elements have the correct IDs
|
||||||
|
|
||||||
$('#EditReqNo').val($('#Reqnumber' + userid).val());
|
$('#EditReqNo').val($('#Reqnumber' + userid).val());
|
||||||
$('#EditdeptName').val($('#departmentName' + userid).val());
|
$('#EditdeptName').val($('#departmentName' + userid).val());
|
||||||
$('#EditCostCenter').val($('#costCode' + userid).val());
|
$('#EditCostCenter').val($('#costCode' + userid).val());
|
||||||
|
$('#EditAvlBudAmt').val($('#AvilBudget' + userid).val() || 0);
|
||||||
$('#EditAvlBudAmt').val($('#AvilBudget' + userid).val() ? $('#AvilBudget' + userid).val() : 0);
|
|
||||||
|
|
||||||
$('#EditItemName').val($('#materialName' + userid).val());
|
$('#EditItemName').val($('#materialName' + userid).val());
|
||||||
$('#EditUOM').val($('#uom' + userid).val());
|
$('#EditUOM').val($('#uom' + userid).val());
|
||||||
@ -6591,92 +6610,33 @@ if (!empty($INRSYMBOL)) {
|
|||||||
$('#EditCgst').val($('#Cgst' + userid).val());
|
$('#EditCgst').val($('#Cgst' + userid).val());
|
||||||
$('#EditSgst').val($('#Sgst' + userid).val());
|
$('#EditSgst').val($('#Sgst' + userid).val());
|
||||||
$('#EditIgst').val($('#Igst' + userid).val());
|
$('#EditIgst').val($('#Igst' + userid).val());
|
||||||
//$('#EditFrequencyNo').val($('#FrequencyValue'+userid).val());
|
|
||||||
//$('#EditFrequency').val($('#Frequency'+userid).val());
|
|
||||||
$('#EditTotalOrderValue').val(cellval[9].innerHTML);
|
$('#EditTotalOrderValue').val(cellval[9].innerHTML);
|
||||||
$('#EditOtherAllowances').val($('#OtherAmt' + userid).val());
|
$('#EditOtherAllowances').val($('#OtherAmt' + userid).val());
|
||||||
|
|
||||||
tinyMCE.get('EdittxtSpcialInstructionSingle').setContent($('#ItemServiceDescription' + userid).val());
|
tinyMCE.get('EdittxtSpcialInstructionSingle').setContent($('#ItemServiceDescription' + userid).val());
|
||||||
if ($('#FrequencySchedule' + userid).val() != 'Recurring') {
|
if ($('#FrequencySchedule' + userid).val() != 'Recurring') {
|
||||||
$('#EditFrequencyChange').val('One time');
|
$('#EditFrequencyChange').val('One time');
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('#EditFrequencyChange').val($('#FrequencySchedule' + userid).val());
|
$('#EditFrequencyChange').val($('#FrequencySchedule' + userid).val());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$("#EditMaterialCode").empty();
|
$("#EditMaterialCode").empty();
|
||||||
|
|
||||||
$("#EditMaterialCode").append($('<option></option>').val($('#materialCode' + userid).val()).html($('#materialCode' + userid).val() + "-" + $('#materialName' + userid).val()));
|
$("#EditMaterialCode").append($('<option></option>').val($('#materialCode' + userid).val()).html($('#materialCode' + userid).val() + "-" + $('#materialName' + userid).val()));
|
||||||
$.each(JSON.parse(materialData), function(index, value) {
|
|
||||||
|
|
||||||
|
if (typeof materialData !== 'undefined' && materialData !== null && materialData !== '') {
|
||||||
|
var parsedMaterialData = JSON.parse(materialData);
|
||||||
|
|
||||||
|
$.each(parsedMaterialData, function(index, value) {
|
||||||
|
// Assuming userid is defined somewhere in your code
|
||||||
if ($('#materialCode' + userid).val() != value.MaterialCode) {
|
if ($('#materialCode' + userid).val() != value.MaterialCode) {
|
||||||
|
|
||||||
$("#EditMaterialCode").append($('<option></option>').val(value.MaterialCode).html(value.MaterialCode + "-" + value.MaterialName));
|
$("#EditMaterialCode").append($('<option></option>').val(value.MaterialCode).html(value.MaterialCode + "-" + value.MaterialName));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
console.log("materialData is not defined or empty.");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*get Material list while editing
|
|
||||||
|
|
||||||
var EditPoType=$('#Reqnumber'+userid).val();
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
data:{input:EditPoType},
|
|
||||||
type:"POST",
|
|
||||||
url:"<?php echo base_url() ?>emergencypurchaseorder/getMaterialCode",
|
|
||||||
success:function(data) {
|
|
||||||
$('#content').loader('hide');
|
|
||||||
if(data)
|
|
||||||
{
|
|
||||||
EditGetMaterialData=data;
|
|
||||||
|
|
||||||
$("#EditMaterialCode").empty();
|
|
||||||
|
|
||||||
$("#EditMaterialCode").append( $('<option></option>').val($('#materialCode'+userid).val()).html($('#materialCode'+userid).val() + "-" + $('#materialName'+userid).val()) );
|
|
||||||
$.each(JSON.parse(data), function (index, value) {
|
|
||||||
|
|
||||||
|
|
||||||
if($('#materialCode'+userid).val() != value.MaterialCode)
|
|
||||||
{
|
|
||||||
|
|
||||||
$("#EditMaterialCode").append( $('<option></option>').val(value.MaterialCode).html(value.MaterialCode + "-" + value.MaterialName) );
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
});*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* edit emenergency service po validations
|
* edit emenergency service po validations
|
||||||
*/
|
*/
|
||||||
@ -6756,6 +6716,8 @@ $('#content').loader('hide');
|
|||||||
|
|
||||||
|
|
||||||
var basicval = $("#txtEditBasicValue").val();
|
var basicval = $("#txtEditBasicValue").val();
|
||||||
|
var userid = $("#hiddenServiceuserid").val();
|
||||||
|
|
||||||
|
|
||||||
var TotalTaxValue = calculateEditTaxValue();
|
var TotalTaxValue = calculateEditTaxValue();
|
||||||
|
|
||||||
@ -6795,6 +6757,8 @@ $('#content').loader('hide');
|
|||||||
|
|
||||||
populateValueMainFormForEditServiceTax();
|
populateValueMainFormForEditServiceTax();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
console.log("in else part...");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -6973,7 +6937,7 @@ $('#content').loader('hide');
|
|||||||
} else {
|
} else {
|
||||||
// Submit the form using AJAX
|
// Submit the form using AJAX
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"<?php echo base_url() ?>emergencypurchaseorder/addNewServicePurchaseOrder",
|
url: "<?php echo base_url() ?>emergencypurchaseorder/addNewServicePurchaseOrder",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: formData,
|
data: formData,
|
||||||
processData: false, // Prevent jQuery from automatically transforming the data into a query string
|
processData: false, // Prevent jQuery from automatically transforming the data into a query string
|
||||||
@ -7065,7 +7029,7 @@ $('#content').loader('hide');
|
|||||||
$('#txtDeletedRow1').val('');
|
$('#txtDeletedRow1').val('');
|
||||||
$('#SpcialInstruction').val('');
|
$('#SpcialInstruction').val('');
|
||||||
$('#txtDeliveryAddress').val('');
|
$('#txtDeliveryAddress').val('');
|
||||||
// window.location = "purchaseorderListing";
|
window.location = "purchaseorderListing";
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
// Handle errors
|
// Handle errors
|
||||||
@ -7217,11 +7181,9 @@ $('#content').loader('hide');
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
$(document).ready(function() {
|
||||||
$("#EDITREVENUE").on("shown.bs.modal", function(e) {
|
$("#EDITREVENUE").on("shown.bs.modal", function(e) {
|
||||||
|
var userid = $(e.relatedTarget).data('userid');
|
||||||
|
|
||||||
|
|
||||||
userid = $(e.relatedTarget).data('userid');
|
|
||||||
|
|
||||||
var CheckLocalInter = $('#CheckLocalInter' + userid).val();
|
var CheckLocalInter = $('#CheckLocalInter' + userid).val();
|
||||||
if (CheckLocalInter == "0") {
|
if (CheckLocalInter == "0") {
|
||||||
@ -7289,30 +7251,24 @@ $('#content').loader('hide');
|
|||||||
$("#EditRevenueMaterialCode").empty();
|
$("#EditRevenueMaterialCode").empty();
|
||||||
|
|
||||||
$("#EditRevenueMaterialCode").append($('<option></option>').val($('#materialCode' + userid).val()).html($('#materialCode' + userid).val() + "-" + $('#materialName' + userid).val()));
|
$("#EditRevenueMaterialCode").append($('<option></option>').val($('#materialCode' + userid).val()).html($('#materialCode' + userid).val() + "-" + $('#materialName' + userid).val()));
|
||||||
$.each(JSON.parse(materialData), function(index, value) {
|
if (typeof materialData !== 'undefined' && materialData !== null && materialData !== '') {
|
||||||
|
var parsedMaterialData = JSON.parse(materialData);
|
||||||
|
|
||||||
|
$.each(parsedMaterialData, function(index, value) {
|
||||||
if ($('#materialCode' + userid).val() != value.MaterialCode) {
|
if ($('#materialCode' + userid).val() != value.MaterialCode) {
|
||||||
|
|
||||||
$("#EditRevenueMaterialCode").append($('<option></option>').val(value.MaterialCode).html(value.MaterialCode + "-" + value.MaterialName));
|
$("#EditRevenueMaterialCode").append($('<option></option>').val(value.MaterialCode).html(value.MaterialCode + "-" + value.MaterialName));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
console.log("materialData is not defined or empty.");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$("#EditDiscountType").val($('#DisType' + userid).val());
|
$("#EditDiscountType").val($('#DisType' + userid).val());
|
||||||
$("#drpEditFreight").val($('#FreightType' + userid).val());
|
$("#drpEditFreight").val($('#FreightType' + userid).val());
|
||||||
$("#EditPackagingType").val($('#PackType' + userid).val())
|
$("#EditPackagingType").val($('#PackType' + userid).val())
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
$('#EditRevenueMaterialCode').change(function() {
|
$('#EditRevenueMaterialCode').change(function() {
|
||||||
|
|
||||||
@ -7387,7 +7343,7 @@ $('#content').loader('hide');
|
|||||||
var TotalOrderValue = $("#txtEditRevenueTotalOrderValue").val();
|
var TotalOrderValue = $("#txtEditRevenueTotalOrderValue").val();
|
||||||
var servicedescription = $("#Edit_Service_Description").val();
|
var servicedescription = $("#Edit_Service_Description").val();
|
||||||
var TotalTaxValue = calculateRevenueEditTaxValue();
|
var TotalTaxValue = calculateRevenueEditTaxValue();
|
||||||
|
var userid = $("#hiddenRevenueuserid").val();
|
||||||
|
|
||||||
var tr = document.getElementById(userid);
|
var tr = document.getElementById(userid);
|
||||||
var cellval = tr.cells;
|
var cellval = tr.cells;
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
<!-- <script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
||||||
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script> -->
|
||||||
<!-- <script src="<?php echo base_url() ?>public/assets/js/jquery.CongelarFilaColumna.js"></script> -->
|
<!-- <script src="<?php echo base_url() ?>public/assets/js/jquery.CongelarFilaColumna.js"></script> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
$datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||||
//echo $datefordropdown;
|
//echo $datefordropdown;
|
||||||
@ -466,7 +468,7 @@ $currentday = date('d');
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 text-right">
|
<div class="col-md-12 text-right">
|
||||||
<input type="button" class="btn btn-success" id="c" value="save"
|
<input type="button" class="btn btn-success" id="c" value="save"
|
||||||
onClick="getAllData();">
|
">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -488,13 +490,11 @@ $currentday = date('d');
|
|||||||
|
|
||||||
<!-- <script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script> -->
|
<!-- <script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script> -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#month").datepicker({
|
|
||||||
minViewMode: 1,
|
|
||||||
format: 'M-yyyy'
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
function getAllData() {
|
$(document).ready(function() {
|
||||||
|
// Click event for the button
|
||||||
|
$('#c').click(function() {
|
||||||
|
|
||||||
var s = findInvalidData();
|
var s = findInvalidData();
|
||||||
|
|
||||||
@ -519,7 +519,7 @@ $currentday = date('d');
|
|||||||
var currentdate = '01-' + currentmonth + '-' + currentyear;
|
var currentdate = '01-' + currentmonth + '-' + currentyear;
|
||||||
|
|
||||||
var totaldata = 0;
|
var totaldata = 0;
|
||||||
$('.content').loader('show');
|
// $('.content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: {
|
data: {
|
||||||
param1: alldata,
|
param1: alldata,
|
||||||
@ -532,7 +532,7 @@ $currentday = date('d');
|
|||||||
|
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
if (data) {
|
if (data) {
|
||||||
$('.content').loader('hide');
|
// $('.content').loader('hide');
|
||||||
alert(data);
|
alert(data);
|
||||||
//totaldata = totaldata + parseFloat(data);
|
//totaldata = totaldata + parseFloat(data);
|
||||||
//console.log(data);
|
//console.log(data);
|
||||||
@ -546,7 +546,7 @@ $currentday = date('d');
|
|||||||
} else {
|
} else {
|
||||||
alert('Plesae Provide Working Hrs and OT Hrs Correctly..!');
|
alert('Plesae Provide Working Hrs and OT Hrs Correctly..!');
|
||||||
}
|
}
|
||||||
}
|
}); });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@ -554,9 +554,9 @@ $currentday = date('d');
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
|
||||||
$("#attendance").CongelarFilaColumna({
|
// $("#attendance").CongelarFilaColumna({
|
||||||
lboHoverTr: true
|
// lboHoverTr: true
|
||||||
});
|
// });
|
||||||
$('html').bind('keypress', function(e) {
|
$('html').bind('keypress', function(e) {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,62 +1,21 @@
|
|||||||
<div class="content-wrapper">
|
<div class="content-page">
|
||||||
<!-- Content Header (Page header) -->
|
<div class="content">
|
||||||
<section class="content-header">
|
<!-- Start Content-->
|
||||||
<h1>
|
<div class="container-fluid">
|
||||||
Change Password
|
<!-- start page title -->
|
||||||
<small>Set new password for your account</small>
|
<div>
|
||||||
</h1>
|
|
||||||
</section>
|
|
||||||
<section class="content">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-6">
|
||||||
<!-- general form elements -->
|
<div class="page-title-box page-title-box-alt">
|
||||||
<div class="box box-success">
|
<h4 class="page-title"> Change Password
|
||||||
<div class="box-header">
|
<small>Set new password for your account</small></h4>
|
||||||
<h3 class="box-title">Enter Details</h3>
|
|
||||||
</div><!-- /.box-header -->
|
|
||||||
<!-- form start -->
|
|
||||||
<form role="form" action="<?php echo base_url() ?>changePassword" method="post">
|
|
||||||
<div class="box-body">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="inputPassword1">Old Password</label>
|
|
||||||
<input type="password" class="form-control" id="inputOldPassword" placeholder="Old password" name="oldPassword" maxlength="15" required>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="inputPassword1">New Password</label>
|
|
||||||
<input type="password" class="form-control" id="inputPassword1" placeholder="New password" name="newPassword" maxlength="15" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="inputPassword2">Confirm New Password</label>
|
|
||||||
<input type="password" class="form-control" id="inputPassword2" placeholder="Confirm new password" name="cNewPassword" maxlength="15" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div><!-- /.box-body -->
|
|
||||||
|
|
||||||
<div class="box-footer">
|
|
||||||
<input type="submit" class="btn btn-success" value="Submit" />
|
|
||||||
<input type="reset" class="btn btn-default" value="Reset" />
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<?php
|
<?php
|
||||||
helper('form');
|
helper('form');
|
||||||
$error = session()->getFlashdata('error');
|
$error = session()->getFlashdata('error');
|
||||||
if($error)
|
if ($error) {
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-danger alert-dismissable">
|
<div class="alert alert-danger alert-dismissable">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
||||||
@ -65,8 +24,7 @@
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php
|
<?php
|
||||||
$success = session()->getFlashdata('success');
|
$success = session()->getFlashdata('success');
|
||||||
if($success)
|
if ($success) {
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-success alert-dismissable">
|
<div class="alert alert-success alert-dismissable">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
||||||
@ -76,8 +34,7 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
$noMatch = session()->getFlashdata('nomatch');
|
$noMatch = session()->getFlashdata('nomatch');
|
||||||
if($noMatch)
|
if ($noMatch) {
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-warning alert-dismissable">
|
<div class="alert alert-warning alert-dismissable">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
||||||
@ -86,11 +43,54 @@
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-12">
|
||||||
<?php //echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true"><3E></button></div>'); ?>
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<form role="form" action="<?php echo base_url() ?>changePassword" method="post">
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="inputPassword1">Old Password</label>
|
||||||
|
<input type="password" class="form-control" id="inputOldPassword" placeholder="Old password" name="oldPassword" maxlength="15" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="inputPassword1">New Password</label>
|
||||||
|
<input type="password" class="form-control" id="inputPassword1" placeholder="New password" name="newPassword" maxlength="15" required>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="inputPassword2">Confirm New Password</label>
|
||||||
|
<input type="password" class="form-control" id="inputPassword2" placeholder="Confirm new password" name="cNewPassword" maxlength="15" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div><!-- /.box-body -->
|
||||||
|
|
||||||
|
<div class="box-footer">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 text-right">
|
||||||
|
<input type="reset" class="btn btn-default" style="background-color:red;color:white;" value="Reset" />
|
||||||
|
<input type="submit" class="btn btn-success" value="Submit" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div> <!-- end card body-->
|
||||||
|
</div> <!-- end card -->
|
||||||
|
</div><!-- end col-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div> <!-- container -->
|
||||||
|
</div> <!-- content -->
|
||||||
</div>
|
</div>
|
||||||
@ -403,16 +403,32 @@ function ValidateUA() {
|
|||||||
var mindt = year-70;
|
var mindt = year-70;
|
||||||
var maxdt = year-15;
|
var maxdt = year-15;
|
||||||
|
|
||||||
$("#financialstart").datepicker({
|
// $("#financialstart").datepicker({
|
||||||
maxDate :'now',
|
// maxDate :'now',
|
||||||
//maxDate : new Date(maxdt,1,1),
|
// //maxDate : new Date(maxdt,1,1),
|
||||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-1:+1'
|
// dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-1:+1'
|
||||||
|
|
||||||
|
|
||||||
});
|
// });
|
||||||
|
|
||||||
$("#financialend").datepicker({dateFormat: 'dd-mm-yy',minDate :'now',changeMonth: true, changeYear: true,yearRange: '-1:+1'
|
// $("#financialend").datepicker({dateFormat: 'dd-mm-yy',minDate :'now',changeMonth: true, changeYear: true,yearRange: '-1:+1'
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
// $("#financialstart").datepicker({
|
||||||
|
// dateFormat: 'dd-mm-yy',
|
||||||
|
// onSelect: function(selectedDate) {
|
||||||
|
// var minDate = $(this).datepicker("getDate");
|
||||||
|
// $("#toDate").datepicker("option", "minDate", minDate);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
// $("#financialend").datepicker({
|
||||||
|
// dateFormat: 'dd-mm-yy',
|
||||||
|
// onSelect: function(selectedDate) {
|
||||||
|
// var maxDate = $(this).datepicker("getDate");
|
||||||
|
// $("#fromDate").datepicker("option", "maxDate", maxDate);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -465,7 +481,7 @@ function ValidateUA() {
|
|||||||
<div class="row" style="margin-bottom: 10px;">
|
<div class="row" style="margin-bottom: 10px;">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="page-title-box page-title-box-alt">
|
<div class="page-title-box page-title-box-alt">
|
||||||
<h4 class="page-title">Company Profile</h4>
|
<h4 class="page-title">Business Settings</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 text-right">
|
<div class="col-6 text-right">
|
||||||
@ -482,7 +498,7 @@ function ValidateUA() {
|
|||||||
<form class="form-horizontal" role="form" id="addemployee" action="<?php echo base_url() ?>Updatecompany" method="post" role="form" enctype="multipart/form-data">
|
<form class="form-horizontal" role="form" id="addemployee" action="<?php echo base_url() ?>Updatecompany" method="post" role="form" enctype="multipart/form-data">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<!-- Supplier Information -->
|
<!-- Supplier Information -->
|
||||||
<legend style="margin-left:-10px;color: #4f7c97;;color: #4f7c97;">Company Information</legend>
|
<legend style="margin-left:-10px;color: #4f7c97;;color: #4f7c97;">Business Information</legend>
|
||||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class=" col-md-3">
|
<div class=" col-md-3">
|
||||||
@ -523,14 +539,19 @@ function ValidateUA() {
|
|||||||
<input type="text" name="companywebsite" id="companywebsite" maxlength="100" class="form-control" value="<?php echo $companywebsite ;?>" required>
|
<input type="text" name="companywebsite" id="companywebsite" maxlength="100" class="form-control" value="<?php echo $companywebsite ;?>" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<?php
|
||||||
|
$financialstartFormatted = date('Y-m-d', strtotime($financialstart));
|
||||||
|
$financialendFormatted = date('Y-m-d', strtotime($financialend));
|
||||||
|
?>
|
||||||
|
|
||||||
<div class="form-row" >
|
<div class="form-row" >
|
||||||
<div class="col-md-3" style="margin-top:20px">
|
<div class="col-md-3" style="margin-top:20px">
|
||||||
<label for="FinancialYearStartON">Financial Year StartON</label><!--<span class="badge">*</span>-->
|
<label for="FinancialYearStartON">Financial Year StartON</label><!--<span class="badge">*</span>-->
|
||||||
<input name="financialstart" id="financialstart" maxlength="10" class="form-control" value="<?php echo $financialstart ;?>" required>
|
<input type="date" name="financialstart" id="financialstart" class="form-control" value="<?php echo $financialstartFormatted; ?>" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3" style="margin-top:20px">
|
<div class="col-md-3" style="margin-top:20px">
|
||||||
<label for="FinancialYearEndON">Financial Year EndON</label><!--<span class="badge">*</span>-->
|
<label for="FinancialYearEndON">Financial Year EndON</label><!--<span class="badge">*</span>-->
|
||||||
<input name="financialend" id="financialend" maxlength="10" class="form-control" value="<?php echo $financialend ;?>" required>
|
<input type="date" name="financialend" id="financialend" maxlength="10" class="form-control" value="<?php echo $financialendFormatted ;?>" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -753,7 +774,8 @@ function ValidateUA() {
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-12 text-right">
|
<div class="col-md-12 text-right">
|
||||||
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
|
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
|
||||||
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
|
<!-- <input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success"> -->
|
||||||
|
<input type="submit" value="Submit" class="btn btn-success">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@ -625,8 +625,10 @@ $('#datepick').change(function() {
|
|||||||
<!-- <section class="content-header"> -->
|
<!-- <section class="content-header"> -->
|
||||||
<!-- <h3>Admin Dashboard</h3> -->
|
<!-- <h3>Admin Dashboard</h3> -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-md-4 col-md-offset-4" style="height: 75px;">
|
<div class="col-12 text-right" style="height: 75px;">
|
||||||
<a href="javascript:void(0)" type="button" class="btn btn-success" onclick="synczohobooks()">Sync With Zoho Books</a>
|
<a href="javascript:void(0)" type="button" title="Sync With Zoho Books" class="btn btn-success" onclick="synczohobooks()">
|
||||||
|
<i class="fas fa-sync-alt"></i> <!-- <img src="<?php echo base_url();?>public/new_assets/images/zoho_sync.png" alt="Sync Icon" style="width: 20px; height: 20px;"> -->
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- </section> -->
|
<!-- </section> -->
|
||||||
|
|||||||
@ -814,12 +814,14 @@ legend {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-6 pad"><span>Personal Email ID</span>
|
<div class="col-md-6 pad">
|
||||||
|
<span>Personal Email ID</span>
|
||||||
<input type="mail" name="emailid"
|
<input type="mail" name="emailid"
|
||||||
value="<?php echo $EmailId ; ?>" id="email"
|
value="<?php echo $EmailId ; ?>" id="email"
|
||||||
placeholder="Email ID" maxlength="100" class="form-control">
|
placeholder="Email ID" maxlength="100" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 pad"> <span>Official Email ID</span>
|
<div class="col-md-6 pad">
|
||||||
|
<span>Official Email ID</span>
|
||||||
<input type="email" name="comemailid" id="mail"
|
<input type="email" name="comemailid" id="mail"
|
||||||
placeholder="Official Email ID"
|
placeholder="Official Email ID"
|
||||||
value="<?php echo $personalEmailId;?>" maxlength="100"
|
value="<?php echo $personalEmailId;?>" maxlength="100"
|
||||||
@ -887,7 +889,8 @@ legend {
|
|||||||
<!-- Text input-->
|
<!-- Text input-->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-12 pad">
|
<div class="col-md-12 pad">
|
||||||
<div class="col-md-12"><span>Current Address</span><span
|
<div class="col-md-12">
|
||||||
|
<span>Current Address</span><span
|
||||||
class="badge">*</span>
|
class="badge">*</span>
|
||||||
<input type="text" id="currentaddress" pattern=".{1,500}"
|
<input type="text" id="currentaddress" pattern=".{1,500}"
|
||||||
required name="currentaddress" maxlength="500"
|
required name="currentaddress" maxlength="500"
|
||||||
@ -908,7 +911,8 @@ legend {
|
|||||||
<!-- Text input-->
|
<!-- Text input-->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-12 pad">
|
<div class="col-md-12 pad">
|
||||||
<div class="col-md-12"><span>Permanent Address</span><span
|
<div class="col-md-12">
|
||||||
|
<span>Permanent Address</span><span
|
||||||
class="badge">*</span>
|
class="badge">*</span>
|
||||||
<input type="text" id="permanentaddress" required
|
<input type="text" id="permanentaddress" required
|
||||||
name="permanentaddress" pattern=".{0,500}"
|
name="permanentaddress" pattern=".{0,500}"
|
||||||
@ -927,13 +931,15 @@ legend {
|
|||||||
<!-- Text input-->
|
<!-- Text input-->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-12 pad">
|
<div class="col-md-12 pad">
|
||||||
<div class="col-md-6"><span>Emergency Contact Name</span>
|
<div class="col-md-6">
|
||||||
|
<span>Emergency Contact Name</span>
|
||||||
<input type="text" id="emergencycontactname" maxlength="100"
|
<input type="text" id="emergencycontactname" maxlength="100"
|
||||||
name="emergencycontactname"
|
name="emergencycontactname"
|
||||||
value="<?php echo $EmergencyContactName ; ?>"
|
value="<?php echo $EmergencyContactName ; ?>"
|
||||||
placeholder="Emergency Contact Name" class="form-control">
|
placeholder="Emergency Contact Name" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6"><span>Emergency Contact Number</span>
|
<div class="col-md-6">
|
||||||
|
<span>Emergency Contact Number</span>
|
||||||
<input type="text" id="emergencycontactnumber"
|
<input type="text" id="emergencycontactnumber"
|
||||||
name="emergencycontactnumber"
|
name="emergencycontactnumber"
|
||||||
onchange="getValidEmergencyNumber();" maxlength="10"
|
onchange="getValidEmergencyNumber();" maxlength="10"
|
||||||
@ -953,7 +959,8 @@ legend {
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-12 pad">
|
<div class="col-md-12 pad">
|
||||||
<div class="col-md-3"><span>Designation</span><span
|
<div class="col-md-3">
|
||||||
|
<span>Designation</span><span
|
||||||
class="badge">*</span>
|
class="badge">*</span>
|
||||||
<select type="text" id="desigination" name="desigination"
|
<select type="text" id="desigination" name="desigination"
|
||||||
required class="form-control select2">
|
required class="form-control select2">
|
||||||
@ -975,7 +982,8 @@ legend {
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3"><span>Department</span><span
|
<div class="col-md-3">
|
||||||
|
<span>Department</span><span
|
||||||
class="badge">*</span>
|
class="badge">*</span>
|
||||||
<select type="text" id="departmentname" name="departmentname"
|
<select type="text" id="departmentname" name="departmentname"
|
||||||
required class="form-control select2">
|
required class="form-control select2">
|
||||||
@ -999,7 +1007,8 @@ legend {
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3"><span>Date Of Joining</span><span
|
<div class="col-md-3">
|
||||||
|
<span>Date Of Joining</span><span
|
||||||
class="badge">*</span>
|
class="badge">*</span>
|
||||||
<input id="dateofjoining" name="dateofjoining"
|
<input id="dateofjoining" name="dateofjoining"
|
||||||
value="<?php echo $DOJ; ?>" maxlength="10" required
|
value="<?php echo $DOJ; ?>" maxlength="10" required
|
||||||
@ -1051,7 +1060,8 @@ legend {
|
|||||||
placeholder="Referred By" maxlength="100"
|
placeholder="Referred By" maxlength="100"
|
||||||
class="form-control">
|
class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3" style="display:none"><span>Referrer Contact Number</span>
|
<div class="col-md-3" style="display:none">
|
||||||
|
<span>Referrer Contact Number</span>
|
||||||
<input type="text" id="referrercontno" name="referrercontno"
|
<input type="text" id="referrercontno" name="referrercontno"
|
||||||
value="<?php echo $Reference_ContactNumber ; ?>"
|
value="<?php echo $Reference_ContactNumber ; ?>"
|
||||||
onchange="getValidReferNumber();" maxlength="10"
|
onchange="getValidReferNumber();" maxlength="10"
|
||||||
@ -1384,16 +1394,6 @@ legend {
|
|||||||
|
|
||||||
<div class="files">
|
<div class="files">
|
||||||
|
|
||||||
<div class="col-md-12 ">
|
|
||||||
<div class="col-md-10"></div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<button type="button" class="btn btn-primary btn-sm a1"
|
|
||||||
onclick="appendFilesFileds()" id="day">
|
|
||||||
Add New File
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php foreach ($emp_data as $key => $value) { ?>
|
<?php foreach ($emp_data as $key => $value) { ?>
|
||||||
|
|
||||||
<div class="col-md-12 pad ">
|
<div class="col-md-12 pad ">
|
||||||
@ -1414,6 +1414,7 @@ legend {
|
|||||||
id="<?= $value['id']; ?>"
|
id="<?= $value['id']; ?>"
|
||||||
onclick="removeContact(this)">Delete</button>
|
onclick="removeContact(this)">Delete</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@ -1526,8 +1527,8 @@ function appendFilesFileds(data) {
|
|||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
$('#filesContainer').append(newRowHtml);
|
$('#filesContainer').append(newRowHtml);
|
||||||
$('.a1').hide();
|
// $('.a1').hide();
|
||||||
$('#filesContainer .pad:last .a1').show();
|
// $('#filesContainer .pad:last .a1').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeContact(button) {
|
function removeContact(button) {
|
||||||
|
|||||||
1697
app/Views/editEmployeenew.php
Normal file
1697
app/Views/editEmployeenew.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,6 @@ $LastName = '';
|
|||||||
$ContactNo = '';
|
$ContactNo = '';
|
||||||
$EmailId = '';
|
$EmailId = '';
|
||||||
$Role = '';
|
$Role = '';
|
||||||
$Department = '';
|
|
||||||
$Designation = '';
|
$Designation = '';
|
||||||
$RoleName = '';
|
$RoleName = '';
|
||||||
if(!empty($EmpRole))
|
if(!empty($EmpRole))
|
||||||
@ -30,7 +29,6 @@ if(!empty($EmpList))
|
|||||||
$ContactNo = $Emp->ContactNumber;
|
$ContactNo = $Emp->ContactNumber;
|
||||||
$EmailId = $Emp->EmailId;
|
$EmailId = $Emp->EmailId;
|
||||||
|
|
||||||
$Department = $Emp->DepartmentName;
|
|
||||||
$Designation = $Emp->Designation;
|
$Designation = $Emp->Designation;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -79,10 +77,7 @@ if(!empty($EmpList))
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="col-md-3">
|
|
||||||
<label class="col-form-label" for="Department">Department</label>
|
|
||||||
<input type="text" class="form-control required" value="<?php echo $Department ?>" readonly id="Department" name="Department" minlength="10" maxlength="10">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label for="MailID">Email address</label>
|
<label for="MailID">Email address</label>
|
||||||
<input type="text" class="form-control required email" value="<?php echo $EmailId ?>" readonly id="MailID" name="MailID" maxlength="128">
|
<input type="text" class="form-control required email" value="<?php echo $EmailId ?>" readonly id="MailID" name="MailID" maxlength="128">
|
||||||
@ -91,12 +86,12 @@ if(!empty($EmpList))
|
|||||||
<label for="ContactNo">Contact Number</label>
|
<label for="ContactNo">Contact Number</label>
|
||||||
<input type="text" class="form-control required digits" value="<?php echo $ContactNo ?>" readonly id="ContactNo" name="ContactNo" minlength="10" maxlength="10">
|
<input type="text" class="form-control required digits" value="<?php echo $ContactNo ?>" readonly id="ContactNo" name="ContactNo" minlength="10" maxlength="10">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label for="password">Password</label>
|
<label for="password">Password</label>
|
||||||
<input type="password" class="form-control" id="password" required name="password" maxlength="10">
|
<input type="password" class="form-control" id="password" required name="password" maxlength="10">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="form-row">
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label for="cpassword">Confirm Password</label>
|
<label for="cpassword">Confirm Password</label>
|
||||||
<input type="password" class="form-control equalTo" id="cpassword" name="cpassword" maxlength="10">
|
<input type="password" class="form-control equalTo" id="cpassword" name="cpassword" maxlength="10">
|
||||||
@ -105,7 +100,6 @@ if(!empty($EmpList))
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group text-right mt-3">
|
<div class="form-group text-right mt-3">
|
||||||
<input type="hidden" name="txtSelectedDepartment" id="txtSelectedDepartment">
|
|
||||||
<input type="hidden" name="txtEmpid" id="txtEmpid" value="<?php echo $EmpId ?>">
|
<input type="hidden" name="txtEmpid" id="txtEmpid" value="<?php echo $EmpId ?>">
|
||||||
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white;margin-right: 15px;" value="Reset">
|
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white;margin-right: 15px;" value="Reset">
|
||||||
<input type="submit" class="btn btn-success" value="Submit">
|
<input type="submit" class="btn btn-success" value="Submit">
|
||||||
@ -158,7 +152,6 @@ if(!empty($EmpList))
|
|||||||
$('#addPop').click(function () {
|
$('#addPop').click(function () {
|
||||||
if ($('#distriList option:selected').val() != null) {
|
if ($('#distriList option:selected').val() != null) {
|
||||||
if($('#distriList option:selected').val()==0 ){
|
if($('#distriList option:selected').val()==0 ){
|
||||||
alert('please select Department');
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
var tempSelect = $('#distriList option:selected').val();
|
var tempSelect = $('#distriList option:selected').val();
|
||||||
@ -167,7 +160,6 @@ if(!empty($EmpList))
|
|||||||
|
|
||||||
var o = new Option(tempText,tempSelect);
|
var o = new Option(tempText,tempSelect);
|
||||||
var hidval = tempSelect;
|
var hidval = tempSelect;
|
||||||
var orgVal = $('#txtSelectedDepartment').val();
|
|
||||||
//salert(orgVal);
|
//salert(orgVal);
|
||||||
var Selectedval = ''
|
var Selectedval = ''
|
||||||
|
|
||||||
@ -179,9 +171,7 @@ if(!empty($EmpList))
|
|||||||
{
|
{
|
||||||
Selectedval = hidval
|
Selectedval = hidval
|
||||||
}
|
}
|
||||||
$('#txtSelectedDepartment').val(Selectedval);
|
|
||||||
|
|
||||||
var Department= $('#txtSelectedDepartment').val();
|
|
||||||
|
|
||||||
|
|
||||||
$(o).html(tempText);
|
$(o).html(tempText);
|
||||||
@ -196,7 +186,7 @@ if(!empty($EmpList))
|
|||||||
|
|
||||||
$('#content').loader('show');
|
$('#content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{Eid:Eid,Department:Department},
|
data:{Eid:Eid},
|
||||||
|
|
||||||
type:"POST",
|
type:"POST",
|
||||||
url:"<?php echo base_url() ?>user/Adduserdepartment",
|
url:"<?php echo base_url() ?>user/Adduserdepartment",
|
||||||
@ -205,7 +195,6 @@ if(!empty($EmpList))
|
|||||||
{
|
{
|
||||||
$('#content').loader('hide');
|
$('#content').loader('hide');
|
||||||
alert(data);
|
alert(data);
|
||||||
$('#txtSelectedDepartment').val('');
|
|
||||||
$('#txtRowCount').val('');
|
$('#txtRowCount').val('');
|
||||||
|
|
||||||
//window.location = baseurl + 'CostCenter/CostListing';
|
//window.location = baseurl + 'CostCenter/CostListing';
|
||||||
@ -251,15 +240,13 @@ if(!empty($EmpList))
|
|||||||
$("#distriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected");
|
$("#distriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected");
|
||||||
|
|
||||||
$("#distriList").val(tempSelect);
|
$("#distriList").val(tempSelect);
|
||||||
$('#txtSelectedDepartment').val(tempSelect);
|
|
||||||
tempSelect = '';
|
tempSelect = '';
|
||||||
|
|
||||||
var Department= $('#txtSelectedDepartment').val();
|
|
||||||
|
|
||||||
|
|
||||||
$('#content').loader('show');
|
$('#content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{Eid:Eid,Department:Department},
|
data:{Eid:Eid},
|
||||||
type:"POST",
|
type:"POST",
|
||||||
url:"<?php echo base_url() ?>user/Deleteuserdepartment",
|
url:"<?php echo base_url() ?>user/Deleteuserdepartment",
|
||||||
success:function(data) {
|
success:function(data) {
|
||||||
@ -267,7 +254,6 @@ if(!empty($EmpList))
|
|||||||
{
|
{
|
||||||
$('#content').loader('hide');
|
$('#content').loader('hide');
|
||||||
alert(data);
|
alert(data);
|
||||||
$('#txtSelectedDepartment').val('');
|
|
||||||
$('#txtRowCount').val('');
|
$('#txtRowCount').val('');
|
||||||
|
|
||||||
//window.location = baseurl + 'CostCenter/CostListing';
|
//window.location = baseurl + 'CostCenter/CostListing';
|
||||||
|
|||||||
@ -1,31 +1,37 @@
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
|
||||||
$("#loan_issued_date").datepicker({
|
$("#loan_issued_date").datepicker({
|
||||||
minDate : 'now',
|
minDate: 'now',
|
||||||
// maxDate : 'now',
|
// maxDate : 'now',
|
||||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
dateFormat: 'dd-mm-yy',
|
||||||
|
changeMonth: true,
|
||||||
|
changeYear: true,
|
||||||
|
yearRange: '-100:+0'
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#due_started").datepicker({
|
$("#due_started").datepicker({
|
||||||
minDate :'now',
|
minDate: 'now',
|
||||||
//maxDate : 'now',
|
//maxDate : 'now',
|
||||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+1'
|
dateFormat: 'dd-mm-yy',
|
||||||
|
changeMonth: true,
|
||||||
|
changeYear: true,
|
||||||
|
yearRange: '-100:+1'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// window.onload = function(){
|
// window.onload = function(){
|
||||||
// loanReset();
|
// loanReset();
|
||||||
// function loanReset(){
|
// function loanReset(){
|
||||||
// //alert("hi");
|
// //alert("hi");
|
||||||
// var loan=$("#Loan_Amount").val();//document.getElementById('Loan_Amount').value;
|
// var loan=$("#Loan_Amount").val();//document.getElementById('Loan_Amount').value;
|
||||||
// var paid=$("#Paid_Amount").val();//document.getElementById('Paid_Amount').value;
|
// var paid=$("#Paid_Amount").val();//document.getElementById('Paid_Amount').value;
|
||||||
// if(loan !=0){
|
// if(loan !=0){
|
||||||
// if (loan == paid)
|
// if (loan == paid)
|
||||||
// {
|
// {
|
||||||
// //alert("loan reset");
|
// //alert("loan reset");
|
||||||
// $("#Loan_Amount").val(0.00);
|
// $("#Loan_Amount").val(0.00);
|
||||||
// $("#Paid_Amount").val(0.00);
|
// $("#Paid_Amount").val(0.00);
|
||||||
@ -36,98 +42,110 @@ $("#due_started").datepicker({
|
|||||||
// $("#loan_issued_date").val("");
|
// $("#loan_issued_date").val("");
|
||||||
// $("#due_started").val("");
|
// $("#due_started").val("");
|
||||||
|
|
||||||
// }else
|
// }else
|
||||||
// {
|
// {
|
||||||
// //alert("loan pending");
|
// //alert("loan pending");
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// };
|
// };
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
$Pay_Data_ID='';
|
$Pay_Data_ID = '';
|
||||||
$EmpID='';
|
$EmpID = '';
|
||||||
$Empname="";
|
$Empname = "";
|
||||||
$Basic_Pay='';
|
$Basic_Pay = '';
|
||||||
$HRA_Rate='';
|
$HRA_Rate = '';
|
||||||
|
|
||||||
$Allowances='';
|
$Allowances = '';
|
||||||
$PF_Rate='';
|
$PF_Rate = '';
|
||||||
$ESI_Rate='';
|
$ESI_Rate = '';
|
||||||
$is_Active='';
|
$is_Active = '';
|
||||||
$Food_Allowances='';
|
$Food_Allowances = '';
|
||||||
$Incentives='';
|
$Incentives = '';
|
||||||
$Created_By='';
|
$Created_By = '';
|
||||||
$Created_Time='';
|
$Created_Time = '';
|
||||||
$Last_Mod_By='';
|
$Last_Mod_By = '';
|
||||||
$Last_Mod_Time='';
|
$Last_Mod_Time = '';
|
||||||
$HRA_Amount=0.0;
|
$HRA_Amount = 0.0;
|
||||||
$TotalSalary=0.0;
|
$TotalSalary = 0.0;
|
||||||
$Loan_Amount='';
|
$Loan_Amount = '';
|
||||||
$Loan_issued_date='';
|
$Loan_issued_date = '';
|
||||||
$Monthly_due='';
|
$Monthly_due = '';
|
||||||
$Due_start_date='';
|
$Due_start_date = '';
|
||||||
$No_of_dues='';
|
$No_of_dues = '';
|
||||||
$Remaining_Due='';
|
$Remaining_Due = '';
|
||||||
$Paid_Due='';
|
$Paid_Due = '';
|
||||||
$Paid_Amount=0;
|
$Paid_Amount = 0;
|
||||||
$loanid='';
|
$loanid = '';
|
||||||
|
|
||||||
|
|
||||||
if(!empty($emppay))
|
if (!empty($emppay)) {
|
||||||
{
|
// print_r($emppay);
|
||||||
// print_r($emppay);
|
// die();
|
||||||
// die();
|
foreach ($emppay as $ep) {
|
||||||
foreach ($emppay as $ep)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$Pay_Data_ID=$ep->Pay_Data_ID;
|
$Pay_Data_ID = $ep->Pay_Data_ID;
|
||||||
$EmpID=$ep->PAYEMPID;
|
$EmpID = $ep->PAYEMPID;
|
||||||
$Empname=$ep->FirstName ." ". $ep->LastName ;
|
$Empname = $ep->FirstName . " " . $ep->LastName;
|
||||||
$TotalSalary=$ep->TotalSalary;
|
$TotalSalary = $ep->TotalSalary;
|
||||||
$Basic_Pay=$ep->Basic_Pay;
|
$Basic_Pay = $ep->Basic_Pay;
|
||||||
$HRA_Rate=$ep->HRA_Rate;
|
$HRA_Rate = $ep->HRA_Rate;
|
||||||
$HRA_Amount=$ep->HRA_Amount;
|
$HRA_Amount = $ep->HRA_Amount;
|
||||||
|
|
||||||
$Allowances=$ep->Allowances;
|
$Allowances = $ep->Allowances;
|
||||||
$PF_Rate=$ep->PF_Rate;
|
$PF_Rate = $ep->PF_Rate;
|
||||||
$ESI_Rate=$ep->ESI_Rate;
|
$ESI_Rate = $ep->ESI_Rate;
|
||||||
$is_Active=$ep->is_Active;
|
$is_Active = $ep->is_Active;
|
||||||
$Food_Allowances=$ep->Food_Allowances;
|
$Food_Allowances = $ep->Food_Allowances;
|
||||||
$Incentives=$ep->Incentives;
|
$Incentives = $ep->Incentives;
|
||||||
$Loan_Amount=$ep->Loan_Amount;
|
$Loan_Amount = $ep->Loan_Amount;
|
||||||
if(empty($Loan_Amount)){$Loan_Amount = 0.00;}
|
if (empty($Loan_Amount)) {
|
||||||
if( !empty($ep->Loan_Issued_Date) ){
|
$Loan_Amount = 0.00;
|
||||||
$Loan_issued_date=new DateTime( $ep->Loan_Issued_Date, new DateTimeZone('Asia/Kolkata'));
|
}
|
||||||
$Loan_issued_date=$Loan_issued_date->format('d-m-Y');}
|
if (!empty($ep->Loan_Issued_Date)) {
|
||||||
else{$Loan_issued_date=null;}
|
$Loan_issued_date = new DateTime($ep->Loan_Issued_Date, new DateTimeZone('Asia/Kolkata'));
|
||||||
|
$Loan_issued_date = $Loan_issued_date->format('d-m-Y');
|
||||||
|
} else {
|
||||||
|
$Loan_issued_date = null;
|
||||||
|
}
|
||||||
|
|
||||||
$Monthly_due=$ep->Monthly_Due;
|
$Monthly_due = $ep->Monthly_Due;
|
||||||
if(empty($Monthly_due)){$Monthly_due = 0.00;}
|
if (empty($Monthly_due)) {
|
||||||
if(!empty($ep->Due_Start_Date)){
|
$Monthly_due = 0.00;
|
||||||
$Due_start_date=new DateTime( $ep->Due_Start_Date, new DateTimeZone('Asia/Kolkata'));
|
}
|
||||||
$Due_start_date=$Due_start_date->format('d-m-Y');}
|
if (!empty($ep->Due_Start_Date)) {
|
||||||
else{$Due_start_date=null;}
|
$Due_start_date = new DateTime($ep->Due_Start_Date, new DateTimeZone('Asia/Kolkata'));
|
||||||
$No_of_dues=$ep->No_of_Dues;
|
$Due_start_date = $Due_start_date->format('d-m-Y');
|
||||||
if(empty($No_of_dues)){$No_of_dues = 0.00;}
|
} else {
|
||||||
$Paid_Due=$ep->Paid_Due;
|
$Due_start_date = null;
|
||||||
if(empty($Paid_Due)){$Paid_Due = 0.00;}
|
}
|
||||||
$Remaining_Due=$ep->Remaining_Due;
|
$No_of_dues = $ep->No_of_Dues;
|
||||||
if(empty($Remaining_Due)){$Remaining_Due = 0.00;}
|
if (empty($No_of_dues)) {
|
||||||
$Paid_Amount=$ep->Paid_Amount;
|
$No_of_dues = 0.00;
|
||||||
if(empty($Paid_Amount)){$Paid_Amount = 0.00;}
|
}
|
||||||
$Created_By=$ep->Created_By;
|
$Paid_Due = $ep->Paid_Due;
|
||||||
$Created_Time=$ep->Created_Time;
|
if (empty($Paid_Due)) {
|
||||||
$Last_Mod_By=$ep->Last_Mod_By;
|
$Paid_Due = 0.00;
|
||||||
$Last_Mod_Time=$ep->Last_Mod_Time;
|
}
|
||||||
|
$Remaining_Due = $ep->Remaining_Due;
|
||||||
|
if (empty($Remaining_Due)) {
|
||||||
|
$Remaining_Due = 0.00;
|
||||||
|
}
|
||||||
|
$Paid_Amount = $ep->Paid_Amount;
|
||||||
|
if (empty($Paid_Amount)) {
|
||||||
|
$Paid_Amount = 0.00;
|
||||||
|
}
|
||||||
|
$Created_By = $ep->Created_By;
|
||||||
|
$Created_Time = $ep->Created_Time;
|
||||||
|
$Last_Mod_By = $ep->Last_Mod_By;
|
||||||
|
$Last_Mod_Time = $ep->Last_Mod_Time;
|
||||||
$loanid = $ep->Loan_ID;
|
$loanid = $ep->Loan_ID;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,44 +154,44 @@ if(!empty($emppay))
|
|||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.num {
|
.num {
|
||||||
text-align:right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="content-wrapper">
|
<div class="content-page">
|
||||||
<!-- Content Header (Page header) -->
|
<div class="content">
|
||||||
<section class="content-header">
|
<!-- Start Content-->
|
||||||
<h1>
|
<div class="container-fluid">
|
||||||
<!--title-->
|
<!-- start page title -->
|
||||||
<center>Edit Loan Details</center>
|
<div class="row" style="margin-bottom: 10px;">
|
||||||
|
<div class="col-6">
|
||||||
</h1>
|
<div class="page-title-box page-title-box-alt">
|
||||||
</section>
|
<h4 class="page-title">Edit Loan Details</h4>
|
||||||
|
|
||||||
<section class="content">
|
|
||||||
<div style="text-align:right;">
|
|
||||||
<a href="<?php echo base_url() ?>emppayListings" class="btn btn-success" value="Back">Back</a>
|
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
</div>
|
||||||
|
<div class="col-6 text-right">
|
||||||
|
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>emppayListings"><span class="bold">Back</span></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- end page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- left column -->
|
<div class="col-12">
|
||||||
<div class="col-md-12">
|
<div class="card">
|
||||||
<!-- general form elements -->
|
<div class="card-body">
|
||||||
<div class="box box-success">
|
<h4 class="header-title">Loan Details</h4>
|
||||||
|
<div class="row">
|
||||||
<!-- form start-->
|
<div class="col-12">
|
||||||
|
<div class="p-2">
|
||||||
<form role="form" id="edit" action="<?php echo base_url() ?>emppaydate/editemppay" method="post">
|
<form role="form" id="edit" action="<?php echo base_url() ?>emppaydate/editemppay" method="post">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
|
<!-- Supplier Information -->
|
||||||
|
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||||
<div class="col-md-12">
|
<input type="hidden" class="form-control required" id="Last_Modified_Time" name="Last_Modified_Time" value="<?php echo $Last_Mod_Time; ?>">
|
||||||
<legend>Loan Details</legend>
|
<input type="hidden" class="form-control required" id="LastModifiedBy" name="LastModifiedBy" value="<?php echo $name; ?>">
|
||||||
</div>
|
<input type="hidden" class="form-control required" id="Created_Time" name="Created_Time" value="<?php echo $Created_Time; ?>">
|
||||||
|
<input type="hidden" class="form-control required" id="CreatedBy" name="CreatedBy" value="<?php echo $Created_By; ?>">
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<input type="hidden" readonly id="Pay_Data_ID" name="Pay_Data_ID" value="<?php echo $Pay_Data_ID; ?>">
|
<input type="hidden" readonly id="Pay_Data_ID" name="Pay_Data_ID" value="<?php echo $Pay_Data_ID; ?>">
|
||||||
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -182,31 +200,24 @@ if(!empty($emppay))
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
<input type="hidden" name="loanid" value="<?php echo $loanid;?>">
|
<input type="hidden" name="loanid" value="<?php echo $loanid; ?>">
|
||||||
<span for="Pay_Data_ID">Loan Amount</span>
|
<span for="Pay_Data_ID">Loan Amount</span>
|
||||||
<input type="text" class="form-control num" id="Loan_Amount" name="Loan_Amount" value="<?php echo $Loan_Amount; ?>" pattern="([0-9]{1,7}([.][0-9]{1,2})?)" title="Minimum 4 digit,Maximum 6 Digit" onchange="duecalculation();">
|
<input type="text" class="form-control num" id="Loan_Amount" name="Loan_Amount" value="<?php echo $Loan_Amount; ?>" pattern="([0-9]{1,7}([.][0-9]{1,2})?)" title="Minimum 4 digit,Maximum 6 Digit" onchange="duecalculation();">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span for="EmpID">Loan Issue(d) Date</span>
|
<span for="EmpID">Loan Issue(d) Date</span>
|
||||||
<input type="text" class="form-control num" id="loan_issued_date" name="loan_issued_date" value="<?php echo $Loan_issued_date;?>" onchange="dateCalulation();">
|
<input type="text" class="form-control num" id="loan_issued_date" name="loan_issued_date" value="<?php echo $Loan_issued_date; ?>" onchange="dateCalulation();">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -215,6 +226,8 @@ if(!empty($emppay))
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -231,7 +244,6 @@ if(!empty($emppay))
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -240,192 +252,125 @@ if(!empty($emppay))
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" id="remaining_due" name="remaining_due" value="<?php echo $Remaining_Due;?>">
|
|
||||||
<input type="hidden" id="paid_due" name="paid_due" value="<?php echo $Paid_Due;?>">
|
|
||||||
</div>
|
</div>
|
||||||
|
<input type="hidden" id="remaining_due" name="remaining_due" value="<?php echo $Remaining_Due; ?>">
|
||||||
|
<input type="hidden" id="paid_due" name="paid_due" value="<?php echo $Paid_Due; ?>">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-group">
|
|
||||||
<!--<span for ="CreatedBy">Created By:</span>-->
|
|
||||||
<input type="hidden" class="form-control required" id="CreatedBy" name="CreatedBy" value="<?php echo $Created_By; ?>">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-md-12 text-right">
|
||||||
|
<input type="button" class="btn btn-success" value="Delete" id="deleteemp" style="background-color:red ;color: white; margin-right: 15px;width: 80px;" />
|
||||||
|
<input type="submit" onmouseover="finalCheck();" value="Submit" class="btn btn-success">
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-group">
|
|
||||||
<!--<span for ="Created_Time">Created Time:</span>-->
|
|
||||||
<input type="hidden" class="form-control required" id="Created_Time" name="Created_Time" value="<?php echo $Created_Time; ?>">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-group">
|
|
||||||
<!--<span for ="Last_Mod_By">Last Modified By:</span>-->
|
|
||||||
<input type="hidden" class="form-control required" id="LastModifiedBy" name="LastModifiedBy" value="<?php echo $name; ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-group">
|
|
||||||
<!--<span for ="Last_Mod_Time">Last Modified Time:</span>-->
|
|
||||||
<input type="hidden" class="form-control required" id="Last_Modified_Time" name="Last_Modified_Time" value="<?php echo $Last_Mod_Time; ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div><!--row completed div-->
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
<div class="box-footer" style="text-align:right">
|
|
||||||
<input type="submit" class="btn btn-success" value="Submit" onmouseover="finalCheck();"/>
|
|
||||||
<input type="button" class="btn btn-success" value="Delete" id="deleteemp"/>
|
|
||||||
<input type="reset" class="btn btn-success" value="Reset" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
$listErrors = session()->getFlashdata('listErrors');
|
||||||
|
if ($listErrors) {
|
||||||
|
?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="alert alert-danger alert-dismissable">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<?php echo session()->getFlashdata('listErrors'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<div class="col-md-4">
|
</div>
|
||||||
<?php
|
<?php
|
||||||
helper('form');
|
helper('form');
|
||||||
$error = session()->getFlashdata('error');
|
$error = session()->getFlashdata('error');
|
||||||
if($error)
|
if ($error) {
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-danger alert-dismissable">
|
<div class="alert alert-danger alert-dismissable">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<?php echo session()->getFlashdata('error'); ?>
|
<?php echo session()->getFlashdata('error'); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$success = session()->getFlashdata('success');
|
$success = session()->getFlashdata('success');
|
||||||
if($success)
|
if ($success) {
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-success alert-dismissable">
|
<div class="alert alert-success alert-dismissable">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<?php echo session()->getFlashdata('success'); ?>
|
<?php echo session()->getFlashdata('success'); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<!-- end row -->
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<?php // echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true"><3E></button></div>'); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div> <!-- end card -->
|
||||||
|
</div><!-- end col -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- end row -->
|
||||||
|
</div> <!-- container -->
|
||||||
|
</div> <!-- content -->
|
||||||
|
|
||||||
</section>
|
<script>
|
||||||
</div>
|
function calculateBasic()
|
||||||
|
|
||||||
|
{
|
||||||
<script>
|
|
||||||
function calculateBasic()
|
|
||||||
|
|
||||||
{
|
|
||||||
var Totalsalary = document.getElementById('Total_Salary').value;;
|
var Totalsalary = document.getElementById('Total_Salary').value;;
|
||||||
var HRA=document.getElementById('HRA_Rate').value;
|
var HRA = document.getElementById('HRA_Rate').value;
|
||||||
if(HRA==''){
|
if (HRA == '') {
|
||||||
alert("Please Enter HRA RATE..");
|
alert("Please Enter HRA RATE..");
|
||||||
document.getElementById('HRA_Rate').focus();
|
document.getElementById('HRA_Rate').focus();
|
||||||
}else if(Totalsalary==''){
|
} else if (Totalsalary == '') {
|
||||||
alert("Please Enter Total Salary..");
|
alert("Please Enter Total Salary..");
|
||||||
document.getElementById('Total_Salary').focus();
|
document.getElementById('Total_Salary').focus();
|
||||||
}
|
} else {
|
||||||
else{
|
var temp = (Totalsalary * (HRA / 100));
|
||||||
var temp=(Totalsalary*(HRA/100));
|
var basic = Totalsalary - temp;
|
||||||
var basic=Totalsalary-temp;
|
document.getElementById('Basic_Pay').value = basic;
|
||||||
document.getElementById('Basic_Pay').value=basic;
|
document.getElementById('HRA_Amount').value = temp;
|
||||||
document.getElementById('HRA_Amount').value=temp;
|
|
||||||
}
|
}
|
||||||
//alert(basic);
|
//alert(basic);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function duecalculation()
|
function duecalculation() {
|
||||||
{
|
var totaldue = 0;
|
||||||
var totaldue=0;
|
var loan = document.getElementById('Loan_Amount').value;
|
||||||
var loan=document.getElementById('Loan_Amount').value;
|
var due = document.getElementById('monthly_due').value;
|
||||||
var due=document.getElementById('monthly_due').value;
|
|
||||||
|
|
||||||
if(loan != 0)
|
if (loan != 0) {
|
||||||
{
|
if (due == 0) {
|
||||||
if(due == 0)
|
|
||||||
{
|
|
||||||
alert("Enter Monthly Due Amount....!");
|
alert("Enter Monthly Due Amount....!");
|
||||||
$('#monthly_due').focus();
|
$('#monthly_due').focus();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
totaldue=loan/due;
|
totaldue = loan / due;
|
||||||
|
|
||||||
if(totaldue < 1)
|
if (totaldue < 1) {
|
||||||
{
|
|
||||||
alert("Please Enter Correct Due Amount..!");
|
alert("Please Enter Correct Due Amount..!");
|
||||||
$('#monthly_due').focus();
|
$('#monthly_due').focus();
|
||||||
}
|
} else {
|
||||||
else{
|
document.getElementById('no_of_due').value = Math.ceil(totaldue);
|
||||||
document.getElementById('no_of_due').value=Math.ceil(totaldue);
|
var noofdues = document.getElementById('no_of_due').value;
|
||||||
var noofdues=document.getElementById('no_of_due').value;
|
|
||||||
$('#remaining_due').val(noofdues);
|
$('#remaining_due').val(noofdues);
|
||||||
$('#Paid_Amount').val("0.00");
|
$('#Paid_Amount').val("0.00");
|
||||||
$('#paid_due').val(0);
|
$('#paid_due').val(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}//else if(loan == "" || loan == 0)
|
} //else if(loan == "" || loan == 0)
|
||||||
//alert(totaldue);
|
//alert(totaldue);
|
||||||
|
|
||||||
dateCalulation();
|
dateCalulation();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function dateCalulation()
|
function dateCalulation() {
|
||||||
{
|
|
||||||
//alert('j');
|
//alert('j');
|
||||||
var loanamount=document.getElementById('Loan_Amount').value;
|
var loanamount = document.getElementById('Loan_Amount').value;
|
||||||
if(loanamount == 0.00 || loanamount == "")
|
if (loanamount == 0.00 || loanamount == "") {
|
||||||
{
|
|
||||||
$('#loan_issued_date').val("");
|
$('#loan_issued_date').val("");
|
||||||
$('#due_started').val("");
|
$('#due_started').val("");
|
||||||
$('#monthly_due').val("0.00");
|
$('#monthly_due').val("0.00");
|
||||||
@ -438,54 +383,51 @@ function dateCalulation()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function finalCheck()
|
function finalCheck() {
|
||||||
{
|
|
||||||
//alert("final check");
|
//alert("final check");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var loanamount=document.getElementById('Loan_Amount').value;
|
var loanamount = document.getElementById('Loan_Amount').value;
|
||||||
if(loanamount != "" && loanamount != 0.00)
|
if (loanamount != "" && loanamount != 0.00) {
|
||||||
{
|
var idate = document.getElementById('loan_issued_date').value;
|
||||||
var idate=document.getElementById('loan_issued_date').value;
|
var due = document.getElementById('monthly_due').value;
|
||||||
var due=document.getElementById('monthly_due').value;
|
var dsdate = document.getElementById('due_started').value;
|
||||||
var dsdate=document.getElementById('due_started').value;
|
if (idate == "" || due == "" || due == 0.00 || dsdate == "") {
|
||||||
if(idate == "" || due == "" || due == 0.00 || dsdate == ""){
|
|
||||||
alert("Enter All Loan Information Correctly...!");
|
alert("Enter All Loan Information Correctly...!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($('#Total_Salary').val() == '' || $('#HRA_Rate').val() == '' || $('#Allowances').val() == '' ||$('#PF_Rate').val() == '' ||$('#ESI_Rate').val() == '' || $('#Food_Allowances').val() == ''|| $('#Incentives').val()=='')
|
if ($('#Total_Salary').val() == '' || $('#HRA_Rate').val() == '' || $('#Allowances').val() == '' || $('#PF_Rate').val() == '' || $('#ESI_Rate').val() == '' || $('#Food_Allowances').val() == '' || $('#Incentives').val() == '') {
|
||||||
{
|
|
||||||
|
|
||||||
alert("Please Enter All Information Correctly..!");
|
alert("Please Enter All Information Correctly..!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#deleteemp").click(function(){
|
|
||||||
var empid = "<?php echo $EmpID;?>";
|
|
||||||
var i = confirm("Do You want to delete "+empid+" from Pay Master?");
|
|
||||||
//alert(i);s
|
|
||||||
if(i)
|
|
||||||
{
|
|
||||||
$('#content').loader('show');
|
|
||||||
|
|
||||||
|
$("#deleteemp").click(function() {
|
||||||
|
var loanid = "<?php if(isset($Loan_ID)){ echo $Loan_ID; }else{
|
||||||
|
echo $emppay[0]->Loan_ID;
|
||||||
|
} ?>";
|
||||||
|
var i = confirm("Do You want to delete " + loanid + " from Loan Master?");
|
||||||
|
// alert(i);s
|
||||||
|
if (i) {
|
||||||
|
// $('#content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{id:empid},
|
data: {
|
||||||
|
id: loanid
|
||||||
type:"POST",
|
},
|
||||||
url:"<?php echo base_url();?>emppaydate/deleteEmpPay",
|
type: "POST",
|
||||||
success:function(result) {
|
url: "<?php echo base_url(); ?>emppaydate/deleteEmpPay",
|
||||||
if(result)
|
success: function(result) {
|
||||||
{
|
if (result) {
|
||||||
|
|
||||||
alert(result);
|
alert(result);
|
||||||
$('#content').loader('hide');
|
// $('#content').loader('hide');
|
||||||
window.location.href = "<?php echo base_url();?>emppayListings";
|
window.location.href = "<?php echo base_url(); ?>emppayListings";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -493,7 +435,7 @@ $("#deleteemp").click(function(){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
</script>
|
</script>
|
||||||
@ -1000,7 +1000,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<label>Delivery Date<span class="text-danger">*</span></label>
|
<label>Delivery Date<span class="text-danger">*</span></label>
|
||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
$data = array('type' => 'date','name' => 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;','min' => date('d-m-Y'),);
|
$data = array('name' => 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;','min' => date('d-m-Y'),);
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -792,7 +792,7 @@ foreach ($PaymentTerms as $TER) {
|
|||||||
<input type="hidden" name="beforeDeliverydt" value="<?php echo $Deliverydt ?>">
|
<input type="hidden" name="beforeDeliverydt" value="<?php echo $Deliverydt ?>">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('type'=>'date','name' => 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
|
$data = array('name' => 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -95,30 +95,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-6 text-right">
|
<div class="col-6 text-right">
|
||||||
<a class="btn btn-success" href="<?php echo base_url(); ?>addemployee">Add New Employee</a>
|
<a class="btn btn-success" href="<?php echo base_url(); ?>addemployee">Add New Employee</a>
|
||||||
<a class="btn btn-success" href="<?php echo base_url(); ?>exportemployee">Export Employee Details <i class="fa fa-download" aira-hidden="true"></i></a>
|
<!-- <a class="btn btn-success" href="<?php echo base_url(); ?>exportemployee">Export Employee Details <i class="fa fa-download" aira-hidden="true"></i></a> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
|
|
||||||
<input type="hidden" name="table" value="requisition">
|
|
||||||
<label for="fromDate">From:</label>
|
|
||||||
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
|
||||||
|
|
||||||
<label for="toDate">To:</label>
|
|
||||||
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
|
||||||
|
|
||||||
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
|
|
||||||
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
|
||||||
<div class="error" id="error"></div>
|
|
||||||
</form>
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;">
|
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Created Date</th>
|
|
||||||
<th >Emp ID</th>
|
<th >Emp ID</th>
|
||||||
<th>Employee Name</th>
|
<th>Employee Name</th>
|
||||||
<th>Contact Number</th>
|
<th>Contact Number</th>
|
||||||
@ -138,7 +126,6 @@
|
|||||||
} else {
|
} else {
|
||||||
$cdate = date('d-m-Y', strtotime($record->Created_date));
|
$cdate = date('d-m-Y', strtotime($record->Created_date));
|
||||||
} ?>
|
} ?>
|
||||||
<td align="right"><?php echo $cdate; ?></td>
|
|
||||||
<td><u><a class="a_tag_link" href="<?php echo base_url() . 'employeedetails/ViewEmployee/?EmpID=' . $record->EmpID; ?>" data-toggle="tooltip" title="<?php echo $record->EmpID; ?> - Click here to view Employee details"><?php echo $record->EmpID ?> </a></u></td>
|
<td><u><a class="a_tag_link" href="<?php echo base_url() . 'employeedetails/ViewEmployee/?EmpID=' . $record->EmpID; ?>" data-toggle="tooltip" title="<?php echo $record->EmpID; ?> - Click here to view Employee details"><?php echo $record->EmpID ?> </a></u></td>
|
||||||
<td><?php echo $record->FirstName; ?></td>
|
<td><?php echo $record->FirstName; ?></td>
|
||||||
<td><?php echo $record->ContactNumber ?></td>
|
<td><?php echo $record->ContactNumber ?></td>
|
||||||
|
|||||||
@ -1,30 +1,26 @@
|
|||||||
|
<div class="content-page">
|
||||||
|
<div class="content">
|
||||||
<div class="content-wrapper">
|
<!-- Start Content-->
|
||||||
<!-- Content Header (Page header) -->
|
<div class="container-fluid">
|
||||||
<section class="content-header">
|
<!-- start page title -->
|
||||||
<h1>
|
<div>
|
||||||
<center>Employee Loan Details</center>
|
|
||||||
</h1>
|
|
||||||
</section>
|
|
||||||
<section class="content">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 text-right">
|
<div class="col-6">
|
||||||
<div class="form-group">
|
<div class="page-title-box page-title-box-alt">
|
||||||
|
<h4 class="page-title">Employee Loan Details</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 text-right">
|
||||||
<a class="btn btn-success" href="<?php echo base_url(); ?>emppaydate/addemppaydate">Create New Loan</a>
|
<a class="btn btn-success" href="<?php echo base_url(); ?>emppaydate/addemppaydate">Create New Loan</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-12">
|
||||||
<div class="box">
|
<div class="card">
|
||||||
<div class="box-header">
|
<div class="card-body">
|
||||||
|
<table id="datatable" class="table dt-responsive nowrap w-100 ria_data_table">
|
||||||
</div><!-- /.box-header -->
|
<thead>
|
||||||
<div class="box-body">
|
<tr>
|
||||||
<table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;text-align: right;" >
|
|
||||||
<thead style="background-color: #ddd;">
|
|
||||||
<tr >
|
|
||||||
<th width="15%">Employee</th>
|
<th width="15%">Employee</th>
|
||||||
<th width="7%"> Total Sal in ₹</th>
|
<th width="7%"> Total Sal in ₹</th>
|
||||||
<th width="7%"> Loan Amt in ₹</th>
|
<th width="7%"> Loan Amt in ₹</th>
|
||||||
@ -37,12 +33,12 @@
|
|||||||
<th width="7%">Action</th>
|
<th width="7%">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if(!empty($userRecords)) { foreach($userRecords as $record) { ?>
|
if (!empty($userRecords)) {
|
||||||
|
foreach ($userRecords as $record) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: left;"><?php echo $record->EmpID ?>-<?php echo $record->FirstName;?></td>
|
<td style="text-align: left;"><?php echo $record->EmpID ?>-<?php echo $record->FirstName; ?></td>
|
||||||
<td><?php echo $record->TotalSalary; ?></td>
|
<td><?php echo $record->TotalSalary; ?></td>
|
||||||
<td><?php echo $record->Loan_Amount; ?></td>
|
<td><?php echo $record->Loan_Amount; ?></td>
|
||||||
<td><?php echo $record->Loan_Issued_Date; ?></td>
|
<td><?php echo $record->Loan_Issued_Date; ?></td>
|
||||||
@ -51,38 +47,20 @@
|
|||||||
<td><?php echo $record->Paid_Due; ?></td>
|
<td><?php echo $record->Paid_Due; ?></td>
|
||||||
<td><?php echo $record->Remaining_Due; ?></td>
|
<td><?php echo $record->Remaining_Due; ?></td>
|
||||||
<td><?php echo $record->Paid_Amount; ?></td>
|
<td><?php echo $record->Paid_Amount; ?></td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a href="<?php echo base_url().'emppaydate/editOldemppay/'.$record->Pay_Data_ID; ?>"><i class="btn btn-success">EDIT</i></a>
|
<a href="<?php echo base_url() . 'emppaydate/editOldemppay/' . $record->Pay_Data_ID; ?>"><i class="fas fa-pencil-alt"></i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php }
|
||||||
<?php } }?>
|
} ?>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div> <!-- end card body-->
|
||||||
</div><!-- /.box-body -->
|
</div> <!-- end card -->
|
||||||
<!-- <div class="box-footer clearfix">
|
</div><!-- end col-->
|
||||||
|
|
||||||
</div> -->
|
|
||||||
</div><!-- /.box -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</div> <!-- container -->
|
||||||
|
</div> <!-- content -->
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
$(function () {
|
|
||||||
|
|
||||||
$('#datatable').DataTable({
|
|
||||||
"paging": true,
|
|
||||||
"lengthChange": true,
|
|
||||||
"searching": true,
|
|
||||||
"ordering": true,
|
|
||||||
"aaSorting": [[ 0, "asc" ]],
|
|
||||||
"info": true,
|
|
||||||
"autoWidth": true
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@ -8,6 +8,7 @@
|
|||||||
.form-group {
|
.form-group {
|
||||||
padding-bottom: 0%;
|
padding-bottom: 0%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Date-filter-form {
|
.Date-filter-form {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -43,7 +44,8 @@
|
|||||||
.icon-button:hover {
|
.icon-button:hover {
|
||||||
color: #0056b3;
|
color: #0056b3;
|
||||||
}
|
}
|
||||||
.delete_button{
|
|
||||||
|
.delete_button {
|
||||||
border: none;
|
border: none;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
color: red;
|
color: red;
|
||||||
@ -87,11 +89,11 @@
|
|||||||
<th align="right">Created Date</th>
|
<th align="right">Created Date</th>
|
||||||
<!-- <th align="right">Expense Id</th> -->
|
<!-- <th align="right">Expense Id</th> -->
|
||||||
<th align="right">Supplier Name</th>
|
<th align="right">Supplier Name</th>
|
||||||
<th align="right">GST</th>
|
|
||||||
<th align="right">Cost</th>
|
<th align="right">Cost</th>
|
||||||
|
<th align="right">GST</th>
|
||||||
<th align="right">Total</th>
|
<th align="right">Total</th>
|
||||||
<th align="right">Status</th>
|
|
||||||
<th align="right">Payment Method</th>
|
<th align="right">Payment Method</th>
|
||||||
|
<th align="right">Status</th>
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -117,20 +119,20 @@
|
|||||||
<td><?php echo $cdate; ?></td>
|
<td><?php echo $cdate; ?></td>
|
||||||
<!-- <td><?php echo $record['id']; ?></td> -->
|
<!-- <td><?php echo $record['id']; ?></td> -->
|
||||||
<td><?php echo $record['SupplierName']; ?></td>
|
<td><?php echo $record['SupplierName']; ?></td>
|
||||||
<td><?php echo $record['gst']; ?></td>
|
|
||||||
<td><?php echo $record['cost']; ?></td>
|
<td><?php echo $record['cost']; ?></td>
|
||||||
|
<td><?php echo $record['gst']; ?></td>
|
||||||
<td><?php echo $record['total']; ?></td>
|
<td><?php echo $record['total']; ?></td>
|
||||||
<td><?php echo $record['status']; ?></td>
|
|
||||||
<td><?php echo $record['payment_method']; ?></td>
|
<td><?php echo $record['payment_method']; ?></td>
|
||||||
|
<td><?php echo $record['status']; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php if($fileExists == 1){ ?>
|
<?php if ($fileExists == 1) { ?>
|
||||||
<button title="Download FIle" class="download_button" onclick="downloadFile('<?php echo $record['id']; ?>', '<?php echo $record['transporter_file']; ?>')" style="border: none;background-color: white;color: #02a8b5;">
|
<button title="Download FIle" class="download_button" onclick="downloadFile('<?php echo $record['id']; ?>', '<?php echo $record['transporter_file']; ?>')" style="border: none;background-color: white;color: #02a8b5;">
|
||||||
<i class="fas fa-file-download"></i>
|
<i class="fas fa-file-download"></i>
|
||||||
</button>
|
</button>
|
||||||
<button title="Delete File" id="deleteFile" class="delete_button" data-value="<?php echo $record['id'] ?>" data-id="<?php echo $record['id'] ?>" data-file="<?php echo $record['transporter_file'] ?>"><i class="fas fa-trash"></i></button>
|
<button title="Delete File" id="deleteFile" class="delete_button" data-value="<?php echo $record['id'] ?>" data-id="<?php echo $record['id'] ?>" data-file="<?php echo $record['transporter_file'] ?>"><i class="fas fa-trash"></i></button>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<button title="Edit" class="edit-button" data-toggle="modal" data-target="#expenseModal" data-id="<?php echo $record['id']; ?>" style="border: none;background-color: white;color: #02a8b5;" >
|
<button title="Edit" class="edit-button" data-toggle="modal" data-target="#expenseModal" data-id="<?php echo $record['id']; ?>" style="border: none;background-color: white;color: #02a8b5;">
|
||||||
<i class="fas fa-pencil-alt"></i>
|
<i class="fas fa-pencil-alt"></i>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
@ -165,7 +167,7 @@
|
|||||||
<input type="hidden" name="id" id="id">
|
<input type="hidden" name="id" id="id">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<label for="transporterfile" class="col-form-label">Transporter File:</label>
|
<label for="transporterfile" class="col-form-label">Transporter File</label>
|
||||||
<input type="file" name="transporterfile" id="transporterfile" class="form-control">
|
<input type="file" name="transporterfile" id="transporterfile" class="form-control">
|
||||||
<input type="hidden" name="transporterfile_name" id="transporterfile_name">
|
<input type="hidden" name="transporterfile_name" id="transporterfile_name">
|
||||||
<small id="fileHelp" class="form-text text-muted">
|
<small id="fileHelp" class="form-text text-muted">
|
||||||
@ -175,7 +177,7 @@
|
|||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<label for="supplierid" class="col-form-label">Supplier :</label>
|
<label for="supplierid" class="col-form-label">Supplier </label>
|
||||||
<select name="supplierid" id="supplierid" class="form-control" required>
|
<select name="supplierid" id="supplierid" class="form-control" required>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -183,21 +185,19 @@
|
|||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<label for="gst" class="col-form-label">Tax:</label>
|
<label for="cost" class="col-form-label">Cost</label>
|
||||||
<input type="number" name="gst" id="gst" class="form-control" >
|
<input type="number" name="cost" id="cost" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<label for="cost" class="col-form-label">Cost:</label>
|
<label for="gst" class="col-form-label">Tax</label>
|
||||||
<input type="number" name="cost" id="cost" class="form-control">
|
<input type="number" name="gst" id="gst" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<label for="status" class="col-form-label">Status:</label>
|
<label for="status" class="col-form-label">Status</label>
|
||||||
<select name="status" id="status_id" class="form-control" required>
|
<select name="status" id="status_id" class="form-control" required>
|
||||||
<option>Select Status</option>
|
<option>Select Status</option>
|
||||||
<option value="Payment Pending">Payment Pending</option>
|
<option value="Payment Pending">Payment Pending</option>
|
||||||
@ -207,7 +207,7 @@
|
|||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<label for="payment_method" class="col-form-label">Payment Method:</label>
|
<label for="payment_method" class="col-form-label">Payment Method</label>
|
||||||
<select name="payment_method" id="payment_method" class="form-control" required>
|
<select name="payment_method" id="payment_method" class="form-control" required>
|
||||||
<option>Select Payment Method</option>
|
<option>Select Payment Method</option>
|
||||||
<option value="Cash">Cash</option>
|
<option value="Cash">Cash</option>
|
||||||
@ -217,7 +217,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<label for="remarks" class="col-form-label">Remarks:</label>
|
<label for="remarks" class="col-form-label">Remarks</label>
|
||||||
<!-- <input type="text" name="remarks" id="remarks" class="form-control"> -->
|
<!-- <input type="text" name="remarks" id="remarks" class="form-control"> -->
|
||||||
<textarea name="remarks" id="remarks" class="form-control"></textarea>
|
<textarea name="remarks" id="remarks" class="form-control"></textarea>
|
||||||
</div>
|
</div>
|
||||||
@ -258,7 +258,7 @@
|
|||||||
$('#status_id').on('change', function() {
|
$('#status_id').on('change', function() {
|
||||||
togglePaymentMethod();
|
togglePaymentMethod();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#supplierid').select2();
|
$('#supplierid').select2();
|
||||||
@ -269,6 +269,7 @@
|
|||||||
var fileName = $(this).val().split('\\').pop(); // Get the file name
|
var fileName = $(this).val().split('\\').pop(); // Get the file name
|
||||||
$('#file-name-display').text(fileName); // Display the file name
|
$('#file-name-display').text(fileName); // Display the file name
|
||||||
});
|
});
|
||||||
|
|
||||||
function togglePaymentMethodEdit() {
|
function togglePaymentMethodEdit() {
|
||||||
var status = $('#status_id').val();
|
var status = $('#status_id').val();
|
||||||
console.log(status);
|
console.log(status);
|
||||||
@ -289,12 +290,14 @@
|
|||||||
supplier_list[0].forEach(function(supplier) {
|
supplier_list[0].forEach(function(supplier) {
|
||||||
$('#supplierid').append('<option value="' + supplier.SupplierID + '">' + supplier.SupplierName + '</option>');
|
$('#supplierid').append('<option value="' + supplier.SupplierID + '">' + supplier.SupplierName + '</option>');
|
||||||
});
|
});
|
||||||
formActionUrl = '<?php echo base_url().'editExpense' ?>'; // Set action URL for adding
|
formActionUrl = '<?php echo base_url() . 'editExpense' ?>'; // Set action URL for adding
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?php echo base_url().'getExpenseDetails'; ?>',
|
url: '<?php echo base_url() . 'getExpenseDetails'; ?>',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: { id: expenseId },
|
data: {
|
||||||
|
id: expenseId
|
||||||
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
var expense = JSON.parse(response);
|
var expense = JSON.parse(response);
|
||||||
$('#id').val(expense.id);
|
$('#id').val(expense.id);
|
||||||
@ -321,7 +324,7 @@
|
|||||||
|
|
||||||
// Create download link and delete button
|
// Create download link and delete button
|
||||||
var fileLink = '<a class="download_button" href="' + fileUrl + '" target="_blank" download="' + expense.transporter_file + '"><i class=" fas fa-file-download"></i></a>';
|
var fileLink = '<a class="download_button" href="' + fileUrl + '" target="_blank" download="' + expense.transporter_file + '"><i class=" fas fa-file-download"></i></a>';
|
||||||
var deleteButton = '<button id="deleteFile" class="delete_button" data-value="' + expense.id +'" data-id="' + expense.id + '" data-file="' + expense.transporter_file + '"><i class="fas fa-trash"></i></button>';
|
var deleteButton = '<button id="deleteFile" class="delete_button" data-value="' + expense.id + '" data-id="' + expense.id + '" data-file="' + expense.transporter_file + '"><i class="fas fa-trash"></i></button>';
|
||||||
|
|
||||||
// Add the file link and delete button
|
// Add the file link and delete button
|
||||||
$('#transporterfile').after(fileLink + ' ' + deleteButton);
|
$('#transporterfile').after(fileLink + ' ' + deleteButton);
|
||||||
@ -335,7 +338,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$(document).on('click', '#addExpense', function () {
|
$(document).on('click', '#addExpense', function() {
|
||||||
$('.download_button').remove();
|
$('.download_button').remove();
|
||||||
$('.delete_button').remove();
|
$('.delete_button').remove();
|
||||||
$('.modal-title').html('Add Expense');
|
$('.modal-title').html('Add Expense');
|
||||||
@ -355,7 +358,7 @@
|
|||||||
supplier_list[0].forEach(function(supplier) {
|
supplier_list[0].forEach(function(supplier) {
|
||||||
$('#supplierid').append('<option value="' + supplier.SupplierID + '">' + supplier.SupplierName + '</option>');
|
$('#supplierid').append('<option value="' + supplier.SupplierID + '">' + supplier.SupplierName + '</option>');
|
||||||
});
|
});
|
||||||
formActionUrl = '<?php echo base_url().'addExpense' ?>'; // Set action URL for adding
|
formActionUrl = '<?php echo base_url() . 'addExpense' ?>'; // Set action URL for adding
|
||||||
togglePaymentMethodEdit();
|
togglePaymentMethodEdit();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -394,7 +397,7 @@
|
|||||||
// If form is invalid, show native validation messages
|
// If form is invalid, show native validation messages
|
||||||
$('#expenseForm')[0].reportValidity();
|
$('#expenseForm')[0].reportValidity();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// DataTable initialization and date range filter logic (unchanged)
|
// DataTable initialization and date range filter logic (unchanged)
|
||||||
@ -404,9 +407,14 @@
|
|||||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||||
],
|
],
|
||||||
pageLength: 10,
|
pageLength: 10,
|
||||||
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ],
|
lengthMenu: [
|
||||||
|
[10, 20, 30, 50, -1],
|
||||||
|
[10, 20, 30, 50, "All"]
|
||||||
|
],
|
||||||
responsive: true,
|
responsive: true,
|
||||||
order: [[0, 'desc']],
|
order: [
|
||||||
|
[0, 'desc']
|
||||||
|
],
|
||||||
language: {
|
language: {
|
||||||
paginate: {
|
paginate: {
|
||||||
next: '<i class="fas fa-angle-right"></i>',
|
next: '<i class="fas fa-angle-right"></i>',
|
||||||
@ -457,16 +465,19 @@
|
|||||||
toDateInput.value = fromDate;
|
toDateInput.value = fromDate;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '#deleteFile', function() {
|
$(document).on('click', '#deleteFile', function() {
|
||||||
var fileName = $(this).data('file');
|
var fileName = $(this).data('file');
|
||||||
var expenseId = $(this).data('value');
|
var expenseId = $(this).data('value');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?php echo base_url('deleteFile'); ?>',
|
url: '<?php echo base_url('deleteFile'); ?>',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: { file_name: fileName, expense_id: expenseId },
|
data: {
|
||||||
|
file_name: fileName,
|
||||||
|
expense_id: expenseId
|
||||||
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
|
||||||
@ -485,10 +496,7 @@ $(document).on('click', '#deleteFile', function() {
|
|||||||
alert('Error deleting the file.');
|
alert('Error deleting the file.');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,76 +1,117 @@
|
|||||||
|
<!-- ============================================================== -->
|
||||||
|
<!-- End Page content -->
|
||||||
|
<!-- ============================================================== -->
|
||||||
<!-- ============================================================== -->
|
<!-- Footer Start -->
|
||||||
<!-- End Page content -->
|
<footer class="footer">
|
||||||
<!-- ============================================================== -->
|
|
||||||
<!-- Footer Start -->
|
|
||||||
<footer class="footer">
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<b><a href="<?php echo base_url(); ?>">RESICO </a></b> Version 2.0 | <?php echo generateCopyrightNotice(); ?>.
|
<b><a href="<?php echo base_url(); ?>">RESICO </a></b> Version 2.0 | <?php echo generateCopyrightNotice(); ?>.
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<div class="text-md-right footer-links d-none d-sm-block">
|
<div class="text-md-right footer-links d-none d-sm-block"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</footer>
|
||||||
</footer>
|
<!-- end Footer -->
|
||||||
<!-- end Footer -->
|
</div>
|
||||||
</div>
|
<!-- END wrapper -->
|
||||||
<!-- END wrapper -->
|
|
||||||
|
<!-- Vendor js -->
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/js/vendor.min.js"></script>
|
||||||
|
|
||||||
|
<!-- third party js -->
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net/js/jquery.dataTables.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-bs4/js/dataTables.bootstrap4.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-buttons/js/buttons.html5.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-buttons/js/buttons.flash.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-buttons/js/buttons.print.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-select/js/dataTables.select.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/pdfmake/build/pdfmake.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/pdfmake/build/vfs_fonts.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/table-to-json/1.0.0/jquery.tabletojson.js"></script>
|
||||||
|
|
||||||
|
<!-- Datatables init -->
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/js/pages/datatables.init.js"></script>
|
||||||
|
|
||||||
|
<!-- App js -->
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/js/app.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Morris Chart -->
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/morris.js06/morris.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/raphael/raphael.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/js/pages/morris.init.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/c3/c3.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/js/pages/c3.init.js"></script>
|
||||||
|
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/select2/js/select2.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
|
||||||
|
<!-- Plugins js-->
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/libs/twitter-bootstrap-wizard/jquery.bootstrap.wizard.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Init js-->
|
||||||
|
<script src="<?php echo base_url(); ?>public/new_assets/js/pages/form-wizard.init.js"></script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
var table = $('.ria_data_table').DataTable({
|
||||||
|
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
||||||
|
buttons: [
|
||||||
|
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
||||||
|
],
|
||||||
|
pageLength: 10, // Default rows per page
|
||||||
|
lengthMenu: [
|
||||||
|
[10, 20, 30, 50, -1],
|
||||||
|
[10, 20, 30, 50, "All"]
|
||||||
|
], // Rows per page options
|
||||||
|
responsive: true, // Responsive table
|
||||||
|
order: [], // Default ordering (column index 0, descending)
|
||||||
|
language: {
|
||||||
|
paginate: {
|
||||||
|
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
||||||
|
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#hdate').addClass('form-control');
|
||||||
|
$('#hname').addClass('form-control');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Zoho Sync FUnction
|
||||||
|
|
||||||
|
function synczohobooks() {
|
||||||
|
|
||||||
|
var sync = true
|
||||||
|
$('#loader_wrapper').css("display", "block");
|
||||||
|
$.ajax({
|
||||||
|
// $('#loadingDiv').show();
|
||||||
|
|
||||||
<!-- Vendor js -->
|
url: "<?php echo base_url() ?>user/zohobooks_api_fetch_all",
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/js/vendor.min.js"></script>
|
type: "post",
|
||||||
|
data: {
|
||||||
|
sync
|
||||||
|
},
|
||||||
|
|
||||||
<!-- third party js -->
|
success: function(data) {
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net/js/jquery.dataTables.min.js"></script>
|
console.log(data);
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-bs4/js/dataTables.bootstrap4.min.js"></script>
|
alert("Sync Completed");
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
|
},
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js"></script>
|
failure: function(data) {
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
|
alert("Failed");
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js"></script>
|
},
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-buttons/js/buttons.html5.min.js"></script>
|
complete: function() {
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-buttons/js/buttons.flash.min.js"></script>
|
$('#loader_wrapper').css("display", "none");
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-buttons/js/buttons.print.min.js"></script>
|
}
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
|
});
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-select/js/dataTables.select.min.js"></script>
|
}
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/pdfmake/build/pdfmake.min.js"></script>
|
</script>
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/pdfmake/build/vfs_fonts.js"></script>
|
</body>
|
||||||
|
|
||||||
<!-- third party js ends -->
|
|
||||||
|
|
||||||
<!-- Datatables init -->
|
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/js/pages/datatables.init.js"></script>
|
|
||||||
|
|
||||||
<!-- App js -->
|
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/js/app.min.js"></script>
|
|
||||||
|
|
||||||
<!--Morris Chart-->
|
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/morris.js06/morris.min.js"></script>
|
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/raphael/raphael.min.js"></script>
|
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/js/pages/morris.init.js"></script>
|
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/c3/c3.min.js"></script>
|
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/js/pages/c3.init.js"></script>
|
|
||||||
|
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/select2/js/select2.min.js"></script>
|
|
||||||
|
|
||||||
<!-- <script src="<?php echo base_url(); ?>public/new_assets/js/validation.js" type="text/javascript"></script> -->
|
|
||||||
|
|
||||||
|
|
||||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
@ -11,8 +11,7 @@
|
|||||||
<link rel="shortcut icon" href="<?php echo base_url(); ?>public/new_assets/images/RI_favicon.png">
|
<link rel="shortcut icon" href="<?php echo base_url(); ?>public/new_assets/images/RI_favicon.png">
|
||||||
|
|
||||||
|
|
||||||
<!-- icons -->
|
|
||||||
<link href="<?php echo base_url(); ?>public/new_assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
|
||||||
<!-- third party css -->
|
<!-- third party css -->
|
||||||
<link href="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
<link href="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||||
<link href="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
<link href="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||||
@ -31,37 +30,43 @@
|
|||||||
<link href="<?php echo base_url(); ?>public/new_assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
<link href="<?php echo base_url(); ?>public/new_assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
||||||
<link href="<?php echo base_url(); ?>public/new_assets/libs/select2/css/select2.min.css" rel="stylesheet" type="text/css" />
|
<link href="<?php echo base_url(); ?>public/new_assets/libs/select2/css/select2.min.css" rel="stylesheet" type="text/css" />
|
||||||
|
|
||||||
<!-- jquery -->
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
||||||
|
|
||||||
<link href="<?php echo base_url(); ?>public/new_assets/libs/c3/c3.min.css" rel="stylesheet" type="text/css" />
|
<link href="<?php echo base_url(); ?>public/new_assets/libs/c3/c3.min.css" rel="stylesheet" type="text/css" />
|
||||||
|
|
||||||
|
<!-- Latest jQuery -->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Chart.js -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- DataTables CSS -->
|
||||||
<link href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css" rel="stylesheet">
|
<link href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css" rel="stylesheet">
|
||||||
<!-- DataTables Buttons CSS -->
|
|
||||||
<link href="https://cdn.datatables.net/buttons/2.3.6/css/buttons.dataTables.min.css" rel="stylesheet">
|
<link href="https://cdn.datatables.net/buttons/2.3.6/css/buttons.dataTables.min.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- jQuery -->
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
|
||||||
<!-- DataTables JS -->
|
<!-- DataTables JS -->
|
||||||
<script src="https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js"></script>
|
<script src="https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js"></script>
|
||||||
<!-- DataTables Buttons JS -->
|
|
||||||
<script src="https://cdn.datatables.net/buttons/2.3.6/js/dataTables.buttons.min.js"></script>
|
<script src="https://cdn.datatables.net/buttons/2.3.6/js/dataTables.buttons.min.js"></script>
|
||||||
<script src="https://cdn.datatables.net/buttons/2.3.6/js/buttons.html5.min.js"></script>
|
<script src="https://cdn.datatables.net/buttons/2.3.6/js/buttons.html5.min.js"></script>
|
||||||
<script src="https://cdn.datatables.net/buttons/2.3.6/js/buttons.print.min.js"></script>
|
<script src="https://cdn.datatables.net/buttons/2.3.6/js/buttons.print.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
<!-- JSZip for Excel export -->
|
<!-- JSZip for Excel export -->
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||||
|
|
||||||
<!-- pdfmake for PDF export -->
|
<!-- pdfmake for PDF export -->
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
|
||||||
|
|
||||||
|
<!-- Additional Styles -->
|
||||||
<link href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css" rel="stylesheet">
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Scroll the table left to right -->
|
<!-- Scroll the table left to right -->
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
<link href="<?php echo base_url(); ?>public/new_assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet" type="text/css" />
|
<link href="<?php echo base_url(); ?>public/new_assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet" type="text/css" />
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@ -137,12 +142,12 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 4px 2px;
|
margin: 4px 2px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-cancel:hover {
|
.btn-cancel:hover {
|
||||||
background-color: #02a8b5; /* Darker red on hover */
|
background-color: #02a8b5; /* Darker red on hover */
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@ -213,6 +218,9 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
|
.dataTables_wrapper .dataTables_paginate .paginate_button{
|
||||||
|
padding: .0em 0em !important;
|
||||||
|
}
|
||||||
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
|
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
|
||||||
color: black !important; /* Text color */
|
color: black !important; /* Text color */
|
||||||
border: 1px solid white; /* Light border color */
|
border: 1px solid white; /* Light border color */
|
||||||
@ -310,7 +318,8 @@
|
|||||||
<div class="dropdown-menu dropdown-menu-right profile-dropdown ">
|
<div class="dropdown-menu dropdown-menu-right profile-dropdown ">
|
||||||
<!-- item-->
|
<!-- item-->
|
||||||
<div class="dropdown-header noti-title">
|
<div class="dropdown-header noti-title">
|
||||||
<h6 class="text-overflow m-0"><?php echo "Welcome ".$role_text." !"; ?><?php //echo $role; ?></h6>
|
<h6 class="text-overflow m-0"><?php echo "Welcome ".$name." !"; ?><?php //echo $role; ?></h6>
|
||||||
|
<!-- <h6 class="text-overflow m-0"><?php echo "Welcome ".$role_text." !"; ?><?php //echo $role; ?></h6> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- item-->
|
<!-- item-->
|
||||||
@ -389,15 +398,19 @@
|
|||||||
<div class="collapse navbar-collapse" id="topnav-menu-content">
|
<div class="collapse navbar-collapse" id="topnav-menu-content">
|
||||||
<ul class="navbar-nav">
|
<ul class="navbar-nav">
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-dashboard" role="button"
|
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>sales_dashboard" role="button"
|
||||||
|
aria-expanded="false">
|
||||||
|
<i class="ri-dashboard-line mr-1"></i> DASHBOARD
|
||||||
|
</a>
|
||||||
|
<!-- <a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-dashboard" role="button"
|
||||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<i class="ri-dashboard-line mr-1"></i> DASHBOARDS <div class="arrow-down"></div>
|
<i class="ri-dashboard-line mr-1"></i> DASHBOARD <div class="arrow-down"></div>
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu" aria-labelledby="topnav-dashboard">
|
<div class="dropdown-menu" aria-labelledby="topnav-dashboard">
|
||||||
<a href="<?php echo base_url(); ?>dashboard" class="dropdown-item">Home</a>
|
<a href="<?php echo base_url(); ?>dashboard" class="dropdown-item">Home</a>
|
||||||
<!-- <a href="https://vu.venbait.in/d/d9eb820b-60aa-4fe6-9de0-531924185b77/sales-at-a-glance?orgId=2&from=1715215911333&to=1715237511333" class="dropdown-item">Sales</a> -->
|
<a href="https://vu.venbait.in/d/d9eb820b-60aa-4fe6-9de0-531924185b77/sales-at-a-glance?orgId=2&from=1715215911333&to=1715237511333" class="dropdown-item">Sales</a>
|
||||||
<a href="<?php echo base_url(); ?>sales_dashboard" class="dropdown-item">Sales</a>
|
<a href="<?php echo base_url(); ?>sales_dashboard" class="dropdown-item">Sales</a>
|
||||||
</div>
|
</div> -->
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
@ -406,7 +419,8 @@
|
|||||||
<i class="ri-file-paper-2-line mr-1"></i> SALES <div class="arrow-down"></div>
|
<i class="ri-file-paper-2-line mr-1"></i> SALES <div class="arrow-down"></div>
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu" aria-labelledby="topnav-hr">
|
<div class="dropdown-menu" aria-labelledby="topnav-hr">
|
||||||
<a href="<?php echo base_url(); ?>sales_invoice" class="dropdown-item"><i class="ri-file-list-3-line align-middle mr-1"></i> Sales Invoice</a>
|
<a href="<?php echo base_url(); ?>sales_invoice" class="dropdown-item"><i class="ri-file-list-3-line align-middle mr-1"></i>Invoice</a>
|
||||||
|
<a href="<?php echo base_url(); ?>dashboard" class="dropdown-item"><i class="ri-refresh-line align-middle mr-1"></i>Sync With Zoho Books</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
@ -473,10 +487,19 @@
|
|||||||
<div class="dropdown-menu" aria-labelledby="topnav-payslip">
|
<div class="dropdown-menu" aria-labelledby="topnav-payslip">
|
||||||
<a href="<?php echo base_url(); ?>monthlypay" class="dropdown-item">Monthly Pay Information </a>
|
<a href="<?php echo base_url(); ?>monthlypay" class="dropdown-item">Monthly Pay Information </a>
|
||||||
<a href="<?php echo base_url(); ?>ViewPay" class="dropdown-item">PaySlip Generator</a>
|
<a href="<?php echo base_url(); ?>ViewPay" class="dropdown-item">PaySlip Generator</a>
|
||||||
<a href="<?php echo base_url(); ?>PaysilpListing" class="dropdown-item">Edit Payslip</a>
|
<!-- <a href="<?php echo base_url(); ?>PaysilpListing" class="dropdown-item">Edit Payslip</a> -->
|
||||||
<a href="<?php echo base_url(); ?>emppayListings" class="dropdown-item">Employee Salary Details</a>
|
<a href="<?php echo base_url(); ?>emppayListings" class="dropdown-item">Employee Loan Details</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dropdown">
|
||||||
|
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-leave"
|
||||||
|
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
<i class="fas fa-calendar-times align-middle mr-1"></i> Leave <div class="arrow-down"></div>
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-menu" aria-labelledby="topnav-leave">
|
||||||
<a href="<?php echo base_url(); ?>publicholidays" class="dropdown-item">Public Holidays</a>
|
<a href="<?php echo base_url(); ?>publicholidays" class="dropdown-item">Public Holidays</a>
|
||||||
<a href="<?php echo base_url(); ?>leavereports" class="dropdown-item">Leave Reports</a>
|
<a href="<?php echo base_url(); ?>leavereports" class="dropdown-item"> Reports</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -500,7 +523,7 @@
|
|||||||
<a href="<?php echo base_url(); ?>transporterListing" class="dropdown-item">Transporter Details</a>
|
<a href="<?php echo base_url(); ?>transporterListing" class="dropdown-item">Transporter Details</a>
|
||||||
<a href="<?php echo base_url(); ?>costListing" class="dropdown-item">Cost Details</a>
|
<a href="<?php echo base_url(); ?>costListing" class="dropdown-item">Cost Details</a>
|
||||||
<a href="<?php echo base_url(); ?>assetListing" class="dropdown-item">Asset Details</a>
|
<a href="<?php echo base_url(); ?>assetListing" class="dropdown-item">Asset Details</a>
|
||||||
<a href="<?php echo base_url(); ?>companyview" class="dropdown-item">Company Master</a>
|
<a href="<?php echo base_url(); ?>companyview" class="dropdown-item">Business Settings</a>
|
||||||
<a href="<?php echo base_url(); ?>configlisting" class="dropdown-item">Config Details</a>
|
<a href="<?php echo base_url(); ?>configlisting" class="dropdown-item">Config Details</a>
|
||||||
<a href="<?php echo base_url(); ?>departmentListing" class="dropdown-item">Department Details</a>
|
<a href="<?php echo base_url(); ?>departmentListing" class="dropdown-item">Department Details</a>
|
||||||
<a href="<?php echo base_url(); ?>rawmaterialListing" class="dropdown-item">Material Details</a>
|
<a href="<?php echo base_url(); ?>rawmaterialListing" class="dropdown-item">Material Details</a>
|
||||||
|
|||||||
@ -139,7 +139,7 @@
|
|||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label class="col-form-label">Invoice Date<span class="text-danger">*</span></label>
|
<label class="col-form-label">Invoice Date<span class="text-danger">*</span></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="date" class="form-control" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="InvoiceDate" name="InvoiceDate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off">
|
<input class="form-control" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="InvoiceDate" name="InvoiceDate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off">
|
||||||
<!-- <input type="text" class="form-control" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="InvoiceDate" name="InvoiceDate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off"> -->
|
<!-- <input type="text" class="form-control" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="InvoiceDate" name="InvoiceDate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off"> -->
|
||||||
<!-- <div class="input-group-append">
|
<!-- <div class="input-group-append">
|
||||||
<span class="input-group-text">
|
<span class="input-group-text">
|
||||||
@ -161,7 +161,7 @@
|
|||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label class="col-form-label">Material Received Date<span class="text-danger">*</span></label>
|
<label class="col-form-label">Material Received Date<span class="text-danger">*</span></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="date" class="form-control" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="MaterialRcvdDate" name="MaterialRcvdDate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off">
|
<input class="form-control" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="MaterialRcvdDate" name="MaterialRcvdDate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off">
|
||||||
<!-- <input type="text" class="form-control" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="MaterialRcvdDate" name="MaterialRcvdDate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off">
|
<!-- <input type="text" class="form-control" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="MaterialRcvdDate" name="MaterialRcvdDate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off">
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<span class="input-group-text">
|
<span class="input-group-text">
|
||||||
|
|||||||
@ -1,58 +1,60 @@
|
|||||||
|
<script src="<?php echo base_url() ?>public/assets/tabletoexport/jquery.tableexport.v2.js"></script>
|
||||||
<script src="<?php echo base_url()?>public/assets/tabletoexport/jquery.tableexport.v2.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
|
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
|
||||||
<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
||||||
<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.num {
|
.num {
|
||||||
text-align:right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.dataTables_empty {
|
.dataTables_empty {
|
||||||
text-align: center !important;
|
text-align: center !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="content-wrapper">
|
|
||||||
<!-- Content Header (Page header) -->
|
|
||||||
<section class="content-header">
|
|
||||||
<h1>
|
|
||||||
<center>Leave Report <?php if(!empty($selectedfiscalyears)) {echo " ( ". $selectedfiscalyears." )";} ?></center>
|
|
||||||
</h1>
|
|
||||||
</section>
|
|
||||||
<section class="content">
|
|
||||||
|
|
||||||
|
<div class="content-page">
|
||||||
|
<div class="content">
|
||||||
|
<!-- Start Content-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<!-- start page title -->
|
||||||
|
<div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-6">
|
||||||
<div class="box">
|
<div class="page-title-box page-title-box-alt">
|
||||||
<div class="box-header">
|
<h4 class="page-title">
|
||||||
|
<center>Leave Report <?php if (!empty($selectedfiscalyears)) {
|
||||||
|
echo " ( " . $selectedfiscalyears . " )";
|
||||||
|
} ?></center>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
<form action="<?php echo base_url() ?>leavereports" method="POST" id="searchList">
|
<form action="<?php echo base_url() ?>leavereports" method="POST" id="searchList">
|
||||||
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3" style="margin: 10px;">
|
||||||
<?php if(!empty($fiscalyears))
|
<?php if (!empty($fiscalyears)) {
|
||||||
{
|
|
||||||
foreach ($fiscalyears as $fy):
|
foreach ($fiscalyears as $fy):
|
||||||
$options[$fy] = $fy;
|
$options[$fy] = $fy;
|
||||||
endforeach;
|
endforeach;
|
||||||
}
|
}
|
||||||
echo form_dropdown('fyr',$options,set_value('fyr',$selectedfiscalyears),'id="fyr"' ,'class="form-control select2"');?>
|
echo form_dropdown('fyr', $options, set_value('fyr', $selectedfiscalyears), 'id="fyr"', 'class="form-control select2"'); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|
||||||
<input type="button" value="View Report" class="btn btn-success" id="report">
|
<input type="button" value="View Report" class="btn btn-success" id="report">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<br>
|
<div class="card-body">
|
||||||
</div>
|
<table id="leavelistings" class="table dt-responsive nowrap w-100">
|
||||||
</div>
|
<thead>
|
||||||
|
|
||||||
<div class="box-body">
|
|
||||||
<table id="leavelistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
|
||||||
<thead style="background-color: #ddd;">
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>S.No</th>
|
<th>S.No</th>
|
||||||
<th>Employee Name</th>
|
<th>Employee Name</th>
|
||||||
@ -71,19 +73,28 @@
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $index; ?></td>
|
<td><?php echo $index; ?></td>
|
||||||
<?php if((int)$rec->NoofAbsentDays != 0){ ?>
|
<?php if ((int)$rec->NoofAbsentDays != 0) { ?>
|
||||||
<td><?php echo '<a title="View Monthwise Details" href="'.$base.'leavemonthlyreports/'.$rec->EmpID.'/'.$selectedfiscalyears.'">'.$rec->EmpID.'-'.$rec->FullName.'</a>'; ?></td>
|
<td><?php echo '<a title="View Monthwise Details" href="' . $base . 'leavemonthlyreports/' . $rec->EmpID . '/' . $selectedfiscalyears . '">' . $rec->EmpID . '-' . $rec->FullName . '</a>'; ?></td>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<td><?php echo $rec->EmpID.'-'.$rec->FullName ; ?></td>
|
<td><?php echo $rec->EmpID . '-' . $rec->FullName; ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<!-- <td style="text-align:right;"><?php // if (!empty($rec->NoofWorkedDays)) { echo number_format((int)$rec->NoofWorkedDays, 0, '.', ''); } else { echo "0"; } ?></td> -->
|
<!-- <td style="text-align:right;"><?php // if (!empty($rec->NoofWorkedDays)) { echo number_format((int)$rec->NoofWorkedDays, 0, '.', ''); } else { echo "0"; }
|
||||||
<td style="text-align:right;"><?php if (!empty($rec->NoofAbsentDays)) { echo number_format((int)$rec->NoofAbsentDays, 0, '.', ''); } else { echo "0"; } ?></td>
|
?></td> -->
|
||||||
<td style="text-align:right;"><?php if (!empty($rec->NoofPaidLeaveDays)) { echo number_format((int)$rec->NoofPaidLeaveDays, 0, '.', ''); } else { echo "0"; } ?></td>
|
<td style="text-align:left;"><?php if (!empty($rec->NoofAbsentDays)) {
|
||||||
|
echo number_format((int)$rec->NoofAbsentDays, 0, '.', '');
|
||||||
|
} else {
|
||||||
|
echo "0";
|
||||||
|
} ?></td>
|
||||||
|
<td style="text-align:left;"><?php if (!empty($rec->NoofPaidLeaveDays)) {
|
||||||
|
echo number_format((int)$rec->NoofPaidLeaveDays, 0, '.', '');
|
||||||
|
} else {
|
||||||
|
echo "0";
|
||||||
|
} ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}// else {
|
} // else {
|
||||||
?>
|
?>
|
||||||
<!-- <tr>
|
<!-- <tr>
|
||||||
<td colspan="4" style="text-align:center;">No data found</td>
|
<td colspan="4" style="text-align:center;">No data found</td>
|
||||||
@ -93,21 +104,25 @@
|
|||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div><!-- /.box-body -->
|
</div> <!-- end card body-->
|
||||||
</div><!-- /.box -->
|
</div> <!-- end card -->
|
||||||
|
</div><!-- end col-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</div> <!-- container -->
|
||||||
|
</div> <!-- content -->
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function() {
|
||||||
$('#leavelistings').DataTable({
|
$('#leavelistings').DataTable({
|
||||||
"paging": true,
|
"paging": true,
|
||||||
"lengthChange": true,
|
"lengthChange": true,
|
||||||
"searching": true,
|
"searching": true,
|
||||||
"ordering": true,
|
"ordering": true,
|
||||||
"aaSorting": [[0, "asc"]],
|
"aaSorting": [
|
||||||
|
[0, "asc"]
|
||||||
|
],
|
||||||
"info": true,
|
"info": true,
|
||||||
"autoWidth": true,
|
"autoWidth": true,
|
||||||
"language": {
|
"language": {
|
||||||
@ -115,28 +130,29 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$('#report').click(function(){
|
$('#report').click(function() {
|
||||||
$("#searchList").submit();
|
$("#searchList").submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#fyr').addClass('form-control');
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
// var name = "<?php // echo 'Leave Report for ' . $selectedfiscalyears;
|
||||||
// var name = "<?php // echo 'Leave Report for ' . $selectedfiscalyears;?>";
|
?>";
|
||||||
// $("#leavelistings").tableExport({
|
// $("#leavelistings").tableExport({
|
||||||
// bootstrap: true,
|
// bootstrap: true,
|
||||||
// separator: ",",
|
// separator: ",",
|
||||||
// headings: true,
|
// headings: true,
|
||||||
// buttonContent: "Export",
|
// buttonContent: "Export",
|
||||||
// addClass: "",
|
// addClass: "",
|
||||||
// defaultClass: "btn",
|
// defaultClass: "btn",
|
||||||
// defaultTheme: "btn-default",
|
// defaultTheme: "btn-default",
|
||||||
// type: "csv",
|
// type: "csv",
|
||||||
// fileName: name,
|
// fileName: name,
|
||||||
// position: "bottom",
|
// position: "bottom",
|
||||||
// stripQuotes: true
|
// stripQuotes: true
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -1,11 +1,10 @@
|
|||||||
|
<script src="<?php echo base_url() ?>public/assets/tabletoexport/jquery.tableexport.v2.js"></script>
|
||||||
<script src="<?php echo base_url()?>public/assets/tabletoexport/jquery.tableexport.v2.js"></script>
|
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
||||||
<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
||||||
<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.num {
|
.num {
|
||||||
text-align:right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.dataTables_empty {
|
.dataTables_empty {
|
||||||
@ -16,7 +15,7 @@
|
|||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1>
|
<h1>
|
||||||
<center><strong>" <?php echo $MonthwiseReport[0]->EmpID ?> - <?php echo $MonthwiseReport[0]->FullName ?> "</strong> - Monthwise Leave Reports <?= ' ( '.$finyear.' )' ?></center>
|
<center></center>
|
||||||
</h1>
|
</h1>
|
||||||
</section>
|
</section>
|
||||||
<section class="content" id="content">
|
<section class="content" id="content">
|
||||||
@ -24,8 +23,50 @@
|
|||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<table id="leavelistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
<table id="" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div><!-- /.box-body -->
|
||||||
|
</div><!-- /.box -->
|
||||||
|
</div><!-- /. col-xs-12 -->
|
||||||
|
</div><!-- /.inital row -->
|
||||||
|
</section><!-- /.content section closed -->
|
||||||
|
</div><!-- /.content wrapper -->
|
||||||
|
|
||||||
|
|
||||||
|
<div class="content-page">
|
||||||
|
<div class="content">
|
||||||
|
<!-- Start Content-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<!-- start page title -->
|
||||||
|
<div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="page-title-box page-title-box-alt">
|
||||||
|
<h4 class="page-title">
|
||||||
|
<center><strong>" <?php echo $MonthwiseReport[0]->EmpID ?> - <?php echo $MonthwiseReport[0]->FullName ?> "</strong> - Monthwise Leave Reports <?= ' ( ' . $finyear . ' )' ?></center>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<form action="<?php echo base_url() ?>leavereports" method="POST" id="searchList">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="card-body">
|
||||||
|
<table id="leavelistingss" class="table dt-responsive nowrap w-100 ria_data_table">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>S.No</th>
|
<th>S.No</th>
|
||||||
<th>Employee Id</th>
|
<th>Employee Id</th>
|
||||||
@ -38,26 +79,35 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$index=0;
|
$index = 0;
|
||||||
if(!empty($MonthwiseReport))
|
if (!empty($MonthwiseReport)) {
|
||||||
{ foreach($MonthwiseReport as $record)
|
foreach ($MonthwiseReport as $record) {
|
||||||
{ $index++;
|
$index++;
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td style="text-align:right;"><?php echo $index; ?></td>
|
<td style="text-align:left;"><?php echo $index; ?></td>
|
||||||
<td style="text-align:right;"><?php echo $record->EmpID ?></td>
|
<td style="text-align:left;"><?php echo $record->EmpID ?></td>
|
||||||
<td><?php echo $record->FullName ?></td>
|
<td><?php echo $record->FullName ?></td>
|
||||||
<td><?php
|
<td><?php
|
||||||
$split_val = explode('-',$record->Month_Year);
|
$split_val = explode('-', $record->Month_Year);
|
||||||
$year_val = $split_val[0];
|
$year_val = $split_val[0];
|
||||||
$month_val = $split_val[1];
|
$month_val = $split_val[1];
|
||||||
$monthName = date("M", mktime(0, 0, 0, $month_val, 10));
|
$monthName = date("M", mktime(0, 0, 0, $month_val, 10));
|
||||||
echo $monthName . " , ".$year_val
|
echo $monthName . " , " . $year_val
|
||||||
?></td>
|
?></td>
|
||||||
<!-- <td style="text-align:right;"><?php // if (!empty($record->NoofWorkedDays)) { echo number_format((int)$record->NoofWorkedDays, 0, '.', ''); } else { echo "0"; } ?></td> -->
|
<!-- <td style="text-align:right;"><?php // if (!empty($record->NoofWorkedDays)) { echo number_format((int)$record->NoofWorkedDays, 0, '.', ''); } else { echo "0"; }
|
||||||
<td style="text-align:right;"><?php if (!empty($record->NoofAbsentDays)) { echo number_format((int)$record->NoofAbsentDays, 0, '.', ''); } else { echo "0"; } ?></td>
|
?></td> -->
|
||||||
<td style="text-align:right;"><?php if (!empty($record->NoofPaidLeaveDays)) { echo number_format((int)$record->NoofPaidLeaveDays, 0, '.', ''); } else { echo "0"; } ?></td>
|
<td style="text-align:left;"><?php if (!empty($record->NoofAbsentDays)) {
|
||||||
|
echo number_format((int)$record->NoofAbsentDays, 0, '.', '');
|
||||||
|
} else {
|
||||||
|
echo "0";
|
||||||
|
} ?></td>
|
||||||
|
<td style="text-align:left;"><?php if (!empty($record->NoofPaidLeaveDays)) {
|
||||||
|
echo number_format((int)$record->NoofPaidLeaveDays, 0, '.', '');
|
||||||
|
} else {
|
||||||
|
echo "0";
|
||||||
|
} ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -65,24 +115,25 @@
|
|||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div><!-- /.box-body -->
|
</div> <!-- end card body-->
|
||||||
</div><!-- /.box -->
|
</div> <!-- end card -->
|
||||||
</div><!-- /. col-xs-12 -->
|
</div><!-- end col-->
|
||||||
</div><!-- /.inital row -->
|
</div>
|
||||||
</section><!-- /.content section closed -->
|
</div>
|
||||||
</div><!-- /.content wrapper -->
|
</div> <!-- container -->
|
||||||
|
</div> <!-- content -->
|
||||||
|
</div>
|
||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
/*-----------------on ready function ------------------------------- */
|
/*-----------------on ready function ------------------------------- */
|
||||||
$(function () {
|
$(function() {
|
||||||
/*-----------------for data table ------------------------------ */
|
/*-----------------for data table ------------------------------ */
|
||||||
var t = $('#leavelistings').DataTable( {
|
var t = $('#leavelistings').DataTable({
|
||||||
"columnDefs": [ {
|
"columnDefs": [{
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"orderable": false,
|
"orderable": false,
|
||||||
"targets": 0
|
"targets": 0
|
||||||
} ],
|
}],
|
||||||
"searching": true,
|
"searching": true,
|
||||||
"lengthChange": true,
|
"lengthChange": true,
|
||||||
"info": true,
|
"info": true,
|
||||||
@ -91,31 +142,36 @@ $(function () {
|
|||||||
"language": {
|
"language": {
|
||||||
"emptyTable": "No data found"
|
"emptyTable": "No data found"
|
||||||
},
|
},
|
||||||
"order": [[ 0, 'asc' ]]
|
"order": [
|
||||||
} );
|
[0, 'asc']
|
||||||
|
]
|
||||||
|
});
|
||||||
/**---------------for table index value using datatable -------- */
|
/**---------------for table index value using datatable -------- */
|
||||||
t.on( 'order.dt search.dt', function () {
|
t.on('order.dt search.dt', function() {
|
||||||
t.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
|
t.column(0, {
|
||||||
cell.innerHTML = i+1;
|
search: 'applied',
|
||||||
} );
|
order: 'applied'
|
||||||
} ).draw();
|
}).nodes().each(function(cell, i) {
|
||||||
});
|
cell.innerHTML = i + 1;
|
||||||
|
});
|
||||||
|
}).draw();
|
||||||
|
});
|
||||||
|
|
||||||
$("#report").click(function(){
|
$("#report").click(function() {
|
||||||
|
|
||||||
$("#formid").attr("method", "post");
|
$("#formid").attr("method", "post");
|
||||||
|
|
||||||
$("#formid").attr("action", "<?php echo base_url() ?>payslip/Bonusreport");
|
$("#formid").attr("action", "<?php echo base_url() ?>payslip/Bonusreport");
|
||||||
|
|
||||||
$('#formid').submit();
|
$('#formid').submit();
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/*-----------------for export execl button------------------------------- */
|
/*-----------------for export execl button------------------------------- */
|
||||||
var employee = "<?php echo $MonthwiseReport[0]->EmpID ?> - <?php echo $MonthwiseReport[0]->FullName ?>";
|
var employee = "<?php echo $MonthwiseReport[0]->EmpID ?> - <?php echo $MonthwiseReport[0]->FullName ?>";
|
||||||
var fin_year = "<?php echo $finyear ?>";
|
var fin_year = "<?php echo $finyear ?>";
|
||||||
var name = "<?php echo 'Leave Month Report for '.$MonthwiseReport[0]->EmpID.''.$MonthwiseReport[0]->FullName .' ( '.$finyear.' )' ?>";
|
var name = "<?php echo 'Leave Month Report for ' . $MonthwiseReport[0]->EmpID . '' . $MonthwiseReport[0]->FullName . ' ( ' . $finyear . ' )' ?>";
|
||||||
$("#leavelistings").tableExport({
|
$("#leavelistings").tableExport({
|
||||||
bootstrap: true,
|
bootstrap: true,
|
||||||
separator: ",",
|
separator: ",",
|
||||||
@ -128,7 +184,5 @@ var name = "<?php echo 'Leave Month Report for '.$MonthwiseReport[0]->EmpID.''.$
|
|||||||
fileName: name,
|
fileName: name,
|
||||||
position: "bottom",
|
position: "bottom",
|
||||||
stripQuotes: true
|
stripQuotes: true
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -27,8 +27,7 @@
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
|
||||||
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('html').bind('keypress', function(e) {
|
$('html').bind('keypress', function(e) {
|
||||||
@ -85,18 +84,19 @@
|
|||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<!--<center><h3 class="box-title">-->
|
<!--<center><h3 class="box-title">-->
|
||||||
<div class="box-tools">
|
<div class="box-tools">
|
||||||
<!-- <form action="<?php echo base_url() ?>assetListing" method="POST" id="searchList">-->
|
|
||||||
<p><b>The <span style="background-color:#ff4d4d;">Red</span> highlighted Employee have loan
|
<!-- <p><b>
|
||||||
|
The <span style="background-color:#ff4d4d;">Red</span> highlighted Employee have loan
|
||||||
to pay. Put <span style="background-color:#66ff33;">'NA'</span> for Skip Current
|
to pay. Put <span style="background-color:#66ff33;">'NA'</span> for Skip Current
|
||||||
Month Loan Due.</b></p>
|
Month Loan Due.
|
||||||
<form action="<?php echo base_url() ?>monthlyListings" method="POST" id="searchList">
|
</b></p> -->
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
<!--</h3></center>-->
|
<!--</h3></center>-->
|
||||||
|
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<?php
|
<?php
|
||||||
//print_r($sample);
|
|
||||||
$year = date("Y");
|
$year = date("Y");
|
||||||
$current = date("m-Y");
|
$current = date("m-Y");
|
||||||
|
|
||||||
@ -296,27 +296,27 @@
|
|||||||
<td style="max-width:80px"><?php echo $record->TotalSalary; ?></td>
|
<td style="max-width:80px"><?php echo $record->TotalSalary; ?></td>
|
||||||
<td style="max-width:80px">
|
<td style="max-width:80px">
|
||||||
<?php $perDaySalary = $record->TotalSalary / $record->NoofDays;
|
<?php $perDaySalary = $record->TotalSalary / $record->NoofDays;
|
||||||
echo number_format($perDaySalary, 2); ?>
|
echo number_format($perDaySalary, 2, '.', ''); ?>
|
||||||
</td>
|
</td>
|
||||||
<td style="max-width:80px">
|
<td style="max-width:80px">
|
||||||
<?php $workedSalary = $perDaySalary * ($record->Days_worked + $record->sunday_count);
|
<?php $workedSalary = $perDaySalary * ($record->Days_worked + $record->sunday_count);
|
||||||
echo number_format($workedSalary, 2); ?>
|
echo number_format($workedSalary, 2, '.', ''); ?>
|
||||||
</td>
|
</td>
|
||||||
<td style="max-width:80px">
|
<td style="max-width:80px">
|
||||||
<?php $perHrSalary = $perDaySalary / 8;
|
<?php $perHrSalary = $perDaySalary / 8;
|
||||||
echo number_format($perHrSalary, 2); ?>
|
echo number_format($perHrSalary, 2); ?>
|
||||||
</td>
|
</td>
|
||||||
<td style="max-width:80px"><?php echo number_format($workedSalary, 2); ?></td>
|
<td style="max-width:80px"><?php echo number_format($workedSalary, 2, '.', ''); ?></td>
|
||||||
<td style="max-width:80px">
|
<td style="max-width:80px">
|
||||||
<?php $basicWorked = $workedSalary * 70 / 100;
|
<?php $basicWorked = $workedSalary * 70 / 100;
|
||||||
echo number_format($basicWorked, 2); ?>
|
echo number_format($basicWorked, 2, '.', ''); ?>
|
||||||
</td>
|
</td>
|
||||||
<td style="max-width:80px">
|
<td style="max-width:80px">
|
||||||
<?php $hraWorked = $workedSalary * 30 / 100;
|
<?php $hraWorked = $workedSalary * 30 / 100;
|
||||||
echo number_format($hraWorked, 2); ?>
|
echo number_format($hraWorked, 2, '.', ''); ?>
|
||||||
</td>
|
</td>
|
||||||
<td style="max-width:80px">
|
<td style="max-width:80px">
|
||||||
<?php echo number_format($basicWorked + $hraWorked, 2); ?></td>
|
<?php echo number_format($basicWorked + $hraWorked, 2, '.', ''); ?></td>
|
||||||
<td id="esiAmt<?php echo $index ?>" style="max-width:80px"> <?php echo $esi[$i]; ?> </td>
|
<td id="esiAmt<?php echo $index ?>" style="max-width:80px"> <?php echo $esi[$i]; ?> </td>
|
||||||
<td id="pfAmt<?php echo $index ?>" style="max-width:80px"> <?php echo $pf[$i]; ?> </td>
|
<td id="pfAmt<?php echo $index ?>" style="max-width:80px"> <?php echo $pf[$i]; ?> </td>
|
||||||
<td style="max-width:80px"> <?php echo $over_time[$i]; ?> </td>
|
<td style="max-width:80px"> <?php echo $over_time[$i]; ?> </td>
|
||||||
@ -369,6 +369,7 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<?php $totalotherDet[] = isset($Other_Deductions) ? $Other_Deductions : []; ?>
|
<?php $totalotherDet[] = isset($Other_Deductions) ? $Other_Deductions : []; ?>
|
||||||
|
|
||||||
<td id="Festival<?php echo $index ?>" onkeypress="return isNumber(event);"
|
<td id="Festival<?php echo $index ?>" onkeypress="return isNumber(event);"
|
||||||
onkeyup="changeInput(event);"
|
onkeyup="changeInput(event);"
|
||||||
<?php if (empty($record->Key)) {
|
<?php if (empty($record->Key)) {
|
||||||
@ -540,46 +541,8 @@
|
|||||||
i = i + 1;
|
i = i + 1;
|
||||||
totalmonthloan[i] = $(this).find('td').eq(7).text();
|
totalmonthloan[i] = $(this).find('td').eq(7).text();
|
||||||
});
|
});
|
||||||
//console.log(totalmonthloan);
|
|
||||||
/* $('#monthlylisting').DataTable({
|
|
||||||
"paging": true,
|
|
||||||
"lengthChange": true,
|
|
||||||
"searching": true,
|
|
||||||
"ordering": true,
|
|
||||||
"aaSorting": [[ 0, "asc" ]],
|
|
||||||
"info": true,
|
|
||||||
"autoWidth": true
|
|
||||||
|
|
||||||
}); */
|
|
||||||
|
|
||||||
//var key = <?php echo $show_hide_column_value; ?>;
|
|
||||||
|
|
||||||
|
|
||||||
//alert($('#monthyear').val());
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// show_hide_column(11,key);
|
|
||||||
// var t = $('#monthlylistings').DataTable({
|
|
||||||
// "columnDefs": [{
|
|
||||||
// "searchable": false,
|
|
||||||
// "orderable": false,
|
|
||||||
// "targets": 0
|
|
||||||
// }],
|
|
||||||
// "searching": true,
|
|
||||||
// "lengthChange": true,
|
|
||||||
// "info": true,
|
|
||||||
// "paging": false,
|
|
||||||
// "autoWidth": true,
|
|
||||||
|
|
||||||
// // "scrollX": true,
|
|
||||||
// "order": [
|
|
||||||
// [1, 'asc']
|
|
||||||
// ],
|
|
||||||
// });
|
|
||||||
|
|
||||||
t.on('order.dt search.dt', function() {
|
t.on('order.dt search.dt', function() {
|
||||||
t.column(0, {
|
t.column(0, {
|
||||||
@ -621,12 +584,21 @@
|
|||||||
|
|
||||||
|
|
||||||
function getAllData() {
|
function getAllData() {
|
||||||
console.log("enter");
|
|
||||||
var alldata = $("#monthlylistings").tableToJSON();
|
var alldata = $("#monthlylistings").tableToJSON();
|
||||||
//alert(JSON.stringify(alldata));
|
|
||||||
alldata = JSON.stringify(alldata)
|
alldata = JSON.stringify(alldata)
|
||||||
|
// Parse the JSON string back into an array of objects
|
||||||
|
alldata = JSON.parse(alldata);
|
||||||
|
|
||||||
|
// Filter out objects where "Emp ID" is empty
|
||||||
|
alldata = alldata.filter(function(item) {
|
||||||
|
return item["Emp ID"].trim() !== "";
|
||||||
|
});
|
||||||
|
|
||||||
|
// Convert the filtered array back to a JSON string if needed
|
||||||
|
alldata = JSON.stringify(alldata);
|
||||||
var month = $('#monthyear').val();
|
var month = $('#monthyear').val();
|
||||||
$('.content').loader('show');
|
// $('.content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: {
|
data: {
|
||||||
param1: alldata,
|
param1: alldata,
|
||||||
@ -639,7 +611,7 @@
|
|||||||
console.log(data);
|
console.log(data);
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
$('.content').loader('hide');
|
// $('.content').loader('hide');
|
||||||
alert(data);
|
alert(data);
|
||||||
//console.log(data);
|
//console.log(data);
|
||||||
|
|
||||||
|
|||||||
@ -1,156 +1,119 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$monthsoptions = array("01" => "Jan", "02" => "Feb", "03" => "Mar", "04" => "Apr", "05" => "May", "06" => "June", "07" => "July", "08" => "Aug", "09" => "Sep", "10" => "Oct", "11" => "Nov", "12" => "Dec");
|
||||||
$monthsoptions = array("01" => "Jan", "02" => "Feb","03" => "Mar","04" => "Apr","05" => "May","06" => "June","07"=> "July","08"=> "Aug","09" => "Sep","10"=> "Oct","11" => "Nov","12"=>"Dec");
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
$(function() {
|
||||||
|
|
||||||
|
|
||||||
$(function() {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(".select2").select2();
|
$(".select2").select2();
|
||||||
|
$('#All').click(function() {
|
||||||
|
|
||||||
$('#All').click(function(){
|
if ($('#All').prop('checked')) {
|
||||||
|
|
||||||
if ($('#All').prop('checked'))
|
|
||||||
{
|
|
||||||
$('#Employee').attr('disabled', 'true');
|
$('#Employee').attr('disabled', 'true');
|
||||||
|
} else {
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$('#Employee').removeAttr('disabled');
|
$('#Employee').removeAttr('disabled');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
$('#PayOn').change(function() {
|
||||||
$('#PayOn').change(function(){
|
|
||||||
|
|
||||||
var id = $('#PayOn').val();
|
var id = $('#PayOn').val();
|
||||||
if(id != '-1')
|
if (id != '-1') {
|
||||||
{
|
// $('#content').loader('show');
|
||||||
$('#content').loader('show');
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{id1:id},
|
data: {
|
||||||
|
id1: id
|
||||||
type:"POST",
|
},
|
||||||
url:"<?php echo base_url();?>payslip/getEmployee",
|
type: "POST",
|
||||||
success:function(result) {
|
url: "<?php echo base_url(); ?>payslip/getEmployee",
|
||||||
if(result)
|
success: function(result) {
|
||||||
{
|
if (result) {
|
||||||
$("#Employee").empty();
|
$("#Employee").empty();
|
||||||
$('#content').loader('hide');
|
// $('#content').loader('hide');
|
||||||
$("#Employee").append(result);
|
$("#Employee").append(result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
alert('Please select the PayOn');
|
alert('Please select the PayOn');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
$("#Calculate").click(function() {
|
||||||
|
|
||||||
|
|
||||||
$("#Calculate").click(function(){
|
|
||||||
|
|
||||||
|
|
||||||
var payon = $('#PayOn').val();
|
var payon = $('#PayOn').val();
|
||||||
var employee = $('#Employee').val();
|
var employee = $('#Employee').val();
|
||||||
|
|
||||||
// alert(payon+employee);
|
// alert(payon+employee);
|
||||||
|
if (payon != '-1' && employee != '-1') {
|
||||||
if(payon != '-1' && employee !='-1')
|
|
||||||
{
|
|
||||||
var check = $('#All').is(":checked");
|
var check = $('#All').is(":checked");
|
||||||
if(check){
|
if (check) {
|
||||||
|
var c = 0;
|
||||||
var c=0;
|
var time = 0;
|
||||||
var time=0;
|
|
||||||
$('#Employee').find('option').each(function() {
|
$('#Employee').find('option').each(function() {
|
||||||
c++;
|
c++;
|
||||||
var employee=$(this).val();
|
var employee = $(this).val();
|
||||||
$('#content').loader('show');
|
// $('#content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{payon:payon,employee:employee},
|
data: {
|
||||||
type:"POST",
|
payon: payon,
|
||||||
url:"<?php echo base_url();?>payslip/checkExistPay",
|
employee: employee
|
||||||
|
},
|
||||||
|
type: "POST",
|
||||||
|
url: "<?php echo base_url(); ?>payslip/checkExistPay",
|
||||||
|
|
||||||
success:function(result)
|
success: function(result) {
|
||||||
{
|
if (result != 1) {
|
||||||
if(result != 1)
|
|
||||||
{
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{payon:payon,employee:employee},
|
data: {
|
||||||
type:"POST",
|
payon: payon,
|
||||||
url:"<?php echo base_url();?>payslip/callsp",
|
employee: employee
|
||||||
success:function(result){
|
},
|
||||||
$('#content').loader('hide');
|
type: "POST",
|
||||||
|
url: "<?php echo base_url(); ?>payslip/callsp",
|
||||||
|
success: function(result) {
|
||||||
|
// $('#content').loader('hide');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
time = (c * 300);
|
time = (c * 300);
|
||||||
// alert(time);
|
// alert(time);
|
||||||
setTimeout(function(){alert(c + '-Employees Salary Added Successfully!');
|
setTimeout(function() {
|
||||||
|
alert(c + '-Employees Salary Added Successfully!');
|
||||||
$('form#PayslipGenerator').submit();
|
$('form#PayslipGenerator').submit();
|
||||||
alert("Please wait while Payslip Downloading...!");
|
alert("Please wait while Payslip Downloading...!");
|
||||||
$('#content').loader('hide');
|
// $('#content').loader('hide');
|
||||||
},time);
|
}, time);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // else for select all not selected
|
} // else for select all not selected
|
||||||
else{
|
else {
|
||||||
|
// $('#content').loader('show');
|
||||||
$('#content').loader('show');
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{payon:payon,employee:employee},
|
data: {
|
||||||
type:"POST",
|
payon: payon,
|
||||||
url:"<?php echo base_url();?>payslip/checkExistPay",
|
employee: employee
|
||||||
|
},
|
||||||
|
type: "POST",
|
||||||
|
url: "<?php echo base_url(); ?>payslip/checkExistPay",
|
||||||
|
|
||||||
success:function(result) {
|
success: function(result) {
|
||||||
|
|
||||||
|
|
||||||
if(result == 1)
|
if (result == 1) {
|
||||||
{
|
|
||||||
|
|
||||||
$('form#PayslipGenerator').submit();
|
$('form#PayslipGenerator').submit();
|
||||||
$('#content').loader('hide');
|
// $('#content').loader('hide');
|
||||||
alert("Payslip Downloaded Successfully..!");
|
alert("Payslip Downloaded Successfully..!");
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{payon:payon,employee:employee},
|
data: {
|
||||||
type:"POST",
|
payon: payon,
|
||||||
url:"<?php echo base_url();?>payslip/callsp",
|
employee: employee
|
||||||
success:function(result){
|
},
|
||||||
|
type: "POST",
|
||||||
|
url: "<?php echo base_url(); ?>payslip/callsp",
|
||||||
|
success: function(result) {
|
||||||
$('form#PayslipGenerator').submit();
|
$('form#PayslipGenerator').submit();
|
||||||
$('#content').loader('hide');
|
// $('#content').loader('hide');
|
||||||
alert("Salary Calculated Successfully..!");
|
alert("Salary Calculated Successfully..!");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -161,96 +124,67 @@ $(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}// else for select all not selected
|
} // else for select all not selected
|
||||||
|
|
||||||
}// check payon select/not selected
|
} // check payon select/not selected
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
alert('Please select the PayOn');
|
alert('Please select the PayOn');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="content-wrapper">
|
<div class="content-page">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<div class="page-title-box page-title-box-alt">
|
||||||
<h1>
|
<h4 class="page-title"> Add Config Details</h4>
|
||||||
<center> PaySlip Generator</center>
|
</div>
|
||||||
|
|
||||||
</h1>
|
|
||||||
</section>
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="row" style="border:2px dotted; padding:5%">
|
<div class="card">
|
||||||
<form id="PayslipGenerator" action="<?php echo base_url() ?>PrintPdf" method="post" role="form" >
|
<div class="card-body" style="padding: 1rem 2rem !important;">
|
||||||
<div class="row" >
|
<form id="PayslipGenerator" action="<?php echo base_url() ?>PrintPdf" method="post" role="form" style="border:2px dotted; padding:5%">
|
||||||
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
|
||||||
<span for="selectmonth">Select Month</span>
|
<span for="selectmonth">Select Month</span>
|
||||||
<select id="PayOn" name="PayOn" class="form-control select2" style="width: 100%;">
|
<select id="PayOn" name="PayOn" class="form-control select2" style="width: 100%;">
|
||||||
<option value="-1">Select Payon Month</option>
|
<option value="-1">Select Payon Month</option>
|
||||||
<?php
|
<?php
|
||||||
if(!empty($Payon))
|
if (!empty($Payon)) {
|
||||||
{
|
|
||||||
|
|
||||||
foreach ($Payon as $rl)
|
foreach ($Payon as $rl) {
|
||||||
{
|
$m = substr($rl->Month_Year, 0, 2);
|
||||||
$m = substr($rl->Month_Year,0,2);
|
$y = substr($rl->Month_Year, 3);
|
||||||
$y = substr($rl->Month_Year,3);
|
$tot = $monthsoptions[$m] . "-" . $y;
|
||||||
$tot = $monthsoptions[$m]."-".$y;
|
|
||||||
|
|
||||||
echo "<option value=\"".$rl->Month_Year."\">".$tot."</option>";
|
|
||||||
|
|
||||||
|
echo "<option value=\"" . $rl->Month_Year . "\">" . $tot . "</option>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div id="content"></div>
|
<div id="content"></div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
</div>
|
||||||
<div class="col-md-4 col-md-offset-2">
|
<div class="col-md-4 col-md-offset-2">
|
||||||
|
|
||||||
|
|
||||||
<span>Employee</span>
|
<span>Employee</span>
|
||||||
<select id="Employee" name="Employee" class="form-control select2" type="text" class="form-control">
|
<select id="Employee" name="Employee" class="form-control select2" type="text" class="form-control">
|
||||||
<option value="-1">Select Employee</option>
|
<option value="-1">Select Employee</option>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<br/>
|
<br />
|
||||||
<input type="checkbox" name="All" id="All" > Select All<br>
|
<input type="checkbox" name="All" id="All"> Select All<br>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-6" align="right">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-4 col-md-offset-6" align="right">
|
||||||
<div class="col-md-4 col-md-offset-6" align = "right">
|
<input type="button" class="btn btn-info" id="Calculate" value="Calculate Pay" />
|
||||||
|
|
||||||
<input type="button" class="btn btn-info" id="Calculate" value="Calculate Pay"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row" >
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
helper('form');
|
helper('form');
|
||||||
$error = session()->getFlashdata('error');
|
$error = session()->getFlashdata('error');
|
||||||
if($error)
|
if ($error) {
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-danger alert-dismissable">
|
<div class="alert alert-danger alert-dismissable">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
||||||
@ -259,23 +193,20 @@ $(function() {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php
|
<?php
|
||||||
$success = session()->getFlashdata('success');
|
$success = session()->getFlashdata('success');
|
||||||
if($success)
|
if ($success) {
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-success alert-dismissable">
|
<div class="alert alert-success alert-dismissable">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
|
||||||
<?php echo session()->getFlashdata('success'); ?>
|
<?php echo session()->getFlashdata('success'); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<?php // echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true"><3E></button></div>'); ?>
|
<?php // echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true"><3E></button></div>');
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
@ -1,196 +1,6 @@
|
|||||||
|
|
||||||
<?php
|
<!-- <div style= "page-break-before:always;"></div > -->
|
||||||
|
|
||||||
$PayOn = '';
|
|
||||||
$EmpID = '';
|
|
||||||
$FirstName = '';
|
|
||||||
$LastName = '';
|
|
||||||
$DateofBirth = '';
|
|
||||||
$DateofJoining = '';
|
|
||||||
$Designation = '';
|
|
||||||
$Departmentcode = '';
|
|
||||||
$PANNo = '';
|
|
||||||
$AadharNo='';
|
|
||||||
$BankAccountNo = '';
|
|
||||||
$IFSCCode ='';
|
|
||||||
$BankBranchName = '';
|
|
||||||
$PFnumber = '';
|
|
||||||
$ESInumber = '';
|
|
||||||
$TotalNoofDays = '';
|
|
||||||
$NoOfWorkingdays ='';
|
|
||||||
$paidleave = 0.00;
|
|
||||||
$LOP='';
|
|
||||||
$ActualSalary = '';
|
|
||||||
$PerDaySalary = '';
|
|
||||||
$WorkedSalary = '';
|
|
||||||
$BasicAndDA = '';
|
|
||||||
$HRA = '';
|
|
||||||
$OTWages = '';
|
|
||||||
$OTPerHours ='';
|
|
||||||
$OTSalary = '';
|
|
||||||
$GrosssSalary = '';
|
|
||||||
$ESI = '';
|
|
||||||
$PF = '';
|
|
||||||
$ESIAndPF = '';
|
|
||||||
$SalaryAsPerPF = '';
|
|
||||||
$FoodAllowance ='';
|
|
||||||
$Incentive = '';
|
|
||||||
$Festival_bonus = '';
|
|
||||||
$TotalSalary = '';
|
|
||||||
$Advance = '';
|
|
||||||
$BalanceAdvance = '';
|
|
||||||
$LessAdvance = '';
|
|
||||||
$DeptName = '';
|
|
||||||
$LossofPay = '0.00';
|
|
||||||
$RecCount = '';
|
|
||||||
$OtherDeductions='0.00';
|
|
||||||
$LoanAdvance='0.00';
|
|
||||||
$Otherallowances='0.00';
|
|
||||||
$TotalAmountInWords='';
|
|
||||||
$TotalComapanyContribution = 0.00;
|
|
||||||
|
|
||||||
if(!empty($Count))
|
|
||||||
{
|
|
||||||
$RecCount = $Count;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//echo $RecCount;
|
|
||||||
if(!empty($PayDetails))
|
|
||||||
{
|
|
||||||
foreach ($PayDetails as $Pay)
|
|
||||||
{
|
|
||||||
$Paydt = $Pay->PayOn;
|
|
||||||
$dt = '01-'.$Paydt;
|
|
||||||
$PayOn = date('M-Y',strtotime($dt));
|
|
||||||
|
|
||||||
$EmpID = $Pay->EmpID;
|
|
||||||
$FirstName = $Pay->FName;
|
|
||||||
$LastName = $Pay->Lname;
|
|
||||||
|
|
||||||
$DoB = $Pay->Dob;
|
|
||||||
$DoJ = $Pay->DOJ;
|
|
||||||
|
|
||||||
$from = new DateTime($DoB);
|
|
||||||
$dt = new DateTime($DoJ);
|
|
||||||
$DateofBirth = $from ->format('d-m-Y');
|
|
||||||
$DateofJoining = $dt ->format('d-m-Y');
|
|
||||||
|
|
||||||
$Designation = $Pay->Designation;
|
|
||||||
$PANNo =$Pay->Pan;
|
|
||||||
$AadharNo=$Pay->AadharNo;
|
|
||||||
$BankAccountNo = $Pay->BankAccountNumber;
|
|
||||||
$IFSCCode =$Pay->IFSCCode;
|
|
||||||
$BankBranchName = $Pay->BankName;
|
|
||||||
$PFnumber = $Pay->PFNumber;
|
|
||||||
$ESInumber = $Pay->ESINumber;
|
|
||||||
$TotalNoofDays = $Pay->TotalCalDays;
|
|
||||||
$NoOfWorkingdays =$Pay->NoofDaysWorked;
|
|
||||||
$paidleave = $Pay->Paid_Leave;
|
|
||||||
$NoOfWorkingdays = $NoOfWorkingdays + $paidleave;
|
|
||||||
$ActualSalary = $Pay->ActualSalary;
|
|
||||||
$LOP=$Pay->LOP;
|
|
||||||
$PerDaySalary = $Pay->PerDaySalary;
|
|
||||||
$WorkedSalary = $Pay->WorkedSalary;
|
|
||||||
$BasicAndDA = $Pay->BasicPlusDA;
|
|
||||||
$HRA = $Pay->HRA;
|
|
||||||
$OTWage = $Pay->OTWages;
|
|
||||||
$OtherDeductions=$Pay->OtherDeductions;
|
|
||||||
$LoanAdvance=$Pay->Advance;
|
|
||||||
$TotalComapanyContribution=$Pay->TotalCompCon;
|
|
||||||
|
|
||||||
if($OTWage == '')
|
|
||||||
{
|
|
||||||
$OTWages = '0.00';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$OTWages = $OTWage;
|
|
||||||
}
|
|
||||||
$OTPerHours =$Pay->OTperHours;
|
|
||||||
$OTSal = $Pay->OTSalary;
|
|
||||||
if($OTSal == '')
|
|
||||||
{
|
|
||||||
$OTSalary = '0.00';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$OTSalary = $OTSal;
|
|
||||||
}
|
|
||||||
$GrosssSalary = $Pay->ESIGrossSalary;
|
|
||||||
$ESI = $Pay->EmployeeESI;
|
|
||||||
$PF = $Pay->PF;
|
|
||||||
$ESIAndPF = $PF+$ESI+$OtherDeductions+$LoanAdvance;
|
|
||||||
$SalaryAsPerPF = $Pay->SalaryAsPerPF;
|
|
||||||
$Food =$Pay->FoodAllowance;
|
|
||||||
$Otherallowances=$Pay->Other_allowances;
|
|
||||||
if($Food == '')
|
|
||||||
{
|
|
||||||
$FoodAllowance = '0.00';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$FoodAllowance = $Food;
|
|
||||||
}
|
|
||||||
$IncenAmt = $Pay->Incentive;
|
|
||||||
if($IncenAmt == '')
|
|
||||||
{
|
|
||||||
$Incentive = '0.00';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$Incentive = $IncenAmt;
|
|
||||||
}
|
|
||||||
$festbonus = $Pay->Festival_Bonus;
|
|
||||||
if($festbonus == '')
|
|
||||||
{
|
|
||||||
$Festival_bonus = '0.00';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$Festival_bonus = $festbonus;
|
|
||||||
}
|
|
||||||
$TotalSalary = $WorkedSalary+$HRA+$Food+$IncenAmt+$OTSal+$Otherallowances+$Festival_bonus;
|
|
||||||
$Adv = $Pay->Advance;
|
|
||||||
if($Adv == '')
|
|
||||||
{
|
|
||||||
$Advance = '0.00';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$Advance = $Adv;
|
|
||||||
}
|
|
||||||
$BalanceAdv = $Pay->BalanceAdvance;
|
|
||||||
if($BalanceAdv == '')
|
|
||||||
{
|
|
||||||
$BalanceAdvance = '0.00';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$BalanceAdvance = $BalanceAdv;
|
|
||||||
}
|
|
||||||
$LessAdv = $Pay->LessAdvance;
|
|
||||||
if($LessAdv == '')
|
|
||||||
{
|
|
||||||
$LessAdvance = '0.00';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$LessAdvance = $LessAdv;
|
|
||||||
}
|
|
||||||
$DeptName = $Pay->DeptName;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if($RecCount > 0)
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div style= "page-break-before:always;"></div >
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -200,7 +10,7 @@ if($RecCount > 0)
|
|||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td colspan="10">
|
<td colspan="10">
|
||||||
<center><b>RESICO</b><br/> Survey No: 168/1C3,Pennalur Pet Road,Goonipalyam village, <br/>Uthukottai Taluk,Tiruvallur Dist, Chennai,Tamilnadu,Pin code : 602026. <br/> PaySlip for the Month of <?php echo $PayOn ?></center>
|
<center><b>RESICO</b><br/> Survey No: 168/1C3,Pennalur Pet Road,Goonipalyam village, <br/>Uthukottai Taluk,Tiruvallur Dist, Chennai,Tamilnadu,Pin code : 602026. <br/> PaySlip for the Month of <?php echo $PayDetails[0]->PayOn ?></center>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -209,58 +19,58 @@ if($RecCount > 0)
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr >
|
<tr >
|
||||||
<td width="160px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Name </td>
|
<td width="160px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Name </td>
|
||||||
<td width="200px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$FirstName.' '.$LastName; ?></td>
|
<td width="200px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$PayDetails[0]->FName; ?></td>
|
||||||
<td width="160px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Employee ID </td>
|
<td width="160px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Employee ID </td>
|
||||||
<td width="152px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$EmpID ?></td>
|
<td width="152px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$PayDetails[0]->EmpID ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Designation </td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Designation </td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;" > <?php echo ': '.$Designation ?></td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;" > <?php echo ': '.$PayDetails[0]->Designation ?></td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Department </td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Department </td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$DeptName ?></td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$PayDetails[0]->DeptName ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Date Of Joining </td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Date Of Joining </td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo ': '.$DateofJoining ?></td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo ': '.date('d-m-Y', strtotime($PayDetails[0]->DOJ)) ?></td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Available Calender Days </td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Available Calender Days </td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo ': '.$TotalNoofDays ?></td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo ': '.$PayDetails[0]->TotalCalDays ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Date Of Birth </td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Date Of Birth </td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$DateofBirth ?></td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.date('d-m-Y', strtotime($PayDetails[0]->Dob)) ?></td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Loss Of Pay Days </td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Loss Of Pay Days </td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo ': '. number_format((double)$LOP,2,'.',''); ?></td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo ': '. number_format((double)$PayDetails[0]->LOP,2,'.',''); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">PF Account Number </td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">PF Account Number </td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;" ><?php echo ': '.$PFnumber ?></td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;" ><?php echo ': '.$PayDetails[0]->PFNumber ?></td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Paid Days </td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Paid Days </td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.number_format($NoOfWorkingdays,2,'.',''); ?></td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.number_format($PayDetails[0]->NoofDaysWorked,2,'.',''); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Bank Name </td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Bank Name </td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$BankBranchName ?></td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$PayDetails[0]->BankName ?></td>
|
||||||
|
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Loan Balance </td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Loan Balance </td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;" ><?php echo ': Rs '.$BalanceAdvance ?></td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;" ><?php echo ': Rs '.$PayDetails[0]->BalanceAdvance ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Bank Account Number </td>
|
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Bank Account Number </td>
|
||||||
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo ': '.$BankAccountNo ?></td>
|
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo ': '.$PayDetails[0]->BankAccountNumber ?></td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">OT In Hours </td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">OT In Hours </td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$OTPerHours ?></td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$PayDetails[0]->OT_Hrs_Worked ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Bank IFSC </td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Bank IFSC </td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$IFSCCode ?></td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$PayDetails[0]->IFSCCode ?></td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">ESI Account Number </td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">ESI Account Number </td>
|
||||||
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo ': '.$ESInumber ?></td>
|
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo ': '.$PayDetails[0]->ESINumber ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">PAN Number </td>
|
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">PAN Number </td>
|
||||||
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$PANNo;?> </td>
|
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$PayDetails[0]->Pan;?> </td>
|
||||||
<td width="50px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Aadhar Number </td>
|
<td width="50px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Aadhar Number </td>
|
||||||
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.$AadharNo;?></td>
|
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ': '.str_replace(' ', '', $PayDetails[0]->AadharNo);?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -270,59 +80,55 @@ if($RecCount > 0)
|
|||||||
<table style="border-collapse: collapse;border-top:#fff;" cellpadding="0" cellspacing="0" border="1" width="100%" >
|
<table style="border-collapse: collapse;border-top:#fff;" cellpadding="0" cellspacing="0" border="1" width="100%" >
|
||||||
<tr><th>Earnings</th><th>Amount <span style="font-family: DejaVu Sans; sans-serif;">₹</span></th><th>Deductions</th><th>Amount <span style="font-family: DejaVu Sans; sans-serif;">₹</span></th></tr>
|
<tr><th>Earnings</th><th>Amount <span style="font-family: DejaVu Sans; sans-serif;">₹</span></th><th>Deductions</th><th>Amount <span style="font-family: DejaVu Sans; sans-serif;">₹</span></th></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="25%;"> Basic Plus DA</td>
|
<td width="25%;"> Basic </td>
|
||||||
<td width="20%;" style="text-align: right;" ><?php echo $WorkedSalary ?> </td>
|
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->Basic; ?> </td>
|
||||||
<td width="25%;"> Provident Fund</td>
|
<td width="25%;"> Provident Fund</td>
|
||||||
<td width="30%;" style="text-align: right;" ><?php echo $PF ?> </td>
|
<td width="30%;" style="text-align: right;" ><?php echo $PayDetails[0]->PF; ?> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> House Rent Allowance</td>
|
<td> House Rent Allowance</td>
|
||||||
<td style="text-align: right;"><?php echo $HRA ?> </td>
|
<td style="text-align: right;"><?php echo $PayDetails[0]->HRA; ?> </td>
|
||||||
<td> Employee State Insurance</td>
|
<td> Employee State Insurance</td>
|
||||||
<td style="text-align: right;"> <?php echo $ESI ?> </td>
|
<td style="text-align: right;"> <?php echo $PayDetails[0]->ESI; ?> </td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td> Food Allowance</td>
|
|
||||||
<td style="text-align: right;"> <?php echo $FoodAllowance ?> </td>
|
|
||||||
<td> Loan Recovery</td>
|
|
||||||
<td style="text-align: right;"> <?php echo $LoanAdvance ?> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td> Other Allowance</td>
|
|
||||||
<td style="text-align: right;"> <?php echo $Otherallowances ?> </td>
|
|
||||||
<td> Other Deduction</td>
|
|
||||||
<td style="text-align: right;"> <?php echo $OtherDeductions ?> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td> Incentive</td>
|
|
||||||
<td style="text-align: right;"> <?php echo $Incentive ?> </td>
|
|
||||||
<td></td>
|
|
||||||
<td style="text-align: right;"></td>
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> OT Salary</td>
|
<td> OT Salary</td>
|
||||||
<td style="text-align: right;"> <?php echo $OTSalary ?> </td>
|
<td style="text-align: right;"> <?php echo $PayDetails[0]->OTSalary ?> </td>
|
||||||
<td></td>
|
<td> Loan Recovery</td>
|
||||||
<td style="text-align: right;"></td>
|
<td style="text-align: right;"> <?php echo $PayDetails[0]->Advance ?> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> Festival Bonus</td>
|
<td> Festival Bonus</td>
|
||||||
<td style="text-align: right;"><?php echo $Festival_bonus ?> </td>
|
<td style="text-align: right;"><?php echo $PayDetails[0]->Festival_Bonus ?> </td>
|
||||||
<td></td>
|
<td> TDS Deduction</td>
|
||||||
<td style="text-align: right;"></td>
|
<td style="text-align: right;"> <?php echo $PayDetails[0]->OtherDeductions ?> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><th nowrap> Total Earning (Rounded) (TE)</th>
|
|
||||||
<td style="text-align: right;"> <?php echo number_format(round($TotalSalary),2,'.','')?> </td>
|
|
||||||
<th nowrap> Total Deduction (Rounded)(TD)</th>
|
|
||||||
<td style="text-align: right;"> <?php echo number_format(round($ESIAndPF),2,'.','') ?> </td>
|
<tr><th nowrap> Total Earning (Rounded)</th>
|
||||||
|
<td style="text-align: right;">
|
||||||
|
<?php
|
||||||
|
$totEarning = $PayDetails[0]->Basic + $PayDetails[0]->HRA + $PayDetails[0]->OTSalary + $PayDetails[0]->Festival_Bonus;
|
||||||
|
echo number_format(round($totEarning),2)
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<th nowrap> Total Deduction (Rounded)</th>
|
||||||
|
<td style="text-align: right;">
|
||||||
|
<?php
|
||||||
|
$totDeduction = $PayDetails[0]->PF + $PayDetails[0]->ESI + $PayDetails[0]->Advance + $PayDetails[0]->OtherDeductions;
|
||||||
|
echo number_format(round($totDeduction),2)
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr><th style="text-align: right;" colspan="3">Net Pay (TE - TD)(Rounded) </th>
|
<tr><th style="text-align: right;" colspan="3">Net Pay(Rounded) </th>
|
||||||
<td style="text-align: right;" colspan="1"><?php echo number_format(round($LessAdvance),2,'.','') ?> </td>
|
<td style="text-align: right;" colspan="1"><?php echo number_format(round($PayDetails[0]->TotalSalary),2,'.','') ?> </td>
|
||||||
</tr>
|
|
||||||
<tr><th style="text-align: right;" colspan="3">Company Contribution(Rounded) </th>
|
|
||||||
<td style="text-align: right;" colspan="1"><?php echo number_format(round($TotalComapanyContribution),2,'.','') ?> </td>
|
|
||||||
</tr>
|
</tr>
|
||||||
|
<!-- <tr><th style="text-align: right;" colspan="3">Company Contribution(Rounded) </th>
|
||||||
|
<td style="text-align: right;" colspan="1"><?php ?> </td>
|
||||||
|
</tr> -->
|
||||||
<tr><th style="text-align: right;" colspan="1">Total Amount In Words </th>
|
<tr><th style="text-align: right;" colspan="1">Total Amount In Words </th>
|
||||||
<td style="text-align: right;" colspan="3"><?php if(!empty($amtinwords)){ print_r($amtinwords);} ?></td>
|
<td style="text-align: right;" colspan="3"><?php if(!empty($amtinwords)){ print_r($amtinwords);} ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -1,31 +1,34 @@
|
|||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
|
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">
|
|
||||||
|
|
||||||
<?php ?>
|
<?php ?>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.num {
|
.num {
|
||||||
text-align:right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="content-wrapper">
|
|
||||||
<!-- Content Header (Page header) -->
|
|
||||||
<section class="content-header">
|
|
||||||
<h1>
|
|
||||||
<center>Employee Monthly Payslip </center>
|
|
||||||
</h1>
|
|
||||||
</section>
|
|
||||||
<section class="content">
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="content-page">
|
||||||
|
<div class="content">
|
||||||
|
<!-- Start Content-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<!-- start page title -->
|
||||||
|
<div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col-6">
|
||||||
<div class="col-md-2">
|
<div class="page-title-box page-title-box-alt">
|
||||||
|
<h4 class="page-title">Employee Monthly Payslip </h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2" style="padding: 10px;margin-left: 24px;">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$attributes = array('id' => 'paylist');
|
$attributes = array('id' => 'paylist');
|
||||||
echo form_open('paysliplist', $attributes);
|
echo form_open('paysliplist', $attributes);
|
||||||
$today = date('m-Y');
|
$today = date('m-Y');
|
||||||
$data = array('type' => 'text','name' => 'month','id' => 'month','value' => $today,'class' => 'form-control select2');
|
$data = array('type' => 'text', 'name' => 'month', 'id' => 'month', 'value' => $today, 'class' => 'form-control select2', ' data-provide' => 'datepicker', 'data-date-format' => 'M-yyyy', 'data-date-min-view-mode' => '1');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@ -33,20 +36,11 @@
|
|||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<input id="changemonth" value="Change Month" class="btn btn-success" title='click here to view payslip Data'>
|
<input id="changemonth" value="Change Month" class="btn btn-success" title='click here to view payslip Data'>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<table id="monthlylistingss" class="table dt-responsive nowrap w-100">
|
||||||
|
<thead>
|
||||||
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<div class="box">
|
|
||||||
<div class="box-header">
|
|
||||||
|
|
||||||
<div class="box-tools">
|
|
||||||
|
|
||||||
</form>
|
|
||||||
</div><!--</h3></center>-->
|
|
||||||
|
|
||||||
</div><!-- /.box-header -->
|
|
||||||
<div class="box-body">
|
|
||||||
<table id="monthlylistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
|
||||||
<thead >
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Month Year</th>
|
<th>Month Year</th>
|
||||||
<th>Employee Id</th>
|
<th>Employee Id</th>
|
||||||
@ -59,61 +53,52 @@
|
|||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody id="tbody">
|
<tbody id="tbody">
|
||||||
<?php
|
<?php
|
||||||
if(!empty($PayInfo))
|
if (!empty($PayInfo)) {
|
||||||
{
|
|
||||||
|
|
||||||
foreach($PayInfo as $record)
|
foreach ($PayInfo as $record) {
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align:right;"><?php echo $record->PayOn ?></td>
|
<td style="text-align:right;"><?php echo $record->PayOn ?></td>
|
||||||
<td><?php echo $record->EmpID ?></td>
|
<td><?php echo $record->EmpID ?></td>
|
||||||
<td><?php echo $record->FName ." ". $record->Lname ?></td>
|
<td><?php echo $record->FName . " " . $record->Lname ?></td>
|
||||||
<td style="text-align:right;"><?php echo ($record->NoofDaysWorked + $record->Paid_Leave) ?></td>
|
<td style="text-align:right;"><?php echo ($record->NoofDaysWorked + $record->Paid_Leave) ?></td>
|
||||||
<td style="text-align:right;"><?php echo $record->LessAdvance ?></td>
|
<td style="text-align:right;"><?php echo $record->LessAdvance ?></td>
|
||||||
<td style="text-align:right;"><?php echo $record->TotalCompCon ?></td>
|
<td style="text-align:right;"><?php echo $record->TotalCompCon ?></td>
|
||||||
<td style="text-align:right;"><?php if(is_numeric($record->Advance)){echo number_format($record->Advance,2,'.','');}else {echo $record->Advance;} ?></td>
|
<td style="text-align:right;"><?php if (is_numeric($record->Advance)) {
|
||||||
|
echo number_format($record->Advance, 2, '.', '');
|
||||||
|
} else {
|
||||||
|
echo $record->Advance;
|
||||||
|
} ?></td>
|
||||||
<td style="text-align:right;"><?php echo $record->BalanceAdvance ?></td>
|
<td style="text-align:right;"><?php echo $record->BalanceAdvance ?></td>
|
||||||
|
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
|
<a href="<?php echo base_url() . 'payslip/editPayslip/' . $record->EmpID . '/' . $record->PayOn; ?>"><i class="btn btn-success">EDIT</i></a>
|
||||||
<a href="<?php echo base_url().'payslip/editPayslip/'.$record->EmpID.'/'.$record->PayOn;?>"><i class="btn btn-success">EDIT</i></a>
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div> <!-- end card body-->
|
||||||
</div><!-- /.box-body -->
|
</div> <!-- end card -->
|
||||||
<!-- <div class="box-footer clearfix">
|
</div><!-- end col-->
|
||||||
<?php //echo $this->pagination->create_links(); ?>
|
|
||||||
</div> -->
|
|
||||||
</div><!-- /.box -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</div> <!-- container -->
|
||||||
|
</div> <!-- content -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
|
||||||
$(function () {
|
// $("#month").datepicker({
|
||||||
|
// minViewMode: 1,
|
||||||
$("#month").datepicker({
|
// format: 'mm-yyyy'
|
||||||
minViewMode: 1,
|
// });
|
||||||
format: 'mm-yyyy'
|
|
||||||
});
|
|
||||||
|
|
||||||
var dropdown = "<?php echo $dropdownvalue; ?>";
|
var dropdown = "<?php echo $dropdownvalue; ?>";
|
||||||
$('#month').val(dropdown);
|
$('#month').val(dropdown);
|
||||||
@ -123,14 +108,16 @@
|
|||||||
"lengthChange": true,
|
"lengthChange": true,
|
||||||
"searching": true,
|
"searching": true,
|
||||||
"ordering": true,
|
"ordering": true,
|
||||||
"aaSorting": [[ 0, "desc" ]],
|
"aaSorting": [
|
||||||
|
[0, "desc"]
|
||||||
|
],
|
||||||
"info": true,
|
"info": true,
|
||||||
"autoWidth": true
|
"autoWidth": true
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#changemonth').on("click", function(){
|
$('#changemonth').on("click", function() {
|
||||||
|
|
||||||
$("#paylist").attr("method", "post");
|
$("#paylist").attr("method", "post");
|
||||||
|
|
||||||
|
|||||||
@ -1,244 +1,186 @@
|
|||||||
<?php
|
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
||||||
// print_r($month);
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.6/underscore-min.js"></script>
|
||||||
// echo "-------------";
|
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
||||||
// print_r($days);
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js"></script>
|
||||||
//$sample = array_merge($month,$fresh);
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
|
||||||
<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
$("#hdate").datepicker({
|
$("#hdate").datepicker({
|
||||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
dateFormat: 'dd-mm-yy',
|
||||||
});
|
changeMonth: true,
|
||||||
});
|
changeYear: true,
|
||||||
$('html').bind('keypress', function(e)
|
yearRange: '-100:+0'
|
||||||
{
|
});
|
||||||
|
});
|
||||||
|
$('html').bind('keypress', function(e) {
|
||||||
//alert('Key Pressed');
|
//alert('Key Pressed');
|
||||||
if(e.keyCode == 13)
|
if (e.keyCode == 13) {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.num {
|
.num {
|
||||||
text-align:right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="content-wrapper">
|
|
||||||
<!-- Content Header (Page header) -->
|
|
||||||
<section class="content-header">
|
|
||||||
<h1>
|
|
||||||
<center>Public Holiday Information - <?php echo date('Y');?></center>
|
|
||||||
</h1>
|
|
||||||
</section>
|
|
||||||
<section class="content">
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="content-page">
|
||||||
|
<div class="content">
|
||||||
|
<!-- Start Content-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<!-- start page title -->
|
||||||
|
<div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-6">
|
||||||
<div class="box">
|
<div class="page-title-box page-title-box-alt">
|
||||||
<div class="box-header">
|
<h4 class="page-title"> Public Holiday Information - <?php echo date('Y'); ?></h4>
|
||||||
<!--<center><h3 class="box-title">-->
|
|
||||||
<div class="box-tools">
|
|
||||||
|
|
||||||
|
|
||||||
</div><!--</h3></center>-->
|
|
||||||
|
|
||||||
</div><!-- /.box-header -->
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<span>Holiday Name : </span>
|
|
||||||
<input type="text" name="hname" id="hname">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
</div>
|
||||||
<span>Date : </span>
|
</div>
|
||||||
<input type="text" name="hdate" id="hdate">
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="row" style="padding-left: 26px;">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<span>Holiday Name : </span>
|
||||||
|
<input type="text" name="hname" id="hname" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<input type="button" id="Add" value = "Add" class="btn btn-success" >
|
<span>Date : </span>
|
||||||
|
<input type="text" name="hdate" id="hdate" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<input type="button" id="Add" value="Add" class="btn btn-success" class="form-control" style="margin-top: 20px;margin-bottom: 0px;">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p> </p>
|
<div class="card-body">
|
||||||
<div class="box-body">
|
<table id="phdays" class="table dt-responsive nowrap w-100 ria_data_table">
|
||||||
<table id="phdays" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
<thead>
|
||||||
<thead >
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<!-- <th>S.No</th> -->
|
<!-- <th>S.No</th> -->
|
||||||
<th>Holiday_Name</th>
|
<th>Holiday_Name</th>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
<th style="width:10%";>Action</th>
|
<th style="width:10%" ;>Action</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="db">
|
<tbody id="db">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
$index = 0;
|
||||||
|
$testarray = array();
|
||||||
$index=0;
|
if (!empty($days)) {
|
||||||
$testarray=array();
|
foreach ($days as $day) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(!empty($days))
|
|
||||||
{
|
|
||||||
foreach($days as $day)
|
|
||||||
|
|
||||||
{
|
|
||||||
$index++;
|
$index++;
|
||||||
$date = date_create($day->H_Date);
|
$date = date_create($day->H_Date);
|
||||||
$date = date_format($date,'d-m-Y');
|
$date = date_format($date, 'd-m-Y');
|
||||||
?>
|
?>
|
||||||
|
<tr id="<?php echo $index; ?>">
|
||||||
<tr id="<?php echo $index;?>">
|
|
||||||
<!-- <td style="text-align:right;"><?php echo $index ?></td> -->
|
<!-- <td style="text-align:right;"><?php echo $index ?></td> -->
|
||||||
|
<td contenteditable='true' style="text-align:left;"><?php if (!empty($day->H_Name)) {
|
||||||
<td contenteditable='true' style="text-align:left;"><?php if(!empty($day->H_Name)){echo $day->H_Name;}else{echo "NO DATA";}?></td>
|
echo $day->H_Name;
|
||||||
<td contenteditable='false' style="text-align:right;"><?php echo $date;?></td>
|
} else {
|
||||||
<td style="text-align:right;"><a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" id="Del" ><span class="glyphicon glyphicon-trash"></span></a></td>
|
echo "NO DATA";
|
||||||
|
} ?></td>
|
||||||
|
<td contenteditable='false' style="text-align:left;"><?php echo $date; ?></td>
|
||||||
|
<td style="text-align:center;"><a href='#' onclick="DeleteRow(<?php echo $index; ?>)" id="Del"><span class="fas fa-trash"></span></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4" id="savebutton">
|
<div class="col-md-4" id="savebutton">
|
||||||
<input type="button" id="submit" value = "Save" class="btn btn-success">
|
<input type="button" id="submit" value="Save" class="btn btn-success">
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div><!-- /.box-body -->
|
|
||||||
<!-- <div class="box-footer clearfix">
|
|
||||||
|
|
||||||
</div> -->
|
|
||||||
</div><!-- /.box -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</div> <!-- end card body-->
|
||||||
|
</div> <!-- end card -->
|
||||||
|
</div><!-- end col-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div> <!-- container -->
|
||||||
|
</div> <!-- content -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript">
|
|
||||||
$(function () {
|
|
||||||
|
|
||||||
$('#phdays').DataTable({
|
|
||||||
"paging": true,
|
|
||||||
"lengthChange": true,
|
|
||||||
"searching": true,
|
|
||||||
"ordering": false,
|
|
||||||
// "aaSorting": [[ 0, "asc" ]],
|
|
||||||
"info": true,
|
|
||||||
"autoWidth": true
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<script type="text/html" id="addList">
|
<script type="text/html" id="addList">
|
||||||
<tr id="<%=index%>">
|
<tr>
|
||||||
<td style="text-align:left;" contenteditable="true"><%=Holiday_Name%></td>
|
<td style="text-align:left;" contenteditable="true"><%=Holiday_Name%></td>
|
||||||
<td style="text-align:right;" contenteditable="false"><%=Date%></td>
|
<td style="text-align:left;" contenteditable="false"><%=Date%></td>
|
||||||
<td style="text-align:right;">
|
<td style="text-align:center;">
|
||||||
<a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
|
<a href='#' onclick="DeleteRow(<?php echo $index; ?>)" id="Del"><span class="fas fa-trash"></span></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function DeleteRow(rowid)
|
function DeleteRow(rowid) {
|
||||||
{
|
var d = '';
|
||||||
var d='';
|
|
||||||
//alert(rowid);
|
//alert(rowid);
|
||||||
var tr = document.getElementById(rowid);
|
var tr = document.getElementById(rowid);
|
||||||
var Row = $('#phdays').find('tr').eq(rowid).find('td');
|
var Row = $('#phdays').find('tr').eq(rowid).find('td');
|
||||||
$.each(Row,function(index,value){
|
$.each(Row, function(index, value) {
|
||||||
if(index == 1 ){
|
if (index == 1) {
|
||||||
d = value.textContent
|
d = value.textContent
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// alert(d);
|
// alert(d);
|
||||||
$('#content').loader('show');
|
// $('#content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{param1:d},
|
data: {
|
||||||
type:"POST",
|
param1: d
|
||||||
url:"<?php echo base_url() ?>monthlypay/deletePublicHoliday",
|
},
|
||||||
|
type: "POST",
|
||||||
|
url: "<?php echo base_url() ?>monthlypay/deletePublicHoliday",
|
||||||
|
|
||||||
success:function(data){
|
success: function(data) {
|
||||||
$('#content').loader('hide');
|
// $('#content').loader('hide');
|
||||||
alert(data);
|
alert(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
tr.parentNode.removeChild(tr);
|
tr.parentNode.removeChild(tr);
|
||||||
}
|
}
|
||||||
$('#Add').click(function(){
|
$('#Add').click(function() {
|
||||||
|
|
||||||
var index = $('#phdays tr').length;
|
var index = $('#phdays tr').length;
|
||||||
//alert(index);
|
|
||||||
var temp = index;
|
|
||||||
var H_name = $('#hname').val();
|
var H_name = $('#hname').val();
|
||||||
var H_date = $('#hdate').val();
|
var H_date = $('#hdate').val();
|
||||||
|
|
||||||
|
if (H_name != '' && H_date != '') {
|
||||||
|
|
||||||
if(H_name != '' && H_date != '')
|
|
||||||
{
|
|
||||||
var template = jQuery("#addList").html();
|
var template = jQuery("#addList").html();
|
||||||
index = parseInt(index);
|
$('#db').append(_.template(template)({
|
||||||
$('#db').append(_.template(template,{index:temp,Holiday_Name:H_name,Date:H_date}));
|
index: index,
|
||||||
var tablevalue = $('#phdays').tableToJSON(); // Convert the table into a javascript object
|
Holiday_Name: H_name,
|
||||||
var value = JSON.stringify(tablevalue);
|
Date: H_date
|
||||||
|
}));
|
||||||
$('#hname').val('');
|
$('#hname').val('');
|
||||||
$('#hdate').val('');
|
$('#hdate').val('');
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#submit').click(function(){
|
$('#submit').click(function() {
|
||||||
|
|
||||||
var jsondata = $('#phdays').tableToJSON();
|
var jsondata = $('#phdays').tableToJSON();
|
||||||
var jsondata = JSON.stringify(jsondata);
|
var jsondata = JSON.stringify(jsondata);
|
||||||
|
|
||||||
$('#content').loader('show');
|
$('#content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{param1:jsondata},
|
data: {
|
||||||
type:"POST",
|
param1: jsondata
|
||||||
url:"<?php echo base_url() ?>monthlypay/savePublicHolidays",
|
},
|
||||||
|
type: "POST",
|
||||||
|
url: "<?php echo base_url() ?>monthlypay/savePublicHolidays",
|
||||||
|
|
||||||
success:function(data){
|
success: function(data) {
|
||||||
$('#content').loader('hide');
|
$('#content').loader('hide');
|
||||||
alert(data);
|
alert(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1868,7 +1868,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3" id="Deliverydtdiv">
|
<div class="form-group col-md-3" id="Deliverydtdiv">
|
||||||
<label>Delivery Date<span class="badge mandatory">*</span></label>
|
<label>Delivery Date<span class="badge mandatory">*</span></label>
|
||||||
<input type="date" class="form-control num" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="Deliverydt" name="Deliverydt" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off" value="<?= date('d/m/Y'); ?>">
|
<input class="form-control num" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="Deliverydt" name="Deliverydt" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off" value="<?= date('d/m/Y'); ?>">
|
||||||
|
|
||||||
<!-- <div>
|
<!-- <div>
|
||||||
<?php
|
<?php
|
||||||
@ -1898,7 +1898,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label>Purchase Order Date</label>
|
<label>Purchase Order Date</label>
|
||||||
<input type="date" class="form-control num" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="PODate" name="PODate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off" value="<?= date('d/m/Y'); ?>">
|
<input class="form-control num" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="PODate" name="PODate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off" value="<?= date('d/m/Y'); ?>">
|
||||||
|
|
||||||
<!-- <div>
|
<!-- <div>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@ -170,7 +170,10 @@
|
|||||||
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
||||||
],
|
],
|
||||||
pageLength: 10, // Default rows per page
|
pageLength: 10, // Default rows per page
|
||||||
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
|
lengthMenu: [
|
||||||
|
[10, 20, 30, 50, -1],
|
||||||
|
[10, 20, 30, 50, "All"]
|
||||||
|
], // Rows per page options
|
||||||
responsive: true, // Responsive table
|
responsive: true, // Responsive table
|
||||||
order: [], // Default ordering (column index 0, descending)
|
order: [], // Default ordering (column index 0, descending)
|
||||||
language: {
|
language: {
|
||||||
@ -235,5 +238,5 @@
|
|||||||
toDateInput.value = fromDate;
|
toDateInput.value = fromDate;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -1,38 +1,55 @@
|
|||||||
<script>
|
<script>
|
||||||
<!-- Editable table-->
|
<!-- Editable table
|
||||||
$(function () {
|
-->
|
||||||
$("td").dblclick(function () {
|
$(function
|
||||||
var OriginalContent = $(this).text();
|
()
|
||||||
|
{
|
||||||
|
$("td").dblclick(function
|
||||||
|
()
|
||||||
|
{
|
||||||
|
var
|
||||||
|
OriginalContent
|
||||||
|
=
|
||||||
|
$(this).text();
|
||||||
$(this).addClass("cellEditing");
|
$(this).addClass("cellEditing");
|
||||||
$(this).html("<input type='text' value='" + OriginalContent + "' />");
|
$(this).html("
|
||||||
$(this).children().first().focus();
|
<input type='text' value='" + OriginalContent + "' />");
|
||||||
$(this).children().first().keypress(function (e) {
|
$(this).children().first().focus();
|
||||||
if (e.which == 13) {
|
$(this).children().first().keypress(function (e) {
|
||||||
var newContent = $(this).val();
|
if (e.which == 13) {
|
||||||
$(this).parent().text(newContent);
|
var newContent = $(this).val();
|
||||||
$(this).parent().removeClass("cellEditing");
|
$(this).parent().text(newContent);
|
||||||
} });
|
$(this).parent().removeClass("cellEditing");
|
||||||
$(this).children().first().blur(function(){
|
} });
|
||||||
$(this).parent().text(OriginalContent);
|
$(this).children().first().blur(function(){
|
||||||
$(this).parent().removeClass("cellEditing");
|
$(this).parent().text(OriginalContent);
|
||||||
});
|
$(this).parent().removeClass("cellEditing");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.table-bordered>thead>tr>th, .table-bordered>tbody>tr>th, .table-bordered>tfoot>tr>th, .table-bordered>thead>tr>td, .table-bordered>tbody>tr>td, .table-bordered>tfoot>tr>td {border: 1px solid #333;}
|
.table-bordered>thead>tr>th,
|
||||||
|
.table-bordered>tbody>tr>th,
|
||||||
</style>
|
.table-bordered>tfoot>tr>th,
|
||||||
|
.table-bordered>thead>tr>td,
|
||||||
|
.table-bordered>tbody>tr>td,
|
||||||
|
.table-bordered>tfoot>tr>td {
|
||||||
|
border: 1px solid #333;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<?php
|
<?php
|
||||||
$attributes = array('class' => 'form-label-left RequisitionList ','name' => 'RequisitionList','id' => 'RequisitionList','method' => 'post','role' => 'form' );
|
$attributes = array('class' => 'form-label-left RequisitionList ', 'name' => 'RequisitionList', 'id' => 'RequisitionList', 'method' => 'post', 'role' => 'form');
|
||||||
|
|
||||||
echo form_open(base_url().'purchaseorderform/purchaseorder',$attributes); ?>
|
echo form_open(base_url() . 'purchaseorderform/purchaseorder', $attributes); ?>
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<center><b><h2>Requisition List </h2></b></center>
|
<center><b>
|
||||||
|
<h2>Requisition List </h2>
|
||||||
|
</b></center>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@ -40,20 +57,19 @@
|
|||||||
<label>Department Name</label>
|
<label>Department Name</label>
|
||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
$options = array("0"=>'Select Department Name');
|
$options = array("0" => 'Select Department Name');
|
||||||
//print_r( $options);
|
//print_r( $options);
|
||||||
|
|
||||||
if(!empty($POType))
|
if (!empty($POType)) {
|
||||||
{
|
|
||||||
foreach ($SupplierName as $SID):
|
foreach ($SupplierName as $SID):
|
||||||
|
|
||||||
|
|
||||||
$options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
|
$options[$SID->SupplierID] = $SID->SupplierID . ' ' . ' - ' . ' ' . $SID->SupplierName;
|
||||||
|
|
||||||
endforeach;
|
endforeach;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo form_dropdown('SupplierID', $options,set_value('SupplierID'),'id="SupplierID"' ,'class = "form-control required"','required="true"');
|
echo form_dropdown('SupplierID', $options, set_value('SupplierID'), 'id="SupplierID"', 'class = "form-control required"', 'required="true"');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -63,20 +79,19 @@
|
|||||||
<label>Status</label>
|
<label>Status</label>
|
||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
$options = array("0"=>'Select Status');
|
$options = array("0" => 'Select Status');
|
||||||
//print_r( $options);
|
//print_r( $options);
|
||||||
|
|
||||||
if(!empty($POType))
|
if (!empty($POType)) {
|
||||||
{
|
|
||||||
foreach ($SupplierName as $SID):
|
foreach ($SupplierName as $SID):
|
||||||
|
|
||||||
|
|
||||||
$options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
|
$options[$SID->SupplierID] = $SID->SupplierID . ' ' . ' - ' . ' ' . $SID->SupplierName;
|
||||||
|
|
||||||
endforeach;
|
endforeach;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo form_dropdown('SupplierID', $options,set_value('SupplierID'),'id="SupplierID"' ,'class = "form-control required"','required="true"');
|
echo form_dropdown('SupplierID', $options, set_value('SupplierID'), 'id="SupplierID"', 'class = "form-control required"', 'required="true"');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -107,7 +122,7 @@
|
|||||||
|
|
||||||
<button type="button" class="btn btn-success">Search</button>
|
<button type="button" class="btn btn-success">Search</button>
|
||||||
<button type="button" class="btn btn-success">Clear</button>
|
<button type="button" class="btn btn-success">Clear</button>
|
||||||
</div><br/>
|
</div><br />
|
||||||
|
|
||||||
|
|
||||||
<div class="modal fade" id="myModal" role="dialog">
|
<div class="modal fade" id="myModal" role="dialog">
|
||||||
@ -117,7 +132,9 @@
|
|||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
<center><h4> Requisition Details - REQ No</h4></center>
|
<center>
|
||||||
|
<h4> Requisition Details - REQ No</h4>
|
||||||
|
</center>
|
||||||
</div>
|
</div>
|
||||||
<div align="left">
|
<div align="left">
|
||||||
|
|
||||||
@ -126,7 +143,7 @@
|
|||||||
<label>Req Type</label>
|
<label>Req Type</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'RequestType','value' => set_value('RequestType'),'id'=>'RequestType', 'class' => 'form-control' ,'readonly' => 'true');
|
$data = array('name' => 'RequestType', 'value' => set_value('RequestType'), 'id' => 'RequestType', 'class' => 'form-control', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@ -136,7 +153,7 @@
|
|||||||
<label>Req By</label>
|
<label>Req By</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'RequestedBy','value' => set_value('RequestedBy'),'id'=>'RequestedBy', 'class' => 'form-control' ,'readonly' => 'true');
|
$data = array('name' => 'RequestedBy', 'value' => set_value('RequestedBy'), 'id' => 'RequestedBy', 'class' => 'form-control', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@ -145,7 +162,7 @@
|
|||||||
<label>Dep Name</label>
|
<label>Dep Name</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'DeptName','value' => set_value('DeptName'),'id'=>'DeptName', 'class' => 'form-control' ,'readonly' => 'true');
|
$data = array('name' => 'DeptName', 'value' => set_value('DeptName'), 'id' => 'DeptName', 'class' => 'form-control', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@ -154,7 +171,7 @@
|
|||||||
<label>Desigination</label>
|
<label>Desigination</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'Desigination','value' => set_value('Desigination'),'id'=>'Desigination', 'class' => 'form-control' ,'readonly' => 'true');
|
$data = array('name' => 'Desigination', 'value' => set_value('Desigination'), 'id' => 'Desigination', 'class' => 'form-control', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@ -168,7 +185,7 @@
|
|||||||
<label>Req Dt</label>
|
<label>Req Dt</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'RequisitionDt','value' => set_value('RequisitionDt'),'id'=>'RequisitionDt', 'class' => 'form-control' ,'readonly' => 'true');
|
$data = array('name' => 'RequisitionDt', 'value' => set_value('RequisitionDt'), 'id' => 'RequisitionDt', 'class' => 'form-control', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@ -178,7 +195,7 @@
|
|||||||
<label>Cost Center Name</label>
|
<label>Cost Center Name</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'CostCenterName','value' => set_value('CostCenterName'),'id'=>'CostCenterName', 'class' => 'form-control' ,'readonly' => 'true');
|
$data = array('name' => 'CostCenterName', 'value' => set_value('CostCenterName'), 'id' => 'CostCenterName', 'class' => 'form-control', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@ -187,7 +204,7 @@
|
|||||||
<label>Avl Budget Amt</label>
|
<label>Avl Budget Amt</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'AvailableBudment','value' => set_value('AvailableBudment'),'id'=>'AvailableBudment', 'class' => 'form-control' ,'readonly' => 'true');
|
$data = array('name' => 'AvailableBudment', 'value' => set_value('AvailableBudment'), 'id' => 'AvailableBudment', 'class' => 'form-control', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@ -196,7 +213,7 @@
|
|||||||
<label>Status</label>
|
<label>Status</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'Status','value' => set_value('Status'),'id'=>'Status', 'class' => 'form-control' ,'readonly' => 'true');
|
$data = array('name' => 'Status', 'value' => set_value('Status'), 'id' => 'Status', 'class' => 'form-control', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@ -280,7 +297,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" name="chk1" id="chk1"/> </td>
|
<td><input type="checkbox" name="chk1" id="chk1" /> </td>
|
||||||
<td><a data-toggle="modal" data-target="#myModal"><u>REQ000001</u></a></td>
|
<td><a data-toggle="modal" data-target="#myModal"><u>REQ000001</u></a></td>
|
||||||
<td>2/3/2017</td>
|
<td>2/3/2017</td>
|
||||||
<td data-name="sel">
|
<td data-name="sel">
|
||||||
@ -308,7 +325,7 @@
|
|||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" name="chk3" id="chk3"/> </td>
|
<td><input type="checkbox" name="chk3" id="chk3" /> </td>
|
||||||
<td><a data-toggle="modal" data-target="#myModal"><u>REQ000001</u></a></td>
|
<td><a data-toggle="modal" data-target="#myModal"><u>REQ000001</u></a></td>
|
||||||
<td>9/4/2017</td>
|
<td>9/4/2017</td>
|
||||||
<td data-name="sel">
|
<td data-name="sel">
|
||||||
@ -338,7 +355,7 @@
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var baseurl = "<?php print base_url(); ?>";
|
var baseurl = "<?php print base_url(); ?>";
|
||||||
$(".RequisitionList").submit(function(e) {
|
$(".RequisitionList").submit(function(e) {
|
||||||
|
|
||||||
|
|
||||||
@ -348,27 +365,21 @@ var baseurl = "<?php print base_url(); ?>";
|
|||||||
var chk1 = $('#chk1').val();
|
var chk1 = $('#chk1').val();
|
||||||
var chk2 = $('#chk2').val();
|
var chk2 = $('#chk2').val();
|
||||||
var chk3 = $('#chk3').val();
|
var chk3 = $('#chk3').val();
|
||||||
if( $('#chk1').is(":checked"))
|
if ($('#chk1').is(":checked")) {
|
||||||
{
|
|
||||||
id = '';
|
id = '';
|
||||||
}
|
} else if ($('#chk2').is(":checked")) {
|
||||||
else if($('#chk2').is(":checked"))
|
|
||||||
{
|
|
||||||
id = '';
|
id = '';
|
||||||
}
|
} else if ($('#chk3').is(":checked")) {
|
||||||
else if($('#chk3').is(":checked"))
|
|
||||||
{
|
|
||||||
id = '';
|
id = '';
|
||||||
}
|
}
|
||||||
// alert(chk1);
|
// alert(chk1);
|
||||||
// alert(chk2);
|
// alert(chk2);
|
||||||
// alert(chk3);
|
// alert(chk3);
|
||||||
|
|
||||||
window.location = baseurl +'purchaseorderform/purchaseorder';
|
window.location = baseurl + 'purchaseorderform/purchaseorder';
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
//Date range picker
|
//Date range picker
|
||||||
$('#reservation').daterangepicker();
|
$('#reservation').daterangepicker();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ span.highlight {
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="page-title-box page-title-box-alt">
|
<div class="page-title-box page-title-box-alt">
|
||||||
<h4 class="page-title">Requisition Listing</h4>
|
<h4 class="page-title">Requisition List</h4>
|
||||||
<?php if($DraftCount == 0) { ?>
|
<?php if($DraftCount == 0) { ?>
|
||||||
<a class="btn btn-success" href="<?php echo base_url(); ?>RequisitionForm">Raise New Requisition</a>
|
<a class="btn btn-success" href="<?php echo base_url(); ?>RequisitionForm">Raise New Requisition</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
||||||
<style>
|
<style>
|
||||||
/* Target the first child element of #datatable-buttons_wrapper */
|
/* Target the first child element of #datatable-buttons_wrapper */
|
||||||
#datatable-buttons_wrapper.dataTables_wrapper.dt-bootstrap4.no-footer > :nth-child(1) {
|
#datatable-buttons_wrapper.dataTables_wrapper.dt-bootstrap4.no-footer> :nth-child(1) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Target the third child element of #datatable-buttons_wrapper */
|
/* Target the third child element of #datatable-buttons_wrapper */
|
||||||
#datatable-buttons_wrapper.dataTables_wrapper.dt-bootstrap4.no-footer> :nth-child(3) {
|
#datatable-buttons_wrapper.dataTables_wrapper.dt-bootstrap4.no-footer> :nth-child(3) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card_font_colorset_green{
|
.card_font_colorset_green {
|
||||||
font-size: 23.7215px;
|
font-size: 23.7215px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
@ -18,7 +18,8 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
color: rgb(86, 166, 75);
|
color: rgb(86, 166, 75);
|
||||||
}
|
}
|
||||||
.card_font_colorset_bule{
|
|
||||||
|
.card_font_colorset_bule {
|
||||||
font-size: 23.7215px;
|
font-size: 23.7215px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
@ -26,7 +27,8 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
color: rgb(31, 96, 196);
|
color: rgb(31, 96, 196);
|
||||||
}
|
}
|
||||||
.card_font_colorset_red{
|
|
||||||
|
.card_font_colorset_red {
|
||||||
font-size: 23.7215px;
|
font-size: 23.7215px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
@ -34,61 +36,66 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
color: rgb(173, 3, 23);
|
color: rgb(173, 3, 23);
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
#Requisition_filter {
|
#Requisition_filter {
|
||||||
float: inline-end;
|
float: inline-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Requisition_wrapper .row .col-sm-4 {
|
#Requisition_wrapper .row .col-sm-4 {
|
||||||
flex-basis: 50%;
|
flex-basis: 50%;
|
||||||
float: inline-end;
|
float: inline-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Requisition_paginate .pagination {
|
#Requisition_paginate .pagination {
|
||||||
flex-basis: 50%;
|
flex-basis: 50%;
|
||||||
float: inline-end;
|
float: inline-end;
|
||||||
margin: 0 0 15px;
|
margin: 0 0 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Requisition_wrapper .row:nth-child(3),
|
#Requisition_wrapper .row:nth-child(3),
|
||||||
#Requisition_wrapper .row:nth-child(1) {
|
#Requisition_wrapper .row:nth-child(1) {
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Requisition_info {
|
#Requisition_info {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataTables_wrapper {
|
.dataTables_wrapper {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.highlight {
|
span.highlight {
|
||||||
background-color: yellow;
|
background-color: yellow;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.Date-filter-form {
|
.Date-filter-form {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px; /* Adjust the gap as needed */
|
gap: 10px;
|
||||||
|
/* Adjust the gap as needed */
|
||||||
}
|
}
|
||||||
.Date-filter-form input, .Date-filter-form button {
|
|
||||||
|
.Date-filter-form input,
|
||||||
|
.Date-filter-form button {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Date-filter-form button {
|
.Date-filter-form button {
|
||||||
background-color: #007bff;
|
background-color: #007bff;
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Date-filter-form button:hover {
|
.Date-filter-form button:hover {
|
||||||
background-color: #0056b3;
|
background-color: #0056b3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-button {
|
.icon-button {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
@ -96,10 +103,11 @@ span.highlight {
|
|||||||
color: #007bff;
|
color: #007bff;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-button:hover {
|
.icon-button:hover {
|
||||||
color: #0056b3;
|
color: #0056b3;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="content-page">
|
<div class="content-page">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<!-- Start Content-->
|
<!-- Start Content-->
|
||||||
@ -109,7 +117,7 @@ span.highlight {
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="page-title-box page-title-box-alt">
|
<div class="page-title-box page-title-box-alt">
|
||||||
<h4 class="page-title">Invoices Table</h4>
|
<h4 class="page-title">Invoices List</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -132,57 +140,59 @@ span.highlight {
|
|||||||
<table id="datatable-buttosns" class="table dt-responsive nowrap w-100">
|
<table id="datatable-buttosns" class="table dt-responsive nowrap w-100">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th >Invoice Date</th>
|
<th>Invoice Date</th>
|
||||||
<th>Invoice No</th>
|
<th>Invoice No</th>
|
||||||
<th>Client Name</th>
|
<th>Client Name</th>
|
||||||
<th >Product</th>
|
<th>Product</th>
|
||||||
<th>Rate</th>
|
<th>Rate</th>
|
||||||
<th>Quantity</th>
|
<th>Quantity</th>
|
||||||
<th>Sub Total</th>
|
<th>Sub Total</th>
|
||||||
<th>GST</th>
|
<th>GST</th>
|
||||||
<th>Total</th>
|
<th>Total</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th >E-Invoice Number</th>
|
<th>E-Invoice Number</th>
|
||||||
<th >Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<input type="text" id="invoice_id_set" name="invoice_id_set" hidden>
|
<input type="text" id="invoice_id_set" name="invoice_id_set" hidden>
|
||||||
<?php if(!empty($sales_invoice)){ foreach($sales_invoice as $invoice){
|
<?php if (!empty($sales_invoice)) {
|
||||||
|
foreach ($sales_invoice as $invoice) {
|
||||||
|
|
||||||
$subtotal = $invoice->item_price * $invoice->item_quantity;
|
$subtotal = $invoice->item_price * $invoice->item_quantity;
|
||||||
// Calculate CGST and SGST
|
// Calculate CGST and SGST
|
||||||
$cgst_amount = ($subtotal * $invoice->cgst) / 100;
|
$cgst_amount = ($subtotal * $invoice->cgst) / 100;
|
||||||
$sgst_amount = ($subtotal * $invoice->sgst) / 100;
|
$sgst_amount = ($subtotal * $invoice->sgst) / 100;
|
||||||
$total = $subtotal + $cgst_amount + $sgst_amount;?>
|
$total = $subtotal + $cgst_amount + $sgst_amount; ?>
|
||||||
<!-- Main invoice row -->
|
<!-- Main invoice row -->
|
||||||
<tr >
|
<tr>
|
||||||
<td ><?php echo date('d-m-Y', strtotime($invoice->invoice_date_created)); ?></td>
|
<td><?php echo date('d-m-Y', strtotime($invoice->invoice_date_created)); ?></td>
|
||||||
<td >
|
<td>
|
||||||
<?php if(!empty($invoice->invoice_url)){ ?>
|
<?php if (!empty($invoice->invoice_url)) { ?>
|
||||||
<a href="<?php echo $invoice->invoice_url; ?>" target="_blank" class="invoice-link">
|
<a href="<?php echo $invoice->invoice_url; ?>" target="_blank" class="invoice-link">
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php echo $invoice->invoice_number; ?>
|
<?php echo $invoice->invoice_number; ?>
|
||||||
<?php if(!empty($invoice->invoice_url)){ ?>
|
<?php if (!empty($invoice->invoice_url)) { ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
<td ><?php echo $invoice->client_name ?></td>
|
<td><?php echo $invoice->client_name ?></td>
|
||||||
<td ><?php echo $invoice->item_name ?></td>
|
<td><?php echo $invoice->item_name ?></td>
|
||||||
<td ><?php echo $invoice->item_price ?></td>
|
<td><?php echo $invoice->item_price ?></td>
|
||||||
<td ><?php echo number_format($invoice->item_quantity, 2 ,'.', ',' ) ?></td>
|
<td><?php echo number_format($invoice->item_quantity, 2, '.', ',') ?></td>
|
||||||
<td ><?php echo number_format($subtotal, 2, '.', ',') ?></td>
|
<td><?php echo number_format($subtotal, 2, '.', ',') ?></td>
|
||||||
<td ><?php echo number_format($cgst_amount+$sgst_amount, 2, '.', ',') ?></td>
|
<td><?php echo number_format($cgst_amount + $sgst_amount, 2, '.', ',') ?></td>
|
||||||
<td ><?php echo number_format($total, 2, '.', ',') ?></td>
|
<td><?php echo number_format($total, 2, '.', ',') ?></td>
|
||||||
<td ><?php echo $invoice->status ?></td>
|
<td><?php echo $invoice->status ?></td>
|
||||||
<td ><?php echo $invoice->e_invoice_number; ?></td>
|
<td><?php echo $invoice->e_invoice_number; ?></td>
|
||||||
<td >
|
<td>
|
||||||
<a class="edit-button" style="cursor: pointer; display: inline-block;" title="Files Upload" onclick="openInvoiceModal('<?php echo $invoice->invoice_number; ?>', '<?php echo $invoice->client_name; ?>', '<?php echo $invoice->invoice_date_created; ?>', '<?php echo $invoice->invoice_id; ?>')">
|
<a class="edit-button" style="cursor: pointer; display: inline-block;" title="Files Upload" onclick="openInvoiceModal('<?php echo $invoice->invoice_number; ?>', '<?php echo $invoice->client_name; ?>', '<?php echo $invoice->invoice_date_created; ?>', '<?php echo $invoice->invoice_id; ?>')">
|
||||||
<i class="fas fa-file-upload text-muted" style="font-size: 18px; vertical-align: middle;"></i>
|
<i class="fas fa-file-upload text-muted" style="font-size: 18px; vertical-align: middle;"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } } ?>
|
<?php }
|
||||||
|
} ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div> <!-- end card body-->
|
</div> <!-- end card body-->
|
||||||
@ -195,8 +205,68 @@ span.highlight {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Modal Structure -->
|
||||||
|
<div class="modal fade" id="invoiceModal" tabindex="-1" role="dialog" aria-labelledby="invoiceModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header" style="display:block">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
|
||||||
|
<h4 class="modal-title" id="standard-modalLabel">
|
||||||
|
<span id="invoice_number_display_model"></span> -
|
||||||
|
<span id="date_display_model"></span>
|
||||||
|
</h4>
|
||||||
|
<span id="client_name_display_model"></span>
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" style="margin-top: 23px;">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<button type="button" class="btn btn-primary btn-sm a1" onclick="appendFilesFileds()" id="day">
|
||||||
|
Add New File
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div id="filesContainer">
|
||||||
|
<!-- Rows will be dynamically appended here -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if (isset($invoice_data)) {
|
||||||
|
foreach ($invoice_data as $key => $value) { ?>
|
||||||
|
|
||||||
|
<div class="row pad ">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<span>File Name</span>
|
||||||
|
<input type="text" maxlength="255" class="form-control"
|
||||||
|
value="<?php echo $value['file_name']; ?>" readonly>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="margin-top: 25px;">
|
||||||
|
<a href="<?php echo base_url() . 'public/uploads/images/emp_files/' . $value['emp_file']; ?>"
|
||||||
|
download>
|
||||||
|
<i class="fa fa-download" aria-hidden="true"
|
||||||
|
style="font-size: 25px;"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-5" style="margin-top: 23px;">
|
||||||
|
<button type="button" class="btn btn-danger btn-sm"
|
||||||
|
id="<?= $value['id']; ?>"
|
||||||
|
onclick="removeContact(this)">Delete</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php }
|
||||||
|
} ?>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||||
|
<button type="button" onclick="saveAttachment()" class="btn btn-primary">Save changes</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// Initialize the DataTable
|
// Initialize the DataTable
|
||||||
var table = $('#datatable-buttosns').DataTable({
|
var table = $('#datatable-buttosns').DataTable({
|
||||||
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
||||||
@ -204,9 +274,14 @@ $(document).ready(function() {
|
|||||||
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
||||||
],
|
],
|
||||||
pageLength: 10, // Default rows per page
|
pageLength: 10, // Default rows per page
|
||||||
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
|
lengthMenu: [
|
||||||
|
[10, 20, 30, 50, -1],
|
||||||
|
[10, 20, 30, 50, "All"]
|
||||||
|
], // Rows per page options
|
||||||
responsive: true, // Responsive table
|
responsive: true, // Responsive table
|
||||||
order: [[0, 'desc']], // Default ordering (column index 0, descending)
|
order: [
|
||||||
|
[0, 'desc']
|
||||||
|
], // Default ordering (column index 0, descending)
|
||||||
language: {
|
language: {
|
||||||
paginate: {
|
paginate: {
|
||||||
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
||||||
@ -269,5 +344,164 @@ $(document).ready(function() {
|
|||||||
toDateInput.value = fromDate;
|
toDateInput.value = fromDate;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
});
|
||||||
|
|
||||||
|
function openInvoiceModal(invoiceNumber, clientName, invoiceDateCreated, invoiceId) {
|
||||||
|
$('#invoice_number_display_model').html(invoiceNumber);
|
||||||
|
$('#date_display_model').html(invoiceDateCreated);
|
||||||
|
$('#client_name_display_model').html(clientName);
|
||||||
|
$('#invoice_id_set').val(invoiceId);
|
||||||
|
|
||||||
|
// document.getElementById('modalInvoiceNumber').innerText = invoiceNumber;
|
||||||
|
$('#day').show();
|
||||||
|
// $('#invoiceModal').modal('show');
|
||||||
|
// url: "<?php echo base_url() ?>servicepurchaseorder/getPODetails",
|
||||||
|
$.ajax({
|
||||||
|
url: '<?php echo base_url() ?>getInvoiceAttachment',
|
||||||
|
type: 'GET',
|
||||||
|
data: {
|
||||||
|
invoice_number: invoiceId
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
console.log(response);
|
||||||
|
|
||||||
|
console.log(JSON.parse(response).invoiceAttachment);
|
||||||
|
var list = JSON.parse(response).invoiceAttachment;
|
||||||
|
var attachmentsHtml = '';
|
||||||
|
|
||||||
|
list.forEach(element => {
|
||||||
|
console.log(element);
|
||||||
|
var fileName = element.file_name;
|
||||||
|
var attachmentName = element.attachment_name;
|
||||||
|
attachmentsHtml += `
|
||||||
|
<div class="row pad">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<span>File Name</span>
|
||||||
|
<input type="text" maxlength="255" class="form-control"
|
||||||
|
value="${attachmentName}" readonly>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="margin-top: 25px;">
|
||||||
|
<a href="<?php echo base_url() . 'public/uploads/images/invoice_files/' ?>${fileName}" download>
|
||||||
|
<i class="fa fa-download" aria-hidden="true"
|
||||||
|
style="font-size: 25px;"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-5" style="margin-top: 23px;">
|
||||||
|
<button type="button" class="btn btn-danger btn-sm"
|
||||||
|
id="${element.invoice_attachment_id}"
|
||||||
|
onclick="removeContact(this)">Delete</button>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
});
|
||||||
|
$('#filesContainer').html(attachmentsHtml);
|
||||||
|
$('#invoiceModal').modal('show');
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
// Handle any errors during the AJAX request
|
||||||
|
$('#filesContainer').html('<p>There was an error loading the attachments.</p>');
|
||||||
|
$('#invoiceModal').modal('show');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function appendFilesFileds(data) {
|
||||||
|
var newRowHtml = `
|
||||||
|
<div class="row pad">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<span for="file_name">File name</span>
|
||||||
|
<input type="text" id="file_name" name="file_name[]" maxlength="255" class="form-control" value="${data != null && data != '' ? data.file_name : ''}">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<span for="emp_file">File</span>
|
||||||
|
<input type="file" name="emp_file[]" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4" style="margin-top: 23px;">
|
||||||
|
<button type="button" class="btn btn-danger btn-sm" onclick="removeContact(this)">Remove</button>
|
||||||
|
<button type="button" class="btn btn-primary btn-sm a1" onclick="appendFilesFileds()">Add</button>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
// Append the new row to the container
|
||||||
|
$('#filesContainer').append(newRowHtml);
|
||||||
|
|
||||||
|
// Hide all "Add" buttons except the last one
|
||||||
|
$('.a1').hide();
|
||||||
|
$('#filesContainer .pad:last .a1').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeContact(button) {
|
||||||
|
|
||||||
|
$(button).closest('.pad').remove();
|
||||||
|
$('#filesContainer .a1').hide();
|
||||||
|
$('#filesContainer .pad:last .a1').show();
|
||||||
|
var len = $('#filesContainer .pad:last .a1')
|
||||||
|
var length = len.length;
|
||||||
|
if (length == 0) {
|
||||||
|
$('#day').show()
|
||||||
|
} else {
|
||||||
|
$('#day').hide()
|
||||||
|
}
|
||||||
|
console.log("-------------------");
|
||||||
|
console.log(button);
|
||||||
|
console.log($(button).val());
|
||||||
|
console.log($(button).attr('id'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: '<?php echo base_url() ?>deleteAttachment',
|
||||||
|
type: 'GET',
|
||||||
|
data: {
|
||||||
|
invoice_attachment_id: $(button).attr('id')
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
console.log(response);
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveAttachment() {
|
||||||
|
var formData = new FormData();
|
||||||
|
var invoiceId = $('#invoice_id_set').val();
|
||||||
|
formData.append('invoice_id', invoiceId);
|
||||||
|
|
||||||
|
// Append files
|
||||||
|
$('input[name="emp_file[]"]').each(function(index, input) {
|
||||||
|
var files = $(input)[0].files;
|
||||||
|
if (files.length > 0) {
|
||||||
|
formData.append('emp_file[]', files[0]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Append other fields
|
||||||
|
$('input[name="file_name[]"]').each(function(index, input) {
|
||||||
|
formData.append('file_name[]', $(input).val());
|
||||||
|
});
|
||||||
|
|
||||||
|
// AJAX request using FormData
|
||||||
|
$.ajax({
|
||||||
|
url: '<?php echo base_url() ?>saveAttachment',
|
||||||
|
type: 'POST',
|
||||||
|
data: formData,
|
||||||
|
processData: false, // Prevent jQuery from converting the data
|
||||||
|
contentType: false, // Prevent jQuery from overriding the content type
|
||||||
|
success: function(response) {
|
||||||
|
console.log(response);
|
||||||
|
if (response.success) {
|
||||||
|
$('#invoiceModal').modal('hide');
|
||||||
|
// Handle success
|
||||||
|
} else {
|
||||||
|
alert(response.message);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
alert('An error occurred while saving the attachment.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -165,8 +165,8 @@
|
|||||||
url: "<?php echo base_url() ?>user/deleteUser",
|
url: "<?php echo base_url() ?>user/deleteUser",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
if (data) {
|
if (data) {
|
||||||
$('#content').loader('hide');
|
// $('#content').loader('hide');
|
||||||
alert(data);
|
// alert(data);
|
||||||
|
|
||||||
location.reload();
|
location.reload();
|
||||||
|
|
||||||
@ -185,7 +185,7 @@
|
|||||||
var dateSplit = date.split('-');
|
var dateSplit = date.split('-');
|
||||||
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||||
};
|
};
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// Initialize the DataTable
|
// Initialize the DataTable
|
||||||
var table = $('#user_list_table').DataTable({
|
var table = $('#user_list_table').DataTable({
|
||||||
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
||||||
@ -193,7 +193,10 @@ $(document).ready(function() {
|
|||||||
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
||||||
],
|
],
|
||||||
pageLength: 10, // Default rows per page
|
pageLength: 10, // Default rows per page
|
||||||
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
|
lengthMenu: [
|
||||||
|
[10, 20, 30, 50, -1],
|
||||||
|
[10, 20, 30, 50, "All"]
|
||||||
|
], // Rows per page options
|
||||||
responsive: true, // Responsive table
|
responsive: true, // Responsive table
|
||||||
order: [], // Default ordering (column index 0, descending)
|
order: [], // Default ordering (column index 0, descending)
|
||||||
language: {
|
language: {
|
||||||
@ -258,5 +261,5 @@ $(document).ready(function() {
|
|||||||
toDateInput.value = fromDate;
|
toDateInput.value = fromDate;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -183,9 +183,14 @@
|
|||||||
<th>Supplier Name</th>
|
<th>Supplier Name</th>
|
||||||
<th>Invoice No</th>
|
<th>Invoice No</th>
|
||||||
<th>Invoice Date </th>
|
<th>Invoice Date </th>
|
||||||
|
<th>Item</th>
|
||||||
|
<th>Rec Qty</th>
|
||||||
|
<th>Net Weight</th>
|
||||||
<th>Vechicle No</th>
|
<th>Vechicle No</th>
|
||||||
|
<th>Driver</th>
|
||||||
|
<th>Transporter</th>
|
||||||
<th>IGR Status</th>
|
<th>IGR Status</th>
|
||||||
<th></th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -209,7 +214,12 @@
|
|||||||
<td align="right"><?php
|
<td align="right"><?php
|
||||||
$date = new DateTime($record->DeliveryChellanDate);
|
$date = new DateTime($record->DeliveryChellanDate);
|
||||||
echo $date->format('d-m-Y'); ?></td>
|
echo $date->format('d-m-Y'); ?></td>
|
||||||
|
<td><?php echo $record->MaterialName ?></td>
|
||||||
|
<td><?php echo $record->ReceivedQuantity ?></td>
|
||||||
|
<td><?php echo $record->NetWeight ?></td>
|
||||||
<td><?php echo $record->VehicleNo ?></td>
|
<td><?php echo $record->VehicleNo ?></td>
|
||||||
|
<td><?php echo $record->DriverName ?></td>
|
||||||
|
<td><?php echo $record->TransporterName ?></td>
|
||||||
<td><?php echo $record->IGRStatus == 'ST074' ? 'Draft' : 'Completed'; ?></td>
|
<td><?php echo $record->IGRStatus == 'ST074' ? 'Draft' : 'Completed'; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<a target="_blank" href="<?php echo base_url('download-files/' . $record->IGRNO); ?>">
|
<a target="_blank" href="<?php echo base_url('download-files/' . $record->IGRNO); ?>">
|
||||||
@ -1615,6 +1625,60 @@ function appendExistingFilesFileds(data){
|
|||||||
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
|
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
// Date range filter function
|
||||||
|
$.fn.dataTable.ext.search.push(
|
||||||
|
function(settings, data, dataIndex) {
|
||||||
|
var fromDate = $('#fromDate').val();
|
||||||
|
var toDate = $('#toDate').val();
|
||||||
|
|
||||||
|
if (!fromDate || !toDate) {
|
||||||
|
return true; // If no dates selected, don't filter
|
||||||
|
}
|
||||||
|
|
||||||
|
var dateStr = data[0]; // Assuming the date is in the first column
|
||||||
|
var dateParts = dateStr.split("-");
|
||||||
|
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||||
|
|
||||||
|
var startDate = new Date(fromDate);
|
||||||
|
var endDate = new Date(toDate);
|
||||||
|
|
||||||
|
// Adjust startDate to include the day before the selected fromDate
|
||||||
|
startDate.setDate(startDate.getDate() - 1);
|
||||||
|
|
||||||
|
// Ensure endDate includes the entire end date by setting time to the end of the day
|
||||||
|
endDate.setHours(23, 59, 59, 999);
|
||||||
|
|
||||||
|
// Return true if the date is within the range
|
||||||
|
return date >= startDate && date <= endDate;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handle form submission for the date range filter
|
||||||
|
$("#DateRangeFilter").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
table.draw(); // Redraw the table to apply the filter
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset button functionality
|
||||||
|
$("#resetButton").click(function() {
|
||||||
|
$("#fromDate").val('');
|
||||||
|
$("#toDate").val('');
|
||||||
|
table.draw(); // Redraw the table to clear the filter
|
||||||
|
});
|
||||||
|
|
||||||
|
// Automatically focus and open the To Date picker when From Date is selected
|
||||||
|
document.getElementById('fromDate').addEventListener('change', function() {
|
||||||
|
var fromDate = this.value;
|
||||||
|
var toDateInput = document.getElementById('toDate');
|
||||||
|
|
||||||
|
// Set the min attribute of the To Date input to the selected From Date
|
||||||
|
toDateInput.min = fromDate;
|
||||||
|
|
||||||
|
// Optionally reset the To Date input if the current value is before the new min date
|
||||||
|
if (toDateInput.value < fromDate) {
|
||||||
|
toDateInput.value = fromDate;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
BIN
public/new_assets/images/Print Preview.pdf
Normal file
BIN
public/new_assets/images/Print Preview.pdf
Normal file
Binary file not shown.
BIN
public/new_assets/images/zoho_sync.png
Normal file
BIN
public/new_assets/images/zoho_sync.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
Loading…
Reference in New Issue
Block a user