merged uptodate : ps

This commit is contained in:
VE10-Sanjeev 2023-06-16 15:05:58 +05:30
parent 9ac51ff47c
commit 2b0af09121
4 changed files with 59 additions and 56 deletions

View File

@ -351,6 +351,7 @@ class requisitionform extends BaseController
*/
function addNewRequistion()
{
// print_r($this->input->post());die();
log_message('error'," add new Requisition Fns Called");
$this->form_validation->set_rules('RequestType','RequestType','trim|required');
@ -370,6 +371,7 @@ class requisitionform extends BaseController
$RequestedbyDept = $this->session->userdata ( 'DEPCode' );
$CostCenter = $this->input->post('CostCenter');
$CreateBy = $this->session->userdata ( 'userId' );
$UpdatedBy = $this->session->userdata ( 'userId' );
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s');
@ -383,7 +385,8 @@ class requisitionform extends BaseController
$noOfService = 1;
$IsExists = $this->requistion_model->RequistionIsExists($Requestedby);
// print_r($IsExists);
// print_r($IsExists);die();
// return true;
if(count( $IsExists) == 0)
{
@ -435,7 +438,7 @@ class requisitionform extends BaseController
$Quantity = $this->input->post('Quantity'.$i);
$OtherD = $this->input->post('otherD'.$i);
$ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'MaterialDescription'=>$OtherD);
$ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'MaterialDescription'=>$OtherD,'UpdatedBy'=>$UpdatedBy);
$this->requistion_model->addRequistionDetails($ReqDetails,$ReqNumber);
}

View File

@ -395,7 +395,6 @@ ifnull(Po.Quantity,0) as POQTY,sta.StatusName
}
}
}
/**
* This function is used to check the Request is in Draft status
* @return array $result : This is result of the query
@ -407,10 +406,11 @@ ifnull(Po.Quantity,0) as POQTY,sta.StatusName
$this->db->where('Status ',REQ_DRAFT );
$this->db->where('Requestedby ',$ReqBy );
$query = $this->db->get();
//print_r($this->db->last_query());die();
if ($query->num_rows > 0) {
//echo $result->num_rows;
return $query->result_array();
}else{
return array();
}
}
/**

View File

@ -461,7 +461,7 @@ if(!empty($ReqPOType))
foreach($LineItem as $record)
{
$index = $index + 1;
$materialdesc=$record->MaterialDescription;
$materialdesc=isset($record->MaterialDescription) ? $record->MaterialDescription :"";
//echo $materialdesc;
?>
<tr id="<?php echo $index ; ?>">
@ -481,7 +481,7 @@ if(!empty($ReqPOType))
<td align="left"><?php echo $record->Quantity ; ?></td>
<td align="left"><?php echo $record->POQTY ; ?></td>
<td align="left"><?php echo $record->StatusName ;?></td>
<input type="hidden" name="<?php echo 'materialdesc'.$index ?>" id="<?php echo 'materialdesc'.$index ?>" value="<?php echo $record->MaterialDescription ; ?>" />
<input type="hidden" name="<?php echo 'materialdesc'.$index ?>" id="<?php echo 'materialdesc'.$index ?>" value="<?php echo isset($record->MaterialDescription) ? $record->MaterialDescription : '' ; ?>" />
<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>

View File

@ -304,7 +304,7 @@ function saveToDatabase(editableObj,column,ReqId,Index) {
{
$('#content').loader('hide');
alert(data);
location.reload();
location.reload(true);
}
else
{