JezK
Edit File: individualtransactionview.php
<?php include("header.php"); $sql= "select * from uflexit_received_transactions where randval='".$_GET['rnd']."'"; $row = $adminObj->db->get_row($sql); $transactionsDetails=''; if($row>0){ $transactionsDetails='<div class="container pt-4 pl-4 pb-2 "> <div class="row"> <div class="col-sm-6"> <div class="row"> <div class="col-sm-5 col-4 onhandFlex"> <p><strong>Quatation ID</strong><span>:</span></p> <p><strong>Advance ShipmentID</strong><span>:</span></p> <p><strong>Customer Name</strong><span>:</span></p> <p><strong>Email</strong><span>:</span></p> </div> <div class="col-sm-7 col-7"> <p>'.$row['quotation_id'].'</p> <p>'.$row['asn_id'].'</p> <p>'.$row['customer_name'].'</p> <p>'.$row['email'].'</p> </div> </div> </div> <div class="col-sm-6"> <div class="row"> <div class="col-sm-5 col-4 onhandFlex"> <p><strong>Country</strong><span>:</span></p> <p><strong>City</strong><span>:</span></p> </div> <div class="col-sm-7 col-7"> <p>'.$row['country'].'</p> <p>'.$row['city'].'</p> </div> </div> </div> </div> </div>'; }else{ $transactionsDetails='<div class="container pt-4 pl-4 pb-2 "> <div class="row"> <div class="col-sm-6"> <div class="row"> <div class="col-sm-5 col-4 onhandFlex"> <p><strong>Quatation ID</strong><span>:</span></p> <p><strong>Advance ShipmentID</strong><span>:</span></p> <p><strong>Customer Name</strong><span>:</span></p> <p><strong>Email</strong><span>:</span></p> </div> <div class="col-sm-7 col-7"> <p></p> <p></p> <p></p> <p></p> </div> </div> </div> <div class="col-sm-6"> <div class="row"> <div class="col-sm-5 col-4 onhandFlex"> <p><strong>Country</strong><span>:</span></p> <p><strong>City</strong><span>:</span></p> </div> <div class="col-sm-7 col-7"> <p></p> <p></p> </div> </div> </div> </div> </div>' ; } //print_r($row); /* Array ( [id] => 1 [quotation_id] => 1 [asn_id] => 1 [customer_name] => test [country] => test country [email] => test@gmail.com [city] => test city [itemcode] => 001 [item_desc] => item descrion [qty] => 100 [ref_number] => ref 001 [cost] => 1000 [pallet_no] => 001 [row_val] => 1 [rack] => 1 [pin] => 1 [created_date] => 2021-01-20 11:12:49+05:30 [status] => 1 ) */ ?> <div class="container"> <div class="mt-3 px-md-4 px-0"> <div class="row px-md-3 px-0"> <div class="container pl-0 pr-2 text-dark"> <h5>Transaction Details</h5> </div> </div> </div> <div class="warehouse_boxshadow mt-3 mb-5 pl-5"> <?php echo $transactionsDetails ?> </div> <div class="mt-3 px-md-4 px-0"> <div class="row px-md-3 px-0 pb-3"> <div class="container pl-0 pr-2 text-dark"> <h5>Item Details</h5> </div> </div> </div> <div class="warehouse_boxshadow container py-5"> <table id='example' class="table table-bordered table_body"> <thead class="theadcolor"> <tr> <th>Item Code</th> <th>Item Description</th> <th>Quantity</th> <th>Reference Number</th> <th>Cost</th> <!-- <th>Number of Pallet</th> --> <th>Pallet No.</th> <th>Row</th> <th>Rack</th> <th>Pin</th> </tr> </thead> <tbody> <!-- <?php $sql_i= "select * from uflexit_received_transactions where randval='".$_GET['rnd']."'"; $rows_i = $wareHouseAdminObj->db->get_results($sql_i); if($rows_i){ } foreach($rows_i as $fetch) { ?> <tr> <td><?php echo $row['itemcode'] ?></td> <td><?php echo $row['item_desc'] ?></td> <td><?php echo $row['qty'] ?></td> <td><?php echo $row['ref_number'] ?></td> <td><?php echo $row['cost'] ?></td> <td><?php echo $row['pallet_no'] ?></td> <td><?php echo $row['row_val'] ?></td> <td><?php echo $row['rack'] ?></td> <td><?php echo $row['pin'] ?></td> </tr> <?php } ?> --> </tbody> </table> </div> </div> </div> <?php include("footer.php"); ?> <style> #example_length { display:none !important; } </style> <script> jQuery(document).ready(function() { jQuery('#example').DataTable( { "processing": true, "dataSrc": "", "dom": 'Bfrtip', "dom": 'Rlfrtlip', language: { search: '', searchPlaceholder: "Search", paginate: {previous: 'Prev',next: 'Next'}}, "pagingType": "full_numbers", "bProcessing": true, "bServerSide": true, "sAjaxSource": "app/view-individual-received-list.php?rnd=<?php echo $_GET['rnd'] ?>", "ordering": false, "aoColumns": [{ mData: 'itemcode' } , { mData: 'item_desc' } , { mData: 'qty' }, { mData: 'ref_number' }, { mData: 'cost' }, { mData: 'pallet_no' }, { mData: 'row_val' }, { mData: 'rack' }, { mData: 'pin' } ] } ); } ); </script>