igr issue
This commit is contained in:
parent
0eb98086b9
commit
e24ea0329f
@ -1673,11 +1673,18 @@ function updateIGRWeight(){
|
|||||||
{
|
{
|
||||||
// Get all file details for the given IGR number
|
// Get all file details for the given IGR number
|
||||||
$fileDetails = $this->inwardgateregister_model->getAllIgrFileDetails($igrno);
|
$fileDetails = $this->inwardgateregister_model->getAllIgrFileDetails($igrno);
|
||||||
if (empty($fileDetails)) {
|
|
||||||
echo '<script>alert("There are no files.");</script>';
|
dd($fileDetails);
|
||||||
redirect('ViewIGR', 'refresh');
|
|
||||||
return;
|
foreach($fileDetails as $file){
|
||||||
|
if (empty($file->file)) {
|
||||||
|
|
||||||
|
$this->session->setFlashdata('message', 'There are no files.');
|
||||||
|
|
||||||
|
return redirect()->to('/ViewIGR');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Define the root path for files
|
// Define the root path for files
|
||||||
$rootPath = ROOTPATH . 'public/uploads/Igrfiles/';
|
$rootPath = ROOTPATH . 'public/uploads/Igrfiles/';
|
||||||
|
|||||||
@ -165,6 +165,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<?php if (session()->getFlashdata('message')): ?>
|
||||||
|
<div class="alert alert-warning" role="alert">
|
||||||
|
<?= esc(session()->getFlashdata('message')); ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@ -245,7 +251,7 @@
|
|||||||
<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>
|
||||||
<?php if(!empty($record->IGRNO)){ ?>
|
<?php if(($record->IGRNO)){ ?>
|
||||||
<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>
|
||||||
@ -670,8 +676,7 @@
|
|||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo base_url() ?>ViewIGRDetails",
|
url: "<?php echo base_url() ?>ViewIGRDetails",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
// success:function(data) {
|
|
||||||
// $('#content').loader('hide');
|
|
||||||
var parsedData = JSON.parse(data);
|
var parsedData = JSON.parse(data);
|
||||||
console.log(parsedData);
|
console.log(parsedData);
|
||||||
if (parsedData['details'].length === 0) {
|
if (parsedData['details'].length === 0) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user