SPEC MASTER PRODUCTION ISSUE
This commit is contained in:
parent
5955b5200d
commit
c2e8210213
@ -106,7 +106,7 @@ class quality extends BaseController
|
||||
{
|
||||
|
||||
$tostore = array('uom'=>$uom,'min'=>$min,'max'=>$max,'temp'=>$temp,'type'=>$type,'subtype'=>$sub,'updated_by'=>$createdby);
|
||||
$res = $this->quality_model->updateSpecMast($tostore,$product,$customer,$name);
|
||||
$res = $this->quality_model->updateSpecMast($tostore,$product,$customer,$name,$type);
|
||||
//echo 'u'.$res;
|
||||
}
|
||||
|
||||
@ -121,7 +121,9 @@ class quality extends BaseController
|
||||
$spname = $this->input->post('param1');
|
||||
$product = $this->input->post('param2');
|
||||
$customer = $this->input->post('param3');
|
||||
$res = $this->quality_model->deleteSpecification($spname,$product,$customer);
|
||||
$type = $this->input->post('param4');
|
||||
|
||||
$res = $this->quality_model->deleteSpecification($spname,$product,$customer,$type);
|
||||
if($res == 1)
|
||||
{
|
||||
echo "Deleted Successfully..!";
|
||||
@ -146,7 +148,8 @@ class quality extends BaseController
|
||||
{
|
||||
$prodcutid = $this->uri->segment(3);
|
||||
$customerid =$this->uri->segment(4);
|
||||
$data['specifications'] = $this->quality_model->getIndividualSpec($prodcutid,$customerid);
|
||||
$type =$this->uri->segment(5);
|
||||
$data['specifications'] = $this->quality_model->getIndividualSpec($prodcutid,$customerid,$type);
|
||||
$this->global['pageTitle'] = 'Siddharth : View reports Lists';
|
||||
|
||||
$this->loadViews("viewIndSpec", $this->global, $data, NULL);
|
||||
|
||||
@ -65,13 +65,14 @@ class Quality_model extends CI_Model
|
||||
return $r;
|
||||
}
|
||||
|
||||
function updateSpecMast($data,$product,$customer,$name)
|
||||
function updateSpecMast($data,$product,$customer,$name,$type)
|
||||
{
|
||||
//echo $product.$customer.$name;
|
||||
//print_r($data);
|
||||
$this->db->where('product_id',$product);
|
||||
$this->db->where('customer_id',$customer);
|
||||
$this->db->where('testtype',$name);
|
||||
$this->db->where('type',$type);
|
||||
$this->db->update('T_Prodcut_Specification_Master',$data);
|
||||
$r = $this->db->affected_rows();
|
||||
//echo $r;die();
|
||||
@ -84,7 +85,7 @@ class Quality_model extends CI_Model
|
||||
$this->db->from('T_Prodcut_Specification_Master');
|
||||
$this->db->join('ip_products','T_Prodcut_Specification_Master.product_id=ip_products.product_id');
|
||||
$this->db->join('ip_clients','T_Prodcut_Specification_Master.customer_id=ip_clients.client_id');
|
||||
$this->db->group_by('product_id,customer_id');
|
||||
$this->db->group_by('T_Prodcut_Specification_Master.type,product_id,customer_id');
|
||||
$result = $this->db->get();
|
||||
return $result->result();
|
||||
}
|
||||
@ -100,7 +101,7 @@ class Quality_model extends CI_Model
|
||||
}
|
||||
|
||||
|
||||
function getIndividualSpec($prodcutid,$customerid)
|
||||
function getIndividualSpec($prodcutid,$customerid,$type)
|
||||
{
|
||||
$this->db->select('T_Prodcut_Specification_Master.*,ip_products.product_name,ip_products.product_description,ip_clients.client_name');
|
||||
$this->db->from('T_Prodcut_Specification_Master');
|
||||
@ -108,6 +109,7 @@ class Quality_model extends CI_Model
|
||||
$this->db->join('ip_clients','T_Prodcut_Specification_Master.customer_id=ip_clients.client_id');
|
||||
$this->db->where('T_Prodcut_Specification_Master.product_id',$prodcutid);
|
||||
$this->db->where('T_Prodcut_Specification_Master.customer_id',$customerid);
|
||||
$this->db->where('T_Prodcut_Specification_Master.type',$type);
|
||||
$result = $this->db->get();
|
||||
//print_r($result->result());
|
||||
if(empty($result->result()))
|
||||
@ -119,6 +121,7 @@ class Quality_model extends CI_Model
|
||||
$this->db->join('T_SupplierDetailsN','T_Prodcut_Specification_Master.customer_id=T_SupplierDetailsN.SupplierID');
|
||||
$this->db->where('T_Prodcut_Specification_Master.product_id',$prodcutid);
|
||||
$this->db->where('T_Prodcut_Specification_Master.customer_id',$customerid);
|
||||
$this->db->where('T_Prodcut_Specification_Master.type',$type);
|
||||
$result = $this->db->get();
|
||||
|
||||
}
|
||||
@ -127,11 +130,12 @@ class Quality_model extends CI_Model
|
||||
}
|
||||
|
||||
|
||||
function deleteSpecification($spname,$product,$customer)
|
||||
function deleteSpecification($spname,$product,$customer,$type)
|
||||
{
|
||||
$this->db->where("testtype", $spname);
|
||||
$this->db->where("product_id", $product);
|
||||
$this->db->where("customer_id", $customer);
|
||||
$this->db->where("customer_id", $customer);
|
||||
$this->db->where("type", $type);
|
||||
$this->db->delete('T_Prodcut_Specification_Master');
|
||||
$r = $this->db->affected_rows();
|
||||
return $r;
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
|
||||
//print_r($data);echo "</br></br>";
|
||||
?>
|
||||
<tr> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $data->product_id.'/'.$data->customer_id ?>"><?php echo $data->product_name.'-'.$data->product_description?></a></td> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $data->product_id.'/'.$data->customer_id ?>"><?php echo $data->client_name?></a></td> <td><?php echo $data->type?> </td><td><?php echo $data->count?></td></tr>
|
||||
<tr> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $data->product_id.'/'.$data->customer_id.'/'. $data->type ?>"><?php echo $data->product_name.'-'.$data->product_description?></a></td> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $data->product_id.'/'.$data->customer_id.'/'. $data->type ?>"><?php echo $data->client_name?></a></td> <td><?php echo $data->type?> </td><td><?php echo $data->count?></td></tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@ -84,7 +84,7 @@
|
||||
|
||||
//print_r($data);echo "</br></br>";
|
||||
?>
|
||||
<tr> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $in->MaterialCode.'/'.$in->SupplierID ?>"><?php echo $in->MaterialName?></a></td> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $in->MaterialCode.'/'.$in->SupplierID ?>"><?php echo $in->SupplierName?></a></td> <td><?php echo $in->type?> </td><td><?php echo $in->count?></td></tr>
|
||||
<tr> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $in->MaterialCode.'/'.$in->SupplierID.'/'.$in->type ?>"><?php echo $in->MaterialName?></a></td> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $in->MaterialCode.'/'.$in->SupplierID.'/'.$in->type ?>"><?php echo $in->SupplierName?></a></td> <td><?php echo $in->type?> </td><td><?php echo $in->count?></td></tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
@ -303,6 +303,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
||||
{
|
||||
var product = $('#product').val();
|
||||
var customer = $('#customer').val();
|
||||
var type = $('#ttype').val();
|
||||
if(product == '' || customer == '')
|
||||
{
|
||||
alert('Please Select Product and Customer.');
|
||||
@ -324,7 +325,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
||||
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:{param1:d,param2:product,param3:customer},
|
||||
data:{param1:d,param2:product,param3:customer,param4:type},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>quality/deleteSpecification",
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user