<html>

	<head>
	<title>Testing Invoice</title>
			
		<!--- -->
		<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

		</head>
		<body>
<div class="container bootstrap snippets bootdeys">
<div class="row">
  <div class="col-sm-12">
	  	<div class="panel panel-default invoice" id="invoice">
		  <div class="panel-body">
			<!--<div class="invoice-ribbon"><div class="ribbon-inner">PAID</div></div>-->
		    <div class="row">

				<div class="col-sm-6 top-left">
					<img src="assets/uploads/galeyr.png"/>
				</div>

				<div class="col-sm-6 top-right">
						<h3 class="marginright">INVOICE</h3>
			    </div>

			</div>
			<hr>
			<div class="row">

				<div class="col-xs-4 from">
					<p class="lead marginbottom">Bill To : <?php echo $sender_data->fname." ".$sender_data->lname; ?></p>
					<table id="items">
					<?php echo $address_order->recipient_address; ?> </br>
					<?php echo $address_order->recipient_country." | ".$address_order->recipient_city; ?> </br>
					<?php echo $sender_data->phone; ?> </br>
					<?php echo $sender_data->email; ?> 
				    </table>
				</div>

				<div class="col-xs-4 to">
					<p class="lead marginbottom">Ship To : <?php echo $receiver_data->fname." ".$receiver_data->lname; ?></p>
					<table id="items">
					<?php echo $address_order->recipient_address; ?> </br>
					<?php echo $address_order->recipient_country." | ".$address_order->recipient_city; ?> </br>
					<?php echo $receiver_data->phone; ?> </br>
					<?php echo $receiver_data->email; ?> 
				    </table>

			    </div>

			    <div class="col-xs-4 text-right payment-details">
					<p class="lead marginbottom payment-info">Invoice Details</p>
					<p>Invoice Date: <?php echo $fecha; ?></p>
					<p>Invoice: <b><?php echo $row->order_prefix . $row->order_no; ?></b> </p>
			    </div>

			</div>

			<div class="row table-row">
				<table class="table table-striped">
			      <thead>
			        <tr>
			          <th class="text-center" style="width:5%">#</th>
			          <th style="width:50%">Item</th>
			          <th class="text-right" style="width:15%">Quantity</th>
			          <th class="text-right" style="width:15%">Unit Price</th>
			          <th class="text-right" style="width:15%">Total Price</th>
			        </tr>
			      </thead>
			      <tbody>
			        <tr>
			          <td class="text-center">1</td>
			          <td>Flatter Theme</td>
			          <td class="text-right">10</td>
			          <td class="text-right">$18</td>
			          <td class="text-right">$180</td>
			        </tr>
			        <tr>
			          <td class="text-center">2</td>
			          <td>Flat Icons</td>
			          <td class="text-right">6</td>
			          <td class="text-right">$59</td>
			          <td class="text-right">$254</td>
			        </tr>
			        <tr>
			          <td class="text-center">3</td>
			          <td>Wordpress version</td>
			          <td class="text-right">4</td>
			          <td class="text-right">$95</td>
			          <td class="text-right">$285</td>
			        </tr>
			         <tr class="last-row">
			          <td class="text-center">4</td>
			          <td>Server Deployment</td>
			          <td class="text-right">1</td>
			          <td class="text-right">$300</td>
			          <td class="text-right">$300</td>
			        </tr>
			       </tbody>
			    </table>

			</div>

			<div class="row">
			<div class="col-xs-6 text-right pull-right invoice-total">
					  <p>Subtotal : $1019</p>
			          <p>Discount : $101 </p>
			          <p>Total : $991 </p>
			</div>
			</div>
			
			<div class="row">
			    <div class="col-xs-6 margintop">
			   <p class="lead marginbottom"><b>Terms & Conditions</b></p>
			   <p>
			       Payment is due within 3days
			   </p>
			   <button class='button -dark center no-print' onClick="window.print();" style="font-size:16px">Print Invoice &nbsp;&nbsp; <i class="fa fa-print"></i></button>
			   </div>
			</div>

		  </div>
		</div>
	</div>
</div>
</div>
<style>
body{margin-top:20px;
background:#eee;
}

/*Invoice*/
.invoice .top-left {
    font-size:65px;
	color:#3ba0ff;
}

.invoice .top-right {
	text-align:right;
	padding-right:20px;
}

.invoice .table-row {
	margin-left:-15px;
	margin-right:-15px;
	margin-top:25px;
}

.invoice .payment-info {
	font-weight:500;
}

.invoice .table-row .table>thead {
	border-top:1px solid #ddd;
}

.invoice .table-row .table>thead>tr>th {
	border-bottom:none;
}

.invoice .table>tbody>tr>td {
	padding:8px 20px;
}

.invoice .invoice-total {
	margin-right:-10px;
	font-size:16px;
}

.invoice .last-row {
	border-bottom:1px solid #ddd;
}

.invoice-ribbon {
	width:85px;
	height:88px;
	overflow:hidden;
	position:absolute;
	top:-1px;
	right:14px;
}

.ribbon-inner {
	text-align:center;
	-webkit-transform:rotate(45deg);
	-moz-transform:rotate(45deg);
	-ms-transform:rotate(45deg);
	-o-transform:rotate(45deg);
	position:relative;
	padding:7px 0;
	left:-5px;
	top:11px;
	width:120px;
	background-color:#66c591;
	font-size:15px;
	color:#fff;
}

.ribbon-inner:before,.ribbon-inner:after {
	content:"";
	position:absolute;
}

.ribbon-inner:before {
	left:0;
}

.ribbon-inner:after {
	right:0;
}

@media(max-width:575px) {
	.invoice .top-left,.invoice .top-right,.invoice .payment-details {
		text-align:center;
	}

	.invoice .from,.invoice .to,.invoice .payment-details {
		float:none;
		width:100%;
		text-align:center;
		margin-bottom:25px;
	}

	.invoice p.lead,.invoice .from p.lead,.invoice .to p.lead,.invoice .payment-details p.lead {
		font-size:22px;
	}

	.invoice .btn {
		margin-top:10px;
	}
}

@media print {
	.invoice {
		width:900px;
		height:800px;
	}
}

</style>
<script>
function printDiv() {
    var divToPrint = document.getElementById('table');
    var htmlToPrint = '' +
        '<style type="text/css">' +
        'table th, table td {' +
        'border:1px solid #000;' +
        'padding:0.5em;' +
        '}' +
        '</style>';
    htmlToPrint += divToPrint.outerHTML;
    newWin = window.open("");
    newWin.document.write(htmlToPrint);
    newWin.print();
    newWin.close();
}
</script>		
	</body>

</html>