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->get('viewRawmaterial','Rawmaterialdetails::viewRawmaterial');
$routes->post('rawmaterialdetails/editRawmaterial', 'Rawmaterialdetails::editRawmaterial'); $routes->post('rawmaterialdetails/editRawmaterial', 'Rawmaterialdetails::editRawmaterial');
$routes->get('exportmaterial' , 'Rawmaterialdetails::exportmaterial'); $routes->get('exportmaterial' , 'Rawmaterialdetails::exportmaterial');
$routes->get('rawmaterialdetailsautocomplete' , 'Rawmaterialdetails::autocomplete');
// Cost Center Routes // Cost Center Routes
$routes->get('costListing', 'CostCenter::index'); $routes->get('costListing', 'CostCenter::index');
$routes->get('addCostCenter', 'CostCenter::addCostCenter'); $routes->post('fetchCostCenterDetails', 'CostCenter::fetchCostCenterDetails');// for Ajax both add and edit....
$routes->get('editCostCenter', 'CostCenter::editCostCenter');
$routes->get('deleteCostCenter', 'CostCenter::deleteCostCenter'); $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'); $routes->get('exportcost', 'CostCenter::exportcost');
// Asset Detail Routes // Asset Detail Routes
@ -87,6 +80,7 @@ $routes->get('exportasset', 'Assetdetails::exportasset');
// Employee Detail Routes // Employee Detail Routes
$routes->add('addemployee', 'Employeedetails::addemployee'); $routes->add('addemployee', 'Employeedetails::addemployee');
$routes->post('addNewEmployee', 'Employeedetails::AddNewEmployee'); $routes->post('addNewEmployee', 'Employeedetails::AddNewEmployee');
$routes->post('deleteEmployeeFile', 'Employeedetails::deleteEmployeeFile');
$routes->get('employeeListing', 'Employeedetails::index'); $routes->get('employeeListing', 'Employeedetails::index');
$routes->get('employeedetails/ViewEmployee', 'Employeedetails::ViewEmployee'); $routes->get('employeedetails/ViewEmployee', 'Employeedetails::ViewEmployee');
$routes->post('employeedetails/UpdateEmployee', 'Employeedetails::UpdateEmployee'); $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->get('ViewIGR', 'Inwardgateregister::viewIGR'); // View IGR PAGE - Working
$routes->post('ViewIGRDetails', 'Inwardgateregister::viewIGRDetails'); $routes->post('ViewIGRDetails', 'Inwardgateregister::viewIGRDetails');
$routes->post('GetIGRLineItemDetails', 'Inwardgateregister::getIGRLineItemDetails'); $routes->post('GetIGRLineItemDetails', 'Inwardgateregister::getIGRLineItemDetails');
$routes->post('deleteBillFile', 'Inwardgateregister::deleteBillFile');
$routes->post('SaveIGR', 'Inwardgateregister::SaveIGR');// Save IGR PAGE - Working $routes->post('SaveIGR', 'Inwardgateregister::SaveIGR');// Save IGR PAGE - Working
$routes->post('UpdateIGR', 'Inwardgateregister::UpdateIGR'); $routes->post('UpdateIGR', 'Inwardgateregister::UpdateIGR');
$routes->post('updateIGRWeight', 'Inwardgateregister::updateIGRWeight'); $routes->post('updateIGRWeight', 'Inwardgateregister::updateIGRWeight');
@ -260,7 +253,10 @@ $routes->post('UpdateIGRLineItem', 'Inwardgateregister::updateIGRLineItem');
$routes->post('ViewIGRHistory', 'Inwardgateregister::ViewIGRHistory'); $routes->post('ViewIGRHistory', 'Inwardgateregister::ViewIGRHistory');
$routes->post('getCostCenterData', 'Inwardgateregister::getCostCenterData'); $routes->post('getCostCenterData', 'Inwardgateregister::getCostCenterData');
$routes->post('ViewIGRfile', 'Inwardgateregister::ViewIGRfile'); $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'); $routes->post('inwardgateregister/edituploadfile', 'Inwardgateregister::edituploadfile');
// Application OGR Page // Application OGR Page

View File

@ -52,122 +52,52 @@ class CostCenter extends BaseController
} }
/** /**
* This function is used to load the add new cost Center */ * This function is used to add/edit Cost
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
*/ */
function saveCostCenter() public function fetchCostCenterDetails() {
{ $id = $this->request->getPost('id');
// $this->validator->setRules([ log_message('error', 'id: ' . $id);
// 'CostName' => 'trim|required', $CostCenterName = $this->request->getPost('CostCenterName');
// 'CostCode' => 'trim|required', $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();
// if ($this->validator->run() == FALSE) { $data = ['status' => false, 'message' => 'An error occurred while creating cost details'];
// $this->addCostCenter();
// } else {
$CostCode = $this->request->getPost('CostCode'); if ((int)$id == 0) {
$CostCode = ($CostCode !== null && is_string($CostCode)) ? strtoupper(trim($CostCode)) :null; $lastccid = $this->costcenter_model->lastCCID();
$CostName = $this->request->getPost('CostName'); log_message('error', 'LAST CodeCenterID : ' . $lastccid);
$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'); $newccid = (int)$lastccid++;
$ApproverName = $this->session->get('EmpID'); log_message('error', 'CodeCenterID with Incremented : ' . $newccid);
$comma_separated = explode(':', (string)$SelectedDepartment);
// $comma_separated = $this->costcenter_model->getDepartment();
// print_r($comma_separated);die;
$createddt = get_current_date_time(); $newccc = generateCostCenterCode($lastccid);
$CodeExists = $this->costcenter_model->checkCostDetailsExists($CostCode); log_message('error', 'newly Generated ccc : ' . $newccc);
if (count($CodeExists) == 0) {
$Cost = array('CostCenterCode' => $CostCode, 'CostCenterName' => $CostName, 'ApprovedBy' => $ApproverName, 'CreatedBy' => $CreateBy, 'createdDate' => $createddt); $Cost = ['CostCenterCode' => $newccc,
$this->costcenter_model->saveCostCenter($Cost); '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 { } else {
$Cost = ['CostCenterName' => $CostCenterName,'UpdatedBy' => $userId,'UpdatedDate' => $currentdt];
$CostCenterID = $CostCode; if ($this->costcenter_model->updateCostCenter($Cost, $id) > 0) {
$data = ['status' => true, 'message' => 'Successfully updated cost details'];
}
} }
$data['CostMaster'] = $this->costcenter_model->GetCostCenterMaster($CostCenterID); return $this->response->setJSON($data);
$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);
} }
/**
* delete the Cost
*/
function deleteCostCenter($CostCode = NULL) 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() function exportcost()
{ {

View File

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

View File

@ -15,7 +15,9 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx; use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use PhpOffice\PhpSpreadsheet\Style\Alignment; use PhpOffice\PhpSpreadsheet\Style\Alignment;
use App\Models\EmpFilesModel;
use App\Models\AppConfigModel;
use App\Models\Emppaydate_model;
/** /**
* Module : Employee * Module : Employee
@ -29,8 +31,12 @@ class Employeedetails extends BaseController
{ {
protected $companydetailsmodel; protected $companydetailsmodel;
protected $employeedetails_model; protected $employeedetails_model;
protected $empFiles;
protected $appConfig;
protected $emppaydate_model;
protected $session; protected $session;
/** /**
* This is default constructor of the class * This is default constructor of the class
*/ */
@ -39,6 +45,9 @@ class Employeedetails extends BaseController
parent::__construct(); parent::__construct();
$this->employeedetails_model = new Employeedetails_model(); $this->employeedetails_model = new Employeedetails_model();
$this->companydetailsmodel = new Companydetails_model(); $this->companydetailsmodel = new Companydetails_model();
$this->empFiles = new EmpFilesModel();
$this->appConfig = new AppConfigModel();
$this->emppaydate_model = new Emppaydate_model();
$this->session = session(); $this->session = session();
helper('form'); //$this->load->library('form_validation'); helper('form'); //$this->load->library('form_validation');
$this->isLoggedIn(); $this->isLoggedIn();
@ -199,6 +208,8 @@ class Employeedetails extends BaseController
// $this->validator->setRules([ // $this->validator->setRules([
// 'ContactNumber'=> 'trim|required|min_length[10]|max_length[10]', // 'ContactNumber'=> 'trim|required|min_length[10]|max_length[10]',
// 'emailid'=> 'trim|required|valid_email', // 'emailid'=> 'trim|required|valid_email',
@ -236,7 +247,6 @@ class Employeedetails extends BaseController
} }
// $Profile = $this->request->getPost('photo'); // $Profile = $this->request->getPost('photo');
$FirstName = $this->request->getPost('FirstName'); $FirstName = $this->request->getPost('FirstName');
$LastName = $this->request->getPost('LastName');
$FatherName = $this->request->getPost('FatherName'); $FatherName = $this->request->getPost('FatherName');
$DateofBirth = $this->request->getPost('DateofBirth'); $DateofBirth = $this->request->getPost('DateofBirth');
$ContactNumber = $this->request->getPost('ContactNumber'); $ContactNumber = $this->request->getPost('ContactNumber');
@ -285,6 +295,10 @@ class Employeedetails extends BaseController
$ESIno = $this->request->getPost('esino'); $ESIno = $this->request->getPost('esino');
$Nominee = $this->request->getPost('nomineename'); $Nominee = $this->request->getPost('nomineename');
$createdby = $this->session->get('userId'); $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 != '') { if ($licenseExpiryDate != '') {
//$License_ExpiryDate = get_date_format($licenseExpiryDate); //$License_ExpiryDate = get_date_format($licenseExpiryDate);
@ -305,7 +319,7 @@ class Employeedetails extends BaseController
//echo $DOB; //echo $DOB;
$Employee = array( $Employee = array(
'FirstName' => $FirstName, 'LastName' => $LastName, 'FatherName' => $FatherName, 'FirstName' => $FirstName, 'FatherName' => $FatherName,
'Gender' => $Gender, 'DateofBirth' => $DOB, 'ContactNumber' => $ContactNumber, 'EmailId' => $EmailId, 'Gender' => $Gender, 'DateofBirth' => $DOB, 'ContactNumber' => $ContactNumber, 'EmailId' => $EmailId,
'BloodGroup' => $BloodGroup, 'MartialStatus' => $MartialStatus, 'DateofJoining' => $DOJ, 'BloodGroup' => $BloodGroup, 'MartialStatus' => $MartialStatus, 'DateofJoining' => $DOJ,
'PreviousYearsOfExp' => $Previousexperience, 'Designation' => $desigination, 'PreviousYearsOfExp' => $Previousexperience, 'Designation' => $desigination,
@ -319,13 +333,56 @@ class Employeedetails extends BaseController
'Reference_ContactNumber' => $referrercontno, 'Remarks' => $addinfo, 'CreatedBy' => $createdby, 'Reference_ContactNumber' => $referrercontno, 'Remarks' => $addinfo, 'CreatedBy' => $createdby,
'personalEmailId' => $comEmailId, 'DriverLicense' => $driverlicense, 'personalEmailId' => $comEmailId, 'DriverLicense' => $driverlicense,
'LicenseValidtill' => $License_ExpiryDate, 'VoterID' => $VoterID, 'PFNO' => $PFno, 'ESI' => $ESIno, '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(); //print_r($Employee);die();
$result = $this->employeedetails_model->addNewemployee($Employee); $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->set_flashdata('Success', 'New Employee created successfully!');
$this->session->setFlashdata('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 */ * This function is used to load the add new Employee form with dropdown values */
function addemployee() function addemployee()
@ -352,6 +419,7 @@ class Employeedetails extends BaseController
$QualificationConfigID = 'C014'; $QualificationConfigID = 'C014';
$DesignationConfigID = 'C010'; $DesignationConfigID = 'C010';
$BloodGroupConfigID = 'C011'; $BloodGroupConfigID = 'C011';
$LocationConfigID = 'C031';
$data['Gender'] = $this->employeedetails_model->getConfigValue($GenderConfigID); $data['Gender'] = $this->employeedetails_model->getConfigValue($GenderConfigID);
$data['Martial'] = $this->employeedetails_model->getConfigValue($MartialConfigID); $data['Martial'] = $this->employeedetails_model->getConfigValue($MartialConfigID);
@ -359,8 +427,11 @@ class Employeedetails extends BaseController
$data['Qualification'] = $this->employeedetails_model->getConfigValue($QualificationConfigID); $data['Qualification'] = $this->employeedetails_model->getConfigValue($QualificationConfigID);
$data['Designation'] = $this->employeedetails_model->getConfigValue($DesignationConfigID); $data['Designation'] = $this->employeedetails_model->getConfigValue($DesignationConfigID);
$data['BloodGroup'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID); $data['BloodGroup'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
$data['Location'] = $this->employeedetails_model->getConfigValue($LocationConfigID);
$data['Department'] = $this->employeedetails_model->getDepartment(); $data['Department'] = $this->employeedetails_model->getDepartment();
$data['hra_rate'] = $this->appConfig->where('config_key',1)->get()->getRow()->config_value;
$data['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'; $this->global['pageTitle'] = 'Add New Employee';
// if($this->role == ROLE_ADMIN || $this->DEPCode == HR) // if($this->role == ROLE_ADMIN || $this->DEPCode == HR)
@ -494,6 +565,7 @@ class Employeedetails extends BaseController
$QualificationConfigID = 'C014'; $QualificationConfigID = 'C014';
$DesignationConfigID = 'C010'; $DesignationConfigID = 'C010';
$BloodGroupConfigID = 'C011'; $BloodGroupConfigID = 'C011';
$LocationConfigID = 'C031';
//print_r('hai'); //print_r('hai');
$data['GenderList'] = $this->employeedetails_model->getConfigValue($GenderConfigID); $data['GenderList'] = $this->employeedetails_model->getConfigValue($GenderConfigID);
@ -502,8 +574,12 @@ class Employeedetails extends BaseController
$data['DesignationList'] = $this->employeedetails_model->getConfigValue($DesignationConfigID); $data['DesignationList'] = $this->employeedetails_model->getConfigValue($DesignationConfigID);
$data['BloodGroupList'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID); $data['BloodGroupList'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID);
$data['bankdetails'] = $this->employeedetails_model->getBankDetails(); $data['bankdetails'] = $this->employeedetails_model->getBankDetails();
$data['Location'] = $this->employeedetails_model->getConfigValue($LocationConfigID);
$data['DepartmentList'] = $this->employeedetails_model->getDepartment(); $data['DepartmentList'] = $this->employeedetails_model->getDepartment();
$data['EmpDetails'] = $this->employeedetails_model->viewemployee($EmpID); $data['EmpDetails'] = $this->employeedetails_model->viewemployee($EmpID);
$data['emp_data'] = $this->empFiles->where('emp_id',$EmpID)->where('is_active',1)->findAll();
$data['empPay'] = $this->emppaydate_model->getEmpPayData($EmpID);
$this->global['pageTitle'] = 'View Employee'; $this->global['pageTitle'] = 'View Employee';
$this->loadViews("editEmployee", $this->global, $data, NULL); $this->loadViews("editEmployee", $this->global, $data, NULL);
@ -649,6 +725,10 @@ class Employeedetails extends BaseController
$esino = $this->request->getPost('esino'); $esino = $this->request->getPost('esino');
$Nominee = $this->request->getPost('nomineename'); $Nominee = $this->request->getPost('nomineename');
$chked = $this->request->getPost('isactive'); $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 ; // echo 'chkvalue'. $chked ;
if ($chked != '') { if ($chked != '') {
$IsActive = '1'; $IsActive = '1';
@ -688,12 +768,54 @@ class Employeedetails extends BaseController
'IsActive' => $IsActive, 'ProfilePic' => $Picture, 'Reference_Name' => $referredby, 'IsActive' => $IsActive, 'ProfilePic' => $Picture, 'Reference_Name' => $referredby,
'Reference_ContactNumber' => $referrercontno, 'Remarks' => $addinfo, 'UpdatedBY' => $UpdatedBY, 'Reference_ContactNumber' => $referrercontno, 'Remarks' => $addinfo, 'UpdatedBY' => $UpdatedBY,
'personalEmailId' => $comEmailId, 'DriverLicense' => $driverlicense, 'LicenseValidtill' => $License_ExpiryDate, '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(); //print_r($Employee);die();
$result = $this->employeedetails_model->UpdateEmployee($Employee, $EmpId); $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->set_flashdata('Success', $EmpId.'Employee Updated successfully!');
$this->session->setFlashdata('success', 'You Have Successfully updated the Employee Record!'); $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 App\Models\Inwardgateregister_model;
use ZipArchive;
/** /**
* Module : IGR (security) * Module : IGR (security)
* Inwardgateregister Class to control all igr related operations. * Inwardgateregister Class to control all igr related operations.
@ -71,6 +73,9 @@ class Inwardgateregister extends BaseController
$data['PO_NO'] = array_filter($result, function($item) { $data['PO_NO'] = array_filter($result, function($item) {
return !($item->status === 'ST027'); 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); $this->loadViews("inwardgateregister", $this->global, $data, NULL);
} }
@ -201,7 +206,7 @@ class Inwardgateregister extends BaseController
$PO = $this->request->getPost('id'); $PO = $this->request->getPost('id');
$CreatedBy = $this->session->get('userId'); $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); $data = $this->inwardgateregister_model->viewpurchaseorder($PO);
echo json_encode($data); echo json_encode($data);
@ -209,7 +214,7 @@ class Inwardgateregister extends BaseController
function addloadfile() function getAdditionalIGRFile()
{ {
$lastinsertbillid = 0; $lastinsertbillid = 0;
@ -221,7 +226,7 @@ class Inwardgateregister extends BaseController
$file = $this->request->getFile('file'); $file = $this->request->getFile('file');
$requestfilename = $file->getName(); $requestfilename = $file->getName();
$files = $this->inwardgateregister_model->getfies($igr); $files = $this->inwardgateregister_model->getAdditionalIGRFile($igr);
$fcount = 0; $fcount = 0;
foreach ($files as $value) { foreach ($files as $value) {
@ -247,7 +252,7 @@ class Inwardgateregister extends BaseController
$myfiles = array('PONO' => $pono, 'IGRNO' => $igr, 'FilePath' => $Picture); $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 = ''; $deleteAdditionalFile = false;
$fileid = $this->request->getPost('id');
$Billno = $this->request->getPost('Billno'); $deleteAdditionalFile = $this->inwardgateregister_model->deleteAdditionalFile($fileid);
$deleteBillFile = $this->inwardgateregister_model->deleteBillFile($Billno); return $deleteAdditionalFile;
// if ($deleteAdditionalFile) {
if ($deleteBillFile) { // echo "file deleted successfully!";
echo "file deleted successfully!"; // } else {
} else { // echo "file details not exist to delete";
echo "file details not exist to delete"; // }
}
} }
@ -307,8 +311,10 @@ class Inwardgateregister extends BaseController
function SaveIGR() function SaveIGR()
{ {
//print_r($this->request->getPost());die;
#Step 1 IGR Details #Step 1 IGR Details
$PONO = $this->request->getPost('PONO'); $PONO = $this->request->getPost('PONO');
$IsThisOpenOrderPO = $this->request->getPost('hiddenIsOpenOrder');
$DeliveryChellanOrInvoiceNo = $this->request->getPost('InvoiceNo'); $DeliveryChellanOrInvoiceNo = $this->request->getPost('InvoiceNo');
$DeliveryChellan = (string)$this->request->getPost('InvoiceDate'); $DeliveryChellan = (string)$this->request->getPost('InvoiceDate');
$DeliveryChellanDate = get_date_time_format($DeliveryChellan); $DeliveryChellanDate = get_date_time_format($DeliveryChellan);
@ -321,8 +327,8 @@ class Inwardgateregister extends BaseController
$RowCount = $this->request->getPost('txtRowCount'); $RowCount = $this->request->getPost('txtRowCount');
$createddt = get_current_date_time(); $createddt = get_current_date_time();
//$IGRStatus = IGR_CREATED;//old //$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 $igr = array(); // For IGR Master
$paymentstatus = NO_PAIDIGR; $paymentstatus = NO_PAIDIGR;
@ -353,10 +359,38 @@ class Inwardgateregister extends BaseController
#Step 3 Master Details Gathering to Save In DB #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 = 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; $igr['MasterFile'] = $requestMasterFileName;
// print_r( $igr );die;
#Step 4 Calling DB to Save IGR Master #Step 4 Calling DB to Save IGR Master
$IGRNO = $this->inwardgateregister_model->addigrM($igr); $IGRNO = $this->inwardgateregister_model->addigrM($igr);
// Get the uploaded files
// $IGRNO = "IGRNO02750";
// $IGRNO = "IGRNO02734"; // $IGRNO = "IGRNO02734";
if($IGRNO){ 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 #Step 5 Save Master Detail On History Table
if($VehicleNo){ 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); $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; $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; $TareWeightDate = !empty($tareWeightDate) && is_string($tareWeightDate) ? date('Y-m-d H:i:s', strtotime($tareWeightDate)) : null;
log_message('error', "TareWeightDate" . $TareWeightDate); log_message('error', "TareWeightDate" . $TareWeightDate);
if (strlen($QuantityAsPerInvoice) > 0 && $QuantityAsPerInvoice != '0') { if (strlen($QuantityAsPerInvoice) > 0 && $QuantityAsPerInvoice != '0') {
$Remarks = $this->request->getPost('txtRemarks' . $i); $Remarks = $this->request->getPost('txtRemarks' . $i);
$ItemStatus = ''; $ItemStatus = '';
@ -514,18 +547,56 @@ class Inwardgateregister extends BaseController
$POLineItem = array('ReceivedQuantity' => $totalReceivedqty, 'Status' => $ItemStatus, 'UpdateBY' => $CreatedBy, 'UpdatedOn' => $createddt); $POLineItem = array('ReceivedQuantity' => $totalReceivedqty, 'Status' => $ItemStatus, 'UpdateBY' => $CreatedBy, 'UpdatedOn' => $createddt);
$this->inwardgateregister_model->UpdatePOLineItem($POLineItem, $PONO, $MaterialCode); $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. #Step 9 Updating Pending Quantity IN PO Master amd Line Item Details.
if ((int)$IsThisOpenOrderPO != 1) {
if ($TotalPendingQty == 0.00) { if ($TotalPendingQty == 0.00) {
$Newstatus = array('Status' => $IGRStatus); $Newstatus = array('Status' => $IGRStatus);
$this->inwardgateregister_model->POLineItemsupdatestatus($PONO, $Newstatus); $this->inwardgateregister_model->POLineItemsupdatestatus($PONO, $Newstatus);
$this->inwardgateregister_model->pomasterupdatestatus($PONO, $Newstatus); $this->inwardgateregister_model->pomasterupdatestatus($PONO, $Newstatus);
} else { } else {
/*echo 'error' ;*/ /*echo 'error' ;*/
} }}
#finally #finally
$finalstatement = "Successfully Created IGR Number: $IGRNO \n"; $finalstatement = "Successfully Created IGR Number: $IGRNO \n";
if ($fileupdated_count > 0) { if ($fileupdated_count > 0) {
@ -555,7 +626,9 @@ function viewIGRDetails()
$IGRNO = $this->request->getPost('id'); $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; // echo $IGRNO;
// print_r($data);die; // print_r($data);die;
@ -588,6 +661,7 @@ function viewIGRDetails()
{ {
$IGRNo = $this->request->getPost('igr'); $IGRNo = $this->request->getPost('igr');
$PONo = $this->request->getPost('po');
$DeliveryChellan = $this->request->getPost('invdate'); $DeliveryChellan = $this->request->getPost('invdate');
$DeliveryChellanDate = !$DeliveryChellan || $DeliveryChellan === null ? NULL : get_date_time_format($DeliveryChellan); $DeliveryChellanDate = !$DeliveryChellan || $DeliveryChellan === null ? NULL : get_date_time_format($DeliveryChellan);
@ -627,6 +701,36 @@ 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)); log_message('error', 'UpdateIGR igrarr: ' . json_encode($igrarr));
$updateigrmaster = $this->inwardgateregister_model->updateigr($igrarr, $IGRNo); $updateigrmaster = $this->inwardgateregister_model->updateigr($igrarr, $IGRNo);
@ -877,12 +981,21 @@ function viewIGRDetails()
} }
} }
if ($updateigrmaster > 0) { if ($updateigrmaster > 0) {
echo "Updated Succefully!"; $finalstatement = "Successfully Updated IGR Number: $IGRNo \n";
} else if($updateigrlineitem >0){ } else if($updateigrlineitem >0){
echo "Updated Succefully!"; $finalstatement = "Successfully Updated IGR Number: $IGRNo \n";
}else{ }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() { function updateIGRLineItem() {
@ -1156,6 +1269,7 @@ function viewIGRDetails()
} }
} }
function updateIGRWeight(){ function updateIGRWeight(){
$GrossWeight = $this->request->getPost('GrossWeight'); $GrossWeight = $this->request->getPost('GrossWeight');
$GrossWeightDate = $this->request->getPost('GrossWeightDate'); $GrossWeightDate = $this->request->getPost('GrossWeightDate');
@ -1166,8 +1280,8 @@ function updateIGRWeight(){
$IGRItemNo = $this->request->getPost('IGRlineitem'); $IGRItemNo = $this->request->getPost('IGRlineitem');
$updateby = $this->session->get('userId'); $updateby = $this->session->get('userId');
$WeightFile = $this->request->getfile('WeightFile'); $WeightFile = $this->request->getfile('WeightFile');
$GrossWtDt = !empty($GrossWeightDate) ? get_date_time_format($GrossWeightDate) : null; $GrossWtDt = (!empty($GrossWeightDate) && (string)$GrossWeightDate != 'null' ) ? get_date_time_format($GrossWeightDate) : null;
$TareWtDt = !empty($TareWeightDate) ? get_date_time_format($TareWeightDate) : null; $TareWtDt =(!empty($TareWeightDate) && (string)$TareWeightDate != 'null') ? get_date_time_format($TareWeightDate) : null;
$path = ROOTPATH.'public/uploads/Igrfiles/'; $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() public function monthlyInputs()
{ {
$current = date("m-Y"); $current = date("m-Y");
//echo $current; // echo $current;
$data['month'] = $this->monthlypay_model->monthlyListing($current); $data['month'] = $this->monthlypay_model->monthlyListing($current);
// $data['fresh'] = $this-> monthlypay_model->getEmpPayDetails($current); // $data['fresh'] = $this-> monthlypay_model->getEmpPayDetails($current);
$data['dropdownvalue'] = $current; $data['dropdownvalue'] = $current;
$data['fresh'] = $this->monthlypay_model->getEmpPayDetailsforMonthInputs($current); $data['fresh'] = $this->monthlypay_model->getEmpPayDetailsforMonthInputs($current);
// dd($data['fresh']);
$employeeSalary = []; $employeeSalary = [];
@ -659,7 +660,9 @@ class Payslip extends BaseController
//print_r($data['month']); //print_r($data['month']);
$data['dropdownvalue'] = $current; $data['dropdownvalue'] = $current;
$data['fresh'] = $this->monthlypay_model->getEmpPayDetailsforMonthInputs($current); $data['fresh'] = $this->monthlypay_model->getEmpPayDetailsforMonthInputs($current);
//print_r($data['fresh']);
// dd($data['fresh']);
$employeeSalary = []; $employeeSalary = [];
@ -1067,25 +1070,25 @@ class Payslip extends BaseController
$filename = " "; $filename = " ";
$html = ""; $html = "";
$All = $this->request->getPost('All'); $All = $this->request->getPost('All');
if ($All == '') { // if ($All == '') {
$this->validator->setRules([ // $this->validator->setRules([
'Employee' => [ // 'Employee' => [
'label' => 'Employee', // 'label' => 'Employee',
'rules' => 'trim|callback_Employee_validate', // 'rules' => 'trim|callback_Employee_validate',
] // ]
]); // ]);
} // }
$this->validator->setRules([ // $this->validator->setRules([
'PayOn' => [ // 'PayOn' => [
'label' => 'PayOn', // 'label' => 'PayOn',
'rules' => 'trim|callback_PayOn_validate', // 'rules' => 'trim|callback_PayOn_validate',
] // ]
]); // ]);
if ($this->validator->run() == FALSE) { // if ($this->validator->run() == FALSE) {
$this->viewGenerator(); // $this->viewGenerator();
} else { // } else {
$Payon = $this->request->getPost('PayOn'); $Payon = $this->request->getPost('PayOn');
$m = date("M", mktime(0, 0, 0, (int)$Payon, 10)); $m = date("M", mktime(0, 0, 0, (int)$Payon, 10));
@ -1193,7 +1196,7 @@ class Payslip extends BaseController
$mpdf->SetTitle('Resico:Payslip'); $mpdf->SetTitle('Resico:Payslip');
$mpdf->Output("Payslip-" . $filename . ".pdf", 'D'); $mpdf->Output("Payslip-" . $filename . ".pdf", 'D');
} // }
} }
function updatePayslip() function updatePayslip()

View File

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

View File

@ -131,3 +131,19 @@ if (!function_exists('trans')) {
return $lang_string; 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() function CostListing()
{ {
$builder = $this->db->table('t_costcenter_master as Cost') $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'); ->join('t_employee_details as Emp', 'Emp.EmpID=Cost.ApprovedBy');
@ -31,20 +31,29 @@ class Costcenter_model extends Model
* @param number $userId : This is user id * @param number $userId : This is user id
* @return array $result : This is user information * @return array $result : This is user information
*/ */
public function saveCostCenter($Cost) {
function saveCostCenter($Cost)
{
$this->db->transStart(); $this->db->transStart();
$builder = $this->db->table('t_costcenter_master'); $builder = $this->db->table('t_costcenter_master');
$builder->insert($Cost); $builder->insert($Cost);
$aff_row = $this->db->affectedRows();
$insert_id = $this->db->affectedRows(); log_message('error', 'saveCostCenter Query: ' . $this->db->getLastQuery()->getQuery());
$this->db->transComplete(); $this->db->transComplete();
return $aff_row;
return $insert_id;
} }
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() function getFiscalYear()
{ {
$builder = $this->db->table('t_company_details') $builder = $this->db->table('t_company_details')
@ -54,44 +63,6 @@ function saveCostCenter($Cost)
return $query->getResult(); 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 * This function used to get user information by id
* @param number $userId : This is user 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 * This function is used to get the Config value from configuration table
* @return array $result : This is result of the query * @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') $builder = $this->db->table('t_employee_details Emp')
->select(' Emp.*,Dep.DepartmentName as DepartmentName') ->select(' Emp.*,Dep.DepartmentName as DepartmentName')
->join('t_departmentdetails Dep', 'Emp.Departmentcode = Dep.DEPCode', 'left') ->join('t_departmentdetails Dep', 'Emp.Departmentcode = Dep.DEPCode', 'left')
->orderBy("Emp.EmpID", "asc"); ->orderBy("Emp.EmpID", "desc");
$query = $builder->get(); $query = $builder->get();
@ -79,9 +79,18 @@ class Employeedetails_model extends Model
$builder = $this->db->table('t_employee_details'); $builder = $this->db->table('t_employee_details');
$builder->insert($Employee); $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

@ -78,15 +78,25 @@ class Emppaydate_model extends Model
return $query->getResult(); 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) function editemppay($emppaydatas)
{ {
$paydateid=$emppaydatas['Pay_Data_ID']; $EmpID=$emppaydatas['EmpID'];
//echo $paydateid; //echo $paydateid;
//print_r($emppaydatas);die(); //print_r($emppaydatas);die();
$this->db->table('t_emp_pay_data') $this->db->table('t_emp_pay_data')
->where('Pay_Data_ID', $paydateid) ->where('EmpID', $EmpID)
->update($emppaydatas); ->update($emppaydatas);
return TRUE; return TRUE;

View File

@ -40,21 +40,14 @@ class Inwardgateregister_model extends Model
$afftectedRows = $this->db->affectedRows(); $afftectedRows = $this->db->affectedRows();
return $afftectedRows; return $afftectedRows;
} }
function getAdditionalIGRFile($igr){
function getfies($igr)
{
$builder = $this->db->table('t_inwardgateregister_fileupload')->select('*') $builder = $this->db->table('t_inwardgateregister_fileupload')->select('*')
->where('IGRNO', $igr);
->where('IGRNO', $igr);
$query = $builder->get(); $query = $builder->get();
return $query->getResult(); return $query->getResult();
} }
function fileupload($myfiles) function uploadAdditionalFile($myfiles)
{ {
$builder = $this->db->table('t_inwardgateregister_fileupload'); $builder = $this->db->table('t_inwardgateregister_fileupload');
$builder->insert($myfiles); $builder->insert($myfiles);
@ -62,13 +55,14 @@ class Inwardgateregister_model extends Model
return $aff > 0 ? $this->db->insertID() : 0; 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') $this->db->table('t_inwardgateregister_fileupload')
->where('BillNo', $billno) ->where('BillNo', $fileid)
->update($deleteBillFile); ->update($arr);
return TRUE; $aff = $this->db->affectedRows();
return $aff > 0 ? true : false;
} }
@ -267,8 +261,6 @@ class Inwardgateregister_model extends Model
$builder->insert($igrD); $builder->insert($igrD);
$aff_row = $this->db->affectedRows(); $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(); $this->db->transComplete();
$result = $this->db->table('t_igr_details') $result = $this->db->table('t_igr_details')
@ -277,7 +269,7 @@ class Inwardgateregister_model extends Model
->get() ->get()
->getRow(); ->getRow();
$res = ($aff_row && $result !== null) ? $result->IGRItemNo : 0; $res = ($aff_row > 0) ? $result->IGRItemNo : 0;
return $res; 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('*') $builder = $this->db->table('t_purchaseorder_lineitem')->select('*')
@ -425,7 +417,7 @@ class Inwardgateregister_model extends Model
if ($query->getNumRows() == 0) { if ($query->getNumRows() == 0) {
$POStatus = array('status' => IGR_CREATED, 'UpdateBY' => $updatedBy); $POStatus = array('status' => $IGRStatus, 'UpdateBY' => $updatedBy);
$this->db->table('t_purchaseorder_master') $this->db->table('t_purchaseorder_master')
->where('PONO', $PONO) ->where('PONO', $PONO)
->update($POStatus); ->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; //echo $lastdate;
//left join t_payroll on t_employee_details.EmpID = t_payroll.EmpID and month(t_payroll.PayOn) = month(?) and year(t_payroll.PayOn) = year(?) //left join t_payroll on t_employee_details.EmpID = t_payroll.EmpID and month(t_payroll.PayOn) = month(?) and year(t_payroll.PayOn) = year(?)
$sql = "select t_emp_pay_data.EmpID, t_emp_pay_data.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 $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 from t_emp_pay_data
left join t_employee_details on t_employee_details.EmpID = t_emp_pay_data.EmpID left join t_employee_details on t_employee_details.EmpID = t_emp_pay_data.EmpID
left join t_payroll on t_employee_details.EmpID = t_payroll.EmpID and t_payroll.PayOn = ? left join t_payroll on t_employee_details.EmpID = t_payroll.EmpID and t_payroll.PayOn = ?
left join t_attendance on t_emp_pay_data.EmpID = t_attendance.EmpID 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_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 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 ') $builder = $this->db->table('t_costcenter_master Mast ')
->select('Mast.CostCenterCode,Mast.CostCenterName') ->select('Mast.CostCenterCode,Mast.CostCenterName')
->join('t_costcenter_departments COST', 'COST.CostCenterCode = Mast.CostCenterCode') ->where('Mast.IsActive ',1 );
->where('COST.DEPCode ',$DeptId ); // ->join('t_costcenter_departments COST', 'COST.CostCenterCode = Mast.CostCenterCode','left')
// ->where('COST.DEPCode ',$DeptId );
$query = $builder->get(); $query = $builder->get();
return $query->getResultArray(); return $query->getResultArray();

View File

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

View File

@ -1,43 +1,36 @@
<style> <style>
.pagination {
margin: 0px !important; .Date-filter-form {
} display: flex;
</style> align-items: center;
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css"> gap: 10px; /* Adjust the gap as needed */
<!-- 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 { .Date-filter-form input, .Date-filter-form button {
float: left; padding: 5px;
font-size: 14px;
} }
.dataTables_wrapper .dt-buttons { .Date-filter-form button {
float: right; background-color: #007bff;
color: white;
border: none;
cursor: pointer;
} }
.dataTables_wrapper .clear { .Date-filter-form button:hover {
clear: both; background-color: #0056b3;
}
.icon-button {
background: none;
border: none;
cursor: pointer;
color: #007bff;
font-size: 18px;
}
.icon-button:hover {
color: #0056b3;
} }
th, td { th, td {
white-space: nowrap; white-space: nowrap;
} }
.dataTables_wrapper {
width: 100%;
overflow-x: auto;
}
</style> </style>
<div class="content-wrapper"> <div class="content-wrapper">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
@ -77,6 +70,18 @@
</div> </div>
<!-- /.box-header --> <!-- /.box-header -->
<div class="box-body"> <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;"> <table id="dataTableHistoriek" class="table table-bordered table-hover editableTable" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;"> <thead style="background-color: #ddd;">
<tr> <tr>
@ -178,19 +183,84 @@
<!-- /.content --> <!-- /.content -->
</div> </div>
<!-- /.content-wrapper --> <!-- /.content-wrapper -->
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> --> <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
<!-- Latest DataTables JS --> <script>
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script> $(document).ready(function() {
<!-- Latest DataTables Buttons JS --> // Initialize the DataTable
<script src="https://cdn.datatables.net/buttons/2.3.4/js/dataTables.buttons.min.js"></script> var table = $('#dataTableHistoriek').DataTable({
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.html5.min.js"></script> "paging": true,
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.print.min.js"></script> "lengthChange": true,
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script> "searching": true,
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script> "ordering": true,
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script> "columnDefs": [{
<script src="https://cdn.datatables.net/plug-ins/1.13.6/sorting/datetime-moment.js"></script> "targets": 1,
"type": "date-eu"
}],
"aaSorting": [
[1, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
<script> });
// 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 () { $(function () {
$.fn.dataTable.moment('DD-MM-YYYY'); $.fn.dataTable.moment('DD-MM-YYYY');
$('#dataTableHistoriek').DataTable({ $('#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> <script>
$(document).ready(function() { $(document).ready(function() {
$("#gender").select2(); $("#gender").select2();
$("#bloodgroup").select2(); $("#bloodgroup").select2();
$("#MartialStatus").select2(); $("#MartialStatus").select2();
$("#desigination").select2(); $("#desigination").select2();
$("#work_location").select2();
$("#departmentname").select2(); $("#departmentname").select2();
$("#eduqualifaction").select2(); $("#eduqualifaction").select2();
$("#bankbranchname").select2();
document.getElementById('aadharno').addEventListener('input', function(e) { document.getElementById('aadharno').addEventListener('input', function(e) {
e.target.value = e.target.value.replace(/[^\d]/g, '').replace(/(.{4})/g, '$1 ').trim(); e.target.value = e.target.value.replace(/[^\d]/g, '').replace(/(.{4})/g, '$1 ').trim();
@ -400,18 +456,20 @@ legend {
<div class="content-wrapper"> <div class="content-wrapper">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-1"></div> <div class="col-md-1"></div>
<div class="col-md-5"> <div class="col-md-5">
<b><h3>Add Employee</h3></b> <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>
<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"> <section class="content">
<br /> <br />
<div class="row"> <div class="row">
@ -432,7 +490,7 @@ legend {
<form class="form-horizontal" role="form"> <form class="form-horizontal" role="form">
<fieldset> <fieldset>
<!-- Form Name -->
<legend>Personal Information</legend> <legend>Personal Information</legend>
<div class="col-md-12"> <div class="col-md-12">
@ -470,10 +528,6 @@ legend {
onkeypress="return onlyAlphabets(event);" id="FatherName" onkeypress="return onlyAlphabets(event);" id="FatherName"
maxlength="200" class="form-control" required> maxlength="200" class="form-control" required>
</div> </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>
<div class="col-md-12"> <div class="col-md-12">
@ -496,9 +550,9 @@ legend {
foreach ($Gender as $rl) foreach ($Gender as $rl)
{ {
?> ?>
<option value="<?php echo $rl->ConfigValue ?>"> <option value="<?php echo $rl->ConfigValue ?>">
<?php echo $rl->ConfigValue ?></option> <?php echo $rl->ConfigValue ?></option>
<?php <?php
} }
} }
?> ?>
@ -537,47 +591,47 @@ legend {
<div class="col-md-6 pad"> <div class="col-md-6 pad">
<span>Blood group</span><span class="badge">*</span> <span>Blood group</span><span class="badge">*</span>
<select id="bloodgroup" name="bloodgroup" required <select id="bloodgroup" name="bloodgroup" required
class="form-control select2"> class="form-control select2">
<option value="">Select Blood group</option> <option value="">Select Blood group</option>
<?php <?php
if(!empty($BloodGroup)) if(!empty($BloodGroup))
{ {
foreach ($BloodGroup as $rl) foreach ($BloodGroup as $rl)
{ {
?> ?>
<option value="<?php echo $rl->ConfigValue ?>"> <option value="<?php echo $rl->ConfigValue ?>">
<?php echo $rl->ConfigValue ?></option> <?php echo $rl->ConfigValue ?></option>
<?php <?php
} }
} }
?> ?>
</select> </select>
</div> </div>
<div class="col-md-6 pad"> <div class="col-md-6 pad">
<span>Marital Status</span><span class="badge">*</span> <span>Marital Status</span><span class="badge">*</span>
<select id="MartialStatus" name="MartialStatus" type="text" <select id="MartialStatus" name="MartialStatus" type="text"
required placeholder="Marital status" required placeholder="Marital status"
class="form-control select2"> class="form-control select2">
<option value="">Select Marital Status</option> <option value="">Select Marital Status</option>
<?php <?php
if(!empty($Martial)) if(!empty($Martial))
{ {
foreach ($Martial as $rl) foreach ($Martial as $rl)
{ {
?> ?>
<option value="<?php echo $rl->ConfigValue ?>"> <option value="<?php echo $rl->ConfigValue ?>">
<?php echo $rl->ConfigValue ?></option> <?php echo $rl->ConfigValue ?></option>
<?php <?php
} }
} }
?> ?>
</select> </select>
</div> </div>
</div> </div>
@ -586,10 +640,9 @@ legend {
<!-- Address Section -->
<!-- Form Name -->
<legend>Address Details</legend> <legend>Address Details</legend>
<!-- Text input-->
<div class="col-md-12 pad"> <div class="col-md-12 pad">
<div class="col-md-12"><span>Current Address</span><span <div class="col-md-12"><span>Current Address</span><span
class="badge">*</span> class="badge">*</span>
@ -603,7 +656,7 @@ legend {
onclick="CheckClick"> Current address same as permanent address onclick="CheckClick"> Current address same as permanent address
</div> </div>
</div> </div>
<!-- Text input-->
<div class="col-md-12 pad"> <div class="col-md-12 pad">
<div class="col-md-12"><span>Permanent Address</span><span <div class="col-md-12"><span>Permanent Address</span><span
class="badge">*</span> class="badge">*</span>
@ -612,14 +665,13 @@ legend {
class="form-control"> class="form-control">
</div> </div>
</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-12 pad">
<div class="col-md-6"><span>Emergency Contact Name</span> <div class="col-md-6"><span>Emergency Contact Name</span>
<input type="text" id="emergencycontactname" <input type="text" id="emergencycontactname"
@ -637,10 +689,9 @@ legend {
</div> </div>
<!-- profile Section -->
<!-- Form Name -->
<legend>Work Profile</legend> <legend>Work Profile</legend>
<!-- Text input-->
<div class="col-md-12 pad"> <div class="col-md-12 pad">
<div class="col-md-3"><span>Designation</span><span class="badge">*</span> <div class="col-md-3"><span>Designation</span><span class="badge">*</span>
@ -728,53 +779,266 @@ legend {
onchange=" return getValidReferNumber();" maxlength="10" onchange=" return getValidReferNumber();" maxlength="10"
onkeypress="return isNumberKey(event)" class="form-control"> onkeypress="return isNumberKey(event)" class="form-control">
</div> </div>
</div> </div>
<legend>Bank Details</legend>
<!-- Text input-->
<div class="col-md-12 pad"> <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> <div class="col-md-3"><span>Work Location</span><span class="badge">*</span>
<option value="">Select Bank Name</option> <select type="text" id="work_location" name="work_location" required
class="form-control select2">
<option value="">Select Work Location</option>
<?php <?php
if(!empty($bankdetails)) if(!empty($Location))
{ {
foreach ($bankdetails as $bank) foreach ($Location as $rl)
{ {
?> ?>
<option value="<?php echo $bank->Bank_name ?>"> <option value="<?php echo $rl->ConfigValue ?>">
<?php echo $bank->Bank_name ?></option> <?php echo $rl->ConfigValue ?></option>
<?php <?php
} }
} }
?> ?>
</select> </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>
<div class="col-md-3"><span>Account Number</span><span <div class="col-md-3"><span>Account Number</span><span
class="badge">*</span> class="badge">*</span>
<input type="text" id="accountno" onkeypress="return isNumberKey(event)" <input type="text" id="accountno" onkeypress="return isNumberKey(event)"
maxlength="20" name="accountno" class="form-control" required> maxlength="20" name="accountno" class="form-control" required>
</div> </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" <input type="text" id="ifsccode" name="ifsccode" placeholder="IFSC Code"
class="form-control" onkeypress="return alpha(event);" class="form-control" onkeypress="return alpha(event);"
style="text-transform: uppercase" readonly> style="text-transform: uppercase" required>
</div> </div>
<div class="col-md-3"><span>Bank Address</span> <div class="col-md-3"><span>Bank Address</span>
<input type="text" id="bankaddress" name="bankaddress" <input type="text" id="bankaddress" name="bankaddress"
placeholder="Bank Address" maxlength="200" class="form-control" placeholder="Bank Address" maxlength="200" class="form-control">
readonly>
</div> </div>
</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> <legend>ID Proof</legend>
<!-- Text input-->
<div class="col-md-12 pad"> <div class="col-md-12 pad">
<div class="col-md-3"><span>Aadhar Number</span> <span <div class="col-md-3"><span>Aadhar Number</span> <span
@ -796,7 +1060,7 @@ legend {
onchange="ValidatePassport();" name="passportno" onchange="ValidatePassport();" name="passportno"
style="text-transform:uppercase" class="form-control" 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 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>
<div class="col-md-3"><span>Passport Expiry Date</span> <div class="col-md-3"><span>Passport Expiry Date</span>
<input id="ValidTill" name="ValidTill" onkeypress="return false;" <input id="ValidTill" name="ValidTill" onkeypress="return false;"
@ -824,39 +1088,43 @@ legend {
</div> </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> <legend>Nominee Details</legend>
<!-- Text input-->
<div class="col-md-12 pad"> <div class="col-md-12 pad">
<div class="col-md-12"><span>Nominee reference</span> <div class="col-md-12"><span>Nominee reference</span>
<input type="text" id="nomineename" name="nomineename" maxlength="255" <input type="text" id="nomineename" name="nomineename" maxlength="255"
class="form-control"> class="form-control">
<!-- <textarea id="nomineename" name="nomineename" maxlength="255" class="form-control" rows="3" cols="50"></textarea> -->
</div> </div>
</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 --> <!-- Command -->
@ -914,6 +1182,65 @@ legend {
<script src="<?php echo base_url(); ?>public/assets/js/addUser.js" type="text/javascript"></script> <script src="<?php echo base_url(); ?>public/assets/js/addUser.js" type="text/javascript"></script>
<script> <script>
function 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() { function Validate() {
if ($("#FirstName").val().length < 1) { if ($("#FirstName").val().length < 1) {
alert('Please Enter FirstName'); alert('Please Enter FirstName');
@ -1039,7 +1366,7 @@ $("#emailid").change(function() {
var answer = confirm(data + "" + var answer = confirm(data + "" +
" Employee already exists in the database.Do you want to change the Email id ?" " Employee already exists in the database.Do you want to change the Email id ?"
) )
if (answer) { if (answer) {
$('#emailid').val(''); $('#emailid').val('');
$('#emailid').focus(); $('#emailid').focus();
@ -1076,7 +1403,7 @@ $('#panno').change(function() {
var answer = confirm(data + " " + var answer = confirm(data + " " +
" Employee details is already exists in the database.Do you want to change the Employee details?" " Employee details is already exists in the database.Do you want to change the Employee details?"
) )
if (answer) { if (answer) {
$('#panno').val(''); $('#panno').val('');
$('#panno').focus(); $('#panno').focus();
@ -1118,7 +1445,7 @@ $('#aadharno').change(function() {
var answer = confirm(data + " " + var answer = confirm(data + " " +
" employee details is already exists in the database.Do you want to change the Employee details?" " employee details is already exists in the database.Do you want to change the Employee details?"
) )
if (answer) { if (answer) {
$('#aadharno').val(''); $('#aadharno').val('');
$('#aadharno').focus(); $('#aadharno').focus();
@ -1139,27 +1466,5 @@ $('#aadharno').change(function() {
return false; 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> </script>

View File

@ -22,16 +22,16 @@
<div class="content-wrapper" style="min-height: 537px;"> <div class="content-wrapper" style="min-height: 537px;">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<h1> <h1>
<center> Add New Material </center> <center> Add Material Details</center>
</h1> </h1>
</section> <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"> <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"> <div class="row">
<!-- left column --> <!-- left column -->
<div class="col-md-12"> <div class="col-md-12">
@ -196,7 +196,7 @@
$('#MatCate').autocomplete("option", "minLength", 0); $('#MatCate').autocomplete("option", "minLength", 0);
}, },
serviceUrl: "<?php echo base_url(); ?>rawmaterialdetails/autocomplete", serviceUrl: "<?php echo base_url(); ?>rawmaterialdetailsautocomplete",
onSelect: function(suggestion) { onSelect: function(suggestion) {
var data = suggestion.ConfigValue; var data = suggestion.ConfigValue;

View File

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

View File

@ -1,8 +1,13 @@
<div class="content-wrapper" style="min-height: 537px;"> <div class="content-wrapper" style="min-height: 537px;">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<h1><center> Add User</center></h1> <h1>
</section> <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"> <section class="content">
<div style="text-align:right;"> <div style="text-align:right;">

View File

@ -49,15 +49,17 @@ $(function() {
<div class="content-wrapper" style="min-height: 537px;"> <div class="content-wrapper" style="min-height: 537px;">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<center><b><h3> Add Asset </h3></b></center> <h1>
</section> <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"> <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"> <div class="row">
<!-- left column --> <!-- left column -->
<div class="col-md-12"> <div class="col-md-12">

View File

@ -1,16 +1,14 @@
<div class="content-wrapper" style="min-height: 537px;"> <div class="content-wrapper" style="min-height: 537px;">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<center><b> <h1>
<h3> Add Config</h3> <center> Add Config Details</center>
</b></center> </h1>
</section> <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"> <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> <br>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">

View File

@ -62,13 +62,16 @@
<div class="content-wrapper"> <div class="content-wrapper">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<center><b><h3 class="box-title">Add Department Details</h3></b></center> <h1>
</section> <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"> <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/> <br/>
<div class="row"> <div class="row">
<!-- left column --> <!-- 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;?>"> <tr id="<?php echo $row;?>">
<td width="45" height="45" class="celda_normal" ><?php echo $index;?></td> <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="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++){ <?php for ($col =1; $col <= $monthdays;$col++){
$flag =0; $flag =0;

View File

@ -344,7 +344,7 @@
</div> </div>
</div> </div>
<div class="col-md-3"> <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 <?php
$options = array("0" => 'Select Supplier'); $options = array("0" => 'Select Supplier');
//print_r( $options); //print_r( $options);
@ -359,7 +359,7 @@
?> ?>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Address</label> <label>Supplier Address</label>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); $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> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Capital Type Options</label> <label>Capital Type Options<span class="badge mandatory">*</span></label>
<div class="form-group"> <div class="form-group">
<?php <?php
@ -574,7 +574,7 @@
endforeach; 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> </div>
@ -594,7 +594,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-3"> <div class="col-md-3">
<label>Insurance Options</label> <label>Insurance Options<span class="badge mandatory">*</span></label>
<div class="form-group"> <div class="form-group">
<?php <?php
@ -618,7 +618,7 @@
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label for="BudgetType">Budget Type</label> <label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<?php <?php
@ -2477,7 +2477,7 @@
<td align="left"><%=TotalValue%></td> <td align="left"><%=TotalValue%></td>
<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> </td>

View File

@ -1,98 +1,192 @@
<div class="content-wrapper">
<div class="content-wrapper"> <section class="content">
<section class="content">
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<CENTER><h3 class="box-title"> Cost Details</h3></CENTER> <CENTER>
</div> <h3 class="box-title"> Cost Details</h3>
<div class="container-fluid"> </CENTER>
<div class="row"> </div>
<div class="col-xs-12 text-right"> <div class="container-fluid">
<div class="form-group"> <div class="row">
<a class="btn btn-success" href="<?php echo base_url(); ?>addCostCenter">Add New Cost List</a> <div class="col-xs-12 text-right">
<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 class="form-group">
</div> <a data-toggle="modal" href="#ccwizard" data-id="0" data-name="" class="btn btn-success">Add New Cost List</a>
</div> <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 class="row"> </div>
<div class="col-xs-12"> </div>
<table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;" > <div class="row">
<thead style="background-color: #ddd;"> <div class="col-xs-12">
<tr> <table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<th>Cost Center Code</th> <thead style="background-color: #ddd;">
<th>Cost Center Name</th> <tr>
<th>Created By</th> <th style="display:none;"></th>
<th>Create Date</th> <th>Create Date</th>
<th>Active</th> <th>Create Time</th>
<th>Action</th> <th>Cost Center Code</th>
</tr> <th>Cost Center Name</th>
</thead> <th>Created By</th>
<tbody> <th>Active</th>
<?php <th>Action</th>
if(!empty($userRecords)) </tr>
{ </thead>
foreach($userRecords as $record) <tbody>
{ <?php
?> if (!empty($userRecords)) {
<tr> foreach ($userRecords as $record) {
<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=''; $createdat = new DateTime($record->CreatedDate);
$record->IsActive == 1?$R='ACTIVE':$R='INACTIVE'; $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; echo $R;
?></td> ?></td>
<td> <td>
<?php <?php
if($record->DeletedBy == ''){ if ($record->DeletedBy == '') {
?> ?>
<a href="<?php echo base_url().'editCostCenter?CostCode='.$record->code; ?>"><i class="fa fa-pencil"></i>&nbsp;&nbsp;&nbsp;</a> <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> <a href="<?php echo base_url() . 'deleteCostCenter?CostCode=' . $record->code; ?>"><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a>
<?php } ?>
<!-- <a href="<?php echo base_url().'CostCenter/viewcost?CostCode='.$record->code; ?>"><i class="fa fa-eye"></i>&nbsp;&nbsp;&nbsp;</a> --> </td>
<?php } ?> </tr>
</td> <?php
</tr>
<?php
}
} }
?> }
</tbody> ?>
</table> </tbody>
</table>
</div> </div>
</div> </div>
</div> </div>
</div> <!-- for Add and edit Modal -->
</section> <div class="modal fade" id="ccwizard" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
</div> <div class="modal-dialog">
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script> <div class="modal-content">
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script> <!-- Modal Header -->
<script type="text/javascript"> <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>
$(function () { <!-- Modal Body -->
$.fn.dataTable.moment( 'DD-MM-YYYY' ); <div class="modal-body">
$('#datatable').DataTable({ <form id="costCenterForm" class="form-horizontal" role="form">
"paging": true, <div class="form-group">
"lengthChange": true, <div class="row">
"searching": true, <div class="col-md-3 col-md-offset-2">
"ordering": true, Cost Center Name:
// "columnDefs" : [{"targets":3, "type":"date-eu"}], </div>
"aaSorting": [[ 3, "desc" ]], <div class="col-md-5">
"info": true, <input type="text" name="CostCenterName" id="CostCenterName" class="form-control">
"autoWidth": true <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>
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></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> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Supplier</label> <label>Select Supplier</label>
<?php <?php
if (!empty($Suplist)) { if (!empty($Suplist)) {
foreach ($Suplist as $SID) : foreach ($Suplist as $SID) :
@ -488,7 +488,7 @@
?> ?>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Address</label> <label>Supplier Address</label>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); $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="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-3"> <div class="col-md-3">
<label>PO Date</label> <label>Purchase Order Date</label>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('name' => 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); $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> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Capital Type Options</label> <label>Capital Type Options<span class="badge mandatory">*</span></label>
<div class="form-group"> <div class="form-group">
<?php <?php
if (!empty($PoTypeOptions)) { if (!empty($PoTypeOptions)) {
@ -737,7 +737,7 @@
</div> </div>
<div class="col-md-3" id="otheroptiondiv" style="display:none;"> <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"> <div class="form-group">
<?php <?php
@ -751,7 +751,7 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-3"> <div class="col-md-3">
<label>Insurance Options</label> <label>Insurance Options<span class="badge mandatory">*</span></label>
<div class="form-group"> <div class="form-group">
<?php <?php
if (!empty($insuranceStatus)) { if (!empty($insuranceStatus)) {
@ -776,7 +776,7 @@
</div> </div>
<div class="col-md-3" id="insuranceTxtDiv" style="display:block;"> <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"> <div class="form-group">
<?php <?php
$data = array('name' => 'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); $data = array('name' => 'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
@ -785,7 +785,7 @@
</div> </div>
</div> </div>
<div class="col-md-3"> <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'> <select id='BudgetType' name='BudgetType'>
<?php if ($BudgetType == 'CAPITAL') { <?php if ($BudgetType == 'CAPITAL') {
$opt1 = 'CAPITAL'; $opt1 = 'CAPITAL';
@ -2243,7 +2243,7 @@
<td align="left"><%=TotalValue%></td> <td align="left"><%=TotalValue%></td>
<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> </td>

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@ -104,16 +104,22 @@ if ($total <= $reorder) {
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<h1> <h1>
<center> Edit Material -<?php echo $MaterialCode; ?> </center> <center> </center>
</h1> </h1>
</section> </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"> <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"> --> <!-- <div class="row"> -->
<!-- left column --> <!-- left column -->
<div class="col-md-12"> <div class="col-md-12">
@ -142,12 +148,30 @@ if ($total <= $reorder) {
</div> </div>
</div> </div>
<div class="col-md-2"> <!-- <div class="col-md-2">
<div class="form-group"> <div class="form-group">
<label for="MaterialType">Material Type</label> <label for="MaterialType">Material Type</label>
<input type="text" class="form-control" readonly id="MaterialType" name="MaterialType" value="<?php echo $MaterialType; ?>"> <input type="text" class="form-control" readonly id="MaterialType" name="MaterialType" value="<?php echo $MaterialType; ?>">
</div> </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>
<div class="col-md-3"> <div class="col-md-3">
@ -310,6 +334,7 @@ if ($total <= $reorder) {
$("#UOM").select2(); $("#UOM").select2();
$("#MaterialType").select2();
/** ---- auto search code -------- */ /** ---- auto search code -------- */
$('#MaterialCategory').autocomplete({ $('#MaterialCategory').autocomplete({
@ -318,7 +343,7 @@ if ($total <= $reorder) {
$('#MaterialCategory').autocomplete("option", "minLength", 0); $('#MaterialCategory').autocomplete("option", "minLength", 0);
}, },
serviceUrl: "<?php echo base_url(); ?>rawmaterialdetails/autocomplete", serviceUrl: "<?php echo base_url(); ?>rawmaterialdetailsautocomplete",
onSelect: function(suggestion) { onSelect: function(suggestion) {
var data = suggestion.ConfigValue; var data = suggestion.ConfigValue;

View File

@ -900,6 +900,10 @@ if (!empty($INRSYMBOL)) {
text-align: right; text-align: right;
} }
.btn-container .btn {
margin-left: 10px;
}
.header-container { .header-container {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -1114,7 +1118,7 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Revenue Type Options</label> <label>Revenue Type Options<span class="badge mandatory">*</span></label>
<div class="form-group"> <div class="form-group">
<?php <?php
@ -1141,7 +1145,7 @@ if (!empty($INRSYMBOL)) {
</div> </div>
<div class="col-md-3"> <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; ?>"> <input type="hidden" name="beforePaymentTerms" value="<?php echo $Terms; ?>">
@ -1193,7 +1197,7 @@ if (!empty($INRSYMBOL)) {
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-3"> <div class="col-md-3">
<label for="insurance">Insurance</label> <label for="insurance">Insurance<span class="badge mandatory">*</span></label>
<?php <?php
$optionsnew = array('1' => 'Yes', '0' => 'No'); $optionsnew = array('1' => 'Yes', '0' => 'No');
echo form_dropdown('insurancestatus', $optionsnew, set_value('insurancestatus'), 'id="insurancestatus"', 'required="true"', 'class="form-control select2', 'readonly ="true"'); 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> </div>
<div class="col-md-3"> <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'> <select id='BudgetType' name='BudgetType'>
<?php if ($BudgetType == 'CAPITAL') { <?php if ($BudgetType == 'CAPITAL') {
$opt1 = 'CAPITAL'; $opt1 = 'CAPITAL';
@ -1514,263 +1518,260 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</div><br /> </div><br />
<div class="col-md-12"> <div class="col-md-12">
<div class="row"> <div class="col-md-4"></div>
<div class="col-md-12"> <div class="col-md-4">
<div class="col-md-4"> <label>Discount Type </label>
<label>Discount Type </label> <div>
<div> <?php
<?php $options = array("0" => 'Select Discount Type');
$options = array("0" => 'Select Discount Type'); //print_r( $options);
//print_r( $options);
if (!empty($TaxType)) { if (!empty($TaxType)) {
foreach ($TaxType as $SID) : 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"'); 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>
?>
</div> </div>
</div> </div>
<div class="row"> <div class="col-md-2">
<div class="col-md-12 "> <label>Discount Rate </label>
<div class="col-md-2"> <div class="form-group">
<label>Freight Type </label> <?php
<div> $data = array('name' => 'txtEditDiscount', 'value' => set_value('txtEditDiscount'), 'id' => 'txtEditDiscount', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateDiscount();', 'style' => 'text-align:right;');
<?php echo form_input($data);
$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> </div>
</div> </div>
<div class="row"> <div class="col-md-2">
<div class="col-md-12"> <label>Discounted Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<div class="col-md-4 col-md-offset-8"> <?php
<label>Total Order Amt <?php echo "($INRSYM)" ?></label> $data = array('name' => 'txtEditAfterDiscount', 'value' => set_value('txtEditAfterDiscount'), 'id' => 'txtEditAfterDiscount', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
<div class="form-group"> echo form_input($data);
<?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> </div>
</div> </div>
</div> </div>
<br /><br /> <div class="col-md-12 ">
<!-- footer for revenue po --> <div class="col-md-4"></div>
<div class="modal-footer"> <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>
</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> </div>
</form> </form>
</div> </div>
</div> </div>
@ -1904,7 +1905,7 @@ if (!empty($INRSYMBOL)) {
</div> </div>
<!-- /.box-body --> <!-- /.box-body -->
<br> <br>
<div class="row" style="border:1px solid;"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-3"> <div class="col-md-3">
<label>Basic Amount <?php echo "($INRSYM)" ?> </label> <label>Basic Amount <?php echo "($INRSYM)" ?> </label>
@ -2012,19 +2013,20 @@ if (!empty($INRSYMBOL)) {
<?php } ?> <?php } ?>
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br> <input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br>
</div> </div>
<input type="button" class="btn btn-cancel" value="Cancel" onClick="window.location ='amendmentpurchaseorder';"> <div class="btn-container" style="text-align: right;">
<input type="hidden" name="txtPoRange" id="txtPoRange" /> <input type="button" class="btn btn-cancel" value="Cancel" onClick="window.location ='amendmentpurchaseorder';">
<input type="hidden" name="isEdit" id="isEdit" value="0" /> <input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="txtStatus" id="txtStatus" /> <input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $RowCount; ?>" /> <input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" /> <input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $RowCount; ?>" />
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" /> <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="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> <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"> -->
<!-- <input type="reset" class="btn btn-success" value = "OK"> -->
</div>
</div> </div>
@ -2038,12 +2040,28 @@ if (!empty($INRSYMBOL)) {
</div> </div>
<?php $Reqon = new DateTime($Reqon, new DateTimeZone('Asia/Kolkata')); <?php $Reqon = new DateTime($Reqon, new DateTimeZone('Asia/Kolkata'));
$Reqon = $Reqon->format('d-m-Y'); ?> $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) { ?> <?php if ($RequesterName != '' || $RequesterName != null) { ?>
<label>Request By : </label><?php echo $RequesterName; ?><br /> <label>Request By : </label><?php echo $RequesterName; ?>
<?php } ?><br /> <?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>
</div> </div>
</section> </section>
@ -2063,7 +2081,7 @@ if (!empty($INRSYMBOL)) {
<td align="left"><%=TotalValue%></td> <td align="left"><%=TotalValue%></td>
<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> </td>
@ -2567,8 +2585,8 @@ if (!empty($INRSYMBOL)) {
$('#Scheduleby').val(''); $('#Scheduleby').val('');
}); < !--script });
for table, It works uned the datatable plugin-- > // < !--script for table, It works uned the datatable plugin-- >
$(function() { $(function() {
$('#revenueTax').DataTable({ $('#revenueTax').DataTable({

View File

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

View File

@ -723,7 +723,7 @@ foreach ($PaymentTerms as $TER) {
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Supplier<span class="badge mandatory">*</span></label> <label>Select Supplier<span class="badge mandatory">*</span></label>
<?php <?php
$options = array("0" => 'Select Supplier'); $options = array("0" => 'Select Supplier');
//print_r( $options); //print_r( $options);
@ -740,7 +740,7 @@ foreach ($PaymentTerms as $TER) {
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Address</label> <label>Supplier Address</label>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); $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> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Service Type Options</label> <label>Service Type Options<span class="badge mandatory">*</span></label>
<div class="form-group"> <div class="form-group">
<?php <?php
@ -895,7 +895,7 @@ foreach ($PaymentTerms as $TER) {
</div> </div>
</div> </div>
<div class="col-md-3"> <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 ?>"> <input type="hidden" name="beforePaymentTerms" value="<?php echo $Terms ?>">
<?php <?php
if (!empty($Payment)) { if (!empty($Payment)) {
@ -936,7 +936,7 @@ foreach ($PaymentTerms as $TER) {
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-3"> <div class="col-md-3">
<label>Insurance Options</label> <label>Insurance Options<span class="badge mandatory">*</span></label>
<div class="form-group"> <div class="form-group">
<?php <?php
@ -976,8 +976,8 @@ foreach ($PaymentTerms as $TER) {
</div> </div>
</div> </div>
<div class="col-md-3"> <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'> <select id='BudgetType' name='BudgetType' required="true">
<?php if ($BudgetType == 'CAPITAL') { <?php if ($BudgetType == 'CAPITAL') {
$opt1 = 'CAPITAL'; $opt1 = 'CAPITAL';
$opt2 = 'REVENUE'; $opt2 = 'REVENUE';
@ -1273,8 +1273,8 @@ foreach ($PaymentTerms as $TER) {
<div class="modal-footer"> <div class="modal-footer">
<div class="col-md-12"> <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 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> </div>
</div> </div>
@ -1445,7 +1445,7 @@ foreach ($PaymentTerms as $TER) {
</div> </div>
<div class="row" style="border: 1px solid"> <div class="row">
<div class="col-md-12" style="padding:0px;"> <div class="col-md-12" style="padding:0px;">
<div class="col-md-2"> <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="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<input type="hidden" name="txtStatus" id="txtStatus" /> <input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" /> <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="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> <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 /> </div><br />

View File

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

View File

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

View File

@ -431,7 +431,7 @@ if (!empty($getlogpodtl)) {
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Supplier<span class="badge mandatory">*</span></label> <label>Select Supplier<span class="badge mandatory">*</span></label>
<?php <?php
$options = array("0" => 'Select Supplier'); $options = array("0" => 'Select Supplier');
@ -451,7 +451,7 @@ if (!empty($getlogpodtl)) {
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Address</label> <label>Supplier Address</label>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); $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> </div>
<div class="col-md-3"> <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'); <?php // $options2 = array("0"=>'Select Import Option');
if (!empty($PoTypeOptions)) { if (!empty($PoTypeOptions)) {
foreach ($PoTypeOptions as $payment) : foreach ($PoTypeOptions as $payment) :
@ -646,7 +646,7 @@ if (!empty($getlogpodtl)) {
echo form_dropdown('Importoption', $options2, set_value('Importoption'), 'id="Importoption"', 'class="form-control"'); ?> echo form_dropdown('Importoption', $options2, set_value('Importoption'), 'id="Importoption"', 'class="form-control"'); ?>
</div> </div>
<div class="col-md-3"> <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; ?>"> <input type="hidden" name="beforePaymentTerms" value="<?php echo $Terms; ?>">
<?php if (!empty($Payment)) { <?php if (!empty($Payment)) {
foreach ($Payment as $pay2) foreach ($Payment as $pay2)
@ -681,7 +681,7 @@ if (!empty($getlogpodtl)) {
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-3"> <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'> <select id='Insurance' name='Insurance'>
<?php if ($Insurance == 1) { <?php if ($Insurance == 1) {
$opt1 = 'YES'; $opt1 = 'YES';
@ -707,7 +707,7 @@ if (!empty($getlogpodtl)) {
</div> </div>
</div> </div>
<div class="col-md-3"> <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'> <select id='BudgetType' name='BudgetType'>
<?php if ($BudgetType == 'CAPITAL') { <?php if ($BudgetType == 'CAPITAL') {
$opt1 = '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"> <div class="content-wrapper">
<section class="content"> <section class="content">
@ -47,7 +69,6 @@
<th>Emp ID</th> <th>Emp ID</th>
<th>Employee Name</th> <th>Employee Name</th>
<th>Contact Number</th> <th>Contact Number</th>
<th>Email ID</th>
<th>Designation</th> <th>Designation</th>
<th>Department</th> <th>Department</th>
<th>Active</th> <th>Active</th>
@ -62,9 +83,8 @@
?> ?>
<tr> <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><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->FirstName; ?></td>
<td><?php echo $record->ContactNumber ?></td> <td><?php echo $record->ContactNumber ?></td>
<td><?php echo $record->EmailId ?></td>
<td><?php echo $record->Designation ?></td> <td><?php echo $record->Designation ?></td>
<td><?php echo $record->DepartmentName ?></td> <td><?php echo $record->DepartmentName ?></td>
<td><?php echo ($record->IsActive == 1)? ' Active ' : ' In Active ' ; ?></td> <td><?php echo ($record->IsActive == 1)? ' Active ' : ' In Active ' ; ?></td>
@ -96,7 +116,9 @@
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"info": true, "info": true,
"autoWidth": true "autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100]
}); });
}); });

View File

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

View File

@ -776,8 +776,68 @@
<?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> </span>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
<!-- <li class="treeview"> <li class="treeview">
<a href="<?php echo base_url(); ?>Stock"> <a href="<?php echo base_url(); ?>Stock">
<i class="fa fa-dashboard"></i> <span>Stock </span> <i class="fa fa-dashboard"></i> <span>Stock </span>
</a> </a>
</li> --> </li>
<li> <li>
<a href="<?php echo base_url(); ?>FinalProduct"> <a href="<?php echo base_url(); ?>FinalProduct">
<i class="fa fa-dashboard"></i> <span>Finished Product Batch Card</span> <i class="fa fa-dashboard"></i> <span>Finished Product Batch Card</span>
@ -1211,12 +1271,7 @@
<span class="nav-label">Asset Details</span> <span class="nav-label">Asset Details</span>
</a></li> </a></li>
<?php } ?> <?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) { ?> <?php if ($DEPCode == SALES || $DEPCode == ADMIN) { ?>
<li><a href="<?php echo base_url(); ?>supplierlisting" > <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"> <div class="col-md-4">
<label>Invoice Number <span style="color:red; font-size: 15px;">*</span><!-- Delivery Challan/Inv No --></label> <label>Invoice Number <span style="color:red; font-size: 15px;">*</span><!-- Delivery Challan/Inv No --></label>
<?php <?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); echo form_input($data);
?> ?>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label>Invoice Date <span style="color:red; font-size: 15px;">*</span><!-- Delivery Challan/Inv Date --></label> <label>Invoice Date <span style="color:red; font-size: 15px;">*</span><!-- Delivery Challan/Inv Date --></label>
<?php <?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); echo form_input($data);
?> ?>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label>Material Received Date <span style="color:red; font-size: 15px;">*</span></label> <label>Material Received Date <span style="color:red; font-size: 15px;">*</span></label>
<?php <?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); echo form_input($data);
?> ?>
</div> </div>
@ -150,7 +150,7 @@
<div class="col-md-4"> <div class="col-md-4">
<label>Vechicle Number</label> <label>Vechicle Number</label>
<?php <?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); echo form_input($data);
?> ?>
<!-- <span pattern="" required="true"></span> --> <!-- <span pattern="" required="true"></span> -->
@ -158,14 +158,14 @@
<div class="col-md-4"> <div class="col-md-4">
<label>Driver Name</label> <label>Driver Name</label>
<?php <?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); echo form_input($data);
?> ?>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label>Driver Mobile Number</label> <label>Driver Mobile Number</label>
<?php <?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); echo form_input($data);
?> ?>
</div> </div>
@ -206,7 +206,43 @@
<div class="col-md-4 col-md-offset-8"> <div class="col-md-4 col-md-offset-8">
<input type="file" name="MasterFile" id="images1" onchange="Copyfilenames(this.name); "><br> <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> <button class="btn btn-success" id='IGRLink' type="submit" name='IGRLink' onclick="filecheck(1);">Generate IGR</button>
</div> </div>
</div> </div>
@ -267,7 +303,7 @@
<label for="GrossWeight" class="col-md-2 col-form-label">Gross Weight</label> <label for="GrossWeight" class="col-md-2 col-form-label">Gross Weight</label>
<div class="col-md-5"> <div class="col-md-5">
<?php <?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); echo form_input($data);
?> ?>
</div> </div>
@ -283,7 +319,7 @@
<label for="TareWeight" class="col-md-2 col-form-label">Tare Weight</label> <label for="TareWeight" class="col-md-2 col-form-label">Tare Weight</label>
<div class="col-md-5"> <div class="col-md-5">
<?php <?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); echo form_input($data);
?> ?>
</div> </div>
@ -325,15 +361,8 @@
</div><!-- modal content div closed--> </div><!-- modal content div closed-->
</div><!-- modal content closed--> </div><!-- modal content closed-->
</div><!-- modal fade closed--> </div><!-- modal fade closed-->
</div> </div>
<!-- WeightCalculator modal ended--> <!-- WeightCalculator modal ended-->
</div> </div>
</section> </section>
@ -348,7 +377,8 @@
<script> <script>
function validate() { function validate() {
var rowcount = $("#txtRowCount").val(); var rowcount = $("#txtRowCount").val();
var isOpenOrder = parseInt($("#hiddenIsOpenOrder").val(), 2);
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? 0 : 1;
var Noval = 0; var Noval = 0;
var isExceed = 0; var isExceed = 0;
for (k = 1; k <= rowcount; k++) { for (k = 1; k <= rowcount; k++) {
@ -383,7 +413,7 @@
} else if (Noval == 0) { } else if (Noval == 0) {
alert('Invoice Quantity is Empty.Please Enter the value'); alert('Invoice Quantity is Empty.Please Enter the value');
return false; 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 ") alert("Invoice Quantity is exceeding the Ordered Quantity.Please Contact Purchase Team for further Process ")
return false; return false;
} else { } else {
@ -446,6 +476,8 @@
var isOpenOrder = parseInt(obj.IsOpenOrder, 2); var isOpenOrder = parseInt(obj.IsOpenOrder, 2);
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "" : "Open"; var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "" : "Open";
$('.help-block').text(formatted_IsOpenOrder); $('.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); //$("#Add").val(obj.Address);
$("#del").val(obj.DeliveryDate); $("#del").val(obj.DeliveryDate);
//$("#ser").val(obj.ServiceDescription); //$("#ser").val(obj.ServiceDescription);
@ -476,11 +508,11 @@
'<td name="MaterialName" id="MaterialCode" >' + item.MaterialCode + '</td>' + '<td name="MaterialName" id="MaterialCode" >' + item.MaterialCode + '</td>' +
'<td>' + item.MaterialName + '</td>' + '<td>' + item.MaterialName + '</td>' +
'<td name="UOM">' + item.UOM + '</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="ReceivedQuantity' + i + '" id="ReceivedQuantity' + i + '">' + item.ReceivedQuantity + '</td>' +
'<td name="PendingQuantity' + i + '" id="PendingQuantity' + i + '">' + item.PendingQty + '</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 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 + ')"> </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>' + '<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>'; '</tr>';
$('#txtRowCount').val(i); $('#txtRowCount').val(i);
@ -619,7 +651,9 @@
var RecQty = parseFloat($('#txtReceivedQuantity' + Rowid).val() == '' ? '0.00' : $('#txtReceivedQuantity' + Rowid).val()); var RecQty = parseFloat($('#txtReceivedQuantity' + Rowid).val() == '' ? '0.00' : $('#txtReceivedQuantity' + Rowid).val());
var OrderedQty = parseFloat($("#Quantity_1" + Rowid).text()); var OrderedQty = parseFloat($("#Quantity_1" + Rowid).text());
var r = $("#Remark" + Rowid).val(); 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) { if ((InvoiceQty + RecQty) > OrderedQty) {
alert("Invoice Quantity is exceeding the Ordered Quantity.Please Contact Purchase Team for further Process ") alert("Invoice Quantity is exceeding the Ordered Quantity.Please Contact Purchase Team for further Process ")
$("#QuantityAsPerInvoice" + Rowid).focus(); $("#QuantityAsPerInvoice" + Rowid).focus();
@ -638,6 +672,11 @@
$("#txtQuantityAsPerInvoice" + Rowid).val(InvoiceQty); $("#txtQuantityAsPerInvoice" + Rowid).val(InvoiceQty);
// InvoiceQty // InvoiceQty
return true; return true;
}}else{
$('#txtPendingQty' + Rowid).val(0.00);
$("#txtQuantityAsPerInvoice" + Rowid).val(0.00);
// InvoiceQty
return true;
} }
} }
</script> </script>
@ -819,3 +858,41 @@
} }
} }
</script> </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> <script>
$(document).ready(function() { $(document).ready(function() {
$("#PaymentTerms").select2(); $("#PaymentTerms").select2();
clearTotalItemValues(); clearTotalItemValues();
if ($("#insurance").val() == 1) { if ($("#insurance").val() == 1) {
@ -1735,6 +1737,10 @@ if (!empty($INRSYMBOL)) {
margin: 0; margin: 0;
} }
.btn-container .btn {
margin-left: 10px;
}
.centered { .centered {
display: flex; display: flex;
/* justify-content: center; */ /* justify-content: center; */
@ -2015,6 +2021,15 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</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 --> <!-- Modal for Packing Calculation -->
<div id="packagingcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div id="packagingcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog"> <div class="modal-dialog">
@ -2045,7 +2060,7 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</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 id="freightcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog"> <div class="modal-dialog">
@ -2169,18 +2184,7 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</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 --> <!-- 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 id="REVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="overflow-y:scroll !important">
@ -2313,14 +2317,6 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</div> </div>
<div class="col-md-12" style="padding:0px;"> <div class="col-md-12" style="padding:0px;">
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-4"></div> <div class="col-md-4"></div>
<div class="col-md-4"> <div class="col-md-4">
@ -2587,8 +2583,9 @@ if (!empty($INRSYMBOL)) {
</form> </form>
</div> </div>
</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 id="EDITREVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="overflow-y:scroll !important">
<div class="modal-dialog"> <div class="modal-dialog">
<!-- Modal content--> <!-- Modal content-->
@ -2711,6 +2708,7 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-4"></div>
<div class="col-md-4"> <div class="col-md-4">
<label>Discount Type </label> <label>Discount Type </label>
<div> <div>
@ -2750,29 +2748,9 @@ if (!empty($INRSYMBOL)) {
?> ?>
</div> </div>
</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>
<div class="col-md-12" style="text-align:left;"> <div class="col-md-12" style="text-align:left;">
<div class="col-md-4"></div>
<div class="col-md-4"> <div class="col-md-4">
<label>Packaging Type </label> <label>Packaging Type </label>
<div> <div>
@ -2812,49 +2790,10 @@ if (!empty($INRSYMBOL)) {
?> ?>
</div> </div>
</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>
<div class="col-md-12"> <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> <label>Freight Type </label>
<div> <div>
<?php <?php
@ -2902,8 +2841,79 @@ if (!empty($INRSYMBOL)) {
?> ?>
</div> </div>
</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"> <div class="col-md-4">
<label> Insurance Amt <?php echo "($INRSYM)" ?> (if Any)</label> <label> Insurance Amt <?php echo "($INRSYM)" ?> (if Any)</label>
<div class="form-group"> <div class="form-group">
@ -2917,7 +2927,7 @@ if (!empty($INRSYMBOL)) {
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-4"> <div class="col-md-4">
<div class="form-group"> <div class="form-group">
<label><?php echo "Total Order Amt ($INRSYM)"; ?></label> <label><?php echo "Total Order Amt ($INRSYM)"; ?></label>
@ -2929,7 +2939,6 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<label><?php echo "Reveneue Description"; ?></label> <label><?php echo "Reveneue Description"; ?></label>
<div class="form-group"> <div class="form-group">
<?php <?php
@ -2957,47 +2966,46 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</form> </form>
</div> </div>
</div> </br>
</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>
<tbody id='RevenueAppend'></tbody> <!-- Table box-body -->
</table> <div class="box-body">
</div> <div class="row">
<!-- /.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>
<tbody id='RevenueAppend'></tbody>
</table>
</div>
</div>
</br>
<!-- /.box-body -->
<div class="row">
</div>
<div class="row" style="border:1px solid;">
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-3"> <div class="col-md-3">
<label>Basic Amount <?php echo "($INRSYM)" ?></label> <label>Basic Amount <?php echo "($INRSYM)" ?></label>
<?php <?php
$data = array('name' => 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount'), 'id' => 'txtTotBasicAmount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); $data = array('name' => 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount'), 'id' => 'txtTotBasicAmount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data); echo form_input($data);
?> ?>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Total Discount Amount <?php echo "($INRSYM)" ?> </label> <label>Total Discount Amount <?php echo "($INRSYM)" ?> </label>
@ -3037,8 +3045,6 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-3"> <div class="col-md-3">
<label>Total Packaging Amount <?php echo "($INRSYM)" ?></label> <label>Total Packaging Amount <?php echo "($INRSYM)" ?></label>
@ -3084,7 +3090,8 @@ if (!empty($INRSYMBOL)) {
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value=""> <input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value="">
</div> </div>
</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 /> <div class="col-md-4 col-md-offset-8"><br />
<input type="file" name="POFile" id="POFile"><br> <input type="file" name="POFile" id="POFile"><br>
<input type="hidden" name="txtPoRange" id="txtPoRange" /> <input type="hidden" name="txtPoRange" id="txtPoRange" />
@ -3093,11 +3100,12 @@ if (!empty($INRSYMBOL)) {
<input type="hidden" name="txtRowCount" id="txtRowCount" /> <input type="hidden" name="txtRowCount" id="txtRowCount" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" /> <input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="Budget" id="Budget" /> <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> <div class="btn-container" style="text-align: right;">
<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-reset Save" ID="Cancel" onclick="Reset();">&nbsp;&nbsp;<span class="bold">Reset</span></a>
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</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><br />
</div>
</div> </div>
</div> </div>

View File

@ -11,182 +11,295 @@
} }
//echo $ReqNo; //echo $ReqNo;
}?> }?>
<style> <style>
#Requisition_filter{ #Requisition_filter {
float: inline-end; 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>
<script> #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;
}
function DeleteRow(rowid) #Requisition_wrapper .row:nth-child(3),
{ #Requisition_wrapper .row:nth-child(1) {
padding: 0 15px;
}
id = rowid; #Requisition_info {
margin-top: 5px;
}
var answer = confirm(" Do you want to delete the Requisition?") .dataTables_wrapper {
if (answer) padding-bottom: 0;
{ }
$.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>
<style>
span.highlight { span.highlight {
background-color: yellow; background-color: yellow;
} }
</style> </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"> <div class="content-wrapper">
<section class="content"> <section class="content">
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<div class="box-header">
<center><b><h3 class="box-title">Requisition Listing</h3></b></center>
</div><!-- /.box-header --> <div class="box-header">
<?php if($DraftCount > 0 ) {?><p style="text-align: center;"> <center><b>
<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> <h3 class="box-title">Requisition Listing</h3>
</p> <?php } ?> </b></center>
<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><!-- /.box-header -->
</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> <?php if($DraftCount > 0 ) {?><p style="text-align: center;">
</thead> <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)) if(!empty($TotNoOfLine))
{ {
foreach($TotNoOfLine as $record) foreach($TotNoOfLine as $record)
{ //print_r($record); { //print_r($record);
?> ?>
<tr> <tr>
<td> <?php $Pdt = new DateTime($record->CreatedDate ); <td> <?php $Pdt = new DateTime($record->CreatedDate );
$PODate = $Pdt->format('d-m-Y'); $PODate = $Pdt->format('d-m-Y');
echo $PODate ?> echo $PODate ?>
</td> </td>
<td><?php echo $record->ReqNo ?></td> <td><?php echo $record->ReqNo ?></td>
<td><?php echo $record->ReqType ?></td> <td><?php echo $record->ReqType ?></td>
<td><?php echo $record->TotalNoofLineItems ?></td> <td><?php echo $record->TotalNoofLineItems ?></td>
<td><?php echo $record->PolineItems ?></td> <td><?php echo $record->PolineItems ?></td>
<td><?php echo $record->PartilallyLineItems ?></td> <td><?php echo $record->PartilallyLineItems ?></td>
<td> <?php echo $record->newLineItem ?></td> <td> <?php echo $record->newLineItem ?></td>
<td><?php echo $record->StatusName ?></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> <td> <a data-toggle="tooltip"
</tr> 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 <?php
} }
} }
?> ?>
</table> </table>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
</div> </div>
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
<script>
$(function () {
// $('#Requisition').DataTable({ <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
// "paging": true, <script>
// "lengthChange": true, function DeleteRow(rowid) {
// "searching": true,
// "ordering": true,
// "columnDefs": [{"targets": 0, "type": "date-eu"}],
// "aaSorting": [[1, "desc"]],
// "info": true,
// "autoWidth": true,
// "pageLength": 10
// });
$(document).ready(function() { id = rowid;
$('#Requisition').DataTable({
"paging": true, // Enable pagination var answer = confirm(" Do you want to delete the Requisition?")
"lengthChange": true, // Enable the option to change the number of rows per page if (answer) {
"searching": true, // Enable searching
"ordering": true, // Enable column ordering $.ajax({
"columnDefs": [{"targets": 0, "type": "date-eu"}], // Column definitions for date formatting data: {
"aaSorting": [[1, "desc"]], // Default sorting: sort by the 2th column (index 1) in descending order id: id
"info": true, // Show pagination info },
"autoWidth": true, // Enable automatic column width adjustment type: "POST",
"pageLength": 10, // Set the default number of rows per page to 10 url: "<?php echo base_url() ?>requisitionform/DeleteReqNo",
"lengthMenu": [10, 25, 50, 100] // Options for the number of rows per page in the dropdown 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> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Supplier<span class="badge mandatory">*</span></label> <label>Select Supplier<span class="badge mandatory">*</span></label>
<?php <?php
$options = array("0" => 'Select Supplier'); $options = array("0" => 'Select Supplier');
@ -688,7 +688,7 @@ if (!empty($INRSYMBOL)) {
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Address</label> <label>Supplier Address</label>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); $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> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Service Type Options</label> <label>Service Type Options<span class="badge mandatory">*</span></label>
<div class="form-group"> <div class="form-group">
<?php <?php
//$optionsWork = array("0"=>'Select Work Status'); //$optionsWork = array("0"=>'Select Work Status');
@ -830,7 +830,7 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Payment Terms</label> <label>Payment Terms<span class="badge mandatory">*</span></label>
<?php <?php
if (!empty($Payment)) { if (!empty($Payment)) {
$options6 = array("0" => 'Select Payment Terms '); $options6 = array("0" => 'Select Payment Terms ');
@ -859,7 +859,7 @@ if (!empty($INRSYMBOL)) {
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-3"> <div class="col-md-3">
<label>Insurance Options</label> <label>Insurance Options<span class="badge mandatory">*</span></label>
<div class="form-group"> <div class="form-group">
<?php <?php
@ -890,7 +890,7 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label for="BudgetType">Budget Type</label> <label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<?php <?php
@ -903,15 +903,15 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</div> </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"> <div class="container-fluid">
<table class="table table-bordered" style="border:1px solid #333" id="ServiceTable"> <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 --> <!-- Model for Add servicepo -->
<div class="modal fade" id="SERVICE" role="dialog"> <div class="modal fade" id="SERVICE" role="dialog">
<div class="modal-dialog"> <div class="modal-dialog">
@ -1207,296 +1207,295 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</div> </div>
</div> <!-- END of model for Add servicepo -->
<!-- END of model for Add servicepo --> <!-- Edit Service po moddel-->
<!-- Edit Service po moddel--> <div class="modal fade" id="EDITSERVICE" role="dialog">
<div class="modal fade" id="EDITSERVICE" role="dialog"> <div class="modal-dialog">
<div class="modal-dialog"> <!-- Modal content-->
<!-- Modal content--> <form>
<form> <div class="modal-content" style="width:900px;">
<div class="modal-content" style="width:900px;"> <div class="modal-header">
<div class="modal-header"> <!-- <button type="button" class="close" data-dismiss="modal">&times;</button> -->
<!-- <button type="button" class="close" data-dismiss="modal">&times;</button> --> <center>
<center> <h4>Edit Service Purchase Order Item </h4>
<h4>Edit Service Purchase Order Item </h4> </center>
</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>
</div> </div>
<div class="col-md-12"> <div align="left">
<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"> <div class="col-md-12">
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a> <div class="col-md-3">
<a class="btn btn-success font EditService" ID="Edit">&nbsp;&nbsp;<span class="bold">Update Service</span></a> <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> </div>
</div> </form>
</form>
</div>
</div> </div>
</div> <!-- End of Model for EDIT servicepo -->
</div> </table>
<!-- End of Model for EDIT servicepo -->
</div> </div>
<div class="box-body"> <div class="box-body">
@ -1523,8 +1522,8 @@ if (!empty($INRSYMBOL)) {
</table> </table>
</div> </div>
</table>
<div class="row" style="border: 1px solid"> <div class="row">
<div class="col-md-12" style="padding: 0px;"> <div class="col-md-12" style="padding: 0px;">
<div class="col-md-2"> <div class="col-md-2">
@ -1604,9 +1603,12 @@ if (!empty($INRSYMBOL)) {
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction"> <input type="hidden" name="SpcialInstruction" id="SpcialInstruction">
<input type="hidden" name="txtDeliveryAddress" id="txtDeliveryAddress"> <input type="hidden" name="txtDeliveryAddress" id="txtDeliveryAddress">
<input type="hidden" name="Budget" id="Budget" /> <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> <div class="btn-container" style="text-align: right;">
<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> <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><br />
</div> </div>
</div> </div>

View File

@ -13,43 +13,41 @@
th { th {
white-space: nowrap; 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> </style>
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css"> <style>
<!-- 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;
}
th, td { th, td {
white-space: nowrap; white-space: nowrap;
} }
.dataTables_wrapper { </style>
width: 100%;
overflow-x: auto;
}
</style>
<script> <script>
$(function() { $(function() {
var d = new Date(); var d = new Date();
@ -77,12 +75,25 @@
<center><b><h3 class="box-title">View Inward Gate Register </h3></b></center> <center><b><h3 class="box-title">View Inward Gate Register </h3></b></center>
</div> </div>
<div class="row"> <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"> <div class="col-md-12">
<table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;"> <table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;"> <thead style="background-color: #ddd;">
<tr> <tr>
<th style="display:none;"></th> <th style="display:none;"></th>
<th>Created Date</th> <th>Create Date</th>
<th>Create time</th>
<th>IGR No</th> <th>IGR No</th>
<th>PO No</th> <th>PO No</th>
<th>Supplier Name</th> <th>Supplier Name</th>
@ -99,14 +110,17 @@
{ $index = 0; { $index = 0;
foreach($IGR as $record) 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 ?>" > <tr id="<?php echo $index ?>" >
<th style="display:none;"><?php echo $record->CreatedDate ?></th> <th style="display:none;"><?php echo $record->CreatedDate ?></th>
<td align="right"><?php <td align="right"><?php echo $date; ?></td>
$createddate = new DateTime($record->CreatedDate); <td align="right"><?php echo $time; ?></td>
echo $createddate->format('d-m-Y h:i A'); ?></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 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->SupplierName ?></td>
<td><?php echo $record->DeliveryChellanOrInvoiceNo ?></td> <td><?php echo $record->DeliveryChellanOrInvoiceNo ?></td>
<td align="right"><?php <td align="right"><?php
@ -114,12 +128,17 @@
echo $date->format('d-m-Y'); ?></td> echo $date->format('d-m-Y'); ?></td>
<td><?php echo $record->VehicleNo ?></td> <td><?php echo $record->VehicleNo ?></td>
<td><?php echo $record->IGRStatus == 'ST074' ? 'Draft' : 'Completed'; ?></td> <td><?php echo $record->IGRStatus == 'ST074' ? 'Draft' : 'Completed'; ?></td>
<td><?php if (!empty($record->FilePath)) { ?> <td>
<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" 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)) { ?> <?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 { ?> <?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 } ?> <?php } ?>
&nbsp; &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 ?>"> <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> </div>
<input type="hidden" id="IGRNO1" name="IGRNumber" readonly> <input type="hidden" id="IGRNO1" name="IGRNumber" readonly>
<input type="hidden" id="PONO1" name="PONumber" readonly>
</div> </div>
<div class="col-md-12" style="margin: 10px 0;"> <div class="col-md-12" style="margin: 10px 0;">
<div class="col-md-4"> <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;"> <table class="table table-bordered" id="Inwardgateregistertable1 table-hover" style="background-color:#fff; font-size:12px;">
<thead style="background-color:#ddd !important"> <thead style="background-color:#ddd !important">
<tr> <tr>
<th>SNo</th> <th style="width: 50px;">SNo</th>
<th>Item Code</th> <th style="width: 100px;">Item Code</th>
<th>Item Description</th> <th style="width: 200px; word-wrap: break-word; word-break: break-all; white-space: normal;">Item Description</th>
<th>UOM</th> <th style="width: 50px;">UOM</th>
<th>Ordred Qty</th> <th style="width: 100px;">Ordered Qty</th>
<th>Received Qty</th> <th style="width: 100px;">Received Qty</th>
<th id="pendingQuantityHeader" style="display:none;">Pending Qty</th> <th id="pendingQuantityHeader" style="display:none; width: 100px;">Pending Qty</th>
<th>Remarks</th> <th style="width: 150px;">Remarks</th>
<th></th> <th style="width: 50px;"></th>
</tr> </tr>
</thead> </thead>
<tbody id="tbleIGRAppend"> <tbody id="tbleIGRAppend">
@ -248,7 +269,7 @@
</tbody> </tbody>
</table> </table>
<div class="modal-footer">
<!-- <a class="btn btn-primary" id="update" value="Update">Update</a> --> <!-- <a class="btn btn-primary" id="update" value="Update">Update</a> -->
<div class="col-md-4 col-md-offset-8"> <div class="col-md-4 col-md-offset-8">
<input type="file" name="MasterFile" id="MasterFile" onchange="Copyfilenames(this.name); "> <input type="file" name="MasterFile" id="MasterFile" onchange="Copyfilenames(this.name); ">
@ -257,13 +278,24 @@
</label> </label>
</div> </div>
<div class="buttonContainer"> <div class="files">
<a class="btn btn-cancel" data-dismiss="modal" value="Close">Close</a> <div class="col-md-4 col-md-offset-8" style="padding: 15px 0px;">
<a class="btn btn-primary" id="draftIGR" value="draftIGR">Draft IGR</a> <button type="button" class="btn btn-primary btn-sm a1"
<a class="btn btn-primary" id="generateIGR" value="generateIGR">Generate IGR</a> onclick="appendFilesFileds()" id="day">
</div> Add Additional File
</button>
</div>
</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> </form>
</div> </div>
@ -449,8 +481,6 @@
<form class="tagForm" id="tag-form" method="post" enctype="multipart/form-data"> <form class="tagForm" id="tag-form" method="post" enctype="multipart/form-data">
<div class="modal-body" style="padding:0px;"> <div class="modal-body" style="padding:0px;">
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-5"> <div class="col-md-5">
@ -538,11 +568,13 @@
// success:function(data) { // success:function(data) {
$('#content').loader('hide'); $('#content').loader('hide');
var parsedData = JSON.parse(data); var parsedData = JSON.parse(data);
if (parsedData.length === 0) { console.log(parsedData);
if (parsedData['details'].length === 0) {
console.log("No data available"); console.log("No data available");
// Reset all relevant fields and table // Reset all relevant fields and table
$('#IgrshowTitle').text(''); $('#IgrshowTitle').text('');
$("#IGRNO1").val(''); $("#IGRNO1").val('');
$("#PONO1").val('');
$("#txtIGRLineItem").val(''); $("#txtIGRLineItem").val('');
$('#printLink').attr('href', '#'); $('#printLink').attr('href', '#');
$('.help-block').text(''); $('.help-block').text('');
@ -566,11 +598,12 @@
var trIGRHTML = ''; var trIGRHTML = '';
$.each(parsedData, function(i, item) { $.each(parsedData['details'], function(i, item) {
if (igr == item.IGRNO) { if (igr == item.IGRNO) {
console.log(item); console.log(item);
$('#IgrshowTitle').text(" ( " + item.IGRNO + " ) "); $('#IgrshowTitle').text(" ( " + item.IGRNO + " ) ");
$("#IGRNO1").val(item.IGRNO); $("#IGRNO1").val(item.IGRNO);
$("#PONO1").val(item.PONO);
$("#txtIGRLineItem").val(item.IGRItemNo); $("#txtIGRLineItem").val(item.IGRItemNo);
var baseUrl = '<?php echo base_url(); ?>purchaseorder/CreatePOPrint'; var baseUrl = '<?php echo base_url(); ?>purchaseorder/CreatePOPrint';
var newUrl = baseUrl + '?PONO=' + item.PONO + '&ReqType=' + item.POType; var newUrl = baseUrl + '?PONO=' + item.PONO + '&ReqType=' + item.POType;
@ -617,15 +650,15 @@
$("#pendingQuantityHeader").css("display", "table-cell"); $("#pendingQuantityHeader").css("display", "table-cell");
trIGRHTML += '<tr>' + trIGRHTML += '<tr>' +
'<td align="right">' + i + '</td>' + '<td style="width: 50px;" align="right">' + i + '</td>' +
'<td name="MaterialName" onchange="test(' + i + ')">' + item.MaterialCode + '</td>' + '<td style="width: 100px;" name="MaterialName" onchange="test(' + i + ')">' + item.MaterialCode + '</td>' +
'<td>' + item.MaterialName + '</td>' + '<td style="width: 200px; word-wrap: break-word; word-break: break-all; white-space: normal;">' + item.MaterialName + '</td>' +
'<td name="UOM">' + item.UOM + '</td>' + '<td style="width: 50px;" name="UOM">' + item.UOM + '</td>' +
'<td align="right" id="Quantity' + i + '" name="Quantity">' + parseInt(item.Quantity) + '</td>' + '<td style="width: 100px;" 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 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 name="PendingQuantity' + i + '" id="PendingQuantity' + i + '">' + parseInt(item.Quantity - item.QuantityAsPerInvoice) + '</td>' + '<td style="width: 100px;" 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 style="width: 150px;"><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;"><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="IGRNO' + i + '" name="IGRNO' + i + '" value="' + item.IGRNO + '">' +
'<input type="hidden" id="MaterialCode' + i + '" name="MaterialCode' + i + '" value="' + item.MaterialCode + '">' + '<input type="hidden" id="MaterialCode' + i + '" name="MaterialCode' + i + '" value="' + item.MaterialCode + '">' +
'<input type="hidden" id="txtQuantityAsPerInvoice' + i + '" name="txtQuantityAsPerInvoice' + i + '" value="' + item.QuantityAsPerInvoice + '">' + '<input type="hidden" id="txtQuantityAsPerInvoice' + i + '" name="txtQuantityAsPerInvoice' + i + '" value="' + item.QuantityAsPerInvoice + '">' +
@ -648,14 +681,14 @@
} else { } else {
$("#pendingQuantityHeader").css("display", "none"); $("#pendingQuantityHeader").css("display", "none");
trIGRHTML += '<tr>' + trIGRHTML += '<tr>' +
'<td align="right">' + i + '</td>' + '<td style="width: 50px;" align="right">' + i + '</td>' +
'<td name="MaterialName" id="MaterialCode" onchange="test(' + i + ')">' + item.MaterialCode + '</td>' + '<td style="width: 100px;" name="MaterialName" id="MaterialCode" onchange="test(' + i + ')">' + item.MaterialCode + '</td>' +
'<td>' + item.MaterialName + '</td>' + '<td style="width: 200px; word-wrap: break-word; word-break: break-all; white-space: normal;">' + item.MaterialName + '</td>' +
'<td name="UOM">' + item.UOM + '</td>' + '<td style="width: 50px;" name="UOM">' + item.UOM + '</td>' +
'<td align="right" name="Quantity">' + item.Quantity + '</td>' + '<td style="width: 100px;" align="right" name="Quantity">' + item.Quantity + '</td>' +
'<td align="right" data-name="sel" >' + item.QuantityAsPerInvoice + '</td>' + '<td style="width: 100px;" align="right" data-name="sel" >' + item.QuantityAsPerInvoice + '</td>' +
'<td>' + item.Remarks + '</td>' + '<td style="width: 150px;">' + 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;"><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="IGRNO' + i + '" name="IGRNO' + i + '" value="' + item.IGRNO + '">' +
'<input type="hidden" id="MaterialCode' + i + '" name="MaterialCode' + i + '" value="' + item.MaterialCode + '">' + '<input type="hidden" id="MaterialCode' + i + '" name="MaterialCode' + i + '" value="' + item.MaterialCode + '">' +
'<input type="hidden" id="txtQuantityAsPerInvoice' + i + '" name="txtQuantityAsPerInvoice' + i + '" value="' + item.QuantityAsPerInvoice + '">' + '<input type="hidden" id="txtQuantityAsPerInvoice' + i + '" name="txtQuantityAsPerInvoice' + i + '" value="' + item.QuantityAsPerInvoice + '">' +
@ -676,6 +709,11 @@
$("#tbleIGRAppend").empty(); $("#tbleIGRAppend").empty();
$("#tbleIGRAppend").append(trIGRHTML); $("#tbleIGRAppend").append(trIGRHTML);
if (parsedData['files'].length !== 0) {
$.each(parsedData['files'], function(i, item) {
appendExistingFilesFileds(item)
});
}
} }
}); });
}); });
@ -701,6 +739,7 @@
$('#draftIGR').click(function(){ $('#draftIGR').click(function(){
$('#content').loader('show'); $('#content').loader('show');
var igrno = $("#IGRNO1").val(); var igrno = $("#IGRNO1").val();
var pono = $("#PONO1").val();
var status = 0; var status = 0;
var tableData = []; var tableData = [];
$('#tbleIGRAppend tr').each(function(index) { $('#tbleIGRAppend tr').each(function(index) {
@ -720,8 +759,12 @@
}; };
tableData.push(rowData); tableData.push(rowData);
}); });
var formData = new FormData(); var formData = new FormData();
// file_name[]
// emp_file[]
formData.append('igr', igrno); formData.append('igr', igrno);
formData.append('po', pono);
formData.append('mrc', $("#MaterialRcvdDate").val()); formData.append('mrc', $("#MaterialRcvdDate").val());
formData.append('invdate', $("#Invoice_Date").val()); formData.append('invdate', $("#Invoice_Date").val());
formData.append('vehicle_no', $('#Vehicle_No').val()); formData.append('vehicle_no', $('#Vehicle_No').val());
@ -730,6 +773,16 @@
formData.append('status', status); formData.append('status', status);
formData.append('tableData', JSON.stringify(tableData)); formData.append('tableData', JSON.stringify(tableData));
formData.append('MasterFile', $('#MasterFile')[0].files[0]); 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({ $.ajax({
data: formData, data: formData,
type: "POST", type: "POST",
@ -746,6 +799,7 @@
$('#generateIGR').click(function(){ $('#generateIGR').click(function(){
$('#content').loader('show'); $('#content').loader('show');
var igrno = $("#IGRNO1").val(); var igrno = $("#IGRNO1").val();
var pono = $("#PONO1").val();
var status = 1; var status = 1;
var tableData = []; var tableData = [];
$('#tbleIGRAppend tr').each(function(index) { $('#tbleIGRAppend tr').each(function(index) {
@ -767,6 +821,7 @@
}); });
var formData = new FormData(); var formData = new FormData();
formData.append('igr', igrno); formData.append('igr', igrno);
formData.append('po', pono);
formData.append('mrc', $("#MaterialRcvdDate").val()); formData.append('mrc', $("#MaterialRcvdDate").val());
formData.append('invdate', $("#Invoice_Date").val()); formData.append('invdate', $("#Invoice_Date").val());
formData.append('vehicle_no', $('#Vehicle_No').val()); formData.append('vehicle_no', $('#Vehicle_No').val());
@ -775,7 +830,16 @@
formData.append('status', status); formData.append('status', status);
formData.append('tableData', JSON.stringify(tableData)); formData.append('tableData', JSON.stringify(tableData));
formData.append('MasterFile', $('#MasterFile')[0].files[0]); 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({ $.ajax({
data: formData, data: formData,
type:"POST", type:"POST",
@ -1049,10 +1113,10 @@ $("#hidebillno").val(Billno);
function deleteBill(Billno,i){ function deleteBill(Billno,i){
$.ajax({ $.ajax({
data: { data: {
Billno: Billno, id: Billno,
}, },
type: "POST", type: "POST",
url: "<?php echo base_url() ?>deleteBillFile", url: "<?php echo base_url() ?>deleteAdditionalFile",
success: function(data) { success: function(data) {
if (data) { if (data) {
alert(data); alert(data);
@ -1459,50 +1523,178 @@ function deleteBill(Billno,i){
} }
</script> </script>
<!-- Latest DataTables JS --> <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script> <script>
<!-- Latest DataTables Buttons JS --> $(document).ready(function() {
<script src="https://cdn.datatables.net/buttons/2.3.4/js/dataTables.buttons.min.js"></script> // Initialize the DataTable
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.html5.min.js"></script> var table = $('#Inwardgateregistertable').DataTable({
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.print.min.js"></script> "paging": true,
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script> "lengthChange": true,
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script> "searching": true,
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script> "ordering": true,
<script src="https://cdn.datatables.net/plug-ins/1.13.6/sorting/datetime-moment.js"></script> "columnDefs": [{
"targets": 1,
"type": "date-eu"
}],
"aaSorting": [
[1, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
<script> });
$(function () {
$.fn.dataTable.moment('DD-MM-YYYY'); // Initialize the datepickers
$('#Inwardgateregistertable').DataTable({ $("#fromDate").datepicker({
"paging": true, dateFormat: 'dd-mm-yy',
"lengthChange": true, onSelect: function(selectedDate) {
"searching": true, var minDate = $(this).datepicker("getDate");
"ordering": true, $("#toDate").datepicker("option", "minDate", minDate);
"info": true, }
"autoWidth": true, });
"scrollCollapse": true,
"scrollX": true, $("#toDate").datepicker({
"pageLength": 25, dateFormat: 'dd-mm-yy',
"order": [[0, "desc"]], // Assuming the "Created Date" is the first column and you want to order by it in descending order onSelect: function(selectedDate) {
"dom": '<"top"lBf>rt<"bottom"ip><"clear">', // Custom layout var maxDate = $(this).datepicker("getDate");
"buttons": [ $("#fromDate").datepicker("option", "maxDate", maxDate);
{ }
extend: 'excelHtml5', });
text: 'Export to Excel',
title: 'Inward Gate Register', // Reset button functionality
exportOptions: { $("#resetButton").click(function() {
columns: ':visible:not(:first-child):not(:last-child)' // Exclude first and last columns $("#fromDate").datepicker("setDate", null);
} $("#toDate").datepicker("setDate", null);
}, $("#toDate").datepicker("option", "minDate", null);
{ $("#fromDate").datepicker("option", "maxDate", null);
extend: 'pdfHtml5', table.draw();
text: 'Export to PDF', });
title: 'Inward Gate Register',
exportOptions: { // Date range filter
columns: ':visible:not(:first-child):not(:last-child)' // Exclude first and last columns $.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}`;
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