<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
        <div class="col-xs-12">
    		<div class="invoice-title">
    			<h2>Invoice</h2><h3 class="pull-right">Order #000<?php echo $data['Billno'];?></h3>
    		</div>
    		<hr>
    		<div class="row">
    			<div class="col-xs-6">
    				<address>
    				<strong>Billed To:</strong><br>
					<?php echo e($data['ViewPurchase']->cst_name); ?><br>
    					<?php echo e($data['ViewPurchase']->cst_address); ?><br>
    					<?php echo e($data['ViewPurchase']->cst_city); ?><br>
    					<?php echo e($data['ViewPurchase']->cst_state); ?>, <?php echo e($data['ViewPurchase']->cst_country); ?>

    				</address>
    			</div>
    			<div class="col-xs-6 text-right">
    				<address>
        			<strong>Billed From:</strong><br>
    					<?php echo e($data['CompanyData']->frm_name); ?><br>
    					<?php echo e($data['CompanyData']->frm_address); ?><br>
    					<?php echo e($data['CompanyData']->frm_city); ?><br>
    					<?php echo e($data['CompanyData']->frm_state); ?>, <?php echo e($data['CompanyData']->frm_country); ?></br>
    					PH:<?php echo e($data['CompanyData']->frm_ph1); ?>, <?php echo e($data['CompanyData']->frm_ph2); ?></br>
    					Mail:<?php echo e($data['CompanyData']->frm_email); ?></br>
    				</address>
    			</div>
    		</div>
    		<div class="row">
    			<div class="col-xs-6">
    				<address>
    					<strong>Payment Method:</strong><br>
    					<?php echo e($data['ViewPurchase']->cst_bankdetail); ?><br>
    					<?php echo e($data['ViewPurchase']->cst_email); ?>

    				</address>
    			</div>
    			<div class="col-xs-6 text-right">
    				<address>
    					<strong>Order Date:</strong><br>
    					<?php echo e($data['ViewPurchase']->bil_date); ?><br><br>
    				</address>
    			</div>
    		</div>
    	</div>
    </div>
    
    <div class="row">
    	<div class="col-md-12">
    		<div class="panel panel-default">
    			<div class="panel-heading">
    				<h3 class="panel-title"><strong>Order summary</strong></h3>
    			</div>
    			<div class="panel-body">
    				<div class="table-responsive">
    					<table class="table table-condensed">
    						<thead>
                                <tr>
        							<td><strong>Item</strong></td>
        							<td class="text-center"><strong>Price</strong></td>
        							<td class="text-center"><strong>Quantity</strong></td>
        							<td class="text-right"><strong>Totals</strong></td>
                                </tr>
    						</thead>
    						<tbody>
							<?php $sum=0;?>
    							 <?php $__currentLoopData = $data['ViewPurchaseItem']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $Item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> 
    							<tr>
    								<td><?php echo e($Item->itm_name); ?></td>
    								<td class="text-center"><?php echo e($Item->itm_salescost); ?></td>
    								<td class="text-center"><?php echo e($Item->bit_qty); ?></td>
									<?php $a=$Item->itm_salescost; $b=$Item->bit_qty; $c=$a*$b;?>
    								<td class="text-right"><?php echo e($c); ?></td>
									<?php  $sum+=$c;?>
    							</tr>
								<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                
    							<tr>
    								<td class="thick-line"></td>
    								<td class="thick-line"></td>
    								<td class="thick-line text-center"><strong>Subtotal</strong></td>
    								<td class="thick-line text-right"><?php echo e($sum); ?></td>
    							</tr>
								
								<tr>
    								<td class="thick-line"></td>
    								<td class="thick-line"></td>
    								<td class="thick-line text-center"><strong>Discount</strong></td>
    								<td class="thick-line text-right"><?php echo $discnt=$data['tax']->bds_amt;?></td>
    							</tr>
								
    							<tr>
    								<td class="no-line"></td>
    								<td class="no-line"></td>
    								<td class="no-line text-center"><strong>Tax(<?php Echo $data['tax']->tax_amt;?>%)</strong></td>
    								<td class="no-line text-right"><?php  echo $amt= $data['tax']->TaxAmount;?></td>
    							</tr>
    							<tr>
    								<td class="no-line"></td>
    								<td class="no-line"></td>
    								<td class="no-line text-center"><strong>Total</strong></td>
    								<td class="no-line text-right"><?php echo $subtotal=$data['tax']->Bill_amount;?></td>
    							</tr>
    						</tbody>
    					</table>
    				</div>
    			</div>
    		</div>
    	</div>
    </div>
</div>