<?php

session_start();

if (isset($_GET['cid'])) {
  $id = $_GET['cid'];
}

require_once '../../admin/db.php';
$cno = $_SESSION['cno'];
$query = "SELECT * FROM parcel WHERE id = $id";
$queryy = "SELECT * FROM track WHERE cno = '$cno' ORDER BY id DESC";
$result = mysqli_query($db, $query);
$resultt = mysqli_query($db, $queryy);
$row = mysqli_fetch_assoc($result);
$rows = mysqli_fetch_assoc($resultt);
?>
<!DOCTYPE html>
<html>
  <head>

    <title>Lumacks Courier Service| Invoice</title>
	
	<!-- Define Charset -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	
	<!-- Page Description and Author -->
	<meta name="description" content="Courier Deprixa V2.5 "/>
	<meta name="keywords" content="Courier DEPRIXA-Integral Web System" />
	<meta name="author" content="Jaomweb">	
	
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.4 -->
    <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <!-- Font Awesome Icons -->
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <!-- Ionicons -->
    <link href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" type="text/css" />
    <!-- Theme style -->
    <link href="css/print-invoice.min.css" rel="stylesheet" type="text/css" />

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

	
	
<style>
	    
	    #background{
    position:absolute;
    z-index:0; 
    display:block;
    min-height:70%; 
    min-width:70%; 
}

#content{
    position:absolute;
    z-index:1;
}

#bg-text
{
    color:grey;
    font-size:36px;
    transform:rotate(300deg);
    -webkit-transform:rotate(300deg);
}
	    
	</style>
	
	
 


  </head>
  <body  style="background-color:teal;"  onload="window.print();">
      
      
	
	
    <div class="wrapper" id="background"> <p id="bg-text"></p>

      <!-- Main content -->
      <section class="invoice" >
        <!-- title row -->
        <div class="row"  >
          <div class="col-xs-12">
            <h2 class="page-header">
			  <span><img src="../../logo2.png"> 
			  
			  <img class="pull-right"  src="banner.png" alt=""  height="185"/> 
			  
			  <h3 style="color:red;"><strong> Tracking Number:  <?php echo $row['cno'] ?></strong>
			  </h3></span>
			  
            </h2>
          </div><!-- /.col -->
        </div>
        
        <div class="row">
          <div class="col-xs-12">
            <h2 class="page-header">
			   <center> 
			       <strong style="color:green;">Lumacks Courier Service<br>

Email: info@lumackscourierservice.com<br>
Company Website: www.lumackscourierservice.com</strong></center>
            </h2>
          </div><!-- /.col -->
        </div>
        
        
        <!-- info row -->
        <div class="row invoice-info">
          <div class="col-sm-4 invoice-col">
            <strong style="color:blue;">FROM (SENDER)</strong>
            <address>
              <h3><strong style="color:green;"><?php echo $row['sname'] ?> </strong></h3><br>

              <b>Address:</b> <?php echo $row['saddress'] ?> <br/>
			  <b>Origin Office:</b> Lumacks Courier Service           </address>
          </div><!-- /.col -->
          <div class="col-sm-4 invoice-col">
            <strong style="color:blue;">TO (CONSIGNEE)</strong>
            <address>
              <h3><strong style="color:green;"><?php echo $row['rname'] ?> </strong></h3><br>
              
              <b>Phone:</b> <?php echo $row['rphone'] ?><br/>
			  <b>Address:</b> <?php echo $row['raddress'] ?> <br/>
              <b>Destination Office:</b> <?php echo $row['destination'] ?>            </address>
          </div><!-- /.col -->
          <div class="col-sm-4 invoice-col">
		  <table>
                                        	<tr>
                                                <td>
                                                    <center>
                                                        <img src="barcode.png" alt="barcode" /><br>
                                                        <strong><?php echo $row['cno'] ?></strong><br>
                                                    </center>
                                                </td>
                                                
                                            </tr>
                                        </table>
			<br/>
            <b>Order ID:</b>&nbsp;&nbsp;<?php echo $row['id'] ?><br/>
         <!--   <b>Payment Due:</b>&nbsp;2023-01-11<br/>-->
			<b>Booking Mode:</b> <small class="label label-danger"><i class="fa fa-money"></i>&nbsp;&nbsp;ToPay</small><br/> 
			<b>Insurance of the Shipment:</b>$<?php echo $row['charge'] ?><br/>
          </div><!-- /.col -->		 
        </div><!-- /.row -->

        <!-- Table row -->
        <div class="row">
          <div class="col-xs-12 table-responsive">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th>Qty</th>
                  <th>Product</th>
                  <th>Status</th>
                  <th>Description</th>
				  <th>Shipping Cost</th>
                  <th>Clearance Cost</th>
                  <th>Total Cost</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td></td>
                  <td><?php echo $row['product'] ?> </td>
                  <td><small class="label label-success"><?php echo $row['status'] ?></small></td>
                  <td><?php echo $row['comment'] ?> </td>
				  <td>$<?php echo $row['shipping_cost'] ?></td>
				  <td>$<?php echo $row['clearance_cost'] ?></td>
    <td>$<?php echo $row['shipping_cost'] + $row['charge'] + $row['clearance_cost']; ?> </td>
                </tr>               
              </tbody>
            </table>
          </div><!-- /.col -->
        </div><!-- /.row -->
		<br>
		<br>
        <div class="row">
          <!-- accepted payments column -->
          <div class="col-xs-6">
            <p class="lead"><strong>Payment Methods:</strong></p>
            <img src="../images/credit/securepayment.png" alt="Methods payments" /> 
            <p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
              For your convenience we have several payment reliable, fast, secure.
            </p>
         
          </div>
          
          <div class="col-xs-6">
                    
             
          </div>
          <div class="col-xs-6">
            <p class="lead">Stamp Duty:</p>
            <img src="stamp2.png" alt=""  height="100"/>           
             
          </div>
          
          
          
          <!-- /.col -->
          <div class="col-xs-6">
            <p class="lead"><strong>Amount Due </strong></p>
            <div class="table-responsive">
              <table class="table">
                <tr>
                  <th style="width:50%">SHIPPING COST:</th>
                  <th>CLEARANCE COST:</th>
                  <th>TOTAL AMOUNT:</th> 
                </tr>
                <tr>
                  <td>$<?php echo $row['shipping_cost'] ?></td>
                  <td>$<?php echo $row['clearance_cost'] ?></td>
                  <td>$<?php echo $row['shipping_cost'] + $row['clearance_cost'] ?></td>
                </tr>
                
              </table>
            </div>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </section><!-- /.content -->
    </div><!-- ./wrapper -->

    <!-- AdminLTE App -->
    <script src="js/app.min.js" type="text/javascript"></script>
  </body>
</html>
