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',
// ]);
// if ($this->validator->run() == FALSE) {
// $this->addCostCenter();
// } else {
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();
$data = ['status' => false, 'message' => 'An error occurred while creating cost details'];
if ($id == 0) {
$lastccid = $this->costcenter_model->lastCCID();
$lastccid = (int)$lastccid++;
$newccc = generateCostCenterCode($lastccid);
log_message('debug', 'newccc returned: ' . $newccc);
$CostCode = $this->request->getPost('CostCode');
$CostCode = ($CostCode !== null && is_string($CostCode)) ? strtoupper(trim($CostCode)) :null;
$CostName = $this->request->getPost('CostName');
$CostName = ($CostName !== null && is_string($CostName)) ? strtoupper(trim($CostName)) :null;
$CreateBy = $this->session->get('userId');
$SelectedDepartment = $this->request->getPost('txtSelectedDepartment');
// $ApproverName = $this->request->getPost('ApprovedBy');
$ApproverName = $this->session->get('EmpID');
$comma_separated = explode(':', (string)$SelectedDepartment);
// $comma_separated = $this->costcenter_model->getDepartment();
// print_r($comma_separated);die;
$createddt = get_current_date_time();
$CodeExists = $this->costcenter_model->checkCostDetailsExists($CostCode);
if (count($CodeExists) == 0) {
$Cost = array('CostCenterCode' => $CostCode, 'CostCenterName' => $CostName, 'ApprovedBy' => $ApproverName, 'CreatedBy' => $CreateBy, 'createdDate' => $createddt);
$this->costcenter_model->saveCostCenter($Cost);
$Cost = ['CostCenterCode' => $newccc,
'CostCenterName' => $CostCenterName,
'ApprovedBy' => $approverId,
'CreatedBy' => $userId,
'CreatedDate' => $currentdt
];
if ($this->costcenter_model->saveCostCenter($Cost) > 0) {
$data = ['status' => true, 'message' => 'Successfully created cost details'];
}
for ($j = 0; $j < count($comma_separated); $j++) {
$DeptCode = $comma_separated[$j];
$this->costcenter_model->DeleteDepartment($DeptCode, $CostCode);
$Dept = array('CostCenterCode' => $CostCode, 'DEPCode' => $DeptCode, 'CreatedBy' => $CreateBy, 'createdDate' => $createddt);
$this->costcenter_model->addCostCenterDepartment($Dept);
}
$RowCount = $this->request->getPost('txtRowCount');
for ($i = 1; $i <= $RowCount; $i++) {
$BudgetType = $this->request->getPost('BudgetType' . $i);
$BudgetYear = $this->request->getPost('BudgetYear' . $i);
$BudgetAmount = $this->request->getPost('BudgetAmount' . $i);
$Remarks = $this->request->getPost('Remarks' . $i);
$this->costcenter_model->DeleteBudget($BudgetType, $BudgetYear, $CostCode);
$Budget = array('CostCenterCode' => $CostCode, 'BudgetType' => $BudgetType, 'BudgetYear' => $BudgetYear, 'BudgetAmount' => $BudgetAmount, 'Remarks' => $Remarks, 'CreatedBy' => $CreateBy, 'createdDate' => $createddt);
$this->costcenter_model->addBudget($Budget);
}
echo 'Successfully Created Cost details';
// }
}
/**
* This function is used load user edit information
* @param number $userId : Optional : This is user id
*/
function editCostCenter($CostCode = NULL)
{
if ($CostCode == '') {
$CostCenterID = $_GET['CostCode'];
} else {
$CostCenterID = $CostCode;
$Cost = ['CostCenterName' => $CostCenterName,'UpdatedBy' => $userId,'UpdatedDate' => $currentdt];
if ($this->costcenter_model->updateCostCenter($Cost, $id) > 0) {
$data = ['status' => true, 'message' => 'Successfully updated cost details'];
}
}
$data['CostMaster'] = $this->costcenter_model->GetCostCenterMaster($CostCenterID);
$data['CostDepts'] = $this->costcenter_model->GetCostCenterDepartment($CostCenterID);
$data['CostBudget'] = $this->costcenter_model->GetCostCenterBudget($CostCenterID);
$data['DeptList'] = $this->costcenter_model->GetDepartmentNotinCostCenter($CostCenterID);
$data['BudType'] = $this->costcenter_model->GetBudgetTypeNotinCostCenter($CostCenterID, 'C004');
$data['BudYear'] = $this->costcenter_model->GetBudgetYear($CostCenterID);
$data['FiscalYear'] = $this->costcenter_model->getFiscalYear();
//print_r(count($data['BudType']));
$this->global['pageTitle'] = 'Edit Cost';
$this->loadViews("editCostCenter", $this->global, $data, NULL);
return $this->response->setJSON($data);
}
/**
* delete the Cost
*/
function deleteCostCenter($CostCode = NULL)
{
@ -183,246 +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,25 +335,20 @@ class Inwardgateregister extends BaseController
#Step 2 Master File and Its Details Gathering
$MasterFile = $this->request->getFile('MasterFile');
$requestMasterFileName = $MasterFile->getName();
if (!empty($requestMasterFileName)) {
$requestMasterFileName = NULL;
if (!empty($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);
$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
$igr = array('PONO' => $PONO, 'VehicleNo' => $VehicleNo, 'DeliveryChellanOrInvoiceNo' => $DeliveryChellanOrInvoiceNo, 'DeliveryChellanDate' => $DeliveryChellanDate, 'MaterialRcvdDate' => $MaterialRcvdDt, 'DriverName' => $DriverName, 'DriverMobileNumber' => $DriverMobileNumber,'IGRStatus' => $IGRStatus, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt, 'PaymentStatus' => $paymentstatus);
@ -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,9 +696,9 @@ 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,
'Remarks' => $remarks,
@ -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,19 +1273,22 @@ function updateIGRWeight(){
$IGRItemNo = $this->request->getPost('IGRlineitem');
$igr_lineitem = array('GrossWeight' => $GrossWeight,'GrossWeightDate' => $GrossWeightDate,'TareWeightDate' => $TareWeightDate,'TareWeight' => $TareWeight,'NetWeight' => $NetWeight,'UpdateBY' => $updateby);
if (!empty($requestWeightFileName)) {
if ($WeightFile && $WeightFile->isValid() && !$WeightFile->hasMoved()) {
if (!empty($this->inwardgateregister_model->isFileExistsInIGRdetails($requestWeightFileName))) {
log_message('error', 'File already exists in the database'.$requestWeightFileName);
}
else{
$WeightFile->move($path, $requestWeightFileName);
$igr_lineitem['WeightFile'] = $requestWeightFileName;
$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))) {
log_message('error', 'File already exists in the database'.$requestWeightFileName);
}
else{
$WeightFile->move($path, $requestWeightFileName);
$igr_lineitem['WeightFile'] = $requestWeightFileName;
}
}
}
}
$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

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

View File

@ -16,7 +16,7 @@ class Costcenter_model extends Model
function CostListing()
{
$builder = $this->db->table('t_costcenter_master as Cost')
->select('Cost.CostCenterCode as code,Cost.CostCenterName as CostCenterName , Cost.ApprovedBy as ApprovedBy,Emp.FirstName as FirstName,Emp.Designation as Designation ,Cost.CreatedDate,Cost.IsActive,Cost.DeletedBy,Cost.DeletedBy')
->select('Cost.id as id, Cost.CostCenterCode as code,Cost.CostCenterName as CostCenterName , Cost.ApprovedBy as ApprovedBy,Emp.FirstName as FirstName,Emp.Designation as Designation ,Cost.CreatedDate,Cost.IsActive,Cost.DeletedBy,Cost.DeletedBy')
->join('t_employee_details as Emp', 'Emp.EmpID=Cost.ApprovedBy');
@ -30,21 +30,29 @@ class Costcenter_model extends Model
* This function used to get user information by id
* @param number $userId : This is user id
* @return array $result : This is user information
*/
function saveCostCenter($Cost)
{
*/
public function saveCostCenter($Cost) {
$this->db->transStart();
$builder = $this->db->table('t_costcenter_master');
$builder->insert($Cost);
$insert_id = $this->db->affectedRows();
$this->db->transComplete();
return $insert_id;
$builder->insert($Cost);
$aff_row = $this->db->affectedRows();
$this->db->transComplete();
return $aff_row;
}
public function updateCostCenter($Cost, $id) {
$this->db->table('t_costcenter_master')
->where('id', $id)
->update($Cost);
$aff_row = $this->db->affectedRows();
return $aff_row;
}
public function lastCCID(){
$query = $this->db->table('t_costcenter_master')->select('id')->orderBy('id', 'DESC')->limit(1)->get();
$lastCCID = $query->getRow()->id;
return $lastCCID;
}
function getFiscalYear()
{
$builder = $this->db->table('t_company_details')
@ -54,44 +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

File diff suppressed because it is too large Load Diff

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

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

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

View File

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

View File

@ -900,6 +900,10 @@ if (!empty($INRSYMBOL)) {
text-align: right;
}
.btn-container .btn {
margin-left: 10px;
}
.header-container {
display: flex;
justify-content: space-between;
@ -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,263 +1518,260 @@ if (!empty($INRSYMBOL)) {
</div>
</div><br />
<div class="col-md-12">
<div class="row">
<div class="col-md-12">
<div class="col-md-4">
<label>Discount Type </label>
<div>
<?php
$options = array("0" => 'Select Discount Type');
//print_r( $options);
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Discount Type </label>
<div>
<?php
$options = array("0" => 'Select Discount Type');
//print_r( $options);
if (!empty($TaxType)) {
foreach ($TaxType as $SID) :
if (!empty($TaxType)) {
foreach ($TaxType as $SID) :
$options[$SID->ConfigValue] = $SID->ConfigValue;
$options[$SID->ConfigValue] = $SID->ConfigValue;
endforeach;
}
endforeach;
}
echo form_dropdown('EditDiscountType', $options, set_value('EditDiscountType'), 'id="EditDiscountType"', 'class="form-control"');
?>
</div>
</div>
<div class="col-md-2">
<label>Discount Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditDiscount', 'value' => set_value('txtEditDiscount'), 'id' => 'txtEditDiscount', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateDiscount();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Discounted Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterDiscount', 'value' => set_value('txtEditAfterDiscount'), 'id' => 'txtEditAfterDiscount', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div id="SGSTModel">
<div class="col-md-2">
<label>SGST in %</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditVat', 'value' => set_value('txtEditVat'), 'id' => 'txtEditVat', 'class' => 'form-control num', 'onchange' => 'calculateVat();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterVat', 'value' => set_value('txtEditAfterVat'), 'id' => 'txtEditAfterVat', 'class' => 'form-control num', 'readonly' => 'true', 'onkeypress' => 'return isNumberKey(event);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div id="IGSTModel" style="display:none;">
<div class="col-md-2">
<label>IGST in %</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditOtherTax', 'value' => set_value('txtEditOtherTax'), 'id' => 'txtEditOtherTax', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateOtherTaxes(1);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterOtherTax', 'value' => set_value('txtEditAfterOtherTax'), 'id' => 'txtEditAfterOtherTax', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" style="text-align:left;">
<div class="col-md-4">
<label>Packaging Type </label>
<div>
<?php
$options = array("0" => 'Select Packaging Type');
//print_r( $options);
if (!empty($TaxType)) {
foreach ($TaxType as $SID) :
$options[$SID->ConfigValue] = $SID->ConfigValue;
endforeach;
}
echo form_dropdown('EditPackagingType', $options, set_value('EditPackagingType'), 'id="EditPackagingType"', 'class="form-control "');
?>
</div>
</div>
<div class="col-md-2">
<label>Packaging Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditPackaging', 'value' => set_value('txtEditPackaging'), 'id' => 'txtEditPackaging', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculatePackaging();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Packaging Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterPackaging', 'value' => set_value('txtEditAfterPackaging'), 'id' => 'txtEditAfterPackaging', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div id="CGSTArea">
<div class="col-md-2">
<label>CGST in %</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditGST', 'value' => set_value('txtEditGST'), 'id' => 'txtEditGST', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' calculateGST(1);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterGST', 'value' => set_value('txtEditAfterGST'), 'id' => 'txtEditAfterGST', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
echo form_dropdown('EditDiscountType', $options, set_value('EditDiscountType'), 'id="EditDiscountType"', 'class="form-control"');
?>
</div>
</div>
<div class="row">
<div class="col-md-12 ">
<div class="col-md-2">
<label>Freight Type </label>
<div>
<?php
$options = array("0" => 'Select Freight Type');
//print_r( $options);
if (!empty($FreightType)) {
foreach ($FreightType as $SID) :
$options[$SID->ConfigValue] = $SID->ConfigValue;
endforeach;
}
echo form_dropdown('drpEditFreight', $options, set_value('drpEditFreight'), 'id="drpEditFreight"', 'class="form-control "');
?>
</div>
</div>
<div class="col-md-2" id="EditTripsValue" style="display:none;">
<label>NO Of Trips</label>
<div class="form-group">
<?php
$data = array('name' => 'EditNOOfTrips', 'value' => set_value('EditNOOfTrips'), 'id' => 'EditNOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Freight Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditFreight', 'value' => set_value('txtEditFreight'), 'id' => 'txtEditFreight', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateFreight();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Freight Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterFreight', 'value' => set_value('txtEditAfterFreight'), 'id' => 'txtEditAfterFreight', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<label> Insurance Amt <?php echo "($INRSYM)" ?>(if Any)</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditInsurance', 'value' => set_value('txtEditInsurance'), 'id' => 'txtEditInsurance', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateEditTotalValue(1);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Discount Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditDiscount', 'value' => set_value('txtEditDiscount'), 'id' => 'txtEditDiscount', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateDiscount();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-4 col-md-offset-8">
<label>Total Order Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditTotalOrderValue', 'value' => set_value('txtEditTotalOrderValue'), 'id' => 'txtEditTotalOrderValue', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<label><?php echo "Revenue Description"; ?></label>
<div class="form-group">
<?php
$data = array('name' => 'Edit_Service_Description', 'value' => set_value('Edit_Service_Description'), 'id' => 'Edit_Service_Description', 'class' => 'form-control', 'rows' => '2', 'cols' => '100');
echo form_textarea($data);;
?>
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-12">
<div class="col-md-3 col-md-offset-9">
<a class="btn btn-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 class="col-md-2">
<label>Discounted Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterDiscount', 'value' => set_value('txtEditAfterDiscount'), 'id' => 'txtEditAfterDiscount', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<br /><br />
<!-- footer for revenue po -->
<div class="modal-footer">
<div class="col-md-12 ">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Freight Type </label>
<div>
<?php
$options = array("0" => 'Select Freight Type');
//print_r( $options);
if (!empty($FreightType)) {
foreach ($FreightType as $SID) :
$options[$SID->ConfigValue] = $SID->ConfigValue;
endforeach;
}
echo form_dropdown('drpEditFreight', $options, set_value('drpEditFreight'), 'id="drpEditFreight"', 'class="form-control "');
?>
</div>
</div>
<div class="col-md-2" id="EditTripsValue" style="display:none;">
<label>NO Of Trips</label>
<div class="form-group">
<?php
$data = array('name' => 'EditNOOfTrips', 'value' => set_value('EditNOOfTrips'), 'id' => 'EditNOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight();');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Freight Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditFreight', 'value' => set_value('txtEditFreight'), 'id' => 'txtEditFreight', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateFreight();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Freight Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterFreight', 'value' => set_value('txtEditAfterFreight'), 'id' => 'txtEditAfterFreight', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" style="text-align:left;">
<div class="col-md-4"></div>
<div class="col-md-4">
<label>Packaging Type </label>
<div>
<?php
$options = array("0" => 'Select Packaging Type');
//print_r( $options);
if (!empty($TaxType)) {
foreach ($TaxType as $SID) :
$options[$SID->ConfigValue] = $SID->ConfigValue;
endforeach;
}
echo form_dropdown('EditPackagingType', $options, set_value('EditPackagingType'), 'id="EditPackagingType"', 'class="form-control "');
?>
</div>
</div>
<div class="col-md-2">
<label>Packaging Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditPackaging', 'value' => set_value('txtEditPackaging'), 'id' => 'txtEditPackaging', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculatePackaging();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Packaging Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterPackaging', 'value' => set_value('txtEditAfterPackaging'), 'id' => 'txtEditAfterPackaging', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" id="CGSTArea">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>CGST in %</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditGST', 'value' => set_value('txtEditGST'), 'id' => 'txtEditGST', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' calculateGST(1);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterGST', 'value' => set_value('txtEditAfterGST'), 'id' => 'txtEditAfterGST', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" id="SGSTModel">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>SGST in %</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditVat', 'value' => set_value('txtEditVat'), 'id' => 'txtEditVat', 'class' => 'form-control num', 'onchange' => 'calculateVat();', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterVat', 'value' => set_value('txtEditAfterVat'), 'id' => 'txtEditAfterVat', 'class' => 'form-control num', 'readonly' => 'true', 'onkeypress' => 'return isNumberKey(event);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12" id="IGSTModel" style="display:none;">
<div class="col-md-8"></div>
<div class="col-md-2">
<label>IGST in %</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditOtherTax', 'value' => set_value('txtEditOtherTax'), 'id' => 'txtEditOtherTax', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateOtherTaxes(1);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditAfterOtherTax', 'value' => set_value('txtEditAfterOtherTax'), 'id' => 'txtEditAfterOtherTax', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-8"></div>
<div class="col-md-4">
<label> Insurance Amt <?php echo "($INRSYM)" ?>(if Any)</label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditInsurance', 'value' => set_value('txtEditInsurance'), 'id' => 'txtEditInsurance', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateEditTotalValue(1);', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-4 col-md-offset-8">
<label>Total Order Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditTotalOrderValue', 'value' => set_value('txtEditTotalOrderValue'), 'id' => 'txtEditTotalOrderValue', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<label><?php echo "Revenue Description"; ?></label>
<div class="form-group">
<?php
$data = array('name' => 'Edit_Service_Description', 'value' => set_value('Edit_Service_Description'), 'id' => 'Edit_Service_Description', 'class' => 'form-control', 'rows' => '2', 'cols' => '100');
echo form_textarea($data);;
?>
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-12">
<div class="col-md-3 col-md-offset-9">
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
<a class="btn btn-success EditRevenue" ID="EditRevenue">&nbsp;&nbsp;<span class="bold">Edit Revenue</span></a>
</div>
</div>
</div>
</div>
<br /><br />
<!-- footer for revenue po -->
<div class="modal-footer">
</div>
</form>
</div>
</div>
@ -1904,7 +1905,7 @@ if (!empty($INRSYMBOL)) {
</div>
<!-- /.box-body -->
<br>
<div class="row" style="border:1px solid;">
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Basic Amount <?php echo "($INRSYM)" ?> </label>
@ -2012,19 +2013,20 @@ if (!empty($INRSYMBOL)) {
<?php } ?>
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br>
</div>
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $RowCount; ?>" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<div class="btn-container" style="text-align: right;">
<input type="button" class="btn btn-cancel" value="Cancel" onClick="window.location ='amendmentpurchaseorder';">
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $RowCount; ?>" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<!-- <a class="btn btn-success Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> -->
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
<input type="button" class="btn btn-success" value="Cancel" onClick="window.location ='amendmentpurchaseorder';">
<!-- <input type="reset" class="btn btn-success" value = "OK"> -->
<!-- <a class="btn btn-success Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> -->
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
<!-- <input type="reset" class="btn btn-success" value = "OK"> -->
</div>
</div>
@ -2038,12 +2040,28 @@ if (!empty($INRSYMBOL)) {
</div>
<?php $Reqon = new DateTime($Reqon, new DateTimeZone('Asia/Kolkata'));
$Reqon = $Reqon->format('d-m-Y'); ?>
<label>Request On :</label><?php echo $Reqon; ?><br />
<label>Request On :</label><?php echo $Reqon; ?><br>
<?php if ($RequesterName != '' || $RequesterName != null) { ?>
<label>Request By : </label><?php echo $RequesterName; ?><br />
<label>Request By : </label><?php echo $RequesterName; ?>
<?php } ?><br />
<label>Status :</label><?php echo $POStatus; ?>
<label>Status : </label><?php
$statusMappings = [
'PO APPROVED' => 'AWAITING APPROVE',
'AWAITING RELEASE' => 'AWAITING APPROVE',
'RELEASER ONHOLD' => 'APPROVER ONHOLD',
'PO RELEASED' => 'PO APPROVED',
];
if (isset($POStatus) && !empty($POStatus)) {
if (isset($statusMappings[$POStatus])) {
echo $statusMappings[$POStatus];
} else {
echo $POStatus;
}
} else {
echo "Status not provided";
}
?>
</div>
</div>
</section>
@ -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({

File diff suppressed because it is too large Load Diff

View File

@ -58,7 +58,7 @@ if (!empty($POMaster)) {
$SupId = $Req->SupplierID;
$SupName = $Req->SupplierName;
$Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ;
$Address = $Req->MSME ? "MSME : " . $Req->MSME . "\n" . $Req->Address : $Req->Address;
$pdt = new DateTime($Req->PODate);
$PODate = $pdt->format('d-m-Y');
$DeliverOption = $Req->DeliveryOption;
@ -86,7 +86,6 @@ if (!empty($POMaster)) {
$DescriptionOfPo = $Req->Description_Of_Service;
$BudgetType = $Req->BudgetType;
$PrePOFile = $Req->POFile;
}
}
@ -253,11 +252,12 @@ foreach ($PaymentTerms as $TER) {
$.each(y, function(idx, obj) {
if (obj.SupplierID === id) {
if (obj.MSME) {
$("#SupAddress").val("MSME :" + obj.MSME + "\n" + obj.Address);
} else {
$("#SupAddress").val(obj.Address);
} $("#PaymentTerms").val(obj.PaymentID);
if (obj.MSME) {
$("#SupAddress").val("MSME :" + obj.MSME + "\n" + obj.Address);
} else {
$("#SupAddress").val(obj.Address);
}
$("#PaymentTerms").val(obj.PaymentID);
@ -405,13 +405,16 @@ foreach ($PaymentTerms as $TER) {
}
var d = $('#drpSupplier').val();
$.ajax({
url:"<?php echo base_url() ?>VerifyWithSupplierForPendingPO",
type: 'POST',
data: {supplierid : drpSupplier, materialcode: id },
success: function(response) {
if(response) alert(response);
}
});
url: "<?php echo base_url() ?>VerifyWithSupplierForPendingPO",
type: 'POST',
data: {
supplierid: drpSupplier,
materialcode: id
},
success: function(response) {
if (response) alert(response);
}
});
} else {
alert('Please select the MaterialCode');
return false;
@ -442,16 +445,19 @@ foreach ($PaymentTerms as $TER) {
}
});
}
var d = $('#drpSupplier').val();
$.ajax({
url:"<?php echo base_url() ?>VerifyWithSupplierForPendingPO",
type: 'POST',
data: {supplierid : d, materialcode: id },
success: function(response) {
if(response) alert(response);
}
});
url: "<?php echo base_url() ?>VerifyWithSupplierForPendingPO",
type: 'POST',
data: {
supplierid: d,
materialcode: id
},
success: function(response) {
if (response) alert(response);
}
});
} else {
alert('Please select the MaterialCode');
return false;
@ -644,6 +650,7 @@ foreach ($PaymentTerms as $TER) {
.num {
text-align: right;
}
.header-container {
display: flex;
justify-content: space-between;
@ -656,325 +663,331 @@ foreach ($PaymentTerms as $TER) {
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;}
.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">
<?php
$attributes = array('class' => 'form-label-left ServicePO ', 'name' => 'ServicePO', 'id' => 'ServicePO','enctype' => 'multipart/form-data');
$attributes = array('class' => 'form-label-left ServicePO ', 'name' => 'ServicePO', 'id' => 'ServicePO', 'enctype' => 'multipart/form-data');
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 } ?>
<h2> Amended Service Purchase Order-<?php echo "$PONO" ?></h2>
<a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-cancel" id="back" value="Back">Back</a>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Requistion No</label>
<div class="col-md-3">
<label>Requistion No</label>
<?php
$options = array("0" => 'Selected Requisition Numbers');
if (!empty($ReqList)) {
foreach ($ReqList as $SID) :
$options[$SID->ReqNo] = $SID->ReqNo;
endforeach;
}
echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"');
?>
</div>
<div class="col-md-3">
<label>Purchase Order Type</label>
<div class="form-group">
<?php
$options = array("0" => 'Selected Requisition Numbers');
if (!empty($ReqList)) {
foreach ($ReqList as $SID) :
$options[$SID->ReqNo] = $SID->ReqNo;
$data = array('name' => 'POType', 'value' => set_value('POType', SERVICE), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Select Supplier<span class="badge mandatory">*</span></label>
<?php
$options = array("0" => 'Select Supplier');
//print_r( $options);
if (!empty($Suplist)) {
foreach ($Suplist as $SID) :
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName;
endforeach;
}
echo form_dropdown('drpSupplier', $options, set_value('drpSupplier', $SupId), 'id="drpSupplier"', 'required="true"', 'class="form-control select2');
?>
</div>
<div class="col-md-3">
<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');
echo Form_textarea($data);
?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Work Status<span class="badge mandatory">*</span></label>
<?php
if (!empty($WorkStatus)) {
//print_r($WorkStatus);
foreach ($WorkStatus as $WorkSID) :
if ($WrkStatus == $WorkSID->StatusCode) {
$optionsWork[$WorkSID->StatusCode] = $WorkSID->StatusName;
}
endforeach;
foreach ($WorkStatus as $SID) :
if ($WrkStatus != $SID->StatusName) {
$optionsWork[$SID->StatusCode] = $SID->StatusName;
}
endforeach;
}
echo form_dropdown('workstatus', $optionsWork, set_value('workstatus'), 'id="workstatus"', 'required="true"', 'class="form-control select2');
?>
</div>
<div class="col-md-3">
<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">
<label>Delivery Date<span class="badge mandatory">*</span></label>
<?php if ($DeliverOption == 1) {
$Deliverydt = null;
} ?>
<input type="hidden" name="beforeDeliverydt" value="<?php echo $Deliverydt ?>">
<div class="form-group">
<?php
$data = array('name' => 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3" id="Schedulediv" style="display:none;">
<label>Schedule By<span class="badge mandatory">*</span></label>
<input type="hidden" name="beforeScheduleby" value="<?php echo $DeliverSchedule ?>">
<?php
$data = array('name' => 'Scheduleby', 'value' => set_value('Scheduleby', $DeliverSchedule), 'id' => 'Scheduleby', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110');
echo Form_textarea($data);
?>
</div>
<div class="col-md-3">
<label>Delivery Address</label>
<div class="form-group">
<?php
$data = array('name' => 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40');
echo Form_textarea($data);
?><input type="hidden" name="txtDeliveryAddress" id="txtDeliveryAddress" value="<?php echo $DeliveryAddress; ?>">
</div>
</div>
</div>
</div>
<div class="row">
<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', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Mode Of Shipment</label>
<div class="form-group">
<?php
$data = array('name' => 'addmodeofshipment', 'value' => set_value('addmodeofshipment', $ModeOfShipment), 'id' => 'addmodeofshipment', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Contact Reference</label>
<div class="form-group">
<?php
$data = array('name' => 'amendsupplierreference', 'value' => set_value('amendsupplierreference', $SupplierReference), 'id' => 'amendsupplierreference', 'class' => 'form-control', 'maxlength' => '40');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Supplier's Offer No</label>
<div class="form-group">
<?php
$data = array('name' => 'amendsupplierofferno', 'value' => set_value('amendsupplierofferno', $SuppliersOfferNo), 'id' => 'amendsupplierofferno', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Our Reference(S)</label>
<div class="form-group">
<?php
$data = array('name' => 'amendotherreference', 'value' => set_value('amendotherreference', $OtherReferences), 'id' => 'amendotherreference', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Service Type Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
if (!empty($PoTypeOptions)) {
foreach ($PoTypeOptions as $POpt) :
if ($ServiceTypeOptions == $POpt->ConfigValue) {
$optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue;
}
endforeach;
foreach ($PoTypeOptions as $POpt1) :
if ($ServiceTypeOptions != $POpt1->ConfigValue) {
$optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue;
}
endforeach;
}
echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"');
echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions"', 'required="true"', 'class="form-control select2');
?>
</div>
<div class="col-md-3">
<label>Purchase Order Type</label>
<div class="form-group">
<?php
$data = array('name' => 'POType', 'value' => set_value('POType', SERVICE), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Supplier<span class="badge mandatory">*</span></label>
<?php
$options = array("0" => 'Select Supplier');
//print_r( $options);
</div>
<div class="col-md-3">
<label>Payment Terms<span class="badge mandatory">*</span></label>
<input type="hidden" name="beforePaymentTerms" value="<?php echo $Terms ?>">
<?php
if (!empty($Payment)) {
//print_r($Payment);
foreach ($Payment as $pay2)
if (!empty($Suplist)) {
foreach ($Suplist as $SID) :
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ;
endforeach;
if ($Terms == $pay2->PaymentID) {
?>
<input type="hidden" id="beforePaymentTermsText" name="beforePaymentTermsText" value="<?php echo $pay2->PaymentTerms ?>">
<?php
$optionsPay[$pay2->PaymentID] = $pay2->PaymentTerms;
}
echo form_dropdown('drpSupplier', $options, set_value('drpSupplier', $SupId), 'id="drpSupplier"', 'required="true"', 'class="form-control select2');
foreach ($Payment as $pay1) :
?>
if ($Terms != $pay1->PaymentID) {
</div>
<div class="col-md-3">
<label>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');
echo Form_textarea($data);
?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Work Status<span class="badge mandatory" >*</span></label>
<?php
if (!empty($WorkStatus)) {
//print_r($WorkStatus);
foreach ($WorkStatus as $WorkSID) :
if ($WrkStatus == $WorkSID->StatusCode) {
$optionsWork[$WorkSID->StatusCode] = $WorkSID->StatusName;
}
endforeach;
foreach ($WorkStatus as $SID) :
if ($WrkStatus != $SID->StatusName) {
$optionsWork[$SID->StatusCode] = $SID->StatusName;
}
endforeach;
$optionsPay[$pay1->PaymentID] = $pay1->PaymentTerms;
}
echo form_dropdown('workstatus', $optionsWork, set_value('workstatus'), 'id="workstatus"', 'required="true"', 'class="form-control select2');
?>
</div>
<div class="col-md-3">
<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')); ?>
endforeach;
}
</div>
</div>
<div class="col-md-3" id="Deliverydtdiv">
<label>Delivery Date<span class="badge mandatory" >*</span></label>
<?php if ($DeliverOption == 1) {
$Deliverydt = null;
} ?>
<input type="hidden" name="beforeDeliverydt" value="<?php echo $Deliverydt ?>">
<div class="form-group">
<?php
$data = array('name' => 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3" id="Schedulediv" style="display:none;">
<label>Schedule By<span class="badge mandatory" >*</span></label>
<input type="hidden" name="beforeScheduleby" value="<?php echo $DeliverSchedule ?>">
<?php
$data = array('name' => 'Scheduleby', 'value' => set_value('Scheduleby', $DeliverSchedule), 'id' => 'Scheduleby', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110');
echo Form_textarea($data);
?>
</div>
<div class="col-md-3">
<label>Delivery Address</label>
<div class="form-group">
<?php
$data = array('name' => 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40');
echo Form_textarea($data);
?><input type="hidden" name="txtDeliveryAddress" id="txtDeliveryAddress" value="<?php echo $DeliveryAddress; ?>">
</div>
</div>
</div>
</div>
<div class="row">
<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', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Mode Of Shipment</label>
<div class="form-group">
<?php
$data = array('name' => 'addmodeofshipment', 'value' => set_value('addmodeofshipment', $ModeOfShipment), 'id' => 'addmodeofshipment', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Contact Reference</label>
<div class="form-group">
<?php
$data = array('name' => 'amendsupplierreference', 'value' => set_value('amendsupplierreference', $SupplierReference), 'id' => 'amendsupplierreference', 'class' => 'form-control', 'maxlength' => '40');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Supplier's Offer No</label>
<div class="form-group">
<?php
$data = array('name' => 'amendsupplierofferno', 'value' => set_value('amendsupplierofferno', $SuppliersOfferNo), 'id' => 'amendsupplierofferno', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Our Reference(S)</label>
<div class="form-group">
<?php
$data = array('name' => 'amendotherreference', 'value' => set_value('amendotherreference', $OtherReferences), 'id' => 'amendotherreference', 'class' => 'form-control');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Service Type Options</label>
<div class="form-group">
<?php
if (!empty($PoTypeOptions)) {
foreach ($PoTypeOptions as $POpt) :
if ($ServiceTypeOptions == $POpt->ConfigValue) {
$optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue;
}
endforeach;
foreach ($PoTypeOptions as $POpt1) :
if ($ServiceTypeOptions != $POpt1->ConfigValue) {
$optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue;
}
endforeach;
}
echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions"', 'required="true"', 'class="form-control select2');
?>
</div>
</div>
<div class="col-md-3">
<label>Payment Terms</label>
<input type="hidden" name="beforePaymentTerms" value="<?php echo $Terms ?>">
<?php
if (!empty($Payment)) {
//print_r($Payment);
foreach ($Payment as $pay2)
if ($Terms == $pay2->PaymentID) {
?>
<input type="hidden" id="beforePaymentTermsText" name="beforePaymentTermsText" value="<?php echo $pay2->PaymentTerms ?>">
<?php
$optionsPay[$pay2->PaymentID] = $pay2->PaymentTerms;
}
foreach ($Payment as $pay1) :
if ($Terms != $pay1->PaymentID) {
$optionsPay[$pay1->PaymentID] = $pay1->PaymentTerms;
}
endforeach;
}
echo form_dropdown('PaymentTerms', $optionsPay, set_value('PaymentTerms'), 'id="PaymentTerms"', 'required="true"', 'class="form-control select2');
?>
echo form_dropdown('PaymentTerms', $optionsPay, set_value('PaymentTerms'), 'id="PaymentTerms"', 'required="true"', 'class="form-control select2');
?>
</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>
<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</label>
<div class="form-group">
<label>Insurance Options<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
<?php
if (!empty($insuranceStatus)) {
foreach ($insuranceStatus as $INS) :
if ($InsuranceOptions == $INS['value']) {
$optionsInsurance[$INS['value']] = $INS['name'];
}
if (!empty($insuranceStatus)) {
foreach ($insuranceStatus as $INS) :
if ($InsuranceOptions == $INS['value']) {
$optionsInsurance[$INS['value']] = $INS['name'];
}
endforeach;
foreach ($insuranceStatus as $INS1) :
if ($InsuranceOptions != $INS1['value']) {
$optionsInsurance[$INS1['value']] = $INS1['name'];
}
endforeach;
foreach ($insuranceStatus as $INS1) :
if ($InsuranceOptions != $INS1['value']) {
$optionsInsurance[$INS1['value']] = $INS1['name'];
}
endforeach;
}
endforeach;
}
echo form_dropdown('insuranceStatus', $optionsInsurance, set_value('insuranceStatus'), 'id="insuranceStatus"', 'required="true"', 'class="form-control select2');
echo form_dropdown('insuranceStatus', $optionsInsurance, set_value('insuranceStatus'), 'id="insuranceStatus"', 'required="true"', 'class="form-control select2');
?>
</div>
?>
</div>
</div>
<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', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<label>Insurance No / Insurance Details<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label for="BudgetType">Budget Type</label>
<select id='BudgetType' name='BudgetType'>
<?php if ($BudgetType == 'CAPITAL') {
$opt1 = 'CAPITAL';
$opt2 = 'REVENUE';
} else {
$opt1 = 'REVENUE';
$opt2 = 'CAPITAL';
} ?>
<option value=<?php echo $opt1; ?>><?php echo $opt1; ?></option>
<option value=<?php echo $opt2; ?>><?php echo $opt2; ?></option>
</select>
<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';
} else {
$opt1 = 'REVENUE';
$opt2 = 'CAPITAL';
} ?>
<option value=<?php echo $opt1; ?>><?php echo $opt1; ?></option>
<option value=<?php echo $opt2; ?>><?php echo $opt2; ?></option>
</select>
</div>
</div>
</div>
@ -1000,7 +1013,7 @@ foreach ($PaymentTerms as $TER) {
<div class="col-md-12">
<div class="col-md-3">
<label>Req No<span class="badge mandatory" >*</span></label>
<label>Req No<span class="badge mandatory">*</span></label>
<div>
<?php
@ -1042,7 +1055,7 @@ foreach ($PaymentTerms as $TER) {
</div>
<div class="col-md-12">
<div class="col-md-3">
<label>Item Code<span class="badge mandatory" >*</span></label>*</span></label>
<label>Item Code<span class="badge mandatory">*</span></label>*</span></label>
<div>
<?php
$options = array("0" => 'Item Code');
@ -1106,7 +1119,7 @@ foreach ($PaymentTerms as $TER) {
<div class="col-md-12">
<div class="col-md-3">
<label>Quantity<span class="badge mandatory" >*</span></label>*</span></label>
<label>Quantity<span class="badge mandatory">*</span></label>*</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()');
@ -1115,7 +1128,7 @@ foreach ($PaymentTerms as $TER) {
</div>
</div>
<div class="col-md-3">
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge mandatory" >*</span></label>*</span></label>
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge mandatory">*</span></label>*</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()');
@ -1253,15 +1266,15 @@ foreach ($PaymentTerms as $TER) {
</div>
<div class="col-md-12" style="padding: 0px 30px 10px 30px;">
<label>Service Description </label> <?php $data = array('name' => 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction', $ServiceMaterialDescription), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
echo form_textarea($data);
?> <input type="hidden" name="beforeEdittxtSpcialInstruction" id="beforeSpcialInstruction" value="<?php echo $ServiceMaterialDescription; ?>">
echo form_textarea($data);
?> <input type="hidden" name="beforeEdittxtSpcialInstruction" id="beforeSpcialInstruction" value="<?php echo $ServiceMaterialDescription; ?>">
</div>
<br />
<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">
@ -1487,7 +1500,7 @@ foreach ($PaymentTerms as $TER) {
</div>
<!--start new fields 1 sep-->
<div class="col-md-12">
<label>Description Of Service<span class="badge mandatory" >*</span></label>*</label>
<label>Description Of Service<span class="badge mandatory">*</span></label>*</label>
<div class="form-group">
<?php
$data = array('name' => 'amenddescofpo', 'value' => set_value('amenddescofpo', $DescriptionOfPo), 'id' => 'amenddescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
@ -1508,20 +1521,20 @@ foreach ($PaymentTerms as $TER) {
<div class="col-md-12">
<div class="row"><br />
<div align="right" style="padding-right:10px">
<div>
<input type="file" name="POFile" id="POFile">
<?php if($PrePOFile){ ?>
<label><a title="previously uploaded PO File" href="<?php echo base_url().'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
<?php } ?>
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>"/><br>
</div>
<div>
<input type="file" name="POFile" id="POFile">
<?php if ($PrePOFile) { ?>
<label><a title="previously uploaded PO File" href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
<?php } ?>
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br>
</div>
<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 />
@ -1535,13 +1548,13 @@ foreach ($PaymentTerms as $TER) {
<label>Request On :</label><?php echo $Reqon; ?><br />
<label>Request By :</label><?php echo $RequesterName; ?><br />
<label>Status : </label><?php
$statusMappings = [
$statusMappings = [
'PO APPROVED' => 'AWAITING APPROVE',
'AWAITING RELEASE' => 'AWAITING APPROVE',
'RELEASER ONHOLD' => 'APPROVER ONHOLD',
'PO RELEASED' => 'PO APPROVED',
];
if (isset($StatusName) && !empty($StatusName)) {
if (isset($statusMappings[$StatusName])) {
echo $statusMappings[$StatusName];
@ -1551,7 +1564,7 @@ foreach ($PaymentTerms as $TER) {
} else {
echo "Status not provided";
}
?>
?>
</div>
</div>
@ -2068,7 +2081,7 @@ foreach ($PaymentTerms as $TER) {
else if (ExceedBudget($('#txtEditBasicValue').val(), $('#EditAvlBudAmt').val()) == false) {
$('#EditRate').focus();
return false;
} else {
} else {
return true;
}

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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;
}
.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;}
.btn-container .btn {
margin-left: 10px;
}
.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">
<?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>
@ -1815,31 +1829,31 @@ if (!empty($INRSYMBOL)) {
<div id="div1" style="display:block;">
<b><u>Select Tax Range</u></b><br />
<div class="centered">
<?php
echo form_label('Local', 'Local') . "&nbsp;" . form_radio(array(
"name" => "Range",
"id" => "Local",
"value" => "0",
'checked' => 'checked',
'onchange' => 'SetVatorCST();'
));
?> &nbsp;&nbsp;&nbsp;&nbsp;
<?php
echo form_label('Inter state', 'Inter_state') . "&nbsp;" . form_radio(array(
"name" => "Range",
"id" => "Inter_state",
"value" => "1",
'onchange' => 'SetVatorCST();'
));
?>
</div>
<?php
echo form_label('Local', 'Local') . "&nbsp;" . form_radio(array(
"name" => "Range",
"id" => "Local",
"value" => "0",
'checked' => 'checked',
'onchange' => 'SetVatorCST();'
));
?> &nbsp;&nbsp;&nbsp;&nbsp;
<?php
echo form_label('Inter state', 'Inter_state') . "&nbsp;" . form_radio(array(
"name" => "Range",
"id" => "Inter_state",
"value" => "1",
'onchange' => 'SetVatorCST();'
));
?>
</div>
</div>
</div>
<div class="col-md-3">
<b><u>Select Delivery By<span class="badge mandatory" >*</span></u></b><br />
<b><u>Select Delivery By<span class="badge mandatory">*</span></u></b><br />
<div class="centered">
<?php echo form_label('Date', 'Date') . "&nbsp;" . form_radio(array("name" => "DateRange", "id" => "Date", "value" => "0", "checked" => "checked")); ?>&nbsp;&nbsp;&nbsp;&nbsp;
<?php echo form_label('Schedule', 'Schedule') . "&nbsp;" . form_radio(array("name" => "DateRange", "id" => "Schedule", "value" => "1")); ?>
<?php echo form_label('Date', 'Date') . "&nbsp;" . form_radio(array("name" => "DateRange", "id" => "Date", "value" => "0", "checked" => "checked")); ?>&nbsp;&nbsp;&nbsp;&nbsp;
<?php echo form_label('Schedule', 'Schedule') . "&nbsp;" . form_radio(array("name" => "DateRange", "id" => "Schedule", "value" => "1")); ?>
</div>
</div>
<div class="col-md-3" id="Deliverydtdiv">
@ -1852,7 +1866,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3" id="Schedulediv" style="display:none;">
<label>Schedule By<span class="badge mandatory" >*</span></label>
<label>Schedule By<span class="badge mandatory">*</span></label>
<?php
$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);
@ -1962,7 +1976,7 @@ if (!empty($INRSYMBOL)) {
?>
</div>
<div class="col-md-3" id="otheroptiondiv" style="display:none;">
<label>Description of Payable Terms<span class="badge mandatory" >*</span></label>
<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');
@ -1984,7 +1998,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="col-md-3" id="InsuranceNumberdiv" style="display:block;">
<label>Insurance No / Insurance Details<span class="badge mandatory" >*</span></label>
<label>Insurance No / Insurance Details<span class="badge mandatory">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'InsuranceNumber', 'InsuranceNumber' => set_value('InsuranceNumber'), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
@ -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,19 +2184,8 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="container-fluid">
<div align="right">
<div class="col-md-12">
<div class="col-md-3 col-md-offset-7" align="right" style="padding:10px">
<!-- <input type="checkbox" id="IsOpenOrder" name="IsOpenOrder" value="1"> IS THIS OPEN ORDER FORMAT -->
</div>
<div class="col-md-1" align="right" style="padding:10px">
<a data-toggle="modal"><button type="submit" onclick="openModal();" class="btn btn-success" id="abcd">Select Line Item</button> </a>
</div>
<br>
</div>
<!-- Model for revenue po -->
<div id="REVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="overflow-y:scroll !important">
<div class="modal-dialog">
@ -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,47 +2966,46 @@ if (!empty($INRSYMBOL)) {
</div>
</form>
</div>
</div>
</br>
<div class="box-body">
<table id="revenueTax" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>SNo</th>
<th>Requisition No</th>
<th>Item Code</th>
<th>Item Description</th>
<th>Quantity</th>
<th>UOM</th>
<th>Rate <?php echo "($INRSYM)" ?></th>
<th>Basic Amount <?php echo "($INRSYM)" ?></th>
<th>Tax Amount <?php echo "($INRSYM)" ?></th>
<th>Total Order Amount <?php echo "($INRSYM)" ?></th>
<th>Action</th>
</tr>
</thead>
</br>
<tbody id='RevenueAppend'></tbody>
</table>
</div>
<!-- /.box-body -->
<!-- Table box-body -->
<div class="box-body">
<div class="row">
<table id="revenueTax" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>SNo</th>
<th>Requisition No</th>
<th>Item Code</th>
<th>Item Description</th>
<th>Quantity</th>
<th>UOM</th>
<th>Rate <?php echo "($INRSYM)" ?></th>
<th>Basic Amount <?php echo "($INRSYM)" ?></th>
<th>Tax Amount <?php echo "($INRSYM)" ?></th>
<th>Total Order Amount <?php echo "($INRSYM)" ?></th>
<th>Action</th>
</tr>
</thead>
<tbody id='RevenueAppend'></tbody>
</table>
</div>
</div>
</br>
<!-- /.box-body -->
</div>
<div class="row" style="border:1px solid;">
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<label>Basic Amount <?php echo "($INRSYM)" ?></label>
<?php
$data = array('name' => 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount'), 'id' => 'txtTotBasicAmount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
<div class="col-md-3">
<label>Total Discount Amount <?php echo "($INRSYM)" ?> </label>
@ -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,7 +3090,8 @@ if (!empty($INRSYMBOL)) {
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value="">
</div>
</div>
<div class="row" style="padding: 2% 0%">
</div>
<div class="row" style="padding: 2% 0%">
<div class="col-md-4 col-md-offset-8"><br />
<input type="file" name="POFile" id="POFile"><br>
<input type="hidden" name="txtPoRange" id="txtPoRange" />
@ -3085,13 +3100,14 @@ if (!empty($INRSYMBOL)) {
<input type="hidden" name="txtRowCount" id="txtRowCount" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="Budget" id="Budget" />
<a class="btn btn-reset Save" ID="Cancel" onclick="Reset();">&nbsp;&nbsp;<span class="bold">Reset</span></a>
<a class="btn btn-success Save" ID="Save" onclick="Save(0)">&nbsp;&nbsp;<span class="bold">Save as Draft</span></a>
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
<div class="btn-container" style="text-align: right;">
<a class="btn btn-reset Save" ID="Cancel" onclick="Reset();">&nbsp;&nbsp;<span class="bold">Reset</span></a>
<a class="btn btn-success Save" ID="Save" onclick="Save(0)">&nbsp;&nbsp;<span class="bold">Save as Draft</span></a>
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
</div>
</div><br />
</div>
</div>
</div>
</div>
</section>

File diff suppressed because it is too large Load Diff

View File

@ -1,437 +1,444 @@
<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;}
</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;
}
</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="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="col-md-4">
<label>Requistion No</label>
<div class="form-control">
<?php
$options = array("0"=>'Requistion No');
//print_r( $options);
if(!empty($POType))
{
foreach ($SupplierName as $SID):
$options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
endforeach;
}
echo form_dropdown('MaterialCode', $options,set_value('MaterialCode'),'id="MaterialCode"' ,'class="form-control required"','required="true"');
?>
</div>
</div>
<div class="col-md-4">
<label>PO Date</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<label>Purchase Order Type</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<label>Supplier</label>
<div class="form-control">
<?php
$options = array("0"=>'Supplier');
//print_r( $options);
if(!empty($POType))
{
foreach ($SupplierName as $SID):
$options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
<section class="content">
endforeach;
}
echo form_dropdown('MaterialCode', $options,set_value('MaterialCode'),'id="MaterialCode"' ,'class="form-control required"','required="true"');
<div class="box">
<center><b>
<h2>Service Purchase Order.</h2>
</b></center>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="col-md-4">
<label>Requistion No</label>
<div class="form-control">
<?php
$options = array("0" => 'Requistion No');
//print_r( $options);
?>
</div>
</div>
<div class="col-md-4">
<label>Address</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<label>City</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<table class="table table-bordered" style="border:1px solid #333">
<div align="right" style="padding-right:10px">
<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">
<a data-toggle="modal" data-target="#myModal1"><button type="button" class="btn btn-success" data-dismiss="modal" >Add Line Item</button> </a>
if (!empty($POType)) {
foreach ($SupplierName as $SID) :
$options[$SID->SupplierID] = $SID->SupplierID . ' ' . ' - ' . ' ' . $SID->SupplierName;
endforeach;
}
echo form_dropdown('MaterialCode', $options, set_value('MaterialCode'), 'id="MaterialCode"', 'class="form-control required"', 'required="true"');
?>
</div>
</div>
<div class="modal fade" id="myModal1" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<form>
<div class="modal-content" style="width:900px;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<center><h4>Add Item </h4></center>
<div class="col-md-4">
<label>PO Date</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<label>Purchase Order Type</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<label>Supplier</label>
<div class="form-control">
<?php
$options = array("0" => 'Supplier');
//print_r( $options);
if (!empty($POType)) {
foreach ($SupplierName as $SID) :
$options[$SID->SupplierID] = $SID->SupplierID . ' ' . ' - ' . ' ' . $SID->SupplierName;
endforeach;
}
echo form_dropdown('MaterialCode', $options, set_value('MaterialCode'), 'id="MaterialCode"', 'class="form-control required"', 'required="true"');
?>
</div>
</div>
<div class="col-md-4">
<label>Address</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<label>City</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
<div align="left">
<div class="col-md-12">
<div class="col-md-3">
<label>Req No</label>
<div class="form-control">
<?php
$options = array("0"=>'Req No');
//print_r( $options);
if(!empty($POType))
{
foreach ($SupplierName as $SID):
$options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
endforeach;
}
echo form_dropdown('MaterialCode', $options,set_value('MaterialCode'),'id="MaterialCode"' ,'class="form-control required"','required="true"');
?>
</div>
<div class="container-fluid">
<table class="table table-bordered" style="border:1px solid #333">
<div align="right" style="padding-right:10px">
<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-3">
<label>Department Name</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Cost Center Name</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Available Budget Amount</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-2">
<label>Item Code</label>
<div class="form-control">
<?php
$options = array("0"=>'Item Code');
//print_r( $options);
if(!empty($POType))
{
foreach ($SupplierName as $SID):
$options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
<div class="col-md-1" align="right">
<a data-toggle="modal" data-target="#myModal1"><button type="button" class="btn btn-success" data-dismiss="modal">Add Line Item</button> </a>
</div>
</div>
endforeach;
}
echo form_dropdown('MaterialCode', $options,set_value('MaterialCode'),'id="MaterialCode"' ,'class="form-control required"','required="true"');
<div class="modal fade" id="myModal1" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<form>
<div class="modal-content" style="width:900px;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<center>
<h4>Add Item </h4>
</center>
</div>
<div align="left">
?>
</div>
</div>
<div class="col-md-2">
<label>Item Name</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>UOM</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Quantity</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Rate Per unit</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Total Amount</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-12">
<div class="col-md-4">
Service Tax @12% :
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'placeholder' => 'After Service Tax','required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-4">
Edu. cess @2% on service Tax
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'placeholder' => 'After Edu.','required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-4">
Sec. & Higher Edu. cess @1 % on service Tax
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'placeholder' => 'After High Edu.','required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-4">
Other Taxes
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'placeholder' => 'After Other Taxes','required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-6 col-md-offset-6">
<label>Total Order value</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'placeholder' => 'Total value','required' => 'true');
echo form_input($data);
?>
<div class="col-md-12">
<div class="col-md-3">
<label>Req No</label>
<div class="form-control">
<?php
$options = array("0" => 'Req No');
//print_r( $options);
if (!empty($POType)) {
foreach ($SupplierName as $SID) :
$options[$SID->SupplierID] = $SID->SupplierID . ' ' . ' - ' . ' ' . $SID->SupplierName;
endforeach;
}
echo form_dropdown('MaterialCode', $options, set_value('MaterialCode'), 'id="MaterialCode"', 'class="form-control required"', 'required="true"');
?>
</div>
</div>
<div class="col-md-3">
<label>Department Name</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Cost Center Name</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Available Budget Amount</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-2">
<label>Item Code</label>
<div class="form-control">
<?php
$options = array("0" => 'Item Code');
//print_r( $options);
if (!empty($POType)) {
foreach ($SupplierName as $SID) :
$options[$SID->SupplierID] = $SID->SupplierID . ' ' . ' - ' . ' ' . $SID->SupplierName;
endforeach;
}
echo form_dropdown('MaterialCode', $options, set_value('MaterialCode'), 'id="MaterialCode"', 'class="form-control required"', 'required="true"');
?>
</div>
</div>
<div class="col-md-2">
<label>Item Name</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>UOM</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Quantity</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Rate Per unit</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Total Amount</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-12">
<div class="col-md-4">
Service Tax @12% :
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'placeholder' => 'After Service Tax', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-4">
Edu. cess @2% on service Tax
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'placeholder' => 'After Edu.', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-4">
Sec. & Higher Edu. cess @1 % on service Tax
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'placeholder' => 'After High Edu.', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-4">
Other Taxes
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'placeholder' => 'After Other Taxes', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-6 col-md-offset-6">
<label>Total Order value</label>
<div class="form-group">
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'placeholder' => 'Total value', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" value="submit">Add</button>
<button type="button" class="btn btn-default" value="submit" data-dismiss="modal">Cancel</button>
<button type="reset" class="btn btn-default" value="reset">Reset</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" value="submit">Add</button>
<button type="button" class="btn btn-default" value="submit" data-dismiss="modal">Cancel</button>
<button type="reset" class="btn btn-default" value="reset">Reset</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<br/>
<!-- <thead style="background-color:#fff"> -->
<thead>
<tr>
<th><input type="checkbox" name="name1" />&nbsp;</th>
<th>R No</th>
<th>Item Name</th>
<th>Quantity</th>
<th>UOM</th>
<th>Rate</th>
<th>Tax %</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" name="name2" />&nbsp;</td>
<td>1</td>
<td>001</td>
<td>Waste Sand</td>
<td>Ton</td>
<td>100</td>
<td>High</td>
<td>No Change</td>
</tr>
<tr>
<td><input type="checkbox" name="name2" />&nbsp;</td>
<td>2</td>
<td>002</td>
<td>Resin</td>
<td>Litre</td>
<td>50</td>
<td>High</td>
<td>Change</td>
</tr>
<tr>
<td><input type="checkbox" name="name2" />&nbsp;</td>
<td>3</td>
<td>003</td>
<td>Resin</td>
<td>Litre</td>
<td>100</td>
<td>High</td>
<td>Change</td>
</tr>
</tbody>
</table>
<div class="col-md-3 col-md-offset-9">
<div class="form-group">
<label>Total Order Value :</label> <?php
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</form>
</div>
</div>
</div>
</div>
</div>
<div align="right" style="padding-right:10px">
<button type="button" class="btn btn-success">Save</button>
<button type="button" class="btn btn-success">Cancel</button>
</div>
<br/>
</div>
</div>
<br />
<!-- <thead style="background-color:#fff"> -->
<thead>
<tr>
<th><input type="checkbox" name="name1" />&nbsp;</th>
<th>R No</th>
<th>Item Name</th>
<th>Quantity</th>
<th>UOM</th>
<th>Rate</th>
<th>Tax %</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" name="name2" />&nbsp;</td>
<td>1</td>
<td>001</td>
<td>Waste Sand</td>
<td>Ton</td>
<td>100</td>
<td>High</td>
<td>No Change</td>
</tr>
<tr>
<td><input type="checkbox" name="name2" />&nbsp;</td>
<td>2</td>
<td>002</td>
<td>Resin</td>
<td>Litre</td>
<td>50</td>
<td>High</td>
<td>Change</td>
</tr>
<tr>
<td><input type="checkbox" name="name2" />&nbsp;</td>
<td>3</td>
<td>003</td>
<td>Resin</td>
<td>Litre</td>
<td>100</td>
<td>High</td>
<td>Change</td>
</tr>
</tbody>
</table>
<div class="col-md-3 col-md-offset-9">
<div class="form-group">
<label>Total Order Value :</label> <?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
?>
</div>
</div>
<div align="right" style="padding-right:10px">
<button type="button" class="btn btn-success">Save</button>
<button type="button" class="btn btn-success">Cancel</button>
</div>
<br />
</div>
</div>
</div>

View File

@ -257,10 +257,10 @@
</label>
</div>
<div class="buttonContainer">
<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,8 +468,7 @@
<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>
<a class="btn btn-success" data-dismiss="modal" value="Close">Close</a>
</div>
</div>
</div><!-- /.modal footer -->
@ -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,30 +1257,52 @@ function deleteBill(Billno,i){
</script>
<script>
function formatDateTime(dateString) {
// Check if the date string is null
if (dateString === null) {
return ' ';
} else {
// Create a new Date object from the date string
var date = new Date(dateString);
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 {
console.log("Received date string:", dateString);
// Extract date components
var day = date.getDate().toString().padStart(2, '0');
var month = (date.getMonth() + 1).toString().padStart(2, '0'); // Months are zero-based
var year = date.getFullYear();
// Split the date string into date and time components
var dateTimeParts = dateString.split(' ');
var dateParts = dateTimeParts[0].split('-');
var timeParts = dateTimeParts[1].split(':');
// Extract time components
var hours = date.getHours().toString().padStart(2, '0');
var minutes = date.getMinutes().toString().padStart(2, '0');
var seconds = date.getSeconds().toString().padStart(2, '0');
// 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);
// Format the date and time in DD-MM-YYYY HH:MM:SS format
var formattedDate = `${day}-${month}-${year} ${hours}:${minutes}:${seconds}`;
var hours = parseInt(timeParts[0], 10);
var minutes = parseInt(timeParts[1], 10);
var seconds = parseInt(timeParts[2], 10);
return formattedDate;
}
// 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');
var month = (date.getMonth() + 1).toString().padStart(2, '0'); // Months are zero-based
var year = date.getFullYear();
// Extract time components
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
if(flag == 1){
formattedDate = `${day}-${month}-${year}`;
}else if (flag == 2){
formattedDate = `${day}-${month}-${year} ${hours}:${minutes}:${seconds}`;
}
return formattedDate;
}
}
</script>
<script>
function SetRemarks(RowId) {