requisition po by raja

This commit is contained in:
venbatechnologies 2017-06-16 18:50:48 +05:30
parent 13521ee60b
commit 0ec18d2521
6 changed files with 47 additions and 9 deletions

View File

@ -104,7 +104,7 @@ class requisitionform extends BaseController
}
$data['LineItem'] = $this->requistion_model->getRequistItemList($ReqNo,'Yes');
$data['LineItem'] = $this->requistion_model->getEditRequistItemList($ReqNo,'Yes');
$data['CostCenter'] = $this->requistion_model->getCostCenterUserID($userID);
$data['MaterialCode'] = $this->requistion_model->EditMaterialCode($ReqNo, $ReqType);
@ -476,6 +476,9 @@ class requisitionform extends BaseController
$MaterialName = $result[$i]['MaterialName'];
$UOM = $result[$i]['UOM'];
$Quantity = $result[$i]['Quantity'];
$Quantity = $result[$i]['Quantity'];
$POQTY = $result[$i]['POQTY'];
$StatusName= $result[$i]['StatusName'];
$HTML.="<tr id='".$i."'>
<td align='left'>".$SNo."</td>
<td align='left'>". $MaterialCode."</td>
@ -483,7 +486,9 @@ class requisitionform extends BaseController
<td align='left'>".$MaterialName."</td>
<td align='left'>".$UOM."</td>
<td align='left'>".$Quantity."</td>
<td align='left'>".$Quantity."</td>
<td align='left'>".$POQTY."</td>
<td align='left'>".$StatusName."</td>
</tr>";
//$index = $index + 1;

0
application/logs/log-2017-06-14.php Normal file → Executable file
View File

0
application/logs/log-2017-06-15.php Normal file → Executable file
View File

View File

@ -28,6 +28,30 @@ class requistion_model extends CI_Model
$query = $this->db->get();
return $query->result();
}
/* This function is used to getEditRequistItemList view the information
* @return array $result : This is result of the query
*/
function getEditRequistItemList($ReqNo)
{
$result = $this->db-> query("CALL P_GET_REQUISTITEMLIST('".$ReqNo."')") or die(mysql_error());
//echo 'REQUISTITEMLIST Line item view successfully';
$result ->next_result();
if($result->num_rows > 0)
{
return $result->result();
}
}
/**
@ -288,9 +312,11 @@ class requistion_model extends CI_Model
function getRequistItemList($ReqID,$NoArray='')
{
$subQuery = 'select ReqNo,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,Quantity from
T_Requestion_Details Req join T_MaterialMaster Mat on
Req.MaterialCode = Mat.MaterialCode where ReqNo=?';
$subQuery = 'select distinct Req.ReqNo, Mat.MaterialCode,Mat.MaterialName,Mat.UOM, Req.Quantity,Po.Quantity as POQTY,sta.StatusName from T_MaterialMaster Mat
left join T_Requestion_Details Req on Req.MaterialCode = Mat.MaterialCode
left join T_PurchaseOrder_LineItem Po on Po.ReqNo = Req.ReqNo and Po.MaterialCode = Req.MaterialCode
left join T_Status sta on sta.StatusCode = Req.Status where Req.ReqNo=?';
$query = $this->db->query($subQuery, array($ReqID));
if($NoArray == '')

View File

@ -196,7 +196,11 @@
<th>Item Code</th>
<th>Item Description</th>
<th>UOM</th>
<th>Quantity</th>
<th>Requested Quantity</th>
<th>PO Quantity</th>
<th>Status</th>
</tr>
</thead>

View File

@ -292,7 +292,10 @@ if(!empty($ReqDetails))
<th>Material Code</th>
<th>Material Name</th>
<th>Uom</th>
<th>Quantity</th>
<th>RequestedQuantity</th>
<th>PoQuantity</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
@ -316,8 +319,8 @@ if(!empty($ReqDetails))
<td align="left"><?php echo $record->UOM ; ?></td>
<td align="left"><?php echo $record->Quantity ; ?></td>
<td align="left"><?php echo $record->POQTY ; ?></td>
<td align="left"><?php echo $record->StatusName ;?></td>
<td>
<a data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-target='#EditItem' data-toggle="modal" href="#EditItem"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->MaterialCode ; ?> Material details"></i>&nbsp;&nbsp;&nbsp;</a> <a onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $record->MaterialCode ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>