Merge branch 'CI4-Application' of bitbucket.org:venbainformationtechnology/ria into CI4-Application

This commit is contained in:
bitbucket 2024-08-08 12:32:04 +05:30
commit 9c1a498640
36 changed files with 32240 additions and 36167 deletions

View File

@ -61,19 +61,12 @@ $routes->post('materialExist','Rawmaterialdetails::checkmaterial');
$routes->get('viewRawmaterial','Rawmaterialdetails::viewRawmaterial');
$routes->post('rawmaterialdetails/editRawmaterial', 'Rawmaterialdetails::editRawmaterial');
$routes->get('exportmaterial' , 'Rawmaterialdetails::exportmaterial');
$routes->get('rawmaterialdetailsautocomplete' , 'Rawmaterialdetails::autocomplete');
// Cost Center Routes
$routes->get('costListing', 'CostCenter::index');
$routes->get('addCostCenter', 'CostCenter::addCostCenter');
$routes->get('editCostCenter', 'CostCenter::editCostCenter');
$routes->get('fetchCostCenterDetails', 'CostCenter::fetchCostCenterDetails');// for Ajax both add and edit....
$routes->get('deleteCostCenter', 'CostCenter::deleteCostCenter');
$routes->post('saveCostCenter', 'CostCenter::saveCostCenter');
$routes->post('updateCostCenter', 'CostCenter::updateCostCenter');
$routes->post('CostCenter/AddCostDepartment','CostCenter::AddCostDepartment');
$routes->post('CostCenter/DeleteCostDepartment','CostCenter::DeleteCostDepartment');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'CostCenter/GetBudgetForYear','CostCenter::GetBudgetForYear');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'deletecost', 'CostCenter::deletecost');
$routes->get('exportcost', 'CostCenter::exportcost');
// Asset Detail Routes

View File

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

View File

@ -335,24 +335,19 @@ class Inwardgateregister extends BaseController
#Step 2 Master File and Its Details Gathering
$MasterFile = $this->request->getFile('MasterFile');
$requestMasterFileName = NULL;
if (!empty($MasterFile)) {
$requestMasterFileName = $MasterFile->getName();
if (!empty($requestMasterFileName)) {
if ($MasterFile && $MasterFile->isValid() && !$MasterFile->hasMoved()) {
if (!empty($this->inwardgateregister_model->isFileExistsInIGRmaster($requestMasterFileName))) {
log_message('error', 'File already exists in the database'.$requestMasterFileName);
$requestMasterFileName = NULL;
}
else{
$MasterFile->move($path, $requestMasterFileName);
$fileupdated_count++;
$fileupdated_name[] = $requestMasterFileName;
}
}else{
$requestMasterFileName = NULL;
}
}else{
$requestMasterFileName = NULL;
}
#Step 3 Master Details Gathering to Save In DB
@ -595,10 +590,11 @@ function viewIGRDetails()
$IGRNo = $this->request->getPost('igr');
$DeliveryChellan = $this->request->getPost('invdate');
$DeliveryChellanDate = get_date_time_format($DeliveryChellan);
$DeliveryChellanDate = !$DeliveryChellan || $DeliveryChellan === null ? NULL : get_date_time_format($DeliveryChellan);
$Mat_Rcvd_Dt = $this->request->getPost('mrc');
$MaterialRcvdDt = get_date_time_format($Mat_Rcvd_Dt);
$MaterialRcvdDt = !$Mat_Rcvd_Dt || $Mat_Rcvd_Dt === null ? NULL : get_date_time_format($Mat_Rcvd_Dt);
$VehicleNo = $this->request->getPost('vehicle_no');
$DriverName = $this->request->getPost('driver');
@ -618,9 +614,9 @@ function viewIGRDetails()
$igrarr = array('DeliveryChellanDate' => $DeliveryChellanDate, 'MaterialRcvdDate' => $MaterialRcvdDt,'VehicleNo'=>$VehicleNo,'DriverMobileNumber'=>$DriverMobileNumber,'DriverName'=>$DriverName, 'IGRStatus' => $IGRStatus,'UpdateBY' => $updateby);
$MasterFile = $this->request->getfile('MasterFile');
$requestMasterFileName = $MasterFile->getName();
if (!empty($requestMasterFileName)) {
if ($MasterFile) {
$requestMasterFileName = $MasterFile->getName();
if ($MasterFile && $MasterFile->isValid() && !$MasterFile->hasMoved()) {
if (!empty($this->inwardgateregister_model->isFileExistsInIGRmaster($requestMasterFileName))) {
log_message('error', 'File already exists in the database'.$requestMasterFileName);
@ -700,8 +696,8 @@ function viewIGRDetails()
$tareWeightDate = $row['TareWeightDate'];
$netWeight = $row['NetWeight'];
$igrItemNo = $row['IGRItemNo'];
$GrossWtDt = get_date_time_format($grossWeightDate);
$TareWtDt = get_date_time_format($tareWeightDate);
$GrossWtDt = !empty($grossWeightDate) && strtolower($grossWeightDate) !== 'null' ? get_date_time_format($grossWeightDate) : NULL;
$TareWtDt = !empty($tareWeightDate) && strtolower($tareWeightDate) !== 'null' ? get_date_time_format($tareWeightDate) : NULL;
$igrline = array(
'QuantityAsPerInvoice' => $quantityAsPerInvoice,
@ -901,9 +897,11 @@ function viewIGRDetails()
$requestdata = $this->request->getPost('data');
$updateby = $this->session->get('userId');
$GrossWeightDate = (string)$this->request->getPost('GrossWeightDate');
$GrossWtDt = get_date_time_format($GrossWeightDate);
$GrossWtDt = !empty($GrossWeightDate) ? get_date_time_format($GrossWeightDate) : NULL;
$TareWeightDate = (string)$this->request->getPost('TareWeightDate');
$TareWtDt = get_date_time_format($TareWeightDate);
$TareWtDt = !empty($TareWeightDate) ? get_date_time_format($TareWeightDate) : NULL;
// Check if request data is not null and is a string
@ -1168,7 +1166,10 @@ function updateIGRWeight(){
$IGRItemNo = $this->request->getPost('IGRlineitem');
$updateby = $this->session->get('userId');
$WeightFile = $this->request->getfile('WeightFile');
$requestWeightFileName = $WeightFile->getName();
$GrossWtDt = !empty($GrossWeightDate) ? get_date_time_format($GrossWeightDate) : null;
$TareWtDt = !empty($TareWeightDate) ? get_date_time_format($TareWeightDate) : null;
$path = ROOTPATH.'public/uploads/Igrfiles/';
if(!is_dir($path)) { mkdir($path, 0777, true); }
@ -1230,7 +1231,7 @@ function updateIGRWeight(){
log_message('error', "History updated successfully. History id: " . $history_id);
}
}
if($GrossWeightDate){
if($GrossWtDt){
$grossdate = $this->inwardgateregister_model->get_igr_history('GrossWeightDate',$IGRNO, $IGRItemNo);
if(!empty($grossdate)){
$old_data = NULL;
@ -1239,17 +1240,17 @@ function updateIGRWeight(){
$old_data = $row->new_data;
}
}
$igr_history = array('field' => 'GrossWeightDate','new_data' => $GrossWeightDate,'old_data' => $old_data,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo);
$igr_history = array('field' => 'GrossWeightDate','new_data' => $GrossWtDt,'old_data' => $old_data,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo);
($old_data != NULL) ? $igr_history['is_edit'] = 1 : $igr_history['is_add'] = 1 ;
$history_id = $this->inwardgateregister_model->igr_history($igr_history);
log_message('error', "History updated successfully. History id: " . $history_id);
} else{
$igr_history = array('field' => 'GrossWeightDate','is_edit' => 1,'new_data' => $GrossWeightDate,'old_data' => NULL,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo);
$igr_history = array('field' => 'GrossWeightDate','is_edit' => 1,'new_data' => $GrossWtDt,'old_data' => NULL,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo);
$history_id = $this->inwardgateregister_model->igr_history($igr_history);
log_message('error', "History updated successfully. History id: " . $history_id);
}
}
if($TareWeightDate){
if($TareWtDt){
$taredate = $this->inwardgateregister_model->get_igr_history('TareWeightDate',$IGRNO, $IGRItemNo);
if(!empty($taredate)){
@ -1259,12 +1260,12 @@ function updateIGRWeight(){
$old_data = $row->new_data;
}
}
$igr_history = array('field' => 'TareWeightDate','new_data' => $TareWeightDate,'old_data' => $old_data,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo);
$igr_history = array('field' => 'TareWeightDate','new_data' => $TareWtDt,'old_data' => $old_data,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo);
($old_data != NULL) ? $igr_history['is_edit'] = 1 : $igr_history['is_add'] = 1 ;
$history_id = $this->inwardgateregister_model->igr_history($igr_history);
log_message('error', "History updated successfully. History id: " . $history_id);
} else{
$igr_history = array('field' => 'TareWeightDate','is_edit' => 1,'new_data' => $TareWeightDate,'old_data' => NULL,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo);
$igr_history = array('field' => 'TareWeightDate','is_edit' => 1,'new_data' => $TareWtDt,'old_data' => NULL,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo);
$history_id = $this->inwardgateregister_model->igr_history($igr_history);
log_message('error', "History updated successfully. History id: " . $history_id);
}
@ -1272,8 +1273,9 @@ function updateIGRWeight(){
$IGRItemNo = $this->request->getPost('IGRlineitem');
$igr_lineitem = array('GrossWeight' => $GrossWeight,'GrossWeightDate' => $GrossWeightDate,'TareWeightDate' => $TareWeightDate,'TareWeight' => $TareWeight,'NetWeight' => $NetWeight,'UpdateBY' => $updateby);
$igr_lineitem = array('GrossWeight' => $GrossWeight,'GrossWeightDate' => $GrossWtDt,'TareWeightDate' => $TareWtDt,'TareWeight' => $TareWeight,'NetWeight' => $NetWeight,'UpdateBY' => $updateby);
$requestWeightFileName =null ;
if($WeightFile){
if (!empty($requestWeightFileName)) {
if ($WeightFile && $WeightFile->isValid() && !$WeightFile->hasMoved()) {
if (!empty($this->inwardgateregister_model->isFileExistsInIGRdetails($requestWeightFileName))) {
@ -1285,6 +1287,8 @@ function updateIGRWeight(){
}
}
}
}
$update = $this->inwardgateregister_model->updateIGRLineItem($igr_lineitem, $IGRItemNo);
if ($update) {

View File

@ -1102,10 +1102,10 @@ $mpdf->use_kwt = true;
$file = $this->request->getFile('POFile');
$requestfilename = $file->getName();
if (!empty($requestfilename)) {
$requestfilename = NULL;
if (!empty($file)) {
if ($file->isValid() && !$file->hasMoved()) {
$requestfilename = $file->getName();
$path = ROOTPATH.'public/uploads/POfiles/';
if(!is_dir($path)) { mkdir($path, 0777, true); }
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
@ -1284,9 +1284,11 @@ $mpdf->use_kwt = true;
$POList['ReleasedBy'] = $this->session->get('userId');
}
$file = $this->request->getFile('POFile');
$requestfilename = $file->getName();
if (!empty($requestfilename)) {
$requestfilename = NULL;
if (!empty($file)) {
if ($file && $file->isValid() && !$file->hasMoved()) {
$requestfilename = $file->getName();
$path = ROOTPATH.'public/uploads/POfiles/';
if(!is_dir($path)) { mkdir($path, 0777, true); }
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
@ -1905,10 +1907,11 @@ $mpdf->use_kwt = true;
$lastPONO = $this->purchaseorder_model->lastPONO();
$newPONO = generate_po_number($lastPONO);
$file = $this->request->getFile('POFile');
$requestfilename = $file->getName();
if (!empty($requestfilename)) {
$requestfilename = NULL;
if (!empty($file)) {
if ($file->isValid() && !$file->hasMoved()) {
$requestfilename = $file->getName();
$path = ROOTPATH.'public/uploads/POfiles/';
if(!is_dir($path)) { mkdir($path, 0777, true); }
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
@ -2131,9 +2134,11 @@ $mpdf->use_kwt = true;
$POList['ReleasedBy'] = $this->session->get('userId');
}
$file = $this->request->getFile('POFile');
$requestfilename = $file->getName();
if (!empty($requestfilename)) {
$requestfilename = NULL;
if (!empty($file)) {
if ($file && $file->isValid() && !$file->hasMoved()) {
$requestfilename = $file->getName();
$path = ROOTPATH.'public/uploads/POfiles/';
if(!is_dir($path)) { mkdir($path, 0777, true); }
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
@ -2564,10 +2569,11 @@ try{
$lastPONO = $this->purchaseorder_model->lastPONO();
$newPONO = generate_po_number($lastPONO);
$file = $this->request->getFile('POFile');
$requestfilename = $file->getName();
if (!empty($requestfilename)) {
$requestfilename = NULL;
if (!empty($file)) {
if ($file->isValid() && !$file->hasMoved()) {
$requestfilename = $file->getName();
$path = ROOTPATH.'public/uploads/POfiles/';
if(!is_dir($path)) { mkdir($path, 0777, true); }
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
@ -2851,9 +2857,10 @@ try{
$POList['ReleasedBy'] = $this->session->get('userId');
}
$file = $this->request->getFile('POFile');
$requestfilename = $file->getName();
if (!empty($requestfilename)) {
$requestfilename = NULL;
if (!empty($file)) {
if ($file && $file->isValid() && !$file->hasMoved()) {
$requestfilename = $file->getName();
$path = ROOTPATH.'public/uploads/POfiles/';
if(!is_dir($path)) { mkdir($path, 0777, true); }
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {

View File

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

View File

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

View File

@ -16,7 +16,7 @@ class Costcenter_model extends Model
function CostListing()
{
$builder = $this->db->table('t_costcenter_master as Cost')
->select('Cost.CostCenterCode as code,Cost.CostCenterName as CostCenterName , Cost.ApprovedBy as ApprovedBy,Emp.FirstName as FirstName,Emp.Designation as Designation ,Cost.CreatedDate,Cost.IsActive,Cost.DeletedBy,Cost.DeletedBy')
->select('Cost.id as id, Cost.CostCenterCode as code,Cost.CostCenterName as CostCenterName , Cost.ApprovedBy as ApprovedBy,Emp.FirstName as FirstName,Emp.Designation as Designation ,Cost.CreatedDate,Cost.IsActive,Cost.DeletedBy,Cost.DeletedBy')
->join('t_employee_details as Emp', 'Emp.EmpID=Cost.ApprovedBy');
@ -31,18 +31,26 @@ class Costcenter_model extends Model
* @param number $userId : This is user id
* @return array $result : This is user information
*/
function saveCostCenter($Cost)
{
public function saveCostCenter($Cost) {
$this->db->transStart();
$builder = $this->db->table('t_costcenter_master');
$builder->insert($Cost);
$insert_id = $this->db->affectedRows();
$aff_row = $this->db->affectedRows();
$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()
@ -54,44 +62,6 @@ function saveCostCenter($Cost)
return $query->getResult();
}
function addCostCenterDepartment($Dept)
{
$this->db->transStart();
$builder = $this->db->table('t_costcenter_departments');
$builder->insert($Dept);
$insert_id = $this->db->affectedRows();
$this->db->transComplete();
return $insert_id;
}
function addBudget($Budget)
{
$this->db->transStart();
$builder = $this->db->table('t_costcenter_budget');
$builder->insert($Budget);
$insert_id = $this->db->affectedRows();
$this->db->transComplete();
return $insert_id;
}
function getApproverName()
{
$builder = $this->db->table('t_employee_details')
->select('EmpID,FirstName,LastName,Designation')
->where('Departmentcode ', 'DEP10');
$query =$builder->get();
return $query->getResult();
}
/**
* This function used to get user information by id
* @param number $userId : This is user id
@ -337,19 +307,7 @@ where Dept.DEPCode not in
}
}
/* *//**
* This function is used to get the Department details from t_departmentdetails
* @return array $result : This is result of the query
*/
function getDepartment()
{
$builder = $this->db->table('t_departmentdetails')
->select('DEPCode, DepartmentName')
->where('IsActive =', 1);
$query =$builder->get();
return $query->getResult();
}
/**
* This function is used to get the Config value from configuration table
* @return array $result : This is result of the query

View File

@ -145,7 +145,6 @@ if (!empty($getlogpodtl)) {
var minDate = $(this).datepicker("getDate");
var maxDate = new Date(minDate.getFullYear() + 1, minDate.getMonth(), minDate.getDate());
});
</script>
<script type="text/javascript">
tinymce.init({
@ -381,7 +380,10 @@ if (!empty($getlogpodtl)) {
$.ajax({
url: "<?php echo base_url() ?>VerifyWithSupplierForPendingPO",
type: 'POST',
data: {supplierid : d, materialcode: id },
data: {
supplierid: d,
materialcode: id
},
success: function(response) {
if (response) alert(response);
}
@ -422,7 +424,10 @@ if (!empty($getlogpodtl)) {
$.ajax({
url: "<?php echo base_url() ?>VerifyWithSupplierForPendingPO",
type: 'POST',
data: {supplierid : d, materialcode: id },
data: {
supplierid: d,
materialcode: id
},
success: function(response) {
if (response) alert(response);
}
@ -718,6 +723,7 @@ if (!empty($getlogpodtl)) {
.num {
text-align: right;
}
.header-container {
display: flex;
justify-content: space-between;
@ -730,16 +736,24 @@ if (!empty($getlogpodtl)) {
text-align: center;
margin: 0;
}
.centered {
display: flex;
/* justify-content: center; */
align-items: center;
height: 10vh;
}
.centered label, .centered input {
.centered label,
.centered input {
margin: 0 5px;
}
.mandatory { color:red;text-align:right;background-color: white;}
.mandatory {
color: red;
text-align: right;
background-color: white;
}
</style>
<div class="content-wrapper">
<?php
@ -749,7 +763,7 @@ if (!empty($getlogpodtl)) {
<section class="content">
<div id="content"></div>
<div style="border:2px solid #333">
<div class="box">
<div id="content"></div>
<div class="header-container">
<?php if ($parentPO == '') { ?>
@ -787,7 +801,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-3">
<label>Supplier<span class="badge mandatory">*</span></label>
<label>Select Supplier<span class="badge mandatory">*</span></label>
<?php
$options = array("0" => 'Select Supplier');
//print_r( $options);
@ -806,7 +820,7 @@ if (!empty($getlogpodtl)) {
</div>
<div class="col-md-3">
<label>Address</label>
<label>Supplier Address</label>
<div class="form-group">
<?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40');
@ -851,12 +865,11 @@ if (!empty($getlogpodtl)) {
<b><u>Select Delivery By<span class="badge mandatory">*</span></u></b><br />
<div class="centered">
<?php echo form_label('Date', 'Date') . "&nbsp;&nbsp;" . form_radio(array('name' => 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?>
<?php echo form_label('Schedule', 'Schedule') . "&nbsp;&nbsp;" . form_radio(array('name' => 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?>
</div>
</div>
<div class="col-md-3" id="Deliverydtdiv" ><br />
<div class="col-md-3" id="Deliverydtdiv">
<label>Delivery Date<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -865,7 +878,7 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
<div class="col-md-3" id="Schedulediv" style="display:none;"><br />
<div class="col-md-3" id="Schedulediv" style="display:none;">
<label>Schedule By<span class="badge mandatory">*</span></label>
<?php
$data = array('name' => 'Scheduleby', 'value' => set_value('Scheduleby'), 'id' => 'Scheduleby', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110');
@ -949,7 +962,7 @@ if (!empty($getlogpodtl)) {
<div class="col-md-3">
<label>Service Type Options</label>
<label>Service Type Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -982,7 +995,7 @@ if (!empty($getlogpodtl)) {
</div>
<div class="col-md-3">
<label>Payment Terms</label>
<label>Payment Terms<span class="badge mandatory">*</span></label>
<?php
if (!empty($Payment)) {
foreach ($Payment as $pay2) :
@ -1013,7 +1026,7 @@ if (!empty($getlogpodtl)) {
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Insurance Options</label>
<label>Insurance Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -1057,8 +1070,8 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<select id='BudgetType' name='BudgetType'>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<select id='BudgetType' name='BudgetType' required='true'>
<?php if ($BudgetType == 'CAPITAL') {
$opt1 = 'CAPITAL';
$opt2 = 'REVENUE';
@ -2105,7 +2118,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="row" style="border: 1px solid">
<div class="row">
<div class="col-md-12" style="padding: 0px;">
<div class="col-md-2">
@ -2289,7 +2302,8 @@ if (!empty($getlogpodtl)) {
// $logdate = date('d-m-Y', strtotime($oldpo->logDate));
// } else {
// $logdate = '-';
// } ?>
// }
?>
-->
<td><?php echo $oldpo->LineItemNos; ?></td>
<td><?php echo $oldpo->entity ?></td>
@ -2334,7 +2348,8 @@ if (!empty($getlogpodtl)) {
<div class="modal-content" style="width:950px;">
<div class="modal-header">
<h4 class="modal-title">Update Bill <!-- <?php //echo $getdata[0]->BillNo ?> --> <span id="bill"><span> Details</h4>
<h4 class="modal-title">Update Bill <!-- <?php //echo $getdata[0]->BillNo
?> --> <span id="bill"><span> Details</h4>
</div>
<form class="tagForm" id="tag-form" method="post" enctype="multipart/form-data">
<div class="modal-body" style="padding:0px;">

View File

@ -1,871 +0,0 @@
<?php
$FYStart ='';
$FYEnd ='';
$FYear = '';
$opt = array("0"=>'Select Budget Year');
if(!empty($FiscalYear))
{
foreach ($FiscalYear as $Fy)
{
$FYStart =$Fy->StartYear;
$FYEnd =$Fy->EndYear;
}
//$FYear = $FYStart." - ".$FYEnd ;
}
for($i=1;$i<5;$i++)
{
$FYear = $FYStart." - ".$FYEnd ;
$opt[$FYear] = $FYear;
$FYStart++;
$FYEnd++;
}
//print_r($opt);
?>
<script>
$(function() {
var d = new Date();
var month = d.getMonth();
var day = d.getDate();
var year = d.getFullYear() ;
var SIAStartYear = year - 2015;
var mindt = year-70;
var maxdt = year-15;
// $("#AddYear").datepicker({
//minDate : new Date(year-SIAStartYear,1,1),
//maxDate :new Date(year+3,1,1),
//dateFormat: 'yy', changeYear: true,
//});
// $("#EditYear").datepicker({
// minDate : new Date(year-SIAStartYear,1,1),
//maxDate :new Date(year+3,1,1),
// dateFormat: 'yy', changeYear: true,
//});
//$('#selectDistriList').multiSelect();
});
</script>
<style>
.ui-datepicker-month {
display: none;
}
.ui-datepicker-prev{
display: none;
}
.ui-datepicker-next{
display: none;
}
</style>
<div class="content-wrapper" style="min-height: 537px;">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center>Add Cost List</center>
</h1>
</section>
<section class="content">
<div style="text-align:right;">
<a href="<?php echo base_url() ?>costListing" class="btn btn-cancel" value="Back">Back</a>
</div>
<br>
<div class="row">
<!-- left column -->
<div class="col-md-12">
<div class="box box-success">
<!-- form start -->
<?php
$attributes = array('class' => 'form-label-left addCost ','name' => 'addCost','id' => 'addCost');
echo form_open(base_url().'saveCostCenter/',$attributes); ?>
<div class="box-body">
<div class="row">
<div class="col-md-12">
<div class="col-md-6">
<div class="form-group">
<label for="CostName">Cost Center Code </label><font color="Red">*</font>
<div class="form-group">
<?php
$data = array('name' => 'CostCode','value' => set_value('CostCode'),'id'=>'CostCode', 'class' => 'form-control' ,'required' => 'true','style'=>'text-transform:uppercase;','maxlength'=>'10' );
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="Description">Cost Center Name </label><font color="Red">*</font>
<div class="form-group">
<?php
$data = array('name' => 'CostName','value' => set_value('CostName'),'id'=>'CostName', 'class' => 'form-control' ,'required' => 'true','style'=>'text-transform:uppercase;','maxlength'=>'100');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-6">
<div class="col-md-4">
<label>Department</label>
<div>
<?php
$options = array("0"=>'Select Department');
//print_r( $options);
if(!empty($Department))
{
foreach ($Department as $SID):
$options[$SID->DEPCode] = $SID->DEPCode.' '.' - '.' '.$SID->DepartmentName;
endforeach;
}
echo form_multiselect('distriList', $options,set_value('distriList',$options),'id="distriList"' ,'class="form-control required"','required="true"');
?>
</div>
</div>
<div class="col-md-4">
<center>
<a style="color:white" href="javascript:void(0);" id="addPop"><button type="button" style="margin: 30px 0px 0px 15px;" class="btn btn-success">Add</button></a><br>
<a style="color:white" href="javascript:void(0);" id="removePop"><button type="button" style="margin: 10px 0px 0px 15px;" class="btn btn-success">Remove</button></a><br>
</center>
</div>
<div class="col-md-4">
<b>&nbsp;</b>
<?php
$option["0"] = 'Selected Department';
echo form_multiselect('selectDistriList[]', $option,set_value('selectDistriList[]',$option),'id="selectDistriList"','size="10"');
?>
</div>
</div>
<div class="col-md-6">
<!-- <label for="CostName">Approved By </label><font color="Red">*</font> -->
<!-- <div class="form-group"> -->
<?php
$options = array("-1"=>'Select Approver');
//print_r( $options);
if(!empty($Approver))
{
foreach ($Approver as $SID):
$options[$SID->EmpID] = $SID->EmpID . " - " . $SID->FirstName . " - " . $SID->Designation;
endforeach;
}
// echo form_dropdown('ApprovedBy',$options,set_value('ApprovedBy'),'id="ApprovedBy"', 'class = "form-control "'); ?>
<!-- </div> -->
</div>
</div>
</div>
</div>
<br>
<div col="row">
<div style="text-align:right">
<a onclick="OpenModal()" class="btn btn-success"><i class="fa fa-plus"></i>&nbsp;&nbsp;Add Budget</a>
<!-- Modal -->
<div class="modal fade" id="addbudgetmodel" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<button type="button" class="close"
data-dismiss="modal">
<span aria-hidden="true">&times;</span>
<span class="sr-only">Close</span>
</button>
<h4 class="modal-title" id="myModalLabel">
<center> Add Budget</center>
</h4>
</div>
<!-- Modal Body -->
<div class="modal-body">
<form class="form-horizontal" role="form">
<div class="form-group">
<div class="row">
<div class="col-md-3 col-md-offset-2">
Budget Type :
</div>
<div class="col-md-5">
<?php
$options = array("-1"=>'Select Budget Type');
//print_r( $options);
if(!empty($BudgetType))
{
foreach ($BudgetType as $SID):
$options[$SID->ConfigValue] = $SID->ConfigValue;
endforeach;
}
echo form_dropdown('Addbudget',$options,set_value('Addbudget'),'id="Addbudget"', 'class = "form-control "'); ?>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-3 col-md-offset-2">
Budget Year :
</div>
<div class="col-md-5">
<?php echo form_dropdown('AddYear', $opt,set_value('AddYear'),'id="AddYear"' ,'class="form-control required"','required="true"'); ?>
</div>
</div>
</div>
<!-- <div class="form-group"> -->
<!-- <div class="row"> -->
<!-- <div class="col-md-3 col-md-offset-2"> -->
<!-- Budget Amount : -->
<!-- </div> -->
<!-- <div class="col-md-5"> -->
<input class="form-control" onkeypress="return isNumberKey(event);" name="AddAmout" class="form-control" id="AddAmout" type="hidden" value=0>
<!-- </div> -->
<!-- </div> -->
<!-- </div> -->
<div class="form-group">
<div class="row">
<div class="col-md-3 col-md-offset-2">
Remarks :
</div>
<div class="col-md-5">
<input class="form-control" name="AddRemarks" class="form-control" id="AddRemarks" type="text">
</div>
</div>
</div>
</form>
</div>
<!-- Modal Footer -->
<div class="modal-footer">
<a class="btn btn-cancel" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
<a class="btn btn-success font tempClick" ID="tempClick" style="margin-top: -24px;"><i class="fa fa-plus"></i>&nbsp;&nbsp;<span class="bold">Add</span></a>
</div>
</div>
</div>
</div>
</div>
</div><br>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table id="BudgetTable" class="table table-striped responsive-utilities jambo_table" >
<thead style="background-color: #CFCFCF;">
<th>Budget Type</th>
<th>Budget Year</th>
<!-- <th>Budget Amount</th> -->
<th>Remarks</th>
<th>Action</th>
</thead>
<tbody id="tempAppend">
</tbody>
</table>
<!-- Modal For edit -->
<div class="modal fade" id="Edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<button type="button" class="close"
data-dismiss="modal">
<span aria-hidden="true">&times;</span>
<span class="sr-only">Close</span>
</button>
<h4 class="modal-title" id="myModalLabel">
<center> Edit Budget</center>
</h4>
</div>
<!-- Modal Body -->
<div class="modal-body">
<form class="form-horizontal" role="form">
<div class="form-group">
<div class="row">
<div class="col-md-3 col-md-offset-2">
Budget Type :
</div>
<div class="col-md-5">
<?php
$data = array('name' => 'Editbudget', 'value' => set_value('Editbudget'),'id'=>'Editbudget', 'class' => 'form-control','readonly'=>'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-3 col-md-offset-2">
Budget Year :
</div>
<div class="col-md-5">
<?php
$data = array('name' => 'EditYear', 'value' => set_value('EditYear'),'id'=>'EditYear', 'class' => 'form-control','onkeypress'=>'return isNumberKey(event);','onkeypress'=>'return false;');
echo form_input($data);
?>
</div>
</div>
</div>
<!-- <div class="form-group"> -->
<!-- <div class="row"> -->
<!-- <div class="col-md-3 col-md-offset-2">
Budget Amount :
</div> -->
<!-- <div class="col-md-5"> -->
<?php
$data = array('name' => 'EditAmout', 'value' => set_value('EditAmout'),'id'=>'EditAmout', 'class' => 'form-control','onkeypress'=>'return isNumberKey(event);');
echo form_hidden($data);
?>
<!-- </div> -->
<!-- </div> -->
<!-- </div> -->
<div class="form-group">
<div class="row">
<div class="col-md-3 col-md-offset-2">
Remarks :
</div>
<div class="col-md-5">
<?php
$data = array('name' => 'EditRemarks', 'value' => set_value('EditRemarks'),'id'=>'EditRemarks', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
</form>
</div>
<!-- Modal Footer -->
<div class="modal-footer">
<a class="btn btn-cancel" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
<a class="btn btn-success font tempClickEdit" ID="tempClickEdit" style="margin-top: -24px;"><i class="fa fa-plus"></i>&nbsp;&nbsp;<span class="bold">Edit</span></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="content"></div>
<div class="box-footer" style="text-align:right">
<input type="hidden" name="txtSelectedDepartment" id="txtSelectedDepartment" />
<input type="hidden" name="txtRowCount" id="txtRowCount" />
<!-- <input type="reset" class="btn btn-success" value="Cancel" />-->
<a href="<?php echo base_url() ?>costListing" class="btn btn-cancel" id="cancel" value="Cancel">Cancel</a>
<input type="submit" class="btn btn-success" value="Submit" />
</div>
</div>
</form>
</div>
</div>
<div class="col-md-4">
<?php
helper('form');
$error = session()->getFlashdata('error');
if($error)
{
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if($success)
{
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<div class="row">
<div class="col-md-12">
<?php //echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
</div>
</div>
</div>
</div>
</section>
</div>
<script type="text/html" id="tempList">
<tr id="<%=index%>">
<?php
$data = array('name' => '"Budget[<%=index%>][index]"', 'value' => set_value('<%=index%>'),'id'=>'"Budget[<%=index%>][index]"', 'class' => 'form-control','type'=>'hidden');
echo form_input($data);
?>
<td align="left"><%=BudgetType%></td>
<td align="left"><%=BudgetYear%></td>
<td align="left" style="display: none;"><%=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>
</script>
<script>
function OpenModal()
{
if($('#CostCode').val()=='')
{
alert('Please Enter the Costcenter Code');
$('#CostCode').focus();
return false;
}
else if($('#CostName').val()=='')
{
alert('Please Enter the Costcenter Name');
$('#CostName').focus();
return false;
}
else if($('#txtSelectedDepartment').val()=='')
{
alert('Please Select the Department');
$('#selectDistriList').focus();
return false;
}
// else if($('#ApprovedBy').val() == "-1")
// {
// alert('Please Select the Approver');
// $('#ApprovedBy').focus();
// return false;
// }
else
{
$('#addbudgetmodel').modal('show');
}
}
var index = '1';
var numbers = /^[0-9]+$/;
var userid = '';
$("#Edit").on("shown.bs.modal", function(e) {
userid = $(e.relatedTarget).data('userid');
$('#Editbudget').val($('#BudgetTable tr:eq('+ userid +') td:eq(0)').text());
$('#EditYear').val($('#BudgetTable tr:eq('+ userid +') td:eq(1)').text());
$('#EditAmout').val($('#BudgetTable tr:eq('+ userid +') td:eq(2)').text()).hide();
$('#EditRemarks').val($('#BudgetTable tr:eq('+ userid +') td:eq(3)').text());
});
var typeArray = [];
var typeflag = 0;
var iflag = 0;
$('.tempClick').click(function(){
if ($("#Addbudget option:selected").val() =='-1' )
{
alert('Please Select the Budget Type ');
//return;
}
//if ($("#AddYear option:selected").val() =='0' )
if($('#AddYear').val() == '0' )
{
alert('Please Enter the Budget Year');
//return;
}
// if(document.getElementById('AddAmout').value == '' )
// {
// alert('Please Enter the Budget Amount');
// // return;
// }
if ($("#Addbudget option:selected").val() !='-1' && $('#AddYear').val() != '0' && $('#AddAmout').val() != '' )
{
$('#BudgetTable').show();
var temp = index;
var BudType = $("#Addbudget option:selected").val();
var BudYear = $("#AddYear").val();
var BudAmount = $("#AddAmout").val() ? $("#AddAmout").val() : 0;
//$('#Addbudget option[value='+BudType+']').remove();
var BudRemarks = $('#AddRemarks').val();
$('#AddYear').val('');
$('#AddAmout').val('');
$('#AddRemarks').val('');
var str = (BudType.concat(BudYear));
//alert('outsideeachfunction'+str);
$.each(typeArray,function(i,item){
//alert('each'+item+'input'+BudType);
//alert('str'+str);
if(str == item)
{
iflag=iflag+1;
//alert('iflag'+iflag);
}
});
//alert('i value'+iflag);
//alert('array'+typeArray);
if(iflag == 0)
{
typeArray.push(str);
typeflag = 1;
index = parseInt(index)+1;
var template = jQuery("#tempList").html();
$('#tempAppend').append(_.template(template,{index:temp,BudgetType:BudType,BudgetYear:BudYear,BudgetAmount:BudAmount,Remarks:BudRemarks}));
}
else
{
alert(" Budget Type and Budget Year values Already Exsits in our database!");
iflag = 0;
}
var theForm = $(".addCost");
addHidden(theForm,"BudgetType"+temp,BudType);
addHidden(theForm,"BudgetYear"+temp,BudYear);
addHidden(theForm,"BudgetAmount"+temp,BudAmount);
addHidden(theForm,"Remarks"+temp,BudRemarks);
$('#txtRowCount').val(temp);
CountRows();
}
});
function addHidden(theForm, key, value) {
// Create a hidden input element, and append it to the form:
var input = document.createElement('input');
input.type = 'hidden';
input.name = key;
input.id = key;
input.value = value;
theForm.append(input);
}
$('.tempClickEdit').click(function(){
if(document.getElementById('EditYear').value == '' )
{
alert('Please Enter the Budget Year');
//return;
}
// if(document.getElementById('EditAmout').value == '' )
// {
// alert('Please Enter the Budget Amount');
// // return;
// }
if ( $('#EditAmout').val() != '' && $('#EditYear').val() != '' )
{
var temp = userid;
var BudYear = $("#EditYear").val();
var BudAmount = $("#EditAmout").val();
var BudRemarks = $('#EditRemarks').val();
$('#BudgetTable tr:eq('+ temp +') td:eq(1)').text(BudYear);
$('#BudgetTable tr:eq('+ temp +') td:eq(2)').text(BudAmount).hide();
$('#BudgetTable tr:eq('+ temp +') td:eq(3)').text(BudRemarks);
$('#BudgetYear'+temp).val(BudYear);
$('#BudgetAmount'+temp).val(BudAmount).hide();
$('#Remarks'+temp).val(BudRemarks);
}
else
{
alert('Please enter all the values');
}
});
function ConfirmDelete()
{
var x = confirm("Are you sure you want to delete?");
if (x)
return true;
else
return false;
}
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode != 46 && charCode > 31
&& (charCode < 48 || charCode > 57))
return false;
return true;
}
function Rowcount()
{
var rowCount = $('#BudgetTable').length;
if(rowCount=='4')
{
$("#addbudgetmodel").modal('hide');
}
else
{
$("#addbudgetmodel").modal('show');
}
}
var totalRowCount = 0;
var rowCount = 0;
var table = document.getElementById("BudgetTable");
var rows = table.getElementsByTagName("tr");
function CountRows() {
totalRowCount = 0;
rowCount = 0;
table = document.getElementById("BudgetTable");
rows = table.getElementsByTagName("tr")
for (var i = 0; i < rows.length; i++) {
totalRowCount++;
if (rows[i].getElementsByTagName("td").length > 0) {
rowCount++;
}
}
var message = "Total Row Count: " + totalRowCount;
message += "\nRow Count: " + rowCount;
//alert(message);
if(totalRowCount>"16")
{
$("#addbudgetmodel").modal('hide');
}
else
{
return false;
}
}
</script>
<script>
$('#addPop').click(function () {
if ($('#distriList option:selected').val() != null) {
if($('#distriList option:selected').val()==0 ){
alert('please select Department');
}
else
{
var tempSelect = $('#distriList option:selected').val();
var tempText = $('#distriList option:selected').text();
var o = new Option(tempText,tempSelect);
var hidval = tempSelect;
var orgVal = $('#txtSelectedDepartment').val();
var Selectedval = ''
if(orgVal != '')
{
Selectedval = orgVal + ':' + hidval;
}
else
{
Selectedval = hidval
}
$('#txtSelectedDepartment').val(Selectedval);
$(o).html(tempText);
$("#selectDistriList").append(o);
$('#distriList option:selected').remove();
$("#distriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected");
$("#selectDistriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected");
tempSelect = '';
tempText = '';
Selectedval = '';
}
} else {
alert("Before add please select any position.");
}
});
$('#removePop').click(function () {
if ($('#selectDistriList option:selected').val() != null) {
if($('#selectDistriList option:selected').val() == 0){
//alert('cannot removed');
}
else
{
Selectedval ='';
$('#txtSelectedDepartment').val(Selectedval);
var tempSelect = $('#selectDistriList option:selected').val();
$('#selectDistriList option:selected').remove().appendTo('#distriList');
$("#selectDistriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected");
$("#distriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected");
$("#distriList").val(tempSelect);
tempSelect = '';
}
}
else {
alert("Before remove please select any position.");
}
});
var baseurl = "<?php print base_url(); ?>";
$(".addCost").submit(function(e) {
e.preventDefault();
if(validate())
{
$('#content').loader('show');
$.ajax({
data:$('.addCost').serialize(),
type:"POST",
url:"<?php echo base_url() ?>saveCostCenter",
success:function(data) {
if(data)
{
console.log(data);
$('#content').loader('hide');
alert(data);
$('#txtSelectedDepartment').val('');
$('#txtRowCount').val('');
// window.location = baseurl + 'costListing';
}
else
{
alert("Error");
}
}
});
}
});
function validate()
{
if($("#txtSelectedDepartment").val().length < 1)
{
alert('Please Select Department');
return false;
}
else if($("#txtRowCount").val().length < 1)
{
alert('Please Add Budget');
return false;
}
// else if($("option:selected", $("#ApprovedBy")).val() == '-1')
// {
// alert('Please Select Approver Names');
// return false;
// }
else
{
return true;
}
}
</script>

View File

@ -23,15 +23,15 @@
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center> Add New Material </center>
<center> Add Material Details</center>
</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">
<div style="text-align:right;">
<a href="<?php echo base_url() ?>rawmaterialListing" class="btn btn-cancel" value="Back" />Back</a>
</div>
<br />
<div class="row">
<!-- left column -->
<div class="col-md-12">
@ -196,7 +196,7 @@
$('#MatCate').autocomplete("option", "minLength", 0);
},
serviceUrl: "<?php echo base_url(); ?>rawmaterialdetails/autocomplete",
serviceUrl: "<?php echo base_url(); ?>rawmaterialdetailsautocomplete",
onSelect: function(suggestion) {
var data = suggestion.ConfigValue;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1851,8 +1851,7 @@ if (!empty($INRSYMBOL)) {
if (input == -1) {
alert("Select Request Type");
}
else if ($('#drpSupplier').val() == "0") {
} else if ($('#drpSupplier').val() == "0") {
alert('Please Select the Supplier details');
$('#drpSupplier').focus();
return false;
@ -1875,8 +1874,7 @@ if (!empty($INRSYMBOL)) {
$('#Scheduleby').focus();
return false;
}
else {
} else {
$("#" + input).modal('show');
$('#isEdit').val(0);
if (StateTaxCheck == "0") {
@ -2022,6 +2020,36 @@ if (!empty($INRSYMBOL)) {
.num {
text-align: right;
}
.header-container {
display: flex;
justify-content: space-between;
align-items: center;
padding: 25px;
}
.header-container h2 {
flex: 1;
text-align: center;
margin: 0;
}
.centered {
display: flex;
/* justify-content: center; */
align-items: center;
height: 10vh;
}
.centered label,
.centered input {
margin: 0 5px;
}
.mandatory {
color: red;
text-align: right;
background-color: white;
}
</style>
<div class="content-wrapper">
@ -2031,20 +2059,16 @@ if (!empty($INRSYMBOL)) {
echo form_open(base_url() . '/purchaseorder/addalterPO/', $attributes); ?>
<section class="content">
<div style="border:2px solid #333">
<div class="box">
<div id="content"></div>
<div>
<center><b>
<div class="header-container">
<h2>Emergency Purchase Order</h2>
</b></center>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<label>Request Type <span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label>
<label>Request Type <span class="badge mandatory">*</span></label>
<?php
$options = array("-1" => 'Select Request Type');
@ -2062,20 +2086,7 @@ if (!empty($INRSYMBOL)) {
?>
</div>
<div class="col-md-2">
<label>Purchase Order Date</label>
<div class="form-group">
<?php
$data = array('name' => 'PODate', 'value' => set_value('PODate', $CurrentDate), 'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 'onkeypress'=>'return false;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<div class="col-md-3">
<label>Purchase Order Type</label>
<div class="form-group">
@ -2085,34 +2096,8 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
<div class="col-md-2" style='display:none;' id='workstatus'>
<label>Work Status<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label>
<?php
if (!empty($WorkStatus)) {
//$options4 = array("0"=>'Selected Work Status');
foreach ($WorkStatus as $WSID) :
$options4[$WSID->StatusCode] = $WSID->StatusName;
endforeach;
}
echo form_dropdown('workstatus', $options4, set_value('workstatus'), 'id="workstatusValue"', 'required="true"', 'class="form-control select2');
?>
</div>
<!-- <div class="col-md-3" id="selectdeliveryby" style="display:none;"> -->
<div class="col-md-3">
<b><u>Select Delivery By<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></u></b><br />
<tr>
<td>
<?php echo form_label('Date', 'Date') . "&nbsp;&nbsp;" . form_radio(array("name" => "DateRange", "id" => "Date", "value" => "0", 'checked' => set_radio('DateRange', '0', true))); ?>&nbsp;&nbsp;&nbsp;&nbsp;
</td>
<td>
<?php echo form_label('Schedule', 'Schedule') . "&nbsp;&nbsp;" . form_radio(array("name" => "DateRange", "id" => "Schedule", "value" => "1", 'checked' => set_radio('DateRange', '1', false))); ?>
</td>
</tr>
</div>
</div>
<div class="row">
<div class="col-md-3">
<label>Supplier<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label>
<label>Select Supplier<span class="badge mandatory" >*</span></label>
<div>
<?php
$options = array("0" => 'Select Supplier');
@ -2130,7 +2115,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label>Address</label>
<label>Supplier Address</label>
<div class="form-group">
<?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40');
@ -2138,6 +2123,53 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-3" style='display:none;' id='txtPoRange'>
<b><u>Select Tax Range<span class="badge mandatory">*</span></u></b><br />
<div class="centered">
<?php echo form_label('Local', 'Local') . "&nbsp;&nbsp;" . form_radio(array("name" => "Range", "id" => "Local", "value" => "0", 'checked' => set_radio('Range', '0', TRUE))); ?>
<?php echo form_label('Inter state', 'Inter state') . "&nbsp;&nbsp;" . form_radio(array("name" => "Range", "id" => "Inter_state", "value" => "1", 'checked' => set_radio('Range', '1', FALSE))); ?>
</div>
</div>
<div class="col-md-3" style='display:none;' id='workstatus'>
<label>Work Status<span class="badge mandatory">*</span></label>
<?php
if (!empty($WorkStatus)) {
//$options4 = array("0"=>'Selected Work Status');
foreach ($WorkStatus as $WSID) :
$options4[$WSID->StatusCode] = $WSID->StatusName;
endforeach;
}
echo form_dropdown('workstatus', $options4, set_value('workstatus'), 'id="workstatusValue"', 'required="true"', 'class="form-control select2');
?>
</div>
<div class="col-md-3" id="Deliveryby">
<b><u>Select Delivery By<span class="badge mandatory">*</span></u></b><br />
<div class="centered">
<?php echo form_label('Date', 'Date') . "&nbsp;&nbsp;" . form_radio(array("name" => "DateRange", "id" => "Date", "value" => "0", 'checked' => set_radio('DateRange', '0', true))); ?>
<?php echo form_label('Schedule', 'Schedule') . "&nbsp;&nbsp;" . form_radio(array("name" => "DateRange", "id" => "Schedule", "value" => "1", 'checked' => set_radio('DateRange', '1', false))); ?>
</div>
</div>
<div class="col-md-3" id="Schedulediv">
<label>Schedule By<span class="badge mandatory">*</span></label>
<?php
$data = array('name' => 'Scheduleby', 'value' => set_value('Scheduleby'), 'id' => 'Scheduleby', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110');
echo form_textarea($data);
?>
</div>
<div class="col-md-3" id="Deliverydtdiv" style="display:none;">
<label>Delivery Date<span class="badge mandatory">*</span></label>
<?php
$data = array('name' => 'Deliverydt', 'value' => set_value('Deliverydt', $CurrentDate), 'id' => 'Deliverydt', 'class' => 'form-control', 'required' => 'true', 'onkeypress' => 'return false;');
echo form_input($data);
?>
</div>
<div class="col-md-3">
<label>Delivery Address</label>
<div class="form-group">
@ -2148,31 +2180,39 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3" id="Deliveryby" style="padding: 0px;">
<div class="col-md-12" id="Schedulediv">
<label>Schedule By<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label>
<?php
$data = array('name' => 'Scheduleby', 'value' => set_value('Scheduleby'), 'id' => 'Scheduleby', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110');
echo form_textarea($data);
?>
</div>
<div class="col-md-12" id="Deliverydtdiv" style="display:none;">
<label>Delivery Date<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label>
</div>
<div class="row">
<div class="col-md-12">
<div id="currencyexchange" style='display:none;'>
<div class="col-md-3">
<label>Currency Type<span class="badge mandatory">*</span></label>
<?php
$data = array('name' => 'Deliverydt', 'value' => set_value('Deliverydt', $CurrentDate), 'id' => 'Deliverydt', 'class' => 'form-control', 'required' => 'true', 'onkeypress'=>'return false;');
$data = array('name' => 'txtcurrencytype', 'value' => set_value('txtcurrencytype'), 'id' => 'txtcurrencytype', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
<div class="col-md-3">
<label>Exchange Rate</label>
<?php
$data = array('name' => 'txtexachangerate', 'value' => set_value('txtexachangerate'), 'id' => 'txtexachangerate', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
<div class="col-md-3">
<a href="http://www.xe.com/" target="_blank"><u>To check Today's Foreign Exchange value</u></a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Department Name<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label>
<label>Department Name<span class="badge mandatory">*</span></label>
<div>
<?php
$options1 = array("0" => 'Select Department Name');
@ -2193,7 +2233,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label>Cost Center Name<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label>
<label>Cost Center Name<span class="badge mandatory">*</span></label>
<div>
<?php
$options2 = array("0" => 'Cost Center Name');
@ -2226,44 +2266,6 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
<div class="col-md-3" style='display:none;' id='txtPoRange'>
<b><u>Select Tax Range<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></u></b><br />
<tr>
<td>
<?php echo form_label('Local', 'Local') . "&nbsp;&nbsp;" . form_radio(array("name" => "Range", "id" => "Local", "value" => "0", 'checked' => set_radio('Range', '0', TRUE))); ?>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
<?php echo form_label('Inter state', 'Inter state') . "&nbsp;&nbsp;" . form_radio(array("name" => "Range", "id" => "Inter_state", "value" => "1", 'checked' => set_radio('Range', '1', FALSE))); ?>
</td>
</tr>
</div>
<div class="col-md-3" id="currencyexchange" style='display:none;'>
<div class="col-md-6">
<label>Currency Type<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label>
<?php
$data = array('name' => 'txtcurrencytype', 'value' => set_value('txtcurrencytype'), 'id' => 'txtcurrencytype', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
<div class="col-md-6">
<label>Exchange Rate</label>
<?php
$data = array('name' => 'txtexachangerate', 'value' => set_value('txtexachangerate'), 'id' => 'txtexachangerate', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
<div class="col-md-12">
<a href="http://www.xe.com/" target="_blank"><u>To check Today's Foreign Exchange value</u></a>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" style="padding: 0px;">
<div class="col-md-3" id="DisplayScheduleDiv" style="display:none;">
<label>Select Service Schedule Type</label>
<div class="form-group">
@ -2309,30 +2311,27 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
</div>
<!--start new fields 1 sep-->
<div class="row">
<div class="col-md-12" style="padding: 0px;">
<div class="col-md-12">
<div class="col-md-3">
<label>Purchase Order Date</label>
<div class="form-group">
<?php
$data = array('name' => 'PODate', 'value' => set_value('PODate', $CurrentDate), 'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 'onkeypress' => 'return false;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<div class="col-md-12" style="padding: 0px;">
<label>Mode Of Shipment</label>
<div class="form-group">
<?php
$data = array('name' => 'emergmodeofshipment', 'value' => set_value('emergmodeofshipment'), 'id' => 'emergmodeofshipment', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-9" style="padding:0px;">
<div class="col-md-4" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-3">
<label>Contact Reference</label>
<div class="form-group">
@ -2341,17 +2340,10 @@ if (!empty($INRSYMBOL)) {
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-4" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-3">
<label>Supplier's Offer No</label>
<div class="form-group">
<?php
$data = array('name' => 'emergsupplierofferno', 'value' => set_value('emergsupplierofferno'), 'id' => 'emergsupplierofferno', 'class' => 'form-control');
echo form_input($data);
@ -2360,9 +2352,10 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-4" style="padding:0px;">
<div class="col-md-12" style="padding-right:0px;">
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Our Reference(S)</label>
<div class="form-group">
@ -2372,18 +2365,8 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
</div>
</div>
</div>
</div><!--End new fields 1 sep-->
</div>
<!--start new fields 1 sep-->
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<div class="col-md-6" style="padding: 0px;">
<label id="typeOptions">Service Type Options</label>
<label id="typeOptions">Service Type Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -2407,8 +2390,38 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="col-md-6" style="padding-right: 0px;">
<label>Insurance Options</label>
<div class="col-md-3">
<label for="payablefrom">Payable Terms<span class="badge mandatory">*</span></label>
<?php
$options1 = array("0" => 'Select Payment method');
//print_r( $options);
if (!empty($Payment)) {
foreach ($Payment as $payment) :
$options1[$payment->PaymentID] = $payment->PaymentTerms;
endforeach;
}
echo form_dropdown('PaymentMethod', $options1, set_value('PaymentMethod'), 'id="PaymentMethod"', 'class="form-control"');
?>
</div>
<div class="col-md-3" id="otheroptiondiv" style="display:none;">
<label>Description of Payable Terms<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'Otherpayment', 'Otherpayment' => set_value('Otherpayment'), 'id' => 'Otherpayment', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Insurance Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -2433,11 +2446,8 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-9" style="padding:0px;">
<div class="col-md-4" id="insuranceTxtDiv" style="display:block;">
<label>Insurance No / Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label>
<div class="col-md-3" id="insuranceTxtDiv" style="display:block;">
<label>Insurance No / Insurance Details<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'InsuranceNumber', 'value' => set_value('InsuranceNumber'), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
@ -2445,50 +2455,18 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
<div class="col-md-4">
<label for="payablefrom">Payable Terms</label>
<?php
$options1 = array("0" => 'Select Payment method');
//print_r( $options);
if (!empty($Payment)) {
foreach ($Payment as $payment) :
$options1[$payment->PaymentID] = $payment->PaymentTerms;
endforeach;
}
echo form_dropdown('PaymentMethod', $options1, set_value('PaymentMethod'), 'id="PaymentMethod"', 'class="form-control"');
?>
</div>
<div class="col-md-4" id="otheroptiondiv" style="display:none;">
<label>Description of Payable Terms<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'Otherpayment', 'Otherpayment' => set_value('Otherpayment'), 'id' => 'Otherpayment', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-2" style="padding-right: 0px;">
<label for="BudgetType">Budget Type</label>
<div class="col-md-3">
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<?php
$optionsnew = array('0' => 'Select', '1' => 'REVENUE', '2' => 'CAPITAL');
echo form_dropdown('BudgetType', $optionsnew, set_value('BudgetType'), 'id="BudgetType"', 'required="true"', 'class="form-control select2');
?>
</div>
</div>
</div><!--End new fields 1 sep-->
<div class="col-md-12" style="padding:0px;"></div>
<div class="col-md-3">
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-3 col-md-offset-7" align="right" style="padding:10px">
@ -2928,7 +2906,7 @@ if (!empty($INRSYMBOL)) {
<div class="col-md-12">
<div class="col-md-3">
<label>Req No<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label>
<label>Req No<span class="badge mandatory">*</span></label>
<div>
<?php
@ -2970,7 +2948,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="col-md-12">
<div class="col-md-3">
<label>Item Code<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label>
<label>Item Code<span class="badge mandatory">*</span></label>
<div>
<?php
$options = array("0" => 'Item Code');
@ -3068,7 +3046,7 @@ if (!empty($INRSYMBOL)) {
<div class="col-md-3">
<label>Quantity<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label>
<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()');
@ -3077,7 +3055,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label>
<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()');
@ -3213,7 +3191,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-12" style="padding: 0px 30px 10px 30px;">
<label>Service Description<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label> <?php
<label>Service Description<span class="badge mandatory">*</span></label> <?php
$data = array('name' => 'EdittxtSpcialInstructionSingle', 'value' => set_value('EdittxtSpcialInstructionSingle'), 'id' => 'EdittxtSpcialInstructionSingle', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
echo form_textarea($data); ?>
</div>
@ -3247,7 +3225,7 @@ if (!empty($INRSYMBOL)) {
<div align="left">
<div class="col-md-12">
<div class="col-md-3">
<label>Req No<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label>
<label>Req No<span class="badge mandatory">*</span></label>
<div>
<?php
@ -3289,7 +3267,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="col-md-12">
<div class="col-md-2">
<label>Item Code<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label>
<label>Item Code<span class="badge mandatory">*</span></label>
<div>
<?php
$options = array("0" => 'Item Code');
@ -3321,7 +3299,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="col-md-6" style="padding: 0px;">
<div class="col-md-2" style="padding-right:0px;">
<label>Quantity<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label>
<label>Quantity<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'EditRevenueQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditRevenueQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange()', 'style' => 'text-align:right;');
@ -3330,7 +3308,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-2" style="padding-right: 0px;">
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label>
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'EditRevenueRate', 'value' => set_value('EditRate'), 'id' => 'EditRevenueRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange()', 'style' => 'text-align:right;');
@ -3619,7 +3597,7 @@ if (!empty($INRSYMBOL)) {
<div align="left">
<div class="col-md-12">
<div class="col-md-2">
<label>Item Code<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label>
<label>Item Code<span class="badge mandatory">*</span></label>
<div>
<?php
$options = array("0" => 'Item Code');
@ -3651,7 +3629,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="col-md-6" style="padding:0px;">
<div class="col-md-3">
<label>Quantity<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label>
<label>Quantity<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change()');
@ -3660,7 +3638,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge" style="color:red;text-align:right;background-color: #fff ;"></label>
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge mandatory"></label>
<div class="form-group">
<?php
$data = array('name' => 'Rate', 'value' => set_value('Rate'), 'id' => 'Rate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change()');
@ -3689,7 +3667,7 @@ if (!empty($INRSYMBOL)) {
<div class="col-md-12">
<div class="col-md-4">
<label>Discount Type <span class="badge" style="color:red;text-align:right;background-color: #fff ;"></label>
<label>Discount Type <span class="badge mandatory"></span></label>
<div>
<?php
$options = array("0" => 'Select Discount Type');
@ -3710,7 +3688,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-2">
<label>Discount Rate<span class="badge" style="color:red;text-align:right;background-color: #fff ;"> </label>
<label>Discount Rate<span class="badge mandatory"></span> </label>
<div class="form-group">
<?php
$data = array('name' => 'txtDiscount', 'value' => set_value('txtDiscount'), 'id' => 'txtDiscount', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();calculateDiscount(0);');
@ -3751,7 +3729,7 @@ if (!empty($INRSYMBOL)) {
<div class="col-md-12" style="text-align:left;">
<div class="col-md-4">
<label>Packaging Type <span class="badge" style="color:red;text-align:right;background-color: #fff ;"></label>
<label>Packaging Type <span class="badge mandatory"></span></label>
<div>
<?php
$options = array("0" => 'Select Packaging Type');
@ -3772,7 +3750,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-2">
<label>Packaging Rate <span class="badge" style="color:red;text-align:right;background-color: #fff ;"></label>
<label>Packaging Rate <span class="badge mandatory"></span></label>
<div class="form-group">
<?php
$data = array('name' => 'txtPackaging', 'value' => set_value('txtPackaging'), 'id' => 'txtPackaging', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculatePackaging(0);change();');
@ -3833,7 +3811,7 @@ if (!empty($INRSYMBOL)) {
<div class="col-md-12">
<div class="col-md-2">
<label>Freight Type <span class="badge" style="color:red;text-align:right;background-color: #fff ;"></label>
<label>Freight Type <span class="badge mandatory"></label>
<div>
<?php
$options = array("0" => 'Select Freight Type');
@ -3854,7 +3832,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-2" id="TripsValue" style="display:none;">
<label>NO Of Trips<span class="badge" style="color:red;text-align:right;background-color: #fff ;"></label>
<label>NO Of Trips<span class="badge mandatory"></label>
<div class="form-group">
<?php
$data = array('name' => 'NOOfTrips', 'value' => set_value('NOOfTrips'), 'id' => 'NOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight(0);');
@ -3863,7 +3841,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-2">
<label>Freight Rate <span class="badge" style="color:red;text-align:right;background-color: #fff ;"></label>
<label>Freight Rate <span class="badge mandatory"></label>
<div class="form-group">
<?php
$data = array('name' => 'txtFreight', 'value' => set_value('txtFreight'), 'id' => 'txtFreight', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateFreight(0);change();');
@ -3951,7 +3929,7 @@ if (!empty($INRSYMBOL)) {
<div class="col-md-12">
<div class="col-md-3">
<label>Item Code<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label>
<label>Item Code<span class="badge mandatory">*</span></label>
<div>
<?php
$options = array("0" => 'Item Code');
@ -4059,7 +4037,7 @@ if (!empty($INRSYMBOL)) {
<div class="col-md-3">
<label>Quantity<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label>
<label>Quantity<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'ServiceQuantity', 'value' => set_value('ServiceQuantity'), 'id' => 'ServiceQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Ratechange()');
@ -4068,7 +4046,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label>
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'ServiceRate', 'value' => set_value('ServiceRate'), 'id' => 'ServiceRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Ratechange()');
@ -4212,7 +4190,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="col-md-12" style="padding: 0px 30px 10px 30px;">
<label>Service Description<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label> <?php
<label>Service Description<span class="badge mandatory">*</span></label> <?php
$data = array('name' => 'txtSpcialInstructionSingle', 'value' => set_value('txtSpcialInstructionSingle'), 'id' => 'txtSpcialInstructionSingle', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
echo form_textarea($data); ?>
</div>
@ -5402,7 +5380,7 @@ if (!empty($INRSYMBOL)) {
</div>
<!--start new fields 1 sep-->
<div class="col-md-12" id="emergdescofpoDiv" style="display:none;">
<label>Description Of Service<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</label>
<label>Description Of Service<span class="badge mandatory">*</label>
<div class="form-group">
<?php
$data = array('name' => 'emergdescofpo', 'value' => set_value('emergdescofpo'), 'id' => 'emergdescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
@ -5675,8 +5653,8 @@ if (!empty($INRSYMBOL)) {
function clearRevenueModalFields() {
// To reset the Modal controls
var isChecked = $('#IsOpenOrder').is(':checked');
isChecked ? $('#Quantity').val(0).prop('readonly', true).prop('required', false)
: $('#Quantity').val('').prop('readonly', false).prop('required', true);
isChecked ? $('#Quantity').val(0).prop('readonly', true).prop('required', false) :
$('#Quantity').val('').prop('readonly', false).prop('required', true);
$('#ReqNo').val('0');
$('#deptName').val('');
@ -6146,7 +6124,10 @@ if (!empty($INRSYMBOL)) {
$.ajax({
url: "<?php echo base_url() ?>VerifyWithSupplierForPendingPO",
type: 'POST',
data: {supplierid : d, materialcode: selectedMaterialCode },
data: {
supplierid: d,
materialcode: selectedMaterialCode
},
success: function(response) {
if (response) alert(response);
}
@ -6171,7 +6152,10 @@ if (!empty($INRSYMBOL)) {
$.ajax({
url: "<?php echo base_url() ?>VerifyWithSupplierForPendingPO",
type: 'POST',
data: {supplierid : d, materialcode: selectedRevenueMaterialCode },
data: {
supplierid: d,
materialcode: selectedRevenueMaterialCode
},
success: function(response) {
if (response) alert(response);
}
@ -7089,8 +7073,7 @@ $('#content').loader('hide');
alert('Please Select Line item to Create PO');
$('#Deliverydt').focus();
return false;
}
else if ($('#insuranceStatus').val() == 'YES' && $('#InsuranceNumber').val() == '') {
} else if ($('#insuranceStatus').val() == 'YES' && $('#InsuranceNumber').val() == '') {
alert('Please Enter Insurance Number..!');
return false;
@ -7278,7 +7261,10 @@ $('#content').loader('hide');
$.ajax({
url: "<?php echo base_url() ?>VerifyWithSupplierForPendingPO",
type: 'POST',
data: {supplierid : d, materialcode: editselectedMaterialCode },
data: {
supplierid: d,
materialcode: editselectedMaterialCode
},
success: function(response) {
if (response) alert(response);
}
@ -7399,7 +7385,10 @@ $('#content').loader('hide');
$.ajax({
url: "<?php echo base_url() ?>VerifyWithSupplierForPendingPO",
type: 'POST',
data: {supplierid : d, materialcode: editselectedMaterialCode },
data: {
supplierid: d,
materialcode: editselectedMaterialCode
},
success: function(response) {
if (response) alert(response);
}
@ -7499,56 +7488,41 @@ $('#content').loader('hide');
});
function validateAddRevenueTax()
{
function validateAddRevenueTax() {
var isChecked = $('#IsOpenOrder').is(':checked');
if($('#ReqNo').val() == "0")
{
if ($('#ReqNo').val() == "0") {
alert('Please select the Requisition Number');
$('#ReqNo').focus();
return false;
}
else if($('#CostCenter').val() == "0")
{
} else if ($('#CostCenter').val() == "0") {
alert('Please select the Cost center');
$('#CostCenter').focus();
return false;
}
else if($('#MaterialCode').val() == "0")
{
} else if ($('#MaterialCode').val() == "0") {
alert('Please select the Material Code');
$('#MaterialCode').focus();
return false;
}
else if($('#Quantity').val() == '')
{
} else if ($('#Quantity').val() == '') {
alert('Please Enter the Quantity value');
$('#Quantity').focus();
return false;
}
else if(isChecked == false && $('#Quantity').val() == "0")
{
} else if (isChecked == false && $('#Quantity').val() == "0") {
alert('Please Enter the Valid Quantity value');
$('#Quantity').focus();
return false;
}
else if($('#Rate').val() == '')
{
} else if ($('#Rate').val() == '') {
alert('Please Enter the Rate of the Item');
$('#Rate').focus();
return false;
}
else if(isChecked == false && $('#Rate').val() == "0")
{
} else if (isChecked == false && $('#Rate').val() == "0") {
alert('Please Enter the Valid Rate of the Item');
$('#Rate').focus();
return false;
}
else
{
} else {
return true;
}
}
function validateEditRevenueTax() {
var isChecked = $('#IsOpenOrder').is(':checked');
@ -8558,8 +8532,7 @@ $('#content').loader('hide');
$('#Quantity').removeAttr('required');
$('#Quantity').attr('readonly', true);
}
if( input == 'SERVICE')
{
if (input == 'SERVICE') {
$('#ServiceQuantity').val(0);
$('#ServiceQuantity').removeAttr('required');
$('#ServiceQuantity').attr('readonly', true);

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@ -900,6 +900,10 @@ if (!empty($INRSYMBOL)) {
text-align: right;
}
.btn-container .btn {
margin-left: 10px;
}
.header-container {
display: flex;
justify-content: space-between;
@ -938,14 +942,14 @@ if (!empty($INRSYMBOL)) {
echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
<section class="content">
<div style="border:2px solid #333">
<div class="box">
<div>
<center><b>
</b></center>
</div>
<div class="header-container">
<h2>Amendment Revenue Purchase Order- <?php echo $PONO; ?></h2>
<a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-cancel" id="back" value="Back">Back</a>
<!-- <a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-cancel" id="back" value="Back">Back</a> -->
</div>
<div class="container-fluid">
@ -1114,7 +1118,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label>Revenue Type Options</label>
<label>Revenue Type Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -1141,7 +1145,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="col-md-3">
<label for="payablefrom">Payable Terms</label>
<label for="payablefrom">Payable Terms<span class="badge mandatory">*</span></label>
<input type="hidden" name="beforePaymentTerms" value="<?php echo $Terms; ?>">
@ -1193,7 +1197,7 @@ if (!empty($INRSYMBOL)) {
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label for="insurance">Insurance</label>
<label for="insurance">Insurance<span class="badge mandatory">*</span></label>
<?php
$optionsnew = array('1' => 'Yes', '0' => 'No');
echo form_dropdown('insurancestatus', $optionsnew, set_value('insurancestatus'), 'id="insurancestatus"', 'required="true"', 'class="form-control select2', 'readonly ="true"');
@ -1209,7 +1213,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<select id='BudgetType' name='BudgetType'>
<?php if ($BudgetType == 'CAPITAL') {
$opt1 = 'CAPITAL';
@ -1281,9 +1285,9 @@ if (!empty($INRSYMBOL)) {
</form>
</div>
<div class="modal-footer">
<a class="btn btn-cancel" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
<a class="btn btn-success" ID="PackagingOption" onclick="SetFreightOption();" style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a>
<a class="btn btn-success" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
</div>
</div>
@ -1318,8 +1322,8 @@ if (!empty($INRSYMBOL)) {
</form>
</div>
<div class="modal-footer">
<a class="btn btn-cancel" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
<a class="btn btn-success" ID="ExciseOption" onclick="SetExciseCalculation();" style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a>
<a class="btn btn-success" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
</div>
</div>
@ -1349,8 +1353,8 @@ if (!empty($INRSYMBOL)) {
</form>
</div>
<div class="modal-footer">
<a class="btn btn-cancel" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
<a class="btn btn-success" ID="VatOption" onclick="SetVatCalculation();" style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a>
<a class="btn btn-success" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
</div>
</div>
@ -1378,8 +1382,8 @@ if (!empty($INRSYMBOL)) {
</form>
</div>
<div class="modal-footer">
<a class="btn btn-cancel" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
<a class="btn btn-success" ID="CSTOption" onclick="SetCSTCalculation();" style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a>
<a class="btn btn-success" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
</div>
</div>
@ -1514,8 +1518,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div><br />
<div class="col-md-12">
<div class="row">
<div class="col-md-12">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Discount Type </label>
<div>
@ -1555,122 +1558,10 @@ if (!empty($INRSYMBOL)) {
?>
</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 class="row">
<div class="col-md-12 ">
<div class="col-md-2">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Freight Type </label>
<div>
<?php
@ -1718,6 +1609,119 @@ if (!empty($INRSYMBOL)) {
?>
</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">
@ -1727,10 +1731,7 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-4 col-md-offset-8">
@ -1742,6 +1743,8 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
</div>
<div class="col-md-12">
<label><?php echo "Revenue Description"; ?></label>
<div class="form-group">
@ -1757,8 +1760,8 @@ if (!empty($INRSYMBOL)) {
<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>
<a class="btn btn-success" data-dismiss="modal" value="Cancel">Cancel</a>
</div>
</div>
</div>
@ -1768,9 +1771,7 @@ if (!empty($INRSYMBOL)) {
<div class="modal-footer">
</div>
</div>
</div>
</form>
</div>
</div>
@ -1904,7 +1905,7 @@ if (!empty($INRSYMBOL)) {
</div>
<!-- /.box-body -->
<br>
<div class="row" style="border:1px solid;">
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Basic Amount <?php echo "($INRSYM)" ?> </label>
@ -2012,6 +2013,8 @@ if (!empty($INRSYMBOL)) {
<?php } ?>
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br>
</div>
<div class="btn-container" style="text-align: right;">
<input type="button" class="btn btn-cancel" value="Cancel" onClick="window.location ='amendmentpurchaseorder';">
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus" id="txtStatus" />
@ -2021,10 +2024,9 @@ if (!empty($INRSYMBOL)) {
<!-- <a class="btn btn-success Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> -->
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
<input type="button" class="btn btn-success" value="Cancel" onClick="window.location ='amendmentpurchaseorder';">
<!-- <input type="reset" class="btn btn-success" value = "OK"> -->
</div>
</div>
@ -2038,12 +2040,28 @@ if (!empty($INRSYMBOL)) {
</div>
<?php $Reqon = new DateTime($Reqon, new DateTimeZone('Asia/Kolkata'));
$Reqon = $Reqon->format('d-m-Y'); ?>
<label>Request On :</label><?php echo $Reqon; ?><br />
<label>Request On :</label><?php echo $Reqon; ?><br>
<?php if ($RequesterName != '' || $RequesterName != null) { ?>
<label>Request By : </label><?php echo $RequesterName; ?><br />
<label>Request By : </label><?php echo $RequesterName; ?>
<?php } ?><br />
<label>Status :</label><?php echo $POStatus; ?>
<label>Status : </label><?php
$statusMappings = [
'PO APPROVED' => 'AWAITING APPROVE',
'AWAITING RELEASE' => 'AWAITING APPROVE',
'RELEASER ONHOLD' => 'APPROVER ONHOLD',
'PO RELEASED' => 'PO APPROVED',
];
if (isset($POStatus) && !empty($POStatus)) {
if (isset($statusMappings[$POStatus])) {
echo $statusMappings[$POStatus];
} else {
echo $POStatus;
}
} else {
echo "Status not provided";
}
?>
</div>
</div>
</section>
@ -2567,8 +2585,8 @@ if (!empty($INRSYMBOL)) {
$('#Scheduleby').val('');
}); <!-- script
for table, It works uned the datatable plugin-- >
});
// < !--script for table, It works uned the datatable plugin-- >
$(function() {
$('#revenueTax').DataTable({

View File

@ -420,7 +420,10 @@ if (!empty($getlogpodtl)) {
$.ajax({
url: "<?php echo base_url() ?>VerifyWithSupplierForPendingPO",
type: 'POST',
data: {supplierid : d, materialcode: id },
data: {
supplierid: d,
materialcode: id
},
success: function(response) {
if (response) alert(response);
}
@ -458,7 +461,10 @@ if (!empty($getlogpodtl)) {
$.ajax({
url: "<?php echo base_url() ?>VerifyWithSupplierForPendingPO",
type: 'POST',
data: {supplierid : d, materialcode: id },
data: {
supplierid: d,
materialcode: id
},
success: function(response) {
if (response) alert(response);
}
@ -1837,6 +1843,7 @@ if (!empty($getlogpodtl)) {
.num {
text-align: right;
}
.header-container {
display: flex;
justify-content: space-between;
@ -1867,7 +1874,6 @@ if (!empty($getlogpodtl)) {
text-align: right;
background-color: white;
}
</style>
<div class="content-wrapper">
<?php
@ -1876,7 +1882,7 @@ if (!empty($getlogpodtl)) {
echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
<section class="content">
<div style="border:2px solid #333">
<div class="box">
<div id="content"></div>
<div class="header-container">
<?php if ($parentPO == '') { ?>
@ -2053,7 +2059,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-3">
<label>Revenue Type Options</label>
<label>Revenue Type Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -2084,7 +2090,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-3">
<label>Payment Terms</label>
<label>Payment Terms<span class="badge mandatory">*</span></label>
<?php
@ -2119,7 +2125,7 @@ if (!empty($getlogpodtl)) {
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label for="insurance">Insurance Options</label>
<label for="insurance">Insurance Options<span class="badge mandatory">*</span></label>
<?php
$optionsnew = array('1' => 'Yes', '0' => 'No');
echo form_dropdown('insurancestatus', $optionsnew, set_value('insurancestatus'), 'id="insurancestatus"', 'required="true"', 'class="form-control select2');
@ -2135,7 +2141,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<select id='BudgetType' name='BudgetType'>
<?php if ($BudgetType == 'CAPITAL') {
$opt1 = 'CAPITAL';
@ -2401,6 +2407,7 @@ if (!empty($getlogpodtl)) {
<div class="col-md-12" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Discount Type </label>
<div>
@ -2434,29 +2441,9 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
<div class="col-md-2">
<label>CGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'Cgst', 'value' => set_value('Cgst', 0), 'id' => 'Cgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();RevenueChangeSgst();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'AfterCgst', 'value' => set_value('AfterCgst', 0), 'id' => 'AfterCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Packaging Type </label>
<div>
@ -2490,50 +2477,10 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
<div id="SGSTAddModel">
<div class="col-md-2">
<label>SGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'Sgst', 'value' => set_value('Sgst', 0), 'id' => 'Sgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'AfterSgst', 'value' => set_value('AfterSgst', 0), 'id' => 'AfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div id="IGSTAddModel" style="display:none;">
<div class="col-md-2">
<label>IGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'Igst', 'value' => set_value('Igst', 0), 'id' => 'Igst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'AfterIgst', 'value' => set_value('AfterIgst', 0), 'id' => 'AfterIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-2">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Freight Type </label>
<div>
<?php
@ -2566,7 +2513,6 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
<div class="col-md-2">
<label>Freight Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
@ -2576,6 +2522,79 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>CGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'Cgst', 'value' => set_value('Cgst', 0), 'id' => 'Cgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();RevenueChangeSgst();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'AfterCgst', 'value' => set_value('AfterCgst', 0), 'id' => 'AfterCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div id="SGSTAddModel">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>SGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'Sgst', 'value' => set_value('Sgst', 0), 'id' => 'Sgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'AfterSgst', 'value' => set_value('AfterSgst', 0), 'id' => 'AfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div id="IGSTAddModel" style="display:none;">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>IGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'Igst', 'value' => set_value('Igst', 0), 'id' => 'Igst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'AfterIgst', 'value' => set_value('AfterIgst', 0), 'id' => 'AfterIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-4">
<label> Insurance <?php echo "($INRSYM)" ?> (if Any)</label>
<div class="form-group">
@ -2585,10 +2604,10 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-4 ">
<label><?php echo "Total Order Amt ($INRSYM)"; ?></label>
@ -2760,6 +2779,7 @@ if (!empty($getlogpodtl)) {
</div><br />
<div class="col-md-12">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Discount Type </label>
<div>
@ -2797,29 +2817,9 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
<div class="col-md-2">
<label>CGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditCgst', 'value' => set_value('EditCgst', 0), 'id' => 'EditCgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange();RevenueChangeEditSgst();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterCgst', 'value' => set_value('EditAfterCgst', 0), 'id' => 'EditAfterCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Packaging Type </label>
<div>
@ -2857,49 +2857,10 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
<div id="SGSTEditModel">
<div class="col-md-2">
<label>SGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditSgst', 'value' => set_value('EditSgst', 0), 'id' => 'EditSgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterSgst', 'value' => set_value('EditAfterSgst', 0), 'id' => 'EditAfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div id="IGSTEditModel" style="display:none;">
<div class="col-md-2">
<label>IGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditIgst', 'value' => set_value('EditIgst', 0), 'id' => 'EditIgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterIgst', 'value' => set_value('EditAfterIgst', 0), 'id' => 'EditAfterIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-2">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Freight Type </label>
<div>
<?php
@ -2945,8 +2906,73 @@ if (!empty($getlogpodtl)) {
?>
</div>
</div>
</div>
<div class="col-md-12" id="SGSTEditModel">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>SGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditSgst', 'value' => set_value('EditSgst', 0), 'id' => 'EditSgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterSgst', 'value' => set_value('EditAfterSgst', 0), 'id' => 'EditAfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" id="IGSTEditModel" style="display:none;">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>IGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditIgst', 'value' => set_value('EditIgst', 0), 'id' => 'EditIgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterIgst', 'value' => set_value('EditAfterIgst', 0), 'id' => 'EditAfterIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>CGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditCgst', 'value' => set_value('EditCgst', 0), 'id' => 'EditCgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange();RevenueChangeEditSgst();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterCgst', 'value' => set_value('EditAfterCgst', 0), 'id' => 'EditAfterCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-4">
<label> Insurance Amt <?php echo "($INRSYM)" ?> (if Any)</label>
<div class="form-group">
@ -2962,6 +2988,7 @@ if (!empty($getlogpodtl)) {
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-4">
<label><?php echo "Total Order Amt ($INRSYM)"; ?></label>
<div class="form-group">
@ -3263,9 +3290,8 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="col-md-12">
<div class="col-md-12" id="SGSTViewModel">
<div class="col-md-8"></div>
<div id="SGSTViewModel">
<div class="col-md-2">
<label>SGST In %</label>
<div class="form-group">
@ -3285,7 +3311,8 @@ if (!empty($getlogpodtl)) {
</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">
<label>IGST In %</label>
<div class="form-group">
@ -3305,7 +3332,6 @@ if (!empty($getlogpodtl)) {
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
@ -3476,7 +3502,7 @@ if (!empty($getlogpodtl)) {
<!-- /.box-body -->
<div class="row" style="border:1px solid;">
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Basic Amount <?php echo "($INRSYM)" ?></label>
@ -3893,6 +3919,7 @@ if (!empty($getlogpodtl)) {
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<input type="hidden" name="txttaxcheck" id="txttaxcheck" value="" />
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
<div class="btn-container" style="text-align: right;">
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED) { ?>
<a class="btn btn-cancel Save" ID="Cancel" href="<?php echo base_url() . 'purchaseorderListing'; ?>">&nbsp;&nbsp;<span class="bold">Cancel</span></a>
<?php if ($PONOStatus == PO_DRAFT) { ?>
@ -3905,20 +3932,22 @@ if (!empty($getlogpodtl)) {
<?php } else { ?>
<a class="btn btn-success" ID="OK" href="<?php echo base_url() . 'purchaseorderListing'; ?>">&nbsp;&nbsp;<span class="bold">OK</span></a>
<?php } ?>
</div>
</div><br />
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-6">
<label>Request On : </label><?php echo $Reqon; ?><br />
<?php if ($RequesterName != '' || $RequesterName != null) { ?>
<label>Request By : </label><?php echo $RequesterName; ?><br />
<?php
} ?>
<label>Status : </label><?php echo $StatusName; ?>
<!-- <label>Status : </label><?php
<?php } ?>
<label>Status : </label><?php
$statusMappings = [
'PO APPROVED' => 'AWAITING APPROVE',
'AWAITING RELEASE' => 'AWAITING APPROVE',
@ -3935,7 +3964,10 @@ if (!empty($getlogpodtl)) {
} else {
echo "Status not provided";
}
?> -->
?>
</div>
</div>
</div>
</div>
</div>
@ -4707,8 +4739,7 @@ if (!empty($getlogpodtl)) {
stat = '<?php echo PO_CREATED; ?>';
} else if (status == '4') {
stat = '<?php echo PO_RELEASED; ?>';
}
else {
} else {
stat = '<?php echo $PONOStatus; ?>';
}
var deladd = $('#DeliveryAddr').val();
@ -4770,7 +4801,8 @@ if (!empty($getlogpodtl)) {
alert("Error");
}
},error: function(jqXHR, textStatus, errorThrown) {
},
error: function(jqXHR, textStatus, errorThrown) {
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
alert("Error: " + textStatus);
}

View File

@ -86,7 +86,6 @@ if (!empty($POMaster)) {
$DescriptionOfPo = $Req->Description_Of_Service;
$BudgetType = $Req->BudgetType;
$PrePOFile = $Req->POFile;
}
}
@ -257,7 +256,8 @@ foreach ($PaymentTerms as $TER) {
$("#SupAddress").val("MSME :" + obj.MSME + "\n" + obj.Address);
} else {
$("#SupAddress").val(obj.Address);
} $("#PaymentTerms").val(obj.PaymentID);
}
$("#PaymentTerms").val(obj.PaymentID);
@ -407,7 +407,10 @@ foreach ($PaymentTerms as $TER) {
$.ajax({
url: "<?php echo base_url() ?>VerifyWithSupplierForPendingPO",
type: 'POST',
data: {supplierid : drpSupplier, materialcode: id },
data: {
supplierid: drpSupplier,
materialcode: id
},
success: function(response) {
if (response) alert(response);
}
@ -447,7 +450,10 @@ foreach ($PaymentTerms as $TER) {
$.ajax({
url: "<?php echo base_url() ?>VerifyWithSupplierForPendingPO",
type: 'POST',
data: {supplierid : d, materialcode: id },
data: {
supplierid: d,
materialcode: id
},
success: function(response) {
if (response) alert(response);
}
@ -644,6 +650,7 @@ foreach ($PaymentTerms as $TER) {
.num {
text-align: right;
}
.header-container {
display: flex;
justify-content: space-between;
@ -656,16 +663,24 @@ foreach ($PaymentTerms as $TER) {
text-align: center;
margin: 0;
}
.centered {
display: flex;
/* justify-content: center; */
align-items: center;
height: 10vh;
}
.centered label, .centered input {
.centered label,
.centered input {
margin: 0 5px;
}
.mandatory { color:red;text-align:right;background-color: white;}
.mandatory {
color: red;
text-align: right;
background-color: white;
}
</style>
<div class="content-wrapper">
<?php
@ -674,14 +689,12 @@ foreach ($PaymentTerms as $TER) {
echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
<section class="content">
<div style="border:2px solid #333">
<div class="box">
<div id="content"></div>
<div class="header-container">
<?php if ($parentPO == '') { ?>
<h2> Edit Service Purchase Order-<?php echo "$PONO"?></h2>
<?php } else {?>
<h2> Amended Service Purchase Order-<?php echo "$PONO" ?></h2>
<?php } ?>
<a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-cancel" id="back" value="Back">Back</a>
</div>
<div class="container-fluid">
@ -710,7 +723,7 @@ foreach ($PaymentTerms as $TER) {
</div>
</div>
<div class="col-md-3">
<label>Supplier<span class="badge mandatory">*</span></label>
<label>Select Supplier<span class="badge mandatory">*</span></label>
<?php
$options = array("0" => 'Select Supplier');
//print_r( $options);
@ -727,7 +740,7 @@ foreach ($PaymentTerms as $TER) {
</div>
<div class="col-md-3">
<label>Address</label>
<label>Supplier Address</label>
<div class="form-group">
<?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40');
@ -856,7 +869,7 @@ foreach ($PaymentTerms as $TER) {
</div>
</div>
<div class="col-md-3">
<label>Service Type Options</label>
<label>Service Type Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -882,7 +895,7 @@ foreach ($PaymentTerms as $TER) {
</div>
</div>
<div class="col-md-3">
<label>Payment Terms</label>
<label>Payment Terms<span class="badge mandatory">*</span></label>
<input type="hidden" name="beforePaymentTerms" value="<?php echo $Terms ?>">
<?php
if (!empty($Payment)) {
@ -923,7 +936,7 @@ foreach ($PaymentTerms as $TER) {
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Insurance Options</label>
<label>Insurance Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -963,8 +976,8 @@ foreach ($PaymentTerms as $TER) {
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<select id='BudgetType' name='BudgetType'>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<select id='BudgetType' name='BudgetType' required="true">
<?php if ($BudgetType == 'CAPITAL') {
$opt1 = 'CAPITAL';
$opt2 = 'REVENUE';
@ -1260,8 +1273,8 @@ foreach ($PaymentTerms as $TER) {
<div class="modal-footer">
<div class="col-md-12">
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
<a class="btn btn-success font EditService" ID="Edit">&nbsp;&nbsp;<span class="bold">Update Service</span></a>
<a class="btn btn-success" data-dismiss="modal" value="Cancel">Cancel</a>
</div>
</div>
</div>
@ -1432,7 +1445,7 @@ foreach ($PaymentTerms as $TER) {
</div>
<div class="row" style="border: 1px solid">
<div class="row">
<div class="col-md-12" style="padding:0px;">
<div class="col-md-2">
@ -1518,10 +1531,10 @@ foreach ($PaymentTerms as $TER) {
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="button" class="btn btn-cancel" value="Cancel" onClick="window.location ='amendmentpurchaseorder';">
<!-- <a class="btn btn-success Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> -->
<a class="btn btn-success Save" ID="Submit" onclick="Save()">&nbsp;&nbsp;<span class="bold">Submit</span></a>
<input type="button" class="btn btn-success" value="Cancel" onClick="window.location ='amendmentpurchaseorder';">
</div><br />

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -228,6 +228,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
.num {
text-align: right;
}
.header-container {
display: flex;
justify-content: space-between;
@ -258,7 +259,6 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
text-align: right;
background-color: white;
}
</style>
@ -272,7 +272,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
<div style="border:2px solid #333">
<div class="box">
<div class="header-container">
<h2>Import Purchase Order</h2>
<a href="<?php echo base_url() ?>CreatePO" class="btn btn-cancel" id="back" value="Back">Back</a>
@ -309,7 +309,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
</div>
</div>
<div class="col-md-3">
<label>Supplier<span class="badge mandatory">*</span></label>
<label>Select Supplier<span class="badge mandatory">*</span></label>
<?php
$options = array("0" => 'Select Supplier');
@ -326,7 +326,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
</div>
<div class="col-md-3">
<label>Address</label>
<label>Supplier Address</label>
<div class="form-group">
<?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40');
@ -396,6 +396,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
@ -490,7 +491,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
</div>
</div>
<div class="col-md-3">
<label for="payablefrom">Import Type Options</label>
<label for="payablefrom">Import Type Options<span class="badge mandatory">*</span></label>
<?php
$options3 = array("0" => 'Select');
@ -508,7 +509,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
</div>
<div class="col-md-3">
<label for="payablefrom">Payable Terms</label>
<label for="payablefrom">Payable Terms<span class="badge mandatory">*</span></label>
<input type="hidden" name="beforePaymentTerms" value="<?php echo $Terms; ?>">
@ -546,7 +547,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
<div class="col-md-12">
<div class="col-md-3">
<label for="payablefrom">Insurance Options</label>
<label for="payablefrom">Insurance Options<span class="badge mandatory">*</span></label>
<?php
$options1 = array("0" => 'NO', "1" => 'YES');
@ -573,7 +574,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<?php

View File

@ -86,6 +86,8 @@ if (!empty($INRSYMBOL)) {
<script>
$(document).ready(function() {
$("#PaymentTerms").select2();
clearTotalItemValues();
if ($("#insurance").val() == 1) {
@ -1734,16 +1736,28 @@ if (!empty($INRSYMBOL)) {
text-align: center;
margin: 0;
}
.btn-container .btn {
margin-left: 10px;
}
.centered {
display: flex;
/* justify-content: center; */
align-items: center;
height: 10vh;
}
.centered label, .centered input {
.centered label,
.centered input {
margin: 0 5px;
}
.mandatory { color:red;text-align:right;background-color: white;}
.mandatory {
color: red;
text-align: right;
background-color: white;
}
</style>
<div class="content-wrapper">
<?php
@ -1751,7 +1765,7 @@ if (!empty($INRSYMBOL)) {
echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
<section class="content">
<div style="border:2px solid #333">
<div class="box">
<div id="content"></div>
<div class="header-container">
<h2>Revenue Purchase Order</h2>
@ -2007,6 +2021,15 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="btn-container">
<div class="row">
<div class="col text-right">
<!-- <input type="checkbox" id="IsOpenOrder" name="IsOpenOrder" value="1"> IS THIS OPEN ORDER FORMAT -->
<a data-toggle="modal"><button type="submit" onclick="openModal();" class="btn btn-success" id="abcd">Select Line Item</button> </a>
</div>
</div>
</div>
<!-- Modal for Packing Calculation -->
<div id="packagingcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog">
@ -2037,7 +2060,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<!-- freightcalmodel-->
<!-- Modal for freight Calculation-->
<div id="freightcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog">
@ -2161,18 +2184,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="container-fluid">
<div align="right">
<div class="col-md-12">
<div class="col-md-3 col-md-offset-7" align="right" style="padding:10px">
<!-- <input type="checkbox" id="IsOpenOrder" name="IsOpenOrder" value="1"> IS THIS OPEN ORDER FORMAT -->
</div>
<div class="col-md-1" align="right" style="padding:10px">
<a data-toggle="modal"><button type="submit" onclick="openModal();" class="btn btn-success" id="abcd">Select Line Item</button> </a>
</div>
<br>
</div>
<!-- Model for revenue po -->
<div id="REVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="overflow-y:scroll !important">
@ -2305,14 +2317,6 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-12" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-4"></div>
<div class="col-md-4">
@ -2579,8 +2583,9 @@ if (!empty($INRSYMBOL)) {
</form>
</div>
</div>
</br>
<br />
<!-- Edit Model for revenue po -->
<div id="EDITREVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="overflow-y:scroll !important">
<div class="modal-dialog">
<!-- Modal content-->
@ -2703,6 +2708,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-12">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Discount Type </label>
<div>
@ -2742,29 +2748,9 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
<div class="col-md-2">
<label>CGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditCgst', 'value' => set_value('EditCgst', 0), 'id' => 'EditCgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange();RevenueChangeEditSgst();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterCgst', 'value' => set_value('EditAfterCgst', 0.00), 'id' => 'EditAfterCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Packaging Type </label>
<div>
@ -2804,49 +2790,10 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
<div id="SGSTEditModel">
<div class="col-md-2">
<label>SGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditSgst', 'value' => set_value('EditSgst', 0), 'id' => 'EditSgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterSgst', 'value' => set_value('EditAfterSgst', 0.00), 'id' => 'EditAfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div id="IGSTEditModel" style="display:none;">
<div class="col-md-2">
<label>IGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditIgst', 'value' => set_value('EditIgst', 0), 'id' => 'EditIgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterIgst', 'value' => set_value('EditAfterIgst', 0.00), 'id' => 'EditAfterIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-2">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Freight Type </label>
<div>
<?php
@ -2894,8 +2841,79 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>CGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditCgst', 'value' => set_value('EditCgst', 0), 'id' => 'EditCgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange();RevenueChangeEditSgst();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterCgst', 'value' => set_value('EditAfterCgst', 0.00), 'id' => 'EditAfterCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div id="SGSTEditModel">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>SGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditSgst', 'value' => set_value('EditSgst', 0), 'id' => 'EditSgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterSgst', 'value' => set_value('EditAfterSgst', 0.00), 'id' => 'EditAfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div id="IGSTEditModel" style="display:none;">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>IGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditIgst', 'value' => set_value('EditIgst', 0), 'id' => 'EditIgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterIgst', 'value' => set_value('EditAfterIgst', 0.00), 'id' => 'EditAfterIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-4">
<label> Insurance Amt <?php echo "($INRSYM)" ?> (if Any)</label>
<div class="form-group">
@ -2909,7 +2927,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-4">
<div class="form-group">
<label><?php echo "Total Order Amt ($INRSYM)"; ?></label>
@ -2921,7 +2939,6 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-12">
<label><?php echo "Reveneue Description"; ?></label>
<div class="form-group">
<?php
@ -2949,9 +2966,11 @@ if (!empty($INRSYMBOL)) {
</div>
</form>
</div>
</div>
</br>
<!-- Table box-body -->
<div class="box-body">
<div class="row">
<table id="revenueTax" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
@ -2972,24 +2991,21 @@ if (!empty($INRSYMBOL)) {
<tbody id='RevenueAppend'></tbody>
</table>
</div>
</div>
</br>
<!-- /.box-body -->
</div>
<div class="row" style="border:1px solid;">
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Basic Amount <?php echo "($INRSYM)" ?></label>
<?php
$data = array('name' => 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount'), 'id' => 'txtTotBasicAmount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
<div class="col-md-3">
<label>Total Discount Amount <?php echo "($INRSYM)" ?> </label>
@ -3029,8 +3045,6 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-12">
<div class="col-md-3">
<label>Total Packaging Amount <?php echo "($INRSYM)" ?></label>
@ -3076,6 +3090,7 @@ if (!empty($INRSYMBOL)) {
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value="">
</div>
</div>
</div>
<div class="row" style="padding: 2% 0%">
<div class="col-md-4 col-md-offset-8"><br />
<input type="file" name="POFile" id="POFile"><br>
@ -3085,11 +3100,12 @@ if (!empty($INRSYMBOL)) {
<input type="hidden" name="txtRowCount" id="txtRowCount" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="Budget" id="Budget" />
<div class="btn-container" style="text-align: right;">
<a class="btn btn-reset Save" ID="Cancel" onclick="Reset();">&nbsp;&nbsp;<span class="bold">Reset</span></a>
<a class="btn btn-success Save" ID="Save" onclick="Save(0)">&nbsp;&nbsp;<span class="bold">Save as Draft</span></a>
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
</div><br />
</div>
</div><br />
</div>
</div>

View File

@ -593,6 +593,7 @@ if (!empty($INRSYMBOL)) {
.num {
text-align: right;
}
.header-container {
display: flex;
justify-content: space-between;
@ -605,17 +606,24 @@ if (!empty($INRSYMBOL)) {
text-align: center;
margin: 0;
}
.centered {
display: flex;
/* justify-content: center; */
align-items: center;
height: 10vh;
}
.centered label, .centered input {
.centered label,
.centered input {
margin: 0 5px;
}
.mandatory { color:red;text-align:right;background-color: white;}
.mandatory {
color: red;
text-align: right;
background-color: white;
}
</style>
<div class="content-wrapper">
<?php
@ -624,7 +632,7 @@ if (!empty($INRSYMBOL)) {
echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
<section class="content">
<div style="border:2px solid #333">
<div class="box">
<div id="content"></div>
<div class="header-container">
<h2>Service Purchase Order</h2>
@ -662,7 +670,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label>Supplier<span class="badge mandatory">*</span></label>
<label>Select Supplier<span class="badge mandatory">*</span></label>
<?php
$options = array("0" => 'Select Supplier');
@ -680,7 +688,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="col-md-3">
<label>Address</label>
<label>Supplier Address</label>
<div class="form-group">
<?php
$data = array('name' => 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40');
@ -806,7 +814,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label>Service Type Options</label>
<label>Service Type Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
//$optionsWork = array("0"=>'Select Work Status');
@ -822,7 +830,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label>Payment Terms</label>
<label>Payment Terms<span class="badge mandatory">*</span></label>
<?php
if (!empty($Payment)) {
$options6 = array("0" => 'Select Payment Terms ');
@ -851,7 +859,7 @@ if (!empty($INRSYMBOL)) {
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Insurance Options</label>
<label>Insurance Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
@ -882,7 +890,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<label for="BudgetType">Budget Type<span class="badge mandatory">*</span></label>
<?php
@ -895,15 +903,15 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
</div>
<div class="col-md-12">
<div class="row">
<div class="btn-container" style="text-align: right; ">
<a data-toggle="modal"><button type="submit" onclick="openModal();" class="btn btn-success" id="abcd">Select Line Item</button> </a>
</div>
</div>
</div>
<div class="container-fluid">
<table class="table table-bordered" style="border:1px solid #333" id="ServiceTable">
<div style="padding-right:10px">
<div align="right">
<a data-toggle="modal"><button type="submit" onclick="openModal();" class="btn btn-success" id="abcd">Select Line Item</button> </a>
<!-- Model for Add servicepo -->
<div class="modal fade" id="SERVICE" role="dialog">
<div class="modal-dialog">
@ -1199,7 +1207,6 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
</div>
<!-- END of model for Add servicepo -->
<!-- Edit Service po moddel-->
<div class="modal fade" id="EDITSERVICE" role="dialog">
@ -1487,8 +1494,8 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
</div>
<!-- End of Model for EDIT servicepo -->
</table>
</div>
<div class="box-body">
@ -1515,8 +1522,8 @@ if (!empty($INRSYMBOL)) {
</table>
</div>
</table>
<div class="row" style="border: 1px solid">
<div class="row">
<div class="col-md-12" style="padding: 0px;">
<div class="col-md-2">
@ -1596,9 +1603,12 @@ if (!empty($INRSYMBOL)) {
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction">
<input type="hidden" name="txtDeliveryAddress" id="txtDeliveryAddress">
<input type="hidden" name="Budget" id="Budget" />
<div class="btn-container" style="text-align: right;">
<a class="btn btn-reset Save" ID="Cancel" onclick="Reset();">&nbsp;&nbsp;<span class="bold">Reset</span></a>
<a class="btn btn-success Save" ID="Save" onclick="Save(0)">&nbsp;&nbsp;<span class="bold">Save as Draft</span></a>
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
</div>
</div><br />
</div>
</div>

View File

@ -1,13 +1,22 @@
<style>
.table-bordered>thead>tr>th, .table-bordered>tbody>tr>th, .table-bordered>tfoot>tr>th, .table-bordered>thead>tr>td, .table-bordered>tbody>tr>td, .table-bordered>tfoot>tr>td {border: 1px solid #333;}
.table-bordered>thead>tr>th,
.table-bordered>tbody>tr>th,
.table-bordered>tfoot>tr>th,
.table-bordered>thead>tr>td,
.table-bordered>tbody>tr>td,
.table-bordered>tfoot>tr>td {
border: 1px solid #333;
}
</style>
<div class="content-wrapper">
<section class="content">
<div style="border:2px solid #333">
<center><b><h2>Service Purchase Order.</h2></b></center>
<div class="box">
<center><b>
<h2>Service Purchase Order.</h2>
</b></center>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@ -18,8 +27,7 @@
$options = array("0" => 'Requistion No');
//print_r( $options);
if(!empty($POType))
{
if (!empty($POType)) {
foreach ($SupplierName as $SID) :
@ -58,8 +66,7 @@
$options = array("0" => 'Supplier');
//print_r( $options);
if(!empty($POType))
{
if (!empty($POType)) {
foreach ($SupplierName as $SID) :
@ -115,7 +122,9 @@
<div class="modal-content" style="width:900px;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<center><h4>Add Item </h4></center>
<center>
<h4>Add Item </h4>
</center>
</div>
<div align="left">
@ -127,8 +136,7 @@
$options = array("0" => 'Req No');
//print_r( $options);
if(!empty($POType))
{
if (!empty($POType)) {
foreach ($SupplierName as $SID) :
@ -179,8 +187,7 @@
$options = array("0" => 'Item Code');
//print_r( $options);
if(!empty($POType))
{
if (!empty($POType)) {
foreach ($SupplierName as $SID) :

View File

@ -258,9 +258,9 @@
</div>
<div class="buttonContainer">
<a class="btn btn-cancel" data-dismiss="modal" value="Close">Close</a>
<a class="btn btn-primary" id="draftIGR" value="draftIGR">Draft IGR</a>
<a class="btn btn-primary" id="generateIGR" value="generateIGR">Generate IGR</a>
<a class="btn btn-primary" data-dismiss="modal" value="Close">Close</a>
</div>
</div>
@ -345,7 +345,7 @@
<div class="modal-footer">
<center>
<a class="btn btn-primary" onclick="modalSave()" id="modalsave">&nbsp;&nbsp;<span class="bold">Save</span>
<a class="btn btn-primary" data-dismiss="modal" value="Close">Close</a>
<a class="btn btn-cancel" data-dismiss="modal" value="Close">Close</a>
</center>
</div><!-- footer div closed -->
</div><!-- modal content div closed-->
@ -365,7 +365,7 @@
</div>
<div style="margin:20px;" id="HisStatement"></div>
<div style="text-align: right; margin:5px;">
<a class="btn btn-success" data-dismiss="modal" value="Close">Close</a>
<a class="btn btn-cancel" data-dismiss="modal" value="Close">Close</a>
</div>
<br />
</div>
@ -386,7 +386,7 @@
<div style="margin:20px;" id="CCStatement"></div>
<div style="text-align: right; margin:5px;">
<a class="btn btn-success" data-dismiss="modal" value="Close">Close</a>
<a class="btn btn-cancel" data-dismiss="modal" value="Close">Close</a>
</div>
<br />
</div>
@ -430,7 +430,7 @@
</tbody>
</table>
<div class="modal-footer">
<a class="btn btn-primary" data-dismiss="modal" value="close">Close</a>
<a class="btn btn-cancel" data-dismiss="modal" value="close">Close</a>
</div>
</div>
</form>
@ -468,7 +468,6 @@
<div class="col-md-12 text-right">
<div class="col-md-4 col-md-offset-8">
<a class="btn btn-success" onclick="fileupdate()">&nbsp;&nbsp;<span class="bold">Update</span>
<a class="btn btn-success" data-dismiss="modal" value="Close">Close</a>
</div>
</div>
@ -607,10 +606,10 @@
var dcd2 = (String(dcd.getDate()).padStart(2, '0') + '-' + (String(dcd.getMonth() + 1).padStart(2, '0')) + '-' + dcd.getFullYear());
$("#Invoice_Date").val(dcd2);
console.log(item.MaterialRcvdDate)
var Mat_rcv_date = (item.MaterialRcvdDate === null) ? ' ' : formatDateTime(new Date(item.MaterialRcvdDate));
$("#MaterialRcvdDate").val(GrossWeightDate);
var Mat_rcv_date = (item.MaterialRcvdDate == 'null') ? ' ' : formatDateTime(item.MaterialRcvdDate,1);
$("#MaterialRcvdDate").val(Mat_rcv_date);
console.log(item.MaterialRcvdDate)
var gross_rcv_date = (item.GrossWeightDate === null) ? ' ' : formatDateTime(new Date(item.GrossWeightDate));
var gross_rcv_date = (item.GrossWeightDate == 'null') ? ' ' : formatDateTime(item.GrossWeightDate,2);
$("#ser").val(item.ServiceDescription);
i = i + 1;
@ -869,7 +868,7 @@
function constructSentence(record) {
let str = record.field;
let fieldName = str.replace(/([a-z])([A-Z])/g, '$1 $2');
let sentence = record.FullName + ' on ' + formatDateTime(record.history_dated) + " " + fieldName + " ";
let sentence = record.FullName + ' on ' + formatDateTime(record.history_dated,2) + " " + fieldName + " ";
if (parseInt(record.is_add) === 1) {
sentence += record.new_data + " was added.";
} else if (parseInt(record.is_edit) === 1) {
@ -1113,6 +1112,7 @@ function deleteBill(Billno,i){
}
$("#WeightCalculator").on("shown.bs.modal", function(e) {
var inx = $(e.relatedTarget).data('index');
console.log(inx);
var material = $(e.relatedTarget).data('material');
var modal = $(this);
@ -1257,13 +1257,32 @@ function deleteBill(Billno,i){
</script>
<script>
function formatDateTime(dateString) {
// Check if the date string is null
if (dateString === null) {
function formatDateTime(dateString,flag) {
// Note 1 means DATE only
// 2 means DATE and Time
// Check if the date string is null or empty
if (!dateString || dateString == 'null' || dateString === '0000-00-00 00:00:00') {
return '';
} else {
// Create a new Date object from the date string
var date = new Date(dateString);
console.log("Received date string:", dateString);
// Split the date string into date and time components
var dateTimeParts = dateString.split(' ');
var dateParts = dateTimeParts[0].split('-');
var timeParts = dateTimeParts[1].split(':');
// Extract individual components
var year = parseInt(dateParts[0], 10);
var month = parseInt(dateParts[1], 10) - 1; // Months are zero-based in JavaScript
var day = parseInt(dateParts[2], 10);
var hours = parseInt(timeParts[0], 10);
var minutes = parseInt(timeParts[1], 10);
var seconds = parseInt(timeParts[2], 10);
// Create a new Date object
var date = new Date(year, month, day, hours, minutes, seconds);
// Extract date components
var day = date.getDate().toString().padStart(2, '0');
@ -1274,10 +1293,13 @@ function deleteBill(Billno,i){
var hours = date.getHours().toString().padStart(2, '0');
var minutes = date.getMinutes().toString().padStart(2, '0');
var seconds = date.getSeconds().toString().padStart(2, '0');
var formattedDate = '';
// Format the date and time in DD-MM-YYYY HH:MM:SS format
var formattedDate = `${day}-${month}-${year} ${hours}:${minutes}:${seconds}`;
if(flag == 1){
formattedDate = `${day}-${month}-${year}`;
}else if (flag == 2){
formattedDate = `${day}-${month}-${year} ${hours}:${minutes}:${seconds}`;
}
return formattedDate;
}
}