changes in amendment purchase order-1 vadivel J 26-11-2024

This commit is contained in:
vadivelJ96 2024-11-26 12:16:12 +05:30
parent fc82edfcfd
commit 1b6b2e0f21
5 changed files with 36 additions and 18 deletions

View File

@ -346,9 +346,13 @@ class Amendmentpurchaseorder extends BaseController
$NewPO = "";
}
// $PODetail = array('Status' => PO_AMENDED); //TO SET PARENT PO AS AMENDMENT STATUS
if( $changeStatus == "ST026" || $changeStatus == "ST014"){
$PODetail = array('Status' => PO_AMENDED); //TO SET PARENT PO AS AMENDMENT STATUS
// $APO = $this->purchaseorder_model->updateAmendPOMaster($PONO, $PODetail);
$APO = $this->purchaseorder_model->updateAmendPOMaster($PONO, $PODetail);
}
$LineItemStatus = REQITEM_NEW;
@ -703,9 +707,11 @@ class Amendmentpurchaseorder extends BaseController
}
// $PODetail = array('Status' => PO_AMENDED); //TO SET PARENT PO AS AMENDMENT STATUS
if( $changeStatus == "ST026" || $changeStatus == "ST014"){
$PODetail = array('Status' => PO_AMENDED); //TO SET PARENT PO AS AMENDMENT STATUS
// $APO = $this->purchaseorder_model->updateAmendPOMaster($PONO, $PODetail);
$APO = $this->purchaseorder_model->updateAmendPOMaster($PONO, $PODetail);
}
$LineItemStatus = REQITEM_NEW;
@ -1024,9 +1030,11 @@ class Amendmentpurchaseorder extends BaseController
$NewPO = $LastPO[0]['PONO'];
}
//$PODetail = array('Status' => PO_AMENDED); //TO SET PARENT PO AS AMENDMENT STATUS
if( $changeStatus == "ST026" || $changeStatus == "ST014"){
$PODetail = array('Status' => PO_AMENDED); //TO SET PARENT PO AS AMENDMENT STATUS
// $APO = $this->purchaseorder_model->updateAmendPOMaster($PONO, $PODetail);
$APO = $this->purchaseorder_model->updateAmendPOMaster($PONO, $PODetail);
}
$LineItemStatus = REQITEM_NEW;
@ -1412,12 +1420,16 @@ class Amendmentpurchaseorder extends BaseController
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $CreateBy, $PONO);
$NewPO = '';
foreach ($LastPO as $PO) :
$NewPO = $PO['PONO'];
endforeach;
// $PODetail = array('Status' => PO_AMENDED); //TO SET PARENT PO AS AMENDMENT STATUS
if (count($LastPO) > 0) {
$NewPO = $LastPO[0]['PONO'];
}
// $APO = $this->purchaseorder_model->updateAmendPOMaster($PONO, $PODetail);
if( $changeStatus == "ST026" || $changeStatus == "ST014"){
$PODetail = array('Status' => PO_AMENDED); //TO SET PARENT PO AS AMENDMENT STATUS
$APO = $this->purchaseorder_model->updateAmendPOMaster($PONO, $PODetail);
}
$LineItemStatus = REQITEM_NEW;

View File

@ -840,14 +840,20 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
$insert_id = $this->db->affectedRows();
$this->db->transComplete();
// print_r($insert_id);die;
if ($insert_id > 0) {
$subQuery = 'select PONO from t_purchaseorder_master where CreatedBy=? and ParentPO=? order by CreatedDate desc limit 1';
$query = $this->db->query($subQuery, array($CreatedBy, $ParentPO));
return $query->getResultArray();
$result = $query->getResultArray();
//print_r($result);die;
return $result;
} else {
return [];
}

View File

@ -2929,10 +2929,10 @@ if (!empty($RequistionDetails)) {
var formData = new FormData($('.ImportPO')[0]);
if (status == 0) { // for draft
formData.append('changeStatus','STO14');
formData.append('changeStatus','ST014');
};
if (status == 1) { // for approve
formData.append('changeStatus','STO26');
formData.append('changeStatus','ST026');
};
$.ajax({

View File

@ -2567,10 +2567,10 @@ if (!empty($INRSYMBOL)) {
var formData = new FormData($('.CreatePO')[0]);
if (status == 0) { // for draft
formData.append('changeStatus','STO14');
formData.append('changeStatus','ST014');
};
if (status == 1) { // for approve
formData.append('changeStatus','STO26');
formData.append('changeStatus','ST026');
};
$('#loader').show();

View File

@ -2216,10 +2216,10 @@ foreach ($PaymentTerms as $TER) {
// $('#content').loader('show');
var formData = new FormData($('.ServicePO')[0]);
if (status == 0) { // for draft
formData.append('changeStatus','STO14');
formData.append('changeStatus','ST014');
};
if (status == 1) { // for approve
formData.append('changeStatus','STO26');
formData.append('changeStatus','ST026');
};
$('#loader').show();
$.ajax({