'Newscreenaddedandissuefixed'
This commit is contained in:
parent
d7b7ce2584
commit
a2f95a6404
@ -27,7 +27,7 @@ class inwardgateregister_model extends CI_Model
|
||||
|
||||
$query = $this->db->get();
|
||||
$result = $query->result();
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -53,13 +53,16 @@ class inwardgateregister_model extends CI_Model
|
||||
function viewpurchaseorder($PO)
|
||||
{
|
||||
|
||||
$subQuery ='SELECT POM.PONO,POL.MaterialCode,(CASE WHEN (POL.Quantity > igr.QuantityAsPerInvoice )
|
||||
THEN ( POL.Quantity - igr.QuantityAsPerInvoice) ELSE POL.Quantity
|
||||
END) as Quantity,POL.PONO,MM.MaterialName,MM.UOM
|
||||
from T_PurchaseOrder_Master POM
|
||||
left join T_PurchaseOrder_LineItem POL on POL.PONO = POM.PONO left join T_IGR_Details igr on igr.MaterialCode = POL.MaterialCode left join T_MaterialMaster MM
|
||||
$subQuery ='SELECT distinct POM.PONO,POL.MaterialCode,(CASE WHEN (POL.Quantity > igr.QuantityAsPerInvoice )
|
||||
THEN ( POL.Quantity - igr.QuantityAsPerInvoice) ELSE POL.Quantity
|
||||
END) as Quantity,POL.PONO,MM.MaterialName,MM.UOM
|
||||
from T_PurchaseOrder_Master POM
|
||||
left join T_PurchaseOrder_LineItem POL on POL.PONO = POM.PONO
|
||||
left join T_IGR_Master IGM on IGM.PONO =POL.PONO
|
||||
left join T_IGR_Details igr on igr.MaterialCode = POL.MaterialCode and IGM.PONO =POL.PONO
|
||||
left join T_MaterialMaster MM
|
||||
on MM.MaterialCode = POL.MaterialCode where POM.PONO=? and POL.Status not in(?,?) ';
|
||||
|
||||
|
||||
$query = $this->db->query($subQuery, array($PO,IGR_CREATED,MRIR_CREATED));
|
||||
|
||||
// print_r($this->db->last_query());
|
||||
@ -116,19 +119,20 @@ class inwardgateregister_model extends CI_Model
|
||||
}
|
||||
function viewigr($IGRNO)
|
||||
{
|
||||
|
||||
$this->db->select('igr.*,igrd.*,MM.MaterialName,MM.UOM,sup.Address,sup.SupplierName,POM.ServiceDescription,POL.Quantity');
|
||||
$this->db->distinct();
|
||||
$this->db->select('igr.IGRNO,igr.*,igrd.*,MM.MaterialName,MM.UOM,sup.Address,sup.SupplierName,POM.ServiceDescription,POL.Quantity');
|
||||
$this->db->select('igr.IGRNO,igr.*,igrd.*,MM.MaterialName,MM.UOM,sup.Address,sup.SupplierName,POM.ServiceDescription,POL.Quantity');
|
||||
$this->db->from('T_IGR_Master igr');
|
||||
$this->db->join('T_IGR_Details igrd','igrd.IGRNO = igr.IGRNO');
|
||||
$this->db->join('T_PurchaseOrder_Master POM','igr.PONO = POM.PONO');
|
||||
$this->db->join('T_PurchaseOrder_LineItem POL','POL.PONO = POM.PONO and POL.MaterialCode=igrd.MaterialCode');
|
||||
$this->db->join('T_PurchaseOrder_LineItem POL','igr.PONO = POL.PONO and POL.MaterialCode=igrd.MaterialCode ');
|
||||
$this->db->join('T_SupplierDetailsN sup', 'sup.SupplierID = POM.SupplierID');
|
||||
$this->db->join('T_MaterialMaster MM', 'MM.MaterialCode = igrd.MaterialCode');
|
||||
$this->db->where('igr.IGRNO',$IGRNO);
|
||||
|
||||
|
||||
$query = $this->db->get();
|
||||
//print_r( $this->db->last_query());
|
||||
// print_r( $this->db->last_query());
|
||||
$result = $query->result();
|
||||
return $result;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user