Sindbad~EG File Manager

Current Path : /home/atdotid/da.aturtoko.id/application/views/
Upload File :
Current File : //home/atdotid/da.aturtoko.id/application/views/Print_view.php

<!DOCTYPE html>
<html>
<?php $this->load->view('link_css.php'); ?>
<body onload="window.print();">
<div class="wrapper">
		<section class="invoice">
      		<div class="box box-primary">
      			<div class="box-header with-border">
				  	<div class="col-xs-12 col-md-6 col-md-offset-3 text-center" style="padding: 0;">
				  		<h3>Detail Sales Payment</h3>
			  		</div>
			 	</div>
			 	<div class="box-body">
			 		<div class="row invoice-info">
			 			<div class="col-md-6">
	 						<h4>Sale ID : <?=$detail_data_payment[0]->sale_id?></h4>
	 						<h4>Customer Name : <?=$detail_data_payment[0]->first_name.' '.$detail_data_payment[0]->last_name?></h4>
			 			</div>
			 			<div class="col-md-6">
	 						<h4>Transaction Date : <?=$detail_data_payment[0]->sale_time?></h4>
	 						<h4>Payment Status : <?php if($detail_data_payment[0]->payment_type == 'Due') { echo "<span class='badge bg-red'>Not Paid</span>"; } else { echo "<span class='badge bg-blue'>Paid</span>"; }?></h4>
			 			</div>
			 		</div><br>
			 		<table class="table">
			 			<tr>
      						<th>No</th>
      						<th>Item Name</th>
      						<th>Qty</th>
      						<th>Unit Price</th>
      						<th>Total</th>
      					</tr>
      					<?php 
							$i = 1;
							$total_payment = 0;
							foreach($detail_data_payment as $ddp) {
						?>
      					<tr>
      						<td><?=$i?></td>
      						<td><?=$ddp->name?></td>
      						<td><?=number_format($ddp->quantity_purchased)?></td>
      						<td><?='Rp. '.number_format($ddp->item_unit_price)?></td>
							<td><?='Rp. '.number_format($ddp->quantity_purchased * $ddp->item_unit_price)?></td>
      					</tr>
      					<?php 
      						$total_payment = $total_payment + ($ddp->quantity_purchased * $ddp->item_unit_price);
							$i++;
						}
						?>
						<tr>
							<th colspan="4" class="text-right">Total Payment</th>
							<th><?='Rp. '.number_format($total_payment)?></th>
						</tr>
						<tr>
							<th colspan="4" class="text-right">DP</th>
							<th><?='Rp. '.number_format($total_payment - $detail_data_payment[0]->payment_amount)?></th>
						</tr>
						<tr>
							<th colspan="4" class="text-right">Must Pay</th>
							<th><?='Rp. '.number_format($detail_data_payment[0]->payment_amount)?></th>
						</tr>
			 		</table><br>
				 	<div class="row">
				 		<div class="col-md-12">
				 			<table class="table table-bordered table-hover">
	  							<tr>
	  								<th>No.</th>
	  								<th>Payment Date</th>
	  								<th>Payment Amount </th>
	  								<th>Note</th>
	  							</tr>
	  							<?php 
									$i = 1;
									$total_amount = 0;
									foreach($pembayaran_sale as $ps) {
								?>
	  							<tr>
	  								<td><?=$i?></td>
	  								<td><?=$ps->payment_time?></td>
	  								<td><?='Rp. '.number_format($ps->payment_amount)?></td>
	  								<td><?=$ps->keterangan?></td>
	  							</tr>
	  							<?php
	  								$total_amount = $total_amount + $ps->payment_amount;
	      							$i++;
	      						}
      							?>
	  							<tr>
      								<th colspan="2" class="text-right">Total</th>
      								<th colspan="2"><?='Rp. '.number_format($total_amount)?></th>
      							</tr>
      							<?php
      								$sisa = $detail_data_payment[0]->payment_amount - $total_amount;
      							?>
	  							<tr>
      								<th colspan="2" class="text-right">Remaining Payment</th>
      								<th colspan="2"><?='Rp. '.number_format($sisa)?></th>
      							</tr>
      							<tr>
      								<th colspan="2" class="text-right">Payment status</th>
      								<th colspan="2">
      									<?php
      										if($total_amount == $detail_data_payment[0]->payment_amount) {
      									?>
  										<span class="badge bg-blue">Paid</span>
  										<?php
      									} else {
      									?>	
      										<span class="badge bg-red">Not paid</span>
  										<?php
      									}
      									?>
      								</th>
      							</tr>
	  						</table>
				 		</div>
				 	</div>
				 	<div class="row invoice-info" style="margin-top: 100px">
			 			<div class="col-md-6 invoice-col">
			 				<p>(----------------------------------)</p>
			 			</div>
			 			<div class="col-md-6 invoice-col">
			 				<p>(----------------------------------)</p>
			 			</div>
			 		</div>
			 	</div>
      		</div>
		</section>
	</div>
</div>
<?php $this->load->view('link_js.php'); ?>
<script src="<?php echo base_url(); ?>assets/plugins/chartjs/Chart.js"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
</body>
</html>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists