ogr and report issues fixes
This commit is contained in:
parent
9981afe243
commit
91b0152ffc
@ -226,6 +226,11 @@ $route['Addigr'] = "inwardgateregister/addinwardgateregister";
|
|||||||
$route['ViewigrDetails'] = "inwardgateregister/viewIGRDetails";
|
$route['ViewigrDetails'] = "inwardgateregister/viewIGRDetails";
|
||||||
$route['ViewMRIRBilling'] = "MRIRcontroller/viewmrirforbilling";
|
$route['ViewMRIRBilling'] = "MRIRcontroller/viewmrirforbilling";
|
||||||
|
|
||||||
|
/**------------Application OGR Page------------------**/
|
||||||
|
$route['AddOgr'] = "inwardgateregister/addoutwardgateregister";
|
||||||
|
$route['ViewOgr'] = "inwardgateregister/ViewOgr";
|
||||||
|
$route['EditOGR']="inwardgateregister/EditOGR";
|
||||||
|
|
||||||
/**------------Application MRIR Routes---------------**/
|
/**------------Application MRIR Routes---------------**/
|
||||||
|
|
||||||
$route['EditMRIR'] = "MRIRcontroller/editmaterialinspectionreport";
|
$route['EditMRIR'] = "MRIRcontroller/editmaterialinspectionreport";
|
||||||
|
|||||||
@ -277,8 +277,45 @@ class inwardgateregister extends BaseController
|
|||||||
echo "Not Updated!";
|
echo "Not Updated!";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addoutwardgateregister()
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->load->model('inwardgateregister_model');
|
||||||
|
$this->global['pageTitle'] = $this->CompanyName.' : Add Outward Gate Register';
|
||||||
|
|
||||||
|
$data['Customer'] = $this->inwardgateregister_model->getCustomer();
|
||||||
|
$data['Supplier'] = $this->inwardgateregister_model->getSupplier();
|
||||||
|
$data['storedmaterialcode'] = $this->inwardgateregister_model->getstoredmaterialcode();
|
||||||
|
|
||||||
|
$this->loadViews("ogr", $this->global, $data, NULL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function ViewOgr()
|
||||||
|
{
|
||||||
|
$this->load->model('inwardgateregister_model');
|
||||||
|
$this->global['pageTitle'] = $this->CompanyName.' : View Outward Gate Register';
|
||||||
|
|
||||||
|
$data['OGR_Data'] = $this->inwardgateregister_model->getOGRData();
|
||||||
|
|
||||||
|
$this->loadViews("ogrlist", $this->global, $data, NULL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function EditOGR()
|
||||||
|
{
|
||||||
|
$OGRNO = $_GET['OGRNO'];
|
||||||
|
$MRIRNO = $_GET['MRIRNO'];
|
||||||
|
$this->global['pageTitle'] = $this->CompanyName.' : View Outward Gate Register';
|
||||||
|
$data['OGR_Data'] = $this->inwardgateregister_model->getOGRDataforedit($OGRNO);
|
||||||
|
$data['OGR_line'] = $this->inwardgateregister_model->getOGRlineDataforedit($OGRNO,$MRIRNO);
|
||||||
|
$this->loadViews("editogr", $this->global, $data, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To load pagenotfound view
|
* To load pagenotfound view
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -8,12 +8,9 @@ class batchcard_model extends CI_Model
|
|||||||
$this->db2 = $this->load->database('invoicedb', TRUE);
|
$this->db2 = $this->load->database('invoicedb', TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// function selectquery(){
|
/*
|
||||||
// $query = $this->db2->get('ip_invoices');
|
* stock details
|
||||||
// return $query->result();
|
*/
|
||||||
// }
|
|
||||||
|
|
||||||
//presented
|
|
||||||
function getSupplierlist(){
|
function getSupplierlist(){
|
||||||
|
|
||||||
$this->db->select('SupplierName,SupplierID');
|
$this->db->select('SupplierName,SupplierID');
|
||||||
@ -23,7 +20,9 @@ class batchcard_model extends CI_Model
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function getinvoice_products()
|
function getinvoice_products()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -34,7 +33,9 @@ class batchcard_model extends CI_Model
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function get_consumablematerials()
|
function get_consumablematerials()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -46,7 +47,9 @@ class batchcard_model extends CI_Model
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function get_rawmaterials()
|
function get_rawmaterials()
|
||||||
{
|
{
|
||||||
$this->db->select('MaterialCode,MaterialName,');
|
$this->db->select('MaterialCode,MaterialName,');
|
||||||
@ -56,7 +59,9 @@ class batchcard_model extends CI_Model
|
|||||||
return $supp->result();
|
return $supp->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function get_packmaterials()
|
function get_packmaterials()
|
||||||
{
|
{
|
||||||
$this->db->select('MaterialCode,MaterialName,');
|
$this->db->select('MaterialCode,MaterialName,');
|
||||||
@ -66,78 +71,80 @@ class batchcard_model extends CI_Model
|
|||||||
return $supp->result();
|
return $supp->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function getMaterial()
|
function getMaterial()
|
||||||
{
|
{
|
||||||
$this->db->select('MaterialCode,MaterialName,');
|
$this->db->select('MaterialCode,MaterialName,');
|
||||||
$this->db->from('T_MaterialMaster');
|
$this->db->from('T_MaterialMaster');
|
||||||
//$this->db->where('T_MaterialMaster.Category',Consumables);
|
|
||||||
$supp = $this->db->get();
|
$supp = $this->db->get();
|
||||||
return $supp->result();
|
return $supp->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function GettotalQty($MaterialCode,$date)
|
function GettotalQty($MaterialCode,$date)
|
||||||
{
|
{
|
||||||
echo $model;
|
echo $model;
|
||||||
$dt = date('d',strtotime($date));
|
$dt = date('d',strtotime($date));
|
||||||
$year = date('Y', strtotime($date));
|
$year = date('Y', strtotime($date));
|
||||||
$month = date('m', strtotime($date));
|
$month = date('m', strtotime($date));
|
||||||
if($month<04)
|
if($month<04)
|
||||||
{
|
{
|
||||||
//echo "b4finance";
|
|
||||||
$newyr = $year - 1;
|
$newyr = $year - 1;
|
||||||
$startdate = $newyr.'-'.'04'.'-'.'01';
|
$startdate = $newyr.'-'.'04'.'-'.'01';
|
||||||
|
|
||||||
//echo $startdate;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//echo "after Finance";
|
|
||||||
$startdate = $year.'-'.'04'.'-'.'01';
|
$startdate = $year.'-'.'04'.'-'.'01';
|
||||||
// echo $startdate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$nedt= $dt;
|
$nedt= $dt;
|
||||||
|
|
||||||
$newdate=$year.'-'.$month.'-'.$nedt;
|
$newdate=$year.'-'.$month.'-'.$nedt;
|
||||||
|
|
||||||
$subQuery='select T_MaterialMaster.MaterialName,T_Material_stock_history.MaterialCode,ifnull((select ifnull(sum(Quantity),0) as AddQty from T_Material_stock_history
|
$subQuery='select T_MaterialMaster.MaterialName,T_Material_stock_history.MaterialCode,ifnull((select ifnull(sum(Quantity),0) as AddQty from T_Material_stock_history
|
||||||
where Transaction_type = "Add" and MaterialCode=?),0) as Addqty,
|
where Transaction_type = "Add" and MaterialCode=?),0) as Addqty,
|
||||||
ifnull((select ifnull(sum(Quantity),0) as ReduceQty from T_Material_stock_history where Transaction_type = "Reduce"
|
ifnull((select ifnull(sum(Quantity),0) as ReduceQty from T_Material_stock_history where Transaction_type = "Reduce"
|
||||||
and MaterialCode=?),0) as ReduceQty from T_Material_stock_history join T_MaterialMaster on T_Material_stock_history.MaterialCode=T_MaterialMaster.MaterialCode where T_Material_stock_history.MaterialCode=?
|
and MaterialCode=?),0) as ReduceQty from T_Material_stock_history join T_MaterialMaster on T_Material_stock_history.MaterialCode=T_MaterialMaster.MaterialCode where T_Material_stock_history.MaterialCode=?
|
||||||
and CreatedOn >= ? and CreatedOn<=? group by Addqty';
|
and CreatedOn >= ? and CreatedOn<=? group by Addqty';
|
||||||
|
|
||||||
|
$query = $this->db->query($subQuery,array($MaterialCode,$MaterialCode,$MaterialCode,$startdate,$newdate));
|
||||||
|
|
||||||
$query = $this->db->query($subQuery,array($MaterialCode,$MaterialCode,$MaterialCode,$startdate,$newdate));
|
return $query->result_array();
|
||||||
//print_r($this->db->last_query());
|
|
||||||
return $query->result_array();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function GetNetQty($MaterialCode,$date,$Supplier)
|
function GetNetQty($MaterialCode,$date,$Supplier)
|
||||||
{
|
{
|
||||||
//echo $date;
|
|
||||||
$dt = date('d',strtotime($date));
|
$dt = date('d',strtotime($date));
|
||||||
$year = date('Y', strtotime($date));
|
$year = date('Y', strtotime($date));
|
||||||
$month = date('m', strtotime($date));
|
$month = date('m', strtotime($date));
|
||||||
|
|
||||||
if($month<04)
|
if($month<04)
|
||||||
{
|
{
|
||||||
//echo "b4finance";
|
|
||||||
$newyr = $year - 1;
|
$newyr = $year - 1;
|
||||||
$startdate = $newyr.'-'.'04'.'-'.'01';
|
$startdate = $newyr.'-'.'04'.'-'.'01';
|
||||||
|
|
||||||
//echo $startdate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//echo "after Finance";
|
|
||||||
$startdate = $year.'-'.'04'.'-'.'01';
|
$startdate = $year.'-'.'04'.'-'.'01';
|
||||||
// echo $startdate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$nedt= $dt+1;
|
$nedt= $dt+1;
|
||||||
@ -145,26 +152,23 @@ class batchcard_model extends CI_Model
|
|||||||
$newdate=$year.'-'.$month.'-'.$nedt;
|
$newdate=$year.'-'.$month.'-'.$nedt;
|
||||||
|
|
||||||
|
|
||||||
// $subQuery='select (select sum(Quantity) as AddQty from T_Material_stock_history where Transaction_type = "Add" and MaterialCode=?
|
$subQuery='select ifnull((select ifnull(sum(Quantity),0) as AddQty from T_Material_stock_history
|
||||||
// ) as Addqty,(select sum(Quantity) as ReduceQty from T_Material_stock_history where Transaction_type = "Reduce" and MaterialCode=?
|
where Transaction_type = "Add" and MaterialCode=? and SupplierID=? ),0) as Addqty,
|
||||||
// ) as ReduceQty from T_Material_stock_history where MaterialCode=? and CreatedOn >= ? and CreatedOn<=? and SupplierID=? group by Addqty';
|
ifnull((select ifnull(sum(Quantity),0) as ReduceQty from T_Material_stock_history where Transaction_type = "Reduce"
|
||||||
|
and MaterialCode=? and SupplierID=? ),0) as ReduceQty from T_Material_stock_history where MaterialCode=?
|
||||||
|
and CreatedOn >= ? and CreatedOn<=? and SupplierID=? group by Addqty';
|
||||||
$subQuery='select ifnull((select ifnull(sum(Quantity),0) as AddQty from T_Material_stock_history
|
|
||||||
where Transaction_type = "Add" and MaterialCode=? and SupplierID=? ),0) as Addqty,
|
|
||||||
ifnull((select ifnull(sum(Quantity),0) as ReduceQty from T_Material_stock_history where Transaction_type = "Reduce"
|
|
||||||
and MaterialCode=? and SupplierID=? ),0) as ReduceQty from T_Material_stock_history where MaterialCode=?
|
|
||||||
and CreatedOn >= ? and CreatedOn<=? and SupplierID=? group by Addqty';
|
|
||||||
|
|
||||||
$query = $this->db->query($subQuery,array($MaterialCode,$Supplier,$MaterialCode,$Supplier,$MaterialCode,$startdate,$newdate,$Supplier));
|
$query = $this->db->query($subQuery,array($MaterialCode,$Supplier,$MaterialCode,$Supplier,$MaterialCode,$startdate,$newdate,$Supplier));
|
||||||
//print_r($this->db->last_query());
|
|
||||||
return $query->result_array();
|
return $query->result_array();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
function GetMaterialHistory($AdjustmentId)
|
*stock details
|
||||||
|
*/
|
||||||
|
function GetMaterialHistory($AdjustmentId)
|
||||||
{
|
{
|
||||||
$this->db->select('T_Material_Adjustment.*,SupplierName,MaterialName');
|
$this->db->select('T_Material_Adjustment.*,SupplierName,MaterialName');
|
||||||
$this->db->from('T_Material_Adjustment');
|
$this->db->from('T_Material_Adjustment');
|
||||||
@ -179,15 +183,16 @@ class batchcard_model extends CI_Model
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function AddmaterialAdjustment($adjustmentaarray)
|
function AddmaterialAdjustment($adjustmentaarray)
|
||||||
{
|
{
|
||||||
$this->db->trans_start();
|
$this->db->trans_start();
|
||||||
$this->db->insert('T_Material_Adjustment',$adjustmentaarray);
|
$this->db->insert('T_Material_Adjustment',$adjustmentaarray);
|
||||||
$insert_id = $this->db->affected_rows();
|
$insert_id = $this->db->affected_rows();
|
||||||
$this->db->trans_complete();
|
$this->db->trans_complete();
|
||||||
// print_r($this->db->last_query());
|
|
||||||
//print_r($insert_id);
|
|
||||||
if($insert_id>0)
|
if($insert_id>0)
|
||||||
{
|
{
|
||||||
$subQuery = 'select max(AdjustmentId) as AdjustmentId from T_Material_Adjustment';
|
$subQuery = 'select max(AdjustmentId) as AdjustmentId from T_Material_Adjustment';
|
||||||
@ -197,7 +202,9 @@ class batchcard_model extends CI_Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function AddMaterialHistory($historytable)
|
function AddMaterialHistory($historytable)
|
||||||
{
|
{
|
||||||
$this->db->trans_start();
|
$this->db->trans_start();
|
||||||
@ -208,15 +215,16 @@ class batchcard_model extends CI_Model
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function insert_final_product($final_master)
|
function insert_final_product($final_master)
|
||||||
{
|
{
|
||||||
$this->db->trans_start();
|
$this->db->trans_start();
|
||||||
$this->db->insert('T_FinalProduct_Master',$final_master);
|
$this->db->insert('T_FinalProduct_Master',$final_master);
|
||||||
$insert_id = $this->db->affected_rows();
|
$insert_id = $this->db->affected_rows();
|
||||||
$this->db->trans_complete();
|
$this->db->trans_complete();
|
||||||
// print_r($this->db->last_query());
|
|
||||||
//print_r($insert_id);
|
|
||||||
if($insert_id>0)
|
if($insert_id>0)
|
||||||
{
|
{
|
||||||
$subQuery = 'select max(FPId) as PId from T_FinalProduct_Master';
|
$subQuery = 'select max(FPId) as PId from T_FinalProduct_Master';
|
||||||
@ -226,7 +234,9 @@ class batchcard_model extends CI_Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function save_finalraw($rawarray)
|
function save_finalraw($rawarray)
|
||||||
{
|
{
|
||||||
$this->db->trans_start();
|
$this->db->trans_start();
|
||||||
@ -238,7 +248,9 @@ class batchcard_model extends CI_Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function save_finalcon($conarray)
|
function save_finalcon($conarray)
|
||||||
{
|
{
|
||||||
$this->db->trans_start();
|
$this->db->trans_start();
|
||||||
@ -247,29 +259,35 @@ class batchcard_model extends CI_Model
|
|||||||
$this->db->trans_complete();
|
$this->db->trans_complete();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//presented
|
|
||||||
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function save_finalpacking($packarray)
|
function save_finalpacking($packarray)
|
||||||
{
|
{
|
||||||
$this->db->trans_start();
|
$this->db->trans_start();
|
||||||
$this->db->insert('T_FinalProduct_PackingMaterials',$packarray);
|
$this->db->insert('T_FinalProduct_PackingMaterials',$packarray);
|
||||||
$insert_id = $this->db->affected_rows();
|
$insert_id = $this->db->affected_rows();
|
||||||
$this->db->trans_complete();
|
$this->db->trans_complete();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function save_finalcoproduct($coparray)
|
function save_finalcoproduct($coparray)
|
||||||
{
|
{
|
||||||
|
|
||||||
//print_r($coparray);
|
$this->db->trans_start();
|
||||||
$this->db->trans_start();
|
|
||||||
$this->db->insert('T_FinalProduct_CoProduct_Materials',$coparray);
|
$this->db->insert('T_FinalProduct_CoProduct_Materials',$coparray);
|
||||||
$insert_id = $this->db->affected_rows();
|
$insert_id = $this->db->affected_rows();
|
||||||
$this->db->trans_complete();
|
$this->db->trans_complete();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function getAllMaterialAdjustments()
|
function getAllMaterialAdjustments()
|
||||||
{
|
{
|
||||||
$this->db->select('T_Material_Adjustment.*,SupplierName,MaterialName');
|
$this->db->select('T_Material_Adjustment.*,SupplierName,MaterialName');
|
||||||
@ -282,7 +300,9 @@ class batchcard_model extends CI_Model
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function save_rawmaterialto_materialHistory($materialhistory)
|
function save_rawmaterialto_materialHistory($materialhistory)
|
||||||
{
|
{
|
||||||
$this->db->trans_start();
|
$this->db->trans_start();
|
||||||
@ -292,29 +312,35 @@ class batchcard_model extends CI_Model
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function getFinalProductDetaisl()
|
function getFinalProductDetaisl()
|
||||||
{
|
{
|
||||||
$this->db->select('T_FinalProduct_Master.*,product_name,product_description');
|
$this->db->select('T_FinalProduct_Master.*,product_name,product_description');
|
||||||
$this->db->from('T_FinalProduct_Master');
|
$this->db->from('T_FinalProduct_Master');
|
||||||
$this->db->join('ip_products','ip_products.product_id=T_FinalProduct_Master.MaterialCode');
|
$this->db->join('invoicedb.ip_products','invoicedb.ip_products.product_id=T_FinalProduct_Master.MaterialCode');
|
||||||
$res = $this->db->get();
|
$res = $this->db->get();
|
||||||
return $res->result();
|
return $res->result();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function getmasterProductDetails($FPId)
|
function getmasterProductDetails($FPId)
|
||||||
{
|
{
|
||||||
$this->db->select('T_FinalProduct_Master.*,product_name,product_description');
|
$this->db->select('T_FinalProduct_Master.*,product_name,product_description');
|
||||||
$this->db->from('T_FinalProduct_Master');
|
$this->db->from('T_FinalProduct_Master');
|
||||||
$this->db->join('ip_products','ip_products.product_id=T_FinalProduct_Master.MaterialCode');
|
$this->db->join('invoicedb.ip_products','invoicedb.ip_products.product_id=T_FinalProduct_Master.MaterialCode');
|
||||||
$this->db->where('T_FinalProduct_Master.FPId',$FPId);
|
$this->db->where('T_FinalProduct_Master.FPId',$FPId);
|
||||||
$res = $this->db->get();
|
$res = $this->db->get();
|
||||||
return $res->result();
|
return $res->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function getrawmaterialDetails($FPId)
|
function getrawmaterialDetails($FPId)
|
||||||
{
|
{
|
||||||
$this->db->select('T_FinalProduct_RawMaterials.*,SupplierName,MaterialName');
|
$this->db->select('T_FinalProduct_RawMaterials.*,SupplierName,MaterialName');
|
||||||
@ -326,7 +352,9 @@ class batchcard_model extends CI_Model
|
|||||||
return $res->result();
|
return $res->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function getconsumaterialDetails($FPId)
|
function getconsumaterialDetails($FPId)
|
||||||
{
|
{
|
||||||
$this->db->select('T_FinalProduct_ConsumableMaterials.*,SupplierName,MaterialName');
|
$this->db->select('T_FinalProduct_ConsumableMaterials.*,SupplierName,MaterialName');
|
||||||
@ -338,7 +366,9 @@ class batchcard_model extends CI_Model
|
|||||||
return $res->result();
|
return $res->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function getpackagematerialDetails($FPId)
|
function getpackagematerialDetails($FPId)
|
||||||
{
|
{
|
||||||
$this->db->select('T_FinalProduct_PackingMaterials.*,SupplierName,MaterialName');
|
$this->db->select('T_FinalProduct_PackingMaterials.*,SupplierName,MaterialName');
|
||||||
@ -350,12 +380,14 @@ class batchcard_model extends CI_Model
|
|||||||
return $res->result();
|
return $res->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function getcoproductmaterial($FPId)
|
function getcoproductmaterial($FPId)
|
||||||
{
|
{
|
||||||
$subQuery ='select T_FinalProduct_CoProduct_Materials.*,product_name
|
$subQuery ='select T_FinalProduct_CoProduct_Materials.*,product_name
|
||||||
from T_FinalProduct_CoProduct_Materials
|
from T_FinalProduct_CoProduct_Materials
|
||||||
join ip_products on ip_products.product_id = T_FinalProduct_CoProduct_Materials.MaterialCode
|
join invoicedb.ip_products on invoicedb.ip_products.product_id = T_FinalProduct_CoProduct_Materials.MaterialCode
|
||||||
where T_FinalProduct_CoProduct_Materials.FPId=?';
|
where T_FinalProduct_CoProduct_Materials.FPId=?';
|
||||||
|
|
||||||
$query = $this->db->query($subQuery,array($FPId));
|
$query = $this->db->query($subQuery,array($FPId));
|
||||||
@ -364,45 +396,49 @@ class batchcard_model extends CI_Model
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function update_final_product($final_master,$FPId)
|
function update_final_product($final_master,$FPId)
|
||||||
{
|
{
|
||||||
//print_r($final_master);
|
|
||||||
$this->db->where('FPId', $FPId);
|
$this->db->where('FPId', $FPId);
|
||||||
$this->db->update('T_FinalProduct_Master', $final_master);
|
$this->db->update('T_FinalProduct_Master', $final_master);
|
||||||
$insert_id = $this->db->affected_rows();
|
$insert_id = $this->db->affected_rows();
|
||||||
//return TRUE;
|
//return TRUE;
|
||||||
if($insert_id>0)
|
if($insert_id>0)
|
||||||
{
|
{
|
||||||
$subQuery = 'select max(FPId) as FPId from T_FinalProduct_Master';
|
$subQuery = 'select max(FPId) as FPId from T_FinalProduct_Master';
|
||||||
|
$query = $this->db->query($subQuery,array());
|
||||||
$query = $this->db->query($subQuery,array());
|
return $query->result_array();
|
||||||
|
}
|
||||||
return $query->result_array();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function GetRawid($rawilneno)
|
function GetRawid($rawilneno)
|
||||||
{
|
{
|
||||||
$this->db->select('*');
|
$this->db->select('*');
|
||||||
$this->db->from('T_FinalProduct_RawMaterials');
|
$this->db->from('T_FinalProduct_RawMaterials');
|
||||||
$this->db->where('RawId',$rawilneno);
|
$this->db->where('RawId',$rawilneno);
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
//print_r($this->db->last_query());
|
|
||||||
return $query->result();
|
return $query->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function Getconsuid($consuline)
|
function Getconsuid($consuline)
|
||||||
{
|
{
|
||||||
$this->db->select('*');
|
$this->db->select('*');
|
||||||
$this->db->from('T_FinalProduct_ConsumableMaterials');
|
$this->db->from('T_FinalProduct_ConsumableMaterials');
|
||||||
$this->db->where('ConId',$consuline);
|
$this->db->where('ConId',$consuline);
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
//print_r($this->db->last_query());
|
|
||||||
return $query->result();
|
return $query->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,49 +446,55 @@ class batchcard_model extends CI_Model
|
|||||||
function Getpackid($packlineId)
|
function Getpackid($packlineId)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->db->select('*');
|
$this->db->select('*');
|
||||||
$this->db->from('T_FinalProduct_PackingMaterials');
|
$this->db->from('T_FinalProduct_PackingMaterials');
|
||||||
$this->db->where('PackId',$packlineId);
|
$this->db->where('PackId',$packlineId);
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
//print_r($this->db->last_query());
|
|
||||||
return $query->result();
|
return $query->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function Getcopid($coplineId)
|
function Getcopid($coplineId)
|
||||||
{
|
{
|
||||||
$this->db->select('*');
|
$this->db->select('*');
|
||||||
$this->db->from('T_FinalProduct_CoProduct_Materials');
|
$this->db->from('T_FinalProduct_CoProduct_Materials');
|
||||||
$this->db->where('CoId',$coplineId);
|
$this->db->where('CoId',$coplineId);
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
//print_r($this->db->last_query());
|
return $query->result();
|
||||||
return $query->result();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function update_finalraw($rawarray,$rawilneno)
|
function update_finalraw($rawarray,$rawilneno)
|
||||||
{
|
{
|
||||||
$this->db->where('RawId', $rawilneno);
|
$this->db->where('RawId', $rawilneno);
|
||||||
$this->db->update('T_FinalProduct_RawMaterials', $rawarray);
|
$this->db->update('T_FinalProduct_RawMaterials', $rawarray);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function GetRawCheck($rawmaterial,$final_product_id)
|
function GetRawCheck($rawmaterial,$final_product_id)
|
||||||
{
|
{
|
||||||
$this->db->select('*');
|
$this->db->select('*');
|
||||||
$this->db->from('T_Material_stock_history');
|
$this->db->from('T_Material_stock_history');
|
||||||
$this->db->where('MaterialCode',$rawmaterial);
|
$this->db->where('MaterialCode',$rawmaterial);
|
||||||
$this->db->where('Ref_No',$final_product_id);
|
$this->db->where('Ref_No',$final_product_id);
|
||||||
$this->db->where('Ref_Type',FinalProduct);
|
$this->db->where('Ref_Type',FinalProduct);
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
//print_r($this->db->last_query());
|
|
||||||
return $query->result();
|
return $query->result();
|
||||||
}
|
}
|
||||||
//presented
|
|
||||||
|
/*
|
||||||
function update_rawmaterialto_materialHistory($rawmaterialhistory,$rawmaterial,$FPID)
|
*stock details
|
||||||
|
*/
|
||||||
|
function update_rawmaterialto_materialHistory($rawmaterialhistory,$rawmaterial,$FPID)
|
||||||
{
|
{
|
||||||
$this->db->where('Ref_No', $FPID);
|
$this->db->where('Ref_No', $FPID);
|
||||||
$this->db->where('MaterialCode', $rawmaterial);
|
$this->db->where('MaterialCode', $rawmaterial);
|
||||||
@ -460,7 +502,9 @@ class batchcard_model extends CI_Model
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function update_finalconsu($conarray,$consuline)
|
function update_finalconsu($conarray,$consuline)
|
||||||
{
|
{
|
||||||
$this->db->where('ConId', $consuline);
|
$this->db->where('ConId', $consuline);
|
||||||
@ -468,7 +512,9 @@ class batchcard_model extends CI_Model
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function update_finalpacking($conarray,$packlineId)
|
function update_finalpacking($conarray,$packlineId)
|
||||||
{
|
{
|
||||||
$this->db->where('PackId', $packlineId);
|
$this->db->where('PackId', $packlineId);
|
||||||
@ -476,14 +522,19 @@ class batchcard_model extends CI_Model
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function update_finalcoproduct($coparray,$coplineId)
|
function update_finalcoproduct($coparray,$coplineId)
|
||||||
{
|
{
|
||||||
$this->db->where('CoId', $coplineId);
|
$this->db->where('CoId', $coplineId);
|
||||||
$this->db->update('T_FinalProduct_CoProduct_Materials', $coparray);
|
$this->db->update('T_FinalProduct_CoProduct_Materials', $coparray);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
//presented
|
|
||||||
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function getEditMaterialAdjustments($AdjustmentId)
|
function getEditMaterialAdjustments($AdjustmentId)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -496,20 +547,24 @@ class batchcard_model extends CI_Model
|
|||||||
$res = $this->db->get();
|
$res = $this->db->get();
|
||||||
return $res->result();
|
return $res->result();
|
||||||
}
|
}
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function material_name(){
|
function material_name(){
|
||||||
$sql="SELECT distinct MaterialName FROM T_MaterialMaster;";
|
$sql="SELECT distinct MaterialName FROM T_MaterialMaster;";
|
||||||
$query = $this->db->query($sql);
|
$query = $this->db->query($sql);
|
||||||
return $query->result();
|
return $query->result();
|
||||||
}
|
}
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function getMaterial_history($prod,$frm,$t)
|
function getMaterial_history($prod,$frm,$t)
|
||||||
{
|
{
|
||||||
$sql="SELECT msh.StockId,sd.SupplierName,mm.MaterialName,msh.Transaction_type,msh.Ref_Type,msh.Ref_No,msh.Quantity,msh.ItemValue,date_format(msh.UpdatedOn,'%d-%m-%Y') as updatedOn FROM T_Material_stock_history as msh
|
$sql="SELECT msh.StockId,sd.SupplierName,mm.MaterialName,msh.Transaction_type,msh.Ref_Type,msh.Ref_No,msh.Quantity,msh.ItemValue,date_format(msh.UpdatedOn,'%d-%m-%Y') as updatedOn FROM T_Material_stock_history as msh
|
||||||
left join T_SupplierDetailsN as sd on sd.SupplierID=msh.SupplierID
|
left join T_SupplierDetailsN as sd on sd.SupplierID=msh.SupplierID
|
||||||
left join T_MaterialMaster as mm on mm.MaterialCode=msh.MaterialCode
|
left join T_MaterialMaster as mm on mm.MaterialCode=msh.MaterialCode
|
||||||
where msh.StockId != 'null' ";
|
where msh.StockId != 'null' ";
|
||||||
if ($prod!= ''){
|
if ($prod!= ''){
|
||||||
|
|
||||||
$sql.=" and mm.MaterialName = '".$prod."' ";
|
$sql.=" and mm.MaterialName = '".$prod."' ";
|
||||||
|
|
||||||
@ -519,7 +574,7 @@ class batchcard_model extends CI_Model
|
|||||||
$tod=date("Y-m-d",strtotime($t));
|
$tod=date("Y-m-d",strtotime($t));
|
||||||
|
|
||||||
|
|
||||||
$sql.="and date(msh.UpdatedOn) >= '".$fromd."'
|
$sql.="and date(msh.UpdatedOn) >= '".$fromd."'
|
||||||
and date(msh.UpdatedOn) <= '".$tod."'";
|
and date(msh.UpdatedOn) <= '".$tod."'";
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -530,9 +585,11 @@ class batchcard_model extends CI_Model
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//created by TamilBala
|
|
||||||
//for update quantity stockhistory
|
/*
|
||||||
//presented
|
*stock details - for update quantity stockhistory
|
||||||
|
*created by - TamilMaran
|
||||||
|
*/
|
||||||
function updateQuantityStockHistory($updatequantity,$id)
|
function updateQuantityStockHistory($updatequantity,$id)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -540,25 +597,26 @@ class batchcard_model extends CI_Model
|
|||||||
$this->db->where('Ref_Type',Adjust);
|
$this->db->where('Ref_Type',Adjust);
|
||||||
$this->db->update('T_Material_stock_history',$updatequantity);
|
$this->db->update('T_Material_stock_history',$updatequantity);
|
||||||
$r = $this->db->affected_rows();
|
$r = $this->db->affected_rows();
|
||||||
//return $r->result();
|
|
||||||
//echo "HIS";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//created by TamilBala
|
|
||||||
//for update quantity T_Material_Adjustment
|
/*
|
||||||
//presented
|
*stock details - for update quantity T_Material_Adjustment
|
||||||
|
*created by - TamilMaran
|
||||||
|
*/
|
||||||
function updateQuantityAdjusment($updatequantitydes,$id)
|
function updateQuantityAdjusment($updatequantitydes,$id)
|
||||||
{
|
{
|
||||||
$this->db->where('AdjustmentId',$id);
|
$this->db->where('AdjustmentId',$id);
|
||||||
$this->db->update('T_Material_Adjustment',$updatequantitydes);
|
$this->db->update('T_Material_Adjustment',$updatequantitydes);
|
||||||
$r = $this->db->affected_rows();
|
$r = $this->db->affected_rows();
|
||||||
return $r;
|
return $r;
|
||||||
|
|
||||||
}
|
}
|
||||||
//created by TamilBala
|
|
||||||
//for update isactive T_Material_Adjustment
|
/*
|
||||||
//presented
|
*stock details - for update isactive T_Material_Adjustment
|
||||||
|
*created by - TamilMaran
|
||||||
|
*/
|
||||||
function updateisactiveadjusment($Updateactive,$AdjustmentId)
|
function updateisactiveadjusment($Updateactive,$AdjustmentId)
|
||||||
{
|
{
|
||||||
$this->db->where('AdjustmentId',$AdjustmentId);
|
$this->db->where('AdjustmentId',$AdjustmentId);
|
||||||
@ -568,9 +626,12 @@ class batchcard_model extends CI_Model
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//created by TamilBala
|
|
||||||
//for update isactive stockhistory
|
|
||||||
//
|
/*
|
||||||
|
*stock details - for update isactive stockhistory
|
||||||
|
*created by - TamilMaran
|
||||||
|
*/
|
||||||
function updateisactiveastockhistory($Updateactive,$AdjustmentId)
|
function updateisactiveastockhistory($Updateactive,$AdjustmentId)
|
||||||
{
|
{
|
||||||
$this->db->where('Ref_No',$AdjustmentId);
|
$this->db->where('Ref_No',$AdjustmentId);
|
||||||
@ -581,50 +642,25 @@ class batchcard_model extends CI_Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
// function GetFinishedProductList($starting_date,$end_date,$product_id)
|
*stock details
|
||||||
// {
|
*/
|
||||||
|
function GetFinishedProductList($starting_date,$end_date,$product_id)
|
||||||
|
{
|
||||||
// $subQuery ='select ip_products.product_id,ip_products.product_name,ip_invoices.invoice_id,ip_invoice_items.item_quantity,ip_invoice_items.item_price,ip_invoices.invoice_number as IDnumber,ip_invoices.receivedstatus as Type from ip_products join ip_invoice_items on ip_products.product_id = ip_invoice_items.item_product_id join ip_invoices on ip_invoice_items.invoice_id = ip_invoices.invoice_id
|
|
||||||
// join T_FinalProduct_Master on ip_products.product_id = T_FinalProduct_Master.MaterialCode where (ip_invoices.invoice_date_modified>=? and ip_invoices.invoice_date_modified<=? and ip_invoice_items.item_product_id=?) union
|
$subQuery='select RefID,ProductCode,Quantity,Price,Transactiondate,TransactionType,product_name
|
||||||
|
from T_FinalProduct_History
|
||||||
// select ip_products.product_id,ip_products.product_name,T_FinalProduct_Master.FPId,T_FinalProduct_Master.Quantity,T_FinalProduct_Master.Price,T_FinalProduct_Master.FPId as IDnumber,T_FinalProduct_Master.ProductType as Type from ip_products join ip_invoice_items on ip_products.product_id = ip_invoice_items.item_product_id
|
join invoicedb.ip_products on invoicedb.ip_products.product_id= T_FinalProduct_History.ProductCode
|
||||||
// join T_FinalProduct_Master on ip_products.product_id = T_FinalProduct_Master.MaterialCode where
|
where ProductCode=? and Transactiondate >= ? and Transactiondate <= ?';
|
||||||
// (T_FinalProduct_Master.ProductDate<=? and T_FinalProduct_Master.ProductDate>=? and T_FinalProduct_Master.MaterialCode=?) group by FPId';
|
|
||||||
|
|
||||||
// $query = $this->db->query($subQuery,array($starting_date,$end_date,$product_id,$end_date,$starting_date,$product_id));
|
|
||||||
|
|
||||||
// //print_r($this->db->last_query());
|
|
||||||
|
|
||||||
|
|
||||||
// return $query->result_array();
|
$query = $this->db->query($subQuery,array($product_id,$starting_date,$end_date));
|
||||||
|
return $query->result_array();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// }
|
/*
|
||||||
|
*stock details
|
||||||
//presented
|
*/
|
||||||
function GetFinishedProductList($starting_date,$end_date,$product_id)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
// $subQuery = 'select * from T_FinalProduct_History,ip_products.product_name
|
|
||||||
// join ip_products on T_FinalProduct_History.ProductCode = ip_products.product_id
|
|
||||||
|
|
||||||
// where ProductCode=?
|
|
||||||
// and Transactiondate >= ? and Transactiondate <= ?';
|
|
||||||
|
|
||||||
$subQuery='select RefID,ProductCode,Quantity,Price,Transactiondate,TransactionType,product_name
|
|
||||||
from T_FinalProduct_History
|
|
||||||
join ip_products on ip_products.product_id= T_FinalProduct_History.ProductCode
|
|
||||||
where ProductCode=? and Transactiondate >= ? and Transactiondate <= ?';
|
|
||||||
|
|
||||||
$query = $this->db->query($subQuery,array($product_id,$starting_date,$end_date));
|
|
||||||
return $query->result_array();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//presented
|
|
||||||
function SaveFinalHistory($final_history)
|
function SaveFinalHistory($final_history)
|
||||||
{
|
{
|
||||||
$this->db->trans_start();
|
$this->db->trans_start();
|
||||||
@ -634,14 +670,14 @@ class batchcard_model extends CI_Model
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//presented
|
/*
|
||||||
|
*stock details
|
||||||
|
*/
|
||||||
function UpdateFinalHistory($final_history,$FPID,$rawmaterial)
|
function UpdateFinalHistory($final_history,$FPID,$rawmaterial)
|
||||||
{
|
{
|
||||||
//print_r($final_history);
|
|
||||||
$this->db->where('RefID', $FPID);
|
$this->db->where('RefID', $FPID);
|
||||||
$this->db->where('ProductCode',$rawmaterial);
|
$this->db->where('ProductCode',$rawmaterial);
|
||||||
$this->db->update('T_FinalProduct_History',$final_history);
|
$this->db->update('T_FinalProduct_History',$final_history);
|
||||||
//print_r($this->db->last_query());
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -89,7 +89,7 @@
|
|||||||
$ab=$yearl;
|
$ab=$yearl;
|
||||||
|
|
||||||
|
|
||||||
foreach($cum as $rel)
|
foreach($cum as $index=>$rel)
|
||||||
{
|
{
|
||||||
$cat = $rel->category;
|
$cat = $rel->category;
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -214,7 +214,7 @@ $(function() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="remarks">Remarks</label>
|
<label for="remarks">Remarks</label>
|
||||||
<input type="text" class="form-control" id="remarks" name="remarks" maxlength="255">
|
<input type="text" class="form-control" id="remarks" name="remarks" maxlength="255">
|
||||||
|
|||||||
654
application/views/editogr.php
Normal file
654
application/views/editogr.php
Normal file
@ -0,0 +1,654 @@
|
|||||||
|
<?php
|
||||||
|
$insuranceStatus = array(
|
||||||
|
array("name"=>"NO","value"=>"0"),array("name"=>"YES","value"=>"1")
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
$ReqType ='';
|
||||||
|
$CompanyAddress = '';
|
||||||
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
|
$CurrentDate = $dt->format('d-m-Y');
|
||||||
|
$MaxPoDate = '';
|
||||||
|
$AvlAmount = 0;
|
||||||
|
$Value="₹";
|
||||||
|
|
||||||
|
|
||||||
|
$sup='';
|
||||||
|
$date ='';
|
||||||
|
$Vehicle='';
|
||||||
|
$driver='';
|
||||||
|
$PONO='';
|
||||||
|
$type='';
|
||||||
|
$MaterialCode='';
|
||||||
|
$name='';
|
||||||
|
$outqty='';
|
||||||
|
$matname='';
|
||||||
|
$Remark = '';
|
||||||
|
|
||||||
|
//print_r($OGR_Data);
|
||||||
|
|
||||||
|
if(!empty($OGR_Data))
|
||||||
|
{
|
||||||
|
foreach($OGR_Data as $dt)
|
||||||
|
{
|
||||||
|
$type=$dt->OgrType;
|
||||||
|
if($type=='SERVICE')
|
||||||
|
{
|
||||||
|
$sup=$dt->ServiceSupname;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$sup=$dt->SupplierName;
|
||||||
|
}
|
||||||
|
$date =$dt->CreatedDate;
|
||||||
|
$Vehicle=$dt->VehicleNo;
|
||||||
|
$driver=$dt->Driver;
|
||||||
|
$PONO=$dt->PONO_INV;
|
||||||
|
$MaterialCode=$dt->MaterialCode;
|
||||||
|
$MaterialName=$dt->Material_Name;
|
||||||
|
//$name=$dt->;
|
||||||
|
$outqty=$dt->OutwardQty;
|
||||||
|
$mrirno= $dt->MRIRNO;
|
||||||
|
$matname= $dt->Matname;
|
||||||
|
$Remark= $dt->Remark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
<script src="<?php echo base_url()?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>assets/js/CreatePOValidation.js" type="text/javascript"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/3.3.4/jquery.inputmask.bundle.min.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
tinymce.init({
|
||||||
|
selector: "textarea#ScopeOfWork",
|
||||||
|
menubar: false,
|
||||||
|
statusbar: false,
|
||||||
|
toolbar: false
|
||||||
|
});
|
||||||
|
tinymce.init({
|
||||||
|
selector: "textarea#txtSpcialInstruction", // Add model SpcialInstruction
|
||||||
|
menubar: false,
|
||||||
|
statusbar: false,
|
||||||
|
toolbar: false
|
||||||
|
});
|
||||||
|
tinymce.init({
|
||||||
|
selector: "textarea#EdittxtSpcialInstruction", // Edit model edit SpcialInstruction
|
||||||
|
menubar: false,
|
||||||
|
statusbar: false,
|
||||||
|
toolbar: false
|
||||||
|
});
|
||||||
|
tinymce.init({
|
||||||
|
selector: "textarea#descofpo", //main screen description PO
|
||||||
|
menubar: false,
|
||||||
|
statusbar: false,
|
||||||
|
toolbar: false
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//document.getElementById("Date").checked = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$(document).ready(function ()
|
||||||
|
{
|
||||||
|
|
||||||
|
// $('#mv').hide();
|
||||||
|
// $('#po').hide();
|
||||||
|
// $('#service').hide();
|
||||||
|
// $('#potable').hide();
|
||||||
|
// $("#PaymentTerms").select2();
|
||||||
|
// $('#saveinv').hide();
|
||||||
|
// $('#savepo').hide();
|
||||||
|
// $('#saveservice').hide();
|
||||||
|
|
||||||
|
$("#date").datepicker({
|
||||||
|
|
||||||
|
maxDate : 'now',
|
||||||
|
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// $('#Date').click(function () {
|
||||||
|
// //for Date range selection
|
||||||
|
// $('#Schedulediv').hide();
|
||||||
|
// $('#Deliverydtdiv').show();
|
||||||
|
// });
|
||||||
|
// $('#Schedule').click(function () {
|
||||||
|
// //for schedule range selection
|
||||||
|
// $('#Deliverydtdiv').hide();
|
||||||
|
// $('#Schedulediv').show();
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#Vehicle"));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.modal
|
||||||
|
{
|
||||||
|
padding-right:25% ! important;
|
||||||
|
}
|
||||||
|
.dataTables_paginate
|
||||||
|
{
|
||||||
|
margin-top: -5%;
|
||||||
|
}
|
||||||
|
.dataTables_wrapper {
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
.num {
|
||||||
|
text-align:right;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$attributes = array('class' => 'form-label-left Ogradd ','name' => 'Ogradd','id' => 'Ogradd');
|
||||||
|
|
||||||
|
echo form_open($this->config->base_url().'/inwardgateregister/AddOgr/',$attributes);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
|
||||||
|
<div id="content"></div>
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<center><h3 class="box-title">Siddharth Industries - Outward Gate Register(OGR)Entry </h3></center>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<div class="box-body">
|
||||||
|
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-3">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<label>OGR Type</label>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'type','value' => set_value('type',$type),'id'=>'type', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12" style="margin-top: 15px;">
|
||||||
|
|
||||||
|
<label>Supplier/Customer</label>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'supplier','value' => set_value('supplier',$sup),'id'=>'supplier', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-9" style="padding: 0px;">
|
||||||
|
<div class="col-md-12" style="padding: 0px;">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Date</label>
|
||||||
|
<div class="form-group">
|
||||||
|
<!--
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'date','value' => set_value('date',$date),'id'=>'date', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?> -->
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'date','value' => set_value('date',$date),'id'=>'date', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Vehicle No</label>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'Vehicle','value' => set_value('Vehicle',$Vehicle),'id'=>'Vehicle', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3" style="display: none">
|
||||||
|
<label>Time</label>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'time','value' => set_value('timetime'),'id'=>'time', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Driver</label>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'drive','value' => set_value('drive',$driver),'id'=>'drive', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-3" id="mrirdiv">
|
||||||
|
<label>MRIR No</label>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'mrirno','value' => set_value('mrirno',$mrirno),'id'=>'mrirno', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3" id="podiv">
|
||||||
|
|
||||||
|
<label>PO NO</label>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'pono','value' => set_value('pono',$PONO),'id'=>'pono', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="service">
|
||||||
|
|
||||||
|
<div class="col-md-12" style="padding: 0px;">
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Material Code</label>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'material','value' => set_value('material',$MaterialCode),'id'=>'material', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Name</label>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'name','value' => set_value('name',$matname),'id'=>'name', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- <div class="col-md-3" style="display: none;">
|
||||||
|
<label>Order Qty</label>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'orderqty','value' => set_value('orderqty'),'id'=>'orderqty', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div> -->
|
||||||
|
<!-- <div class="col-md-3" style="display: none;">
|
||||||
|
<label>Reject Qty</label>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'Rejectqty','value' => set_value('Rejectqty'),'id'=>'Rejectqty', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div> -->
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Outward Qty</label>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'pooutward','value' => set_value('pooutward',$outqty),'id'=>'pooutward', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<!-- <label>Destination</label>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'destination','value' => set_value('destination',$sup),'id'=>'destination', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?> -->
|
||||||
|
|
||||||
|
<label>Remarks</label>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'Remark','value' => set_value('Remark',$Remark),'id'=>'Remark', 'class' => 'form-control' ,'rows' => '5', 'cols' => '100','maxlength' => '500');
|
||||||
|
echo Form_textarea($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--mv/po/ser starting-->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-3">
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<!-- <input type="text" name="invoice"> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="mv">
|
||||||
|
<div class="col-md-9" style="padding: 0px;">
|
||||||
|
<div class="col-md-12" style="padding: 0px;">
|
||||||
|
<div class="col-md-3">
|
||||||
|
|
||||||
|
<label>Invoice NO</label>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'invno','value' => set_value('qtyorder'),'id'=>'qtyorder', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Item Code</label>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'itemcode','value' => set_value('itemcode'),'id'=>'itemcode', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Description</label>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'Description','value' => set_value('Description'),'id'=>'Description', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Ordered Qty</label>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'qtyorder','value' => set_value('qtyorder'),'id'=>'qtyorder', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Outward Qty</label>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'invoutwardqty','value' => set_value('invoutwardqty'),'id'=>'invoutwardqty', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3" style="display: none;">
|
||||||
|
<label>Date</label>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'invdate','value' => set_value('invdate'),'id'=>'invdate', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--inv/po/ser End-->
|
||||||
|
|
||||||
|
|
||||||
|
<!--po starting-->
|
||||||
|
<div id="po">
|
||||||
|
<div class="col-md-9" style="padding: 0px;">
|
||||||
|
<div class="col-md-12" style="padding: 0px;">
|
||||||
|
<div class="col-md-3">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- <div class="col-md-3">
|
||||||
|
<label>Material Code</label>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'materialcode','value' => set_value('materialcode'),'id'=>'materialcode', 'class' => 'form-control');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- po end -->
|
||||||
|
|
||||||
|
|
||||||
|
<!--ser starting-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <div class="col-md-1 col-md-offset-8" id="saveservice"><br><br><br>
|
||||||
|
<a class="btn btn-primary Save" ID="Save" onclick="Save(3)" > <span class="bold">Save</span></a>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <div class="col-md-1 col-md-offset-8" id="saveinv"><br><br><br>
|
||||||
|
<a class="btn btn-primary Save" ID="Save" onclick="Save(1)" > <span class="bold">Save</span></a>
|
||||||
|
</div>
|
||||||
|
<!-- ser end -->
|
||||||
|
<!-- </div> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="box-body">
|
||||||
|
<table id="potable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||||
|
<thead style="background-color:#ddf">
|
||||||
|
<tr>
|
||||||
|
<th>SNo</th>
|
||||||
|
<th>Material Code</th>
|
||||||
|
<th>Description</th>
|
||||||
|
<th>Order Qty</th>
|
||||||
|
<th>Received</th>
|
||||||
|
<th>Reject</th>
|
||||||
|
<th>Outward Qty </th>
|
||||||
|
<!-- <th>Action</th> -->
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody id="poappend">
|
||||||
|
<?php if(!empty($OGR_line)){
|
||||||
|
//$index=1;
|
||||||
|
foreach($OGR_line as $index =>$line){
|
||||||
|
$index = $index+1;
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $index;?></td>
|
||||||
|
<td><?php echo $line->MaterialCode;?></td>
|
||||||
|
<td><?php echo $line->MaterialName;?></td>
|
||||||
|
<td><?php echo $line->Quantity?></td>
|
||||||
|
<td><?php echo $line->ActualQuantityReceived;?></td>
|
||||||
|
<td><?php echo $line->QuantityRejected?></td>
|
||||||
|
<td><?php echo $line->OutwardQty;?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php } } ?>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<input type="hidden" name="rowcount" id="rowcount">
|
||||||
|
<!-- <div class="col-md-1 col-md-offset-8" id="savepo"><br><br><br>
|
||||||
|
<a class="btn btn-primary Save" ID="Savepo" onclick="Save(2)" > <span class="bold">Save</span></a>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- ser end -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
var invoicedetails='';
|
||||||
|
var type='';
|
||||||
|
|
||||||
|
var Details= <?php echo json_encode($OGR_Data, JSON_PRETTY_PRINT) ?>;
|
||||||
|
//alert(Details)
|
||||||
|
|
||||||
|
$.each(Details,function(det,detobj)
|
||||||
|
{
|
||||||
|
|
||||||
|
type= detobj.OgrType;
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
//alert(type)
|
||||||
|
|
||||||
|
if(type =='PO')
|
||||||
|
{
|
||||||
|
$('#po').show();
|
||||||
|
$('#potable').show();
|
||||||
|
$('#mv').hide();
|
||||||
|
$('#service').hide();
|
||||||
|
$('#saveinv').hide();
|
||||||
|
$('#savepo').show();
|
||||||
|
$('#saveservice').hide();
|
||||||
|
$('#podiv').show();
|
||||||
|
$('#mrirdiv').show();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(type =='SERVICE')
|
||||||
|
{
|
||||||
|
$('#service').show();
|
||||||
|
$('#mv').hide();
|
||||||
|
$('#po').hide();
|
||||||
|
$('#potable').hide();
|
||||||
|
$('#saveservice').show();
|
||||||
|
$('#savepo').hide();
|
||||||
|
$('#podiv').hide();
|
||||||
|
$('#mrirdiv').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -959,6 +959,21 @@ else{
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="<?php echo base_url(); ?>AddOgr">
|
||||||
|
<i class="fa fa-upload"></i>
|
||||||
|
<span>Outward Gate Register Entry</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="<?php echo base_url(); ?>ViewOgr">
|
||||||
|
<i class="fa fa-upload"></i>
|
||||||
|
<span>View Outward Gate Register</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
||||||
<!-- <?php if($DEPCode == QUALITY){?>
|
<!-- <?php if($DEPCode == QUALITY){?>
|
||||||
@ -1050,8 +1065,19 @@ else{
|
|||||||
<span>View Inward Gate Register</span>
|
<span>View Inward Gate Register</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="<?php echo base_url(); ?>AddOgr">
|
||||||
|
<i class="fa fa-upload"></i>
|
||||||
|
<span>Outward Gate Register Entry</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="<?php echo base_url(); ?>ViewOgr">
|
||||||
|
<i class="fa fa-upload"></i>
|
||||||
|
<span>View Outward Gate Register</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|||||||
1381
application/views/ogr.php
Normal file
1381
application/views/ogr.php
Normal file
File diff suppressed because it is too large
Load Diff
150
application/views/ogrlist.php
Normal file
150
application/views/ogrlist.php
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
|
||||||
|
<style>
|
||||||
|
.pagination {
|
||||||
|
margin:0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<center><h3 class="box-title">Siddharth Industries-Outward Gate Entry List</h3></center>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<div class="box-body">
|
||||||
|
<table id="example1" class="table table-bordered table-hover editableTable" style="font-size:12px;">
|
||||||
|
<thead>
|
||||||
|
<tr style="background-color:#ddf">
|
||||||
|
<!-- <th>#</th> -->
|
||||||
|
<th>OGR No</th>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>PO/INVOICE No</th>
|
||||||
|
<th>MRIR No</th>
|
||||||
|
<th>Supplier/Customer Name</th>
|
||||||
|
<th>Date</th>
|
||||||
|
<th>Vehicle</th>
|
||||||
|
<th>Actions</th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><?php
|
||||||
|
|
||||||
|
if(!empty($OGR_Data)){
|
||||||
|
$index = 0;
|
||||||
|
foreach($OGR_Data as $ogr)
|
||||||
|
{
|
||||||
|
$index =$index+1;
|
||||||
|
//$dt= $nc->Created_Date;
|
||||||
|
$Ddt = new DateTime($ogr->CreatedDate);
|
||||||
|
$dt = $Ddt->format('d-m-Y');
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr id="<?php echo $index ; ?>">
|
||||||
|
<!-- <td><?php echo $index;?></td> -->
|
||||||
|
<td><?php echo "OGR".$ogr->OGRNO;?></td>
|
||||||
|
<td><?php echo $ogr->OgrType;?></td>
|
||||||
|
<td><?php echo $ogr->PONO_INV;?></td>
|
||||||
|
<td><?php echo $ogr->MRIRNO;?></td>
|
||||||
|
<?php if($ogr->OgrType == 'PO'){?>
|
||||||
|
<td><?php echo $ogr->SupplierName?></td>
|
||||||
|
<? } else{ ?>
|
||||||
|
<td><?php echo $ogr->Servicesupplier?></td>
|
||||||
|
<?php }?>
|
||||||
|
|
||||||
|
<td><?php echo $dt;?></td>
|
||||||
|
<td><?php echo $ogr->VehicleNo?></td>
|
||||||
|
<td><a data-toggle="tooltip" href="<?php echo base_url().'EditOGR?OGRNO='.$ogr->OGRNO.'&MRIRNO='.$ogr->MRIRNO ;?>"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $ogr->OGRNO; ?> - Click here to View details"></i></a></td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php } }?>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
|
</section>
|
||||||
|
<!-- /.content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.content-wrapper -->
|
||||||
|
|
||||||
|
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
$.fn.dataTable.moment( 'DD-MM-YYYY' );
|
||||||
|
$('#example1').DataTable({
|
||||||
|
"paging": true,
|
||||||
|
"lengthChange": true,
|
||||||
|
"searching": true,
|
||||||
|
"ordering": true,
|
||||||
|
"aaSorting": [[ 5, "desc" ]],
|
||||||
|
"info": true,
|
||||||
|
"autoWidth": false
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function saveToDatabase(editableObj,Index)
|
||||||
|
{
|
||||||
|
//alert(Index)
|
||||||
|
var tr= document.getElementById(Index);
|
||||||
|
var cellval = tr.cells;
|
||||||
|
var date= cellval[1].innerHTML;
|
||||||
|
var cname=cellval[2].innerHTML;
|
||||||
|
var servicedetails=cellval[3].innerHTML;
|
||||||
|
var detailsofcoplaint=cellval[4].innerHTML;
|
||||||
|
var modeofcommunication=cellval[5].innerHTML;
|
||||||
|
var actiontaken=cellval[6].innerHTML;
|
||||||
|
var actioncardno=cellval[7].innerHTML;
|
||||||
|
var remark=cellval[8].innerHTML;
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
|
||||||
|
data:{date:date,cname:cname,servicedetails:servicedetails,detailsofcoplaint:detailsofcoplaint,modeofcommunication:modeofcommunication,actiontaken:actiontaken,actioncardno,actioncardno,remark:remark},
|
||||||
|
// dataType:'json',
|
||||||
|
type:"POST",
|
||||||
|
url:"<?php echo base_url();?>purchaseorder/Savencrlist",
|
||||||
|
success:function(data)
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#content').loader('hide');
|
||||||
|
|
||||||
|
if(data)
|
||||||
|
{
|
||||||
|
alert(data);
|
||||||
|
//window.location ="enquirylisting";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alert("Error");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@ -102,7 +102,7 @@ class CI_Upload {
|
|||||||
'image_size_str' => '',
|
'image_size_str' => '',
|
||||||
'error_msg' => array(),
|
'error_msg' => array(),
|
||||||
'mimes' => array(),
|
'mimes' => array(),
|
||||||
'remove_spaces' => TRUE,
|
'remove_spaces' => FALSE,
|
||||||
'xss_clean' => FALSE,
|
'xss_clean' => FALSE,
|
||||||
'temp_prefix' => "temp_file_",
|
'temp_prefix' => "temp_file_",
|
||||||
'client_name' => ''
|
'client_name' => ''
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user