Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme

This commit is contained in:
vadivel J 2024-09-19 14:20:53 +05:30
commit bb8691da68
10 changed files with 1702 additions and 1673 deletions

View File

@ -127,6 +127,8 @@ class Amendmentpurchaseorder extends BaseController
$data['POSTATUS'] = $this->purchaseorder_model->GetPOStatus($PONO);
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO);
// echo "<pre>";
// print_r($data['POItem']);die;
$data['PaymentTerms'] = $this->purchaseorder_model->GetPaymentTerms($PONO);
$this->global['pageTitle'] = 'Edit Revenue Purchase order form';
$this->loadViews("editRevenueAmendPO", $this->global, $data, NULL);
@ -209,7 +211,6 @@ class Amendmentpurchaseorder extends BaseController
*/
function EditRevenuePurchaseOrder()
{
// print_r($this->request->getPost());die;
$NewPO = '';
$MAD = '';
$PONO = $this->request->getPost('txtPONO');
@ -313,7 +314,7 @@ class Amendmentpurchaseorder extends BaseController
// print_r($POMaster);die;
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO);
// dd($LastPO);
if(!empty($LastPO)){
if (count($LastPO) > 0) {
$NewPO = $LastPO[0]['PONO'];
@ -494,11 +495,10 @@ class Amendmentpurchaseorder extends BaseController
}
}
if (($FreightValue - $preFreightValue) != 0) {
if (((int)$FreightValue - $preFreightValue) != 0) {
$rowspanvalue++;
$CAD .= "<tr><td>Current Freight : " . $preFreightValue . "</td><td>Revised Freight : " . $FreightValue . "</td></tr>";
}
if (($AfterFreightValue - $beforeAfterFreightValue) != 0) {
$rowspanvalue++;
$CAD .= "<tr><td>Current Freight Value : " . $beforeAfterFreightValue . "</td><td>Revised Freight Value : " . $AfterFreightValue . "</td></tr>";
@ -567,7 +567,6 @@ class Amendmentpurchaseorder extends BaseController
*/
function UpdateAmendServicePurchaseOrder()
{
$PONO = $this->request->getPost('txtPONO');
$MAD = '';
@ -651,7 +650,7 @@ class Amendmentpurchaseorder extends BaseController
$POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'POType' => $POType, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $scopeofwork, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $updateddt, 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'ServiceWorkStatus' => $WorkStatus, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'Description_Of_Service' => strip_tags((string)$DescriptionOfPo), 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $qtycheckresult);
$file = $this->request->getFile('POFile');
$PrePOFile = $this->request->getPost('PrePOFile');
$requestfilename = $file->getName();
$requestfilename = $file ? $file->getName() : null;
if (!empty($requestfilename)) {
if ($file && $file->isValid() && !$file->hasMoved()) {
$path = ROOTPATH . 'public/uploads/POfiles/';
@ -671,7 +670,6 @@ class Amendmentpurchaseorder extends BaseController
} else {
$POMaster['POFile'] = $PrePOFile ? $PrePOFile : null;
}
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO);
$NewPO = '';
@ -971,7 +969,7 @@ class Amendmentpurchaseorder extends BaseController
$AmendmentNewPoNo = generate_amendment_po_number($PONO);
$POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $FinalTotalOrder, 'POType' => $POType, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'CapitalRange' => $PoRange, 'ExchangeRate' => $ExchangeRate, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'PaymentTerms' => $PaymentMethod, 'PaymentOtherDescription' => $Otherpayment, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CurrencyType' => $currencytypeID, 'AmendedDetails' => $MAD, 'Import_DispatchDetails' => $curdispatch, 'Import_PlaceofOrgin' => $PlaceOforigin, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $qtycheckresult);
$file = $this->request->getFile('POFile');
$requestfilename = $file->getName();
$requestfilename = $file ? $file->getName() : null;
$PrePOFile = $this->request->getPost('PrePOFile');
if (!empty($requestfilename)) {
if ($file && $file->isValid() && !$file->hasMoved()) {
@ -993,7 +991,6 @@ class Amendmentpurchaseorder extends BaseController
$POMaster['POFile'] = $PrePOFile ? $PrePOFile : null;
}
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $CreateBy, $PONO);
if (count($LastPO) > 0) {
@ -1394,6 +1391,7 @@ class Amendmentpurchaseorder extends BaseController
// if (count($LastPO) > 0) {
// $NewPO = $LastPO[0]['PONO'];
// }
// print_r($LastPO);die;
foreach ($LastPO as $PO) :
$NewPO = $PO['PONO'];
endforeach;
@ -1403,11 +1401,8 @@ class Amendmentpurchaseorder extends BaseController
$LineItemStatus = REQITEM_NEW;
$igrvalue = $this->purchaseorder_model->selectigrmaster($PONO);
$po = '';
$igrno = '';
// if(count($igrvalue) >0)

View File

@ -822,7 +822,7 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
function addAmendPOMaster($POMaster, $CreatedBy, $ParentPO)
{
// print_r($POMaster);
// print_r($POMaster);die;
$this->db->transStart();
$builder = $this->db->table('t_purchaseorder_master');
$builder->insert($POMaster);
@ -1699,15 +1699,16 @@ QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty,Per,
{
$builder = $this->db->table('t_purchaseorder_master mast')
->select('mast.CreatedBy, re.FirstName, Dept.DEPCode, Dept.DepartmentName')
->join('tbl_users tbl', 'mast.CreatedBy=tbl.userid')
->join('t_employee_details re', 're.EmpID=tbl.EmpID')
->join('t_departmentdetails Dept', 're.Departmentcode = Dept.DEPCode')
->join('tbl_users tbl', 'mast.CreatedBy = tbl.userid', 'left')
->join('t_employee_details re', 're.EmpID = tbl.EmpID', 'left')
->join('t_departmentdetails Dept', 're.Departmentcode = Dept.DEPCode', 'left')
->where('mast.PONO', $PONO);
$result = $builder->get();
$result = $builder->get();
return $result->getResult();
}
// get domestic capital po list

View File

@ -455,7 +455,8 @@
format: dateFormat,
autoclose: true,
todayHighlight: true,
clearBtn: true
clearBtn: true,
orientation: 'bottom'
}).on('changeDate', function(e) {
// When a date is selected in #min-date, update the minDate option for #max-date
// to.datepicker('setStartDate', e.date);
@ -467,7 +468,8 @@
// startDate: new Date(), // Start date cannot be in the past
autoclose: true,
todayHighlight: true,
clearBtn: true
clearBtn: true,
orientation: 'bottom'
}).on('changeDate', function(e) {
// When a date is selected in #max-date, update the endDate option for #min-date
from.datepicker('setStartDate', e.date);

View File

@ -262,7 +262,7 @@
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4><?= "Capital Purchase Order"; ?></h4>
<a href="<?php echo base_url() ?>CreatePO" class="btn btn-success" id="back" value="Back">Back</a>
<a href="<?php echo base_url() ?>CreatePO" class="btn btn-secondary" id="back" value="Back">Back</a>
</div>
</div>
</div>

View File

@ -6,7 +6,6 @@
array("name" => "NO", "value" => "0"),
array("name" => "YES", "value" => "1")
);
$requestedBy = $requestedBy[0]->FirstName;
// $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
@ -427,7 +426,7 @@
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4><?= "Amended Capital Purchase Order - $PONO "; ?></h4>
<a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-success" id="back" value="Back">Back</a>
<a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-secondary" id="back" value="Back">Back</a>
</div>
</div>
</div>
@ -784,42 +783,6 @@
<div class="form-group col-md-3">
</div>
</div>
<div id="editpackagingcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Freight Calculation On</h4>
</div>
<div class="modal-body">
<form>
<div class="radio">
<label><input type="radio" name="editoptPackaging" checked="checked" value='0' id="editoptPackaging"> Basic Amount</label>
</div>
<div class="radio">
<label><input type="radio" name="editoptPackaging" id="editoptPackaging" value='1'> After Discount Amount</label>
</div>
</form>
</div>
<div class="modal-footer">
<a class="btn btn-success" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
<a class="btn btn-success" ID="editPackagingOption" onclick="calculateFreightloceditper();" style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a>
</div>
</div>
</div>
</div>
<div class="form-row">
<div align="right">
<!-- <a data-toggle="modal" ><button type="submit" onclick="myFunction();" class="btn btn-success" id="abcd" >Select Line Item</button> </a> -->
</div>
<br>
</div>
<div class="form-row">
<div class="table-responsive">
<table id="serviceTax" class="table table-striped table-hover mb-0" style="font-size:12px;">
@ -1169,7 +1132,6 @@
?> <input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index; ?>">
<!-- first <input type="text" name="CapitalToatlOrder" id="CapitalToatlOrder" value="<?php echo $totalCapitalOrder; ?>">-->
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<input type="hidden" name="capitalType" id="capitalType" value="<?php echo $CapitalRange; ?>" />
@ -1181,6 +1143,8 @@
</table>
</div>
</div>
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<br>
<div class="form-row" id="CAPdiv">
@ -1393,13 +1357,16 @@
</div>
<div class="form-row" style="padding:3%;">
<div class="form-group col-md-12" align="right">
<div class="form-group col-md-12" align="right"><br>
<div>
<input type="file" name="POFile" id="POFile">
<?php if ($PrePOFile) { ?>
<label><a title="previously uploaded PO File" href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
<?php } ?>
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br>
<input type="hidden" id="PrePOFile" name="PrePOFile" value=""><br>
</div>
<div class="btn-container" style="text-align: right;">
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus" id="txtStatus" />
@ -1410,9 +1377,13 @@
<a class="btn btn-success Save" ID="Submit" onclick="Save()">&nbsp;&nbsp;<span class="bold">Submit</span></a>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12">
<?php $UpdatedOn = new DateTime($UpdatedOn, new DateTimeZone('Asia/Kolkata'));
$UpdatedOn = $UpdatedOn->format('d-m-Y'); ?>
<label>Request On :</label><?php echo $UpdatedOn; ?><br />
@ -1441,6 +1412,43 @@
<br />
</div>
</div>
<div id="editpackagingcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Freight Calculation On</h4>
</div>
<div class="modal-body">
<form>
<div class="radio">
<label><input type="radio" name="editoptPackaging" checked="checked" value='0' id="editoptPackaging"> Basic Amount</label>
</div>
<div class="radio">
<label><input type="radio" name="editoptPackaging" id="editoptPackaging" value='1'> After Discount Amount</label>
</div>
</form>
</div>
<div class="modal-footer">
<a class="btn btn-success" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
<a class="btn btn-success" ID="editPackagingOption" onclick="calculateFreightloceditper();" style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a>
</div>
</div>
</div>
</div>
<div class="form-row">
<div align="right">
<!-- <a data-toggle="modal" ><button type="submit" onclick="myFunction();" class="btn btn-success" id="abcd" >Select Line Item</button> </a> -->
</div>
<br>
</div>
@ -3053,7 +3061,8 @@
$('#AmendtxtAfterFreight').attr("style", "pointer-events: none;");
$('#AmendNOOfTrips').attr("style", "pointer-events: none;");
$('#drpamendFreight').attr("style", "pointer-events: none;");
});});
});
});
@ -3188,7 +3197,7 @@
//alert('else');
$('#content').loader('show');
// $('#content').loader('show');
//salert('ss');
//alert('before Ajax');
var formData = new FormData($('.CapitalPO')[0]);
@ -3205,9 +3214,10 @@
processData: false,
contentType: false,
success: function(data) {
// console.log(data);
if (data) {
alert(data);
$('#content').loader('hide');
// $('#content').loader('hide');
$('#txtRowCount').val('');
$('#txtDeletedRow').val('');
@ -3216,7 +3226,7 @@
window.location = "amendmentpurchaseorder";
} else {
$('#content').loader('hide');
// $('#content').loader('hide');
alert("Error");
}

View File

@ -298,7 +298,7 @@ if (!empty($RequistionDetails)) {
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4><?= "Amended Import Purchase Order - $PONO "; ?></h4>
<a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-success" id="back" value="Back">Back</a>
<a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-secondary" id="back" value="Back">Back</a>
</div>
</div>
</div>
@ -2931,8 +2931,7 @@ if (!empty($RequistionDetails)) {
$('#Deliverydt').focus();
return false;
} else {
$('#content').loader('show');
// $('#content').loader('show');
var formData = new FormData($('.ImportPO')[0]);
$.ajax({
@ -2944,8 +2943,9 @@ if (!empty($RequistionDetails)) {
type: "POST",
url: "<?php echo base_url() ?>amendmentpurchaseorder/EditAmendImportPO",
success: function(data) {
//console.log(data);
if (data) {
$('#content').loader('hide');
// $('#content').loader('hide');
alert(data);
$('#txtRowCount').val('');
$('#txtDeletedRow').val('');

View File

@ -160,7 +160,7 @@ if (!empty($INRSYMBOL)) {
var InsuranceNumber = '<?php echo $insurenceno; ?>';
$(document).ready(function() {
$('#RequistionNo').attr("style", "pointer-events: none;");
// $('#RequistionNo').attr("style", "pointer-events: none;");
$('#drpSupplier').attr("style", "pointer-events: none;");
$('#PoTypeOptions').attr("style", "pointer-events: none;");
$('#insurancestatus').attr("style", "pointer-events: none;");
@ -333,7 +333,12 @@ if (!empty($INRSYMBOL)) {
$('#txtEditAfterFreight').val('');
if (selValue == PercentageType) {
var PackagingCalculation = '';
// $('#freightmodel').modal('show');
$('#EDITREVENUE').modal('hide');
setTimeout(() => {
$('#freightmodel').modal('show');
}, 1000);
$('#txtEditFreight').removeAttr('readonly', 'true');
} else if (selValue == NilType) {
@ -734,6 +739,10 @@ if (!empty($INRSYMBOL)) {
FreightCalculation = $("input:radio[name='optfreight']:checked").val();
// alert("this is value taken as before after radio value"+FreightCalculation);
$('#freightmodel').modal('hide');
setTimeout(() => {
$('#EDITREVENUE').modal('show');
}, 1000);
// $('#EDITREVENUE').modal('show');
calculateFreight();
}
@ -911,6 +920,7 @@ if (!empty($INRSYMBOL)) {
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4><?= "Amendment Revenue Purchase Order - $PONO "; ?></h4>
<a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-secondary" id="back" value="Back">Back</a>
</div>
</div>
</div>
@ -1908,10 +1918,10 @@ if (!empty($INRSYMBOL)) {
<div class="modal-body p-4">
<form>
<div class="radio">
<div>
<label><input type="radio" name="optfreight" checked="checked" value='0' id="optFreight"> Basic Amount</label>
</div>
<div class="radio">
<div>
<label><input type="radio" name="optfreight" id="optFreight" value='1'> After Discount Amount</label>
</div>
</form>
@ -2011,7 +2021,7 @@ if (!empty($INRSYMBOL)) {
</script> -->
<script>
$(document).ready(function() {
var tempUserId = 0;
var index = '1';
var userid = '';
$("#EDITREVENUE").on("shown.bs.modal", function(e) {
@ -2021,7 +2031,9 @@ if (!empty($INRSYMBOL)) {
AvlBudAmt = '<?php echo number_format($AvlAmount + $totBasicAmt - $totDiscountAmt, 2, '.', '') ?>';
userid = $(e.relatedTarget).data('userid');
$('#isEdit').val(1);
//alert(userid);
$('#isEdit').val(1);
alert(tempUserId);
if (tempUserId == 0) {
var tr = document.getElementById(userid);
var cellval = tr.cells;
var id = $('#Reqnumber' + userid).val();
@ -2096,6 +2108,13 @@ if (!empty($INRSYMBOL)) {
$("input:radio[name='optExcise'][value='" + $('#ExciseOption' + userid).val() + "']").prop('checked', 'checked');
$("input:radio[name='optVat'][value='" + $('#VatOption' + userid).val() + "']").prop('checked', 'checked');
$("input:radio[name='optCST'][value='" + $('#CSTOption' + userid).val() + "']").prop('checked', 'checked');
}
if (userid) {
tempUserId = userid;
} else {
userid = tempUserId;
}
});
$('#BudgetType').attr("style", "pointer-events: none;");
@ -2452,6 +2471,7 @@ if (!empty($INRSYMBOL)) {
processData: false,
contentType: false,
success: function(data) {
// console.log(data);
if (data) {
// $('.content').loader('hide');
alert(data);

View File

@ -4832,8 +4832,8 @@ if (!empty($getlogpodtl)) {
});
function Save(status) {
console.log("status");
console.log(status);
// console.log("status");
// console.log(status);
if (status == '0') {
stat = '<?php echo PO_DRAFT; ?>';
@ -5103,7 +5103,7 @@ if (!empty($getlogpodtl)) {
}
});
$("#Date").datepicker();
// $("#Date").datepicker();
function splpoupdate() {
var formData = new FormData();

View File

@ -93,7 +93,6 @@ if (!empty($POMaster)) {
if (!empty($RequistionDetails)) {
foreach ($RequistionDetails as $ReqDet) {
@ -190,6 +189,7 @@ foreach ($PaymentTerms as $TER) {
} else {
$('#insuranceTxtDiv').hide();
$('#insuranceTxtDiv').prop('required', false);
}
if (DelOpt == "0") {
$('#Deliverydtdiv').show();
@ -687,7 +687,7 @@ foreach ($PaymentTerms as $TER) {
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4><?= "Amended Service Purchase Order- $PONO "; ?></h4>
<a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-success" id="back" value="Back">Back</a>
<a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-secondary" id="back" value="Back">Back</a>
</div>
</div>
</div>
@ -999,7 +999,303 @@ foreach ($PaymentTerms as $TER) {
</div>
<br />
<table id="ServiceTable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead>
<tr>
<th>SNo</th>
<th>Requisition No</th>
<th>Item Code</th>
<th>Item Name</th>
<th>Quantity</th>
<th>UOM</th>
<th>Rate<?php echo $INRSYM ?></th>
<th>Basic Amount<?php echo $INRSYM ?></th>
<th>Tax Amount<?php echo $INRSYM ?></th>
<th>Total Order Amount<?php echo $INRSYM ?></th>
<th>Actual Quantity</th>
<th>Received Quantity</th>
<th>Pending Quantity</th>
<th>Action</th>
</tr>
</thead>
<tbody id='ServiceAppend'>
<?php
if (!empty($POItem)) {
//print_r($POItem);
$index = 0;
foreach ($POItem as $record) {
$index = $index + 1;
if ($record->Schedule_Type != 'Recurring') {
$FrequencyNo = intval(1);
$Frequency = 'One Time';
} else {
$FrequencyNo = $record->NumberOfService;
$Frequency = $record->Service_Period;
}
?>
<tr id="<?php echo $index; ?>">
<td align="left"><?php echo $index; ?></td>
<td><?php echo $record->ReqNo ?> </td>
<td><?php echo $record->MaterialCode ?></td>
<td><?php echo $record->MaterialName ?></td>
<td><?php echo $record->Quantity ?></td>
<td><?php echo $record->UOM ?></td>
<td><?php echo $record->Rate ?></td>
<td><?php echo number_format($record->BasicValue * $FrequencyNo, 2, '.', ''); ?></td>
<td><?php echo $record->Taxamount ?></td>
<td><?php echo $record->TotalValue ?></td>
<td><?php echo $record->Quantity ?></td>
<td><?php echo $record->ReceivedQuantity ?></td>
<td><?php echo number_format($record->Quantity - $record->ReceivedQuantity, 2, '.', ''); ?></td>
<input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
<input type="hidden" name="<?php echo 'departmentName' . $index ?>" id="<?php echo 'departmentName' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
<input type="hidden" name="<?php echo 'AvilBudget' . $index ?>" id="<?php echo 'AvilBudget' . $index ?>" value="<?php echo $AvlAmount; ?>" />
<input type="hidden" name="<?php echo 'LineItemNo' . $index ?>" id="<?php echo 'LineItemNo' . $index ?>" value="<?php echo $record->LineItemNo; ?>" />
<input type="hidden" name="<?php echo 'costCode' . $index ?>" id="<?php echo 'costCode' . $index ?>" value="<?php echo $record->CostCenterCode; ?>" />
<input type="hidden" name="<?php echo 'materialCode' . $index ?>" id="<?php echo 'materialCode' . $index ?>" value="<?php echo $record->MaterialCode; ?>" />
<input type="hidden" name="<?php echo 'materialName' . $index ?>" id="<?php echo 'materialName' . $index ?>" value="<?php echo $record->MaterialName; ?>" />
<input type="hidden" name="<?php echo 'uom' . $index ?>" id="<?php echo 'uom' . $index ?>" value="<?php echo $record->UOM; ?>" />
<input type="hidden" name="<?php echo 'per' . $index ?>" id="<?php echo 'per' . $index ?>" value="<?php echo $record->Per; ?>" />
<input type="hidden" name="<?php echo 'quantity' . $index ?>" id="<?php echo 'quantity' . $index ?>" value="<?php echo $record->Quantity; ?>" />
<input type="hidden" name="<?php echo 'beforequantity' . $index ?>" id="<?php echo 'beforequantity' . $index ?>" value="<?php echo $record->Quantity; ?>" />
<input type="hidden" name="<?php echo 'itemRate' . $index ?>" id="<?php echo 'itemRate' . $index ?>" value="<?php echo $record->Rate; ?>" />
<input type="hidden" name="<?php echo 'beforeitemRate' . $index ?>" id="<?php echo 'beforeitemRate' . $index ?>" value="<?php echo $record->Rate; ?>" />
<input type="hidden" name="<?php echo 'Cgst' . $index ?>" id="<?php echo 'Cgst' . $index ?>" value="<?php echo $record->CGST; ?>" />
<input type="hidden" name="<?php echo 'beforeCgst' . $index ?>" id="<?php echo 'beforeCgst' . $index ?>" value="<?php echo $record->CGST; ?>" />
<input type="hidden" name="<?php echo 'AfterCgst' . $index ?>" id="<?php echo 'AfterCgst' . $index ?>" value="<?php echo $record->After_CGST; ?>" />
<input type="hidden" name="<?php echo 'beforeCgstvalue' . $index ?>" id="<?php echo 'beforeCgstvalue' . $index ?>" value="<?php echo $record->After_CGST; ?>" />
<input type="hidden" name="<?php echo 'Sgst' . $index ?>" id="<?php echo 'Sgst' . $index ?>" value="<?php echo $record->SGST; ?>" />
<input type="hidden" name="<?php echo 'beforeSgst' . $index ?>" id="<?php echo 'beforeSgst' . $index ?>" value="<?php echo $record->SGST; ?>" />
<input type="hidden" name="<?php echo 'AfterSgst' . $index ?>" id="<?php echo 'AfterSgst' . $index ?>" value="<?php echo $record->After_SGST; ?>" />
<input type="hidden" name="<?php echo 'beforeSgstvalue' . $index ?>" id="<?php echo 'beforeSgstvalue' . $index ?>" value="<?php echo $record->After_SGST; ?>" />
<input type="hidden" name="<?php echo 'Igst' . $index ?>" id="<?php echo 'Igst' . $index ?>" value="<?php echo $record->IGST; ?>" />
<input type="hidden" name="<?php echo 'beforeIgst' . $index ?>" id="<?php echo 'beforeIgst' . $index ?>" value="<?php echo $record->IGST; ?>" />
<input type="hidden" name="<?php echo 'AfterIgst' . $index ?>" id="<?php echo 'AfterIgst' . $index ?>" value="<?php echo $record->After_IGST; ?>" />
<input type="hidden" name="<?php echo 'beforeIgstvalue' . $index ?>" id="<?php echo 'beforeIgstvalue' . $index ?>" value="<?php echo $record->After_IGST; ?>" />
<input type="hidden" name="<?php echo 'otherallowance' . $index ?>" id="<?php echo 'otherallowance' . $index ?>" value="<?php echo $record->otherallowance; ?>" />
<input type="hidden" name="<?php echo 'beforeotherallowance' . $index ?>" id="<?php echo 'beforeotherallowance' . $index ?>" value="<?php echo $record->otherallowance; ?>" />
<input type="hidden" name="<?php echo 'TotalOrderValue' . $index ?>" id="<?php echo 'TotalOrderValue' . $index ?>" value="<?php echo $record->TotalValue; ?>" />
<input type="hidden" name="<?php echo 'servicematerialdescription' . $index ?>" id="<?php echo 'servicematerialdescription' . $index ?>" value="<?php echo $record->ServiceMaterialDescription; ?>" />
<input type="hidden" name="<?php echo 'Frequency' . $index ?>" id="<?php echo 'Frequency' . $index ?>" value="<?php echo $Frequency; ?>" />
<input type="hidden" name="<?php echo 'FrequencyNo' . $index ?>" id="<?php echo 'FrequencyNo' . $index ?>" value="<?php echo $FrequencyNo; ?>" />
<input type="hidden" name="<?php echo 'FrequencyValue' . $index ?>" id="<?php echo 'FrequencyValue' . $index ?>" value="<?php echo $FrequencyNo; ?>" />
<input type="hidden" name="<?php echo 'OtherServiceDescription' . $index ?>" id="<?php echo 'OtherServiceDescription' . $index ?>" value="<?php echo $record->MaterialDescription; ?>" />
<?php
//if($PONOStatus == PO_DRAFT)
//{
?>
<td> <a data-target='#EDITSERVICE' data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>"
data-toggle="modal" href="#EDITSERVICE"><i class="ri-pencil-fill" data-toggle="tooltip"
title="Click here to view/Edit the <?php echo $record->ReqNo; ?>
Requisition details"></i>&nbsp;&nbsp;&nbsp;
<!-- </a> <a href='#' onclick = "DeleteRow(<?php echo $index; ?>)" class="link" data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" id="Del" ><span class="ri-delete-bin-7-fill"></span></a>-->
<?php
//} else {
?>
<!-- <td> <a data-toggle="tooltip" href="#"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requistion details"></i>&nbsp;&nbsp;&nbsp;</a> </td> -->
<?php
//}
?>
</tr>
<?php
$TotalCgst = $TotalCgst + $record->After_CGST;
$TotalSgst = $TotalSgst + $record->After_SGST;
$TotalIgst = $TotalIgst + $record->After_IGST;
$Totalotherallowance = $Totalotherallowance + $record->otherallowance;
$TotalSummary = $TotalSummary + $record->TotalValue;
$TotalBasicAmount = $TotalBasicAmount + ($record->BasicValue * $FrequencyNo);
}
?> <input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index; ?>">
<?php
}
?>
</tbody>
</table>
<div class="form-row">
<div class="form-group col-md-2">
<label>Basic Amount <?php echo $INRSYM ?> </label>
<?php
$data = array('name' => 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount', number_format($TotalBasicAmount, 2, '.', '')), 'id' => 'txtTotBasicAmount', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>CGST <?php echo $INRSYM ?></label>
<?php
$data = array('name' => 'txtTotCgst', 'value' => set_value('txtTotCgst', number_format($TotalCgst, 2, '.', '')), 'id' => 'txtTotCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>SGST <?php echo $INRSYM ?></label>
<?php
$data = array('name' => 'txtTotSgst', 'value' => set_value('txtTotSgst', number_format($TotalSgst, 2, '.', '')), 'id' => 'txtTotSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>IGST <?php echo $INRSYM ?></label>
<?php
$data = array('name' => 'txtTotIgst', 'value' => set_value('txtTotIgst', number_format($TotalIgst, 2, '.', '')), 'id' => 'txtTotIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>Other Allowances <?php echo $INRSYM ?> </label>
<?php
$data = array('name' => 'ToatalOtherAllowances', 'value' => set_value('ToatalOtherAllowances', number_format($Totalotherallowance, 2, '.', '')), 'id' => 'ToatalOtherAllowances', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>Total Order Value <?php echo $INRSYM ?> </label>
<input type="hidden" name="preTotalordervalue" value="<?php echo $TotalSummary; ?>">
<?php
$data = array('name' => 'txtTotalOrderValueSummary', 'value' => set_value('txtTotalOrderValueSummary', number_format($TotalSummary, 2, '.', '')), 'id' => 'txtTotalOrderValueSummary', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<br>
<div class="form-row">
<!--start new fields 1 sep-->
<div class="form-group col-md-12">
<label>Description Of Service </label><span class="text-danger">*</span>
<?php
$data = array('name' => 'amenddescofpo', 'value' => set_value('amenddescofpo', $DescriptionOfPo), 'id' => 'amenddescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
echo form_textarea($data);
?>
</div>
<!--end new fields 1 sep-->
</div>
<br>
<div class="form-row">
<div class="form-group col-md-12">
<label>Scope Of Work</label>
<textarea name="ScopeofWork" id="ScopeofWork" class="form-control" rows="8" cols="40">
<?php echo set_value('ScopeofWork', $ServiceDescription); ?>
</textarea>
</div>
</div>
<br>
<!-- <label>Purchase Order File</label> -->
<div class="form-row">
<div class="form-group col-md-12" align="right"><br>
<div>
<input type="file" name="POFile" id="POFile">
<?php if ($PrePOFile) { ?>
<label><a title="previously uploaded PO File" href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
<?php } ?>
</div>
<div class="btn-container" style="text-align: right;">
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br>
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="button" class="btn btn-success mr-2 " value="Cancel" onClick="window.location ='amendmentpurchaseorder';">
<!-- <a class="btn btn-success Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> -->
<a class="btn btn-success Save " ID="Submit" onclick="Save()">&nbsp;&nbsp;<span class="bold">Submit</span></a>
</div>
</div>
</div>
<br>
<div class="row">
<div class="form-group col-md-3">
<?php $Reqon = new DateTime($Reqon, new DateTimeZone('Asia/Kolkata'));
$Reqon = $Reqon->format('d-m-Y'); ?>
<label>Request On :</label><?php echo $Reqon; ?><br />
<label>Request By :</label><?php echo $RequesterName; ?><br />
<label>Status : </label><?php
$statusMappings = [
'PO APPROVED' => 'AWAITING APPROVE',
'AWAITING RELEASE' => 'AWAITING APPROVE',
'RELEASER ONHOLD' => 'APPROVER ONHOLD',
'PO RELEASED' => 'PO APPROVED',
];
if (isset($StatusName) && !empty($StatusName)) {
if (isset($statusMappings[$StatusName])) {
echo $statusMappings[$StatusName];
} else {
echo $StatusName;
}
} else {
echo "Status not provided";
}
?>
</div>
</div>
</div>
@ -1313,9 +1609,14 @@ foreach ($PaymentTerms as $TER) {
</div>
<div class="form-group col-md-3">
<?php $data = array('name' => 'EdittxtSpcialInstruction',
<?php $data = array(
'name' => 'EdittxtSpcialInstruction',
'value' => set_value('EdittxtSpcialInstruction', $ServiceMaterialDescription),
'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control ', 'rows' => '3', 'cols' => '40');
'id' => 'EdittxtSpcialInstruction',
'class' => 'form-control ',
'rows' => '3',
'cols' => '40'
);
echo form_textarea($data);
?>
<input type="hidden" name="beforeEdittxtSpcialInstruction" id="beforeSpcialInstruction"
@ -1340,309 +1641,6 @@ foreach ($PaymentTerms as $TER) {
</div>
</div>
<br />
<table id="ServiceTable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead>
<tr>
<th>SNo</th>
<th>Requisition No</th>
<th>Item Code</th>
<th>Item Name</th>
<th>Quantity</th>
<th>UOM</th>
<th>Rate<?php echo $INRSYM ?></th>
<th>Basic Amount<?php echo $INRSYM ?></th>
<th>Tax Amount<?php echo $INRSYM ?></th>
<th>Total Order Amount<?php echo $INRSYM ?></th>
<th>Actual Quantity</th>
<th>Received Quantity</th>
<th>Pending Quantity</th>
<th>Action</th>
</tr>
</thead>
<tbody id='ServiceAppend'>
<?php
if (!empty($POItem)) {
//print_r($POItem);
$index = 0;
foreach ($POItem as $record) {
$index = $index + 1;
if ($record->Schedule_Type != 'Recurring') {
$FrequencyNo = intval(1);
$Frequency = 'One Time';
} else {
$FrequencyNo = $record->NumberOfService;
$Frequency = $record->Service_Period;
}
?>
<tr id="<?php echo $index; ?>">
<td align="left"><?php echo $index; ?></td>
<td><?php echo $record->ReqNo ?> </td>
<td><?php echo $record->MaterialCode ?></td>
<td><?php echo $record->MaterialName ?></td>
<td ><?php echo $record->Quantity ?></td>
<td><?php echo $record->UOM ?></td>
<td><?php echo $record->Rate ?></td>
<td ><?php echo number_format($record->BasicValue * $FrequencyNo, 2, '.', ''); ?></td>
<td ><?php echo $record->Taxamount ?></td>
<td ><?php echo $record->TotalValue ?></td>
<td ><?php echo $record->Quantity ?></td>
<td ><?php echo $record->ReceivedQuantity ?></td>
<td ><?php echo number_format($record->Quantity - $record->ReceivedQuantity, 2, '.', ''); ?></td>
<input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
<input type="hidden" name="<?php echo 'departmentName' . $index ?>" id="<?php echo 'departmentName' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
<input type="hidden" name="<?php echo 'AvilBudget' . $index ?>" id="<?php echo 'AvilBudget' . $index ?>" value="<?php echo $AvlAmount; ?>" />
<input type="hidden" name="<?php echo 'LineItemNo' . $index ?>" id="<?php echo 'LineItemNo' . $index ?>" value="<?php echo $record->LineItemNo; ?>" />
<input type="hidden" name="<?php echo 'costCode' . $index ?>" id="<?php echo 'costCode' . $index ?>" value="<?php echo $record->CostCenterCode; ?>" />
<input type="hidden" name="<?php echo 'materialCode' . $index ?>" id="<?php echo 'materialCode' . $index ?>" value="<?php echo $record->MaterialCode; ?>" />
<input type="hidden" name="<?php echo 'materialName' . $index ?>" id="<?php echo 'materialName' . $index ?>" value="<?php echo $record->MaterialName; ?>" />
<input type="hidden" name="<?php echo 'uom' . $index ?>" id="<?php echo 'uom' . $index ?>" value="<?php echo $record->UOM; ?>" />
<input type="hidden" name="<?php echo 'per' . $index ?>" id="<?php echo 'per' . $index ?>" value="<?php echo $record->Per; ?>" />
<input type="hidden" name="<?php echo 'quantity' . $index ?>" id="<?php echo 'quantity' . $index ?>" value="<?php echo $record->Quantity; ?>" />
<input type="hidden" name="<?php echo 'beforequantity' . $index ?>" id="<?php echo 'beforequantity' . $index ?>" value="<?php echo $record->Quantity; ?>" />
<input type="hidden" name="<?php echo 'itemRate' . $index ?>" id="<?php echo 'itemRate' . $index ?>" value="<?php echo $record->Rate; ?>" />
<input type="hidden" name="<?php echo 'beforeitemRate' . $index ?>" id="<?php echo 'beforeitemRate' . $index ?>" value="<?php echo $record->Rate; ?>" />
<input type="hidden" name="<?php echo 'Cgst' . $index ?>" id="<?php echo 'Cgst' . $index ?>" value="<?php echo $record->CGST; ?>" />
<input type="hidden" name="<?php echo 'beforeCgst' . $index ?>" id="<?php echo 'beforeCgst' . $index ?>" value="<?php echo $record->CGST; ?>" />
<input type="hidden" name="<?php echo 'AfterCgst' . $index ?>" id="<?php echo 'AfterCgst' . $index ?>" value="<?php echo $record->After_CGST; ?>" />
<input type="hidden" name="<?php echo 'beforeCgstvalue' . $index ?>" id="<?php echo 'beforeCgstvalue' . $index ?>" value="<?php echo $record->After_CGST; ?>" />
<input type="hidden" name="<?php echo 'Sgst' . $index ?>" id="<?php echo 'Sgst' . $index ?>" value="<?php echo $record->SGST; ?>" />
<input type="hidden" name="<?php echo 'beforeSgst' . $index ?>" id="<?php echo 'beforeSgst' . $index ?>" value="<?php echo $record->SGST; ?>" />
<input type="hidden" name="<?php echo 'AfterSgst' . $index ?>" id="<?php echo 'AfterSgst' . $index ?>" value="<?php echo $record->After_SGST; ?>" />
<input type="hidden" name="<?php echo 'beforeSgstvalue' . $index ?>" id="<?php echo 'beforeSgstvalue' . $index ?>" value="<?php echo $record->After_SGST; ?>" />
<input type="hidden" name="<?php echo 'Igst' . $index ?>" id="<?php echo 'Igst' . $index ?>" value="<?php echo $record->IGST; ?>" />
<input type="hidden" name="<?php echo 'beforeIgst' . $index ?>" id="<?php echo 'beforeIgst' . $index ?>" value="<?php echo $record->IGST; ?>" />
<input type="hidden" name="<?php echo 'AfterIgst' . $index ?>" id="<?php echo 'AfterIgst' . $index ?>" value="<?php echo $record->After_IGST; ?>" />
<input type="hidden" name="<?php echo 'beforeIgstvalue' . $index ?>" id="<?php echo 'beforeIgstvalue' . $index ?>" value="<?php echo $record->After_IGST; ?>" />
<input type="hidden" name="<?php echo 'otherallowance' . $index ?>" id="<?php echo 'otherallowance' . $index ?>" value="<?php echo $record->otherallowance; ?>" />
<input type="hidden" name="<?php echo 'beforeotherallowance' . $index ?>" id="<?php echo 'beforeotherallowance' . $index ?>" value="<?php echo $record->otherallowance; ?>" />
<input type="hidden" name="<?php echo 'TotalOrderValue' . $index ?>" id="<?php echo 'TotalOrderValue' . $index ?>" value="<?php echo $record->TotalValue; ?>" />
<input type="hidden" name="<?php echo 'servicematerialdescription' . $index ?>" id="<?php echo 'servicematerialdescription' . $index ?>" value="<?php echo $record->ServiceMaterialDescription; ?>" />
<input type="hidden" name="<?php echo 'Frequency' . $index ?>" id="<?php echo 'Frequency' . $index ?>" value="<?php echo $Frequency; ?>" />
<input type="hidden" name="<?php echo 'FrequencyNo' . $index ?>" id="<?php echo 'FrequencyNo' . $index ?>" value="<?php echo $FrequencyNo; ?>" />
<input type="hidden" name="<?php echo 'FrequencyValue' . $index ?>" id="<?php echo 'FrequencyValue' . $index ?>" value="<?php echo $FrequencyNo; ?>" />
<input type="hidden" name="<?php echo 'OtherServiceDescription' . $index ?>" id="<?php echo 'OtherServiceDescription' . $index ?>" value="<?php echo $record->MaterialDescription; ?>" />
<?php
//if($PONOStatus == PO_DRAFT)
//{
?>
<td> <a data-target='#EDITSERVICE' data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>"
data-toggle="modal" href="#EDITSERVICE"><i class="ri-pencil-fill" data-toggle="tooltip"
title="Click here to view/Edit the <?php echo $record->ReqNo; ?>
Requisition details"></i>&nbsp;&nbsp;&nbsp;
<!-- </a> <a href='#' onclick = "DeleteRow(<?php echo $index; ?>)" class="link" data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" id="Del" ><span class="ri-delete-bin-7-fill"></span></a>-->
<?php
//} else {
?>
<!-- <td> <a data-toggle="tooltip" href="#"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requistion details"></i>&nbsp;&nbsp;&nbsp;</a> </td> -->
<?php
//}
?>
</tr>
<?php
$TotalCgst = $TotalCgst + $record->After_CGST;
$TotalSgst = $TotalSgst + $record->After_SGST;
$TotalIgst = $TotalIgst + $record->After_IGST;
$Totalotherallowance = $Totalotherallowance + $record->otherallowance;
$TotalSummary = $TotalSummary + $record->TotalValue;
$TotalBasicAmount = $TotalBasicAmount + ($record->BasicValue * $FrequencyNo);
}
?> <input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index; ?>">
<?php
}
?>
</tbody>
</table>
<div class="form-row">
<div class="form-group col-md-2">
<label>Basic Amount <?php echo $INRSYM ?> </label>
<?php
$data = array('name' => 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount', number_format($TotalBasicAmount, 2, '.', '')), 'id' => 'txtTotBasicAmount', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>CGST <?php echo $INRSYM ?></label>
<?php
$data = array('name' => 'txtTotCgst', 'value' => set_value('txtTotCgst', number_format($TotalCgst, 2, '.', '')), 'id' => 'txtTotCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>SGST <?php echo $INRSYM ?></label>
<?php
$data = array('name' => 'txtTotSgst', 'value' => set_value('txtTotSgst', number_format($TotalSgst, 2, '.', '')), 'id' => 'txtTotSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>IGST <?php echo $INRSYM ?></label>
<?php
$data = array('name' => 'txtTotIgst', 'value' => set_value('txtTotIgst', number_format($TotalIgst, 2, '.', '')), 'id' => 'txtTotIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>Other Allowances <?php echo $INRSYM ?> </label>
<?php
$data = array('name' => 'ToatalOtherAllowances', 'value' => set_value('ToatalOtherAllowances', number_format($Totalotherallowance, 2, '.', '')), 'id' => 'ToatalOtherAllowances', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>Total Order Value <?php echo $INRSYM ?> </label>
<input type="hidden" name="preTotalordervalue" value="<?php echo $TotalSummary; ?>">
<?php
$data = array('name' => 'txtTotalOrderValueSummary', 'value' => set_value('txtTotalOrderValueSummary', number_format($TotalSummary, 2, '.', '')), 'id' => 'txtTotalOrderValueSummary', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<br>
<div class="form-row">
<!--start new fields 1 sep-->
<div class="form-group col-md-12">
<label>Description Of Service </label><span class="text-danger">*</span>
<?php
$data = array('name' => 'amenddescofpo', 'value' => set_value('amenddescofpo', $DescriptionOfPo), 'id' => 'amenddescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
echo form_textarea($data);
?>
</div>
<!--end new fields 1 sep-->
</div>
<br>
<div class="form-row">
<div class="form-group col-md-12">
<label>Scope Of Work</label>
<textarea name="ScopeofWork" id="ScopeofWork" class="form-control" rows="8" cols="40">
<?php echo set_value('ScopeofWork', $ServiceDescription); ?>
</textarea>
</div>
</div>
<br>
<label>Purchase Order File</label>
<div class="form-row">
<div class="col-md-9">
<input type="file" name="POFile" id="POFile">
<?php if ($PrePOFile) { ?>
<label><a title="previously uploaded PO File" href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
<?php } ?>
</div>
<div class="col-md-3">
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br>
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="button" class="btn btn-success mr-2 " value="Cancel" onClick="window.location ='amendmentpurchaseorder';">
<!-- <a class="btn btn-success Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> -->
<a class="btn btn-success Save " ID="Submit" onclick="Save()">&nbsp;&nbsp;<span class="bold">Submit</span></a>
</div>
</div>
<br>
<div class="row">
<div class="form-group col-md-9">
</div>
<div class="form-group col-md-3">
<?php $Reqon = new DateTime($Reqon, new DateTimeZone('Asia/Kolkata'));
$Reqon = $Reqon->format('d-m-Y'); ?>
<label>Request On :</label><?php echo $Reqon; ?><br />
<label>Request By :</label><?php echo $RequesterName; ?><br />
<label>Status : </label><?php
$statusMappings = [
'PO APPROVED' => 'AWAITING APPROVE',
'AWAITING RELEASE' => 'AWAITING APPROVE',
'RELEASER ONHOLD' => 'APPROVER ONHOLD',
'PO RELEASED' => 'PO APPROVED',
];
if (isset($StatusName) && !empty($StatusName)) {
if (isset($statusMappings[$StatusName])) {
echo $statusMappings[$StatusName];
} else {
echo $StatusName;
}
} else {
echo "Status not provided";
}
?>
</div>
</div>
</div> <!-- end card body-->
</div> <!-- end card -->
@ -2178,10 +2176,10 @@ foreach ($PaymentTerms as $TER) {
</script>
<script>
function Save() {
//alert("worked");
stat = '<?php echo PO_CREATED; ?>';
// stat = '<?php echo PO_RELEASED; ?>';
tinyMCE.triggerSave();
var splinstr = $('#ScopeofWork').val();
var deladd = $('#DeliveryAddr').val();
$('#txtStatus').val(stat);
@ -2191,8 +2189,10 @@ foreach ($PaymentTerms as $TER) {
$('#txtDeliveryAddress').val(deladd);
AvlBudAmt = '<?php echo number_format($AvlAmount + $TotalBasicAmount, 2, '.', '') ?>';
var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
// alert("worked");
// if (validate()) {
if (validate()) {
// if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
@ -2207,7 +2207,7 @@ foreach ($PaymentTerms as $TER) {
$('#amenddescofpo').focus();
return false;
} else {
$('#content').loader('show');
// $('#content').loader('show');
var formData = new FormData($('.ServicePO')[0]);
$.ajax({
// data: $('.ServicePO').serialize(),
@ -2218,8 +2218,7 @@ foreach ($PaymentTerms as $TER) {
contentType: false,
success: function(data) {
if (data) {
$('#content').loader('hide');
// $('#content').loader('hide');
alert(data);
$('#txtRowCount').val('');
$('#txtDeletedRow').val('');
@ -2227,19 +2226,16 @@ foreach ($PaymentTerms as $TER) {
$('#SpcialInstruction').val('');
$('#txtDeliveryAddress').val('')
window.location = "amendmentpurchaseorder";
} else {
$('#content').loader('hide');
alert("Error");
}
}
});
}
}
// }
}
// this function is used to clear data changing schedule option
$('#Scheduleby').change(function() {

View File

@ -678,7 +678,7 @@ if (!empty($INRSYMBOL)) {
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4><?= "Service Purchase Order"; ?></h4>
<a href="<?php echo base_url() ?>CreatePO" class="btn btn-success" id="back" value="Back">Back</a>
<a href="<?php echo base_url() ?>CreatePO" class="btn btn-secondary" id="back" value="Back">Back</a>
</div>
</div>
</div>
@ -1343,7 +1343,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="modal-footer">
<div class="form-row">
<a class="btn btn-secondary waves-effect" data-dismiss="modal" value="Cancel">Cancel</a>
<a class="btn btn-secondary waves-effect" data-dismiss="modal" value="Cancel" style="margin-right: 10px;">Cancel</a>
<a class="btn btn-info waves-effect waves-light font AddService" id="AddService"> &nbsp;&nbsp;<span class="bold">Add Service</span></a>
</div>
</div><!-- SERVICE modal-footer closed here -->
@ -1897,7 +1897,7 @@ if (!empty($INRSYMBOL)) {
clearServiceModalFields();
$('#otherdescription').hide();
$('#SERVICE').modal('hide');
}
});
@ -2332,6 +2332,11 @@ if (!empty($INRSYMBOL)) {
$('#PoTypeOptions').focus();
return false;
} else if ($('#Otherpayment').val() == '') {
alert('Please Enter the Payable Terms');
$('#Otherpayment').focus();
return false;
}else {
return true;
}