Merge branch 'CI4-Application' of bitbucket.org:venbainformationtechnology/ria into CI4-Application
This commit is contained in:
commit
13a8e67711
@ -49,6 +49,7 @@ $routes->post('supplierExist','Supplier::checksupplier');
|
||||
$routes->post('supplierGSTExist','Supplier::checkGST');
|
||||
$routes->post('supplierPANExist','Supplier::checkPAN');
|
||||
$routes->get('exportsupplier','Supplier::exportsupplier'); // export supplier details
|
||||
$routes->post('deletesupplier','Supplier::deletesupplier');
|
||||
|
||||
|
||||
|
||||
|
||||
@ -376,7 +376,18 @@ class Supplier extends BaseController
|
||||
return $this->response->setJSON($query);
|
||||
|
||||
}
|
||||
function deletesupplier()
|
||||
{
|
||||
$Sid = $this->request->getPost('id');
|
||||
|
||||
$updatedDate = get_current_date_time();
|
||||
|
||||
$SupplierInfo = array('IsActive' => 0, 'updatedBy' => $this->session->get('userId'), 'Updatedon' => $updatedDate);
|
||||
|
||||
$result = $this->supplier_model->deleteSupplier($Sid, $SupplierInfo);
|
||||
|
||||
echo 'Succssfully change the Supplier status to InAcive';
|
||||
}
|
||||
function exportsupplier()
|
||||
{
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ class Supplier_model extends Model
|
||||
{
|
||||
|
||||
$builder = $this->db->table('t_supplierdetailsn as BaseT')
|
||||
->select('BaseT.SupplierID, BaseT.SupplierName, BaseT.Address, BaseT.ContactNumber, BaseT.AlternateContactNumber,BaseT.EmailAddress,BaseT.Exiseregistration, BaseT.TIN, BaseT.PAN,,BaseT.GSTNO,BaseT.GSTRange,BaseT.CollectrateAddress,BaseT.UANumber,BaseT.CreatedOn,BaseT.PaymentID,pmt.PaymentTerms,BaseT.CSTDate') //,BaseT.PaymentTerms,BaseT.PaymentDays,BaseT.PayableAT,pmt.Details');
|
||||
->select('BaseT.SupplierID, BaseT.SupplierName, BaseT.Address, BaseT.ContactNumber, BaseT.AlternateContactNumber,BaseT.EmailAddress,BaseT.Exiseregistration, BaseT.TIN, BaseT.PAN,,BaseT.GSTNO,BaseT.GSTRange,BaseT.CollectrateAddress,BaseT.UANumber,BaseT.CreatedOn,BaseT.PaymentID,pmt.PaymentTerms,BaseT.CSTDate,BaseT.IsActive') //,BaseT.PaymentTerms,BaseT.PaymentDays,BaseT.PayableAT,pmt.Details');
|
||||
->join('t_paymentterms as pmt', 'pmt.PaymentID = BaseT.PaymentID', 'left');
|
||||
|
||||
$query = $builder->get();
|
||||
|
||||
@ -3,6 +3,42 @@
|
||||
margin: 0px !important;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
|
||||
<!-- Latest DataTables Buttons CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.3.4/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
.dataTables_wrapper .dataTables_length select {
|
||||
background-color:white !important;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_filter input {
|
||||
background-color: white !important;
|
||||
}
|
||||
button.dt-button, div.dt-button, a.dt-button, input.dt-button {
|
||||
background-color: white !important;
|
||||
}
|
||||
.dataTables_length, label{
|
||||
display: flex !important;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_filter {
|
||||
text-align: center;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_length {
|
||||
float: left;
|
||||
}
|
||||
.dataTables_wrapper .dt-buttons {
|
||||
float: right;
|
||||
}
|
||||
.dataTables_wrapper .clear {
|
||||
clear: both;
|
||||
}
|
||||
th, td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.dataTables_wrapper {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
|
||||
@ -44,10 +80,10 @@
|
||||
<table id="dataTableHistoriek" class="table table-bordered table-hover editableTable" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color: #ddd;">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th style="display:none;"></th>
|
||||
<th>PO Date</th>
|
||||
<th>PONO#</th>
|
||||
<th>PO Type</th>
|
||||
<th>PO Date</th>
|
||||
<th>Supplier Name</th>
|
||||
<th>Total Order Value</th>
|
||||
<th>PO Status</th>
|
||||
@ -64,13 +100,14 @@
|
||||
$index = $index + 1;
|
||||
?>
|
||||
<tr id="<?php echo $index; ?>">
|
||||
<td align="left"><?php echo $index; ?></td>
|
||||
<td><?php echo $record->PONO ?></td>
|
||||
<td><?php echo $record->ReqType ?></td>
|
||||
<td align="right"><?php $Pdt = new DateTime($record->PODate);
|
||||
<td style="display:none;"><?php echo $record->PODate ?></th>
|
||||
<td align="right"><?php $Pdt = new DateTime($record->PODate);
|
||||
$PODate = $Pdt->format('d-m-Y');
|
||||
echo $PODate
|
||||
?></td>
|
||||
<td><?php echo $record->PONO ?></td>
|
||||
<td><?php echo $record->ReqType ?></td>
|
||||
|
||||
<td><?php echo $record->SupplierName ?></td>
|
||||
<td align="right"><?php echo $record->TotalOrderValue ?></td>
|
||||
|
||||
@ -142,20 +179,66 @@
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> -->
|
||||
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
||||
|
||||
<!-- Latest DataTables JS -->
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
<!-- Latest DataTables Buttons JS -->
|
||||
<script src="https://cdn.datatables.net/buttons/2.3.4/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/plug-ins/1.13.6/sorting/datetime-moment.js"></script>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||
$('#dataTableHistoriek').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"scrollCollapse": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"scrollX": true,
|
||||
"autoWidth": true,
|
||||
"pageLength": 25,
|
||||
"order": [[0, "desc"]], // Assuming the "Created Date" is the first column and you want to order by it in descending order
|
||||
"dom": '<"top"lBf>rt<"bottom"ip><"clear">', // Custom layout
|
||||
"buttons": [
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
text: 'Export to Excel',
|
||||
title: 'Purchase Order',
|
||||
exportOptions: {
|
||||
columns: ':visible:not(:first-child):not(:last-child)' // Exclude first and last columns
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
text: 'Export to PDF',
|
||||
title: 'Purchase Order',
|
||||
exportOptions: {
|
||||
columns: ':visible:not(:first-child):not(:last-child)' // Exclude first and last columns
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||
$('#dataTableHistoriek').DataTable({
|
||||
"paging": true,
|
||||
"ordering": true,
|
||||
"scrollCollapse": true,
|
||||
"searching": true,
|
||||
|
||||
//"columnDefs" : [{"targets":3, "type":"date"}],
|
||||
|
||||
"bInfo": true
|
||||
"paging": true,
|
||||
"ordering": true,
|
||||
|
||||
"searching": true,
|
||||
"order": [[0, "desc"]],
|
||||
"columnDefs": [
|
||||
{ "type": "date", "targets": 1 } // Ensure that the column index is correct (0-based index)
|
||||
],
|
||||
"bInfo": true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -266,9 +266,11 @@ if (!empty($supplier)) {
|
||||
<div class="col-md-12">
|
||||
<form class="form-horizontal" role="form" id="UpdateSupplier" action="<?php echo base_url() ?>editsupplier" method="post" role="form" enctype="multipart/form-data">
|
||||
<div class="box-body">
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="checkbox" id="isactive" <?php echo $IsActive; ?> name="isactive"> IsActive
|
||||
</div>
|
||||
<?php if((int)$chk){ ?>
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="checkbox" id="isactive" <?php echo $IsActive; ?> name="isactive"> IsActive
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- Form Name -->
|
||||
<legend>Supplier Information</legend>
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
@ -411,7 +413,9 @@ if (!empty($supplier)) {
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 text-right">
|
||||
<?php if((int)$chk){ ?>
|
||||
<input type="submit" onclick="validate();" value="Submit" class="btn btn-success">
|
||||
<?php } ?>
|
||||
<a href="<?php echo base_url() ?>supplierlisting" class="btn btn-success" value="Cancel" />Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -54,6 +54,7 @@
|
||||
<th>PAN</th>
|
||||
<th>GST Number</th>
|
||||
<th>Payment Terms</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -71,7 +72,11 @@
|
||||
<td><?php echo $record->EmailAddress ?></td>
|
||||
<td><?php echo $record->PAN ?></td>
|
||||
<td><?php echo $record->GSTNO ?></td>
|
||||
<td><?php echo $record->PaymentTerms ?></td>
|
||||
<td><?php echo $record->PaymentTerms ?></td>
|
||||
<td><?php if($record->IsActive == 0){ echo "Deactived"; }else{ ?>
|
||||
<a onclick="deletesupplier('<?php echo $record->SupplierID;?>')"><i class="fa fa-trash"></i> </a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@ -101,5 +106,25 @@
|
||||
|
||||
});
|
||||
});
|
||||
function deletesupplier(sid)
|
||||
{alert(sid);
|
||||
var answer = confirm(" Do you want to delete the Supplier from the List?")
|
||||
if (answer)
|
||||
{
|
||||
$.ajax({
|
||||
data:{id:userid},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>deletesupplier",
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@ -41,6 +41,13 @@
|
||||
}
|
||||
.dataTables_wrapper .clear {
|
||||
clear: both;
|
||||
}
|
||||
th, td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.dataTables_wrapper {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
@ -120,9 +127,6 @@
|
||||
</a>
|
||||
|
||||
<!-- <a class="a_tag_for_mrir" href="<?php echo base_url().'MRIRcontroller/igrdatavalues?IGRNO='.$record->IGRNO; ?>" target="_blank" data-id="<%=index%>" title="Generate MRIR"><i class="fa fa-external-link" style="text-align: center;"></i></a> -->
|
||||
<a target="_blank" data-toggle="modal" data-target="#dummyshow" data-id="<%=index%>" title="Generate MRIR" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>">
|
||||
<i class="fa fa-external-link" style="text-align: center;"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
@ -332,26 +336,7 @@
|
||||
</div><!-- modal content div closed-->
|
||||
</div><!-- modal content closed-->
|
||||
</div>
|
||||
<!-- WeightCalculator modal fade closed-->
|
||||
<div class="modal fade" id="dummyshow" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content -->
|
||||
<div class="modal-content" style="width:800px;">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center>
|
||||
<h4>MRIR</h4>
|
||||
</center>
|
||||
</div>
|
||||
<div><center> MRIR Work in Inprogress</center></div>
|
||||
<div style="text-align: right; margin:5px;">
|
||||
<a class="btn btn-success" data-dismiss="modal" value="Close">Close</a>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- WeightCalculator modal fade closed-->
|
||||
<!-- History modal fade -->
|
||||
<div class="modal fade" id="Historyshow" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
@ -651,7 +636,7 @@
|
||||
});
|
||||
});
|
||||
$('#draftIGR').click(function(){
|
||||
// $('#content').loader('show');
|
||||
$('#content').loader('show');
|
||||
var igrno = $("#IGRNO1").val();
|
||||
var materialrcv_date = $("#MaterialRcvdDate").val();
|
||||
var inv_date = $("#Invoice_Date").val();
|
||||
@ -684,11 +669,12 @@ console.log(tableData);
|
||||
success:function(data) {
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
$('#generateIGR').click(function(){
|
||||
// $('#content').loader('show');
|
||||
$('#content').loader('show');
|
||||
var igrno = $("#IGRNO1").val();
|
||||
var materialrcv_date = $("#MaterialRcvdDate").val();
|
||||
var inv_date = $("#Invoice_Date").val();
|
||||
@ -720,6 +706,7 @@ console.log(tableData);
|
||||
success:function(data) {
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -1297,6 +1284,8 @@ function deleteBill(Billno,i){
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": true,
|
||||
"scrollCollapse": true,
|
||||
"scrollX": true,
|
||||
"pageLength": 25,
|
||||
"order": [[0, "desc"]], // Assuming the "Created Date" is the first column and you want to order by it in descending order
|
||||
"dom": '<"top"lBf>rt<"bottom"ip><"clear">', // Custom layout
|
||||
|
||||
Loading…
Reference in New Issue
Block a user