report amd parendpo values display

This commit is contained in:
venbatechnologies 2018-07-04 07:22:57 +05:30
parent e2134d9915
commit b291b300d2
2 changed files with 119 additions and 10 deletions

View File

@ -316,6 +316,27 @@ class amendmentpurchaseorder extends BaseController
$APO=$this->purchaseorder_model->updateAmendPOMaster($PONO,$PODetail);
$LineItemStatus = REQITEM_NEW;
$igrvalue = $this->purchaseorder_model->selectigrmaster($PONO);
$po = '';
if(count($igrvalue) >0)
{
$igrno = $igrvalue[0]->IGRNO;
$po =$igrvalue[0]->PONO;
}
if($PONO == $po)
{
$NewPOno = array('PONO' =>$NewPO);
$this->purchaseorder_model->updateigrmaster($igrno,$NewPOno);
}
for ($i = 1; $i <= $RowCount; $i++)
{
@ -487,11 +508,11 @@ class amendmentpurchaseorder extends BaseController
$CAD="<tr><td rowspan=". $rowspanvalue .">".$MaterialCode."</td></tr>";
$CAD.=$CAD2;
}
// $ReceivedQty = $this->purchaseorder_model->GetLineItemReceivedQty($PONO,$MaterialCode);
// if(count($ReceivedQty)>0)
// {
// $RecQtyvalue = $ReceivedQty[0]['ReceivedQuantity'];
// }
$ReceivedQty = $this->purchaseorder_model->GetLineItemReceivedQty($PONO,$MaterialCode);
if(count($ReceivedQty)>0)
{
$RecQtyvalue = $ReceivedQty[0]['ReceivedQuantity'];
}
$POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'ReceivedQuantity'=>$RecQtyvalue,'Quantity'=>$Quantity,'Per'=>$per,'ServiceMaterialDescription'=>$servicematerialdescription,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency,'AmendedDetails'=>$CAD);
@ -615,6 +636,25 @@ class amendmentpurchaseorder extends BaseController
$APO=$this->purchaseorder_model->updateAmendPOMaster($PONO,$PODetail);
$LineItemStatus = REQITEM_NEW;
$igrvalue = $this->purchaseorder_model->selectigrmaster($PONO);
$po = '';
if(count($igrvalue) >0)
{
$igrno = $igrvalue[0]->IGRNO;
$po =$igrvalue[0]->PONO;
}
if($PONO == $po)
{
$NewPOno = array('PONO' =>$NewPO);
$this->purchaseorder_model->updateigrmaster($igrno,$NewPOno);
}
for ($i = 1; $i <= $RowCount; $i++)
@ -650,12 +690,12 @@ class amendmentpurchaseorder extends BaseController
$LineItemNo = '';
$RecQtyvalue=0.00;
$rowspanvalue=0;
// $ReceivedQty = $this->purchaseorder_model->GetLineItemReceivedQty($PONO,$MaterialCode);
$ReceivedQty = $this->purchaseorder_model->GetLineItemReceivedQty($PONO,$MaterialCode);
// if(count($ReceivedQty)>0)
// {
// $RecQtyvalue = $ReceivedQty[0]['ReceivedQuantity'];
// }
if(count($ReceivedQty)>0)
{
$RecQtyvalue = $ReceivedQty[0]['ReceivedQuantity'];
}
if($Quantity != $beforeQuantity)
{
@ -852,6 +892,25 @@ class amendmentpurchaseorder extends BaseController
$LineItemStatus = REQITEM_NEW;
$igrvalue = $this->purchaseorder_model->selectigrmaster($PONO);
$po = '';
if(count($igrvalue) >0)
{
$igrno = $igrvalue[0]->IGRNO;
$po =$igrvalue[0]->PONO;
}
if($PONO == $po)
{
$NewPOno = array('PONO' =>$NewPO);
$this->purchaseorder_model->updateigrmaster($igrno,$NewPOno);
}
for ($i = 1; $i <= $RowCount; $i++)
{
@ -1201,6 +1260,26 @@ class amendmentpurchaseorder extends BaseController
$APO=$this->purchaseorder_model->updateAmendPOMaster($PONO,$PODetail);
$LineItemStatus = REQITEM_NEW;
$igrvalue = $this->purchaseorder_model->selectigrmaster($PONO);
$po = '';
if(count($igrvalue) >0)
{
$igrno = $igrvalue[0]->IGRNO;
$po =$igrvalue[0]->PONO;
}
if($PONO == $po)
{
$NewPOno = array('PONO' =>$NewPO);
$this->purchaseorder_model->updateigrmaster($igrno,$NewPOno);
}
for ($i = 1; $i <= $RowCount; $i++)
{

View File

@ -166,6 +166,36 @@ Where IGRM.PONO = ? ';
return $myfile;
}
/*--------------------------------------------------*/
/* this function used parendpo igr values get inward report display */
function updateigrmaster($igrno,$NewPOno)
{
// $this->db->insert('T_IGR_Master',$IGRaddvalues);
// $myfile=$this->db->affected_rows();
// return $myfile;
$this->db->where('IGRNO',$igrno);
$this->db->update('T_IGR_Master',$NewPOno);
$insert_id = $this->db->affected_rows();
return $insert_id;
}
function selectigrmaster($PONO)
{
$this->db->select('*');
$this->db->from('T_IGR_Master');
$this->db->where('PONO',$PONO);
$query = $this->db->get();
return $query->result();
}
/*--------------------------------------------------*/
function getfunction($pono)