diff --git a/app/Controllers/Purchaseorder.php b/app/Controllers/Purchaseorder.php index 21caa653..4aac50c1 100755 --- a/app/Controllers/Purchaseorder.php +++ b/app/Controllers/Purchaseorder.php @@ -1448,14 +1448,15 @@ class Purchaseorder extends BaseController $IGRDs = array('QuantityAsPerInvoice' => $Quantity, 'UpdateBY' => $updatedBy, 'UpdatedOn' => $updateddt); - - $this->purchaseorder_model->updateIGR($IGRD[$j]['IGRItemNo'], $IGRDs); + $itemNo = isset($IGRD[$j]['IGRItemNo']) ? $IGRD[$j]['IGRItemNo'] : null; + + $this->purchaseorder_model->updateIGR($itemNo, $IGRDs); - $MaterialstockHistoryupdate = array('SupplierID' => $SupplierID, 'Quantity' => $Quantity, 'ItemValue' => $itemRate, 'UpdateBY' => $updatedBy, 'UpdatedOn' => $updateddt); + $MaterialstockHistoryupdate = array('SupplierID' => $SupplierID, 'Quantity' => $Quantity, 'ItemValue' => $itemRate, 'UpdatedBY' => $updatedBy, 'UpdatedOn' => $updateddt); - $itemNo = $IGRD[$j]['IGRItemNo']; + $this->purchaseorder_model->updateMatStock( @@ -4312,8 +4313,13 @@ class Purchaseorder extends BaseController } }else{ - echo " File already Uploaded with this name..!!"; - return false; + $response = [ + 'message' => 'File already uploaded with this name.!!', + 'data' => false + ]; + + // Return the response as JSON + return $this->response->setJSON($response); } } diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index f4a4900a..95154ec3 100755 --- a/app/Views/EditservicePurchaseorder.php +++ b/app/Views/EditservicePurchaseorder.php @@ -1092,7 +1092,7 @@ if (!empty($getlogpodtl)) {
| Basic Amount | Tax Amount | Total Order Amount | -Action | Item Description | Quantity | UOM | -Rate | -Basic Amount | -Tax Amount | -Total Order Amount | +Rate | +Basic Amount | +Tax Amount | +Total Order Amount | Action | @@ -4727,7 +4730,7 @@ if (!empty($INRSYMBOL)) {
|---|