FIX_Mnor changes : ps

This commit is contained in:
VE10-Sanjeev 2024-06-06 12:38:34 +00:00
parent 668c08c80f
commit e868e80046
9 changed files with 320 additions and 39 deletions

View File

@ -21,6 +21,8 @@ $routes->match(['get', 'post', 'put', 'delete'],'checkEmailExists', 'User::check
$routes->match(['get', 'post', 'put', 'delete'],'forgotPassword', 'Login::forgotPassword');
$routes->match(['get', 'post', 'put', 'delete'],'resetPasswordUser', 'Login::resetPasswordUser');
$routes->match(['get', 'post', 'put', 'delete'],'resetPasswordConfirmUser', 'Login::resetPasswordConfirmUser');
$routes->post('user/Adduserdepartment', 'User::Adduserdepartment');
$routes->post('user/Deleteuserdepartment', 'User::Deleteuserdepartment');
// $routes->match(['get', 'post', 'put', 'delete'],'resetPasswordConfirmUser/(:any)', 'Login::resetPasswordConfirmUser/$1');
// $routes->match(['get', 'post', 'put', 'delete'],'resetPasswordConfirmUser/(:any)/(:any)', 'Login::resetPasswordConfirmUser/$1/$2');
// $routes->match(['get', 'post', 'put', 'delete'],'createPasswordUser', 'Login::createPasswordUser');
@ -315,4 +317,6 @@ $routes->match(['get', 'post', 'put', 'delete'],'Empperform', 'Report::per');
$routes->get('qualityreportlist', 'Quality::reportList');
$routes->get('qualityreportlistinward', 'Quality::reportListInward');
$routes->get('shortagematerialListing', 'Rawmaterialdetails::shortagematerialListing');
$routes->get('shortagematerialListing', 'Rawmaterialdetails::shortagematerialListing');
$routes->get('inprocess', 'Inprocess::index');

View File

@ -148,15 +148,15 @@ class Inprocess extends BaseController
$resindesc = $this->request->getPost('param11');
$qty = $this->request->getPost('param12');
$times = $this->request->getPost('param13');
$times = explode(",", $times);
$times = explode(",", (string)$times);
$approvedby = $this->request->getPost('param14');
$remarks = $this->request->getPost('param15');
$testphpdata = json_decode($testjson, true);
$testphpdata2 = json_decode($testjson2, true);
$loiphpdata = json_decode($loijson, true);
$afsphpdata = json_decode($afsjson, true);
$testphpdata = json_decode((string)$testjson, true);
$testphpdata2 = json_decode((string)$testjson2, true);
$loiphpdata = json_decode((string)$loijson, true);
$afsphpdata = json_decode((string)$afsjson, true);
//print_r($afsphpdata);die();
$createdon = date('Y-m-d H:i:s');
$createby = $this->session->get('userId');
@ -299,17 +299,17 @@ class Inprocess extends BaseController
$resindesc = $this->request->getPost('param11');
$qty = $this->request->getPost('param12');
$times = $this->request->getPost('param13');
$times = explode(",", $times);
$times = explode(",", (string)$times);
$approvedby = $this->request->getPost('param14');
$remarks = $this->request->getPost('param15');
$masterid = $this->request->getPost('param16');
$olddoc = $this->request->getPost('param17');
$testphpdata = json_decode($testjson, true);
$testphpdata2 = json_decode($testjson2, true);
$loiphpdata = json_decode($loijson, true);
$afsphpdata = json_decode($afsjson, true);
$testphpdata = json_decode((string)$testjson, true);
$testphpdata2 = json_decode((string)$testjson2, true);
$loiphpdata = json_decode((string)$loijson, true);
$afsphpdata = json_decode((string)$afsjson, true);
//print_r($afsphpdata);die();
$createdon = date('Y-m-d H:i:s');
$createby = $this->session->get('userId');
@ -557,16 +557,16 @@ class Inprocess extends BaseController
$resindesc = $this->request->getPost('param11');
$qty = $this->request->getPost('param12');
$times = $this->request->getPost('param13');
$times = explode(",", $times);
$times = explode(",", (string)$times);
$approvedby = $this->request->getPost('param14');
$remarks = $this->request->getPost('param15');
$nissansubtype = $this->request->getPost('param16');
//echo $nissansubtype;
$testphpdata = json_decode($testjson, true);
$testphpdata2 = json_decode($testjson2, true);
$loiphpdata = json_decode($loijson, true);
$afsphpdata = json_decode($afsjson, true);
$testphpdata = json_decode((string)$testjson, true);
$testphpdata2 = json_decode((string)$testjson2, true);
$loiphpdata = json_decode((string)$loijson, true);
$afsphpdata = json_decode((string)$afsjson, true);
//print_r($afsphpdata);die();
$createdon = date('Y-m-d H:i:s');
$createby = $this->session->get('userId');
@ -764,7 +764,7 @@ class Inprocess extends BaseController
$resindesc = $this->request->getPost('param11');
$qty = $this->request->getPost('param12');
$times = $this->request->getPost('param13');
$times = explode(",",$times);
$times = explode(",",(string)$times);
$approvedby = $this->request->getPost('param14');
$remarks = $this->request->getPost('param15');
$nissansubtype = $this->request->getPost('param16');
@ -772,10 +772,10 @@ class Inprocess extends BaseController
$olddoc = $this->request->getPost('param18');
//echo $nissansubtype;
$testphpdata = json_decode($testjson, true);
$testphpdata2 = json_decode($testjson2, true);
$loiphpdata = json_decode($loijson, true);
$afsphpdata = json_decode($afsjson, true);
$testphpdata = json_decode((string)$testjson, true);
$testphpdata2 = json_decode((string)$testjson2, true);
$loiphpdata = json_decode((string)$loijson, true);
$afsphpdata = json_decode((string)$afsjson, true);
//print_r($afsphpdata);die();
$createdon = date('Y-m-d H:i:s');
$createby = $this->session->get('userId');

View File

@ -539,7 +539,7 @@ class Inwardgateregister extends BaseController
$addOgrline = $this->inwardgateregister_model->AddOgrLine($Ogrline);
if ((count($addogrmaster) > 0) && (count($addOgrlines > 0))) {
if ((count($addogrmaster) > 0) && ($addOgrline > 0)) {
echo "Saved Successfully OGR No is OGR" . $OGRNO;
}
} else if ($type == 2) {
@ -725,7 +725,7 @@ class Inwardgateregister extends BaseController
$addOgrline = $this->inwardgateregister_model->AddOgrLine($Ogrline);
if ((count($addogrmaster) > 0) && (count($addOgrline > 0))) {
if ((count($addogrmaster) > 0) && ($addOgrline > 0)) {
echo "Saved Successfully OGR No is OGR" . $OGRNO;
}
}

View File

@ -0,0 +1,280 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class Inprocess_model extends Model
{
function getAllprodcuts()
{
$builder = $this->db->table('ip_products')
->select('product_id,product_name,product_description');
$query =$builder->get();
return $query->getResult();
}
function getAllcustomers()
{
$builder = $this->db->table('ip_clients')
->select('client_id,client_name');
$query =$builder->get();
return $query->getResult();
}
function getAllTestReports()
{
$builder = $this->db->table('T_Inprocess_Testreport_Master')
->select('masterreport_id,productid,ip_products.product_name,customerid,ip_clients.client_name,batchno,batchdate,document')
->join('ip_products','T_Inprocess_Testreport_Master.productid=ip_products.product_id')
->join('ip_clients','T_Inprocess_Testreport_Master.customerid=ip_clients.client_id');
$query =$builder->get();
return $query->getResult();
}
function getSpecifications($productid,$customerid)
{
//echo 'from model'.$productid.'-'.$customerid;
// ->where('product_id',$productid);
// ->where('customer_id',$customerid);
// $res = $this->db->get('T_Prodcut_Specification_Master');
$sql = "Select * from T_Prodcut_Specification_Master where product_id = ? and customer_id = ?";
$res = $this->db->query($sql,array($productid,$customerid));
// print_r($this->db->last_query());
return $res->getResult();
//print_r($res->result());
}
function getEmplistforReport()
{
$builder = $this->db->table('T_Employee_Details')->select('T_Employee_Details.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Employee_Details.Departmentcode,T_DepartmentDetails.shortName')
->join('T_DepartmentDetails','T_Employee_Details.Departmentcode=T_DepartmentDetails.DEPCode')
//->join('ip_invoice_items','ip_invoices.invoice_number=ip_invoice_items.invoice_number');
//->join('ip_products','ip_invoice_items.item_product_id=ip_products.product_id');
//->join('ip_invoice_custom','ip_invoices.invoice_number=ip_invoice_custom.invoice_number and invoice_custom_fieldid=62');
->orderBy('T_Employee_Details.EmpID');
$query =$builder->get();
return $query->getResult();
}
function saveMasterTestData($masterreportdata)
{
$builder = $this->db->table('T_Inprocess_Testreport_Master');
$builder->insert($masterreportdata);
$row = $this->db->affectedRows();
$id = $this->db->insertId();
return $id;
}
function saveTestReportData($testreportdata)
{
foreach($testreportdata as $data)
{
$builder = $this->db->table('T_Inprocess_Testreport');
$builder->insert($data);
$row = $this->db->affectedRows();
$id = $this->db->insertId();
}
}
function saveTestReportAFSData($afstabledata)
{
$builder = $this->db->table('T_Inprocess_AFSTestreport');
$builder->insert($afstabledata);
$row = $this->db->affectedRows();
//return $row;
}
function saveTestReportLOIData($loitabledata)
{
$builder = $this->db->table('T_Inprocess_LOITestreport');
$builder->insert($loitabledata);
$row = $this->db->affectedRows();
//return $row;
}
function getIndividualInprocessReportData($reportid)
{
$builder = $this->db->table('T_Inprocess_Testreport_Master')->select('T_Inprocess_Testreport_Master.*,ip_clients.client_name,ip_products.product_name,ip_products.product_description,T_Employee_Details.FirstName,T_Employee_Details.LastName')
->join('ip_clients','T_Inprocess_Testreport_Master.customerid=ip_clients.client_id')
->join('ip_products','T_Inprocess_Testreport_Master.productid=ip_products.product_id')
->join('tbl_users','T_Inprocess_Testreport_Master.createdby=tbl_users.userid')
->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID')
->where('T_Inprocess_Testreport_Master.masterreport_id',$reportid);
$res =$builder->get();
$reportdata['master'] = $res->getResult();
$builder = $this->db->table('T_Inprocess_Testreport')
->select('T_Inprocess_Testreport.*,T_Prodcut_Specification_Master.testtype,T_Prodcut_Specification_Master.min,T_Prodcut_Specification_Master.max,T_Prodcut_Specification_Master.uom')
->join('T_Prodcut_Specification_Master','T_Inprocess_Testreport.specid=T_Prodcut_Specification_Master.productspecmaster_id')
->where('masterreport_id',$reportid);
$res1 = $builder->get();
$reportdata['masterreport'] = $res1->getResult();
$builder = $this->db->table('T_Inprocess_LOITestreport')
->select('T_Inprocess_LOITestreport.*')
->where('masterreport_id',$reportid);
$res1 = $builder->get();
$reportdata['masterreportloi'] = $res1->getResult();
$builder = $this->db->table('T_Inprocess_AFSTestreport')
->select('T_Inprocess_AFSTestreport.*')
->where('masterreport_id',$reportid);
$res1 = $builder->get();
$reportdata['masterreportafs'] = $res1->getResult();
$builder = $this->db->table('T_Company_Details')
->select('T_Company_Details.CompanyName,T_Company_Details.Address,T_Company_Details.ProfilePic');
//->where('testreport_id',$reportid);
$res1 = $builder->get();
$reportdata['company'] = $res1->getResult();
return $reportdata;
}
function getTestMasterforList()
{
$builder = $this->db->table('T_Test_Report_Master')
->select('T_Test_Report_Master.testreport_id,T_Test_Report_Master.invoiceid,T_Test_Report_Master.batchdate,T_Test_Report_Master.document,ip_clients.client_id,ip_clients.client_name,ip_products.product_id,ip_products.product_name,ip_products.product_description')
->join('ip_invoices','T_Test_Report_Master.invoiceid=ip_invoices.invoice_number')
->join('ip_clients','ip_invoices.client_id=ip_clients.client_id')
->join('ip_invoice_items','ip_invoices.invoice_id=ip_invoice_items.invoice_id')
->join('ip_products','ip_products.product_id=ip_invoice_items.item_product_id');
//->where('T_Test_Report_Master.invoiceid','!=0');
$res = $builder->get();
return $res->getResult();
}
function updateMasterTestData($masterreportdata,$masterid)
{
$this->db->table('T_Inprocess_Testreport_Master')
->where('masterreport_id',$masterid)
->update($masterreportdata);
}
function updateTestReportData($testreportdata,$masterid,$specid)
{
foreach($testreportdata as $data)
{
$this->db->table('T_Inprocess_Testreport')
->where('masterreport_id',$masterid)
->where('specid',$specid)
->where('iteration',$data['iteration'])
->where('subtype',$data['subtype'])
->update($data);
//echo $this->db->last_query();
}
}
function updateTestReportAFSData($afstabledata,$masterid,$ssize,$factor)
{
$this->db->table('T_Inprocess_AFSTestreport')
->where('masterreport_id',$masterid)
->where('sieve_size',$ssize)
->where('factor',$factor)
->update($afstabledata);
// echo $this->db->last_query();
}
function updateTestReportLOIData($loitabledata,$masterid,$loidetails)
{
$this->db->table('T_Inprocess_LOITestreport')
->where('masterreport_id',$masterid)
->where('loidetails',$loidetails)
->update($loitabledata);
//echo $this->db->last_query();
}
//FOR NISSAN INPROCESS
function updateNissanMasterTestData($masterreportdata,$masterid)
{
//echo "from model";
//print_r($masterreportdata);die();
$this->db->table('T_Inprocess_Testreport_Master')
->where('masterreport_id',$masterid)
->update($masterreportdata);
}
function updateNissanTestReportData($testreportdata,$masterid,$specid)
{
foreach($testreportdata as $data)
{
$this->db->table('T_Inprocess_Testreport')
->where('masterreport_id',$masterid)
->where('specid',$specid)
->where('iteration',$data['iteration'])
->where('subtype',$data['subtype'])
->update($data);
//echo $this->db->last_query();
}
}
function updateNissanTestReportAFSData($afstabledata,$masterid,$ssize,$factor)
{
$this->db->table('T_Inprocess_AFSTestreport')
->where('masterreport_id',$masterid)
->where('sieve_size',$ssize)
->where('factor',$factor)
->update($afstabledata);
// echo $this->db->last_query();
}
function updateNissanTestReportLOIData($loitabledata,$masterid,$loidetails)
{
$this->db->table('T_Inprocess_LOITestreport')
->where('masterreport_id',$masterid)
->where('loidetails',$loidetails)
->update($loitabledata);
//echo $this->db->last_query();
}
}
?>

View File

@ -146,7 +146,7 @@ class Inwardgateregister_model extends Model
$builder = $this->db->table('T_PurchaseOrder_Master POM')
->distinct()->select('POM.PONO,POM.ServiceDescription,POM.DeliveryDate,sup.SupplierName,sup.Address,POM.status,OGR_Status,POM.PODate,POM.IsOpenOrder')
->select("IF(POM.PODate IS NOT NULL, DATE_FORMAT(POM.PODate, '%Y-%m-%d'), NULL) AS formatted_PODate")
->select("IF(POM.IsOpenOrder IS NOT NULL, POM.IsOpenOrder, '%Y-%m-%d'), NULL) AS formatted_IsOpenOrder")
->select("IF(POM.IsOpenOrder IS NULL OR POM.IsOpenOrder = '', 0, POM.IsOpenOrder) AS formatted_IsOpenOrder")
->join('T_PurchaseOrder_LineItem POL', 'POL.PONO = POM.PONO')
->join('T_SupplierDetailsN sup', 'POM.SupplierID = sup.SupplierID')
->join('T_OGR_Master OGM ', 'POM.PONO = OGM.PONO_INV', 'left')

View File

@ -1557,8 +1557,10 @@ QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty,Per,
$builder = $this->db->table('T_PurchaseOrder_Master mast')->distinct()
->select('mast.PONO,mast.TotalOrderValue,st.StatusCode,st.StatusName,emp.FirstName,mast.CreatedDate,ccm.CostCenterName,ccm.CostCenterCode,mast.POType as RType,mast.Remarks,DepartmentName,mast.ApprovedBy,(select EmpID from tbl_users where userId=mast.ApprovedBy )as EID,rmast.ReqType,mast.Status,mast.CapitalRange,
(select FirstName from T_Employee_Details where EmpID=EID)as Approver')
(select FirstName from T_Employee_Details where EmpID=EID)as Approver,sup.SupplierName')
// ->orderBy('mast.Status',"PO_CREATED");
->join('T_SupplierDetailsN sup', 'sup.SupplierID = mast.SupplierID')
->join('T_Status st', 'st.StatusCode=mast.Status')
->join('T_PurchaseOrder_LineItem req', 'req.PONO= mast.PONO')
->join('T_Requestion_Master rmast', 'rmast.ReqNo=req.ReqNo')

View File

@ -1488,7 +1488,8 @@
</a>
</li>
<li>
<a href="<?php echo base_url(); ?>ViewigrDetails">
<?php $link = ($DEPCode == SECURITY) ? base_url() . 'ViewigrDetails' : base_url() . 'Viewigr'; ?>
<a href="<?php echo $link; ?>">
<i class="fa fa-upload"></i>
<span>View Inward Gate Register</span>
</a>
@ -1506,12 +1507,6 @@
</a>
</li>
<?php if ($DEPCode != SECURITY) { ?>
<li>
<a href="<?php echo base_url(); ?>Viewigr">
<i class="fa fa-eye"></i>
<span>View Inward Gate Register</span>
</a>
</li>
<li>
<a href="<?php echo base_url(); ?>ViewMRIR">
<i class="fa fa-upload"></i>
@ -1644,12 +1639,12 @@
<span>Inward Gate Register Entry</span>
</a>
</li>
<li>
<!-- <li>
<a href="<?php echo base_url(); ?>ViewigrDetails">
<i class="fa fa-upload"></i>
<span>View Inward Gate Register</span>
</a>
</li>
</li> -->
<li>
<a href="<?php echo base_url(); ?>AddOgr">
<i class="fa fa-upload"></i>

View File

@ -172,7 +172,7 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
</div>
<div class="col-md-12" style="margin-top: 10px;">
<div class="col-md-12" style="margin: 10px 0;">
<input type="button" class="btn btn-success" id ="addemorebutton" value=" + ADD FILES..">

View File

@ -39,7 +39,7 @@ if(empty($Status))
<th>Purchase Order Number</th>
<th>Purchase Order Type</th>
<th>Cost Center Name</th>
<th>Cost Center Code</th>
<th>Supplier Name</th>
<th>Created By</th>
<th>Department</th>
<th>Created Date</th>
@ -71,11 +71,11 @@ if(empty($Status))
<td><?php echo $record->RType ?> </td>
<td><?php echo $record->CostCenterName ?> </td>
<td><?php echo $record->CostCenterCode?></td>
<!-- <td><?php // echo $record->CostCenterCode?></td> -->
<td><?php echo $record->SupplierName ?></td>
<td><?php echo $record->FirstName ?></td>
<td><?php echo $record->DepartmentName?></td>
<td align="right"><?php $Cdt = new DateTime($record->CreatedDate);