igr issue

This commit is contained in:
vadivel J 2024-10-25 10:52:38 +05:30
parent 0eb98086b9
commit e24ea0329f
2 changed files with 19 additions and 7 deletions

View File

@ -1673,11 +1673,18 @@ function updateIGRWeight(){
{
// Get all file details for the given IGR number
$fileDetails = $this->inwardgateregister_model->getAllIgrFileDetails($igrno);
if (empty($fileDetails)) {
echo '<script>alert("There are no files.");</script>';
redirect('ViewIGR', 'refresh');
return;
dd($fileDetails);
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
$rootPath = ROOTPATH . 'public/uploads/Igrfiles/';

View File

@ -165,6 +165,12 @@
</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="col-12">
<div class="card">
@ -245,7 +251,7 @@
<td><?php echo $record->TransporterName ?></td>
<td><?php echo $record->IGRStatus == 'ST074' ? 'Draft' : 'Completed'; ?></td>
<td>
<?php if(!empty($record->IGRNO)){ ?>
<?php if(($record->IGRNO)){ ?>
<a target="_blank" href="<?php echo base_url('download-files/' . $record->IGRNO); ?>">
<i class="fa fa-download" style="text-align: center;"></i>
</a>
@ -670,8 +676,7 @@
type: "POST",
url: "<?php echo base_url() ?>ViewIGRDetails",
success: function(data) {
// success:function(data) {
// $('#content').loader('hide');
var parsedData = JSON.parse(data);
console.log(parsedData);
if (parsedData['details'].length === 0) {