JezK
Edit File: viewasn.php
<?php include("app/checkSession.php"); include("app/adminObj.php"); if(!isset($_SESSION['user_id'])){ $customerObj->redirect('login.php'); } include("header.php"); $query="SELECT * FROM uflexit_asn_request WHERE asn_id=".(int)$_REQUEST['asn_id']; $alist=$customerObj->db->get_row($query); //print_r($asn_list); $wrow = $customerObj->db->get_row("SELECT * FROM uflexit_master_warehouse WHERE warehouse_id=".(int)$alist['warehouse_id']); $urow = $customerObj->db->get_row("SELECT * FROM uflexit_users WHERE user_id=".(int)$alist['user_id']); $crow = $customerObj->db->get_row("SELECT * FROM uflexit_users WHERE user_id=".(int)$alist['created_by']); ?> <div class="container"> <h4>View ASN</h4> <div class="col-md-4"> <a href='javascript://' onclick="history.go(-1); return false;" title="Back">Back</a> </div> <div class="containercontent"> <div class="card-1 shadow-sm p-3 mb-5 bg-white rounded"> <div class="card-body"> <div class="row"> <div class="col-md-2"> <label for="invoices">Warehouse Name:</label> </div> <div class="col-md-2 "> <?php echo $wrow['warehouse_name'];?> </div> <div class="col-md-2"> <label for="whnumber">Warehouse ID:</label> </div> <div class="col-md-2"> <?php echo $alist['warehouse_id'];?> </div> <div class="col-md-3 pl-4 justify-content-end"> <div class="d-flex flex-row"> <label for="whnumber">Quotation ID:</label> <span> <?php echo $alist['quotation_id'];?></span> </div> </div> </div> <div class="row"> <div class="col-md-2"> <label for="whname">Request Type:</label> </div> <div class="col-md-2"> <?php echo $alist['request_type'];?> </div> <div class="col-md-2"> <label for="invoices">Customer Name:</label> </div> <div class="col-md-2"> <?php echo $urow['first_name'];?> <?php echo $urow['last_name'];?> </div> <div class="col-md-2"> <label for="invoices">Customer Type:</label> </div> <div class="col-md-2"> <?php echo $urow['role_id']==3?'Individual':'Business';?> </div> </div> <div class="row"> <div class="col-md-2"> <label for="customer">Price:</label> </div> <div class="col-md-2"> <?php echo $alist['price'];?> </div> <div class="col-md-2"> <label for="whname">Date:</label> </div> <div class="col-md-2"> <?php echo $alist['date'];?> </div> <div class="col-md-2"> <label for="whname">Created By:</label> </div> <div class="col-md-2"> <?php echo $crow['first_name'];?> <?php echo $crow['last_name'];?> </div> </div> <table class="table table-bordered table_body "> <thead class="theadcolor"> <tr> <th> Item Code</th> <th>Item Description</th> <th>Qty</th> <th>Reference Number</th> <th>Cost</th> <th>Pallet Number</th> </tr> </thead> <tbody> <?php $query1="SELECT * FROM uflexit_mini_goods_track WHERE asn_no='".$_REQUEST['asn_id']."'"; $alist_goods=$customerObj->db->get_results($query1); // print_r($alist_goods); foreach ($alist_goods as $glist) { ?> <tr> <td><?php echo $glist['item_code'];?></td> <td><?php echo $glist['item_description'];?></td> <td><?php echo $glist['item_quantity'];?></td> <td><?php echo $glist['ref_number'];?></td> <td><?php echo $glist['price'];?></td> <td><?php echo $glist['pallet_space_num'];?></td> </tr> <?php } ?> </tbody> </table> </div> </div> <?php include("footer.php"); ?>