I Update MIMR add screen
This commit is contained in:
parent
229da1d6e9
commit
f7023852d4
183
application/controllers/MRIRcontroller.php
Normal file
183
application/controllers/MRIRcontroller.php
Normal file
@ -0,0 +1,183 @@
|
||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : Inward Gate Register Controller (security)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Saravana kumar
|
||||
* @version : 1.1
|
||||
* @since : 10 Jun 2017
|
||||
*/
|
||||
class MRIRcontroller extends BaseController
|
||||
{
|
||||
/**
|
||||
* This is default constructor of the class
|
||||
*/
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('mrir_model');
|
||||
$this->load->library('session');
|
||||
$this->load->library('form_validation');
|
||||
$this->isLoggedIn();
|
||||
}
|
||||
/**
|
||||
* This function used to load the first screen of the user
|
||||
*/
|
||||
// public function index()
|
||||
// {
|
||||
// $this->global['pageTitle'] = 'Siddharth : Material Inspetion Report';
|
||||
//
|
||||
// $this->loadViews("materialinspectionreport", $this->global, NULL , NULL);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
function materialinspectionreport($mrir='',$IGRNO='')
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Material Inspection Report';
|
||||
|
||||
$this->load->model('mrir_model');
|
||||
|
||||
$data['IGRNOonly'] = $this->mrir_model->getIGRNOonly();
|
||||
|
||||
$this->loadViews("materialinspectionreport", $this->global,$data,NULL);
|
||||
|
||||
}
|
||||
/*FOR Displaying IGR Values in Materialinspection.php(view file) */
|
||||
function igrdatavalues()
|
||||
{
|
||||
|
||||
$IgrNo= $_GET['IGRNO'];
|
||||
|
||||
print_r($IgrNo);
|
||||
|
||||
$data['IGRDetails'] = $this->mrir_model->get_IGRs($IgrNo);
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : IGR Details ';
|
||||
|
||||
$this->loadViews("materialinspectionreport", $this->global, $data,NULL);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* FOR Edit MRIR Screen */
|
||||
function editmaterialinspectionreport()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Material Inspection Report';
|
||||
|
||||
$this->load->model('mrir_model');
|
||||
|
||||
$data['IGRNOonly'] = $this->mrir_model->getIGRNOonly();
|
||||
|
||||
$this->loadViews("Editmaterialinspectionreport", $this->global,$data,NULL);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* For View MRIR Screen*/
|
||||
function viewmaterialinspectionreport()
|
||||
|
||||
{
|
||||
|
||||
$this->load->model('mrir_model');
|
||||
|
||||
$data['mrirdatas2'] = $this->mrir_model-> view_MRIR();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : View Material Inspection Report';
|
||||
//print_r( $data);
|
||||
$this->loadViews("viewmaterialinspectionreport", $this->global,$data,NULL);
|
||||
|
||||
}
|
||||
|
||||
/* For Values are Stored in DB */
|
||||
function displaying_values()
|
||||
{
|
||||
$this->load->model('mrir_model');
|
||||
|
||||
$RowCount = $this->input->post('RowCount');
|
||||
//echo $RowCount;
|
||||
// get form variable
|
||||
$igrno = $this->input->post('IGRNO');
|
||||
$PONO = $this->input->post('PONO');
|
||||
$CreatedBy = $this->session->userdata('userId');
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$createddt = $dt->format('Y-m-d H:i:s');
|
||||
$Remark = $this->input->post('Remarks');
|
||||
|
||||
|
||||
//this array to store the value in master table..
|
||||
$mrirmastervalues = array('IGRNO'=>$igrno,'PONO'=>$PONO,'CreatedBy'=>$CreatedBy,'Createdon'=>$createddt);
|
||||
|
||||
$mrirmaster = $this->mrir_model->master_mrir($mrirmastervalues);
|
||||
|
||||
|
||||
$MRIRNO = '';
|
||||
|
||||
|
||||
if(count($mrirmaster)>0)
|
||||
|
||||
{
|
||||
foreach ($mrirmaster as $key ) {
|
||||
|
||||
$MRIRNO=$key->MRIRNo; }
|
||||
}
|
||||
|
||||
|
||||
for ($i = 1; $i <= $RowCount; $i++)
|
||||
{
|
||||
$MaterialCode = $this->input->post('MaterialCode'.$i);
|
||||
$ActualQuantityReceived = $this->input->post('ActualQuantity'.$i);
|
||||
echo $ActualQuantityReceived;
|
||||
|
||||
$QuantityAsPerInvoice = $this->input->post('ReceivedQuantity'.$i);
|
||||
$Remarked = $this->input->post('Remarks'.$i);
|
||||
$StoreIncharge = $this->session->userdata('name');
|
||||
$UpdatedBy = $this->session->userdata('userId');
|
||||
|
||||
//this array to store the value in master table..
|
||||
$mrirdetailvalues = array('MRIRNO'=>$MRIRNO,'MaterialCode'=>$MaterialCode,'ActualQuantityReceived'=>$ActualQuantityReceived,'StoreInchargeID'=>$StoreIncharge,'Remarks'=>$Remarked,'UpdateBy'=>$UpdatedBy);
|
||||
//print_r($mrirvalues2);
|
||||
//die();
|
||||
$mrirdetails = $this->mrir_model->detail_mrir($mrirdetailvalues);
|
||||
|
||||
}
|
||||
echo "successfully created : ".$MRIRNO;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function displaying_MRIRvalues()
|
||||
{
|
||||
$mrir = $this->input->post("mrirno");
|
||||
$result=$this->mrir_model->get_MRIRs($mrir);
|
||||
$obj=json_encode($result);
|
||||
echo $obj;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function displaying_IGRvalues()
|
||||
{
|
||||
|
||||
$igr= $this->input->post("igrno");
|
||||
$result=$this->mrir_model->get_IGRs($igr);
|
||||
|
||||
$obj = json_encode($result);
|
||||
echo $obj;
|
||||
}
|
||||
|
||||
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Siddharth : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
185
application/models/mrir_model.php
Normal file
185
application/models/mrir_model.php
Normal file
@ -0,0 +1,185 @@
|
||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class mrir_model extends CI_Model
|
||||
{
|
||||
/**
|
||||
* This function is used to get the user listing count
|
||||
* @param string $searchText : This is optional search text
|
||||
* @return number $count : This is row count
|
||||
*/
|
||||
|
||||
function mrirListingCount()
|
||||
{
|
||||
|
||||
|
||||
$this->db->select('TMM.PONO,TMM.IGRNO,TMD.*,IGRM.DeliveryChellanOrInvoiceNo,IGRM.VehicleNo,IGRD.*,SUPP.SupplierName,SUPP.Address,POMR.DeliveryDate,MM.MaterialCode,MM.MaterialName,MM.UOM,POLT.Quantity,POLT.ReceivedQuantity');
|
||||
$this->db->from ('T_MRIR_Master TMM');
|
||||
$this->db->join ('T_MRIR_Details TMD','TMM.MRIRNO = TMD.MRIRNO','left');
|
||||
$this->db->join ('T_MaterialMaster MM','TMD.MaterialCode = MM.MaterialCode','left');
|
||||
$this->db->join ('T_IGR_Master IGRM', 'IGRM.IGRNO=TMM.IGRNO','left');
|
||||
$this->db->join ('T_PurchaseOrder_Master POMR ','IGRM.PONO=POMR.PONO','left');
|
||||
$this->db->join ('T_PurchaseOrder_LineItem POLT','IGRM.PONO=POLT.PONO','left');
|
||||
$this->db->join ('T_IGR_Details IGRD','IGRD.IGRNO= IGRM.IGRNO','left');
|
||||
$this->db->join ('T_SupplierDetailsN SUPP','POMR.SupplierID=SUPP.SupplierID','left');
|
||||
$this->db->group_by('TMD.MRIRNO');
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function mrirListing($mrir)
|
||||
{
|
||||
|
||||
$this->db->select('TMM.MRIRNO,TMM.PONO,TMM.IGRNO,TMD.*,IGRM.DeliveryChellanOrInvoiceNo,IGRM.VehicleNo,IGRD.*,SUPP.SupplierName,SUPP.Address,POMR.DeliveryDate,MM.MaterialCode,MM.UOM,MM.MaterialName,POLT.Quantity,POLT.ReceivedQuantity');
|
||||
$this->db->from ('T_MRIR_Master TMM');
|
||||
$this->db->join ('T_MRIR_Details TMD','TMM.MRIRNO = TMD.MRIRNO','left');
|
||||
$this->db->join ('T_MaterialMaster MM','TMD.MaterialCode = MM.MaterialCode','left');
|
||||
$this->db->join ('T_IGR_Master IGRM', 'IGRM.IGRNO=TMM.IGRNO','left');
|
||||
$this->db->join ('T_PurchaseOrder_Master POMR ','IGRM.PONO=POMR.PONO','left');
|
||||
$this->db->join ('T_PurchaseOrder_LineItem POLT','IGRM.PONO=POLT.PONO','left');
|
||||
$this->db->join ('T_IGR_Details IGRD','IGRD.IGRNO= IGRM.IGRNO','left');
|
||||
$this->db->join ('T_SupplierDetailsN SUPP','POMR.SupplierID=SUPP.SupplierID','left');
|
||||
$this->db->group_by('TMD.MRIRNO',$mrir);
|
||||
|
||||
$query = $this->db->get();
|
||||
$result=$query->result();
|
||||
return $result;
|
||||
}
|
||||
|
||||
function get_IGRdatas()
|
||||
{
|
||||
$this->db->select('IGRM.*,IGRD.*,SUPP.SupplierName,SUPP.Address,TMM.PONO,TMD.*,MM.MaterialCode,MM.UOM,MM.MaterialName,POLT.Quantity,POLT.ReceivedQuantity');
|
||||
$this->db->from ('T_IGR_Master IGRM');
|
||||
$this->db->join ('T_PurchaseOrder_Master POMR ','IGRM.PONO=POMR.PONO','left');
|
||||
$this->db->join ('T_MRIR_Master TMM' ,'TMM.IGRNO=IGRM.IGRNO');
|
||||
$this->db->join ('T_MRIR_Details TMD','TMD.MRIRNO=TMM.MRIRNO');
|
||||
//$this->db->join ('T_MRIRNO');
|
||||
$this->db->join ('T_IGR_Details IGRD','IGRD.IGRNO= IGRM.IGRNO','left');
|
||||
$this->db->join ('T_PurchaseOrder_LineItem POLT','IGRM.PONO=POLT.PONO','left');
|
||||
$this->db->join ('T_SupplierDetailsN SUPP','POMR.SupplierID=SUPP.SupplierID','left');
|
||||
$this->db->join ('T_MaterialMaster MM',' MM.MaterialCode=TMD.MaterialCode','left');
|
||||
//$this->db->where('IGRM.IGRNO ');
|
||||
$query = $this->db->get();
|
||||
$result = $query->result();
|
||||
//print_r($result);
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function get_MRIRs($mrir)
|
||||
{
|
||||
$this->db->select('TMM.MRIRNO,TMM.PONO,TMM.IGRNO,TMD.*,IGRM.DeliveryChellanOrInvoiceNo,IGRM.DeliveryChellanDate,IGRM.VehicleNo,IGRD.*,SUPP.SupplierName,SUPP.Address,POMR.DeliveryDate,POMR.ServiceDescription,MM.MaterialCode,MM.UOM,MM.MaterialName,POLT.Quantity,POLT.ReceivedQuantity');
|
||||
$this->db->from ('T_MRIR_Master TMM');
|
||||
$this->db->join ('T_MRIR_Details TMD','TMM.MRIRNO = TMD.MRIRNO','left');;
|
||||
$this->db->join ('T_MaterialMaster MM','TMD.MaterialCode = MM.MaterialCode','left');
|
||||
$this->db->join ('T_IGR_Master IGRM', 'IGRM.IGRNO=TMM.IGRNO','left');
|
||||
$this->db->join ('T_PurchaseOrder_Master POMR ','IGRM.PONO=POMR.PONO','left');
|
||||
$this->db->join ('T_PurchaseOrder_LineItem POLT','IGRM.PONO=POLT.PONO','left');
|
||||
$this->db->join ('T_IGR_Details IGRD','IGRD.IGRNO= IGRM.IGRNO','left');
|
||||
$this->db->join ('T_SupplierDetailsN SUPP','POMR.SupplierID=SUPP.SupplierID','left');
|
||||
$this->db->where('TMD.MRIRNO',$mrir);
|
||||
//$this->db->order_by('TMD.MRIRNO','asc');
|
||||
|
||||
|
||||
// $this->db->from ('T_MRIR_Master TMM');
|
||||
$query = $this->db->get();
|
||||
//print_r($this->db->last_query());
|
||||
|
||||
$result=$query->result();
|
||||
//print_r($result);
|
||||
return $result;
|
||||
|
||||
|
||||
}
|
||||
|
||||
function view_MRIR()
|
||||
{
|
||||
$this->db->distinct();
|
||||
$this->db->select('TMM.MRIRNO,TMM.PONO,TMM.IGRNO,IGRM.DeliveryChellanOrInvoiceNo,IGRM.DeliveryChellanDate,IGRM.VehicleNo,IGRM.CourierNo,TMD.StoreInchargeID,TMD.QualityInchargeID,TMD.PlantInchargeID');
|
||||
$this->db->from ('T_MRIR_Master TMM');
|
||||
$this->db->join ('T_MRIR_Details TMD','TMM.MRIRNO = TMD.MRIRNO','left');
|
||||
$this->db->join ('T_IGR_Master IGRM','TMM.IGRNO=IGRM.IGRNO','left');
|
||||
$this->db->join ('T_IGR_Details IGRD','IGRM.IGRNO=IGRD.IGRNO','left');
|
||||
$this->db->order_by ('TMM.MRIRNO','asc');
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
|
||||
function master_mrir($mrirmastervalues)
|
||||
{
|
||||
|
||||
|
||||
$this->db->insert('T_MRIR_Master', $mrirmastervalues);
|
||||
|
||||
$insert_id = $this->db->affected_rows();
|
||||
|
||||
if($insert_id>0)
|
||||
{
|
||||
$subQuery = 'select max(MRIRNO) as MRIRNo from T_MRIR_Master';
|
||||
|
||||
$query = $this->db->query($subQuery);
|
||||
|
||||
return $query->result();//_array();
|
||||
}
|
||||
|
||||
}
|
||||
function detail_mrir($mrirdetailvalues)
|
||||
{
|
||||
|
||||
$this->db->insert('T_MRIR_Details',$mrirdetailvalues);
|
||||
$insert_id = $this->db->affected_rows();
|
||||
return $insert_id;
|
||||
|
||||
|
||||
}
|
||||
function mrir_detailtable($mrirdetailvalues)
|
||||
{
|
||||
|
||||
$this->db->trans_start();
|
||||
//print_r($mrirvalue2);
|
||||
$this->db->insert('T_MRIR_Details', $mrirvalue2);
|
||||
$insert_id = $this->db->affected_rows();
|
||||
$this->db->trans_complete();
|
||||
return $insert_id;
|
||||
|
||||
}
|
||||
|
||||
function get_IGRs($IgrNo)
|
||||
{
|
||||
$this->db->distinct();
|
||||
$this->db->select('IGRM.DeliveryChellanDate,IGRM.CreatedDate,IGRM.IGRNO,IGRM.VehicleNo,IGRM.DeliveryChellanOrInvoiceNo,IGRM.CourierNo,IGRM.PONO,IGRD.MaterialCode,IGRD.QuantityAsPerInvoice,POMR.ServiceDescription,POMR.PODate,POMR.DeliveryDate,POMR.CreatedBy,SUPP.SupplierName,SUPP.Address,MM.MaterialCode,MM.UOM,MM.MaterialName,POLT.Quantity,POLT.ReceivedQuantity');
|
||||
//$this->db->select("DATE_FORMAT(IGRM.DeliveryChellanDate, '%d %m %Y') as DCdate");
|
||||
$this->db->from('T_IGR_Master IGRM');
|
||||
$this->db->join('T_PurchaseOrder_Master POMR ','IGRM.PONO=POMR.PONO');
|
||||
$this->db->join('T_IGR_Details IGRD','IGRM.IGRNO=IGRD.IGRNO');
|
||||
$this->db->join('T_PurchaseOrder_LineItem POLT','IGRM.PONO=POLT.PONO and IGRD.MaterialCode = POLT.MaterialCode');
|
||||
$this->db->join('T_SupplierDetailsN SUPP','POMR.SupplierID=SUPP.SupplierID');
|
||||
$this->db->join('T_MaterialMaster MM',' MM.MaterialCode=IGRD.MaterialCode');
|
||||
$this->db->where('IGRM.IGRNO',$IgrNo);
|
||||
|
||||
$query = $this->db->get();
|
||||
$result = $query->result();
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function getIGRNOonly(){
|
||||
$this->db->select('IGRNO');
|
||||
$this->db->from('T_IGR_Master');
|
||||
$this->db->order_by('IGRNO', 'asc');
|
||||
$res=$this->db->get();
|
||||
return $res->result();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@ -485,13 +485,13 @@
|
||||
{
|
||||
?>
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>inwardgateregister/materialinspectionreport">
|
||||
<a href="<?php echo base_url(); ?>MRIRcontroller/materialinspectionreport">
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>Material Inspection Report Entry</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>inwardgateregister/viewmaterialinspectionreport">
|
||||
<a href="<?php echo base_url(); ?>MRIRcontroller/viewmaterialinspectionreport">
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>View Material Inspection Report</span>
|
||||
</a>
|
||||
|
||||
704
application/views/materialinspectionreport.php
Executable file → Normal file
704
application/views/materialinspectionreport.php
Executable file → Normal file
@ -1,353 +1,351 @@
|
||||
<script>
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$("#IGRNO").select2();
|
||||
$("#PurchaseOrderNoview").select2();
|
||||
$("#InvoiceDate").datepicker({
|
||||
//minDate : d,
|
||||
maxDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
});
|
||||
// For table
|
||||
(function(l,q){var e=function(b,c){b.extend(!0,c.defaults,{dom:"<'row'<'col-sm-9'l><'col-sm-3'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-8'i><'col-sm-4'p>>",renderer:"bootstrap"});b.extend(c.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});c.ext.renderer.pageButton.bootstrap=function(g,e,r,s,i,m){var t=new c.Api(g),u=g.oClasses,j=g.oLanguage.oPaginate,d,f,n=0,p=function(c,e){var k,h,o,a,l=function(a){a.preventDefault();
|
||||
b(a.currentTarget).hasClass("disabled")||t.page(a.data.action).draw(!1)};k=0;for(h=e.length;k<h;k++)if(a=e[k],b.isArray(a))p(c,a);else{f=d="";switch(a){case "ellipsis":d="…";f="disabled";break;case "first":d=j.sFirst;f=a+(0<i?"":" disabled");break;case "previous":d=j.sPrevious;f=a+(0<i?"":" disabled");break;case "next":d=j.sNext;f=a+(i<m-1?"":" disabled");break;case "last":d=j.sLast;f=a+(i<m-1?"":" disabled");break;default:d=a+1,f=i===a?"active":""}d&&(o=b("<li>",{"class":u.sPageButton+" "+
|
||||
f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("<a>",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html('<ul class="pagination"/>').children("ul"),s);h&&b(e).find("[data-dt-idx="+h+"]").focus()};c.TableTools&&(b.extend(!0,c.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},
|
||||
collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,c.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"===typeof define&&define.amd?define(["jquery","datatables"],e):"object"===typeof exports?e(require("jquery"),require("datatables")):jQuery&&e(jQuery,jQuery.fn.dataTable)})(window,document);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.modal
|
||||
{
|
||||
padding-right:25% ! important;
|
||||
}
|
||||
.select2
|
||||
{
|
||||
width: 100% ! important;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries - Material Receipt And Inspection Report</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content"><br/>
|
||||
<div class="row" style="padding-bottom:5%">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Enter Inward Gate Register Number </label>
|
||||
<div>
|
||||
<?php
|
||||
$options = array("0"=>'Inward Gate Register Number');
|
||||
|
||||
|
||||
echo form_dropdown('IGRNO', $options,set_value('IGRNO'),'id="IGRNO"' ,'class="form-control select2"' , 'required="true"' );
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3"> <br/>
|
||||
<a class="btn btn-primary" type="submit" data-toggle="modal" data-target="#Igrshow" data-dismiss="modal" >IGR Details</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>S.NO</th>
|
||||
<th>IGR No</th>
|
||||
<th>PO NO</th>
|
||||
|
||||
<th>Item Code</th>
|
||||
<th>Material</th>
|
||||
<th>Ordered Quantity</th>
|
||||
<th>Received Quantity</th>
|
||||
<th>Accepted Quantity</th>
|
||||
<th>Rejected Quantity</th>
|
||||
<th>Remarks</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td><a data-toggle="modal" data-target="#materialreport" data-dismiss="modal" >IGR0001</a></td>
|
||||
<td>PO0034</td>
|
||||
|
||||
<td>Sand12</td>
|
||||
<td>wast sand</td>
|
||||
<td>1000kgs</td>
|
||||
<td>1000kgs</td>
|
||||
<td>950kgs</td>
|
||||
<td>50kgs</td>
|
||||
<td>Damage In Bags</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td><a data-toggle="modal" data-target="#materialreport" data-dismiss="modal" >IGR0002</a></td>
|
||||
<td>PO0035</td>
|
||||
|
||||
<td>Sand12</td>
|
||||
<td>wast sand</td>
|
||||
<td>1000kgs</td>
|
||||
<td>1000kgs</td>
|
||||
<td>1000kgs</td>
|
||||
<td>0</td>
|
||||
<td>No remarks</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="materialreport" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:900px;">
|
||||
<div class="modal-header" style="background-color: #3c8dbc;color:#fff;">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4>Inward Gate Register Details After Inspection</h4></center>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>IGR Number :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
IGR0001
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label> Purchase Order Number:</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
PO0034
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Invoice Number :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
Inv12353
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Invoice Date:</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
6/9/2017
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Vechicle Number :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
TN G 34 3443
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Delivery Date :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
09/6/2017
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Supplier and Address :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
D.R Enterprises ,153/233,Uthukottai Taluk, Tiruvallur Dist,Chennai,Tamilnadu,Pin code : 602026.
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Comments Of Special Instructions :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
raw Sand , resin ordered
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- Table to show the line item of po -->
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th>Item Code</th>
|
||||
<th>Item Description</th>
|
||||
<th>UOM</th>
|
||||
<th>Ordred Quantity</th>
|
||||
<th>Received Quantity</th>
|
||||
<th>Accepted Quantity</th>
|
||||
<th>Rejected Quantity</th>
|
||||
<th>Remarks</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbleAppend">
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>RM002</td>
|
||||
<td>Raw sand</td>
|
||||
<td>Kgs</td>
|
||||
<td>10000</td>
|
||||
<td>10000</td>
|
||||
<td>10000</td>
|
||||
<td>0</td>
|
||||
<td>No remarks</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4">
|
||||
<label>Store Incharge :</label> Muthu
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Quality Incharge :</label> Raja
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Plant Incharge :</label> Visvanathan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-info" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="Igrshow" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:900px;">
|
||||
<div class="modal-header" style="background-color: #3c8dbc;color:#fff;">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4>Inward Gate Register Details</h4></center>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>IGR Number :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
IGR0001
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label> Purchase Order Number:</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
PO0034
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Invoice Number :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
Inv12353
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Invoice Date:</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
6/9/2017
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Supplier and Address :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
D.R Enterprises ,153/233,Uthukottai Taluk, Tiruvallur Dist,Chennai,Tamilnadu,Pin code : 602026.
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Comments Of Special Instructions :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
raw Sand , resin ordered
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" style="padding:2%;">
|
||||
<div class="col-md-4">
|
||||
Store Incharge
|
||||
<?php
|
||||
$data = array('name' => 'StoreIncharge','value' => set_value('StoreIncharge'),'id'=>'StoreIncharge', 'class' => 'form-control', 'required'=>'true' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
Quality Incharge
|
||||
<?php
|
||||
$data = array('name' => 'QualityIncharge','value' => set_value('QualityIncharge'),'id'=>'QualityIncharge', 'class' => 'form-control', 'required'=>'true' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
Plant Incharge
|
||||
<?php
|
||||
$data = array('name' => 'plantIncharge','value' => set_value('plantIncharge'),'id'=>'plantIncharge', 'class' => 'form-control', 'required'=>'true' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Table to show the line item of po -->
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th>Item Code</th>
|
||||
<th>Item Description</th>
|
||||
<th>UOM</th>
|
||||
<th>Ordred Quantity</th>
|
||||
<th>Received Quantity</th>
|
||||
<th>Accepted Quantity</th> <!-- It should be editable for gate keeper -->
|
||||
<th>Rejected Quantity</th> <!-- It should be editable for gate keeper -->
|
||||
<th>Remarks</th> <!-- It should be editable for gate keeper -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbleAppend">
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>RM002</td>
|
||||
<td>Raw sand</td>
|
||||
<td>Kgs</td>
|
||||
<td>10000</td>
|
||||
<td>10000</td>
|
||||
<td> </td> <!-- This value will be given by gate keeper once item received-->
|
||||
<td> </td> <!-- This value will be given by gate keeper once item received-->
|
||||
<td> </td> <!-- This value will be given by gate keeper once item received-->
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-info" type="submit" value="submit">Submit</a>
|
||||
<a class="btn btn-info" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
<!-- script for table , It works under the datatable plugin-->
|
||||
$(function () {
|
||||
$('#Inwardgateregistertable').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$IGRNO="";
|
||||
$PONO="";
|
||||
$VehicleNo="";
|
||||
$CourierNo="";
|
||||
$DeliveryChellanOrInvoiceNo="";
|
||||
$SupplierName="";
|
||||
$DeliveryChellanDate="";
|
||||
$dcdate="";
|
||||
$Address="";
|
||||
$CreatedBy="";
|
||||
$PODate="";
|
||||
$podate="";
|
||||
$IGRDate="";
|
||||
$igrdate="";
|
||||
$ServiceDescription="";
|
||||
$RowCount = 0;
|
||||
|
||||
if(!empty($IGRDetails))
|
||||
{
|
||||
|
||||
foreach ($IGRDetails as $IGR)
|
||||
{
|
||||
$IGRNO = $IGR->IGRNO;
|
||||
$PONO = $IGR->PONO;
|
||||
$VehicleNo = $IGR->VehicleNo;
|
||||
$CourierNo= $IGR->CourierNo;
|
||||
$DeliveryChellanOrInvoiceNo=$IGR->DeliveryChellanOrInvoiceNo;
|
||||
$SupplierName=$IGR->SupplierName;
|
||||
$DeliveryChellanDate=$IGR->DeliveryChellanDate;
|
||||
$dc_date = strtotime( $DeliveryChellanDate );
|
||||
$dcdate = date( 'd/m/Y', $dc_date );
|
||||
$Address=$IGR->Address;
|
||||
$CreatedBy=$IGR->CreatedBy;
|
||||
$PODate=$IGR->PODate;
|
||||
$po_date = strtotime( $PODate );
|
||||
$podate = date( 'd/m/Y', $po_date );
|
||||
$IGRDate=$IGR->CreatedDate;
|
||||
$igr_date = strtotime( $IGRDate );
|
||||
$igrdate = date( 'd/m/Y', $igr_date );
|
||||
$ServiceDescription=$IGR->ServiceDescription;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$("#QualityIncharge").select2();
|
||||
$("#plantIncharge").select2();
|
||||
|
||||
});//ready closed.
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.modal
|
||||
{
|
||||
padding-right:25% ! important;
|
||||
}
|
||||
.select2
|
||||
{
|
||||
width: 100% ! important;
|
||||
}
|
||||
.num{
|
||||
text-align:right;
|
||||
}
|
||||
.dataTables_wrapper {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries - Material Receipt And Inspection Report (MRIR)<!-- MRIR Number Should come --></center>
|
||||
</h1>
|
||||
|
||||
<?php
|
||||
$attributes = array('class' => 'form-label-left MRIR ','name' => 'MRIR','id' => 'MRIR');
|
||||
echo form_open($this->config->base_url().'/MRIRscreen/generateMRIR/',$attributes); ?>
|
||||
</section>
|
||||
<section class="content"><br/>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4">
|
||||
<label for="IGRNO">Inward Gate Register Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'IGRNO','value' => set_value('IGRNO',$IGRNO),'id'=>'IGRNO', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="IGRNO">Inward Gate Register Date</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'IGRDate','value' => set_value('IGRDate',$igrdate),'id'=>'IGRDate', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="SupplierName">Supplier Name </label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'SupplierName','value' => set_value('SupplierName',$SupplierName),'id'=>'SupplierName', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4">
|
||||
|
||||
<label for="PONO">Purchase Order Number</label>
|
||||
<div class="form-group"><?php
|
||||
$data = array('name' => 'PONO','value' => set_value('PONO',$PONO),'id'=>'PONO', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="PODate">Purchase Order Date</label>
|
||||
<div class="from-group">
|
||||
<?php
|
||||
$data = array('name' => 'PODate','value' => set_value('PODate',$podate),'id'=>'PODate', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="CreatedBy">Purchase Order Raised By</label>
|
||||
<div class="from-group"><?php
|
||||
$data = array('name' => 'CreatedBy','value' => set_value('CreatedBy',$CreatedBy),'id'=>'CreatedBy', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4">
|
||||
<label for="DeliveryChellanOrInvoiceNo">Delivery Challan / Invoice Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'DeliveryChellanOrInvoiceNo','value' => set_value('DeliveryChellanOrInvoiceNo',$DeliveryChellanOrInvoiceNo),'id'=>'DeliveryChellanOrInvoiceNo', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="DeliveryChellanDate">Delivery Challan / Invoice Date </label>
|
||||
<div class="form-group"><?php
|
||||
$data = array('type'=>'date','name' => 'DeliveryChellanDate','value' => set_value('DeliveryChellanDate',$dcdate),'id'=>'DeliveryChellanDate', 'class' => 'form-control num','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Store Incharge</label>
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'StoreIncharge','value' => set_value('StoreInchargeID',$name),'id'=>'StoreIncharge', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4">
|
||||
<label for="VehicleNo">Vehicle Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo',$VehicleNo),'id'=>'VehicleNo', 'class' => 'form-control num', 'required'=>'true' ,'readonly' => 'true','align' => 'left');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="CourierNo">Courier Number</label>
|
||||
<div class="form-group"><?php
|
||||
$data = array('name' => 'CourierNo','value' => set_value('CourierNo',$CourierNo),'id'=>'CourierNo', 'class' => 'form-control num', 'required'=>'true' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-12">
|
||||
<label for="Address">Supplier Address</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Address','value' => set_value('Address',$Address),'id'=>'Address', 'class' => 'form-control' ,'readonly' => 'true' , 'rows'=>'4' ,'columns'=> '3');
|
||||
echo Form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<label for="Address">Service Description</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ServiceDescription','value' => set_value('ServiceDescription',$ServiceDescription),'id'=>'ServiceDescription', 'class' => 'form-control' ,'readonly' => 'true' , 'rows'=>'4' ,'columns'=> '3');
|
||||
echo Form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row" style="padding:3%;">
|
||||
<div class="col-md-12">
|
||||
<table id="mytable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>S.NO</th>
|
||||
<th>Item Code</th>
|
||||
<th>Material</th>
|
||||
<th>UOM</th>
|
||||
<th>Ordered Quantity</th>
|
||||
<th>Adviced Quantity as per the Challan</th>
|
||||
<th>Actual Quantity Received</th>
|
||||
<!--<th>Accepted_Quantity</th>-->
|
||||
<!--<th>Rejected_Quantity</th>-->
|
||||
<th>Remarks</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbleAppend">
|
||||
<?php $SNo =0;
|
||||
|
||||
if(!empty($IGRDetails))
|
||||
|
||||
{
|
||||
|
||||
foreach($IGRDetails as $record)
|
||||
{
|
||||
$SNo =$SNo + 1;
|
||||
|
||||
|
||||
?>
|
||||
<tr>
|
||||
|
||||
|
||||
<td><?php echo $SNo?></td>
|
||||
<td><?php echo $record->MaterialCode?></td>
|
||||
<input type="text" name="<?php echo 'MaterialCode'.$SNo ?>" id="<?php echo 'MaterialCode'.$SNo ?>" value=" <?php echo $record->MaterialCode ?> "/>
|
||||
<td><?php echo $record->MaterialName?></td>
|
||||
<td><?php echo $record->UOM?></td>
|
||||
<td class="num"><?php echo $record->Quantity?></td>
|
||||
<td class="num"><?php echo $record->QuantityAsPerInvoice?></td>
|
||||
<input type="hidden" name="<?php echo 'QuantityAsPerInvoice'.$SNo ?>" id="<?php echo 'QuantityAsPerInvoice'.$SNo ?>" />
|
||||
<td><input type="text" id="<?php echo 'ActualQuantity'.$SNo;?>" name="<?php echo 'ActualQuantity'.$SNo;?>" onchange="setactual('<?php echo $SNo;?>');"></td>
|
||||
<input type="hidden" name="<?php echo 'ActualQuantityReceived'.$SNo ?>" id="<?php echo 'ActualQuantityReceived'.$SNo ?>" value=""/>
|
||||
<td><input type="text" id="<?php echo 'Remark'.$SNo ?>" name="<?php echo 'Remark'.$SNo ?>" onchange="setremark('<?php echo $SNo;?>');"></td>
|
||||
<input type="hidden" name="<?php echo 'Remarks'.$SNo ?>" id="<?php echo 'Remarks'.$SNo ?>" />
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
|
||||
} echo $SNo; }
|
||||
|
||||
$RowCount = $SNo;
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col-md-1 col-md-offset-11">
|
||||
<a class="btn btn-primary" type="submit" onclick="savemrir()">Generate MRIR</a>
|
||||
<input type="hidden" name="RowCount" id="RowCount " value="<?php echo $RowCount ?>" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
<!-- script for table , It works under the datatable plugin-->
|
||||
$(function () {
|
||||
$('#Inwardgateregistertable').DataTable({
|
||||
"paging": false,
|
||||
"lengthChange": false,
|
||||
"searching": false,
|
||||
"ordering": false,
|
||||
"info": false,
|
||||
"autoWidth": false
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function setactual(rowId)
|
||||
{
|
||||
//alert(rowId);
|
||||
var actual = parseFloat($('#ActualQuantity'+rowId).val());
|
||||
//alert(actual);
|
||||
}
|
||||
function setremark(rowId)
|
||||
{
|
||||
var remark = ($('#Remark'+rowId).val());
|
||||
alert(remark);
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function savemrir()
|
||||
{
|
||||
alert("save function worked ");
|
||||
|
||||
|
||||
$.ajax({
|
||||
data:$('.MRIR').serialize(),
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>MRIRcontroller/displaying_values",
|
||||
|
||||
success:function(data) {
|
||||
//alert(data);
|
||||
|
||||
if(data){
|
||||
//$("#content").load('show');
|
||||
alert("MRIR value generated");
|
||||
//window.location ="<?php echo base_url() ?> ";
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
|
||||
}//success function closed
|
||||
});//ajax closed
|
||||
}//save function closed
|
||||
</script>
|
||||
401
application/views/viewmaterialinspectionreport.php
Normal file
401
application/views/viewmaterialinspectionreport.php
Normal file
@ -0,0 +1,401 @@
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// For table
|
||||
(function(l,q){var e=function(b,c){b.extend(!0,c.defaults,{dom:"<'row'<'col-sm-9'l><'col-sm-3'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-9'i><'col-sm-3'p>>",renderer:"bootstrap"});b.extend(c.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});c.ext.renderer.pageButton.bootstrap=function(g,e,r,s,i,m){var t=new c.Api(g),u=g.oClasses,j=g.oLanguage.oPaginate,d,f,n=0,p=function(c,e){var k,h,o,a,l=function(a){a.preventDefault();
|
||||
b(a.currentTarget).hasClass("disabled")||t.page(a.data.action).draw(!1)};k=0;for(h=e.length;k<h;k++)if(a=e[k],b.isArray(a))p(c,a);else{f=d="";switch(a){case "ellipsis":d="…";f="disabled";break;case "first":d=j.sFirst;f=a+(0<i?"":" disabled");break;case "previous":d=j.sPrevious;f=a+(0<i?"":" disabled");break;case "next":d=j.sNext;f=a+(i<m-1?"":" disabled");break;case "last":d=j.sLast;f=a+(i<m-1?"":" disabled");break;default:d=a+1,f=i===a?"active":""}d&&(o=b("<li>",{"class":u.sPageButton+" "+
|
||||
f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("<a>",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html('<ul class="pagination"/>').children("ul"),s);h&&b(e).find("[data-dt-idx="+h+"]").focus()};c.TableTools&&(b.extend(!0,c.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},
|
||||
collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,c.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"===typeof define&&define.amd?define(["jquery","datatables"],e):"object"===typeof exports?e(require("jquery"),require("datatables")):jQuery&&e(jQuery,jQuery.fn.dataTable)})(window,document);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.modal
|
||||
{
|
||||
padding-right:25% ! important;
|
||||
}
|
||||
.num{
|
||||
text-align:right;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries - View Material Receipt And Inspection Report</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content"><br/>
|
||||
<div class="row" style="padding-bottom:5%">
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<table id="MRIRtable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>S.NO</th>
|
||||
<th>MRIR NO</th>
|
||||
<th>IGR NO</th>
|
||||
<th>PO NO</th>
|
||||
<th>Invoice NO</th>
|
||||
<th>Invoice Date</th>
|
||||
<th>Vechicle NO / Courier NO</th>
|
||||
<th>Store Incharge</th>
|
||||
<th>Quality Incharge</th>
|
||||
<th>Plant Incharge</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
if(!empty($mrirdatas2))
|
||||
{
|
||||
$Index=0;
|
||||
foreach($mrirdatas2 as $d)
|
||||
{
|
||||
$Index= $Index+1;
|
||||
?>
|
||||
|
||||
<tr id="<?php echo $Index ?>">
|
||||
|
||||
<td align="right"><?php echo $Index ?></td>
|
||||
<td><a data-toggle="modal" data-target="#materialreport" data-userid="<?php echo $d->MRIRNO ?>" data-id="<%=Index%>" data-dismiss="modal" ><?php echo $d->MRIRNO ?> </a></td>
|
||||
<td><?php echo $d->IGRNO ?></td>
|
||||
<td><?php echo $d->PONO ?></td>
|
||||
<td align="right"><?php echo $d->DeliveryChellanOrInvoiceNo ?></td>
|
||||
<td align="right"><?php
|
||||
$date = new DateTime($d->DeliveryChellanDate);
|
||||
echo $date->format('d/m/Y'); ?></td>
|
||||
<td><?php echo $d->VehicleNo ?></td>
|
||||
<td><?php echo $d->StoreInchargeID ?></td>
|
||||
<!--<td><?php echo $d->QualityInchargeID ?></td>-->
|
||||
<!--<td><?php echo $d->PlantInchargeID ?></td>-->
|
||||
</tr>
|
||||
<?php
|
||||
}} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content1">
|
||||
<div class="modal fade" id="materialreport" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:900px;">
|
||||
<div class="modal-header" style="background-color: #3c8dbc;color:#fff;">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4>Material Recepit And Inspection Report</h4></center>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>IGR Number :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'IGRNO','value' => set_value('IGRNO'),'id'=>'IGRNO', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data);echo"<br>";
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label> Purchase Order Number:</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'PONO','value' => set_value('PONO'),'id'=>'PONO', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data);echo"<br>";
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Invoice Number :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'DeliveryChellanOrInvoiceNo','value' => set_value('DeliveryChellanOrInvoiceNo'),'id'=>'DeliveryChellanOrInvoiceNo', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data);echo"<br>";
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Invoice Date:</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'DeliveryChellanDate','value' => set_value('DeliveryChellanDate'),'id'=>'DeliveryChellanDate', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data);echo"<br>";
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Vechicle Number :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?php
|
||||
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo'),'id'=>'VehicleNo', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data);echo"<br>";
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Delivery Date :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?php
|
||||
$data = array('name' => 'DeliveryDate','value' => set_value('DeliveryDate'),'id'=>'DeliveryDate', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data);echo"<br>";
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Supplier and Address :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?php
|
||||
$data = array('name' => 'SupplierName','value' => set_value('SupplierName'),'id'=>'SupplierName', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data); echo"<br>";
|
||||
$data = array('name' => 'Address','value' => set_value('Address'),'id'=>'Address','class' =>'form-control','rows' => '4','cols' => '50','style' => 'width:100%' ,'readonly'=>'true');
|
||||
echo form_textarea($data); echo"<br>";
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Comments Of Special Instructions :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?php
|
||||
$data = array('name' => 'Remarks','value' => set_value('Remarks'),'id'=>'Remarks', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data); echo"<br>";
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- Table to show the line item of po -->
|
||||
<table class="table table-bordered" id="mytable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th>Item Code</th>
|
||||
<th>Item Description</th>
|
||||
<th>UOM</th>
|
||||
<th>Ordred Quantity</th>
|
||||
<th>Received Quantity as per the Challan</th>
|
||||
<th>Received Quantity</th>
|
||||
<th>Accepted Quantity</th>
|
||||
<th>Rejected Quantity</th>
|
||||
<th>Remarks</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbleAppend">
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4">
|
||||
<label>Store Incharge :</label>
|
||||
<?php
|
||||
$data = array('name' => 'StoreIncharge1','value' => set_value('StoreInchargeID'),'id'=>'StoreIncharge', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<!--<label>Quality Incharge :</label>-->
|
||||
<?php
|
||||
$data = array('name' => 'QualityIncharge1','value' => set_value('QualityInchargeID'),'id'=>'QualityIncharge', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_hidden($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<!--<label>Plant Incharge :</label>-->
|
||||
<?php
|
||||
$data = array('name' => 'PlantIncharge1','value' => set_value('PlantInchargeID'),'id'=>'PlantIncharge', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_hidden($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-info" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--id div closed-->
|
||||
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
<!-- script for table , It works under the datatable plugin-->
|
||||
$(function () {
|
||||
$('#MRIRtable').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$("#materialreport").on("shown.bs.modal", function(e) {
|
||||
alert("inside model popup");
|
||||
|
||||
var MRIRNO = $(e.relatedTarget).data('userid');
|
||||
|
||||
alert(MRIRNO);
|
||||
//$('#content1').loader('show');
|
||||
$("#IGRNO").val('');
|
||||
$("#PONO").val('');
|
||||
$("#DeliveryChellanOrInvoiceNo").val('');
|
||||
$("#DeliveryChellanDate").val('');
|
||||
$("#VehicleNo").val('');
|
||||
//$("#CourierNo").val('');
|
||||
$('#DeliveryDate').val('');
|
||||
$("#SupplierName").val('');
|
||||
$("#Address").val('');
|
||||
$('#Remarks1').val('');
|
||||
$("#tableid").empty();
|
||||
$("#StoreIncharge").val('');
|
||||
$("#PlantIncharge").val('');
|
||||
$("#QualityIncharge").val('');
|
||||
|
||||
|
||||
// //alert("HAI");
|
||||
// // $("#content").load('show');
|
||||
|
||||
$.ajax({
|
||||
data:{mrirno:MRIRNO},
|
||||
type:"POST",
|
||||
//datatype:"json",
|
||||
url:"<?php echo base_url() ?>MRIRscreen/displaying_MRIRvalues",
|
||||
|
||||
success:function(data){
|
||||
alert(data);
|
||||
|
||||
// var obj = $.parseJSON(data);
|
||||
// alert(obj.IGRNO);
|
||||
|
||||
// var data = $.parseJSON(json);
|
||||
// alert(JSON.stringify(data));
|
||||
// alert(json);
|
||||
|
||||
|
||||
// $("#IGRNO").val(data)
|
||||
// $("#IGRNO").val(data.result[0]['IGRNO']);
|
||||
|
||||
// alert(data.result[0]['IGRNO']);
|
||||
// $("#PONO").val(json.data[0][])
|
||||
// $("#IGRNO").val(json.other[0]['IGRNO']);
|
||||
|
||||
|
||||
// $("#PONO").val(data.result[0]['PONO']);
|
||||
// $("#VehicleNo").val(data.result[0]['VehicleNo']);
|
||||
// $("#CourierNo").val(data.result[0]['CourierNo']);
|
||||
// $("#DeliveryChellanOrInvoiceNo").val(data.result[0]['DeliveryChellanOrInvoiceNo']);
|
||||
// $("#SupplierName").val(data.result[0]['SupplierName']);
|
||||
// $("#DeliveryChellanDate").val(data.result[0]['DeliveryChellanDate']);
|
||||
// $("#Address").val(data.result[0]['Address']);
|
||||
// $("#DeliveryDate").val(data.result[0]['DeliveryDate']);
|
||||
// $('#Remarks1').val(data.result[0]['ServiceDescription']);
|
||||
// $("#tbleAppend").val(data.result2[0]);
|
||||
// $("#StoreIncharge").val(data.result[0]['StoreInchargeID']);
|
||||
// $("#PlantIncharge").val(data.result[0]['PlantInchargeID']);
|
||||
// $("#QualityIncharge").val(data.result[0]['QualityInchargeID']);
|
||||
// $("#tbleAppend").val(data.result2);
|
||||
// alert(data.result2[0]['MaterialCode']);
|
||||
// var tb="<tr><td>SAMPLE</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>5</td><td>6</td><td>7</td><td>8</td></tr>";
|
||||
var tble='';
|
||||
//var obj=JSON.stringify(data);
|
||||
var obj = $.parseJSON(data);
|
||||
//var obj = JSON.parse(data);
|
||||
|
||||
alert(obj);
|
||||
|
||||
// $("#DeliveryDate").val(new DateTime(item.DeliveryDate)->format('d.m.Y'));
|
||||
//alert(tb);
|
||||
//var dt = new DateTime(item.DeliveryDate);
|
||||
var d;
|
||||
|
||||
var dout;
|
||||
$.each(obj,function (i,item) {
|
||||
alert("inside each");
|
||||
//var dt = new DateTime(item.DeliveryDate);
|
||||
//alert(dt);
|
||||
//d = item.DeliveryDate;
|
||||
//dout = Date.parse(d);
|
||||
//$("#date").text();
|
||||
|
||||
|
||||
$("#IGRNO").val(item.IGRNO);
|
||||
//alert(item.IGRNO);
|
||||
$("#PONO").val(item.PONO);
|
||||
//alert(PONO);
|
||||
$("#DeliveryChellanOrInvoiceNo").val(item.DeliveryChellanOrInvoiceNo);
|
||||
var dcd = new Date(item.DeliveryChellanDate);
|
||||
alert(dcd.getDate()+ '.' + (dcd.getMonth() + 1)+ '.' + dcd.getFullYear());
|
||||
var dcd2 = (dcd.getDate()+ '.' + (dcd.getMonth() + 1)+ '.' + dcd.getFullYear());
|
||||
$("#DeliveryChellanDate").val(dcd2);
|
||||
$("#VehicleNo").val(item.VehicleNo);
|
||||
//$("#CourierNo").val(item.CourierNo);
|
||||
var ddate = new Date(item.DeliveryDate);
|
||||
//alert(dd.getDate()+ '.' + (dd.getMonth() + 1)+ '.' + dd.getFullYear());
|
||||
var ddate2 = (ddate.getDate()+ '.' + (ddate.getMonth() + 1)+ '.' + ddate.getFullYear());
|
||||
//$("#DeliveryDate").val(dout.toString('M-d-yyyy'));
|
||||
$("#DeliveryDate").val(ddate2);
|
||||
$("#SupplierName").val(item.SupplierName);
|
||||
$("#Address").val(item.Address);
|
||||
$('#Remarks').val(item.ServiceDescription);
|
||||
$("#StoreIncharge").val(item.StoreInchargeID);
|
||||
$("#PlantIncharge").val(item.PlantInchargeID);
|
||||
$("#QualityIncharge").val(item.QualityInchargeID);
|
||||
|
||||
i=i+1;
|
||||
|
||||
tble += '<tr><td>'+i+
|
||||
'</td><td>'+item.MaterialCode+
|
||||
'</td><td>'+item.MaterialName+
|
||||
'</td><td>'+item.UOM+
|
||||
'</td><td>'+item.Quantity+
|
||||
'</td><td>'+item.ReceivedQuantity+
|
||||
'</td><td>'+item.ActualQuantityReceived+
|
||||
'</td><td>'+item.QuantityAccepted+
|
||||
'</td><td>'+item.QuantityRejected+
|
||||
'</td><td>'+item.Remarks1+
|
||||
'</td></tr>';
|
||||
|
||||
|
||||
});//each loop closed
|
||||
$("#tbleAppend").empty();
|
||||
|
||||
$("#mytable > tbody").append(tble);
|
||||
}// function closed
|
||||
});//ajax closed
|
||||
});//modal closed
|
||||
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user