RELEASE AND APPROVAL ISSUE FIXED

This commit is contained in:
velz2020 2017-08-09 19:19:06 +05:30
parent cb4602c747
commit 8728e50265
4 changed files with 22 additions and 18 deletions

View File

@ -1936,7 +1936,7 @@ function addNewImportPurchaseOrder()
/* All Function following This command for FINANCE TEAM PO APPROVAL SCREEN*/ /* All Function following This command for FINANCE TEAM PO APPROVAL SCREEN*/
function poapproval(){ function poapproval(){
$q="A"; $q="APPROVAL";
$this->global['pageTitle'] = 'Siddharth : Purchase Order Approval'; $this->global['pageTitle'] = 'Siddharth : Purchase Order Approval';
// $data['Status']= $this->purchaseorder_model->getStatus(); // $data['Status']= $this->purchaseorder_model->getStatus();
$userID = $this->session->userdata ( 'userId' ); $userID = $this->session->userdata ( 'userId' );
@ -1992,7 +1992,7 @@ function addNewImportPurchaseOrder()
function porelease(){ function porelease(){
$q="R"; $q="RELEASE";
$this->global['pageTitle'] = 'Siddharth : Purchase Order Release'; $this->global['pageTitle'] = 'Siddharth : Purchase Order Release';
// $data['Status']= $this->purchaseorder_model->getStatus(); // $data['Status']= $this->purchaseorder_model->getStatus();
$userID = $this->session->userdata ( 'userId' ); $userID = $this->session->userdata ( 'userId' );

View File

@ -1244,7 +1244,7 @@ function GetCurrencytype()
* @return array $result : This is result of the query * @return array $result : This is result of the query
join T_DepartmentDetails Dept on emp.Departmentcode = Dept.DEPCode join T_DepartmentDetails Dept on emp.Departmentcode = Dept.DEPCode
*/ */
function getPOList($Amendment) function getPOList($type)
{ {
$this->db->distinct(); $this->db->distinct();
@ -1261,20 +1261,24 @@ function GetCurrencytype()
$this->db->join('tbl_users tbl', 'rmast.createdby=tbl.userid'); $this->db->join('tbl_users tbl', 'rmast.createdby=tbl.userid');
$this->db->join('T_Employee_Details as emp', 'emp.empid=tbl.empid'); $this->db->join('T_Employee_Details as emp', 'emp.empid=tbl.empid');
$this->db->join('T_DepartmentDetails as Dep','Dep.DEPCode=emp.Departmentcode'); $this->db->join('T_DepartmentDetails as Dep','Dep.DEPCode=emp.Departmentcode');
// $this->db->where('mast.Status',PO_AMENDED); // EMERGENGY PO
if($Amendment=='A'){ //A- Approved if($type=='APPROVAL'){
$this->db->or_where('mast.Status',PO_CREATED);//PO CREATED $this->db->or_where('mast.Status',PO_CREATED);
$this->db->or_where('mast.Status',PO_ONHOLD);//ON HOLD $this->db->or_where('mast.Status',PO_APPROVER_ONHOLD);
$this->db->or_where('mast.Status',PO_AWAITING_RELEASE);// PO APPROVED $this->db->or_where('mast.Status',PO_AWAITING_RELEASE);
$this->db->or_where('mast.Status',PO_RELEASED);//PO RELEASED $this->db->or_where('mast.Status',PO_RELEASED);
$this->db->or_where('mast.Status',REQITEM_Emergency_PO_CREATED); $this->db->or_where('mast.Status',REQITEM_Emergency_PO_CREATED);
$this->db->order_by('mast.Status'); // EMERGENGY PO $this->db->order_by('mast.Status');
// $this->db->or_where('mast.Status',PO_AMENDED); // EMERGENGY PO
} }
else if($Amendment=='R'){ // R -RELEASED else if($type=='RELEASE'){
$this->db->or_where('mast.Status',PO_AWAITING_RELEASE);// PO APPROVED $this->db->or_where('mast.Status',PO_AWAITING_RELEASE);
$this->db->or_where('mast.Status',PO_RELEASER_ONHOLD);
$this->db->or_where('mast.Status',PO_RELEASED); $this->db->or_where('mast.Status',PO_RELEASED);
$this->db->order_by('mast.Status','asc'); $this->db->order_by('mast.Status');
} }
$result=$this->db->get(); $result=$this->db->get();
// print_r($this->db->last_query()); // print_r($this->db->last_query());

View File

@ -74,7 +74,7 @@ if(empty($Status))
echo $CreatedDate; echo $CreatedDate;
?></td> ?></td>
<td><?php echo $record->StatusName ?></td> <td><?php echo $record->StatusName ?></td>
<td><?php if($record->StatusCode == PO_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED ){ ?> <td><?php if($record->StatusCode == PO_APPROVER_ONHOLD or or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED ){ ?>
<select name="selectId" id="selectId" title="Select Your Option" onchange="showvalue('<?php echo $record->PONO ?>','<?php echo $index ; ?>',this.options[this.selectedIndex].value,'<?php echo $record->Remarks ?>');"> <select name="selectId" id="selectId" title="Select Your Option" onchange="showvalue('<?php echo $record->PONO ?>','<?php echo $index ; ?>',this.options[this.selectedIndex].value,'<?php echo $record->Remarks ?>');">
<option value="-1" >Select Option</option> <option value="-1" >Select Option</option>
@ -159,7 +159,7 @@ if(empty($Status))
else if(Status == '2') else if(Status == '2')
{ {
var strMsg='Do you want to put Hold this Purchase Order?'; var strMsg='Do you want to put Hold this Purchase Order?';
var StatusCode='ST020'; var StatusCode='ST051';
//alert(StatusCode); //alert(StatusCode);
} }

View File

@ -89,7 +89,7 @@ if(empty($Status))
<td><?php echo $record->StatusName ?></td> <td><?php echo $record->StatusName ?></td>
<?php <?php
if($record->StatusName == 'AWAITING RELEASE' or $record->StatusName == 'AMENDMENT PO'){ if($record->StatusName == 'RELEASER ONHOLD' or $record->StatusName == 'AWAITING RELEASE' or $record->StatusName == 'AMENDMENT PO'){
?> ?>
<td> <td>
@ -161,7 +161,7 @@ if(empty($Status))
else if(Status == '2') else if(Status == '2')
{ {
var strMsg='Do you want to put Hold this Purchase Order?'; var strMsg='Do you want to put Hold this Purchase Order?';
var StatusCode='ST020'; var StatusCode='ST052';
//alert(StatusCode); //alert(StatusCode);
} }