CHANGE_NEW_TEMPLATE_FILES

This commit is contained in:
Ubuntu 2024-08-13 17:20:32 +05:30
parent 4e30d87ac4
commit 540de75664
1512 changed files with 496391 additions and 3514 deletions

View File

@ -61,19 +61,12 @@ $routes->post('materialExist','Rawmaterialdetails::checkmaterial');
$routes->get('viewRawmaterial','Rawmaterialdetails::viewRawmaterial');
$routes->post('rawmaterialdetails/editRawmaterial', 'Rawmaterialdetails::editRawmaterial');
$routes->get('exportmaterial' , 'Rawmaterialdetails::exportmaterial');
$routes->get('rawmaterialdetailsautocomplete' , 'Rawmaterialdetails::autocomplete');
// Cost Center Routes
$routes->get('costListing', 'CostCenter::index');
$routes->get('addCostCenter', 'CostCenter::addCostCenter');
$routes->get('editCostCenter', 'CostCenter::editCostCenter');
$routes->post('fetchCostCenterDetails', 'CostCenter::fetchCostCenterDetails');// for Ajax both add and edit....
$routes->get('deleteCostCenter', 'CostCenter::deleteCostCenter');
$routes->post('saveCostCenter', 'CostCenter::saveCostCenter');
$routes->post('updateCostCenter', 'CostCenter::updateCostCenter');
$routes->post('CostCenter/AddCostDepartment','CostCenter::AddCostDepartment');
$routes->post('CostCenter/DeleteCostDepartment','CostCenter::DeleteCostDepartment');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'CostCenter/GetBudgetForYear','CostCenter::GetBudgetForYear');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'deletecost', 'CostCenter::deletecost');
$routes->get('exportcost', 'CostCenter::exportcost');
// Asset Detail Routes
@ -87,6 +80,7 @@ $routes->get('exportasset', 'Assetdetails::exportasset');
// Employee Detail Routes
$routes->add('addemployee', 'Employeedetails::addemployee');
$routes->post('addNewEmployee', 'Employeedetails::AddNewEmployee');
$routes->post('deleteEmployeeFile', 'Employeedetails::deleteEmployeeFile');
$routes->get('employeeListing', 'Employeedetails::index');
$routes->get('employeedetails/ViewEmployee', 'Employeedetails::ViewEmployee');
$routes->post('employeedetails/UpdateEmployee', 'Employeedetails::UpdateEmployee');
@ -252,7 +246,6 @@ $routes->get('AddIGR', 'Inwardgateregister::addIGR'); // ADD IGR page - working
$routes->get('ViewIGR', 'Inwardgateregister::viewIGR'); // View IGR PAGE - Working
$routes->post('ViewIGRDetails', 'Inwardgateregister::viewIGRDetails');
$routes->post('GetIGRLineItemDetails', 'Inwardgateregister::getIGRLineItemDetails');
$routes->post('deleteBillFile', 'Inwardgateregister::deleteBillFile');
$routes->post('SaveIGR', 'Inwardgateregister::SaveIGR');// Save IGR PAGE - Working
$routes->post('UpdateIGR', 'Inwardgateregister::UpdateIGR');
$routes->post('updateIGRWeight', 'Inwardgateregister::updateIGRWeight');
@ -260,7 +253,10 @@ $routes->post('UpdateIGRLineItem', 'Inwardgateregister::updateIGRLineItem');
$routes->post('ViewIGRHistory', 'Inwardgateregister::ViewIGRHistory');
$routes->post('getCostCenterData', 'Inwardgateregister::getCostCenterData');
$routes->post('ViewIGRfile', 'Inwardgateregister::ViewIGRfile');
$routes->post('inwardgateregister/addloadfile', 'Inwardgateregister::addloadfile');
$routes->post('getAdditionalIGRFile', 'Inwardgateregister::getAdditionalIGRFile');
$routes->post('deleteAdditionalIGRFile', 'Inwardgateregister::deleteAdditionalIGRFile');
$routes->get('download-files/(:segment)', 'Inwardgateregister::downloadFilesAsZip/$1');
$routes->post('inwardgateregister/edituploadfile', 'Inwardgateregister::edituploadfile');
// Application OGR Page

View File

@ -52,122 +52,52 @@ class CostCenter extends BaseController
}
/**
* This function is used to load the add new cost Center */
function addCostCenter()
{
$data['Department'] = $this->costcenter_model->getDepartment();
$data['BudgetType'] = $this->costcenter_model->getConfigValue('C004');
$data['Approver'] = $this->costcenter_model->getApproverName();
$data['FiscalYear'] = $this->costcenter_model->getFiscalYear();
$this->global['pageTitle'] = 'Add Cost Center';
$this->loadViews("addCostCenter", $this->global, $data, NULL);
}
function Dep_SelectedDepartment($selectValue)
{
//echo 'select_validate method called';
// 'none' is the first option and the text says something like "-Choose one-"
if (strlen($selectValue) <= 0) {
// $this->validator->setMessage('Dep_SelectedDepartment', 'Please Select Department.');
return false;
} else // user picked something
{
return true;
}
}
/**
* This function is used to add new Cost to the system
* This function is used to add/edit Cost
*/
function saveCostCenter()
{
// $this->validator->setRules([
// 'CostName' => 'trim|required',
// 'CostCode' => 'trim|required',
// ]);
public function fetchCostCenterDetails() {
$id = $this->request->getPost('id');
log_message('error', 'id: ' . $id);
$CostCenterName = $this->request->getPost('CostCenterName');
$CostCenterName = ($CostCenterName !== null && is_string($CostCenterName)) ? strtoupper(trim($CostCenterName)) : null;
$userId = $this->session->get('userId');
$approverId = $this->session->get('EmpID');
$currentdt = get_current_date_time();
$data = ['status' => false, 'message' => 'An error occurred while creating cost details'];
if ((int)$id == 0) {
$lastccid = $this->costcenter_model->lastCCID();
log_message('error', 'LAST CodeCenterID : ' . $lastccid);
// if ($this->validator->run() == FALSE) {
// $this->addCostCenter();
// } else {
$newccid = (int)$lastccid++;
log_message('error', 'CodeCenterID with Incremented : ' . $newccid);
$newccc = generateCostCenterCode($lastccid);
log_message('error', 'newly Generated ccc : ' . $newccc);
$CostCode = $this->request->getPost('CostCode');
$CostCode = ($CostCode !== null && is_string($CostCode)) ? strtoupper(trim($CostCode)) :null;
$CostName = $this->request->getPost('CostName');
$CostName = ($CostName !== null && is_string($CostName)) ? strtoupper(trim($CostName)) :null;
$CreateBy = $this->session->get('userId');
$SelectedDepartment = $this->request->getPost('txtSelectedDepartment');
// $ApproverName = $this->request->getPost('ApprovedBy');
$ApproverName = $this->session->get('EmpID');
$comma_separated = explode(':', (string)$SelectedDepartment);
// $comma_separated = $this->costcenter_model->getDepartment();
// print_r($comma_separated);die;
$createddt = get_current_date_time();
$CodeExists = $this->costcenter_model->checkCostDetailsExists($CostCode);
if (count($CodeExists) == 0) {
$Cost = array('CostCenterCode' => $CostCode, 'CostCenterName' => $CostName, 'ApprovedBy' => $ApproverName, 'CreatedBy' => $CreateBy, 'createdDate' => $createddt);
$this->costcenter_model->saveCostCenter($Cost);
$Cost = ['CostCenterCode' => $newccc,
'CostCenterName' => $CostCenterName,
'ApprovedBy' => $approverId,
'CreatedBy' => $userId,
'CreatedDate' => $currentdt
];
if ($this->costcenter_model->saveCostCenter($Cost) > 0) {
$data = ['status' => true, 'message' => 'Successfully created cost details'];
}
for ($j = 0; $j < count($comma_separated); $j++) {
$DeptCode = $comma_separated[$j];
$this->costcenter_model->DeleteDepartment($DeptCode, $CostCode);
$Dept = array('CostCenterCode' => $CostCode, 'DEPCode' => $DeptCode, 'CreatedBy' => $CreateBy, 'createdDate' => $createddt);
$this->costcenter_model->addCostCenterDepartment($Dept);
}
$RowCount = $this->request->getPost('txtRowCount');
for ($i = 1; $i <= $RowCount; $i++) {
$BudgetType = $this->request->getPost('BudgetType' . $i);
$BudgetYear = $this->request->getPost('BudgetYear' . $i);
$BudgetAmount = $this->request->getPost('BudgetAmount' . $i);
$Remarks = $this->request->getPost('Remarks' . $i);
$this->costcenter_model->DeleteBudget($BudgetType, $BudgetYear, $CostCode);
$Budget = array('CostCenterCode' => $CostCode, 'BudgetType' => $BudgetType, 'BudgetYear' => $BudgetYear, 'BudgetAmount' => $BudgetAmount, 'Remarks' => $Remarks, 'CreatedBy' => $CreateBy, 'createdDate' => $createddt);
$this->costcenter_model->addBudget($Budget);
}
echo 'Successfully Created Cost details';
// }
}
/**
* This function is used load user edit information
* @param number $userId : Optional : This is user id
*/
function editCostCenter($CostCode = NULL)
{
if ($CostCode == '') {
$CostCenterID = $_GET['CostCode'];
} else {
$CostCenterID = $CostCode;
$Cost = ['CostCenterName' => $CostCenterName,'UpdatedBy' => $userId,'UpdatedDate' => $currentdt];
if ($this->costcenter_model->updateCostCenter($Cost, $id) > 0) {
$data = ['status' => true, 'message' => 'Successfully updated cost details'];
}
}
$data['CostMaster'] = $this->costcenter_model->GetCostCenterMaster($CostCenterID);
$data['CostDepts'] = $this->costcenter_model->GetCostCenterDepartment($CostCenterID);
$data['CostBudget'] = $this->costcenter_model->GetCostCenterBudget($CostCenterID);
$data['DeptList'] = $this->costcenter_model->GetDepartmentNotinCostCenter($CostCenterID);
$data['BudType'] = $this->costcenter_model->GetBudgetTypeNotinCostCenter($CostCenterID, 'C004');
$data['BudYear'] = $this->costcenter_model->GetBudgetYear($CostCenterID);
$data['FiscalYear'] = $this->costcenter_model->getFiscalYear();
//print_r(count($data['BudType']));
$this->global['pageTitle'] = 'Edit Cost';
$this->loadViews("editCostCenter", $this->global, $data, NULL);
return $this->response->setJSON($data);
}
/**
* delete the Cost
*/
function deleteCostCenter($CostCode = NULL)
{
@ -183,246 +113,9 @@ class CostCenter extends BaseController
}
function GetBudgetForYear()
{
//$id = $this->request->getPost('id');
$BudYear = $_GET['BudYear'];
$CostCenterID = $_GET['CostCode'];
$result = $this->costcenter_model->GetCostCenterBudgetByYear($CostCenterID, $BudYear);
$BudList = $this->costcenter_model->GetCostBudgetTypeByYear($CostCenterID, 'C004', $BudYear);
$HTML = "";
$HTML2 = "";
$index = 0;
// $HTML2 = $BudList[0]['ConfigValue'];
//if($BudList->num_rows() > 0){
for ($j = 0; $j < count($BudList); $j++) {
$ConfigValue = $BudList[$j]['ConfigValue'];
$HTML2 .= "<option value='" . $ConfigValue . "'>" . $ConfigValue . "</option>";
}
for ($i = 0; $i < count($result); $i++) {
$index = $index + 1;
$BudgetType = $result[$i]['BudgetType'];
$BudgetYear = $result[$i]['BudgetYear'];
$BudgetAmount = $result[$i]['BudgetAmount'];
$Remarks = $result[$i]['Remarks'];
$HTML .= "<tr id='" . $index . "'>
<td align='left'>" . $BudgetType . "</td>
<input type='hidden' name='BudgetType" . $index . "' id='BudgetType" . $index . "' value='" . $BudgetType . "'/>
<input type='hidden' name='BudgetYear" . $index . "' id='BudgetYear" . $index . "' value='" . $BudgetYear . "'/>
<input type='hidden' name='BudgetAmount" . $index . "' id='BudgetAmount" . $index . "' value='" . $BudgetAmount . "'/>
<input type='hidden' name='Remarks" . $index . "' id='Remarks" . $index . "' value='" . $Remarks . "'/>
<td align='left'>" . $BudgetYear . "</td>
<td align='left'>" . $BudgetAmount . "</td>
<td align='left'>" . $Remarks . "</td>
<td>
<a data-target='#Edit' data-id=" . $index . " data-userid=" . $index . " data-toggle='modal' href='#Edit'><i class='fa fa-pencil' data-toggle='tooltip' title='Click here to view/Edit the " . $BudgetType . " Budget details'></i>&nbsp;&nbsp;&nbsp;</a> </td></tr>
";
}
$HTML .= "<input type='hidden' name='txtRowCount' id='txtRowCount' value='" . $index . "'/>";
die(json_encode(array('Html' => $HTML, 'BudYear' => $HTML2)));
// echo $HTML2;
}
/**
* This function is used to edit the user information
* export the Cost
*/
function updateCostCenter()
{
$CostCode = $this->request->getPost('CostCode');
$CostCode = ($CostCode !== null && is_string($CostCode)) ? strtoupper(trim($CostCode)) :null;
$CostName = $this->request->getPost('CostName');
$CostName = ($CostName !== null && is_string($CostName)) ? strtoupper(trim($CostName)) :null;
$updatedBy = $this->session->get('userId');
$SelectedDepartment = (string)$this->request->getPost('txtSelectedDepartment');
// $ApproverName = $this->request->getPost('ApprovedBy');
// $ApproverName = $this->session->get('EmpID');
$ApproverName = NULL;
$comma_separated = [];
print_r(strlen($SelectedDepartment));
if(strlen($SelectedDepartment)>0)
{
$comma_separated = explode(':', $SelectedDepartment);
}
$updateddt = get_current_date_time();
$Cost = array( 'CostCenterName'=>$CostName,'ApprovedBy'=>$ApproverName,'UpdatedBy'=>$updatedBy,'UpdatedDate'=>$updateddt);
$this->costcenter_model->EditCost($Cost,$CostCode);
if(count($comma_separated)>= 1)
{
for ($j = 0; $j < count($comma_separated); $j++)
{
// $DeptCode = $comma_separated[$j];
// $this->costcenter_model->DeleteDepartment( $DeptCode,$CostCode);
// $Dept = array('CostCenterCode'=>$CostCode, 'DEPCode'=>$DeptCode,'CreatedBy'=>$updatedBy,'createdDate'=>$updateddt,'UpdatedBy'=>$updatedBy,'UpdatedDate'=>$updateddt);
// $this->costcenter_model->addCostCenterDepartment($Dept);
}
}
$RowCount = $this->request->getPost('txtRowCount');
if($RowCount){
for ($i = 1; $i <= $RowCount; $i++)
{
$BudgetType = $this->request->getPost('BudgetType'.$i);
$BudgetYear = $this->request->getPost('BudgetYear'.$i);
$BudgetAmount = $this->request->getPost('BudgetAmount'.$i);
$Remarks = $this->request->getPost('Remarks'.$i);
// $this->costcenter_model->DeleteBudget($BudgetType,$BudgetYear,$CostCode);
$Budget = array('CostCenterCode'=>$CostCode, 'BudgetType'=>$BudgetType,'BudgetYear'=>$BudgetYear,'BudgetAmount'=>$BudgetAmount,'Remarks'=>$Remarks,'CreatedBy'=>$updatedBy,'createdDate'=>$updateddt,'UpdatedBy'=>$updatedBy,'UpdatedDate'=>$updateddt);
$ExistYearBudget = $this->costcenter_model->CheckExistBudget($BudgetType,$BudgetYear,$CostCode);
// print_r($Budget);
if($ExistYearBudget){
$this->costcenter_model->updateBudget($Budget,$BudgetType,$BudgetYear,$CostCode);
}
else{
$this->costcenter_model->addBudget($Budget);
}
}
}
echo('Successfully Updated Cost details');
}
function DeleteCostDepartment()
{
// echo "dasf";
// die();
$CostCode = $this->request->getPost('CostCode');
$CostCode = ($CostCode !== null && is_string($CostCode)) ? strtoupper(trim($CostCode)) :null;
$CostName = $this->request->getPost('CostName');
$CostName = ($CostName !== null && is_string($CostName)) ? strtoupper(trim($CostName)) :null;
$updatedBy = $this->session->get('userId');
$SelectedDepartment = $this->request->getPost('txtSelectedDepartment');
$this->costcenter_model->DeleteDepartment($SelectedDepartment, $CostCode);
echo ("Department Removed Successfully");
}
function AddCostDepartment()
{
$CostCode = $this->request->getPost('CostCode');
$CostCode = ($CostCode !== null && is_string($CostCode)) ? strtoupper(trim($CostCode)) :null;
$CostName = $this->request->getPost('CostName');
$CostName = ($CostName !== null && is_string($CostName)) ? strtoupper(trim($CostName)) :null;
$updatedBy = $this->session->get('userId');
$SelectedDepartment = $this->request->getPost('txtSelectedDepartment');
// $updatedBy = $this->session->get ( 'userId' );
$updateddt = get_current_date_time();
$Dept = array('CostCenterCode' => $CostCode, 'DEPCode' => $SelectedDepartment, 'CreatedBy' => $updatedBy, 'createdDate' => $updateddt, 'UpdatedBy' => $updatedBy, 'UpdatedDate' => $updateddt);
$this->costcenter_model->addCostCenterDepartment($Dept);
echo ("Department Added Successfully");
}
// function AddCostDepartment()
// {
// // echo "343";
// // die();
// $CostCode = strtoupper(trim($this->request->getPost('CostCode')));
// $CostName = strtoupper(trim($this->request->getPost('CostName')));
// $updatedBy = $this->session->get ( 'userId' );
// $SelectedDepartment = $this->request->getPost('txtSelectedDepartment');
// //echo $SelectedDepartment;
// //die();
// $ApproverName = $this->request->getPost('ApprovedBy');
// $comma_separated = "";
// //print_r(strlen($SelectedDepartment));
// if(strlen($SelectedDepartment)>0)
// {
// $comma_separated = explode(':', $SelectedDepartment);
// }
// //die();
// //echo count($comma_separated);
// $updateddt = get_current_date_time();
// if(count($comma_separated)>= 1)
// {
// for ($j = 0; $j < count($comma_separated); $j++)
// {
// $DeptCode = $comma_separated[$j];
// $this->costcenter_model->DeleteDepartment( $DeptCode,$CostCode);
// $Dept = array('CostCenterCode'=>$CostCode, 'DEPCode'=>$DeptCode,'CreatedBy'=>$updatedBy,'createdDate'=>$updateddt,'UpdatedBy'=>$updatedBy,'UpdatedDate'=>$updateddt);
// //print_r($Dept);
// $this->costcenter_model->addCostCenterDepartment($Dept);
// }
// echo "Updated";
// }
// }
function viewcost($CostCenterID = NULL)
{
if ($CostCenterID == null) {
redirect('costListing');
}
$data['Cost'] = $this->costcenter_model->getuserinfo($CostCenterID);
//$data['users'] = $this->purchaseorder_model->getusers();
$this->global['pageTitle'] = 'View Cost';
$this->loadViews("viewcost", $this->global, $data, NULL);
}
/**
* This function is used to delete the user using userId
* @return boolean $result : TRUE / FALSE
*/
function deletecost()
{
// if($this->isAdmin() == TRUE)
// {
// echo(json_encode(array('status'=>'access')));
// }
// else
// {
$CostCenterID = $this->request->getPost('CostCentreID');
$cost = array('CreateDate' => date('Y-m-d H:i:sa'));
$result = $this->costcenter_model->deletecost($cost, $CostCenterID);
if ($result > 0) {
echo (json_encode(array('status' => TRUE)));
} else {
echo (json_encode(array('status' => FALSE)));
}
//}
}
function exportcost()
{

View File

@ -1325,7 +1325,9 @@ class Emergencypurchaseorder extends BaseController
$SupplierID = $this->request->getPost('drpSupplier');
$newsup = (string)$this->request->getPost('newsup');
$newSupId = split("[ - ]+", $newsup);
// echo $newsup;die;
// $newSupId = split("[ - ]+", $newsup);
$newSupId = preg_split('/[ - ]+/', $newsup);
/*-----------------------------------*/
$b4supplier = $this->request->getPost('b4supplier');
$b4date = $this->request->getPost('b4podate');

View File

@ -15,7 +15,9 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use PhpOffice\PhpSpreadsheet\Style\Alignment;
use App\Models\EmpFilesModel;
use App\Models\AppConfigModel;
use App\Models\Emppaydate_model;
/**
* Module : Employee
@ -29,7 +31,11 @@ class Employeedetails extends BaseController
{
protected $companydetailsmodel;
protected $employeedetails_model;
protected $empFiles;
protected $appConfig;
protected $emppaydate_model;
protected $session;
/**
* This is default constructor of the class
@ -39,6 +45,9 @@ class Employeedetails extends BaseController
parent::__construct();
$this->employeedetails_model = new Employeedetails_model();
$this->companydetailsmodel = new Companydetails_model();
$this->empFiles = new EmpFilesModel();
$this->appConfig = new AppConfigModel();
$this->emppaydate_model = new Emppaydate_model();
$this->session = session();
helper('form'); //$this->load->library('form_validation');
$this->isLoggedIn();
@ -196,8 +205,10 @@ class Employeedetails extends BaseController
$validation = \Config\Services::validation();
// $this->validator->setRules([
// 'ContactNumber'=> 'trim|required|min_length[10]|max_length[10]',
@ -236,7 +247,6 @@ class Employeedetails extends BaseController
}
// $Profile = $this->request->getPost('photo');
$FirstName = $this->request->getPost('FirstName');
$LastName = $this->request->getPost('LastName');
$FatherName = $this->request->getPost('FatherName');
$DateofBirth = $this->request->getPost('DateofBirth');
$ContactNumber = $this->request->getPost('ContactNumber');
@ -285,6 +295,10 @@ class Employeedetails extends BaseController
$ESIno = $this->request->getPost('esino');
$Nominee = $this->request->getPost('nomineename');
$createdby = $this->session->get('userId');
$is_management_team = $this->request->getPost('is_management_team');
$esi_applicable = $this->request->getPost('esi_applicable');
$pf_applicable = $this->request->getPost('pf_applicable');
$work_location = $this->request->getPost('work_location');
if ($licenseExpiryDate != '') {
//$License_ExpiryDate = get_date_format($licenseExpiryDate);
@ -305,7 +319,7 @@ class Employeedetails extends BaseController
//echo $DOB;
$Employee = array(
'FirstName' => $FirstName, 'LastName' => $LastName, 'FatherName' => $FatherName,
'FirstName' => $FirstName, 'FatherName' => $FatherName,
'Gender' => $Gender, 'DateofBirth' => $DOB, 'ContactNumber' => $ContactNumber, 'EmailId' => $EmailId,
'BloodGroup' => $BloodGroup, 'MartialStatus' => $MartialStatus, 'DateofJoining' => $DOJ,
'PreviousYearsOfExp' => $Previousexperience, 'Designation' => $desigination,
@ -319,13 +333,56 @@ class Employeedetails extends BaseController
'Reference_ContactNumber' => $referrercontno, 'Remarks' => $addinfo, 'CreatedBy' => $createdby,
'personalEmailId' => $comEmailId, 'DriverLicense' => $driverlicense,
'LicenseValidtill' => $License_ExpiryDate, 'VoterID' => $VoterID, 'PFNO' => $PFno, 'ESI' => $ESIno,
'NomineeDetails' => $Nominee
'NomineeDetails' => $Nominee , 'is_management_team' => $is_management_team , 'esi_applicable'=>$esi_applicable,
'pf_applicable'=>$pf_applicable,'work_location'=>$work_location
);
//print_r($Employee);die();
$result = $this->employeedetails_model->addNewemployee($Employee);
if ($result > 0) {
if ($result) {
// Get the uploaded files
$files = $this->request->getFiles();
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
if(isset($files['emp_file']))
{
foreach ($files['emp_file'] as $index => $file) {
if ($file->isValid() && !$file->hasMoved()) {
// Move the file to the desired directory
$newName = $file->getRandomName();
$file->move(ROOTPATH . 'public/uploads/images/emp_files', $newName);
$path = ROOTPATH . 'public/uploads/images/emp_files/'.$newName;
// Store the file information in the database
$this->empFiles->save([
'file_name' => $fileNames[$index], // User-entered file name
'emp_file' => $newName, // New file name
'emp_id' => $result,
'path' => $path
]);
}
}
}
$EmpID = $result;
$Total_Salary = $this->request->getPost('Total_salary');
$Basic_Pay = $this->request->getPost('Basic_Pay');
$HRA_Rate = $this->request->getPost('HRA_Rate');
$HRA_Amount = $this->request->getPost('HRA_Amount');
$Allowances = $this->request->getPost('Allowances');
$PF_Rate = $this->request->getPost('PF_Rate');
$ESI_Rate = $this->request->getPost('ESI_Rate');
$Food_Allowances = $this->request->getPost('Food_Allowances');
$Incentives = $this->request->getPost('Incentives');
$CreateBy = $this->session->get('userId');
$emppay = array('EmpID' => $EmpID, 'TotalSalary' => $Total_Salary, 'Basic_Pay' => $Basic_Pay, 'HRA_Rate' => $HRA_Rate, 'HRA_Amount' => $HRA_Amount, 'Allowances' => $Allowances, 'PF_Rate' => $PF_Rate, 'ESI_Rate' => $ESI_Rate, 'Food_Allowances' => $Food_Allowances, 'Incentives' => $Incentives, 'Created_By' => $CreateBy);
$this->emppaydate_model->addNewemppay($emppay);
// $this->session->set_flashdata('Success', 'New Employee created successfully!');
$this->session->setFlashdata('success', 'New Employee created successfully!');
@ -341,6 +398,16 @@ class Employeedetails extends BaseController
// }
}
function deleteEmployeeFile(){
$id = $this->request->getPost('id');
$update = $this->empFiles->set(['is_active' => 0])->where('id',$id)->update();
if($update){
return true;
}else{
return false;
}
}
/**
* This function is used to load the add new Employee form with dropdown values */
function addemployee()
@ -352,6 +419,7 @@ class Employeedetails extends BaseController
$QualificationConfigID = 'C014';
$DesignationConfigID = 'C010';
$BloodGroupConfigID = 'C011';
$LocationConfigID = 'C031';
$data['Gender'] = $this->employeedetails_model->getConfigValue($GenderConfigID);
$data['Martial'] = $this->employeedetails_model->getConfigValue($MartialConfigID);
@ -359,8 +427,11 @@ class Employeedetails extends BaseController
$data['Qualification'] = $this->employeedetails_model->getConfigValue($QualificationConfigID);
$data['Designation'] = $this->employeedetails_model->getConfigValue($DesignationConfigID);
$data['BloodGroup'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
$data['Location'] = $this->employeedetails_model->getConfigValue($LocationConfigID);
$data['Department'] = $this->employeedetails_model->getDepartment();
$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['esi_rate'] = $this->appConfig->where('config_key',3)->get()->getRow()->config_value;
$this->global['pageTitle'] = 'Add New Employee';
// if($this->role == ROLE_ADMIN || $this->DEPCode == HR)
@ -494,6 +565,7 @@ class Employeedetails extends BaseController
$QualificationConfigID = 'C014';
$DesignationConfigID = 'C010';
$BloodGroupConfigID = 'C011';
$LocationConfigID = 'C031';
//print_r('hai');
$data['GenderList'] = $this->employeedetails_model->getConfigValue($GenderConfigID);
@ -502,8 +574,12 @@ class Employeedetails extends BaseController
$data['DesignationList'] = $this->employeedetails_model->getConfigValue($DesignationConfigID);
$data['BloodGroupList'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
$data['bankdetails'] = $this->employeedetails_model->getBankDetails();
$data['Location'] = $this->employeedetails_model->getConfigValue($LocationConfigID);
$data['DepartmentList'] = $this->employeedetails_model->getDepartment();
$data['EmpDetails'] = $this->employeedetails_model->viewemployee($EmpID);
$data['emp_data'] = $this->empFiles->where('emp_id',$EmpID)->where('is_active',1)->findAll();
$data['empPay'] = $this->emppaydate_model->getEmpPayData($EmpID);
$this->global['pageTitle'] = 'View Employee';
$this->loadViews("editEmployee", $this->global, $data, NULL);
@ -649,6 +725,10 @@ class Employeedetails extends BaseController
$esino = $this->request->getPost('esino');
$Nominee = $this->request->getPost('nomineename');
$chked = $this->request->getPost('isactive');
$is_management_team = $this->request->getPost('is_management_team');
$esi_applicable = $this->request->getPost('esi_applicable');
$pf_applicable = $this->request->getPost('pf_applicable');
$work_location = $this->request->getPost('work_location');
// echo 'chkvalue'. $chked ;
if ($chked != '') {
$IsActive = '1';
@ -688,12 +768,54 @@ class Employeedetails extends BaseController
'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
'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();
$result = $this->employeedetails_model->UpdateEmployee($Employee, $EmpId);
if ($result > 0) {
// Get the uploaded files
$files = $this->request->getFiles();
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
if(isset($files['emp_file']))
{
foreach ($files['emp_file'] as $index => $file) {
if ($file->isValid() && !$file->hasMoved()) {
// Move the file to the desired directory
$newName = $file->getRandomName();
$file->move(ROOTPATH . 'public/uploads/images/emp_files', $newName);
$path = ROOTPATH . 'public/uploads/images/emp_files/'.$newName;
// Store the file information in the database
$this->empFiles->save([
'file_name' => $fileNames[$index], // User-entered file name
'emp_file' => $newName, // New file name
'emp_id' => $EmpId,
'path' => $path
]);
}
}
}
$Total_Salary = $this->request->getPost('Total_salary');
$Basic_Pay = $this->request->getPost('Basic_Pay');
$HRA_Rate = $this->request->getPost('HRA_Rate');
$HRA_Amount = $this->request->getPost('HRA_Amount');
$Allowances = $this->request->getPost('Allowances');
$PF_Rate = $this->request->getPost('PF_Rate');
$ESI_Rate = $this->request->getPost('ESI_Rate');
$Food_Allowances = $this->request->getPost('Food_Allowances');
$Incentives = $this->request->getPost('Incentives');
$CreateBy = $this->session->get('userId');
$emppay = array('EmpID' => $EmpId, 'TotalSalary' => $Total_Salary, 'Basic_Pay' => $Basic_Pay, 'HRA_Rate' => $HRA_Rate, 'HRA_Amount' => $HRA_Amount, 'Allowances' => $Allowances, 'PF_Rate' => $PF_Rate, 'ESI_Rate' => $ESI_Rate, 'Food_Allowances' => $Food_Allowances, 'Incentives' => $Incentives, 'Created_By' => $CreateBy);
$empPayUpdate = $this->emppaydate_model->editemppay($emppay);
if ($result + $empPayUpdate > 0) {
// $this->session->set_flashdata('Success', $EmpId.'Employee Updated successfully!');
$this->session->setFlashdata('success', 'You Have Successfully updated the Employee Record!');

View File

@ -8,6 +8,8 @@ use CodeIgniter\Validation\Exceptions\ValidationException;
use App\Models\Inwardgateregister_model;
use ZipArchive;
/**
* Module : IGR (security)
* Inwardgateregister Class to control all igr related operations.
@ -71,6 +73,9 @@ class Inwardgateregister extends BaseController
$data['PO_NO'] = array_filter($result, function($item) {
return !($item->status === 'ST027');
});
$data['emp_data'] = [];
// $data['emp_data'] = $this->inwardgateregister_model->getAdditionalIGRFile();
// print_r($data['PO_NO']);die;
$this->loadViews("inwardgateregister", $this->global, $data, NULL);
}
@ -201,7 +206,7 @@ class Inwardgateregister extends BaseController
$PO = $this->request->getPost('id');
$CreatedBy = $this->session->get('userId');
$this->inwardgateregister_model->UpdatePOMaster($PO, $CreatedBy);
$this->inwardgateregister_model->UpdatePOMaster($PO, $CreatedBy,IGR_CREATED);
$data = $this->inwardgateregister_model->viewpurchaseorder($PO);
echo json_encode($data);
@ -209,7 +214,7 @@ class Inwardgateregister extends BaseController
function addloadfile()
function getAdditionalIGRFile()
{
$lastinsertbillid = 0;
@ -221,7 +226,7 @@ class Inwardgateregister extends BaseController
$file = $this->request->getFile('file');
$requestfilename = $file->getName();
$files = $this->inwardgateregister_model->getfies($igr);
$files = $this->inwardgateregister_model->getAdditionalIGRFile($igr);
$fcount = 0;
foreach ($files as $value) {
@ -247,7 +252,7 @@ class Inwardgateregister extends BaseController
$myfiles = array('PONO' => $pono, 'IGRNO' => $igr, 'FilePath' => $Picture);
$lastinsertbillid = $this->inwardgateregister_model->fileupload($myfiles);
$lastinsertbillid = $this->inwardgateregister_model->uploadAdditionalFile($myfiles);
}
}
@ -258,18 +263,17 @@ class Inwardgateregister extends BaseController
}
}
function deleteBillFile(){
function deleteAdditionalIGRFile(){
$deleteBillFile = '';
$Billno = $this->request->getPost('Billno');
$deleteBillFile = $this->inwardgateregister_model->deleteBillFile($Billno);
if ($deleteBillFile) {
echo "file deleted successfully!";
} else {
echo "file details not exist to delete";
}
$deleteAdditionalFile = false;
$fileid = $this->request->getPost('id');
$deleteAdditionalFile = $this->inwardgateregister_model->deleteAdditionalFile($fileid);
return $deleteAdditionalFile;
// if ($deleteAdditionalFile) {
// echo "file deleted successfully!";
// } else {
// echo "file details not exist to delete";
// }
}
@ -307,8 +311,10 @@ class Inwardgateregister extends BaseController
function SaveIGR()
{
//print_r($this->request->getPost());die;
#Step 1 IGR Details
$PONO = $this->request->getPost('PONO');
$IsThisOpenOrderPO = $this->request->getPost('hiddenIsOpenOrder');
$DeliveryChellanOrInvoiceNo = $this->request->getPost('InvoiceNo');
$DeliveryChellan = (string)$this->request->getPost('InvoiceDate');
$DeliveryChellanDate = get_date_time_format($DeliveryChellan);
@ -321,8 +327,8 @@ class Inwardgateregister extends BaseController
$RowCount = $this->request->getPost('txtRowCount');
$createddt = get_current_date_time();
//$IGRStatus = IGR_CREATED;//old
$IGRStatus = (int)$this->request->getPost('hideIGRStatus') == 1 ? IGR_CREATED : IGR_DRAFT;
$PreIGRStatus = (int)$this->request->getPost('hideIGRStatus') == 1 ? IGR_CREATED : IGR_DRAFT;
$IGRStatus = ((int)$IsThisOpenOrderPO == 1) ? IGR_DRAFT : $PreIGRStatus;
$igr = array(); // For IGR Master
$paymentstatus = NO_PAIDIGR;
@ -353,10 +359,38 @@ class Inwardgateregister extends BaseController
#Step 3 Master Details Gathering to Save In DB
$igr = array('PONO' => $PONO, 'VehicleNo' => $VehicleNo, 'DeliveryChellanOrInvoiceNo' => $DeliveryChellanOrInvoiceNo, 'DeliveryChellanDate' => $DeliveryChellanDate, 'MaterialRcvdDate' => $MaterialRcvdDt, 'DriverName' => $DriverName, 'DriverMobileNumber' => $DriverMobileNumber,'IGRStatus' => $IGRStatus, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt, 'PaymentStatus' => $paymentstatus);
$igr['MasterFile'] = $requestMasterFileName;
// print_r( $igr );die;
#Step 4 Calling DB to Save IGR Master
$IGRNO = $this->inwardgateregister_model->addigrM($igr);
// Get the uploaded files
// $IGRNO = "IGRNO02750";
// $IGRNO = "IGRNO02734";
if($IGRNO){
$files = $this->request->getFiles();
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
if(isset($files['emp_file']))
{
foreach ($files['emp_file'] as $index => $file) {
if ($file->isValid() && !$file->hasMoved()) {
// Move the file to the desired directory
$newName = $file->getRandomName();
$file->move($path, $newName);
// Store the file information in the database
$additionalFiles = array(
'Remarks' => $fileNames[$index],
'FilePath' => $newName,
'IGRNO' => $IGRNO,
'PONO' => $PONO
);
$lastInsertFileId = $this->inwardgateregister_model->uploadAdditionalFile($additionalFiles);
if ($lastInsertFileId) {
$fileupdated_count++;
$fileupdated_name[] = $fileNames[$index];
}
}
}
}
#Step 5 Save Master Detail On History Table
if($VehicleNo){
$igr_history = array('field' => 'VehicleNo','is_add' => 1,'new_data' => $VehicleNo,'old_data' => NULL,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO);
@ -427,7 +461,6 @@ class Inwardgateregister extends BaseController
$GrossWeightDate = !empty($grossWeightDate) && is_string($grossWeightDate) ? date('Y-m-d H:i:s', strtotime($grossWeightDate)) : null;
$TareWeightDate = !empty($tareWeightDate) && is_string($tareWeightDate) ? date('Y-m-d H:i:s', strtotime($tareWeightDate)) : null;
log_message('error', "TareWeightDate" . $TareWeightDate);
if (strlen($QuantityAsPerInvoice) > 0 && $QuantityAsPerInvoice != '0') {
$Remarks = $this->request->getPost('txtRemarks' . $i);
$ItemStatus = '';
@ -514,18 +547,56 @@ class Inwardgateregister extends BaseController
$POLineItem = array('ReceivedQuantity' => $totalReceivedqty, 'Status' => $ItemStatus, 'UpdateBY' => $CreatedBy, 'UpdatedOn' => $createddt);
$this->inwardgateregister_model->UpdatePOLineItem($POLineItem, $PONO, $MaterialCode);
}
else if ((int)$IsThisOpenOrderPO == 1) {
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
# Is this open order po means i have to save IGR DETAILS
$Remarks = $this->request->getPost('txtRemarks' . $i);
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
$CreatedBy = $this->session->get('userId');
$igrDetails = array('IGRNO' => $IGRNO, 'MaterialCode' => $MaterialCode, 'QuantityAsPerInvoice' => $QuantityAsPerInvoice, 'Remarks' => $Remarks, 'IGRItemStatus' => $IGRItemStatus,'GrossWeight' => (float)$GrossWeight ,'GrossWeightDate'=> $GrossWeightDate,'TareWeight' => (float)$TareWeight ,'TareWeightDate' => $TareWeightDate ,'NetWeight' => (float)$NetWeight, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt);
$igrDetails['WeightFile'] = $requestWeightFileName;
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
$igrD ='';
$igrlineno = !empty($igrD) ? $igrD : '';
log_message('error', 'SaveIGR igrDetails result : ' . json_encode($igrDetails)." IgrLineNo : ".$igrlineno);
$itemvalue = '';
$SupplierId = '';
$polineitemvalue = $this->inwardgateregister_model->getitemvalue($PONO, $MaterialCode);
foreach ($polineitemvalue as $it) {
$itemvalue = $it->Rate;
$SupplierId = $it->SupplierID;
}
# Is this open order po means i have to save add material history
$historydetails = array('MaterialCode' => $MaterialCode, 'Transaction_type' => "Add", 'Ref_Type' => "IGR", 'Ref_No' => $igrlineno, 'Quantity' => $QuantityAsPerInvoice, 'CreatedBy' => $CreatedBy, 'CreatedOn' => $createddt, 'SupplierID' => $SupplierId, 'ItemValue' => $itemvalue);
$this->inwardgateregister_model->addmaterialhistory($historydetails);
# Is this open order po means i have to save the get received qty in PO lineitem table
$get_pre_qty = $this->inwardgateregister_model->get_CurrentQty($MaterialCode);
$Recqty = $this->inwardgateregister_model->getPOLineItemReceivedQty($PONO, $MaterialCode);
$ReceivedQuantity = 0.00;
if (count($Recqty) > 0) {
foreach ($Recqty as $key) {
$ReceivedQuantity = $key->ReceivedQuantity;
}
}
$totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice;
$POLineItem = array('ReceivedQuantity' => $totalReceivedqty, 'Status' => $ItemStatus, 'UpdateBY' => $CreatedBy, 'UpdatedOn' => $createddt);
$this->inwardgateregister_model->UpdatePOLineItem($POLineItem, $PONO, $MaterialCode);
}
}
$this->inwardgateregister_model->UpdatePOMaster($PONO, $CreatedBy);
$this->inwardgateregister_model->UpdatePOMaster($PONO, $CreatedBy,$IGRStatus);
#Step 9 Updating Pending Quantity IN PO Master amd Line Item Details.
if ((int)$IsThisOpenOrderPO != 1) {
if ($TotalPendingQty == 0.00) {
$Newstatus = array('Status' => $IGRStatus);
$this->inwardgateregister_model->POLineItemsupdatestatus($PONO, $Newstatus);
$this->inwardgateregister_model->pomasterupdatestatus($PONO, $Newstatus);
} else {
/*echo 'error' ;*/
}
}}
#finally
$finalstatement = "Successfully Created IGR Number: $IGRNO \n";
if ($fileupdated_count > 0) {
@ -555,7 +626,9 @@ function viewIGRDetails()
$IGRNO = $this->request->getPost('id');
$data = $this->inwardgateregister_model->viewigr($IGRNO);
$data['details'] = $this->inwardgateregister_model->viewigr($IGRNO);
$data['files'] = $this->inwardgateregister_model->viewIGRFile($IGRNO);
// echo $IGRNO;
// print_r($data);die;
@ -588,6 +661,7 @@ function viewIGRDetails()
{
$IGRNo = $this->request->getPost('igr');
$PONo = $this->request->getPost('po');
$DeliveryChellan = $this->request->getPost('invdate');
$DeliveryChellanDate = !$DeliveryChellan || $DeliveryChellan === null ? NULL : get_date_time_format($DeliveryChellan);
@ -627,7 +701,37 @@ function viewIGRDetails()
}
}
}
$fileupdated_count = 0;
$fileupdated_name = [];
$fileNames = $this->request->getPost('file_name');
$files = $this->request->getFiles();
if(isset($files['emp_file']))
{
foreach ($files['emp_file'] as $index => $file) {
if ($file->isValid() && !$file->hasMoved()) {
// Move the file to the desired directory
$newName = $file->getRandomName();
$file->move($path, $newName);
// Store the file information in the database
$additionalFiles = array(
'Remarks' => $fileNames[$index],
'FilePath' => $newName,
'IGRNO' => $IGRNo,
'PONO' => $PONo
);
$lastInsertFileId = $this->inwardgateregister_model->uploadAdditionalFile($additionalFiles);
if ($lastInsertFileId) {
$fileupdated_count++;
$fileupdated_name[] = $fileNames[$index];
}
}
}
}
log_message('error', 'UpdateIGR igrarr: ' . json_encode($igrarr));
$updateigrmaster = $this->inwardgateregister_model->updateigr($igrarr, $IGRNo);
if(!empty($tableData )){
@ -877,12 +981,21 @@ function viewIGRDetails()
}
}
if ($updateigrmaster > 0) {
echo "Updated Succefully!";
$finalstatement = "Successfully Updated IGR Number: $IGRNo \n";
} else if($updateigrlineitem >0){
echo "Updated Succefully!";
$finalstatement = "Successfully Updated IGR Number: $IGRNo \n";
}else{
echo "Not Updated!";
$finalstatement = "IGR Number: $IGRNo \n";
}
if ($fileupdated_count > 0) {
$finalstatement .= "Number of files updated: $fileupdated_count \n";
$finalstatement .= "Files: \n" . implode(PHP_EOL, $fileupdated_name);
} else {
$finalstatement .= "No files to update";
}
echo $finalstatement;
}
function updateIGRLineItem() {
@ -1156,6 +1269,7 @@ function viewIGRDetails()
}
}
function updateIGRWeight(){
$GrossWeight = $this->request->getPost('GrossWeight');
$GrossWeightDate = $this->request->getPost('GrossWeightDate');
@ -1166,8 +1280,8 @@ function updateIGRWeight(){
$IGRItemNo = $this->request->getPost('IGRlineitem');
$updateby = $this->session->get('userId');
$WeightFile = $this->request->getfile('WeightFile');
$GrossWtDt = !empty($GrossWeightDate) ? get_date_time_format($GrossWeightDate) : null;
$TareWtDt = !empty($TareWeightDate) ? get_date_time_format($TareWeightDate) : null;
$GrossWtDt = (!empty($GrossWeightDate) && (string)$GrossWeightDate != 'null' ) ? get_date_time_format($GrossWeightDate) : null;
$TareWtDt =(!empty($TareWeightDate) && (string)$TareWeightDate != 'null') ? get_date_time_format($TareWeightDate) : null;
$path = ROOTPATH.'public/uploads/Igrfiles/';
@ -1521,4 +1635,66 @@ function updateIGRWeight(){
}
}
}
public function downloadFilesAsZip($igrno)
{
// Get all file details for the given IGR number
$fileDetails = $this->inwardgateregister_model->getAllIgrFileDetails($igrno);
if (empty($fileDetails)) {
// Display an alert message
echo '<script>alert("There are no files.");</script>';
redirect('ViewIGR', 'refresh');
return;
}
// Define the root path for files
$rootPath = ROOTPATH . 'public/uploads/Igrfiles/';
// Create a new ZIP archive
$zip = new ZipArchive();
// Define the name of the ZIP file
$zipFileName = $igrno . '.zip';
$zipFilePath = $rootPath . $zipFileName;
if ($zip->open($zipFilePath, ZipArchive::CREATE | ZipArchive::OVERWRITE) === TRUE) {
$filesAdded = false;
// Add each file to the ZIP archive
foreach ($fileDetails as $file) {
$filePath = $rootPath . $file->file;
if (file_exists($filePath)) {
if (!$zip->addFile($filePath, $file->filename)) {
// Handle error when adding file to ZIP
echo '<script>alert("Failed to add file: ' . $file->filename . '");</script>';
$zip->close();
redirect('ViewIGR', 'refresh');
return;
}
$filesAdded = true;
}
}
// Close the ZIP archive
$zip->close();
if ($filesAdded) {
// Return the ZIP file as a download
return $this->response->download($zipFilePath, null)->setFileName($zipFileName);
} else {
// Delete the empty ZIP file
if (file_exists($zipFilePath)) {
unlink($zipFilePath);
}
echo '<script>alert("There are no files.");</script>';
redirect('ViewIGR', 'refresh');
return;
}
} else {
echo '<script>alert("Failed to create ZIP file");</script>';
redirect('ViewIGR', 'refresh');
return;
}
}
}

View File

@ -504,11 +504,12 @@ class Payslip extends BaseController
public function monthlyInputs()
{
$current = date("m-Y");
//echo $current;
// echo $current;
$data['month'] = $this->monthlypay_model->monthlyListing($current);
// $data['fresh'] = $this-> monthlypay_model->getEmpPayDetails($current);
$data['dropdownvalue'] = $current;
$data['fresh'] = $this->monthlypay_model->getEmpPayDetailsforMonthInputs($current);
// dd($data['fresh']);
$employeeSalary = [];
@ -659,7 +660,9 @@ class Payslip extends BaseController
//print_r($data['month']);
$data['dropdownvalue'] = $current;
$data['fresh'] = $this->monthlypay_model->getEmpPayDetailsforMonthInputs($current);
//print_r($data['fresh']);
// dd($data['fresh']);
$employeeSalary = [];
@ -1067,25 +1070,25 @@ class Payslip extends BaseController
$filename = " ";
$html = "";
$All = $this->request->getPost('All');
if ($All == '') {
$this->validator->setRules([
'Employee' => [
'label' => 'Employee',
'rules' => 'trim|callback_Employee_validate',
]
]);
}
// if ($All == '') {
// $this->validator->setRules([
// 'Employee' => [
// 'label' => 'Employee',
// 'rules' => 'trim|callback_Employee_validate',
// ]
// ]);
// }
$this->validator->setRules([
'PayOn' => [
'label' => 'PayOn',
'rules' => 'trim|callback_PayOn_validate',
]
]);
// $this->validator->setRules([
// 'PayOn' => [
// 'label' => 'PayOn',
// 'rules' => 'trim|callback_PayOn_validate',
// ]
// ]);
if ($this->validator->run() == FALSE) {
$this->viewGenerator();
} else {
// if ($this->validator->run() == FALSE) {
// $this->viewGenerator();
// } else {
$Payon = $this->request->getPost('PayOn');
$m = date("M", mktime(0, 0, 0, (int)$Payon, 10));
@ -1193,7 +1196,7 @@ class Payslip extends BaseController
$mpdf->SetTitle('Resico:Payslip');
$mpdf->Output("Payslip-" . $filename . ".pdf", 'D');
}
// }
}
function updatePayslip()

View File

@ -237,6 +237,7 @@ class Rawmaterialdetails extends BaseController
}
$data['materialDetails'] = $this->rawmaterialdetails_model->getMaterialDetails($RawMaterialID);
$data['material'] = $this->rawmaterialdetails_model->getmaterialType();
$data['currentstock'] = $this->rawmaterialdetails_model->getMaterialstock($RawMaterialID, $currentdate);
$data['materialType'] = $this->rawmaterialdetails_model->getmaterialType($MaterialType);
$data['materialCategory'] = $this->rawmaterialdetails_model->getmaterialCategory($MaterialCategory);

View File

@ -130,4 +130,20 @@ if (!function_exists('trans')) {
return $lang_string;
}
}
}
if (!function_exists('generateCostCenterCode')) {
function generateCostCenterCode($id)
{
if ($id < 10) {
$CostCenterCode = 'C00' . $id;
} elseif ($id < 100) {
$CostCenterCode = 'C0' . $id;
} else {
$CostCenterCode = 'C' . $id;
}
return $CostCenterCode;
}
}

View File

@ -0,0 +1,23 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class AppConfigModel extends Model
{
protected $table = 'app_config';
protected $primaryKey = 'id';
protected $allowedFields = [
"id",
"config_key",
"config",
"config_value",
"is_active",
"createdDate",
"uploadedby",
];
}
?>

View File

@ -16,7 +16,7 @@ class Costcenter_model extends Model
function CostListing()
{
$builder = $this->db->table('t_costcenter_master as Cost')
->select('Cost.CostCenterCode as code,Cost.CostCenterName as CostCenterName , Cost.ApprovedBy as ApprovedBy,Emp.FirstName as FirstName,Emp.Designation as Designation ,Cost.CreatedDate,Cost.IsActive,Cost.DeletedBy,Cost.DeletedBy')
->select('Cost.id as id, Cost.CostCenterCode as code,Cost.CostCenterName as CostCenterName , Cost.ApprovedBy as ApprovedBy,Emp.FirstName as FirstName,Emp.Designation as Designation ,Cost.CreatedDate,Cost.IsActive,Cost.DeletedBy,Cost.DeletedBy')
->join('t_employee_details as Emp', 'Emp.EmpID=Cost.ApprovedBy');
@ -30,21 +30,30 @@ class Costcenter_model extends Model
* This function used to get user information by id
* @param number $userId : This is user id
* @return array $result : This is user information
*/
function saveCostCenter($Cost)
{
*/
public function saveCostCenter($Cost) {
$this->db->transStart();
$builder = $this->db->table('t_costcenter_master');
$builder->insert($Cost);
$insert_id = $this->db->affectedRows();
$this->db->transComplete();
return $insert_id;
$builder->insert($Cost);
$aff_row = $this->db->affectedRows();
log_message('error', 'saveCostCenter Query: ' . $this->db->getLastQuery()->getQuery());
$this->db->transComplete();
return $aff_row;
}
public function updateCostCenter($Cost, $id) {
$this->db->table('t_costcenter_master')
->where('id', $id)
->update($Cost);
$aff_row = $this->db->affectedRows();
return $aff_row;
}
public function lastCCID(){
$query = $this->db->table('t_costcenter_master')->select('id')->orderBy('id', 'DESC')->limit(1)->get();
$lastCCID = $query->getRow()->id;
return $lastCCID;
}
function getFiscalYear()
{
$builder = $this->db->table('t_company_details')
@ -54,44 +63,6 @@ function saveCostCenter($Cost)
return $query->getResult();
}
function addCostCenterDepartment($Dept)
{
$this->db->transStart();
$builder = $this->db->table('t_costcenter_departments');
$builder->insert($Dept);
$insert_id = $this->db->affectedRows();
$this->db->transComplete();
return $insert_id;
}
function addBudget($Budget)
{
$this->db->transStart();
$builder = $this->db->table('t_costcenter_budget');
$builder->insert($Budget);
$insert_id = $this->db->affectedRows();
$this->db->transComplete();
return $insert_id;
}
function getApproverName()
{
$builder = $this->db->table('t_employee_details')
->select('EmpID,FirstName,LastName,Designation')
->where('Departmentcode ', 'DEP10');
$query =$builder->get();
return $query->getResult();
}
/**
* This function used to get user information by id
* @param number $userId : This is user id
@ -337,19 +308,7 @@ where Dept.DEPCode not in
}
}
/* *//**
* This function is used to get the Department details from t_departmentdetails
* @return array $result : This is result of the query
*/
function getDepartment()
{
$builder = $this->db->table('t_departmentdetails')
->select('DEPCode, DepartmentName')
->where('IsActive =', 1);
$query =$builder->get();
return $query->getResult();
}
/**
* This function is used to get the Config value from configuration table
* @return array $result : This is result of the query

View File

@ -0,0 +1,24 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class EmpFilesModel extends Model
{
protected $table = 'emp_file';
protected $primaryKey = 'id';
protected $allowedFields = [
"id",
"emp_file",
"file_name",
"emp_id",
"path",
"is_active",
"createdDate",
"uploadedby",
];
}
?>

View File

@ -19,7 +19,7 @@ class Employeedetails_model extends Model
$builder = $this->db->table('t_employee_details Emp')
->select(' Emp.*,Dep.DepartmentName as DepartmentName')
->join('t_departmentdetails Dep', 'Emp.Departmentcode = Dep.DEPCode', 'left')
->orderBy("Emp.EmpID", "asc");
->orderBy("Emp.EmpID", "desc");
$query = $builder->get();
@ -79,9 +79,18 @@ class Employeedetails_model extends Model
$builder = $this->db->table('t_employee_details');
$builder->insert($Employee);
$EmpID = $this->db->affectedRows();
if ($this->db->affectedRows() > 0) {
$builder->select('*');
$builder->orderBy('created_date', 'DESC');
$builder->limit(1);
return $EmpID;
$query = $builder->get();
$result = $query->getRowArray();
return $result['EmpID'];
} else {
return 0;
}
}

View File

@ -77,16 +77,26 @@ class Emppaydate_model extends Model
return $query->getResult();
}
function getEmpPayData($EmpID)
{
$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 = ?;';
$query = $this->db->query($sql,array($EmpID));
return $query->getRow();
}
function editemppay($emppaydatas)
{
$paydateid=$emppaydatas['Pay_Data_ID'];
$EmpID=$emppaydatas['EmpID'];
//echo $paydateid;
//print_r($emppaydatas);die();
$this->db->table('t_emp_pay_data')
->where('Pay_Data_ID', $paydateid)
->where('EmpID', $EmpID)
->update($emppaydatas);
return TRUE;

View File

@ -40,21 +40,14 @@ class Inwardgateregister_model extends Model
$afftectedRows = $this->db->affectedRows();
return $afftectedRows;
}
function getfies($igr)
{
function getAdditionalIGRFile($igr){
$builder = $this->db->table('t_inwardgateregister_fileupload')->select('*')
->where('IGRNO', $igr);
->where('IGRNO', $igr);
$query = $builder->get();
return $query->getResult();
}
function fileupload($myfiles)
function uploadAdditionalFile($myfiles)
{
$builder = $this->db->table('t_inwardgateregister_fileupload');
$builder->insert($myfiles);
@ -62,13 +55,14 @@ class Inwardgateregister_model extends Model
return $aff > 0 ? $this->db->insertID() : 0;
}
function deleteBillFile($billno)
function deleteAdditionalFile($fileid)
{
$deleteBillFile = array('Isactive' => 0);
$arr = array('Isactive' => 0);
$this->db->table('t_inwardgateregister_fileupload')
->where('BillNo', $billno)
->update($deleteBillFile);
return TRUE;
->where('BillNo', $fileid)
->update($arr);
$aff = $this->db->affectedRows();
return $aff > 0 ? true : false;
}
@ -266,9 +260,7 @@ class Inwardgateregister_model extends Model
$builder = $this->db->table('t_igr_details');
$builder->insert($igrD);
$aff_row = $this->db->affectedRows();
log_message('error', 'addigrD Query: ' . $this->db->getLastQuery()->getQuery());
log_message('error', 'addigrD Query: ' . $this->db->getLastQuery()->getQuery());
$this->db->transComplete();
$result = $this->db->table('t_igr_details')
@ -277,7 +269,7 @@ class Inwardgateregister_model extends Model
->get()
->getRow();
$res = ($aff_row && $result !== null) ? $result->IGRItemNo : 0;
$res = ($aff_row > 0) ? $result->IGRItemNo : 0;
return $res;
}
@ -414,7 +406,7 @@ class Inwardgateregister_model extends Model
}
}
function UpdatePOMaster($PONO, $updatedBy)
function UpdatePOMaster($PONO, $updatedBy,$IGRStatus)
{
$builder = $this->db->table('t_purchaseorder_lineitem')->select('*')
@ -425,7 +417,7 @@ class Inwardgateregister_model extends Model
if ($query->getNumRows() == 0) {
$POStatus = array('status' => IGR_CREATED, 'UpdateBY' => $updatedBy);
$POStatus = array('status' => $IGRStatus, 'UpdateBY' => $updatedBy);
$this->db->table('t_purchaseorder_master')
->where('PONO', $PONO)
->update($POStatus);
@ -933,5 +925,38 @@ class Inwardgateregister_model extends Model
}
public function getAllIgrFileDetails($igrno)
{
// Query 1: Get FilePath and Remarks from t_inwardgateregister_fileupload
$builder1 = $this->db->table('t_inwardgateregister_fileupload IFU');
$query1 = $builder1->select('IFU.FilePath as file, IFU.Remarks as filename')
->where('IFU.IGRNO', $igrno)
->where('IFU.Isactive', 1)
->get();
$result1 = $query1->getResult();
// Query 2: Get MasterFile from t_igr_master
$builder2 = $this->db->table('t_igr_master IM');
$query2 = $builder2->select('IM.MasterFile as file, IM.MasterFile as filename')
->where('IM.IGRNO', $igrno)
->where('IM.MasterFile IS NOT NULL')
->get();
$result2 = $query2->getResult();
// Query 3: Get WeightFile from t_igr_details
$builder3 = $this->db->table('t_igr_details ID');
$query3 = $builder3->select('ID.WeightFile as file, ID.WeightFile as filename')
->where('ID.IGRNO', $igrno)
->where('ID.WeightFile IS NOT NULL')
->get();
$result3 = $query3->getResult();
// Merging results into a single array
$results = array_merge($result1, $result2, $result3);
return $results;
}
}

View File

@ -100,11 +100,10 @@ class Monthlypay_model extends Model
//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(?)
$sql = "select t_emp_pay_data.EmpID, t_emp_pay_data.Incentives as MasterIncentives,t_emp_pay_data.*,t_employee_details.FirstName,t_employee_details.LastName,t_employee_details.DateofJoining,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_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
from t_emp_pay_data
$sql = "select t_emp_pay_data.EmpID, t_emp_pay_data.Incentives as MasterIncentives,t_emp_pay_data.*,t_employee_details.FirstName,t_employee_details.LastName,t_employee_details.DateofJoining,t_employee_details.Designation,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_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
from t_emp_pay_data
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 = ?
left join t_attendance on t_emp_pay_data.EmpID = t_attendance.EmpID
left join t_monthly_pay_inputs on t_monthly_pay_inputs.EmpID = t_emp_pay_data.EmpID and t_monthly_pay_inputs.Month_Year = ?
left join t_loan_master on t_emp_pay_data.EmpID = t_loan_master.EmpID and t_loan_master.is_Active = 1

View File

@ -124,8 +124,9 @@ class Requistion_model extends Model
{
$builder = $this->db->table('t_costcenter_master Mast ')
->select('Mast.CostCenterCode,Mast.CostCenterName')
->join('t_costcenter_departments COST', 'COST.CostCenterCode = Mast.CostCenterCode')
->where('COST.DEPCode ',$DeptId );
->where('Mast.IsActive ',1 );
// ->join('t_costcenter_departments COST', 'COST.CostCenterCode = Mast.CostCenterCode','left')
// ->where('COST.DEPCode ',$DeptId );
$query = $builder->get();
return $query->getResultArray();

View File

@ -801,7 +801,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-3">
<label>Supplier<span class="badge mandatory">*</span></label>
<label>Select Supplier<span class="badge mandatory">*</span></label>
<?php
$options = array("0" => 'Select Supplier');
//print_r( $options);
@ -820,7 +820,7 @@ if (!empty($getlogpodtl)) {
</div>
<div class="col-md-3">
<label>Address</label>
<label>Supplier Address</label>
<div class="form-group">
<?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40');
@ -865,12 +865,11 @@ if (!empty($getlogpodtl)) {
<b><u>Select Delivery By<span class="badge mandatory">*</span></u></b><br />
<div class="centered">
<?php echo form_label('Date', 'Date') . "&nbsp;&nbsp;" . form_radio(array('name' => 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?>
<?php echo form_label('Schedule', 'Schedule') . "&nbsp;&nbsp;" . form_radio(array('name' => 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?>
</div>
</div>
<div class="col-md-3" id="Deliverydtdiv"><br />
<div class="col-md-3" id="Deliverydtdiv">
<label>Delivery Date<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -879,7 +878,7 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
<div class="col-md-3" id="Schedulediv" style="display:none;"><br />
<div class="col-md-3" id="Schedulediv" style="display:none;">
<label>Schedule By<span class="badge mandatory">*</span></label>
<?php
$data = array('name' => 'Scheduleby', 'value' => set_value('Scheduleby'), 'id' => 'Scheduleby', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110');
@ -963,7 +962,7 @@ if (!empty($getlogpodtl)) {
<div class="col-md-3">
<label>Service Type Options</label>
<label>Service Type Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -996,7 +995,7 @@ if (!empty($getlogpodtl)) {
</div>
<div class="col-md-3">
<label>Payment Terms</label>
<label>Payment Terms<span class="badge mandatory">*</span></label>
<?php
if (!empty($Payment)) {
foreach ($Payment as $pay2) :
@ -1027,7 +1026,7 @@ if (!empty($getlogpodtl)) {
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Insurance Options</label>
<label>Insurance Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -1071,8 +1070,8 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<select id='BudgetType' name='BudgetType'>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<select id='BudgetType' name='BudgetType' required='true'>
<?php if ($BudgetType == 'CAPITAL') {
$opt1 = 'CAPITAL';
$opt2 = 'REVENUE';
@ -2119,7 +2118,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="row" style="border: 1px solid">
<div class="row">
<div class="col-md-12" style="padding: 0px;">
<div class="col-md-2">

View File

@ -1,43 +1,36 @@
<style>
.pagination {
margin: 0px !important;
}
</style>
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
<!-- Latest DataTables Buttons CSS -->
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.3.4/css/buttons.dataTables.min.css">
<style>
.dataTables_wrapper .dataTables_length select {
background-color:white !important;
}
.dataTables_wrapper .dataTables_filter input {
background-color: white !important;
}
button.dt-button, div.dt-button, a.dt-button, input.dt-button {
background-color: white !important;
}
.dataTables_length, label{
display: flex !important;
}
.dataTables_wrapper .dataTables_filter {
text-align: center;
.Date-filter-form {
display: flex;
align-items: center;
gap: 10px; /* Adjust the gap as needed */
}
.dataTables_wrapper .dataTables_length {
float: left;
.Date-filter-form input, .Date-filter-form button {
padding: 5px;
font-size: 14px;
}
.dataTables_wrapper .dt-buttons {
float: right;
.Date-filter-form button {
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
}
.dataTables_wrapper .clear {
clear: both;
.Date-filter-form button:hover {
background-color: #0056b3;
}
.icon-button {
background: none;
border: none;
cursor: pointer;
color: #007bff;
font-size: 18px;
}
.icon-button:hover {
color: #0056b3;
}
th, td {
white-space: nowrap;
}
.dataTables_wrapper {
width: 100%;
overflow-x: auto;
}
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
@ -77,6 +70,18 @@
</div>
<!-- /.box-header -->
<div class="box-body">
<form class="Date-filter-form" id="DateRangeFilter" >
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<table id="dataTableHistoriek" class="table table-bordered table-hover editableTable" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
@ -178,19 +183,84 @@
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> -->
<!-- Latest DataTables JS -->
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
<!-- Latest DataTables Buttons JS -->
<script src="https://cdn.datatables.net/buttons/2.3.4/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.13.6/sorting/datetime-moment.js"></script>
<script>
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
<script>
$(document).ready(function() {
// Initialize the DataTable
var table = $('#dataTableHistoriek').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 1,
"type": "date-eu"
}],
"aaSorting": [
[1, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
});
// Initialize the datepickers
$("#fromDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var minDate = $(this).datepicker("getDate");
$("#toDate").datepicker("option", "minDate", minDate);
}
});
$("#toDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var maxDate = $(this).datepicker("getDate");
$("#fromDate").datepicker("option", "maxDate", maxDate);
}
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").datepicker("setDate", null);
$("#toDate").datepicker("setDate", null);
$("#toDate").datepicker("option", "minDate", null);
$("#fromDate").datepicker("option", "maxDate", null);
table.draw();
});
// Date range filter
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $("#fromDate").datepicker("getDate");
var toDate = $("#toDate").datepicker("getDate");
var dateStr = data[1]; // Assuming the date is in the first column
// Convert dateStr to Date object
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
if (!fromDate || !toDate) {
return true; // No filter if dates are not selected
}
return date >= fromDate && date <= toDate;
}
);
// Handle form submission
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw();
});
});
</script>
<!-- <script>
$(function () {
$.fn.dataTable.moment('DD-MM-YYYY');
$('#dataTableHistoriek').DataTable({
@ -225,4 +295,4 @@
]
});
});
</script>
</script> -->

View File

@ -1,12 +1,68 @@
<style>
.content {
transition: all 0.3s ease;
}
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 31px;
vertical-align: sub;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
transition: .4s;
border-radius: 34px;
}
.slider:before {
position: absolute;
content: "";
height: 23px;
width: 23px;
border-radius: 50%;
left: 4px;
bottom: 4px;
background-color: white;
transition: .4s;
}
input:checked+.slider {
background-color: #2196F3;
}
input:checked+.slider:before {
transform: translateX(26px);
}
.label-text {
margin-left: 70px;
vertical-align: middle;
}
</style>
<script>
$(document).ready(function() {
$("#gender").select2();
$("#bloodgroup").select2();
$("#MartialStatus").select2();
$("#desigination").select2();
$("#work_location").select2();
$("#departmentname").select2();
$("#eduqualifaction").select2();
$("#bankbranchname").select2();
document.getElementById('aadharno').addEventListener('input', function(e) {
e.target.value = e.target.value.replace(/[^\d]/g, '').replace(/(.{4})/g, '$1 ').trim();
@ -396,22 +452,24 @@ legend {
}
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="row">
<div class="col-md-12">
<div class="col-md-1"></div>
<div class="col-md-5">
<b><h3>Add Employee</h3></b>
<div class="row">
<div class="col-md-12">
<div class="col-md-1"></div>
<div class="col-md-5">
<b>
<h3>Add Employee</h3>
</b>
</div>
<div class="col-md-5" style="margin-top: 20px;margin-bottom: 10px;text-align:right;">
<a href="<?php echo base_url() ?>employeeListing" class="btn btn-cancel" value="Back">Back</a>
</div>
<div class="col-md-1"></div>
</div>
</div>
<div class="col-md-5" style="margin-top: 20px;margin-bottom: 10px;text-align:right;">
<a href="<?php echo base_url() ?>employeeListing" class="btn btn-cancel" value="Back">Back</a>
</div>
<div class="col-md-1"></div>
</div>
</div>
<section class="content">
<br />
<div class="row">
@ -432,7 +490,7 @@ legend {
<form class="form-horizontal" role="form">
<fieldset>
<!-- Form Name -->
<legend>Personal Information</legend>
<div class="col-md-12">
@ -470,13 +528,9 @@ legend {
onkeypress="return onlyAlphabets(event);" id="FatherName"
maxlength="200" class="form-control" required>
</div>
<!-- <div class="col-md-6 pad"><span>Last Name</span><span class="badge">*</span>
<input type="text" name="LastName" onkeypress="return onlyAlphabets(event);" maxlength="100" id="LastName" class="form-control" required>
</div> -->
</div>
<div class="col-md-12">
<div class="col-md-6 pad"><span>Contact Number</span><span
class="badge">*</span>
<input type="text" name="ContactNumber"
@ -496,9 +550,9 @@ legend {
foreach ($Gender as $rl)
{
?>
<option value="<?php echo $rl->ConfigValue ?>">
<?php echo $rl->ConfigValue ?></option>
<?php
<option value="<?php echo $rl->ConfigValue ?>">
<?php echo $rl->ConfigValue ?></option>
<?php
}
}
?>
@ -533,63 +587,62 @@ legend {
</div>
<div class="col-md-12">
<div class="col-md-6 pad">
<span>Blood group</span><span class="badge">*</span>
<select id="bloodgroup" name="bloodgroup" required
class="form-control select2">
<option value="">Select Blood group</option>
<?php
<div class="col-md-6 pad">
<span>Blood group</span><span class="badge">*</span>
<select id="bloodgroup" name="bloodgroup" required
class="form-control select2">
<option value="">Select Blood group</option>
<?php
if(!empty($BloodGroup))
{
foreach ($BloodGroup as $rl)
{
?>
<option value="<?php echo $rl->ConfigValue ?>">
<?php echo $rl->ConfigValue ?></option>
<?php
<option value="<?php echo $rl->ConfigValue ?>">
<?php echo $rl->ConfigValue ?></option>
<?php
}
}
?>
</select>
</div>
</select>
</div>
<div class="col-md-6 pad">
<span>Marital Status</span><span class="badge">*</span>
<select id="MartialStatus" name="MartialStatus" type="text"
required placeholder="Marital status"
class="form-control select2">
<option value="">Select Marital Status</option>
<?php
<div class="col-md-6 pad">
<span>Marital Status</span><span class="badge">*</span>
<select id="MartialStatus" name="MartialStatus" type="text"
required placeholder="Marital status"
class="form-control select2">
<option value="">Select Marital Status</option>
<?php
if(!empty($Martial))
{
foreach ($Martial as $rl)
{
?>
<option value="<?php echo $rl->ConfigValue ?>">
<?php echo $rl->ConfigValue ?></option>
<?php
<option value="<?php echo $rl->ConfigValue ?>">
<?php echo $rl->ConfigValue ?></option>
<?php
}
}
?>
</select>
</div>
</select>
</div>
</div>
</div>
</div>
<!-- Address Section -->
<!-- Form Name -->
<legend>Address Details</legend>
<!-- Text input-->
<div class="col-md-12 pad">
<div class="col-md-12"><span>Current Address</span><span
class="badge">*</span>
@ -603,7 +656,7 @@ legend {
onclick="CheckClick"> Current address same as permanent address
</div>
</div>
<!-- Text input-->
<div class="col-md-12 pad">
<div class="col-md-12"><span>Permanent Address</span><span
class="badge">*</span>
@ -612,14 +665,13 @@ legend {
class="form-control">
</div>
</div>
<!-- Text input-->
<!-- Emergency Contact Section -->
<!-- Form Name -->
<legend>Emergency Contact Information</legend>
<!-- Text input-->
<div class="col-md-12 pad">
<div class="col-md-6"><span>Emergency Contact Name</span>
<input type="text" id="emergencycontactname"
@ -637,10 +689,9 @@ legend {
</div>
<!-- profile Section -->
<!-- Form Name -->
<legend>Work Profile</legend>
<!-- Text input-->
<div class="col-md-12 pad">
<div class="col-md-3"><span>Designation</span><span class="badge">*</span>
@ -728,53 +779,266 @@ legend {
onchange=" return getValidReferNumber();" maxlength="10"
onkeypress="return isNumberKey(event)" class="form-control">
</div>
</div>
<legend>Bank Details</legend>
<!-- Text input-->
<div class="col-md-12 pad">
<div class="col-md-3"><span>Bank Name</span><span class="badge">*</span>
<select type="text" id="bankbranchname" name="bankbranchname"
class="form-control select2" required>
<option value="">Select Bank Name</option>
<div class="col-md-3"><span>Work Location</span><span class="badge">*</span>
<select type="text" id="work_location" name="work_location" required
class="form-control select2">
<option value="">Select Work Location</option>
<?php
if(!empty($bankdetails))
if(!empty($Location))
{
foreach ($bankdetails as $bank)
foreach ($Location as $rl)
{
?>
<option value="<?php echo $bank->Bank_name ?>">
<?php echo $bank->Bank_name ?></option>
<option value="<?php echo $rl->ConfigValue ?>">
<?php echo $rl->ConfigValue ?></option>
<?php
}
}
?>
</select>
<!-- <input type="text" id="bankbranchname" onkeypress="return alpha(event);" maxlength="200" name="bankbranchname" class="form-control"> -->
</div>
<div class="col-md-3">
<div class="form-group">
<span
style="display: inline-block; vertical-align: bottom; margin-right: 10px; margin-bottom: 10px;">Management
Team</span>
<label class="switch">
<input type="checkbox" name="is_management_team" value="0"
onchange="updateSwitchValue(this)" />
<span class="slider"></span>
</label>
</div>
</div>
</div>
<legend>Bank Details</legend>
<div class="col-md-12 pad">
<div class="col-md-3"><span>Bank Name</span><span class="badge">*</span>
<input type="text" id="bankbranchname" name="bankbranchname"
class="form-control" required>
</div>
<div class="col-md-3"><span>Account Number</span><span
class="badge">*</span>
<input type="text" id="accountno" onkeypress="return isNumberKey(event)"
maxlength="20" name="accountno" class="form-control" required>
</div>
<div class="col-md-3"><span>IFSC Code</span>
<div class="col-md-3"><span>IFSC Code</span></span><span
class="badge">*</span>
<input type="text" id="ifsccode" name="ifsccode" placeholder="IFSC Code"
class="form-control" onkeypress="return alpha(event);"
style="text-transform: uppercase" readonly>
style="text-transform: uppercase" required>
</div>
<div class="col-md-3"><span>Bank Address</span>
<input type="text" id="bankaddress" name="bankaddress"
placeholder="Bank Address" maxlength="200" class="form-control"
readonly>
placeholder="Bank Address" maxlength="200" class="form-control">
</div>
</div>
<legend>Employee benefits</legend>
<div class="col-md-12 pad">
<div class="col-md-12">
<div class="col-md-3">
<div class="form-group">
<span for="Basic_Pay">Total Salary</span>
<font color="Red">*</font>
<input type="text" name="Total_salary" id="Total_salary"
value="<?php echo set_value('Total_salary'); ?>"
pattern="([0-9]{1,8}([.][0-9]{1,2})?)"
class="form-control num" style="text-transform:uppercase;"
title="Enter Valid Total salary Amount, Minimum Four Digit Positive Number"
onchange="calculalteHRA();" />
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<span for="Basic_Pay">Basic Pay</span>
<font color="Red">*</font>
<input type="text" name="Basic_Pay" id="Basic_Pay"
value="<?php echo set_value('Basic_Pay'); ?>"
pattern="[0-9]{4,6}" class="form-control num"
style="text-transform:uppercase;"
title="Enter Valid Basic Pay Amount, Minimum Four Digit Positive Number"
readonly />
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<span for="HRA_Rate">HRA Rate(%)</span>
<font color="Red">*</font>
<input type="text" name="HRA_Rate" id="HRA_Rate"
value="<?= $hra_rate; ?>" class="form-control num"
style="text-transform:uppercase;"
pattern="([0-9]{1,2}([.][0-9]{1,2})?)"
title="Enter the Valid HRA Rate, Minimum 1 digit, Maximum 2 digit"
readonly />
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<span for="HRA_Rate">HRA Amount</span>
<font color="Red">*</font>
<input type="text" name="HRA_Amount" id="HRA_Amount"
class="form-control num" style="text-transform:uppercase;"
readonly />
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-3">
<div class="form-group">
<span for="Allowances">Allowances</span>
<input type="text" name="Allowances"
value="<?php echo set_value('Allowances'); ?>"
class="form-control num" style="text-transform:uppercase;"
pattern="([0-9]{1,5}([.][0-9]{1,2})?)"
title="Enter the Valid Allowances, Minimum 1 digit, Maximum 5 digits" />
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<span for="Food_Allowances">Food Allowances(Per Day)</span>
<input type="text" name="Food_Allowances"
value="<?php echo set_value('Food_Allowances'); ?>"
class="form-control num"
pattern="([0-9]{1,3}([.][0-9]{1,2})?)"
onfocusout="validateFood();"
title="Enter the Valid Food Allowances, Minimum 1 Digit, Maximum 3 Digits" />
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<span for="Incentives">Incentives</span>
<input type="text" name="Incentives"
value="<?php echo set_value('Incentives'); ?>"
class="form-control num" style="text-transform:uppercase;"
pattern="([0-9]{1,5}([.][0-9]{1,2})?)"
title="Enter the Valid Allowances, Minimum 1 digit, Maximum 5 digits" />
</div>
</div>
<div class="col-md-3"></div>
</div>
<div class="col-md-12">
<div class="col-md-3">
<div class="form-group">
<span
style="display: inline-block; vertical-align: bottom; margin-right: 10px; margin-bottom: 10px;">ESI
Applicable</span>
<label class="switch">
<input type="checkbox" name="esi_applicable" value="0"
onchange="updateSwitchValue(this)" />
<span class="slider"></span>
</label>
</div>
</div>
<div class="col-md-3">
<div class="form-group"><span>ESI Number</span>
<input type="text" id="esino" name="esino" maxlength="10"
onchange="validateESI();" class="form-control"
title=" 10 digit number"
onkeypress="return isNumberKey(event)">
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<span for="ESI_Rate">ESI Rate(%)</span>
<font color="Red">*</font>
<input type="text" name="ESI_Rate" value="<?= $esi_rate; ?>"
class="form-control num" style="text-transform:uppercase;"
pattern="([0-9]{1,2}([.][0-9]{1,2})?)"
title="Enter the Valid ESI Rate, Minimum 1 digit, Maximum 2 digits"
readonly />
</div>
</div>
<div class="col-md-3"></div>
</div>
<div class="col-md-12">
<div class="col-md-3">
<div class="form-group">
<span
style="display: inline-block; vertical-align: bottom; margin-right: 10px; margin-bottom: 10px;">PF
Applicable</span>
<label class="switch">
<input type="checkbox" name="pf_applicable" value="0"
onchange="updateSwitchValue(this)" />
<span class="slider"></span>
</label>
</div>
</div>
<div class="col-md-3">
<div class="form-group"><span>PF Number</span>
<input type="text" id="pfno" name="pfno" maxlength="22"
onchange="validatePF();" class="form-control"
style="text-transform:uppercase"
pattern="([a-zA-Z]){5}([0-9]){17}"
title=" 5 Character and 17 Digit number (ex:ABCDE12345678901234567)"
onkeypress="return alpha(event);">
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<span for="PF_Rate">PF Rate(%)</span>
<font color="Red">*</font>
<input type="text" name="PF_Rate" value="<?= $pf_rate; ?>"
class="form-control num" style="text-transform:uppercase;"
pattern="([0-9]{1,2}([.][0-9]{1,2})?)"
title="Enter the valid PF Rate, Minimum 1 digit, Maximum 2 digits"
readonly />
</div>
</div>
<div class="col-md-3"></div>
</div>
</div>
<legend>ID Proof</legend>
<!-- Text input-->
<div class="col-md-12 pad">
<div class="col-md-3"><span>Aadhar Number</span> <span
@ -796,7 +1060,7 @@ legend {
onchange="ValidatePassport();" name="passportno"
style="text-transform:uppercase" class="form-control"
pattern="[aA-prPR-wyWY]{1}[1-9]{1}\d{1}\s\d{4}[1-9]{1}" title="The first digit or the last digit will never be 0
The first character cannot be Q, X or Z. (eg:A12 34567)" onkeypress="return alpha(event);">
The first character cannot be Q, X or Z. (eg:A12 34567)" onkeypress="return alpha(event);">
</div>
<div class="col-md-3"><span>Passport Expiry Date</span>
<input id="ValidTill" name="ValidTill" onkeypress="return false;"
@ -824,39 +1088,43 @@ legend {
</div>
<legend>Employee benefits</legend>
<!-- Text input-->
<div class="col-md-12 pad">
<div class="col-md-6"><span>PF Number</span>
<input type="text" id="pfno" name="pfno" maxlength="22"
onchange="validatePF();" class="form-control"
style="text-transform:uppercase" pattern="([a-zA-Z]){5}([0-9]){17}"
title=" 5 Character and 17 Digit number (ex:ABCDE12345678901234567)"
onkeypress="return alpha(event);">
</div>
<div class="col-md-6"><span>ESI Number</span>
<input type="text" id="esino" name="esino" maxlength="10"
onchange="validateESI();" class="form-control"
title=" 10 digit number" onkeypress="return isNumberKey(event)">
</div>
<!-- <div class="col-md-4"><span>UA Number</span>
<input type="text" id="uano" maxlength="12" name="uano" class="form-control">
</div> -->
</div>
<legend>Nominee Details</legend>
<!-- Text input-->
<div class="col-md-12 pad">
<div class="col-md-12"><span>Nominee reference</span>
<input type="text" id="nomineename" name="nomineename" maxlength="255"
class="form-control">
<!-- <textarea id="nomineename" name="nomineename" maxlength="255" class="form-control" rows="3" cols="50"></textarea> -->
</div>
</div>
<legend>Files</legend>
<div class="files">
<div class="col-md-12 pad ">
<div class="col-md-4">
<span>File Name</span>
<input type="text" id="file_name" name="file_name[]" maxlength="255"
class="form-control">
</div>
<div class="col-md-4">
<span>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-primary btn-sm a1"
onclick="appendFilesFileds()" id="day">
Add
</button>
</div>
</div>
<div id="filesContainer"></div>
</div>
<div style="padding: 70px;"></div>
<!-- Command -->
@ -914,6 +1182,65 @@ legend {
<script src="<?php echo base_url(); ?>public/assets/js/addUser.js" type="text/javascript"></script>
<script>
function updateSwitchValue(checkbox) {
checkbox.value = checkbox.checked ? "1" : "0";
}
function calculalteHRA() {
//var empid=document.getElementById('emp').value;
//alert(empid);
var Totalsalary = document.getElementById('Total_salary').value;
var HRA = document.getElementById('HRA_Rate').value;
//if(EmpID == -1){alert("Select Employee ID..!");}
if (HRA == '') {
alert("Please Enter HRA RATE..");
document.getElementById('HRA_Rate').focus();
} else if (Totalsalary == '') {
alert("Please Enter Total Salary..");
document.getElementById('total_salary').focus();
} else {
var temp = (Totalsalary * (HRA / 100));
var basic = Totalsalary - temp;
document.getElementById('Basic_Pay').value = basic;
document.getElementById('HRA_Amount').value = temp;
}
}
function appendFilesFileds(data) {
var newRowHtml = `
<div class="col-md-12 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>`;
$('#filesContainer').append(newRowHtml);
$('.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()
}
}
function Validate() {
if ($("#FirstName").val().length < 1) {
alert('Please Enter FirstName');
@ -1039,7 +1366,7 @@ $("#emailid").change(function() {
var answer = confirm(data + "" +
" Employee already exists in the database.Do you want to change the Email id ?"
)
)
if (answer) {
$('#emailid').val('');
$('#emailid').focus();
@ -1076,7 +1403,7 @@ $('#panno').change(function() {
var answer = confirm(data + " " +
" Employee details is already exists in the database.Do you want to change the Employee details?"
)
)
if (answer) {
$('#panno').val('');
$('#panno').focus();
@ -1118,7 +1445,7 @@ $('#aadharno').change(function() {
var answer = confirm(data + " " +
" employee details is already exists in the database.Do you want to change the Employee details?"
)
)
if (answer) {
$('#aadharno').val('');
$('#aadharno').focus();
@ -1139,27 +1466,5 @@ $('#aadharno').change(function() {
return false;
}
});
$('#bankbranchname').change(function() {
var bank = $('#bankbranchname').val();
if (bank != '-1') {
var y = <?php echo json_encode($bankdetails, JSON_PRETTY_PRINT) ?>;
$.each(y, function(idx, obj) {
if (bank == obj.Bank_name) {
$("#ifsccode").val(obj.IFSC);
$("#bankaddress").val(obj.Address);
}
});
}
});
</script>

View File

@ -22,16 +22,16 @@
<div class="content-wrapper" style="min-height: 537px;">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center> Add New Material </center>
</h1>
</section>
<h1>
<center> Add Material Details</center>
</h1>
<ol class="breadcrumb">
<a class="btn btn-cancel" href="<?php echo base_url(); ?>rawmaterialListing">&nbsp;&nbsp;<span class="bold">Back</span></a>
</ol>
</section> <br />
<section class="content" id="content">
<div style="text-align:right;">
<a href="<?php echo base_url() ?>rawmaterialListing" class="btn btn-cancel" value="Back" />Back</a>
</div>
<br />
<div class="row">
<!-- left column -->
<div class="col-md-12">
@ -196,7 +196,7 @@
$('#MatCate').autocomplete("option", "minLength", 0);
},
serviceUrl: "<?php echo base_url(); ?>rawmaterialdetails/autocomplete",
serviceUrl: "<?php echo base_url(); ?>rawmaterialdetailsautocomplete",
onSelect: function(suggestion) {
var data = suggestion.ConfigValue;

View File

@ -199,14 +199,14 @@
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<center><h2> Add Supplier</h2>
<!-- <small>Preview</small> -->
</center>
<ol class="breadcrumb">
<a class="btn btn-cancel" href="<?php echo base_url(); ?>supplierlisting">&nbsp;&nbsp;<span class="bold">Back</span></a>
</ol>
</section>
<section class="content-header">
<h1>
<center> Add Supplier Details</center>
</h1>
<ol class="breadcrumb">
<a class="btn btn-cancel" href="<?php echo base_url(); ?>supplierlisting">&nbsp;&nbsp;<span class="bold">Back</span></a>
</ol>
</section>
<section class="content" id="content">
<br />

View File

@ -1,8 +1,13 @@
<div class="content-wrapper" style="min-height: 537px;">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1><center> Add User</center></h1>
</section>
<h1>
<center> Add User Details</center>
</h1>
<ol class="breadcrumb">
<a class="btn btn-cancel" href="<?php echo base_url(); ?>userListing">&nbsp;&nbsp;<span class="bold">Back</span></a>
</ol>
</section>
<section class="content">
<div style="text-align:right;">

View File

@ -49,15 +49,17 @@ $(function() {
<div class="content-wrapper" style="min-height: 537px;">
<!-- Content Header (Page header) -->
<section class="content-header">
<center><b><h3> Add Asset </h3></b></center>
</section>
<section class="content-header">
<h1>
<center> Add Asset Details</center>
</h1>
<ol class="breadcrumb">
<a class="btn btn-cancel" href="<?php echo base_url(); ?>assetListing">&nbsp;&nbsp;<span class="bold">Back</span></a>
</ol>
</section><br>
<section class="content">
<div style="text-align:right;">
<a href="<?php base_url() ?>assetListing" class="btn btn-cancel" value="Back"/>Back</a>
</div>
<br>
<div class="row">
<!-- left column -->
<div class="col-md-12">

View File

@ -1,16 +1,14 @@
<div class="content-wrapper" style="min-height: 537px;">
<!-- Content Header (Page header) -->
<section class="content-header">
<center><b>
<h3> Add Config</h3>
</b></center>
</section>
<h1>
<center> Add Config Details</center>
</h1>
<ol class="breadcrumb">
<a class="btn btn-cancel" href="<?php echo base_url(); ?>configlisting">&nbsp;&nbsp;<span class="bold">Back</span></a>
</ol>
</section>
<section class="content">
<div style="text-align:right;">
<a href="<?php echo base_url() ?>configlisting" class="btn btn-cancel" value="Back">Back</a>
</div>
<br>
<div class="row">
<div class="col-md-12">

View File

@ -62,13 +62,16 @@
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<center><b><h3 class="box-title">Add Department Details</h3></b></center>
</section>
<h1>
<center> Add Department Details</center>
</h1>
<ol class="breadcrumb">
<a class="btn btn-cancel" href="<?php echo base_url(); ?>departmentListing">&nbsp;&nbsp;<span class="bold">Back</span></a>
</ol>
</section>
<section class="content">
<div style="text-align:right;">
<a href="<?php echo base_url() ?>departmentListing" class="btn btn-cancel" value="Back"/>Back</a>
</div>
<br/>
<div class="row">
<!-- left column -->

File diff suppressed because it is too large Load Diff

View File

@ -341,7 +341,7 @@ $currentday = date('d');
<tr id="<?php echo $row;?>">
<td width="45" height="45" class="celda_normal" ><?php echo $index;?></td>
<td width="79" height="45" class="celda_normal"><?php echo $a->EmpID;?></td>
<td width="80" height="45" class="celda_normal"><?php echo $a->FirstName.'-'.$a->LastName;?></td>
<td width="80" height="45" class="celda_normal"><?php echo $a->FirstName;?></td>
<?php for ($col =1; $col <= $monthdays;$col++){
$flag =0;

View File

@ -344,7 +344,7 @@
</div>
</div>
<div class="col-md-3">
<label>Supplier<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
<label>Select Supplier<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
<?php
$options = array("0" => 'Select Supplier');
//print_r( $options);
@ -359,7 +359,7 @@
?>
</div>
<div class="col-md-3">
<label>Address</label>
<label>Supplier Address</label>
<div class="form-group">
<?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40');
@ -541,7 +541,7 @@
</div>
</div>
<div class="col-md-3">
<label>Capital Type Options</label>
<label>Capital Type Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -574,7 +574,7 @@
endforeach;
}
echo form_dropdown('PaymentMethod', $options1, set_value('PaymentMethod'), 'id="PaymentMethod"', 'class="form-control"');
echo form_dropdown('PaymentMethod', $options1, set_value('PaymentMethod'), 'id="PaymentMethod"', 'class="form-control"','required="true"');
?>
</div>
@ -594,7 +594,7 @@
<div class="col-md-12">
<div class="col-md-3">
<label>Insurance Options</label>
<label>Insurance Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -618,7 +618,7 @@
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<?php
@ -2477,7 +2477,7 @@
<td align="left"><%=TotalValue%></td>
<td>
<a data-target='#EDITCAPITAL' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#EDITREVENUE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=ReqNo%> Requisition details"></i>&nbsp;&nbsp;&nbsp;</a> <a href='#' onclick="DeleteRow(<%=index%>)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del"><span class="glyphicon glyphicon-trash"></span></a>
<a data-target='#EDITCAPITAL' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#EDITREVENUE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=ReqNo%> Requisition details"></i>&nbsp;&nbsp;&nbsp;</a> <a href='#' onclick="DeleteRow('<%=index%>')" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del"><span class="glyphicon glyphicon-trash"></span></a>
</td>

View File

@ -1,98 +1,192 @@
<div class="content-wrapper">
<section class="content">
<div class="content-wrapper">
<section class="content">
<div class="box">
<div class="box-header">
<CENTER><h3 class="box-title"> Cost Details</h3></CENTER>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 text-right">
<div class="form-group">
<a class="btn btn-success" href="<?php echo base_url(); ?>addCostCenter">Add New Cost List</a>
<a class="btn btn-success" href="<?php echo base_url(); ?>exportcost">Export Cost Details <i class="fa fa-download"aira-hidden="true"></i></a>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;" >
<thead style="background-color: #ddd;">
<tr>
<th>Cost Center Code</th>
<th>Cost Center Name</th>
<th>Created By</th>
<th>Create Date</th>
<th>Active</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($userRecords))
{
foreach($userRecords as $record)
{
?>
<tr>
<td><?php echo $record->code ?></td>
<td><?php echo $record->CostCenterName ?></td>
<!-- <td><?php echo $record->ApprovedBy ?></td> -->
<td><?php echo $record->FirstName ?></td>
<td align="right"><?php
$date = new DateTime($record->CreatedDate);
echo $date->format('d-m-Y'); ?></td>
<td><?php
$R='';
$record->IsActive == 1?$R='ACTIVE':$R='INACTIVE';
echo $R;
?></td>
<td>
<?php
if($record->DeletedBy == ''){
?>
<a href="<?php echo base_url().'editCostCenter?CostCode='.$record->code; ?>"><i class="fa fa-pencil"></i>&nbsp;&nbsp;&nbsp;</a>
<a href="<?php echo base_url().'deleteCostCenter?CostCode='.$record->code; ?>"><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a>
<div class="box-header">
<CENTER>
<h3 class="box-title"> Cost Details</h3>
</CENTER>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 text-right">
<div class="form-group">
<a data-toggle="modal" href="#ccwizard" data-id="0" data-name="" class="btn btn-success">Add New Cost List</a>
<a class="btn btn-success" href="<?php echo base_url(); ?>exportcost">Export Cost Details <i class="fa fa-download" aira-hidden="true"></i></a>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th style="display:none;"></th>
<th>Create Date</th>
<th>Create Time</th>
<th>Cost Center Code</th>
<th>Cost Center Name</th>
<th>Created By</th>
<th>Active</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
<!-- <a href="<?php echo base_url().'CostCenter/viewcost?CostCode='.$record->code; ?>"><i class="fa fa-eye"></i>&nbsp;&nbsp;&nbsp;</a> -->
<?php } ?>
</td>
</tr>
<?php
}
$createdat = new DateTime($record->CreatedDate);
$date = $createdat->format('d-m-Y');
$time = $createdat->format('h:i A');
?>
<tr>
<td style="display:none;"><?php echo $record->CreatedDate ?></td>
<td align="right"><?php echo $date; ?></td>
<td align="right"><?php echo $time; ?></td>
<td><?php echo $record->code ?></td>
<td><?php echo $record->CostCenterName ?></td>
<!-- <td><?php echo $record->ApprovedBy ?></td> -->
<td><?php echo $record->FirstName ?></td>
<td><?php
$R = '';
$record->IsActive == 1 ? $R = 'ACTIVE' : $R = 'INACTIVE';
echo $R;
?></td>
<td>
<?php
if ($record->DeletedBy == '') {
?>
<a data-toggle="modal" href="#ccwizard" data-id="<?php echo $record->id; ?>" data-name="<?php echo $record->CostCenterName; ?>" ><i class="fa fa-pencil"></i></a>
<a href="<?php echo base_url() . 'deleteCostCenter?CostCode=' . $record->code; ?>"><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a>
<?php } ?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script type="text/javascript">
$(function () {
$.fn.dataTable.moment( 'DD-MM-YYYY' );
$('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
// "columnDefs" : [{"targets":3, "type":"date-eu"}],
"aaSorting": [[ 3, "desc" ]],
"info": true,
"autoWidth": true
});
});
</script>
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> -->
}
?>
</tbody>
</table>
</div>
</div>
</div>
<!-- for Add and edit Modal -->
<div class="modal fade" id="ccwizard" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
<span aria-hidden="true">&times;</span>
<span class="sr-only">Close</span>
</button>
<center><h4 class="modal-title" id="myModalLabel"></h4></center>
</div>
<!-- Modal Body -->
<div class="modal-body">
<form id="costCenterForm" class="form-horizontal" role="form">
<div class="form-group">
<div class="row">
<div class="col-md-3 col-md-offset-2">
Cost Center Name:
</div>
<div class="col-md-5">
<input type="text" name="CostCenterName" id="CostCenterName" class="form-control">
<input type="hidden" name="id" id="id" class="form-control">
</div>
</div>
</div>
</form>
</div>
<!-- Modal Footer -->
<div class="modal-footer">
<a class="btn btn-cancel" data-dismiss="modal">Cancel</a>
<a class="btn btn-success font tempClick" id="tempClick">
<span class="bold">Submit</span>
</a>
</div>
</div>
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script type="text/javascript">
$(function() {
$.fn.dataTable.moment('DD-MM-YYYY HH:mm A');
$('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
// "columnDefs" : [{"targets":3, "type":"date-eu"}],
"aaSorting": [
[3, "desc"]
],
"info": true,
"autoWidth": true
});
});
</script>
<script>
$(document).ready(function() {
$("#ccwizard").on("shown.bs.modal", function(e) {
var id = $(e.relatedTarget).data('id');
var name = $(e.relatedTarget).data('name');
$('#CostCenterName').val('');
$('#id').val(id);
if (id == 0) {
$('.modal-title').html("Add CostCenter");
} else {
$('.modal-title').html("Edit CostCenter");
$('#CostCenterName').val(name);
}
});
$('#tempClick').click(function() {
if ($('#CostCenterName').val() === '') {
alert('Please Enter the Cost Center Name');
return;
}
var formData = {
id: $('#id').val(),
CostCenterName: $('#CostCenterName').val()
};
$.ajax({
type: 'POST',
url: "<?php echo base_url();?>fetchCostCenterDetails",
data: formData,
dataType: 'json',
success: function(response) {
if (response.status) {
alert(response.message);
$('#ccwizard').modal('hide');
location.reload();
} else {
alert(response.message);
}
},
error: function(xhr, status, error) {
alert('An error occurred: ' + error);
}
});
});
});
</script>
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> -->

View File

@ -477,7 +477,7 @@
</div>
</div>
<div class="col-md-3">
<label>Supplier</label>
<label>Select Supplier</label>
<?php
if (!empty($Suplist)) {
foreach ($Suplist as $SID) :
@ -488,7 +488,7 @@
?>
</div>
<div class="col-md-3">
<label>Address</label>
<label>Supplier Address</label>
<div class="form-group">
<?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40');
@ -630,7 +630,7 @@
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>PO Date</label>
<label>Purchase Order Date</label>
<div class="form-group">
<?php
$data = array('name' => 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
@ -684,7 +684,7 @@
</div>
</div>
<div class="col-md-3">
<label>Capital Type Options</label>
<label>Capital Type Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
if (!empty($PoTypeOptions)) {
@ -737,7 +737,7 @@
</div>
<div class="col-md-3" id="otheroptiondiv" style="display:none;">
<label>Description of Payable Terms<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
<label>Description of Payable Terms<span class="badge">*</span></label>
<div class="form-group">
<?php
@ -751,7 +751,7 @@
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Insurance Options</label>
<label>Insurance Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
if (!empty($insuranceStatus)) {
@ -776,7 +776,7 @@
</div>
<div class="col-md-3" id="insuranceTxtDiv" style="display:block;">
<label>Insurance No / Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
<label>Insurance No / Insurance Details<span class="badge">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
@ -785,7 +785,7 @@
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<select id='BudgetType' name='BudgetType'>
<?php if ($BudgetType == 'CAPITAL') {
$opt1 = 'CAPITAL';
@ -2243,7 +2243,7 @@
<td align="left"><%=TotalValue%></td>
<td>
<a data-target='#EDITCAPITAL' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#EDITREVENUE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=ReqNo%> Requisition details"></i>&nbsp;&nbsp;&nbsp;</a> <a href='#' onclick="DeleteRow(<%=index%>)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del"><span class="glyphicon glyphicon-trash"></span></a>
<a data-target='#EDITCAPITAL' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#EDITREVENUE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=ReqNo%> Requisition details"></i>&nbsp;&nbsp;&nbsp;</a> <a href='#' onclick="DeleteRow('<%=index%>')" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del"><span class="glyphicon glyphicon-trash"></span></a>
</td>

File diff suppressed because it is too large Load Diff

View File

@ -576,7 +576,7 @@ if (!empty($RequistionDetails)) {
</div>
</div>
<div class="col-md-3">
<label for="payablefrom">Import Options</label>
<label for="payablefrom">Import Type Options<span class="badge mandatory">*</span></label>
<?php
//$options1 = array("0"=>'Select Import Option');
@ -602,7 +602,7 @@ if (!empty($RequistionDetails)) {
</div>
<div class="col-md-3">
<label for="payablefrom">Payable Terms</label>
<label for="payablefrom">Payable Terms<span class="badge mandatory">*</span></label>
<input type="hidden" name="beforePaymentTerms" value="<?php echo $Terms; ?>">
@ -651,7 +651,7 @@ if (!empty($RequistionDetails)) {
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label for="payablefrom">Insurance</label>
<label for="payablefrom">Insurance<span class="badge mandatory">*</span></label>
@ -695,7 +695,7 @@ if (!empty($RequistionDetails)) {
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<select id='BudgetType' name='BudgetType'>
<?php if ($BudgetType == 'CAPITAL') {
$opt1 = 'CAPITAL';

View File

@ -41,17 +41,16 @@ if(!empty($EmpList))
<div class="content-wrapper" style="min-height: 537px;">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center> Edit User </center>
</h1>
</section>
<h1>
<center>Edit User <?= ' - '.$EmpId; ?> Details</center>
</h1>
<ol class="breadcrumb">
<a class="btn btn-cancel" href="<?php echo base_url(); ?>userListing">&nbsp;&nbsp;<span class="bold">Back</span></a>
</ol>
</section><br>
<section class="content">
<div style="text-align:right;">
<a href="<?php echo base_url() ?>userListing" class="btn btn-success" value="Back">Back</a>
</div>
<br/>
<div class="row">
<!-- left column -->
@ -239,9 +238,8 @@ if(!empty($EmpList))
<input type="hidden" name="txtEmpid" id="txtEmpid" value="<?php echo $EmpId?>" />
<input type="reset" class="btn btn-cancel" value="Cancel" />
<input type="submit" class="btn btn-success" value="Submit" />
<input type="reset" class="btn btn-success" value="Cancel" />
</div>
</form>
</div>

View File

@ -104,16 +104,22 @@ if ($total <= $reorder) {
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center> Edit Material -<?php echo $MaterialCode; ?> </center>
<center> </center>
</h1>
</section>
<section class="content-header">
<h1>
<center> Edit Material - <?php echo $MaterialCode; ?> Details</center>
</h1>
<ol class="breadcrumb">
<a class="btn btn-cancel" href="<?php echo base_url(); ?>rawmaterialListing">&nbsp;&nbsp;<span class="bold">Back</span></a>
</ol>
</section> <br />
<section class="content">
<div style="text-align:right;margin-right:17px">
<a href="<?php echo base_url() ?>rawmaterialListing" class="btn btn-cancel" value="Back" />Back</a>
</div>
<br />
<!-- <div class="row"> -->
<!-- left column -->
<div class="col-md-12">
@ -142,12 +148,30 @@ if ($total <= $reorder) {
</div>
</div>
<div class="col-md-2">
<!-- <div class="col-md-2">
<div class="form-group">
<label for="MaterialType">Material Type</label>
<input type="text" class="form-control" readonly id="MaterialType" name="MaterialType" value="<?php echo $MaterialType; ?>">
</div>
</div> -->
<div class="col-md-2">
<div class="form-group">
<label for="MaterialType">Material Type</label>
<font color="Red">*</font>
<select class="form-control select2" required id="MaterialType" name="MaterialType">
<?php
if (!empty($material)) {
foreach ($material as $SID) {
?>
<option value="<?= $SID->ConfigValue ?>" <?php if (($MaterialType === $SID->ConfigValue)) echo "selected"; ?>>
<?php echo $SID->ConfigValue ?></option>
<?php
}
}
?>
</select>
</div>
</div>
<div class="col-md-3">
@ -310,6 +334,7 @@ if ($total <= $reorder) {
$("#UOM").select2();
$("#MaterialType").select2();
/** ---- auto search code -------- */
$('#MaterialCategory').autocomplete({
@ -318,7 +343,7 @@ if ($total <= $reorder) {
$('#MaterialCategory').autocomplete("option", "minLength", 0);
},
serviceUrl: "<?php echo base_url(); ?>rawmaterialdetails/autocomplete",
serviceUrl: "<?php echo base_url(); ?>rawmaterialdetailsautocomplete",
onSelect: function(suggestion) {
var data = suggestion.ConfigValue;

View File

@ -900,6 +900,10 @@ if (!empty($INRSYMBOL)) {
text-align: right;
}
.btn-container .btn {
margin-left: 10px;
}
.header-container {
display: flex;
justify-content: space-between;
@ -1114,7 +1118,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label>Revenue Type Options</label>
<label>Revenue Type Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -1141,7 +1145,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="col-md-3">
<label for="payablefrom">Payable Terms</label>
<label for="payablefrom">Payable Terms<span class="badge mandatory">*</span></label>
<input type="hidden" name="beforePaymentTerms" value="<?php echo $Terms; ?>">
@ -1193,7 +1197,7 @@ if (!empty($INRSYMBOL)) {
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label for="insurance">Insurance</label>
<label for="insurance">Insurance<span class="badge mandatory">*</span></label>
<?php
$optionsnew = array('1' => 'Yes', '0' => 'No');
echo form_dropdown('insurancestatus', $optionsnew, set_value('insurancestatus'), 'id="insurancestatus"', 'required="true"', 'class="form-control select2', 'readonly ="true"');
@ -1209,7 +1213,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<select id='BudgetType' name='BudgetType'>
<?php if ($BudgetType == 'CAPITAL') {
$opt1 = 'CAPITAL';
@ -1514,263 +1518,260 @@ if (!empty($INRSYMBOL)) {
</div>
</div><br />
<div class="col-md-12">
<div class="row">
<div class="col-md-12">
<div class="col-md-4">
<label>Discount Type </label>
<div>
<?php
$options = array("0" => 'Select Discount Type');
//print_r( $options);
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Discount Type </label>
<div>
<?php
$options = array("0" => 'Select Discount Type');
//print_r( $options);
if (!empty($TaxType)) {
foreach ($TaxType as $SID) :
if (!empty($TaxType)) {
foreach ($TaxType as $SID) :
$options[$SID->ConfigValue] = $SID->ConfigValue;
$options[$SID->ConfigValue] = $SID->ConfigValue;
endforeach;
}
endforeach;
}
echo form_dropdown('EditDiscountType', $options, set_value('EditDiscountType'), 'id="EditDiscountType"', 'class="form-control"');
?>
</div>
</div>
<div class="col-md-2">
<label>Discount Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditDiscount', 'value' => set_value('txtEditDiscount'), 'id' => 'txtEditDiscount', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateDiscount();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Discounted Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterDiscount', 'value' => set_value('txtEditAfterDiscount'), 'id' => 'txtEditAfterDiscount', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div id="SGSTModel">
<div class="col-md-2">
<label>SGST in %</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditVat', 'value' => set_value('txtEditVat'), 'id' => 'txtEditVat', 'class' => 'form-control num', 'onchange' => 'calculateVat();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterVat', 'value' => set_value('txtEditAfterVat'), 'id' => 'txtEditAfterVat', 'class' => 'form-control num', 'readonly' => 'true', 'onkeypress' => 'return isNumberKey(event);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div id="IGSTModel" style="display:none;">
<div class="col-md-2">
<label>IGST in %</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditOtherTax', 'value' => set_value('txtEditOtherTax'), 'id' => 'txtEditOtherTax', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateOtherTaxes(1);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterOtherTax', 'value' => set_value('txtEditAfterOtherTax'), 'id' => 'txtEditAfterOtherTax', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" style="text-align:left;">
<div class="col-md-4">
<label>Packaging Type </label>
<div>
<?php
$options = array("0" => 'Select Packaging Type');
//print_r( $options);
if (!empty($TaxType)) {
foreach ($TaxType as $SID) :
$options[$SID->ConfigValue] = $SID->ConfigValue;
endforeach;
}
echo form_dropdown('EditPackagingType', $options, set_value('EditPackagingType'), 'id="EditPackagingType"', 'class="form-control "');
?>
</div>
</div>
<div class="col-md-2">
<label>Packaging Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditPackaging', 'value' => set_value('txtEditPackaging'), 'id' => 'txtEditPackaging', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculatePackaging();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Packaging Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterPackaging', 'value' => set_value('txtEditAfterPackaging'), 'id' => 'txtEditAfterPackaging', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div id="CGSTArea">
<div class="col-md-2">
<label>CGST in %</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditGST', 'value' => set_value('txtEditGST'), 'id' => 'txtEditGST', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' calculateGST(1);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterGST', 'value' => set_value('txtEditAfterGST'), 'id' => 'txtEditAfterGST', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
echo form_dropdown('EditDiscountType', $options, set_value('EditDiscountType'), 'id="EditDiscountType"', 'class="form-control"');
?>
</div>
</div>
<div class="row">
<div class="col-md-12 ">
<div class="col-md-2">
<label>Freight Type </label>
<div>
<?php
$options = array("0" => 'Select Freight Type');
//print_r( $options);
if (!empty($FreightType)) {
foreach ($FreightType as $SID) :
$options[$SID->ConfigValue] = $SID->ConfigValue;
endforeach;
}
echo form_dropdown('drpEditFreight', $options, set_value('drpEditFreight'), 'id="drpEditFreight"', 'class="form-control "');
?>
</div>
</div>
<div class="col-md-2" id="EditTripsValue" style="display:none;">
<label>NO Of Trips</label>
<div class="form-group">
<?php
$data = array('name' => 'EditNOOfTrips', 'value' => set_value('EditNOOfTrips'), 'id' => 'EditNOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Freight Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditFreight', 'value' => set_value('txtEditFreight'), 'id' => 'txtEditFreight', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateFreight();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Freight Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterFreight', 'value' => set_value('txtEditAfterFreight'), 'id' => 'txtEditAfterFreight', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<label> Insurance Amt <?php echo "($INRSYM)" ?>(if Any)</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditInsurance', 'value' => set_value('txtEditInsurance'), 'id' => 'txtEditInsurance', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateEditTotalValue(1);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Discount Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditDiscount', 'value' => set_value('txtEditDiscount'), 'id' => 'txtEditDiscount', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateDiscount();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-4 col-md-offset-8">
<label>Total Order Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditTotalOrderValue', 'value' => set_value('txtEditTotalOrderValue'), 'id' => 'txtEditTotalOrderValue', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<label><?php echo "Revenue Description"; ?></label>
<div class="form-group">
<?php
$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);;
?>
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-12">
<div class="col-md-3 col-md-offset-9">
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
<a class="btn btn-success EditRevenue" ID="EditRevenue">&nbsp;&nbsp;<span class="bold">Edit Revenue</span></a>
</div>
<div class="col-md-2">
<label>Discounted Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterDiscount', 'value' => set_value('txtEditAfterDiscount'), 'id' => 'txtEditAfterDiscount', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<br /><br />
<!-- footer for revenue po -->
<div class="modal-footer">
<div class="col-md-12 ">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Freight Type </label>
<div>
<?php
$options = array("0" => 'Select Freight Type');
//print_r( $options);
if (!empty($FreightType)) {
foreach ($FreightType as $SID) :
$options[$SID->ConfigValue] = $SID->ConfigValue;
endforeach;
}
echo form_dropdown('drpEditFreight', $options, set_value('drpEditFreight'), 'id="drpEditFreight"', 'class="form-control "');
?>
</div>
</div>
<div class="col-md-2" id="EditTripsValue" style="display:none;">
<label>NO Of Trips</label>
<div class="form-group">
<?php
$data = array('name' => 'EditNOOfTrips', 'value' => set_value('EditNOOfTrips'), 'id' => 'EditNOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Freight Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditFreight', 'value' => set_value('txtEditFreight'), 'id' => 'txtEditFreight', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateFreight();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Freight Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterFreight', 'value' => set_value('txtEditAfterFreight'), 'id' => 'txtEditAfterFreight', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Packaging Type </label>
<div>
<?php
$options = array("0" => 'Select Packaging Type');
//print_r( $options);
if (!empty($TaxType)) {
foreach ($TaxType as $SID) :
$options[$SID->ConfigValue] = $SID->ConfigValue;
endforeach;
}
echo form_dropdown('EditPackagingType', $options, set_value('EditPackagingType'), 'id="EditPackagingType"', 'class="form-control "');
?>
</div>
</div>
<div class="col-md-2">
<label>Packaging Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditPackaging', 'value' => set_value('txtEditPackaging'), 'id' => 'txtEditPackaging', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculatePackaging();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Packaging Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterPackaging', 'value' => set_value('txtEditAfterPackaging'), 'id' => 'txtEditAfterPackaging', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" id="CGSTArea">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>CGST in %</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditGST', 'value' => set_value('txtEditGST'), 'id' => 'txtEditGST', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' calculateGST(1);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterGST', 'value' => set_value('txtEditAfterGST'), 'id' => 'txtEditAfterGST', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" id="SGSTModel">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>SGST in %</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditVat', 'value' => set_value('txtEditVat'), 'id' => 'txtEditVat', 'class' => 'form-control num', 'onchange' => 'calculateVat();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterVat', 'value' => set_value('txtEditAfterVat'), 'id' => 'txtEditAfterVat', 'class' => 'form-control num', 'readonly' => 'true', 'onkeypress' => 'return isNumberKey(event);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" id="IGSTModel" style="display:none;">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>IGST in %</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditOtherTax', 'value' => set_value('txtEditOtherTax'), 'id' => 'txtEditOtherTax', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateOtherTaxes(1);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterOtherTax', 'value' => set_value('txtEditAfterOtherTax'), 'id' => 'txtEditAfterOtherTax', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-4">
<label> Insurance Amt <?php echo "($INRSYM)" ?>(if Any)</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditInsurance', 'value' => set_value('txtEditInsurance'), 'id' => 'txtEditInsurance', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateEditTotalValue(1);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-4 col-md-offset-8">
<label>Total Order Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditTotalOrderValue', 'value' => set_value('txtEditTotalOrderValue'), 'id' => 'txtEditTotalOrderValue', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<label><?php echo "Revenue Description"; ?></label>
<div class="form-group">
<?php
$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);;
?>
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-12">
<div class="col-md-3 col-md-offset-9">
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
<a class="btn btn-success EditRevenue" ID="EditRevenue">&nbsp;&nbsp;<span class="bold">Edit Revenue</span></a>
</div>
</div>
</div>
</div>
<br /><br />
<!-- footer for revenue po -->
<div class="modal-footer">
</div>
</form>
</div>
</div>
@ -1904,7 +1905,7 @@ if (!empty($INRSYMBOL)) {
</div>
<!-- /.box-body -->
<br>
<div class="row" style="border:1px solid;">
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Basic Amount <?php echo "($INRSYM)" ?> </label>
@ -2012,19 +2013,20 @@ if (!empty($INRSYMBOL)) {
<?php } ?>
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br>
</div>
<input type="button" class="btn btn-cancel" value="Cancel" onClick="window.location ='amendmentpurchaseorder';">
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $RowCount; ?>" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<div class="btn-container" style="text-align: right;">
<input type="button" class="btn btn-cancel" value="Cancel" onClick="window.location ='amendmentpurchaseorder';">
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $RowCount; ?>" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<!-- <a class="btn btn-success Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> -->
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
<!-- <input type="reset" class="btn btn-success" value = "OK"> -->
<!-- <a class="btn btn-success Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> -->
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
<!-- <input type="reset" class="btn btn-success" value = "OK"> -->
</div>
</div>
@ -2038,12 +2040,28 @@ if (!empty($INRSYMBOL)) {
</div>
<?php $Reqon = new DateTime($Reqon, new DateTimeZone('Asia/Kolkata'));
$Reqon = $Reqon->format('d-m-Y'); ?>
<label>Request On :</label><?php echo $Reqon; ?><br />
<label>Request On :</label><?php echo $Reqon; ?><br>
<?php if ($RequesterName != '' || $RequesterName != null) { ?>
<label>Request By : </label><?php echo $RequesterName; ?><br />
<label>Request By : </label><?php echo $RequesterName; ?>
<?php } ?><br />
<label>Status :</label><?php echo $POStatus; ?>
<label>Status : </label><?php
$statusMappings = [
'PO APPROVED' => 'AWAITING APPROVE',
'AWAITING RELEASE' => 'AWAITING APPROVE',
'RELEASER ONHOLD' => 'APPROVER ONHOLD',
'PO RELEASED' => 'PO APPROVED',
];
if (isset($POStatus) && !empty($POStatus)) {
if (isset($statusMappings[$POStatus])) {
echo $statusMappings[$POStatus];
} else {
echo $POStatus;
}
} else {
echo "Status not provided";
}
?>
</div>
</div>
</section>
@ -2063,7 +2081,7 @@ if (!empty($INRSYMBOL)) {
<td align="left"><%=TotalValue%></td>
<td>
<a data-target='#EDITREVENUE' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#EDITREVENUE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=ReqNo%> Requisition details"></i>&nbsp;&nbsp;&nbsp;</a> <a href='#' onclick="DeleteRow(<%=index%>)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del"><span class="glyphicon glyphicon-trash"></span></a>
<a data-target='#EDITREVENUE' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#EDITREVENUE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=ReqNo%> Requisition details"></i>&nbsp;&nbsp;&nbsp;</a> <a href='#' onclick="DeleteRow('<%=index%>')" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del"><span class="glyphicon glyphicon-trash"></span></a>
</td>
@ -2567,8 +2585,8 @@ if (!empty($INRSYMBOL)) {
$('#Scheduleby').val('');
}); < !--script
for table, It works uned the datatable plugin-- >
});
// < !--script for table, It works uned the datatable plugin-- >
$(function() {
$('#revenueTax').DataTable({

View File

@ -2059,7 +2059,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-3">
<label>Revenue Type Options</label>
<label>Revenue Type Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -2090,7 +2090,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-3">
<label>Payment Terms</label>
<label>Payment Terms<span class="badge mandatory">*</span></label>
<?php
@ -2125,7 +2125,7 @@ if (!empty($getlogpodtl)) {
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label for="insurance">Insurance Options</label>
<label for="insurance">Insurance Options<span class="badge mandatory">*</span></label>
<?php
$optionsnew = array('1' => 'Yes', '0' => 'No');
echo form_dropdown('insurancestatus', $optionsnew, set_value('insurancestatus'), 'id="insurancestatus"', 'required="true"', 'class="form-control select2');
@ -2141,7 +2141,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<select id='BudgetType' name='BudgetType'>
<?php if ($BudgetType == 'CAPITAL') {
$opt1 = 'CAPITAL';
@ -2407,6 +2407,7 @@ if (!empty($getlogpodtl)) {
<div class="col-md-12" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Discount Type </label>
<div>
@ -2440,29 +2441,9 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
<div class="col-md-2">
<label>CGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'Cgst', 'value' => set_value('Cgst', 0), 'id' => 'Cgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();RevenueChangeSgst();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'AfterCgst', 'value' => set_value('AfterCgst', 0), 'id' => 'AfterCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Packaging Type </label>
<div>
@ -2496,50 +2477,10 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
<div id="SGSTAddModel">
<div class="col-md-2">
<label>SGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'Sgst', 'value' => set_value('Sgst', 0), 'id' => 'Sgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'AfterSgst', 'value' => set_value('AfterSgst', 0), 'id' => 'AfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div id="IGSTAddModel" style="display:none;">
<div class="col-md-2">
<label>IGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'Igst', 'value' => set_value('Igst', 0), 'id' => 'Igst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'AfterIgst', 'value' => set_value('AfterIgst', 0), 'id' => 'AfterIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-2">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Freight Type </label>
<div>
<?php
@ -2572,7 +2513,6 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
<div class="col-md-2">
<label>Freight Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
@ -2582,6 +2522,79 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>CGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'Cgst', 'value' => set_value('Cgst', 0), 'id' => 'Cgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();RevenueChangeSgst();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'AfterCgst', 'value' => set_value('AfterCgst', 0), 'id' => 'AfterCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div id="SGSTAddModel">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>SGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'Sgst', 'value' => set_value('Sgst', 0), 'id' => 'Sgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'AfterSgst', 'value' => set_value('AfterSgst', 0), 'id' => 'AfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div id="IGSTAddModel" style="display:none;">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>IGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'Igst', 'value' => set_value('Igst', 0), 'id' => 'Igst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'AfterIgst', 'value' => set_value('AfterIgst', 0), 'id' => 'AfterIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-4">
<label> Insurance <?php echo "($INRSYM)" ?> (if Any)</label>
<div class="form-group">
@ -2591,10 +2604,10 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-4 ">
<label><?php echo "Total Order Amt ($INRSYM)"; ?></label>
@ -2766,6 +2779,7 @@ if (!empty($getlogpodtl)) {
</div><br />
<div class="col-md-12">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Discount Type </label>
<div>
@ -2803,29 +2817,9 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
<div class="col-md-2">
<label>CGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditCgst', 'value' => set_value('EditCgst', 0), 'id' => 'EditCgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange();RevenueChangeEditSgst();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterCgst', 'value' => set_value('EditAfterCgst', 0), 'id' => 'EditAfterCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Packaging Type </label>
<div>
@ -2863,49 +2857,10 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
<div id="SGSTEditModel">
<div class="col-md-2">
<label>SGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditSgst', 'value' => set_value('EditSgst', 0), 'id' => 'EditSgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterSgst', 'value' => set_value('EditAfterSgst', 0), 'id' => 'EditAfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div id="IGSTEditModel" style="display:none;">
<div class="col-md-2">
<label>IGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditIgst', 'value' => set_value('EditIgst', 0), 'id' => 'EditIgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterIgst', 'value' => set_value('EditAfterIgst', 0), 'id' => 'EditAfterIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-2">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Freight Type </label>
<div>
<?php
@ -2951,8 +2906,73 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
</div>
<div class="col-md-12" id="SGSTEditModel">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>SGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditSgst', 'value' => set_value('EditSgst', 0), 'id' => 'EditSgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterSgst', 'value' => set_value('EditAfterSgst', 0), 'id' => 'EditAfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" id="IGSTEditModel" style="display:none;">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>IGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditIgst', 'value' => set_value('EditIgst', 0), 'id' => 'EditIgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterIgst', 'value' => set_value('EditAfterIgst', 0), 'id' => 'EditAfterIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>CGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditCgst', 'value' => set_value('EditCgst', 0), 'id' => 'EditCgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange();RevenueChangeEditSgst();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterCgst', 'value' => set_value('EditAfterCgst', 0), 'id' => 'EditAfterCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-4">
<label> Insurance Amt <?php echo "($INRSYM)" ?> (if Any)</label>
<div class="form-group">
@ -2968,6 +2988,7 @@ if (!empty($getlogpodtl)) {
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-4">
<label><?php echo "Total Order Amt ($INRSYM)"; ?></label>
<div class="form-group">
@ -3269,9 +3290,8 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div id="SGSTViewModel">
<div class="col-md-12" id="SGSTViewModel">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>SGST In %</label>
<div class="form-group">
@ -3290,8 +3310,9 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
</div>
<div id="IGSTViewModel" style="display:none;">
</div>
<div class="col-md-12" id="IGSTViewModel" style="display:none;">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>IGST In %</label>
<div class="form-group">
@ -3310,7 +3331,6 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
</div>
</div>
<div class="col-md-12">
@ -3482,7 +3502,7 @@ if (!empty($getlogpodtl)) {
<!-- /.box-body -->
<div class="row" style="border:1px solid;">
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Basic Amount <?php echo "($INRSYM)" ?></label>
@ -3899,6 +3919,7 @@ if (!empty($getlogpodtl)) {
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<input type="hidden" name="txttaxcheck" id="txttaxcheck" value="" />
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
<div class="btn-container" style="text-align: right;">
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED) { ?>
<a class="btn btn-cancel Save" ID="Cancel" href="<?php echo base_url() . 'purchaseorderListing'; ?>">&nbsp;&nbsp;<span class="bold">Cancel</span></a>
<?php if ($PONOStatus == PO_DRAFT) { ?>
@ -3911,37 +3932,42 @@ if (!empty($getlogpodtl)) {
<?php } else { ?>
<a class="btn btn-success" ID="OK" href="<?php echo base_url() . 'purchaseorderListing'; ?>">&nbsp;&nbsp;<span class="bold">OK</span></a>
<?php } ?>
</div>
</div><br />
</div>
<label>Request On : </label><?php echo $Reqon; ?><br />
<?php if ($RequesterName != '' || $RequesterName != null) { ?>
<label>Request By : </label><?php echo $RequesterName; ?><br />
<?php
} ?>
<label>Status : </label><?php echo $StatusName; ?>
<div class="row">
<div class="col-md-12">
<div class="col-md-6">
<!-- <label>Status : </label><?php
$statusMappings = [
'PO APPROVED' => 'AWAITING APPROVE',
'AWAITING RELEASE' => 'AWAITING APPROVE',
'RELEASER ONHOLD' => 'APPROVER ONHOLD',
'PO RELEASED' => 'PO APPROVED',
];
<label>Request On : </label><?php echo $Reqon; ?><br />
<?php if ($RequesterName != '' || $RequesterName != null) { ?>
<label>Request By : </label><?php echo $RequesterName; ?><br />
<?php } ?>
<label>Status : </label><?php
$statusMappings = [
'PO APPROVED' => 'AWAITING APPROVE',
'AWAITING RELEASE' => 'AWAITING APPROVE',
'RELEASER ONHOLD' => 'APPROVER ONHOLD',
'PO RELEASED' => 'PO APPROVED',
];
if (isset($StatusName) && !empty($StatusName)) {
if (isset($statusMappings[$StatusName])) {
echo $statusMappings[$StatusName];
if (isset($StatusName) && !empty($StatusName)) {
if (isset($statusMappings[$StatusName])) {
echo $statusMappings[$StatusName];
} else {
echo $StatusName;
}
} else {
echo $StatusName;
echo "Status not provided";
}
} else {
echo "Status not provided";
}
?> -->
?>
</div>
</div>
</div>
</div>
</div>

View File

@ -723,7 +723,7 @@ foreach ($PaymentTerms as $TER) {
</div>
</div>
<div class="col-md-3">
<label>Supplier<span class="badge mandatory">*</span></label>
<label>Select Supplier<span class="badge mandatory">*</span></label>
<?php
$options = array("0" => 'Select Supplier');
//print_r( $options);
@ -740,7 +740,7 @@ foreach ($PaymentTerms as $TER) {
</div>
<div class="col-md-3">
<label>Address</label>
<label>Supplier Address</label>
<div class="form-group">
<?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40');
@ -869,7 +869,7 @@ foreach ($PaymentTerms as $TER) {
</div>
</div>
<div class="col-md-3">
<label>Service Type Options</label>
<label>Service Type Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -895,7 +895,7 @@ foreach ($PaymentTerms as $TER) {
</div>
</div>
<div class="col-md-3">
<label>Payment Terms</label>
<label>Payment Terms<span class="badge mandatory">*</span></label>
<input type="hidden" name="beforePaymentTerms" value="<?php echo $Terms ?>">
<?php
if (!empty($Payment)) {
@ -936,7 +936,7 @@ foreach ($PaymentTerms as $TER) {
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Insurance Options</label>
<label>Insurance Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -976,8 +976,8 @@ foreach ($PaymentTerms as $TER) {
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<select id='BudgetType' name='BudgetType'>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<select id='BudgetType' name='BudgetType' required="true">
<?php if ($BudgetType == 'CAPITAL') {
$opt1 = 'CAPITAL';
$opt2 = 'REVENUE';
@ -1273,8 +1273,8 @@ foreach ($PaymentTerms as $TER) {
<div class="modal-footer">
<div class="col-md-12">
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
<a class="btn btn-success font EditService" ID="Edit">&nbsp;&nbsp;<span class="bold">Update Service</span></a>
<a class="btn btn-success" data-dismiss="modal" value="Cancel">Cancel</a>
</div>
</div>
</div>
@ -1445,7 +1445,7 @@ foreach ($PaymentTerms as $TER) {
</div>
<div class="row" style="border: 1px solid">
<div class="row">
<div class="col-md-12" style="padding:0px;">
<div class="col-md-2">
@ -1531,10 +1531,10 @@ foreach ($PaymentTerms as $TER) {
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="button" class="btn btn-cancel" value="Cancel" onClick="window.location ='amendmentpurchaseorder';">
<!-- <a class="btn btn-success Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> -->
<a class="btn btn-success Save" ID="Submit" onclick="Save()">&nbsp;&nbsp;<span class="bold">Submit</span></a>
<input type="button" class="btn btn-success" value="Cancel" onClick="window.location ='amendmentpurchaseorder';">
</div><br />

View File

@ -103,13 +103,14 @@ if(!empty($assetList))
?>
<div class="content-wrapper" style="min-height: 537px;">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<!-- <center>Resico Industries - Edit Asset Details-<?php echo $AssetCode ; ?></center> -->
<center><b><h3 class="box-title"><?= 'Edit Asset - ' .$AssetCode; ?></h3></b></center>
</h1>
</section>
<section class="content-header">
<h1>
<center><?= 'Edit Asset - ' .$AssetCode; ?> Details</center>
</h1>
<ol class="breadcrumb">
<a class="btn btn-cancel" href="<?php echo base_url(); ?>assetListing">&nbsp;&nbsp;<span class="bold">Back</span></a>
</ol>
</section><br>
<section class="content">
<div style="text-align:right;">
<a href="<?php echo base_url()?>assetListing" class="btn btn-cancel"value="Back">Back</a>

View File

@ -22,14 +22,16 @@ if (!empty($master)) {
<div class="content-wrapper" style="min-height: 537px;">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1><center> Edit Config Details</center></h1>
</section>
<h1>
<center>Edit Config <?= ' - '.$ConfigName; ?> Details</center>
</h1>
<ol class="breadcrumb">
<a class="btn btn-cancel" href="<?php echo base_url(); ?>configlisting">&nbsp;&nbsp;<span class="bold">Back</span></a>
</ol>
</section><br>
<section class="content">
<div style="text-align:right;">
<a href="<?php echo base_url() ?>configlisting" class="btn btn-cancel" value="Back">Back</a>
</div>
<br>
<div class="row">
<!-- left column -->

View File

@ -93,18 +93,16 @@ if(!empty($department))
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center> <?php echo $DepartmentName; ?> Department Details</center>
</h1>
</section>
<h1>
<center> Edit Department - <?php echo $DepartmentName; ?> Details</center>
</h1>
<ol class="breadcrumb">
<a class="btn btn-cancel" href="<?php echo base_url(); ?>departmentListing">&nbsp;&nbsp;<span class="bold">Back</span></a>
</ol>
</section><br/>
<section class="content">
<div style="text-align:right;">
<a href="<?php echo base_url() ?>departmentListing" class="btn btn-cancel" value="Back"/>Back</a>
</div>
<br/>
<div class="row">
<!-- left column -->
<div class="col-md-12">

View File

@ -431,7 +431,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-3">
<label>Supplier<span class="badge mandatory">*</span></label>
<label>Select Supplier<span class="badge mandatory">*</span></label>
<?php
$options = array("0" => 'Select Supplier');
@ -451,7 +451,7 @@ if (!empty($getlogpodtl)) {
</div>
<div class="col-md-3">
<label>Address</label>
<label>Supplier Address</label>
<div class="form-group">
<?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40');
@ -624,7 +624,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-3">
<label for="payablefrom">Import Options</label>
<label for="payablefrom">Import Type Options<span class="badge mandatory">*</span></label>
<?php // $options2 = array("0"=>'Select Import Option');
if (!empty($PoTypeOptions)) {
foreach ($PoTypeOptions as $payment) :
@ -646,7 +646,7 @@ if (!empty($getlogpodtl)) {
echo form_dropdown('Importoption', $options2, set_value('Importoption'), 'id="Importoption"', 'class="form-control"'); ?>
</div>
<div class="col-md-3">
<label for="payablefrom">Payable Terms</label>
<label for="payablefrom">Payable Terms<span class="badge mandatory">*</span></label>
<input type="hidden" name="beforePaymentTerms" value="<?php echo $Terms; ?>">
<?php if (!empty($Payment)) {
foreach ($Payment as $pay2)
@ -681,7 +681,7 @@ if (!empty($getlogpodtl)) {
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label for="payablefrom">Insurance Option</label>
<label for="payablefrom">Insurance Option<span class="badge mandatory">*</span></label>
<select id='Insurance' name='Insurance'>
<?php if ($Insurance == 1) {
$opt1 = 'YES';
@ -707,7 +707,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<select id='BudgetType' name='BudgetType'>
<?php if ($BudgetType == 'CAPITAL') {
$opt1 = 'CAPITAL';

View File

@ -1,4 +1,26 @@
<style>
#datatable_filter{
float: inline-end;
}
#datatable_wrapper .row .col-sm-4{
flex-basis: 50%;
float: inline-end;
}
#datatable_paginate .pagination {
flex-basis: 50%;
float: inline-end;
margin:0 0 15px;
}
#datatable_wrapper .row:nth-child(3), #datatable_wrapper .row:nth-child(1){
padding: 0 15px;
}
#datatable_info{
margin-top: 5px;
}
.dataTables_wrapper{
padding-bottom: 0;
}
</style>
<div class="content-wrapper">
<section class="content">
@ -46,8 +68,7 @@
<tr>
<th>Emp ID</th>
<th>Employee Name</th>
<th>Contact Number</th>
<th>Email ID</th>
<th>Contact Number</th>
<th>Designation</th>
<th>Department</th>
<th>Active</th>
@ -62,9 +83,8 @@
?>
<tr>
<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 .' , '. $record->LastName; ?></td>
<td><?php echo $record->ContactNumber ?></td>
<td><?php echo $record->EmailId ?></td>
<td><?php echo $record->FirstName; ?></td>
<td><?php echo $record->ContactNumber ?></td>
<td><?php echo $record->Designation ?></td>
<td><?php echo $record->DepartmentName ?></td>
<td><?php echo ($record->IsActive == 1)? ' Active ' : ' In Active ' ; ?></td>
@ -95,8 +115,10 @@
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": true
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100]
});
});

View File

@ -309,7 +309,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
</div>
</div>
<div class="col-md-3">
<label>Supplier<span class="badge mandatory">*</span></label>
<label>Select Supplier<span class="badge mandatory">*</span></label>
<?php
$options = array("0" => 'Select Supplier');
@ -326,7 +326,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
</div>
<div class="col-md-3">
<label>Address</label>
<label>Supplier Address</label>
<div class="form-group">
<?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40');
@ -491,7 +491,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
</div>
</div>
<div class="col-md-3">
<label for="payablefrom">Import Type Options</label>
<label for="payablefrom">Import Type Options<span class="badge mandatory">*</span></label>
<?php
$options3 = array("0" => 'Select');
@ -509,7 +509,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
</div>
<div class="col-md-3">
<label for="payablefrom">Payable Terms</label>
<label for="payablefrom">Payable Terms<span class="badge mandatory">*</span></label>
<input type="hidden" name="beforePaymentTerms" value="<?php echo $Terms; ?>">
@ -547,7 +547,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
<div class="col-md-12">
<div class="col-md-3">
<label for="payablefrom">Insurance Options</label>
<label for="payablefrom">Insurance Options<span class="badge mandatory">*</span></label>
<?php
$options1 = array("0" => 'NO', "1" => 'YES');
@ -574,7 +574,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<?php

View File

@ -776,9 +776,69 @@
<?php if($DEPCode == ADMIN || $DEPCode == HR) { ?>
<p class="menu-heading"><i class="fa fa-angle-right" aria-hidden="true"></i> HR</p>
<?php } ?>
<li >
<a href="<?php echo base_url(); ?>employeeListing" >
<i class="fa fa-user-circle"></i>
<span class="nav-label">Employee Details</span>
</a>
</li>
<li>
<a href="<?php echo base_url(); ?>attendance">
<i class="fa fa-clock-o "></i>
<span>Attendance</span>
</a>
</li>
<li class="treeview">
<a href="">
<i class="fa fa-thumb-tack"></i>
<span> PaySlip</span>
<span class="pull-right-container">
<span class="fa fa-angle-down pull-right"></span>
</span>
</a>
<ul class="treeview-menu">
<li>
<a href="<?php echo base_url(); ?>monthlypay">
<i class="fa fa-keyboard-o"></i>
<span>Monthly Pay Information</span>
</a>
</li>
<li>
<a href="<?php echo base_url(); ?>ViewPay">
<i class="fa fa-money"></i>
<span>PaySlip Generator</span>
</a>
</li>
<li>
<a href="<?php echo base_url(); ?>PaysilpListing" >
<i class="fa fa-credit-card-alt"></i> <span>Edit Payslip</span>
</a>
</li>
<li>
<a href="<?php echo base_url(); ?>emppayListings" >
<i class="fa fa-credit-card"></i> <span>Employee Salary Details</span>
</a>
</li>
<li>
<a href="<?php echo base_url(); ?>publicholidays" >
<i class="fa fa-calendar"></i> <span>Public Holidays</span>
</a>
</li>
<li>
<a href="<?php echo base_url(); ?>leavereports" >
<i class="fa fa-list-alt"></i> <span>Leave Reports</span>
</a>
</li>
</ul>
</li>
@ -861,11 +921,11 @@
</span>
</a>
<ul class="treeview-menu">
<!-- <li class="treeview">
<a href="<?php echo base_url(); ?>Stock">
<i class="fa fa-dashboard"></i> <span>Stock </span>
</a>
</li> -->
<li class="treeview">
<a href="<?php echo base_url(); ?>Stock">
<i class="fa fa-dashboard"></i> <span>Stock </span>
</a>
</li>
<li>
<a href="<?php echo base_url(); ?>FinalProduct">
<i class="fa fa-dashboard"></i> <span>Finished Product Batch Card</span>
@ -1211,12 +1271,7 @@
<span class="nav-label">Asset Details</span>
</a></li>
<?php } ?>
<?php if ($DEPCode == HR) { ?>
<li><a href="<?php echo base_url(); ?>employeeListing" >
<i class="fa fa-user-circle"></i>
<span class="nav-label">Employee Details</span>
</a></li>
<?php } ?>
<?php if ($DEPCode == SALES || $DEPCode == ADMIN) { ?>
<li><a href="<?php echo base_url(); ?>supplierlisting" >

View File

@ -0,0 +1,42 @@
<!-- ============================================================== -->
<!-- End Page content -->
<!-- ============================================================== -->
</div>
<!-- END wrapper -->
<!-- Right bar overlay-->
<div class="rightbar-overlay"></div>
<!-- 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>
<!-- 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>
</body>
</html>

View File

@ -0,0 +1,870 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>RI</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" />
<meta content="Coderthemes" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="<?php echo base_url(); ?>public/new_assets/images/favicon.ico">
<!-- 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-responsive-bs4/css/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" />
<link href="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" />
<link href="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-select-bs4/css//select.bootstrap4.min.css" rel="stylesheet" type="text/css" />
<!-- third party css end -->
<!-- App css -->
<link href="<?php echo base_url(); ?>public/new_assets/css/bootstrap-creative.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" />
<link href="<?php echo base_url(); ?>public/new_assets/css/app-creative.min.css" rel="stylesheet" type="text/css" id="app-default-stylesheet" />
<link href="<?php echo base_url(); ?>public/new_assets/css/bootstrap-creative-dark.min.css" rel="stylesheet" type="text/css" id="bs-dark-stylesheet" />
<link href="<?php echo base_url(); ?>public/new_assets/css/app-creative-dark.min.css" rel="stylesheet" type="text/css" id="app-dark-stylesheet" />
<!-- icons -->
<link href="<?php echo base_url(); ?>public/new_assets/css/icons.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>
</head>
<body class="loading" data-layout-mode="horizontal" data-layout='{"mode": "light", "width": "fluid", "menuPosition": "fixed", "topbar": {"color": "dark"}, "showRightSidebarOnPageLoad": true}'>
<!-- Begin page -->
<div id="wrapper">
<!-- Topbar Start -->
<div class="navbar-custom">
<div class="container-fluid">
<ul class="list-unstyled topnav-menu float-right mb-0">
<li class="d-none d-lg-block">
<form class="app-search">
<div class="app-search-box dropdown">
<div class="input-group">
<input type="search" class="form-control" placeholder="Search..." id="top-search">
<div class="input-group-append">
<button class="btn" type="submit">
<i class="fe-search"></i>
</button>
</div>
</div>
<div class="dropdown-menu dropdown-lg" id="search-dropdown">
<!-- item-->
<div class="dropdown-header noti-title">
<h5 class="text-overflow mb-2">Found <span class="text-danger">09</span> results</h5>
</div>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="fe-home mr-1"></i>
<span>Analytics Report</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="fe-aperture mr-1"></i>
<span>How can I help you?</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="fe-settings mr-1"></i>
<span>User profile settings</span>
</a>
<!-- item-->
<div class="dropdown-header noti-title">
<h6 class="text-overflow mb-2 text-uppercase">Users</h6>
</div>
<div class="notification-list">
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="media">
<img class="d-flex mr-2 rounded-circle" src="<?php echo base_url(); ?>public/new_assets/images/users/avatar-2.jpg" alt="Generic placeholder image" height="32">
<div class="media-body">
<h5 class="m-0 font-14">Erwin E. Brown</h5>
<span class="font-12 mb-0">UI Designer</span>
</div>
</div>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="media">
<img class="d-flex mr-2 rounded-circle" src="<?php echo base_url(); ?>public/new_assets/images/users/avatar-5.jpg" alt="Generic placeholder image" height="32">
<div class="media-body">
<h5 class="m-0 font-14">Jacob Deo</h5>
<span class="font-12 mb-0">Developer</span>
</div>
</div>
</a>
</div>
</div>
</div>
</form>
</li>
<li class="dropdown d-inline-block d-lg-none">
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<i class="fe-search noti-icon"></i>
</a>
<div class="dropdown-menu dropdown-lg dropdown-menu-right p-0">
<form class="p-3">
<input type="text" class="form-control" placeholder="Search ..." aria-label="Recipient's username">
</form>
</div>
</li>
<li class="dropdown d-none d-lg-inline-block">
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="fullscreen" href="#">
<i class="fe-maximize noti-icon"></i>
</a>
</li>
<li class="dropdown d-none d-lg-inline-block topbar-dropdown">
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<i class="fe-grid noti-icon"></i>
</a>
<div class="dropdown-menu dropdown-lg dropdown-menu-right p-0">
<div class="p-2">
<div class="row no-gutters">
<div class="col">
<a class="dropdown-icon-item" href="#">
<img src="<?php echo base_url(); ?>public/new_assets/images/brands/github.png" alt="Github">
<span>GitHub</span>
</a>
</div>
<div class="col">
<a class="dropdown-icon-item" href="#">
<img src="<?php echo base_url(); ?>public/new_assets/images/brands/dribbble.png" alt="dribbble">
<span>Dribbble</span>
</a>
</div>
<div class="col">
<a class="dropdown-icon-item" href="#">
<img src="<?php echo base_url(); ?>public/new_assets/images/brands/slack.png" alt="slack">
<span>Slack</span>
</a>
</div>
</div>
<div class="row no-gutters">
<div class="col">
<a class="dropdown-icon-item" href="#">
<img src="<?php echo base_url(); ?>public/new_assets/images/brands/g-suite.png" alt="G Suite">
<span>G Suite</span>
</a>
</div>
<div class="col">
<a class="dropdown-icon-item" href="#">
<img src="<?php echo base_url(); ?>public/new_assets/images/brands/bitbucket.png" alt="bitbucket">
<span>Bitbucket</span>
</a>
</div>
<div class="col">
<a class="dropdown-icon-item" href="#">
<img src="<?php echo base_url(); ?>public/new_assets/images/brands/dropbox.png" alt="dropbox">
<span>Dropbox</span>
</a>
</div>
</div>
</div>
</div>
</li>
<li class="dropdown d-none d-lg-inline-block topbar-dropdown">
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<img src="<?php echo base_url(); ?>public/new_assets/images/flags/us.jpg" alt="user-image" height="14">
</a>
<div class="dropdown-menu dropdown-menu-right">
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<img src="<?php echo base_url(); ?>public/new_assets/images/flags/germany.jpg" alt="user-image" class="mr-1" height="12"> <span class="align-middle">German</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<img src="<?php echo base_url(); ?>public/new_assets/images/flags/italy.jpg" alt="user-image" class="mr-1" height="12"> <span class="align-middle">Italian</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<img src="<?php echo base_url(); ?>public/new_assets/images/flags/spain.jpg" alt="user-image" class="mr-1" height="12"> <span class="align-middle">Spanish</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<img src="<?php echo base_url(); ?>public/new_assets/images/flags/russia.jpg" alt="user-image" class="mr-1" height="12"> <span class="align-middle">Russian</span>
</a>
</div>
</li>
<li class="dropdown notification-list topbar-dropdown">
<a class="nav-link dropdown-toggle waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<i class="fe-bell noti-icon"></i>
<span class="badge badge-danger rounded-circle noti-icon-badge">5</span>
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-lg">
<!-- item-->
<div class="dropdown-item noti-title">
<h5 class="m-0">
<span class="float-right">
<a href="" class="text-dark">
<small>Clear All</small>
</a>
</span>Notification
</h5>
</div>
<div class="noti-scroll" data-simplebar>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item active">
<div class="notify-icon bg-soft-primary text-primary">
<i class="mdi mdi-comment-account-outline"></i>
</div>
<p class="notify-details">Doug Dukes commented on Admin Dashboard
<small class="text-muted">1 min ago</small>
</p>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon">
<img src="<?php echo base_url(); ?>public/new_assets/images/users/avatar-2.jpg" class="img-fluid rounded-circle" alt="" /> </div>
<p class="notify-details">Mario Drummond</p>
<p class="text-muted mb-0 user-msg">
<small>Hi, How are you? What about our next meeting</small>
</p>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon">
<img src="<?php echo base_url(); ?>public/new_assets/images/users/avatar-4.jpg" class="img-fluid rounded-circle" alt="" /> </div>
<p class="notify-details">Karen Robinson</p>
<p class="text-muted mb-0 user-msg">
<small>Wow ! this admin looks good and awesome design</small>
</p>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon bg-soft-warning text-warning">
<i class="mdi mdi-account-plus"></i>
</div>
<p class="notify-details">New user registered.
<small class="text-muted">5 hours ago</small>
</p>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon bg-info">
<i class="mdi mdi-comment-account-outline"></i>
</div>
<p class="notify-details">Caleb Flakelar commented on Admin
<small class="text-muted">4 days ago</small>
</p>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon bg-secondary">
<i class="mdi mdi-heart"></i>
</div>
<p class="notify-details">Carlos Crouch liked
<b>Admin</b>
<small class="text-muted">13 days ago</small>
</p>
</a>
</div>
<!-- All-->
<a href="javascript:void(0);" class="dropdown-item text-center text-primary notify-item notify-all">
View all
<i class="fe-arrow-right"></i>
</a>
</div>
</li>
<li class="dropdown notification-list topbar-dropdown">
<a class="nav-link dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<img src="<?php echo base_url(); ?>public/new_assets/images/users/avatar-1.jpg" alt="user-image" class="rounded-circle">
<span class="pro-user-name ml-1">
Nik Patel <i class="mdi mdi-chevron-down"></i>
</span>
</a>
<div class="dropdown-menu dropdown-menu-right profile-dropdown ">
<!-- item-->
<div class="dropdown-header noti-title">
<h6 class="text-overflow m-0">Welcome !</h6>
</div>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="ri-account-circle-line"></i>
<span>My Account</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="ri-settings-3-line"></i>
<span>Settings</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="ri-wallet-line"></i>
<span>My Wallet <span class="badge badge-success float-right">3</span> </span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="ri-lock-line"></i>
<span>Lock Screen</span>
</a>
<div class="dropdown-divider"></div>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="ri-logout-box-line"></i>
<span>Logout</span>
</a>
</div>
</li>
<li class="dropdown notification-list">
<a href="javascript:void(0);" class="nav-link right-bar-toggle waves-effect waves-light">
<i class="fe-settings noti-icon"></i>
</a>
</li>
</ul>
<!-- LOGO -->
<div class="logo-box">
<a href="index.html" class="logo logo-dark text-center">
<span class="logo-sm">
<img src="<?php echo base_url(); ?>public/new_assets/images/logo-sm-dark.png" alt="" height="24">
<!-- <span class="logo-lg-text-light">Minton</span> -->
</span>
<span class="logo-lg">
<img src="<?php echo base_url(); ?>public/new_assets/images/logo-dark.png" alt="" height="20">
<!-- <span class="logo-lg-text-light">M</span> -->
</span>
</a>
<a href="index.html" class="logo logo-light text-center">
<span class="logo-sm">
<img src="<?php echo base_url(); ?>public/new_assets/images/logo-sm.png" alt="" height="24">
</span>
<span class="logo-lg">
<img src="<?php echo base_url(); ?>public/new_assets/images/logo-light.png" alt="" height="20">
</span>
</a>
</div>
<ul class="list-unstyled topnav-menu topnav-menu-left m-0">
<li>
<button class="button-menu-mobile waves-effect waves-light">
<i class="fe-menu"></i>
</button>
</li>
<li>
<!-- Mobile menu toggle (Horizontal Layout)-->
<a class="navbar-toggle nav-link" data-toggle="collapse" data-target="#topnav-menu-content">
<div class="lines">
<span></span>
<span></span>
<span></span>
</div>
</a>
<!-- End mobile menu toggle-->
</li>
<li class="dropdown d-none d-xl-block">
<a class="nav-link dropdown-toggle waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
Create New
<i class="mdi mdi-chevron-down"></i>
</a>
<div class="dropdown-menu">
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<i class="fe-briefcase mr-1"></i>
<span>New Projects</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<i class="fe-user mr-1"></i>
<span>Create Users</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<i class="fe-bar-chart-line- mr-1"></i>
<span>Revenue Report</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<i class="fe-settings mr-1"></i>
<span>Settings</span>
</a>
<div class="dropdown-divider"></div>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<i class="fe-headphones mr-1"></i>
<span>Help & Support</span>
</a>
</div>
</li>
<li class="dropdown dropdown-mega d-none d-xl-block">
<a class="nav-link dropdown-toggle waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
Mega Menu
<i class="mdi mdi-chevron-down"></i>
</a>
<div class="dropdown-menu dropdown-megamenu">
<div class="row">
<div class="col-sm-8">
<div class="row">
<div class="col-md-4">
<h5 class="text-dark mt-0">UI Components</h5>
<ul class="list-unstyled megamenu-list">
<li>
<a href="javascript:void(0);">Widgets</a>
</li>
<li>
<a href="javascript:void(0);">Nestable List</a>
</li>
<li>
<a href="javascript:void(0);">Range Sliders</a>
</li>
<li>
<a href="javascript:void(0);">Masonry Items</a>
</li>
<li>
<a href="javascript:void(0);">Sweet Alerts</a>
</li>
<li>
<a href="javascript:void(0);">Treeview Page</a>
</li>
<li>
<a href="javascript:void(0);">Tour Page</a>
</li>
</ul>
</div>
<div class="col-md-4">
<h5 class="text-dark mt-0">Applications</h5>
<ul class="list-unstyled megamenu-list">
<li>
<a href="javascript:void(0);">eCommerce Pages</a>
</li>
<li>
<a href="javascript:void(0);">CRM Pages</a>
</li>
<li>
<a href="javascript:void(0);">Email</a>
</li>
<li>
<a href="javascript:void(0);">Calendar</a>
</li>
<li>
<a href="javascript:void(0);">Team Contacts</a>
</li>
<li>
<a href="javascript:void(0);">Task Board</a>
</li>
<li>
<a href="javascript:void(0);">Email Templates</a>
</li>
</ul>
</div>
<div class="col-md-4">
<h5 class="text-dark mt-0">Extra Pages</h5>
<ul class="list-unstyled megamenu-list">
<li>
<a href="javascript:void(0);">Left Sidebar with User</a>
</li>
<li>
<a href="javascript:void(0);">Menu Collapsed</a>
</li>
<li>
<a href="javascript:void(0);">Small Left Sidebar</a>
</li>
<li>
<a href="javascript:void(0);">New Header Style</a>
</li>
<li>
<a href="javascript:void(0);">Search Result</a>
</li>
<li>
<a href="javascript:void(0);">Gallery Pages</a>
</li>
<li>
<a href="javascript:void(0);">Maintenance & Coming Soon</a>
</li>
</ul>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="text-center mt-3">
<h3 class="text-dark">Special Discount Sale!</h3>
<h4>Save up to 70% off.</h4>
<button class="btn btn-primary btn-rounded mt-3">Download Now</button>
</div>
</div>
</div>
</div>
</li>
</ul>
<div class="clearfix"></div>
</div>
</div>
<!-- end Topbar -->
<div class="topnav">
<div class="container-fluid">
<nav class="navbar navbar-light navbar-expand-lg topnav-menu">
<div class="collapse navbar-collapse" id="topnav-menu-content">
<ul class="navbar-nav">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-dashboard" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-dashboard-line mr-1"></i> Dashboards <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-dashboard">
<a href="index.html" class="dropdown-item">Sales</a>
<a href="dashboard-crm.html" class="dropdown-item">CRM</a>
<a href="dashboard-analytics.html" class="dropdown-item">Analytics</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-apps" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-apps-2-line mr-1"></i> Apps <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-apps">
<a href="apps-calendar.html" class="dropdown-item"><i class="ri-calendar-2-line align-middle mr-1"></i> Calendar</a>
<a href="apps-chat.html" class="dropdown-item"><i class="ri-message-2-line align-middle mr-1"></i> Chat</a>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-ecommerce"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-shopping-cart-2-line align-middle mr-1"></i> Ecommerce <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-ecommerce">
<a href="ecommerce-products.html" class="dropdown-item">Products List</a>
<a href="ecommerce-products-grid.html" class="dropdown-item">Products Grid</a>
<a href="ecommerce-product-detail.html" class="dropdown-item">Product Detail</a>
<a href="ecommerce-product-create.html" class="dropdown-item">Create Product</a>
<a href="ecommerce-customers.html" class="dropdown-item">Customers</a>
<a href="ecommerce-orders.html" class="dropdown-item">Orders</a>
<a href="ecommerce-orders-detail.html" class="dropdown-item">Order Detail</a>
<a href="ecommerce-sellers.html" class="dropdown-item">Sellers</a>
<a href="ecommerce-cart.html" class="dropdown-item">Shopping Cart</a>
<a href="ecommerce-checkout.html" class="dropdown-item">Checkout</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-email"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-mail-line align-middle mr-1"></i> Email <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-email">
<a href="email-inbox.html" class="dropdown-item">Inbox</a>
<a href="email-read.html" class="dropdown-item">Read Email</a>
<a href="email-templates.html" class="dropdown-item">Email Templates</a>
</div>
</div>
<a href="apps-companies.html" class="dropdown-item"><i class="ri-building-4-line align-middle mr-1"></i> Companies</a>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-task"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-task-line align-middle mr-1"></i> Tasks <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-task">
<a href="task-list.html" class="dropdown-item">List</a>
<a href="task-details.html" class="dropdown-item">Details</a>
<a href="task-kanban-board.html" class="dropdown-item">Kanban Board</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-contact"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-profile-line align-middle mr-1"></i> Contacts <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-contact">
<a href="contacts-list.html" class="dropdown-item">Members List</a>
<a href="contacts-profile.html" class="dropdown-item">Profile</a>
</div>
</div>
<a href="apps-file-manager.html" class="dropdown-item"><i class="ri-folders-line align-middle mr-1"></i> File Manager</a>
<a href="apps-tickets.html" class="dropdown-item"><i class="ri-customer-service-2-line align-middle mr-1"></i> Tickets</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-ui" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-pencil-ruler-2-line mr-1"></i> UI Elements <div class="arrow-down"></div>
</a>
<div class="dropdown-menu mega-dropdown-menu dropdown-mega-menu-xl" aria-labelledby="topnav-ui">
<div class="row">
<div class="col-lg-4">
<div>
<a href="ui-avatars.html" class="dropdown-item">Avatars</a>
<a href="ui-buttons.html" class="dropdown-item">Buttons</a>
<a href="ui-cards.html" class="dropdown-item">Cards</a>
<a href="ui-carousel.html" class="dropdown-item">Carousel</a>
<a href="ui-dropdowns.html" class="dropdown-item">Dropdowns</a>
<a href="ui-video.html" class="dropdown-item">Embed Video</a>
<a href="ui-general.html" class="dropdown-item">General UI</a>
</div>
</div>
<div class="col-lg-4">
<div>
<a href="ui-grid.html" class="dropdown-item">Grid</a>
<a href="ui-images.html" class="dropdown-item">Images</a>
<a href="ui-list-group.html" class="dropdown-item">List Group</a>
<a href="ui-modals.html" class="dropdown-item">Modals</a>
<a href="ui-notifications.html" class="dropdown-item">Notifications</a>
<a href="ui-portlets.html" class="dropdown-item">Portlets</a>
</div>
</div>
<div class="col-lg-4">
<div>
<a href="ui-progress.html" class="dropdown-item">Progress</a>
<a href="ui-ribbons.html" class="dropdown-item">Ribbons</a>
<a href="ui-spinners.html" class="dropdown-item">Spinners</a>
<a href="ui-tabs-accordions.html" class="dropdown-item">Tabs & Accordions</a>
<a href="ui-tooltips-popovers.html" class="dropdown-item">Tooltips & Popovers</a>
<a href="ui-typography.html" class="dropdown-item">Typography</a>
</div>
</div>
</div>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-components" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-stack-line mr-1"></i> Components <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-components">
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-extendedui"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-stack-line align-middle mr-1"></i> Extended UI <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-extendedui">
<a href="extended-nestable.html" class="dropdown-item">Nestable List</a>
<a href="extended-range-slider.html" class="dropdown-item">Range Slider</a>
<a href="extended-sweet-alert.html" class="dropdown-item">Sweet Alert</a>
<a href="extended-tour.html" class="dropdown-item">Tour Page</a>
<a href="extended-treeview.html" class="dropdown-item">Tree View</a>
<a href="extended-scrollspy.html" class="dropdown-item">Scrollspy</a>
</div>
</div>
<a href="widgets.html" class="dropdown-item"><i class="ri-honour-line align-middle mr-1"></i> Widgets</a>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-form"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-eraser-line align-middle mr-1"></i> Forms <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-form">
<a href="forms-elements.html" class="dropdown-item">General Elements</a>
<a href="forms-advanced.html" class="dropdown-item">Advanced</a>
<a href="forms-validation.html" class="dropdown-item">Validation</a>
<a href="forms-pickers.html" class="dropdown-item">Pickers</a>
<a href="forms-wizard.html" class="dropdown-item">Wizard</a>
<a href="forms-masks.html" class="dropdown-item">Masks</a>
<a href="forms-summernote.html" class="dropdown-item">Summernote</a>
<a href="forms-quilljs.html" class="dropdown-item">Quilljs Editor</a>
<a href="forms-file-uploads.html" class="dropdown-item">File Uploads</a>
<a href="forms-x-editable.html" class="dropdown-item">X Editable</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-charts"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-bar-chart-line align-middle mr-1"></i> Charts <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-charts">
<a href="charts-flot.html" class="dropdown-item">Flot Charts</a>
<a href="charts-apex.html" class="dropdown-item">Apex Charts</a>
<a href="charts-morris.html" class="dropdown-item">Morris Charts</a>
<a href="charts-chartjs.html" class="dropdown-item">Chartjs Charts</a>
<a href="charts-peity.html" class="dropdown-item">Peity Charts</a>
<a href="charts-chartist.html" class="dropdown-item">Chartist Charts</a>
<a href="charts-c3.html" class="dropdown-item">C3 Charts</a>
<a href="charts-sparklines.html" class="dropdown-item">Sparklines Charts</a>
<a href="charts-knob.html" class="dropdown-item">Jquery Knob Charts</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-table"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-table-line align-middle mr-1"></i> Tables <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-table">
<a href="tables-basic.html" class="dropdown-item">Basic Tables</a>
<a href="tables-datatables.html" class="dropdown-item">Data Tables</a>
<a href="tables-editable.html" class="dropdown-item">Editable Tables</a>
<a href="tables-responsive.html" class="dropdown-item">Responsive Tables</a>
<a href="tables-footables.html" class="dropdown-item">FooTable</a>
<a href="tables-tablesaw.html" class="dropdown-item">Tablesaw Tables</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-icons"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-markup-line align-middle mr-1"></i> Icons <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-icons">
<a href="icons-feather.html" class="dropdown-item">Feather</a>
<a href="icons-remix.html" class="dropdown-item">Remix</a>
<a href="icons-boxicons.html" class="dropdown-item">Boxicons</a>
<a href="icons-mdi.html" class="dropdown-item">Material Design</a>
<a href="icons-font-awesome.html" class="dropdown-item">Font Awesome 5</a>
<a href="icons-weather.html" class="dropdown-item">Weather</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-map"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-map-pin-line align-middle mr-1"></i> Maps <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-map">
<a href="maps-google.html" class="dropdown-item">Google Maps</a>
<a href="maps-vector.html" class="dropdown-item">Vector Maps</a>
<a href="maps-mapael.html" class="dropdown-item">Mapael Maps</a>
</div>
</div>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-pages" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-pages-line mr-1"></i> Pages <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-pages">
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-auth"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Auth Style 1 <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-auth">
<a href="auth-login.html" class="dropdown-item">Log In</a>
<a href="auth-register.html" class="dropdown-item">Register</a>
<a href="auth-signin-signup.html" class="dropdown-item">Signin - Signup</a>
<a href="auth-recoverpw.html" class="dropdown-item">Recover Password</a>
<a href="auth-lock-screen.html" class="dropdown-item">Lock Screen</a>
<a href="auth-logout.html" class="dropdown-item">Logout</a>
<a href="auth-confirm-mail.html" class="dropdown-item">Confirm Mail</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-auth2"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Auth Style 2 <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-auth2">
<a href="auth-login-2.html" class="dropdown-item">Log In 2</a>
<a href="auth-register-2.html" class="dropdown-item">Register 2</a>
<a href="auth-signin-signup-2.html" class="dropdown-item">Signin - Signup 2</a>
<a href="auth-recoverpw-2.html" class="dropdown-item">Recover Password 2</a>
<a href="auth-lock-screen-2.html" class="dropdown-item">Lock Screen 2</a>
<a href="auth-logout-2.html" class="dropdown-item">Logout 2</a>
<a href="auth-confirm-mail-2.html" class="dropdown-item">Confirm Mail 2</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-error"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Errors <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-error">
<a href="pages-404.html" class="dropdown-item">Error 404</a>
<a href="pages-404-alt.html" class="dropdown-item">Error 404-alt</a>
<a href="pages-500.html" class="dropdown-item">Error 500</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-utility"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Utility <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-utility">
<a href="pages-starter.html" class="dropdown-item">Starter</a>
<a href="pages-timeline.html" class="dropdown-item">Timeline</a>
<a href="pages-sitemap.html" class="dropdown-item">Sitemap</a>
<a href="pages-invoice.html" class="dropdown-item">Invoice</a>
<a href="pages-faqs.html" class="dropdown-item">FAQs</a>
<a href="pages-search-results.html" class="dropdown-item">Search Results</a>
<a href="pages-pricing.html" class="dropdown-item">Pricing</a>
<a href="pages-maintenance.html" class="dropdown-item">Maintenance</a>
<a href="pages-coming-soon.html" class="dropdown-item">Coming Soon</a>
<a href="pages-gallery.html" class="dropdown-item">Gallery</a>
</div>
</div>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-layout" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-layout-line mr-1"></i> Layouts <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-layout">
<a href="layouts-vertical.html" class="dropdown-item">Vertical</a>
<a href="layouts-detached.html" class="dropdown-item">Detached</a>
<a href="layouts-two-column.html" class="dropdown-item">Two Column Menu</a>
<a href="layouts-preloader.html" class="dropdown-item">Preloader</a>
</div>
</li>
</ul> <!-- end navbar-->
</div> <!-- end .collapsed-->
</nav>
</div> <!-- end container-fluid -->
</div> <!-- end topnav-->
<!-- ============================================================== -->
<!-- Start Page Content here -->
<!-- ============================================================== -->

View File

@ -127,21 +127,21 @@
<div class="col-md-4">
<label>Invoice Number <span style="color:red; font-size: 15px;">*</span><!-- Delivery Challan/Inv No --></label>
<?php
$data = array('name' => 'InvoiceNo', 'value' => set_value('InvoiceNo'), 'id' => 'InvoiceNo', 'class' => 'form-control', 'required=>"true"'); // ,'onkeypress'=>'return isNumberKey(event);' );
$data = array('name' => 'InvoiceNo', 'value' => set_value('InvoiceNo'), 'id' => 'InvoiceNo', 'class' => 'form-control', 'required=>"true"', 'autocomplete'=>'off'); // ,'onkeypress'=>'return isNumberKey(event);' );
echo form_input($data);
?>
</div>
<div class="col-md-4">
<label>Invoice Date <span style="color:red; font-size: 15px;">*</span><!-- Delivery Challan/Inv Date --></label>
<?php
$data = array('name' => 'InvoiceDate', 'value' => set_value('InvoiceDate'), 'id' => 'InvoiceDate', 'class' => 'form-control num', 'required' => 'true');
$data = array('name' => 'InvoiceDate', 'value' => set_value('InvoiceDate'), 'id' => 'InvoiceDate', 'class' => 'form-control num', 'required' => 'true', 'autocomplete'=>'off');
echo form_input($data);
?>
</div>
<div class="col-md-4">
<label>Material Received Date <span style="color:red; font-size: 15px;">*</span></label>
<?php
$data = array('name' => 'MaterialRcvdDate', 'value' => set_value('MaterialRcvdDate'), 'id' => 'MaterialRcvdDate', 'class' => 'form-control num', 'required' => 'true');
$data = array('name' => 'MaterialRcvdDate', 'value' => set_value('MaterialRcvdDate'), 'id' => 'MaterialRcvdDate', 'class' => 'form-control num', 'required' => 'true', 'autocomplete'=>'off');
echo form_input($data);
?>
</div>
@ -150,7 +150,7 @@
<div class="col-md-4">
<label>Vechicle Number</label>
<?php
$data = array('name' => 'VehicleNo', 'value' => set_value('VehicleNo'), 'id' => 'VehicleNo', 'class' => 'form-control', 'maxlength' => '20');
$data = array('name' => 'VehicleNo', 'value' => set_value('VehicleNo'), 'id' => 'VehicleNo', 'class' => 'form-control', 'maxlength' => '20', 'autocomplete'=>'off');
echo form_input($data);
?>
<!-- <span pattern="" required="true"></span> -->
@ -158,14 +158,14 @@
<div class="col-md-4">
<label>Driver Name</label>
<?php
$data = array('name' => 'DriverName', 'value' => set_value('DriverName'), 'id' => 'DriverName', 'class' => 'form-control', 'maxlength' => '50');
$data = array('name' => 'DriverName', 'value' => set_value('DriverName'), 'id' => 'DriverName', 'class' => 'form-control', 'maxlength' => '50', 'autocomplete'=>'off');
echo form_input($data);
?>
</div>
<div class="col-md-4">
<label>Driver Mobile Number</label>
<?php
$data = array('name' => 'DriverMobileNumber', 'value' => set_value('DriverMobileNumber'), 'id' => 'DriverMobileNumber', 'class' => 'form-control', 'maxlength' => '50');
$data = array('name' => 'DriverMobileNumber', 'value' => set_value('DriverMobileNumber'), 'id' => 'DriverMobileNumber', 'class' => 'form-control', 'maxlength' => '50', 'autocomplete'=>'off');
echo form_input($data);
?>
</div>
@ -206,7 +206,43 @@
<div class="col-md-4 col-md-offset-8">
<input type="file" name="MasterFile" id="images1" onchange="Copyfilenames(this.name); "><br>
<button class="btn btn-success" id='IGRDraftLink' type="submit" name='IGRDraftLink' onclick="filecheck(0);">Draft IGR</button>
</div>
<div class="files">
<div class="col-md-4 col-md-offset-8" style="padding-bottom: 15px;">
<button type="button" class="btn btn-primary btn-sm a1"
onclick="appendFilesFileds()" id="day">
Add Additional File
</button>
</div>
<?php if(!empty($emp_data)){ foreach ($emp_data as $key => $value) { ?>
<div class="col-md-12 pad ">
<div class="col-md-4">
<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 id="filesContainer"></div>
</div><br>
<div class="col-md-4 col-md-offset-8">
<button class="btn btn-success" id='IGRDraftLink' type="submit" name='IGRDraftLink' onclick="filecheck(0);">Save as Draft IGR</button>
<button class="btn btn-success" id='IGRLink' type="submit" name='IGRLink' onclick="filecheck(1);">Generate IGR</button>
</div>
</div>
@ -267,7 +303,7 @@
<label for="GrossWeight" class="col-md-2 col-form-label">Gross Weight</label>
<div class="col-md-5">
<?php
$data = array('name' => 'GrossWeight', 'value' => set_value('GrossWeight'), 'id' => 'GrossWeight', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'maxlength' => '50', 'onchange' => 'WeightDiffer(this);', 'placeholder' => 'Gross Weight Value (A)');
$data = array('name' => 'GrossWeight', 'value' => set_value('GrossWeight'), 'id' => 'GrossWeight', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'maxlength' => '50', 'onchange' => 'WeightDiffer(this);', 'placeholder' => 'Gross Weight Value (A)', 'autocomplete'=>"off");
echo form_input($data);
?>
</div>
@ -283,7 +319,7 @@
<label for="TareWeight" class="col-md-2 col-form-label">Tare Weight</label>
<div class="col-md-5">
<?php
$data = array('name' => 'TareWeight', 'value' => set_value('TareWeight'), 'id' => 'TareWeight', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'maxlength' => '50', 'onchange' => 'validateTareWeight(this);', 'placeholder' => 'Enter your username', 'placeholder' => 'Tare Weight Value (B)');
$data = array('name' => 'TareWeight', 'value' => set_value('TareWeight'), 'id' => 'TareWeight', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'maxlength' => '50', 'onchange' => 'validateTareWeight(this);', 'autocomplete' => 'off', 'placeholder' => 'Tare Weight Value (B)', 'autocomplete'=>"off");
echo form_input($data);
?>
</div>
@ -325,15 +361,8 @@
</div><!-- modal content div closed-->
</div><!-- modal content closed-->
</div><!-- modal fade closed-->
</div>
<!-- WeightCalculator modal ended-->
</div>
</section>
@ -348,7 +377,8 @@
<script>
function validate() {
var rowcount = $("#txtRowCount").val();
var isOpenOrder = parseInt($("#hiddenIsOpenOrder").val(), 2);
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? 0 : 1;
var Noval = 0;
var isExceed = 0;
for (k = 1; k <= rowcount; k++) {
@ -383,7 +413,7 @@
} else if (Noval == 0) {
alert('Invoice Quantity is Empty.Please Enter the value');
return false;
} else if (isExceed == 1) {
} else if (isExceed == 1 && formatted_IsOpenOrder == 0) {
alert("Invoice Quantity is exceeding the Ordered Quantity.Please Contact Purchase Team for further Process ")
return false;
} else {
@ -446,6 +476,8 @@
var isOpenOrder = parseInt(obj.IsOpenOrder, 2);
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "" : "Open";
$('.help-block').text(formatted_IsOpenOrder);
var button_text_for_IGRDraftLink = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "Save as Draft IGR" : "Save as Open IGR";
$('#IGRDraftLink').text(button_text_for_IGRDraftLink);
//$("#Add").val(obj.Address);
$("#del").val(obj.DeliveryDate);
//$("#ser").val(obj.ServiceDescription);
@ -476,11 +508,11 @@
'<td name="MaterialName" id="MaterialCode" >' + item.MaterialCode + '</td>' +
'<td>' + item.MaterialName + '</td>' +
'<td name="UOM">' + item.UOM + '</td>' +
'<td name="Quantity1' + i + '" id="Quantity_1' + i + '">' + item.Quantity + '</td>' +
'<td name="Quantity1' + i + '" id="Quantity_1' + i + '">' + item.Quantity + '</td>' +
'<td name="ReceivedQuantity' + i + '" id="ReceivedQuantity' + i + '">' + item.ReceivedQuantity + '</td>' +
'<td name="PendingQuantity' + i + '" id="PendingQuantity' + i + '">' + item.PendingQty + '</td>' +
'<td data-name="sel" ><input type="text" onchange="validateReceivedQuantity(' + i + ')"id="QuantityAsPerInvoice' + i + '" name="QuantityAsPerInvoice' + i + '" value="" onkeypress="return isNumberKey(event);"></td>' +
'<td><input type="text" id="Remark' + i + '" name="Remark' + i + '" class="form" onchange="SetRemarks(' + i + ')"> </td>' +
'<td data-name="sel" ><input type="text" onchange="validateReceivedQuantity(' + i + ')"id="QuantityAsPerInvoice' + i + '" name="QuantityAsPerInvoice' + i + '" value="" onkeypress="return isNumberKey(event);" autocomplete="off"></td>' +
'<td><input type="text" id="Remark' + i + '" name="Remark' + i + '" class="form" onchange="SetRemarks(' + i + ')" autocomplete="off"> </td>' +
'<td><a target="_blank" data-toggle="modal" data-target="#WeightCalculator" title="Weight Calculator" data-index="' + i + '" data-material="' + item.MaterialName + '"><i class="fa fa-solid fa-truck" style="text-align: center;"></i></a> </td>' +
'</tr>';
$('#txtRowCount').val(i);
@ -619,7 +651,9 @@
var RecQty = parseFloat($('#txtReceivedQuantity' + Rowid).val() == '' ? '0.00' : $('#txtReceivedQuantity' + Rowid).val());
var OrderedQty = parseFloat($("#Quantity_1" + Rowid).text());
var r = $("#Remark" + Rowid).val();
var isOpenOrder = parseInt($("#hiddenIsOpenOrder").val(), 2);
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? 0 : 1;
if(formatted_IsOpenOrder == 0){
if ((InvoiceQty + RecQty) > OrderedQty) {
alert("Invoice Quantity is exceeding the Ordered Quantity.Please Contact Purchase Team for further Process ")
$("#QuantityAsPerInvoice" + Rowid).focus();
@ -638,6 +672,11 @@
$("#txtQuantityAsPerInvoice" + Rowid).val(InvoiceQty);
// InvoiceQty
return true;
}}else{
$('#txtPendingQty' + Rowid).val(0.00);
$("#txtQuantityAsPerInvoice" + Rowid).val(0.00);
// InvoiceQty
return true;
}
}
</script>
@ -818,4 +857,42 @@
console.log("Saving values for index: " + inx + " undefined");
}
}
</script>
<script>
function appendFilesFileds(data) {
var newRowHtml = `
<div class="col-md-12 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>`;
$('#filesContainer').append(newRowHtml);
$('.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()
}
}
</script>

View File

@ -86,6 +86,8 @@ if (!empty($INRSYMBOL)) {
<script>
$(document).ready(function() {
$("#PaymentTerms").select2();
clearTotalItemValues();
if ($("#insurance").val() == 1) {
@ -1735,6 +1737,10 @@ if (!empty($INRSYMBOL)) {
margin: 0;
}
.btn-container .btn {
margin-left: 10px;
}
.centered {
display: flex;
/* justify-content: center; */
@ -2015,6 +2021,15 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="btn-container">
<div class="row">
<div class="col text-right">
<!-- <input type="checkbox" id="IsOpenOrder" name="IsOpenOrder" value="1"> IS THIS OPEN ORDER FORMAT -->
<a data-toggle="modal"><button type="submit" onclick="openModal();" class="btn btn-success" id="abcd">Select Line Item</button> </a>
</div>
</div>
</div>
<!-- Modal for Packing Calculation -->
<div id="packagingcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog">
@ -2045,7 +2060,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<!-- freightcalmodel-->
<!-- Modal for freight Calculation-->
<div id="freightcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog">
@ -2169,19 +2184,8 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="container-fluid">
<div align="right">
<div class="col-md-12">
<div class="col-md-3 col-md-offset-7" align="right" style="padding:10px">
<!-- <input type="checkbox" id="IsOpenOrder" name="IsOpenOrder" value="1"> IS THIS OPEN ORDER FORMAT -->
</div>
<div class="col-md-1" align="right" style="padding:10px">
<a data-toggle="modal"><button type="submit" onclick="openModal();" class="btn btn-success" id="abcd">Select Line Item</button> </a>
</div>
<br>
</div>
<!-- Model for revenue po -->
<div id="REVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="overflow-y:scroll !important">
<div class="modal-dialog">
@ -2313,14 +2317,6 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-12" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-4"></div>
<div class="col-md-4">
@ -2587,8 +2583,9 @@ if (!empty($INRSYMBOL)) {
</form>
</div>
</div>
</br>
<br />
<!-- Edit Model for revenue po -->
<div id="EDITREVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="overflow-y:scroll !important">
<div class="modal-dialog">
<!-- Modal content-->
@ -2711,6 +2708,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-12">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Discount Type </label>
<div>
@ -2750,29 +2748,9 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
<div class="col-md-2">
<label>CGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditCgst', 'value' => set_value('EditCgst', 0), 'id' => 'EditCgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange();RevenueChangeEditSgst();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterCgst', 'value' => set_value('EditAfterCgst', 0.00), 'id' => 'EditAfterCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Packaging Type </label>
<div>
@ -2812,49 +2790,10 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
<div id="SGSTEditModel">
<div class="col-md-2">
<label>SGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditSgst', 'value' => set_value('EditSgst', 0), 'id' => 'EditSgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterSgst', 'value' => set_value('EditAfterSgst', 0.00), 'id' => 'EditAfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div id="IGSTEditModel" style="display:none;">
<div class="col-md-2">
<label>IGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditIgst', 'value' => set_value('EditIgst', 0), 'id' => 'EditIgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterIgst', 'value' => set_value('EditAfterIgst', 0.00), 'id' => 'EditAfterIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-2">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Freight Type </label>
<div>
<?php
@ -2902,8 +2841,79 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>CGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditCgst', 'value' => set_value('EditCgst', 0), 'id' => 'EditCgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange();RevenueChangeEditSgst();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterCgst', 'value' => set_value('EditAfterCgst', 0.00), 'id' => 'EditAfterCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div id="SGSTEditModel">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>SGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditSgst', 'value' => set_value('EditSgst', 0), 'id' => 'EditSgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterSgst', 'value' => set_value('EditAfterSgst', 0.00), 'id' => 'EditAfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div id="IGSTEditModel" style="display:none;">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>IGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditIgst', 'value' => set_value('EditIgst', 0), 'id' => 'EditIgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterIgst', 'value' => set_value('EditAfterIgst', 0.00), 'id' => 'EditAfterIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-4">
<label> Insurance Amt <?php echo "($INRSYM)" ?> (if Any)</label>
<div class="form-group">
@ -2917,7 +2927,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-4">
<div class="form-group">
<label><?php echo "Total Order Amt ($INRSYM)"; ?></label>
@ -2929,7 +2939,6 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-12">
<label><?php echo "Reveneue Description"; ?></label>
<div class="form-group">
<?php
@ -2957,47 +2966,46 @@ if (!empty($INRSYMBOL)) {
</div>
</form>
</div>
</div>
</br>
<div class="box-body">
<table id="revenueTax" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>SNo</th>
<th>Requisition No</th>
<th>Item Code</th>
<th>Item Description</th>
<th>Quantity</th>
<th>UOM</th>
<th>Rate <?php echo "($INRSYM)" ?></th>
<th>Basic Amount <?php echo "($INRSYM)" ?></th>
<th>Tax Amount <?php echo "($INRSYM)" ?></th>
<th>Total Order Amount <?php echo "($INRSYM)" ?></th>
<th>Action</th>
</tr>
</thead>
</br>
<tbody id='RevenueAppend'></tbody>
</table>
</div>
<!-- /.box-body -->
<!-- Table box-body -->
<div class="box-body">
<div class="row">
<table id="revenueTax" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>SNo</th>
<th>Requisition No</th>
<th>Item Code</th>
<th>Item Description</th>
<th>Quantity</th>
<th>UOM</th>
<th>Rate <?php echo "($INRSYM)" ?></th>
<th>Basic Amount <?php echo "($INRSYM)" ?></th>
<th>Tax Amount <?php echo "($INRSYM)" ?></th>
<th>Total Order Amount <?php echo "($INRSYM)" ?></th>
<th>Action</th>
</tr>
</thead>
<tbody id='RevenueAppend'></tbody>
</table>
</div>
</div>
</br>
<!-- /.box-body -->
</div>
<div class="row" style="border:1px solid;">
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Basic Amount <?php echo "($INRSYM)" ?></label>
<?php
$data = array('name' => 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount'), 'id' => 'txtTotBasicAmount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
<div class="col-md-3">
<label>Total Discount Amount <?php echo "($INRSYM)" ?> </label>
@ -3037,8 +3045,6 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-12">
<div class="col-md-3">
<label>Total Packaging Amount <?php echo "($INRSYM)" ?></label>
@ -3084,7 +3090,8 @@ if (!empty($INRSYMBOL)) {
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value="">
</div>
</div>
<div class="row" style="padding: 2% 0%">
</div>
<div class="row" style="padding: 2% 0%">
<div class="col-md-4 col-md-offset-8"><br />
<input type="file" name="POFile" id="POFile"><br>
<input type="hidden" name="txtPoRange" id="txtPoRange" />
@ -3093,13 +3100,14 @@ if (!empty($INRSYMBOL)) {
<input type="hidden" name="txtRowCount" id="txtRowCount" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="Budget" id="Budget" />
<a class="btn btn-reset Save" ID="Cancel" onclick="Reset();">&nbsp;&nbsp;<span class="bold">Reset</span></a>
<a class="btn btn-success Save" ID="Save" onclick="Save(0)">&nbsp;&nbsp;<span class="bold">Save as Draft</span></a>
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
<div class="btn-container" style="text-align: right;">
<a class="btn btn-reset Save" ID="Cancel" onclick="Reset();">&nbsp;&nbsp;<span class="bold">Reset</span></a>
<a class="btn btn-success Save" ID="Save" onclick="Save(0)">&nbsp;&nbsp;<span class="bold">Save as Draft</span></a>
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
</div>
</div><br />
</div>
</div>
</div>
</div>
</section>

View File

@ -11,182 +11,295 @@
}
//echo $ReqNo;
}?>
<style>
#Requisition_filter{
float: inline-end;
}
#Requisition_wrapper .row .col-sm-4{
flex-basis: 50%;
float: inline-end;
}
#Requisition_paginate .pagination {
flex-basis: 50%;
float: inline-end;
margin:0 0 15px;
}
#Requisition_wrapper .row:nth-child(3), #Requisition_wrapper .row:nth-child(1){
padding: 0 15px;
}
#Requisition_info{
margin-top: 5px;
}
.dataTables_wrapper{
padding-bottom: 0;
}
</style>
<style>
#Requisition_filter {
float: inline-end;
}
<script>
#Requisition_wrapper .row .col-sm-4 {
flex-basis: 50%;
float: inline-end;
}
function DeleteRow(rowid)
{
id = rowid;
var answer = confirm(" Do you want to delete the Requisition?")
if (answer)
{
$.ajax({
data:{id:id},
type:"POST",
url:"<?php echo base_url() ?>requisitionform/DeleteReqNo",
success: function (data) {
if (data && data.message) {
alert(data.message);
location.reload(true);
} else {
alert("Error Occur");
}
},
error: function (xhr, status, error) {
alert("Request failed: " + error);
}
});
}
}
#Requisition_paginate .pagination {
flex-basis: 50%;
float: inline-end;
margin: 0 0 15px;
}
#Requisition_wrapper .row:nth-child(3),
#Requisition_wrapper .row:nth-child(1) {
padding: 0 15px;
}
#Requisition_info {
margin-top: 5px;
}
.dataTables_wrapper {
padding-bottom: 0;
}
</script>
<style>
span.highlight {
background-color: yellow;
}
</style>
<style>
.Date-filter-form {
display: flex;
align-items: center;
gap: 10px; /* Adjust the gap as needed */
}
.Date-filter-form input, .Date-filter-form button {
padding: 5px;
font-size: 14px;
}
.Date-filter-form button {
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
}
.Date-filter-form button:hover {
background-color: #0056b3;
}
.icon-button {
background: none;
border: none;
cursor: pointer;
color: #007bff;
font-size: 18px;
}
.icon-button:hover {
color: #0056b3;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<center><b><h3 class="box-title">Requisition Listing</h3></b></center>
</div><!-- /.box-header -->
<?php if($DraftCount > 0 ) {?><p style="text-align: center;">
<span class="highlight">The Requisition No <b><?php echo $ReqNo;?></b> is in Draft status.</span> Please act on the requisition.<span class="highlight">Then only you can raise New Requisition. </span>
</p> <?php } ?>
<div class="row">
<div class="col-md-12 text-right" style="margin-left:-2%;">
<div class="form-group">
<?php if($DraftCount == 0)
{ ?>
<a class="btn btn-success" onclick="Test()" href="<?php echo base_url(); ?>RequisitionForm">Raise New Requisition</a><?php }?>
</div>
</div>
</div>
<table id="Requisition" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>Requisted Date</th>
<th>Requisition No</th>
<th>Requisition Type</th>
<th>Tot No.OfLineItem </th>
<th>Po CreatedLineItem</th>
<th>Partially PoCreatedLineItem</th>
<th>NewLine Item</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<div class="box">
<div class="box-header">
<center><b>
<h3 class="box-title">Requisition Listing</h3>
</b></center>
</div><!-- /.box-header -->
<?php if($DraftCount > 0 ) {?><p style="text-align: center;">
<span class="highlight">The Requisition No <b><?php echo $ReqNo;?></b> is in Draft
status.</span> Please act on the requisition.<span class="highlight">Then only you can raise
New Requisition. </span>
</p> <?php } ?>
<div class="row">
<div class="col-md-12 text-right" style="margin-left:-2%;">
<div class="form-group">
<div class="col-md-8">
<form class="Date-filter-form" id="DateRangeFilter" >
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
</div>
<div class="col-md-4">
<?php if($DraftCount == 0) { ?>
<a class="btn btn-success" onclick="Test()"
href="<?php echo base_url(); ?>RequisitionForm">Raise New Requisition</a>
<?php }?>
</div>
</div>
</div>
</div>
<table id="Requisition" class="table table-bordered table-hover"
style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>Requisted Date</th>
<th>Requisition No</th>
<th>Requisition Type</th>
<th>Tot No.OfLineItem </th>
<th>Po CreatedLineItem</th>
<th>Partially PoCreatedLineItem</th>
<th>NewLine Item</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<?php
<?php
if(!empty($TotNoOfLine))
{
foreach($TotNoOfLine as $record)
{ //print_r($record);
?>
<tr>
<td> <?php $Pdt = new DateTime($record->CreatedDate );
<tr>
<td> <?php $Pdt = new DateTime($record->CreatedDate );
$PODate = $Pdt->format('d-m-Y');
echo $PODate ?>
</td>
<td><?php echo $record->ReqNo ?></td>
<td><?php echo $record->ReqType ?></td>
<td><?php echo $record->TotalNoofLineItems ?></td>
<td><?php echo $record->PolineItems ?></td>
<td><?php echo $record->PartilallyLineItems ?></td>
<td> <?php echo $record->newLineItem ?></td>
</td>
<td><?php echo $record->ReqNo ?></td>
<td><?php echo $record->ReqType ?></td>
<td><?php echo $record->TotalNoofLineItems ?></td>
<td><?php echo $record->PolineItems ?></td>
<td><?php echo $record->PartilallyLineItems ?></td>
<td> <?php echo $record->newLineItem ?></td>
<td><?php echo $record->StatusName ?></td>
<td> <a data-toggle="tooltip" href="<?php echo base_url().'EditRequisitionForm?ReqNo='.$record->ReqNo.'&ReqType='.$record->ReqType; ?>"><i class="fa fa-pencil" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requisition details"></i>&nbsp;&nbsp;&nbsp;</a> <a data-toggle="tooltip" onclick="DeleteRow('<?php echo $record->ReqNo; ?>' )" ><span class="glyphicon glyphicon-trash" title="<?php echo $record->ReqNo; ?> - Click here to Delete Requisition details"></span></a> </td>
</tr>
<?php
<td><?php echo $record->StatusName ?></td>
<td> <a data-toggle="tooltip"
href="<?php echo base_url().'EditRequisitionForm?ReqNo='.$record->ReqNo.'&ReqType='.$record->ReqType; ?>"><i
class="fa fa-pencil" data-toggle="tooltip"
title="<?php echo $record->ReqNo; ?> - Click here to view Requisition details"></i>&nbsp;&nbsp;&nbsp;</a>
<a data-toggle="tooltip" onclick="DeleteRow('<?php echo $record->ReqNo; ?>' )"><span
class="glyphicon glyphicon-trash"
title="<?php echo $record->ReqNo; ?> - Click here to Delete Requisition details"></span></a>
</td>
</tr>
<?php
}
}
?>
</table>
</table>
</div>
</div>
</div>
</section>
</div>
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
<script>
$(function () {
// $('#Requisition').DataTable({
// "paging": true,
// "lengthChange": true,
// "searching": true,
// "ordering": true,
// "columnDefs": [{"targets": 0, "type": "date-eu"}],
// "aaSorting": [[1, "desc"]],
// "info": true,
// "autoWidth": true,
// "pageLength": 10
// });
</div>
</div>
</section>
</div>
$(document).ready(function() {
$('#Requisition').DataTable({
"paging": true, // Enable pagination
"lengthChange": true, // Enable the option to change the number of rows per page
"searching": true, // Enable searching
"ordering": true, // Enable column ordering
"columnDefs": [{"targets": 0, "type": "date-eu"}], // Column definitions for date formatting
"aaSorting": [[1, "desc"]], // Default sorting: sort by the 2th column (index 1) in descending order
"info": true, // Show pagination info
"autoWidth": true, // Enable automatic column width adjustment
"pageLength": 10, // Set the default number of rows per page to 10
"lengthMenu": [10, 25, 50, 100] // Options for the number of rows per page in the dropdown
});
});
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
<script>
function DeleteRow(rowid) {
id = rowid;
var answer = confirm(" Do you want to delete the Requisition?")
if (answer) {
$.ajax({
data: {
id: id
},
type: "POST",
url: "<?php echo base_url() ?>requisitionform/DeleteReqNo",
success: function(data) {
if (data && data.message) {
alert(data.message);
location.reload(true);
} else {
alert("Error Occur");
}
},
error: function(xhr, status, error) {
alert("Request failed: " + error);
}
});
}
}
</script>
});
</script>
<script>
$(document).ready(function() {
// Initialize the DataTable
var table = $('#Requisition').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 0,
"type": "date-eu"
}],
"aaSorting": [
[1, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
});
// Initialize the datepickers
$("#fromDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var minDate = $(this).datepicker("getDate");
$("#toDate").datepicker("option", "minDate", minDate);
}
});
$("#toDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var maxDate = $(this).datepicker("getDate");
$("#fromDate").datepicker("option", "maxDate", maxDate);
}
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").datepicker("setDate", null);
$("#toDate").datepicker("setDate", null);
$("#toDate").datepicker("option", "minDate", null);
$("#fromDate").datepicker("option", "maxDate", null);
table.draw();
});
// Date range filter
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $("#fromDate").datepicker("getDate");
var toDate = $("#toDate").datepicker("getDate");
var dateStr = data[0]; // Assuming the date is in the first column
// Convert dateStr to Date object
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
if (!fromDate || !toDate) {
return true; // No filter if dates are not selected
}
return date >= fromDate && date <= toDate;
}
);
// Handle form submission
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw();
});
});
</script>

View File

@ -670,7 +670,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label>Supplier<span class="badge mandatory">*</span></label>
<label>Select Supplier<span class="badge mandatory">*</span></label>
<?php
$options = array("0" => 'Select Supplier');
@ -688,7 +688,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="col-md-3">
<label>Address</label>
<label>Supplier Address</label>
<div class="form-group">
<?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40');
@ -814,7 +814,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label>Service Type Options</label>
<label>Service Type Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
//$optionsWork = array("0"=>'Select Work Status');
@ -830,7 +830,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label>Payment Terms</label>
<label>Payment Terms<span class="badge mandatory">*</span></label>
<?php
if (!empty($Payment)) {
$options6 = array("0" => 'Select Payment Terms ');
@ -859,7 +859,7 @@ if (!empty($INRSYMBOL)) {
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Insurance Options</label>
<label>Insurance Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -890,7 +890,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<?php
@ -903,15 +903,15 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
</div>
<div class="col-md-12">
<div class="row">
<div class="btn-container" style="text-align: right; ">
<a data-toggle="modal"><button type="submit" onclick="openModal();" class="btn btn-success" id="abcd">Select Line Item</button> </a>
</div>
</div>
</div>
<div class="container-fluid">
<table class="table table-bordered" style="border:1px solid #333" id="ServiceTable">
<div style="padding-right:10px">
<div align="right">
<a data-toggle="modal"><button type="submit" onclick="openModal();" class="btn btn-success" id="abcd">Select Line Item</button> </a>
<!-- Model for Add servicepo -->
<div class="modal fade" id="SERVICE" role="dialog">
<div class="modal-dialog">
@ -1207,296 +1207,295 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
</div>
<!-- END of model for Add servicepo -->
<!-- Edit Service po moddel-->
<div class="modal fade" id="EDITSERVICE" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<form>
<div class="modal-content" style="width:900px;">
<div class="modal-header">
<!-- <button type="button" class="close" data-dismiss="modal">&times;</button> -->
<center>
<h4>Edit Service Purchase Order Item </h4>
</center>
</div>
<div align="left">
<div class="col-md-12">
<div class="col-md-3">
<label>Req No<span class="badge mandatory">*</span></label>
<div>
<?php
$data = array('name' => 'EditReqNo', 'value' => set_value('EditReqNo'), 'id' => 'EditReqNo', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Department Name</label>
<div class="form-group">
<?php
$data = array('name' => 'EditdeptName', 'value' => set_value('EditdeptName'), 'id' => 'EditdeptName', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Cost Center Code</label>
<div class="form-group">
<?php
$data = array('name' => 'EditCostCenter', 'value' => set_value('EditCostCenter'), 'id' => 'EditCostCenter', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Avail Budget Amount <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAvlBudAmt', 'value' => set_value('EditAvlBudAmt'), 'id' => 'EditAvlBudAmt', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<!-- END of model for Add servicepo -->
<!-- Edit Service po moddel-->
<div class="modal fade" id="EDITSERVICE" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<form>
<div class="modal-content" style="width:900px;">
<div class="modal-header">
<!-- <button type="button" class="close" data-dismiss="modal">&times;</button> -->
<center>
<h4>Edit Service Purchase Order Item </h4>
</center>
</div>
<div class="col-md-12">
<div class="col-md-3">
<label>Item Code<span class="badge mandatory" #fff ;">*</span></label>
<div>
<?php
$options = array("0" => 'Item Code');
//print_r( $options);
<div align="left">
echo form_dropdown('EditMaterialCode', $options, set_value('EditMaterialCode'), 'id="EditMaterialCode"', 'class="form-control"');
?>
</div>
</div>
<div class="col-md-3">
<label>Item Name</label>
<div class="form-group">
<?php
$data = array('name' => 'EditItemName', 'value' => set_value('EditItemName'), 'id' => 'EditItemName', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3" id=EditotherDescription>
<label>Item Description</label>
<div class="form-group">
<?php
$data = array('name' => 'EditOtheritemDescription', 'value' => set_value('EditOtheritemDescription'), 'id' => 'EditOtheritemDescription', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>UOM</label>
<div class="form-group">
<?php
$data = array('name' => 'EditUOM', 'value' => set_value('EditUOM'), 'id' => 'EditUOM', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Service Schedule Type</label>
<div>
<?php
$data = array('name' => 'EditFrequency', 'value' => set_value('EditFrequency'), 'id' => 'EditFrequency', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
<input type="hidden" name="EditFrequencyNo" id="EditFrequencyNo" value="EditFrequencyNo" />
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-3">
<label>Quantity<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange()');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'EditRate', 'value' => set_value('EditRate'), 'id' => 'EditRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange()');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Per</label><!--date should be come-->
<?php
$data = array('name' => 'EditPer', 'value' => set_value('EditPer'), 'id' => 'EditPer', 'class' => 'form-control');
echo form_input($data); ?>
</div>
<div class="col-md-3">
<label><?php echo "Basic Amount ($INRSYM)"; ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditBasicValue', 'value' => set_value('txtEditBasicValue'), 'id' => 'txtEditBasicValue', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-6" align="right">
CGST In %
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditCgst', 'value' => set_value('EditCgst'), 'id' => 'EditCgst', 'class' => 'form-control num', 'placeholder' => 'CGST TAX PERCENTAGE', 'onchange' => 'EditRatechange();ChangeEditSgst();', 'onkeypress' => 'return isNumberKey(event);');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditAfterCgst', 'value' => set_value('EditAfterCgst'), 'id' => 'EditAfterCgst', 'class' => 'form-control num', 'placeholder' => 'After CGST', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-6" align="right">
SGST In %
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditSgst', 'value' => set_value('EditSgst'), 'id' => 'EditSgst', 'class' => 'form-control num', 'placeholder' => 'SGST TAX PERCENTAGE', 'onchange' => 'EditRatechange()', 'onkeypress' => 'return isNumberKey(event);');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditAfterSgst', 'value' => set_value('EditAfterSgst'), 'id' => 'EditAfterSgst', 'class' => 'form-control num', 'placeholder' => 'After SGST', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-6" align="right">
IGST In %
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditIgst', 'value' => set_value('EditIgst'), 'id' => 'EditIgst', 'class' => 'form-control num', 'placeholder' => 'IGST TAX PERCENTAGE', 'onchange' => 'EditRatechange()', 'onkeypress' => 'return isNumberKey(event);');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditAfterIgst', 'value' => set_value('EditAfterIgst'), 'id' => 'EditAfterIgst', 'class' => 'form-control num', 'placeholder' => 'After IGST', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-5 col-md-offset-4" align="right">
<label>Other Allowances <?php echo "($INRSYM)" ?></label>
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditOtherAllowances', 'value' => set_value('EditOtherAllowances', 0), 'id' => 'EditOtherAllowances', 'class' => 'form-control num', 'placeholder' => 'Other Allowances', 'onchange' => 'EditRatechange()', 'onkeypress' => 'return isNumberKey(event);');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-5 col-md-offset-4" align="right">
<label><?php echo "Total Order Value ($INRSYM)"; ?></label>
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditTotalOrderValue', 'value' => set_value('EditTotalOrderValue'), 'id' => 'EditTotalOrderValue', 'class' => 'form-control num', 'placeholder' => 'Total value', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" style="padding: 0px 30px 10px 30px;">
<label>Service Description </label>
<?php
$data = array('name' => 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction'), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
echo form_textarea($data); ?>
</div>
<div class="modal-footer">
<div class="col-md-12">
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
<a class="btn btn-success font EditService" ID="Edit">&nbsp;&nbsp;<span class="bold">Update Service</span></a>
<div class="col-md-3">
<label>Req No<span class="badge mandatory">*</span></label>
<div>
<?php
$data = array('name' => 'EditReqNo', 'value' => set_value('EditReqNo'), 'id' => 'EditReqNo', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Department Name</label>
<div class="form-group">
<?php
$data = array('name' => 'EditdeptName', 'value' => set_value('EditdeptName'), 'id' => 'EditdeptName', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Cost Center Code</label>
<div class="form-group">
<?php
$data = array('name' => 'EditCostCenter', 'value' => set_value('EditCostCenter'), 'id' => 'EditCostCenter', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Avail Budget Amount <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAvlBudAmt', 'value' => set_value('EditAvlBudAmt'), 'id' => 'EditAvlBudAmt', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-3">
<label>Item Code<span class="badge mandatory" #fff ;">*</span></label>
<div>
<?php
$options = array("0" => 'Item Code');
//print_r( $options);
echo form_dropdown('EditMaterialCode', $options, set_value('EditMaterialCode'), 'id="EditMaterialCode"', 'class="form-control"');
?>
</div>
</div>
<div class="col-md-3">
<label>Item Name</label>
<div class="form-group">
<?php
$data = array('name' => 'EditItemName', 'value' => set_value('EditItemName'), 'id' => 'EditItemName', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3" id=EditotherDescription>
<label>Item Description</label>
<div class="form-group">
<?php
$data = array('name' => 'EditOtheritemDescription', 'value' => set_value('EditOtheritemDescription'), 'id' => 'EditOtheritemDescription', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>UOM</label>
<div class="form-group">
<?php
$data = array('name' => 'EditUOM', 'value' => set_value('EditUOM'), 'id' => 'EditUOM', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Service Schedule Type</label>
<div>
<?php
$data = array('name' => 'EditFrequency', 'value' => set_value('EditFrequency'), 'id' => 'EditFrequency', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
<input type="hidden" name="EditFrequencyNo" id="EditFrequencyNo" value="EditFrequencyNo" />
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-3">
<label>Quantity<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange()');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'EditRate', 'value' => set_value('EditRate'), 'id' => 'EditRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange()');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Per</label><!--date should be come-->
<?php
$data = array('name' => 'EditPer', 'value' => set_value('EditPer'), 'id' => 'EditPer', 'class' => 'form-control');
echo form_input($data); ?>
</div>
<div class="col-md-3">
<label><?php echo "Basic Amount ($INRSYM)"; ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditBasicValue', 'value' => set_value('txtEditBasicValue'), 'id' => 'txtEditBasicValue', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-6" align="right">
CGST In %
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditCgst', 'value' => set_value('EditCgst'), 'id' => 'EditCgst', 'class' => 'form-control num', 'placeholder' => 'CGST TAX PERCENTAGE', 'onchange' => 'EditRatechange();ChangeEditSgst();', 'onkeypress' => 'return isNumberKey(event);');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditAfterCgst', 'value' => set_value('EditAfterCgst'), 'id' => 'EditAfterCgst', 'class' => 'form-control num', 'placeholder' => 'After CGST', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-6" align="right">
SGST In %
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditSgst', 'value' => set_value('EditSgst'), 'id' => 'EditSgst', 'class' => 'form-control num', 'placeholder' => 'SGST TAX PERCENTAGE', 'onchange' => 'EditRatechange()', 'onkeypress' => 'return isNumberKey(event);');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditAfterSgst', 'value' => set_value('EditAfterSgst'), 'id' => 'EditAfterSgst', 'class' => 'form-control num', 'placeholder' => 'After SGST', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-6" align="right">
IGST In %
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditIgst', 'value' => set_value('EditIgst'), 'id' => 'EditIgst', 'class' => 'form-control num', 'placeholder' => 'IGST TAX PERCENTAGE', 'onchange' => 'EditRatechange()', 'onkeypress' => 'return isNumberKey(event);');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditAfterIgst', 'value' => set_value('EditAfterIgst'), 'id' => 'EditAfterIgst', 'class' => 'form-control num', 'placeholder' => 'After IGST', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-5 col-md-offset-4" align="right">
<label>Other Allowances <?php echo "($INRSYM)" ?></label>
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditOtherAllowances', 'value' => set_value('EditOtherAllowances', 0), 'id' => 'EditOtherAllowances', 'class' => 'form-control num', 'placeholder' => 'Other Allowances', 'onchange' => 'EditRatechange()', 'onkeypress' => 'return isNumberKey(event);');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-5 col-md-offset-4" align="right">
<label><?php echo "Total Order Value ($INRSYM)"; ?></label>
</div>
<div class="col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'EditTotalOrderValue', 'value' => set_value('EditTotalOrderValue'), 'id' => 'EditTotalOrderValue', 'class' => 'form-control num', 'placeholder' => 'Total value', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" style="padding: 0px 30px 10px 30px;">
<label>Service Description </label>
<?php
$data = array('name' => 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction'), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
echo form_textarea($data); ?>
</div>
<div class="modal-footer">
<div class="col-md-12">
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
<a class="btn btn-success font EditService" ID="Edit">&nbsp;&nbsp;<span class="bold">Update Service</span></a>
</div>
</div>
</div>
</div>
</form>
</form>
</div>
</div>
</div>
</div>
<!-- End of Model for EDIT servicepo -->
<!-- End of Model for EDIT servicepo -->
</table>
</div>
<div class="box-body">
@ -1523,8 +1522,8 @@ if (!empty($INRSYMBOL)) {
</table>
</div>
</table>
<div class="row" style="border: 1px solid">
<div class="row">
<div class="col-md-12" style="padding: 0px;">
<div class="col-md-2">
@ -1604,9 +1603,12 @@ if (!empty($INRSYMBOL)) {
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction">
<input type="hidden" name="txtDeliveryAddress" id="txtDeliveryAddress">
<input type="hidden" name="Budget" id="Budget" />
<a class="btn btn-reset Save" ID="Cancel" onclick="Reset();">&nbsp;&nbsp;<span class="bold">Reset</span></a>
<a class="btn btn-success Save" ID="Save" onclick="Save(0)">&nbsp;&nbsp;<span class="bold">Save as Draft</span></a>
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
<div class="btn-container" style="text-align: right;">
<a class="btn btn-reset Save" ID="Cancel" onclick="Reset();">&nbsp;&nbsp;<span class="bold">Reset</span></a>
<a class="btn btn-success Save" ID="Save" onclick="Save(0)">&nbsp;&nbsp;<span class="bold">Save as Draft</span></a>
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
</div>
</div><br />
</div>
</div>

View File

@ -13,43 +13,41 @@
th {
white-space: nowrap;
}
.Date-filter-form {
display: flex;
align-items: center;
gap: 10px; /* Adjust the gap as needed */
}
.Date-filter-form input, .Date-filter-form button {
padding: 5px;
font-size: 14px;
}
.Date-filter-form button {
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
}
.Date-filter-form button:hover {
background-color: #0056b3;
}
.icon-button {
background: none;
border: none;
cursor: pointer;
color: #007bff;
font-size: 18px;
}
.icon-button:hover {
color: #0056b3;
}
</style>
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
<!-- Latest DataTables Buttons CSS -->
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.3.4/css/buttons.dataTables.min.css">
<style>
.dataTables_wrapper .dataTables_length select {
background-color:white !important;
}
.dataTables_wrapper .dataTables_filter input {
background-color: white !important;
}
button.dt-button, div.dt-button, a.dt-button, input.dt-button {
background-color: white !important;
}
.dataTables_length, label{
display: flex !important;
}
.dataTables_wrapper .dataTables_filter {
text-align: center;
}
.dataTables_wrapper .dataTables_length {
float: left;
}
.dataTables_wrapper .dt-buttons {
float: right;
}
.dataTables_wrapper .clear {
clear: both;
}
<style>
th, td {
white-space: nowrap;
}
.dataTables_wrapper {
width: 100%;
overflow-x: auto;
}
</style>
</style>
<script>
$(function() {
var d = new Date();
@ -77,12 +75,25 @@
<center><b><h3 class="box-title">View Inward Gate Register </h3></b></center>
</div>
<div class="row">
<form class="Date-filter-form" id="DateRangeFilter" >
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="col-md-12">
<table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th style="display:none;"></th>
<th>Created Date</th>
<th>Create Date</th>
<th>Create time</th>
<th>IGR No</th>
<th>PO No</th>
<th>Supplier Name</th>
@ -98,15 +109,18 @@
if(!empty($IGR))
{ $index = 0;
foreach($IGR as $record)
{ $index = $index +1;
{ $index = $index +1;
$createddate = new DateTime($record->CreatedDate);
$datewithtime = $createddate->format('d-m-Y h:i A');
$date = $createddate->format('d-m-Y');
$time = $createddate->format('h:i A');
?>
<tr id="<?php echo $index ?>" >
<th style="display:none;"><?php echo $record->CreatedDate ?></th>
<td align="right"><?php
$createddate = new DateTime($record->CreatedDate);
echo $createddate->format('d-m-Y h:i A'); ?></td>
<td align="right"><?php echo $date; ?></td>
<td align="right"><?php echo $time; ?></td>
<td><a data-toggle="modal" data-target="#Igrshow" data-id="<?php echo $index;?>" data-inx="<?php echo $index;?>" data-userid="<?php echo $record->IGRNO ?>" data-igrstatus="<?php echo $record->IGRStatus ?>"> <u><?php echo $record->IGRNO ?></u></a></td>
<td><a target="_blank" data-toggle="modal" data-target="#CostCentershow" data-id="<%=index%>" title="Cost Center" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><u><?php echo $record->PONO ?></u></a></td>
<td><a data-toggle="modal" data-target="#CostCentershow" data-id="<?php echo $index;?>" data-igno="<?php echo $record->IGRNO;?>" data-pono="<?php echo $record->PONO ?>" target="_blank"> <u><?php echo $record->PONO ?></u></a></td>
<td><?php echo $record->SupplierName ?></td>
<td><?php echo $record->DeliveryChellanOrInvoiceNo ?></td>
<td align="right"><?php
@ -114,12 +128,17 @@
echo $date->format('d-m-Y'); ?></td>
<td><?php echo $record->VehicleNo ?></td>
<td><?php echo $record->IGRStatus == 'ST074' ? 'Draft' : 'Completed'; ?></td>
<td><?php if (!empty($record->FilePath)) { ?>
<a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Files" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><i class="fa fa-clone" style="text-align: center;"></i></a>
<td>
<a target="_blank" href="<?php echo base_url('download-files/' . $record->IGRNO); ?>">
<i class="fa fa-download" style="text-align: center;"></i>
</a>
&nbsp;
<?php if (!empty($record->FilePath)) { ?>
<!-- <a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Files" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><i class="fa fa-clone" style="text-align: center;"></i></a> -->
<?php } else if (!empty($record->file)) { ?>
<a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Files" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><i class="fa fa-clone" style="text-align: center;"></i></a>
<!-- <a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Files" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><i class="fa fa-clone" style="text-align: center;"></i></a> -->
<?php } else { ?>
<a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Files" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><i class="fa fa-clone" style="text-align: center;"></i></a>
<!-- <a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Files" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><i class="fa fa-clone" style="text-align: center;"></i></a> -->
<?php } ?>
&nbsp;
<a target="_blank" data-toggle="modal" data-target="#Historyshow" data-id="<%=index%>" title="IGR History" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>">
@ -173,6 +192,8 @@
?>
</div>
<input type="hidden" id="IGRNO1" name="IGRNumber" readonly>
<input type="hidden" id="PONO1" name="PONumber" readonly>
</div>
<div class="col-md-12" style="margin: 10px 0;">
<div class="col-md-4">
@ -224,15 +245,15 @@
<table class="table table-bordered" id="Inwardgateregistertable1 table-hover" style="background-color:#fff; font-size:12px;">
<thead style="background-color:#ddd !important">
<tr>
<th>SNo</th>
<th>Item Code</th>
<th>Item Description</th>
<th>UOM</th>
<th>Ordred Qty</th>
<th>Received Qty</th>
<th id="pendingQuantityHeader" style="display:none;">Pending Qty</th>
<th>Remarks</th>
<th></th>
<th style="width: 50px;">SNo</th>
<th style="width: 100px;">Item Code</th>
<th style="width: 200px; word-wrap: break-word; word-break: break-all; white-space: normal;">Item Description</th>
<th style="width: 50px;">UOM</th>
<th style="width: 100px;">Ordered Qty</th>
<th style="width: 100px;">Received Qty</th>
<th id="pendingQuantityHeader" style="display:none; width: 100px;">Pending Qty</th>
<th style="width: 150px;">Remarks</th>
<th style="width: 50px;"></th>
</tr>
</thead>
<tbody id="tbleIGRAppend">
@ -248,7 +269,7 @@
</tbody>
</table>
<div class="modal-footer">
<!-- <a class="btn btn-primary" id="update" value="Update">Update</a> -->
<div class="col-md-4 col-md-offset-8">
<input type="file" name="MasterFile" id="MasterFile" onchange="Copyfilenames(this.name); ">
@ -256,14 +277,25 @@
<a><span></span><small></small></a>
</label>
</div>
<div class="buttonContainer">
<a class="btn btn-cancel" data-dismiss="modal" value="Close">Close</a>
<a class="btn btn-primary" id="draftIGR" value="draftIGR">Draft IGR</a>
<a class="btn btn-primary" id="generateIGR" value="generateIGR">Generate IGR</a>
<div class="files">
<div class="col-md-4 col-md-offset-8" style="padding: 15px 0px;">
<button type="button" class="btn btn-primary btn-sm a1"
onclick="appendFilesFileds()" id="day">
Add Additional File
</button>
</div>
<div id="existingContainer"></div>
<div id="filesContainer"></div>
</div><br>
<div class="modal-footer">
<div class="buttonContainer">
<a class="btn btn-cancel" data-dismiss="modal" value="Close">Close</a>
<a class="btn btn-primary" id="draftIGR" value="draftIGR">Save as Draft IGR</a>
<a class="btn btn-primary" id="generateIGR" value="generateIGR">Generate IGR</a>
</div>
</div>
</div>
</div>
</form>
</div>
@ -449,8 +481,6 @@
<form class="tagForm" id="tag-form" method="post" enctype="multipart/form-data">
<div class="modal-body" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-5">
@ -538,11 +568,13 @@
// success:function(data) {
$('#content').loader('hide');
var parsedData = JSON.parse(data);
if (parsedData.length === 0) {
console.log(parsedData);
if (parsedData['details'].length === 0) {
console.log("No data available");
// Reset all relevant fields and table
$('#IgrshowTitle').text('');
$("#IGRNO1").val('');
$("#PONO1").val('');
$("#txtIGRLineItem").val('');
$('#printLink').attr('href', '#');
$('.help-block').text('');
@ -566,11 +598,12 @@
var trIGRHTML = '';
$.each(parsedData, function(i, item) {
$.each(parsedData['details'], function(i, item) {
if (igr == item.IGRNO) {
console.log(item);
$('#IgrshowTitle').text(" ( " + item.IGRNO + " ) ");
$("#IGRNO1").val(item.IGRNO);
$("#PONO1").val(item.PONO);
$("#txtIGRLineItem").val(item.IGRItemNo);
var baseUrl = '<?php echo base_url(); ?>purchaseorder/CreatePOPrint';
var newUrl = baseUrl + '?PONO=' + item.PONO + '&ReqType=' + item.POType;
@ -617,15 +650,15 @@
$("#pendingQuantityHeader").css("display", "table-cell");
trIGRHTML += '<tr>' +
'<td align="right">' + i + '</td>' +
'<td name="MaterialName" onchange="test(' + i + ')">' + item.MaterialCode + '</td>' +
'<td>' + item.MaterialName + '</td>' +
'<td name="UOM">' + item.UOM + '</td>' +
'<td align="right" id="Quantity' + i + '" name="Quantity">' + parseInt(item.Quantity) + '</td>' +
'<td align="right" data-name="sel" ><input type="text" onchange="validateReceivedQuantity(' + i + ')"id="QuantityAsPerInvoice' + i + '" name="QuantityAsPerInvoice' + i + '" value="' + parseInt(item.QuantityAsPerInvoice) + '" onkeypress="return isNumberKey(event);" style="width: 75px;"></td>' +
'<td name="PendingQuantity' + i + '" id="PendingQuantity' + i + '">' + parseInt(item.Quantity - item.QuantityAsPerInvoice) + '</td>' +
'<td><input type="text" id="Remark' + i + '" name="Remark' + i + '" class="form" onchange="SetRemarks(' + i + ')" style="width: 75px;"> </td>' +
'<td><a target="_blank" data-toggle="modal" data-target="#WeightCalculator" title="Weight Calculator" data-index="'+i+'" data-material="'+item.MaterialName+'" data-igrstatus = "'+igrstatus+'"><i class="fa fa-solid fa-truck" style="text-align: center;"></i></a> </td>' +
'<td style="width: 50px;" align="right">' + i + '</td>' +
'<td style="width: 100px;" name="MaterialName" onchange="test(' + i + ')">' + item.MaterialCode + '</td>' +
'<td style="width: 200px; word-wrap: break-word; word-break: break-all; white-space: normal;">' + item.MaterialName + '</td>' +
'<td style="width: 50px;" name="UOM">' + item.UOM + '</td>' +
'<td style="width: 100px;" align="right" id="Quantity' + i + '" name="Quantity">' + parseInt(item.Quantity) + '</td>' +
'<td style="width: 100px;" align="right" data-name="sel" ><input type="text" onchange="validateReceivedQuantity(' + i + ')"id="QuantityAsPerInvoice' + i + '" name="QuantityAsPerInvoice' + i + '" value="' + parseInt(item.QuantityAsPerInvoice) + '" onkeypress="return isNumberKey(event);" style="width: 75px;"></td>' +
'<td style="width: 100px;" name="PendingQuantity' + i + '" id="PendingQuantity' + i + '">' + parseInt(item.Quantity - item.QuantityAsPerInvoice) + '</td>' +
'<td style="width: 150px;"><input type="text" id="Remark' + i + '" name="Remark' + i + '" class="form" onchange="SetRemarks(' + i + ')" style="width: 75px;"> </td>' +
'<td style="width: 50px;"><a target="_blank" data-toggle="modal" data-target="#WeightCalculator" title="Weight Calculator" data-index="'+i+'" data-material="'+item.MaterialName+'" data-igrstatus = "'+igrstatus+'"><i class="fa fa-solid fa-truck" style="text-align: center;"></i></a> </td>' +
'<input type="hidden" id="IGRNO' + i + '" name="IGRNO' + i + '" value="' + item.IGRNO + '">' +
'<input type="hidden" id="MaterialCode' + i + '" name="MaterialCode' + i + '" value="' + item.MaterialCode + '">' +
'<input type="hidden" id="txtQuantityAsPerInvoice' + i + '" name="txtQuantityAsPerInvoice' + i + '" value="' + item.QuantityAsPerInvoice + '">' +
@ -648,14 +681,14 @@
} else {
$("#pendingQuantityHeader").css("display", "none");
trIGRHTML += '<tr>' +
'<td align="right">' + i + '</td>' +
'<td name="MaterialName" id="MaterialCode" onchange="test(' + i + ')">' + item.MaterialCode + '</td>' +
'<td>' + item.MaterialName + '</td>' +
'<td name="UOM">' + item.UOM + '</td>' +
'<td align="right" name="Quantity">' + item.Quantity + '</td>' +
'<td align="right" data-name="sel" >' + item.QuantityAsPerInvoice + '</td>' +
'<td>' + item.Remarks + '</td>' +
'<td><a target="_blank" data-toggle="modal" data-target="#WeightCalculator" title="Weight Calculator" data-index="'+i+'" data-material="'+item.MaterialName+'" data-igrstatus = "'+igrstatus+'"><i class="fa fa-solid fa-truck" style="text-align: center;"></i></a> </td>' +
'<td style="width: 50px;" align="right">' + i + '</td>' +
'<td style="width: 100px;" name="MaterialName" id="MaterialCode" onchange="test(' + i + ')">' + item.MaterialCode + '</td>' +
'<td style="width: 200px; word-wrap: break-word; word-break: break-all; white-space: normal;">' + item.MaterialName + '</td>' +
'<td style="width: 50px;" name="UOM">' + item.UOM + '</td>' +
'<td style="width: 100px;" align="right" name="Quantity">' + item.Quantity + '</td>' +
'<td style="width: 100px;" align="right" data-name="sel" >' + item.QuantityAsPerInvoice + '</td>' +
'<td style="width: 150px;">' + item.Remarks + '</td>' +
'<td style="width: 50px;"><a target="_blank" data-toggle="modal" data-target="#WeightCalculator" title="Weight Calculator" data-index="'+i+'" data-material="'+item.MaterialName+'" data-igrstatus = "'+igrstatus+'"><i class="fa fa-solid fa-truck" style="text-align: center;"></i></a> </td>' +
'<input type="hidden" id="IGRNO' + i + '" name="IGRNO' + i + '" value="' + item.IGRNO + '">' +
'<input type="hidden" id="MaterialCode' + i + '" name="MaterialCode' + i + '" value="' + item.MaterialCode + '">' +
'<input type="hidden" id="txtQuantityAsPerInvoice' + i + '" name="txtQuantityAsPerInvoice' + i + '" value="' + item.QuantityAsPerInvoice + '">' +
@ -676,6 +709,11 @@
$("#tbleIGRAppend").empty();
$("#tbleIGRAppend").append(trIGRHTML);
if (parsedData['files'].length !== 0) {
$.each(parsedData['files'], function(i, item) {
appendExistingFilesFileds(item)
});
}
}
});
});
@ -701,6 +739,7 @@
$('#draftIGR').click(function(){
$('#content').loader('show');
var igrno = $("#IGRNO1").val();
var pono = $("#PONO1").val();
var status = 0;
var tableData = [];
$('#tbleIGRAppend tr').each(function(index) {
@ -720,8 +759,12 @@
};
tableData.push(rowData);
});
var formData = new FormData();
// file_name[]
// emp_file[]
formData.append('igr', igrno);
formData.append('po', pono);
formData.append('mrc', $("#MaterialRcvdDate").val());
formData.append('invdate', $("#Invoice_Date").val());
formData.append('vehicle_no', $('#Vehicle_No').val());
@ -730,6 +773,16 @@
formData.append('status', status);
formData.append('tableData', JSON.stringify(tableData));
formData.append('MasterFile', $('#MasterFile')[0].files[0]);
formData.append('file_name[]', $('#file_name').val());
var empFiles = $('#emp_file')[0] ? $('#emp_file')[0].files : null;
if (empFiles) {
for (var i = 0; i < empFiles.length; i++) {
formData.append('emp_file[]', empFiles[i]);
console.log(empFiles[i]);
}
}else{
console.log("ajax call");
}
$.ajax({
data: formData,
type: "POST",
@ -746,6 +799,7 @@
$('#generateIGR').click(function(){
$('#content').loader('show');
var igrno = $("#IGRNO1").val();
var pono = $("#PONO1").val();
var status = 1;
var tableData = [];
$('#tbleIGRAppend tr').each(function(index) {
@ -767,6 +821,7 @@
});
var formData = new FormData();
formData.append('igr', igrno);
formData.append('po', pono);
formData.append('mrc', $("#MaterialRcvdDate").val());
formData.append('invdate', $("#Invoice_Date").val());
formData.append('vehicle_no', $('#Vehicle_No').val());
@ -775,7 +830,16 @@
formData.append('status', status);
formData.append('tableData', JSON.stringify(tableData));
formData.append('MasterFile', $('#MasterFile')[0].files[0]);
formData.append('file_name[]', $('#file_name').val());
var empFiles = $('#emp_file')[0] ? $('#emp_file')[0].files : null;
if (empFiles) {
for (var i = 0; i < empFiles.length; i++) {
formData.append('emp_file[]', empFiles[i]);
console.log(empFiles[i]);
}
}else{
console.log("ajax call");
}
$.ajax({
data: formData,
type:"POST",
@ -1049,10 +1113,10 @@ $("#hidebillno").val(Billno);
function deleteBill(Billno,i){
$.ajax({
data: {
Billno: Billno,
id: Billno,
},
type: "POST",
url: "<?php echo base_url() ?>deleteBillFile",
url: "<?php echo base_url() ?>deleteAdditionalFile",
success: function(data) {
if (data) {
alert(data);
@ -1459,50 +1523,178 @@ function deleteBill(Billno,i){
}
</script>
<!-- Latest DataTables JS -->
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
<!-- Latest DataTables Buttons JS -->
<script src="https://cdn.datatables.net/buttons/2.3.4/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.13.6/sorting/datetime-moment.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
<script>
$(document).ready(function() {
// Initialize the DataTable
var table = $('#Inwardgateregistertable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 1,
"type": "date-eu"
}],
"aaSorting": [
[1, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
});
// Initialize the datepickers
$("#fromDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var minDate = $(this).datepicker("getDate");
$("#toDate").datepicker("option", "minDate", minDate);
}
});
$("#toDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var maxDate = $(this).datepicker("getDate");
$("#fromDate").datepicker("option", "maxDate", maxDate);
}
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").datepicker("setDate", null);
$("#toDate").datepicker("setDate", null);
$("#toDate").datepicker("option", "minDate", null);
$("#fromDate").datepicker("option", "maxDate", null);
table.draw();
});
// Date range filter
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $("#fromDate").datepicker("getDate");
var toDate = $("#toDate").datepicker("getDate");
var dateStr = data[1]; // Assuming the date is in the first column
// Convert dateStr to Date object
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
if (!fromDate || !toDate) {
return true; // No filter if dates are not selected
}
return date >= fromDate && date <= toDate;
}
);
// Handle form submission
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw();
});
});
</script>
<script>
function appendExistingFilesFileds(data){
const base_url = '<?php echo base_url(); ?>';
var filePath = data != null && data != '' ? data.FilePath : '';
var fileName = data != null && data != '' ? data.Remarks : '';
var billNo = data != null && data != '' ? data.BillNo : '';
var downloadUrl = `${base_url}public/uploads/Igrfiles/${filePath}`;
<script>
$(function () {
$.fn.dataTable.moment('DD-MM-YYYY');
$('#Inwardgateregistertable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": true,
"scrollCollapse": true,
"scrollX": true,
"pageLength": 25,
"order": [[0, "desc"]], // Assuming the "Created Date" is the first column and you want to order by it in descending order
"dom": '<"top"lBf>rt<"bottom"ip><"clear">', // Custom layout
"buttons": [
{
extend: 'excelHtml5',
text: 'Export to Excel',
title: 'Inward Gate Register',
exportOptions: {
columns: ':visible:not(:first-child):not(:last-child)' // Exclude first and last columns
}
},
{
extend: 'pdfHtml5',
text: 'Export to PDF',
title: 'Inward Gate Register',
exportOptions: {
columns: ':visible:not(:first-child):not(:last-child)' // Exclude first and last columns
}
}
]
});
var newRowHtml = `<div class="col-md-12 pad ">
<div class="col-md-4">
<span>File Name</span>
<input type="text" maxlength="255" class="form-control"
value="${fileName}" readonly>
</div>
<div class="col-md-1" style="margin-top: 25px;">
<a href="${downloadUrl}" 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"
value="${billNo}" onclick="removeContact(this)">Delete</button>
</div>
</div>`;
$('#existingContainer').append(newRowHtml);
}
function appendFilesFileds(data) {
var newRowHtml = `
<div class="col-md-12 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" id="emp_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>`;
$('#filesContainer').append(newRowHtml);
$('.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()
// }
// }
function removeContact(button) {
if (button.id != '') {
$.ajax({
data: {
id: button.id
},
type: "POST",
url: "<?php echo base_url();?>deleteAdditionalIGRFile",
success: function(data) {
if (data) {
alert("File removed");
return false;
}
}
});
</script>
}
$(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()
}
}
</script>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More