ria/app/Views/poresetview.php
2024-09-11 08:54:25 +05:30

239 lines
6.7 KiB
PHP
Executable File

<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
<script>
$(document).ready(function(){
$("#modalshow").modal('show');
});
</script>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
.btn-success {
background-color: #00d976;;
border-color: #00d976;;
}
/*div.ui-datepicker{
z-index:2;
}
*/
/*#datepick-datepicker-calendar {
display: none;
} */
#datepi>.ui-datepi-calendar
{
display:none;
}
span .hights {
background-color: green;
}
.edit{
background-color:#eeffcc ! important;
}
th{
text-align:center !important;
}
.modal-body {
position: relative;
padding: 15px;
height: 100px;
}
h4 {
text-align: center;
}
</style>
<div class="modal fade" id="modalshow" role="dialog" align="center">
<div class="modal-dialog">
<!-- Modal content-->
<form>
<div class="modal-content" style="width:800px;margin-top: 25%;margin-left:-15%;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<center><h4>Purchase Order Number Reset</h4></center>
</div>
<div class="modal-body" >
<h4>
<p style="text-rendering: 20">Don't make any changes in <strong>"Purchase Order Number Reset" <br></strong>screen before management department confirmation its affect the normal PO Flow.<br> The reset function is only applicable for every financial year change.</p>
</h4>
</div>
<!-- Table to show the line item of po -->
<div id="content" > </div>
<div class="modal-footer">
<a class="btn btn-success" data-dismiss="modal" value="Cancel">Cancel</a>
</div>
</div>
</form>
</div>
</div>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center> PurchaseOrderNumber/FinanceYear-Configuration</center>
</h1>
</section>
</br>
</br>
<section class="content" id="loadingcontent">
<!-- <h4><span style="background-color: #FFFF00">Make sure attendance entry made before entering data in the screen</span></h4> -->
<div class="row">
<div class="col-xs-12">
<div class="box">
</div>
<hr>
<div class="table-responsive">
<div id="panel-recent-invoices" class="panel panel-default">
<body>
<table id="testreport" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;text-align:center;">
<thead style="background-color: #00d976;;">
<tr>
<th>SNo</th>
<th>PONO</th>
<th>POType</th>
<th>POSubType</th>
<th id="act">Action</th>
</tr>
</thead>
<tbody id="databaseAppend">
<?php
if(!empty($ponoreset))
{
//print_r($ponoreset);
$i =0;
foreach($ponoreset as $key => $ps){
//print_r($key);
?>
<tr>
<!-- <td id="sno<?php echo $key?>"><?php echo $ps->sno ?></td> -->
<td style="text-align:center;" id="reset_pono_id<?php echo $key?>"><?php echo ++$i;?></td>
<td contenteditable='true' id="pono<?php echo $key?>"><?php echo $ps->PONO ?></td>
<td id ="potype<?php echo $key?>"><?php echo $ps->POType ?></td>
<td id ="posubtype<?php echo $key?>"><?php echo $ps->POSubType ?></td>
<td><button type="button" class="btn btn-default" aria-label="Left Align" id="edit<?php echo $key?>"
onclick ="edit(<?php echo $ps->reset_pono_id?>,<?php echo $key?>);" value=""><u>Save</u>
</button></td>
<!-- class ="glyphicon glyphicon-file" -->
</tr>
<?php
}
}
?>
</tbody>
</table>
</body>
</div></div>
<p>&nbsp;</p>
<hr>
</div>
</div></b></div></div>
</section>
</div>
<!-- <script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
table = $('#testreport').DataTable( {
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title:$('h5').text(),
exportOptions: {
//columns: ':visible'
columns: ':lt(6)', orthogonal: 'export'
}
},
'colvis'
]
} );
} );
function edit(id,k){
// alert("hi");
//alert (id,k);die();
var sno =id;
var pono =document.getElementById('pono'+k).textContent;
var potype=document.getElementById('potype'+k).textContent;
var posubtype =document.getElementById('posubtype'+k).textContent;
//alert(sno);alert(pon);alert(potyp);alert(posubtyp); die();
$.ajax({
data:{sno:sno,pono:pono,potype:potype,posubtype:posubtype},
type:"POST",
url:"<?php echo base_url() ?>purchaseorder/edited",
success:function(data){
$('#loadingcontent').loader('hide');
alert(data);
window.location.reload();
}//success function closed
});//ajax function closed
}
</script>