Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
ab9dec7363
@ -50,14 +50,14 @@ class Inwardgateregister extends BaseController
|
|||||||
function viewIGR()
|
function viewIGR()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'View Inward Gate Register';
|
$this->global['pageTitle'] = 'View Inward Gate Register';
|
||||||
$data['IGR'] = $this->inwardgateregister_model->ViewigrListing();
|
$result = $this->inwardgateregister_model->ViewigrListing();
|
||||||
|
$data['IGR'] = $result[0];
|
||||||
|
$data['IGRDownload'] = $result[1];
|
||||||
$data['userRole'] = $this->session->get('role');
|
$data['userRole'] = $this->session->get('role');
|
||||||
$data['transporter'] = $this->inwardgateregister_model->transporter();
|
$data['transporter'] = $this->inwardgateregister_model->transporter();
|
||||||
$this->loadViews("viewinwardgateregister", $this->global, $data, NULL);
|
$this->loadViews("viewinwardgateregister", $this->global, $data, NULL);
|
||||||
// $this->global['pageTitle'] = 'Inward Gate Register Details';
|
|
||||||
// $data['IGR'] = $this->inwardgateregister_model->igrListing();
|
|
||||||
// $this->loadViews("viewIGRDetails", $this->global, $data, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function addIGR()
|
function addIGR()
|
||||||
|
|||||||
@ -339,7 +339,7 @@ class Inwardgateregister_model extends Model
|
|||||||
$result = $query->getResult();
|
$result = $query->getResult();
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
function ViewigrListing()
|
function ViewigrListing_old()
|
||||||
{
|
{
|
||||||
|
|
||||||
// $builder = $this->db->table('t_igr_master igr')
|
// $builder = $this->db->table('t_igr_master igr')
|
||||||
@ -368,6 +368,37 @@ class Inwardgateregister_model extends Model
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ViewigrListing()
|
||||||
|
{
|
||||||
|
|
||||||
|
$builder = $this->db->table('t_igr_master igr')
|
||||||
|
->select('igr.*,PO.IsOpenOrder,PO.DeliveryDate,sup.SupplierName,PO.POType,trans.name as TransporterName , SUM(IGRD.QuantityAsPerInvoice) as ReceivedQuantity, SUM(IGRD.NetWeight) as NetWeight , count(IGRD.IGRNo) as itemCount')
|
||||||
|
->join('t_purchaseorder_master PO', 'igr.PONO = PO.PONO')
|
||||||
|
->join('t_supplierdetailsn sup', 'PO.SupplierID = sup.SupplierID')
|
||||||
|
->join('t_transporter trans', 'igr.TransporterId = trans.id' , 'left')
|
||||||
|
->join('t_igr_details IGRD', 'igr.IGRNo = IGRD.IGRNo')
|
||||||
|
->where('igr.IGRStatus !=', MRIR_CREATED)
|
||||||
|
->groupBy('igr.IGRNo')
|
||||||
|
->orderBy('igr.CreatedDate', 'desc');
|
||||||
|
$query = $builder->get();
|
||||||
|
$result = $query->getResult();
|
||||||
|
|
||||||
|
$builder2 = $this->db->table('t_igr_details igr_details')
|
||||||
|
->select('igr.*,PO.IsOpenOrder,PO.DeliveryDate,sup.SupplierName,PO.POType,trans.name as TransporterName,item.MaterialName, igr_details.QuantityAsPerInvoice as ReceivedQuantity , igr_details.NetWeight as NetWeight')
|
||||||
|
->join('t_igr_master igr', 'igr_details.IGRNo = igr.IGRNo')
|
||||||
|
->join('t_purchaseorder_master PO', 'igr.PONO = PO.PONO')
|
||||||
|
->join('t_supplierdetailsn sup', 'PO.SupplierID = sup.SupplierID')
|
||||||
|
->join('t_transporter trans', 'igr.TransporterId = trans.id' , 'left')
|
||||||
|
->join('t_materialmaster` item', 'igr_details.MaterialCode = item.MaterialCode' , 'left')
|
||||||
|
->where('igr.IGRStatus !=', MRIR_CREATED)
|
||||||
|
->orderBy('igr.CreatedDate', 'desc');
|
||||||
|
$query2 = $builder2->get();
|
||||||
|
$result2 = $query2->getResult();
|
||||||
|
// echo $this->db->getLastQuery()->getQuery();die;
|
||||||
|
return [$result,$result2];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function viewigr($IGRNO)
|
function viewigr($IGRNO)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -267,7 +267,7 @@
|
|||||||
<!-- hidden input fields -->
|
<!-- hidden input fields -->
|
||||||
<input type="hidden" class="form-control" id="machineRunningInHrsId" name="machineRunningInHrs">
|
<input type="hidden" class="form-control" id="machineRunningInHrsId" name="machineRunningInHrs">
|
||||||
<input type="hidden" class="form-control" id="perHourGasConsumptionId" name="perHourGasConsumption">
|
<input type="hidden" class="form-control" id="perHourGasConsumptionId" name="perHourGasConsumption">
|
||||||
<input type="hidden" class="form-control" id="perHourCoatingSandQTYId" name="perHourCoatingSandQTYId" >
|
<input type="hidden" class="form-control" id="perHourCoatingSandQTYId" name="perHourCoatingSandQTY" >
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -317,13 +317,13 @@
|
|||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="editMachineOnTimeId">Machine On Time</label>
|
<label for="editMachineOnTimeId">Machine On Time</label>
|
||||||
<span class="badge mandatory">*</span>
|
<span class="badge mandatory">*</span>
|
||||||
<input type="time" class="form-control" id="editMachineOnTimeId"
|
<input type="datetime-local" class="form-control" id="editMachineOnTimeId"
|
||||||
name="machineOnTime" value="" required>
|
name="machineOnTime" value="" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="editMachineOffTimeId">Machine Off Time</label>
|
<label for="editMachineOffTimeId">Machine Off Time</label>
|
||||||
<span class="badge mandatory">*</span>
|
<span class="badge mandatory">*</span>
|
||||||
<input type="time" class="form-control" id="editMachineOffTimeId"
|
<input type="datetime-local" class="form-control" id="editMachineOffTimeId"
|
||||||
name="machineOffTime" value="" required>
|
name="machineOffTime" value="" required>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -359,7 +359,7 @@
|
|||||||
<!-- hidden input fields -->
|
<!-- hidden input fields -->
|
||||||
<input type="hidden" class="form-control" id="editMachineRunningInHrsId" name="machineRunningInHrs">
|
<input type="hidden" class="form-control" id="editMachineRunningInHrsId" name="machineRunningInHrs">
|
||||||
<input type="hidden" class="form-control" id="editPerHourGasConsumptionId" name="perHourGasConsumption">
|
<input type="hidden" class="form-control" id="editPerHourGasConsumptionId" name="perHourGasConsumption">
|
||||||
<input type="hidden" class="form-control" id="editPerHourCoatingSandQTYId" name="perHourCoatingSandQTYId" >
|
<input type="hidden" class="form-control" id="editPerHourCoatingSandQTYId" name="perHourCoatingSandQTY" >
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -496,19 +496,18 @@ $(document).ready(function() {
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
|
||||||
$('#machineOnTimeId').change(function(){
|
$('#machineOnTimeId').change(function(){
|
||||||
let machineOnTime = $(this).val();
|
let machineOnTime = $(this).val();
|
||||||
let machineOffTime =$('#machineOffTimeId').val();
|
let machineOffTime =$('#machineOffTimeId').val();
|
||||||
|
|
||||||
|
|
||||||
console.log(machineOnTime);
|
|
||||||
console.log(machineOffTime);
|
|
||||||
|
|
||||||
if( machineOnTime && machineOffTime){
|
if( machineOnTime && machineOffTime){
|
||||||
|
|
||||||
let machineRunningInHrs= calculateHours(machineOnTime , machineOffTime );
|
let machineRunningInHrs= calculateMachineRunInHrs(machineOnTime , machineOffTime );
|
||||||
|
|
||||||
if(!machineRunningInHrs){
|
if(!machineRunningInHrs){
|
||||||
|
|
||||||
$(this).val('');
|
$(this).val('');
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -525,14 +524,11 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
let machineOffTime = $(this).val();
|
let machineOffTime = $(this).val();
|
||||||
let machineOnTime =$('#machineOnTimeId').val();
|
let machineOnTime =$('#machineOnTimeId').val();
|
||||||
|
|
||||||
|
|
||||||
console.log(machineOnTime);
|
|
||||||
console.log(machineOffTime);
|
|
||||||
|
|
||||||
if( machineOnTime && machineOffTime ){
|
if( machineOnTime && machineOffTime ){
|
||||||
|
|
||||||
let machineRunningInHrs= calculateHours(machineOnTime , machineOffTime );
|
let machineRunningInHrs= calculateMachineRunInHrs(machineOnTime , machineOffTime );
|
||||||
if(!machineRunningInHrs){
|
if(!machineRunningInHrs){
|
||||||
|
|
||||||
$(this).val('');
|
$(this).val('');
|
||||||
@ -549,7 +545,7 @@ $(document).ready(function() {
|
|||||||
$('#totalCoatingSandId').change(function(){
|
$('#totalCoatingSandId').change(function(){
|
||||||
|
|
||||||
let totalCoatingSandValue= $(this).val();
|
let totalCoatingSandValue= $(this).val();
|
||||||
let machineRunningInHrsValue= $('#machineRunningInHrsId');
|
let machineRunningInHrsValue= $('#machineRunningInHrsId').val();
|
||||||
|
|
||||||
if(totalCoatingSandValue && machineRunningInHrsValue){
|
if(totalCoatingSandValue && machineRunningInHrsValue){
|
||||||
let perHourCoatingSandQTYValue= (totalCoatingSandValue / machineRunningInHrsValue).toFixed(2);
|
let perHourCoatingSandQTYValue= (totalCoatingSandValue / machineRunningInHrsValue).toFixed(2);
|
||||||
@ -558,10 +554,11 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#totalGasConsumptionId').change(function(){
|
$('#totalGasConsumptionId').change(function(){
|
||||||
|
|
||||||
let totalGasConsumptionValue=$(this).val();
|
let totalGasConsumptionValue=$(this).val();
|
||||||
let machineRunningInHrsValue= $('#machineRunningInHrsId');
|
let machineRunningInHrsValue= $('#machineRunningInHrsId').val();
|
||||||
if(totalGasConsumptionValue && machineRunningInHrsValue){
|
if(totalGasConsumptionValue && machineRunningInHrsValue){
|
||||||
let perHourGasConsumptionValue= (totalGasConsumptionValue / machineRunningInHrsValue).toFixed(2);
|
let perHourGasConsumptionValue= (totalGasConsumptionValue / machineRunningInHrsValue).toFixed(2);
|
||||||
$('#perHourGasConsumptionId').val(perHourGasConsumptionValue);
|
$('#perHourGasConsumptionId').val(perHourGasConsumptionValue);
|
||||||
@ -578,49 +575,85 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('#editMachineOnTimeId')
|
|
||||||
$('#editMachineOffTimeId')
|
|
||||||
$('#editTotalCoatingSandId')
|
$('#editMachineOnTimeId').change(function(){
|
||||||
$('#editTotalGasConsumptionId')
|
let machineOnTime = $(this).val();
|
||||||
|
let machineOffTime =$('#editMachineOffTimeId').val();
|
||||||
|
|
||||||
|
|
||||||
|
if( machineOnTime && machineOffTime){
|
||||||
|
|
||||||
|
let machineRunningInHrs= calculateMachineRunInHrs(machineOnTime , machineOffTime );
|
||||||
|
|
||||||
|
if(!machineRunningInHrs){
|
||||||
|
$(this).val('');
|
||||||
|
return
|
||||||
|
}
|
||||||
|
$('#editMachineRunningInHrsId').val(machineRunningInHrs);
|
||||||
|
$('#editTotalCoatingSandId').trigger('change');
|
||||||
|
$('#editTotalGasConsumptionId').trigger('change');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$('#editMachineRunningInHrsId')
|
});
|
||||||
$('#editPerHourGasConsumptionId')
|
|
||||||
$('#editPerHourCoatingSandQTYId')
|
|
||||||
|
|
||||||
|
$('#editMachineOffTimeId').change(function(){
|
||||||
|
|
||||||
|
let machineOffTime = $(this).val();
|
||||||
|
let machineOnTime =$('#editMachineOnTimeId').val();
|
||||||
|
|
||||||
|
|
||||||
|
if( machineOnTime && machineOffTime ){
|
||||||
|
|
||||||
|
let machineRunningInHrs= calculateMachineRunInHrs(machineOnTime , machineOffTime );
|
||||||
|
if(!machineRunningInHrs){
|
||||||
|
|
||||||
|
$(this).val('');
|
||||||
|
return
|
||||||
|
}
|
||||||
|
$('#editMachineRunningInHrsId').val(machineRunningInHrs);
|
||||||
|
$('#editTotalCoatingSandId').trigger('change');
|
||||||
|
$('#editTotalGasConsumptionId').trigger('change');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
$('#editTotalCoatingSandId').change(function(){
|
||||||
|
|
||||||
|
let totalCoatingSandValue= $(this).val();
|
||||||
|
let machineRunningInHrsValue= $('#editMachineRunningInHrsId').val();
|
||||||
|
|
||||||
|
if(totalCoatingSandValue && machineRunningInHrsValue){
|
||||||
|
let perHourCoatingSandQTYValue= (totalCoatingSandValue / machineRunningInHrsValue).toFixed(2);
|
||||||
|
$('#editPerHourCoatingSandQTYId').val(perHourCoatingSandQTYValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
$('#editTotalGasConsumptionId').change(function(){
|
||||||
|
|
||||||
|
let totalGasConsumptionValue=$(this).val();
|
||||||
|
let machineRunningInHrsValue= $('#editMachineRunningInHrsId').val();
|
||||||
|
if(totalGasConsumptionValue && machineRunningInHrsValue){
|
||||||
|
let perHourGasConsumptionValue= (totalGasConsumptionValue / machineRunningInHrsValue).toFixed(2);
|
||||||
|
$('#editPerHourGasConsumptionId').val(perHourGasConsumptionValue);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- utility function for input elements of type="time" -->
|
<!-- utility function for input elements of type="time" -->
|
||||||
|
|
||||||
<script>
|
|
||||||
function calculateHours(machineOnTime , machineOffTime , date){
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return hours;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function calculateHours(machineOnTime , machineOffTime ){
|
function calculateMachineRunInHrs(machineOnTime , machineOffTime ){
|
||||||
|
|
||||||
let startTime = new Date(machineOnTime);
|
let startTime = new Date(machineOnTime);
|
||||||
let endTime = new Date(machineOffTime);
|
let endTime = new Date(machineOffTime);
|
||||||
|
|||||||
@ -163,34 +163,41 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
|
<div class="row">
|
||||||
<input type="hidden" name="table" value="requisition">
|
<div class="col-md-8">
|
||||||
<label for="fromDate">From:</label>
|
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 47px;">
|
||||||
<input class="form-control date_range form-date-search" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
<input type="hidden" name="table" value="requisition">
|
||||||
|
<label for="fromDate">From:</label>
|
||||||
|
<input class="form-control date_range form-date-search" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
<label for="toDate">To:</label>
|
<label for="toDate">To:</label>
|
||||||
<input class="form-control date_range to-date-search" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
<input class="form-control date_range to-date-search" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
|
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
|
||||||
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||||
<div class="error" id="error"></div>
|
<div class="error" id="error"></div>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<button id="downloadExcel" class="btn btn-primary" style="margin-top: 14px;margin-bottom: -11px;margin-right: 25px;float: right;">Download Excel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<table id="view_inward_gate_register" class="table dt-responsive nowrap w-100">
|
<table id="view_inward_gate_register" class="table dt-responsive nowrap w-100">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Create Date</th>
|
<th>Create Date</th>
|
||||||
<th>Create time</th>
|
|
||||||
<th>IGR No</th>
|
<th>IGR No</th>
|
||||||
<th>PO No</th>
|
<th>PO No</th>
|
||||||
<th>Supplier Name</th>
|
<th>Supplier Name</th>
|
||||||
<th>Invoice No</th>
|
<th>Invoice No</th>
|
||||||
<th>Invoice Date </th>
|
<th>Invoice Date </th>
|
||||||
<th>Item</th>
|
<th>Item Count</th>
|
||||||
<th>Rec Qty</th>
|
<th>Rec Qty</th>
|
||||||
<th>Net Weight</th>
|
<th>Net Weight</th>
|
||||||
<th>Vechicle No</th>
|
<th>Vechicle No</th>
|
||||||
@ -201,62 +208,115 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($IGR)) {
|
if(!empty($IGR))
|
||||||
$index = 0;
|
{ $index = 0;
|
||||||
foreach ($IGR as $record) {
|
foreach($IGR as $record)
|
||||||
|
{ $index = $index +1;
|
||||||
$index = $index + 1;
|
|
||||||
$createddate = new DateTime($record->CreatedDate);
|
$createddate = new DateTime($record->CreatedDate);
|
||||||
$datewithtime = $createddate->format('d-m-Y h:i A');
|
|
||||||
$date = $createddate->format('d-m-Y');
|
$date = $createddate->format('d-m-Y');
|
||||||
$time = $createddate->format('h:i A');
|
$time = $createddate->format('h:i A');
|
||||||
?>
|
?>
|
||||||
<tr id="<?php echo $index ?>">
|
<tr id="<?php echo $index ?>" >
|
||||||
<td align="right"><?php echo $date; ?></td>
|
<td align="right"><?php echo $date; ?></td>
|
||||||
<td align="right"><?php echo $time; ?></td>
|
<td><a data-toggle="modal" data-target="#Igrshow" data-id="<?php echo $index;?>" data-inx="<?php echo $index;?>" data-userid="<?php echo $record->IGRNO ?>" data-igrstatus="<?php echo $record->IGRStatus ?>"> <?php echo $record->IGRNO ?></a></td>
|
||||||
<td><a data-toggle="modal" data-target="#Igrshow" data-id="<?php echo $index; ?>" data-inx="<?php echo $index; ?>" data-userid="<?php echo $record->IGRNO ?>" data-igrstatus="<?php echo $record->IGRStatus ?>"> <u><?php echo $record->IGRNO ?></u></a></td>
|
<td><a data-toggle="modal" data-target="#CostCentershow" data-id="<?php echo $index;?>" data-igno="<?php echo $record->IGRNO;?>" data-pono="<?php echo $record->PONO ?>" target="_blank"> <?php echo $record->PONO ?></a></td>
|
||||||
<td><a data-toggle="modal" data-target="#CostCentershow" data-id="<?php echo $index; ?>" data-igno="<?php echo $record->IGRNO; ?>" data-pono="<?php echo $record->PONO ?>" target="_blank"> <u><?php echo $record->PONO ?></u></a></td>
|
<td><?php echo $record->SupplierName ?></td>
|
||||||
<td><?php echo $record->SupplierName ?></td>
|
<td><?php echo $record->DeliveryChellanOrInvoiceNo ?></td>
|
||||||
<td><?php echo $record->DeliveryChellanOrInvoiceNo ?></td>
|
<td align="right"><?php
|
||||||
<td align="right"><?php
|
$date = new DateTime($record->DeliveryChellanDate);
|
||||||
$date = new DateTime($record->DeliveryChellanDate);
|
echo $date->format('d-m-Y'); ?></td>
|
||||||
echo $date->format('d-m-Y'); ?></td>
|
<td><?php echo $record->itemCount ?></td>
|
||||||
<td><?php echo $record->MaterialName ?></td>
|
<td><?php echo $record->ReceivedQuantity ?></td>
|
||||||
<td><?php echo $record->ReceivedQuantity ?></td>
|
<td><?php echo $record->NetWeight ?></td>
|
||||||
<td><?php echo $record->NetWeight ?></td>
|
<td><?php echo $record->VehicleNo ?></td>
|
||||||
<td><?php echo $record->VehicleNo ?></td>
|
<td><?php echo $record->DriverName ?></td>
|
||||||
<td><?php echo $record->DriverName ?></td>
|
<td><?php echo $record->TransporterName ?></td>
|
||||||
<td><?php echo $record->TransporterName ?></td>
|
<td><?php echo $record->IGRStatus == 'ST074' ? 'Draft' : 'Completed'; ?></td>
|
||||||
<td><?php echo $record->IGRStatus == 'ST074' ? 'Draft' : 'Completed'; ?></td>
|
<td>
|
||||||
<td>
|
<a target="_blank" href="<?php echo base_url('download-files/' . $record->IGRNO); ?>">
|
||||||
<a target="_blank" href="<?php echo base_url('download-files/' . $record->IGRNO); ?>">
|
<i class="fa fa-download" style="text-align: center;"></i>
|
||||||
<i class="fa fa-download" style="text-align: center;"></i>
|
</a>
|
||||||
</a>
|
|
||||||
|
<?php if (!empty($record->FilePath)) { ?>
|
||||||
<?php if (!empty($record->FilePath)) { ?>
|
|
||||||
<!-- <a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Files" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><i class="fa fa-clone" style="text-align: center;"></i></a> -->
|
<!-- <a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Files" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><i class="fa fa-clone" style="text-align: center;"></i></a> -->
|
||||||
<?php } else if (!empty($record->file)) { ?>
|
<?php } else if (!empty($record->file)) { ?>
|
||||||
<!-- <a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Files" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><i class="fa fa-clone" style="text-align: center;"></i></a> -->
|
<!-- <a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Files" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><i class="fa fa-clone" style="text-align: center;"></i></a> -->
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<!-- <a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Files" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><i class="fa fa-clone" style="text-align: center;"></i></a> -->
|
<!-- <a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Files" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><i class="fa fa-clone" style="text-align: center;"></i></a> -->
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<a target="_blank" data-toggle="modal" data-target="#Historyshow" data-id="<%=index%>" title="IGR History" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>">
|
<a target="_blank" data-toggle="modal" data-target="#Historyshow" data-id="<%=index%>" title="IGR History" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>">
|
||||||
<i class="fa fa-history" style="text-align: center;color:#02a8b5"></i>
|
<i class="fa fa-history" style="text-align: center;"></i>
|
||||||
</a>
|
</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 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> -->
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<table id="InwardgateregistertableForDownload" class="table table-bordered table-hover" style="display: none;">
|
||||||
|
<thead style="background-color: #ddd;">
|
||||||
|
<tr>
|
||||||
|
<th>Create Date</th>
|
||||||
|
<th>IGR No</th>
|
||||||
|
<th>PO No</th>
|
||||||
|
<th>Supplier Name</th>
|
||||||
|
<th>Invoice No</th>
|
||||||
|
<th>Invoice Date </th>
|
||||||
|
<th>Item</th>
|
||||||
|
<th>Rec Qty</th>
|
||||||
|
<th>Net Weight</th>
|
||||||
|
<th>Vechicle No</th>
|
||||||
|
<th>Driver</th>
|
||||||
|
<th>Transporter</th>
|
||||||
|
<th>IGR Status</th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
if(!empty($IGRDownload))
|
||||||
|
{ $index = 0;
|
||||||
|
foreach($IGRDownload as $record)
|
||||||
|
{ $index = $index +1;
|
||||||
|
$createddate = new DateTime($record->CreatedDate);
|
||||||
|
$date = $createddate->format('d-m-Y');
|
||||||
|
$time = $createddate->format('h:i A');
|
||||||
|
?>
|
||||||
|
<tr id="<?php echo $index ?>" >
|
||||||
|
<td align="right"><?php echo $date; ?></td>
|
||||||
|
<td><a data-toggle="modal" data-target="#Igrshow" data-id="<?php echo $index;?>" data-inx="<?php echo $index;?>" data-userid="<?php echo $record->IGRNO ?>" data-igrstatus="<?php echo $record->IGRStatus ?>"> <u><?php echo $record->IGRNO ?></u></a></td>
|
||||||
|
<td><a data-toggle="modal" data-target="#CostCentershow" data-id="<?php echo $index;?>" data-igno="<?php echo $record->IGRNO;?>" data-pono="<?php echo $record->PONO ?>" target="_blank"> <u><?php echo $record->PONO ?></u></a></td>
|
||||||
|
<td><?php echo $record->SupplierName ?></td>
|
||||||
|
<td><?php echo $record->DeliveryChellanOrInvoiceNo ?></td>
|
||||||
|
<td align="right"><?php
|
||||||
|
$date = new DateTime($record->DeliveryChellanDate);
|
||||||
|
echo $date->format('d-m-Y'); ?></td>
|
||||||
|
<td><?php echo $record->MaterialName ?></td>
|
||||||
|
<td><?php echo $record->ReceivedQuantity ?></td>
|
||||||
|
<td><?php echo $record->NetWeight ?></td>
|
||||||
|
<td><?php echo $record->VehicleNo ?></td>
|
||||||
|
<td><?php echo $record->DriverName ?></td>
|
||||||
|
<td><?php echo $record->TransporterName ?></td>
|
||||||
|
<td><?php echo $record->IGRStatus == 'ST074' ? 'Draft' : 'Completed'; ?></td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
</div> <!-- end card body-->
|
</div> <!-- end card body-->
|
||||||
</div> <!-- end card -->
|
</div> <!-- end card -->
|
||||||
</div><!-- end col-->
|
</div><!-- end col-->
|
||||||
@ -415,6 +475,7 @@
|
|||||||
</tr> -->
|
</tr> -->
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1612,25 +1673,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#view_inward_gate_register').DataTable({
|
table = $('#view_inward_gate_register').DataTable({
|
||||||
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
|
||||||
buttons: [
|
pageLength: 10,
|
||||||
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
|
||||||
],
|
|
||||||
pageLength: 10, // Default rows per page
|
|
||||||
lengthMenu: [
|
lengthMenu: [
|
||||||
[10, 20, 30, 50, -1],
|
[10, 20, 30, 50, -1],
|
||||||
[10, 20, 30, 50, "All"]
|
[10, 20, 30, 50, "All"]
|
||||||
], // Rows per page options
|
],
|
||||||
responsive: true, // Responsive table
|
responsive: true,
|
||||||
|
|
||||||
// Default ordering (column index 0, ascending)
|
|
||||||
// order: [
|
|
||||||
// [0, 'desc']
|
|
||||||
// ],
|
|
||||||
|
|
||||||
ordering:false,
|
ordering:false,
|
||||||
|
|
||||||
language: {
|
language: {
|
||||||
paginate: {
|
paginate: {
|
||||||
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
||||||
@ -1700,4 +1751,18 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.17.0/xlsx.full.min.js"></script>
|
||||||
|
<script>
|
||||||
|
document.getElementById('downloadExcel').addEventListener('click', function() {
|
||||||
|
// Get the HTML table element
|
||||||
|
var table = document.getElementById('InwardgateregistertableForDownload');
|
||||||
|
|
||||||
|
// Convert the HTML table to a worksheet
|
||||||
|
var wb = XLSX.utils.table_to_book(table, { sheet: "Inward Gate Register" });
|
||||||
|
|
||||||
|
// Generate Excel file and trigger the download
|
||||||
|
XLSX.writeFile(wb, 'InwardGateRegister.xlsx');
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user