changes in the purchase order listing

This commit is contained in:
vadivel J 2024-09-24 11:41:21 +05:30
parent 52a6005263
commit c494ee9602
2 changed files with 28 additions and 19 deletions

View File

@ -372,7 +372,9 @@ class Emergencypurchaseorder extends BaseController
// redirect('purchaseorder/PurchaseOrderList', 'refresh'); // redirect('purchaseorder/PurchaseOrderList', 'refresh');
// } // }
if ($POStatus == REQ_DRAFT) { if ($POStatus == REQ_DRAFT) {
echo "<script>alert('You Have Successfully Saved the Purchase order! $PONO');</script>";
$this->session->setFlashdata('success', 'You Have Successfully Saved the Purchase order! '.$PONO); $this->session->setFlashdata('success', 'You Have Successfully Saved the Purchase order! '.$PONO);
} else { } else {
$this->session->setFlashdata('success', 'You Have Successfully Created the Purchase order! '.$PONO); $this->session->setFlashdata('success', 'You Have Successfully Created the Purchase order! '.$PONO);
} }

View File

@ -1496,7 +1496,7 @@ if (!empty($INRSYMBOL)) {
$('#submitmodel').modal('hide'); $('#submitmodel').modal('hide');
if (submitoptionvalue == 0) { if (submitoptionvalue == 0) {
///alert('normal SERVICE emergency'); // alert('normal SERVICE emergency');
$('#txtSpecialservice').val(0); $('#txtSpecialservice').val(0);
Save(1) Save(1)
} else { } else {
@ -1945,7 +1945,7 @@ if (!empty($INRSYMBOL)) {
$('#purpose').on('change', function () { $('#purpose').on('change', function () {
console.log("purpose first");
$('#POType').val(this.value); $('#POType').val(this.value);
if (this.value == 'REVENUE') //Revenue po if (this.value == 'REVENUE') //Revenue po
@ -2011,16 +2011,15 @@ if (!empty($INRSYMBOL)) {
console.log("purpose Second"); console.log("purpose Second");
// $('#purpose').change(function() { // $('#purpose').change(function() {
console.log("1111111111111");
var input = ''; var input = '';
input = $("#purpose").val(); input = $("#purpose").val();
if (input == -1) { if (input == -1) {
$("#POType").val(''); $("#POType").val('');
console.log("222222222222222222");
} else { } else {
console.log("333333333333333333");
$("#POType").val(input); $("#POType").val(input);
// $('#content').loader('show'); // $('#content').loader('show');
@ -2031,12 +2030,9 @@ if (!empty($INRSYMBOL)) {
type: "POST", type: "POST",
url: "<?php echo base_url() ?>emergencypurchaseorder/getMaterialCode", url: "<?php echo base_url() ?>emergencypurchaseorder/getMaterialCode",
success: function (data) { success: function (data) {
console.log("4444444444444444");
if (data) { if (data) {
console.log("55555555");
console.log(data);
materialData = data; materialData = data;
console.log("material Data"); console.log("material Data");
@ -2052,7 +2048,7 @@ if (!empty($INRSYMBOL)) {
}); });
} else if (input == 'REVENUE') { } else if (input == 'REVENUE') {
console.log("777777777777777");
$('#MaterialCode').empty(); $('#MaterialCode').empty();
$("#MaterialCode").append($('<option></option>').val("0").html("Select Item Code")); $("#MaterialCode").append($('<option></option>').val("0").html("Select Item Code"));
@ -2096,7 +2092,7 @@ if (!empty($INRSYMBOL)) {
$("#AvalBuget").val(data ? parseFloat(data).toFixed(2) : 0); $("#AvalBuget").val(data ? parseFloat(data).toFixed(2) : 0);
} else { } else {
// $('#content').loader('hide'); // $('#content').loader('hide');
alert("Error"); //alert("Error");
} }
} }
@ -2580,7 +2576,9 @@ if (!empty($INRSYMBOL)) {
<label>Purchase Order Date</label> <label>Purchase Order Date</label>
<div class="form-group"> <div class="form-group">
<?php <?php
$formattedDate = $dt->format('Y-m-d');
$poDt=new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$formattedDate = $poDt->format('Y-m-d');
$data = array('type' => 'date', 'name' => 'PODate', 'value' => set_value('PODate', $formattedDate), 'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 'onkeypress' => 'return false;'); $data = array('type' => 'date', 'name' => 'PODate', 'value' => set_value('PODate', $formattedDate), 'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 'onkeypress' => 'return false;');
echo form_input($data); echo form_input($data);
?> ?>
@ -2671,7 +2669,7 @@ if (!empty($INRSYMBOL)) {
</div> </div>
<div class="col-md-3" id="otheroptiondiv" style="display:none;"> <div class="col-md-3" id="otheroptiondiv" style="display:none;">
<label>Description of Payable Terms</label> <label>Description of Payable Terms<span class="badge mandatory">*</span></label>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('name' => 'Otherpayment', 'Otherpayment' => set_value('Otherpayment'), 'id' => 'Otherpayment', 'class' => 'form-control', 'required' => 'true'); $data = array('name' => 'Otherpayment', 'Otherpayment' => set_value('Otherpayment'), 'id' => 'Otherpayment', 'class' => 'form-control', 'required' => 'true');
@ -3117,7 +3115,7 @@ if (!empty($INRSYMBOL)) {
<h4>Add Service Purchase Order Item </h4> <h4>Add Service Purchase Order Item </h4>
</center> </center>
</div> </div>
<div align="left" style="padding: 31px;"> <div style="padding: 31px;">
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-md-3">
@ -4603,6 +4601,13 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</div> </div>
<!-- modal div -->
<!-- modal div -->
<!-- modal div -->
<div class="card"> <div class="card">
@ -6055,7 +6060,7 @@ if (!empty($INRSYMBOL)) {
success: function (data) { success: function (data) {
if (data) { if (data) {
// $('#content').loader('hide'); // $('#content').loader('hide');
alert(data); // alert(data);
//$('#txtRowCount').val(''); //$('#txtRowCount').val('');
//$('#txtDeletedRow').val(''); //$('#txtDeletedRow').val('');
@ -7088,8 +7093,10 @@ if (!empty($INRSYMBOL)) {
success: function (data) { success: function (data) {
// Handle the server response // Handle the server response
// $('#content').loader('hide'); // $('#content').loader('hide');
if(data){
alert(data); alert(data);
console.log(data); }
$('#txtRowCount').val(''); $('#txtRowCount').val('');
$('#txtDeletedRow').val(''); $('#txtDeletedRow').val('');
$('#SpcialInstruction').val(''); $('#SpcialInstruction').val('');