This commit is contained in:
venbatechnologies@gmail.com 2018-11-14 16:12:06 +05:30
parent cbcb71f9e2
commit 25e3aa6f67

View File

@ -1282,12 +1282,14 @@ where MaterialCode = ? and SupplierID=?';
function Get_Product_Supplier($MaterialCode,$type) function Get_Product_Supplier($MaterialCode,$type)
{ {
//echo $MaterialCode; //echo $MaterialCode;
$ltype='%'.$type.'%';
//echo $ltype;
$this->db->select('mas.SupplierID,sup.SupplierName,mmas.MaterialCode,mmas.MaterialName'); $this->db->select('mas.SupplierID,sup.SupplierName,mmas.MaterialCode,mmas.MaterialName');
$this->db->from('T_PurchaseOrder_Master mas'); $this->db->from('T_PurchaseOrder_Master mas');
$this->db->join('T_SupplierDetailsN sup','sup.SupplierID=mas.SupplierID'); $this->db->join('T_SupplierDetailsN sup','sup.SupplierID=mas.SupplierID');
$this->db->join('T_PurchaseOrder_LineItem line','line.PONO=mas.PONO'); $this->db->join('T_PurchaseOrder_LineItem line','line.PONO=mas.PONO');
$this->db->join('T_MaterialMaster mmas','mmas.MaterialCode=line.MaterialCode'); $this->db->join('T_MaterialMaster mmas','mmas.MaterialCode=line.MaterialCode');
$this->db->where('Category like',$type); $this->db->where('Category like',$ltype);
// $this->db->where('T_MaterialMaster.Category like','%Raw Material%'); // $this->db->where('T_MaterialMaster.Category like','%Raw Material%');
$this->db->where('mmas.MaterialCode',$MaterialCode); $this->db->where('mmas.MaterialCode',$MaterialCode);