spo edit Materialstockhistory
This commit is contained in:
parent
210ea79e56
commit
0b074c6eaa
@ -812,6 +812,27 @@ $RequestedBy = $this->input->post('drpDepartment');
|
|||||||
|
|
||||||
|
|
||||||
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
|
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//print_r($igrD);
|
||||||
|
//* ================================================== * /
|
||||||
|
$IGRItemNo = '';
|
||||||
|
foreach($igrD as $value)
|
||||||
|
{
|
||||||
|
|
||||||
|
$IGRItemNo = $value->IGRItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
//echo $IGRItemNo;
|
||||||
|
$MaterialstockHistoryadd= array('Ref_No'=>$IGRItemNo,'MaterialCode'=>$MaterialCode,'Transaction_type'=>'Add','Ref_Type'=>'IGR','SupplierID'=>$SupplierID,'Quantity'=>$QuantityAsPerInvoice,'ItemValue'=>$itemRate,'CreatedBy'=>$CreatedBy,'CreatedOn'=>$createddt);
|
||||||
|
|
||||||
|
|
||||||
|
$this->inwardgateregister_model->addMaterialStockHistory($MaterialstockHistoryadd);
|
||||||
|
//*=====================================================*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$Recqty = $this->inwardgateregister_model->getPOLineItemReceivedQty($PONO,$MaterialCode);
|
$Recqty = $this->inwardgateregister_model->getPOLineItemReceivedQty($PONO,$MaterialCode);
|
||||||
$ReceivedQuantity = 0.00;
|
$ReceivedQuantity = 0.00;
|
||||||
|
|||||||
@ -1412,6 +1412,23 @@ function edited(){
|
|||||||
$this->purchaseorder_model->updateIGR($IGRD[$j]['IGRItemNo'],$IGRDs);
|
$this->purchaseorder_model->updateIGR($IGRD[$j]['IGRItemNo'],$IGRDs);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------- may 24 today change edit po start---------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
$MaterialstockHistoryupdate= array('SupplierID'=>$SupplierID,'Quantity'=>$Quantity,'ItemValue'=>$itemRate,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||||
|
// print_r($MaterialstockHistoryupdate);
|
||||||
|
|
||||||
|
$itemNo = $IGRD[$j]['IGRItemNo'];
|
||||||
|
//echo $itemNo;
|
||||||
|
|
||||||
|
$this->purchaseorder_model->updateMatStock($itemNo,
|
||||||
|
$MaterialstockHistoryupdate);
|
||||||
|
|
||||||
|
/*-------------------------------today change edit po end---------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,31 @@ class inwardgateregister_model extends CI_Model
|
|||||||
* @param number $segment : This is pagination limit
|
* @param number $segment : This is pagination limit
|
||||||
* @return array $result : This is result
|
* @return array $result : This is result
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------*/
|
||||||
|
function addMaterialStockHistory($MaterialstockHistoryadd)
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->db->trans_start();
|
||||||
|
$this->db->insert('T_Material_stock_history', $MaterialstockHistoryadd);
|
||||||
|
$insert_id = $this->db->affected_rows();
|
||||||
|
$this->db->trans_complete();
|
||||||
|
// print_r($this->db->last_query());
|
||||||
|
//print_r($insert_id);
|
||||||
|
if($insert_id>0)
|
||||||
|
{
|
||||||
|
$subQuery = 'select * from T_Material_stock_history';
|
||||||
|
|
||||||
|
$query = $this->db->query($subQuery);
|
||||||
|
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*------------------------------------------------------------*/
|
||||||
function igrListing()
|
function igrListing()
|
||||||
{
|
{
|
||||||
$this->db->select('igr.*,PO.DeliveryDate,sup.SupplierName,igr.file');
|
$this->db->select('igr.*,PO.DeliveryDate,sup.SupplierName,igr.file');
|
||||||
|
|||||||
@ -22,6 +22,24 @@ class purchaseorder_model extends CI_Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*-----------may25-------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
function updateMatStock($itemNo,
|
||||||
|
$MaterialstockHistoryupdate){
|
||||||
|
//echo'hi';
|
||||||
|
|
||||||
|
|
||||||
|
$this->db->where('Ref_No',$itemNo);
|
||||||
|
$this->db->update('T_Material_stock_history', $MaterialstockHistoryupdate);
|
||||||
|
|
||||||
|
$r = $this->db->affected_rows();
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*-----------may25-------------------*/
|
||||||
|
|
||||||
/*------------------------------*/
|
/*------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -4808,7 +4808,7 @@ function populateValueMainFormForEditRevenueTax()
|
|||||||
do {
|
do {
|
||||||
i += 1;
|
i += 1;
|
||||||
|
|
||||||
alert(i);
|
// alert(i);
|
||||||
var tr= document.getElementById(i);
|
var tr= document.getElementById(i);
|
||||||
//alert(tr);
|
//alert(tr);
|
||||||
if(tr != null)
|
if(tr != null)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user