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)) {
-
+
@@ -1106,9 +1106,6 @@ if (!empty($getlogpodtl)) { - diff --git a/app/Views/alterpurchaseorder.php b/app/Views/alterpurchaseorder.php index 807b1ed8..76ce81c6 100755 --- a/app/Views/alterpurchaseorder.php +++ b/app/Views/alterpurchaseorder.php @@ -59,7 +59,10 @@ if (!empty($INRSYMBOL)) { } - + .text-right { + text-align: right !important; + } + @@ -1870,7 +1873,7 @@ if (!empty($INRSYMBOL)) { if($('#purpose').val()=="REVENUE"){ - alert('Please Revenue Service Type Options'); + alert('Please Select Revenue Type Options'); $('#PoTypeOptions').focus(); return false; @@ -2799,10 +2802,10 @@ if (!empty($INRSYMBOL)) { - - - - + + + + @@ -4727,7 +4730,7 @@ if (!empty($INRSYMBOL)) { - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + @@ -1237,7 +1244,7 @@ if (!empty($INRSYMBOL)) { - + @@ -1505,13 +1512,16 @@ if (!empty($INRSYMBOL)) { @@ -5506,21 +5518,33 @@ if (!empty($getlogpodtl)) { }); - function addRow(counter) { + function addRow(counter,billLength) { + console.log("counter"); + console.log(counter); //1 + console.log("billLength"); + console.log(billLength); var file = $(`#images${counter}`).val(); - if (file == '') { + if (file == '' ) { alert('Please Select File..!!'); return false; - } else { + } + else if (billLength >= 5) { // Check upload limit here + alert('You can only upload a maximum of five files!'); + return false; + } else { + // Increment uploadCounter and call file upload function + billLength++; fileupload(counter); } } + + function Copyfilename(id) { var size = $('input[name=' + id + ']')[0].files[0].size; diff --git a/app/Views/porelease_view.php b/app/Views/porelease_view.php index e9c441bd..a6debfa5 100755 --- a/app/Views/porelease_view.php +++ b/app/Views/porelease_view.php @@ -185,7 +185,11 @@ if (empty($Status)) { StatusCode == PO_APPROVER_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED) { ?> -
Basic Amount Tax Amount Total Order Amount Action
Item Description Quantity UOMRateBasic AmountTax AmountTotal Order AmountRateBasic AmountTax AmountTotal Order Amount Action
${Reqnumber} ${materialCode} ${materialName}${quantity}${quantity} ${uom}${itemRate}${basicval}${TotalTaxValue}${TotalOrderValue}${itemRate}${basicval}${TotalTaxValue}${TotalOrderValue} @@ -6682,12 +6676,12 @@ if (!empty($INRSYMBOL)) { ${Reqnumber} ${materialCode} ${materialName}${quantity}${quantity} ${uom}${itemRate}${basicval}${TotalTaxValue}${TotalOrderValue}${itemRate}${basicval}${TotalTaxValue}${TotalOrderValue} @@ -8506,7 +8500,7 @@ if (!empty($INRSYMBOL)) { $("#addemorebutton").click(function () { - //alert('sda'); + if (counters > 4) { alert("You have to upload five files only"); //this allows only 5 files; @@ -8518,22 +8512,21 @@ if (!empty($INRSYMBOL)) { var div = document.createElement('div'); div.id = "divid" + counters; - div.className = "row"; - div.innerHTML = '
' + - + div.className = "row p-2"; + div.innerHTML = '
' + - '' + + '' + '
' + '
' + - '
' + + '
' + '' + - '
' + + '
' + '
' + '' + - '
' + + '
' + ''; $('#newsdiv').append(div); @@ -8585,26 +8578,21 @@ if (!empty($INRSYMBOL)) { //alert("count"+counterConstants); var div = document.createElement('div'); div.id = "divid" + counters; - div.className = "row"; - div.innerHTML = '
' + + div.className = "row p-2" ; + div.innerHTML = '
' + - '' + + '' + '
' + '
' + - // '
'+ - // ''+ - // '
'+ - // '
'+ - + + '
' + + '' + + '
' + '
' + '' + - '
' + - - '
' + - '' + - '
' + + '' + '' + diff --git a/app/Views/editRevenueAmendPO.php b/app/Views/editRevenueAmendPO.php index 753b3bdc..a923975d 100755 --- a/app/Views/editRevenueAmendPO.php +++ b/app/Views/editRevenueAmendPO.php @@ -132,6 +132,13 @@ if (!empty($INRSYMBOL)) { @@ -1214,12 +1221,12 @@ if (!empty($INRSYMBOL)) {
SNo Requisition No Item NameQuantityQuantity UOMRateBasic AmountTax AmountTotal Order AmountRateBasic AmountTax AmountTotal Order Amount Action
ReqNo ?> MaterialName ?>Quantity ?>Quantity ?> UOM ?> Rate ?>