Current File : /home/tradevaly/www/storage/framework/views/ee92f3a95846afc594265e48ad7ecb240da4535e.php |
<?php $__env->startPush('title','Money Receipt || Package'); ?>
<?php $__env->startSection('css'); ?>
<style>
#money-receipt {
background: #fff;
padding: 15px;
}
@media print {
.row {
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
}
table {
width: 100%;
border-collapse: collapse;
}
th, td {
padding: 8px;
text-align: left;
}
span.value {
font-weight: normal;
padding-left: 10px;
}
.text-center {
text-align: center;
}
.text-right {
text-align: right;
}
.bold {
font-weight: bold;
border-bottom: 1px dashed #4444;
white-space: nowrap;
}
hr {
border: none;
border-top: 1px solid #ddd;
margin: 20px 0;
}
.receipt-title {
display: inline-block;
border: 2px solid #6c6c6c;
padding: 4px 24px;
font-size: 20px;
font-weight: 800;
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<?php $__env->startComponent('components.breadcrumb'); ?>
<?php $__env->slot('li_1'); ?> Dashboard <?php $__env->endSlot(); ?>
<?php $__env->slot('title'); ?> Money Receipt <?php $__env->endSlot(); ?>
<?php echo $__env->renderComponent(); ?>
<div class="container mt-5 ">
<div class="row justify-content-center">
<div class="col-md-9">
<div class="card" id="money-receipt">
<div class="card-body">
<table>
<tr>
<td>
<h3 class="text-uppercase text-dark fw-bold">
Tradevaly
</h3>
<p><?php echo e(settings()->address); ?></p>
</td>
<td>
<?php
$settings = \Illuminate\Support\Facades\DB::table('logo')->first();
?>
<?php if(!empty($settings)): ?>
<img
src="<?php echo e(asset('storage/images/admin/logo/'.$settings->image)); ?>"
height="60" width="200" alt="">
<?php else: ?>
<img
src="<?php echo e(asset('fav-icon.png')); ?>" height="60" width="200" alt="">
<?php endif; ?>
</td>
</tr>
<tr>
<th colspan="4" class="text-center">
<h2 class="receipt-title">Money Receipt</h2>
</th>
</tr>
<tr>
<td class="bold">Order No.: <span class="value"><?php echo e($invoice->order_id); ?></span>
</td>
<td class="bold">Date: <span
class="value"><?php echo e(date('d F Y',strtotime($invoice->created_at))); ?></span>
</td>
</tr>
<tr>
<td class="bold">Received from: <span
class="value">Tradevaly</span></td>
<td class="bold">Transaction ID: <span
class="value"><?php echo e($invoice->transaction->id); ?></span></td>
</tr>
<?php
$formatter = new NumberFormatter("en", NumberFormatter::SPELLOUT);
$amount = $invoice->transaction->total_amount;
$discount = $invoice->transaction->discount_amount;
?>
<tr>
<td class="bold">Amount: <span
class="text-right value">BDT <?php echo e(number_format($amount,2)); ?></span>
</td>
<td class="bold">Discount: <span
class="value text-capitalize">BDT <?php echo e($discount); ?></span>
</td>
</tr>
<tr>
<td class="bold">Total: <span
class="text-right value">BDT <?php echo e(number_format($amount-$discount,2)); ?></span>
</td>
<td class="bold">In Words: <span
class="value text-capitalize">BDT <?php echo e($formatter->format($amount-$discount)); ?></span>
</td>
</tr>
<tr>
<td class="bold">Payment Method: <span
class="value"><?php echo e($invoice->payment_method); ?></span></td>
<td class="bold">Payment Type: <span
class="value"><?php echo e($invoice->transaction->payment_status); ?></span></td>
</tr>
<tr>
<td class="bold">Payment For: <span
class="value text-capitalize"><?php echo e($invoice->transaction->order_from); ?></span>
</td>
</tr>
<tr>
<td colspan="4">
<hr>
</td>
</tr>
<tr>
<td class="text-center">This is an electronic money receipt signature is not required.
</td>
<td class="text-center">Powered by <b>Tradevaly</b>.</td>
</tr>
</table>
</div>
</div>
<div class="col-lg-12 text-center my-5">
<a class="btn btn-info my-2" href="<?php echo e(route('admin.subscriber.index')); ?>">
<i class="fa fa-arrow-left"></i> Back to list
</a>
<a href="javascript:" class="btn btn-success" id="downloadInvoice">
<i class="fa fa-download default"></i>
<i class="fa fa-spinner fa-spin loader d-none"></i> Download PDF
</a>
<a href="javascript:" class="btn btn-warning" onclick="printHandler()">
<i class="fa fa-print"></i> Print
</a>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js"
integrity="sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script type="text/javascript">
$(document).ready(function ($) {
$('#downloadInvoice').on('click', function (event) {
event.preventDefault();
$('.default').hide();
$('.loader').show();
const element = document.getElementById("money-receipt");
var opt = {
margin: 0,
filename: 'money-receipt-<?php echo e($invoice->order_id); ?>.pdf',
image: {type: 'jpeg', quality: 0.98},
html2canvas: {scale: 3, y: 0, scrollY: 0},
jsPDF: {unit: 'in', format: 'letter', orientation: 'portrait'}
};
html2pdf().set(opt).from(element).save();
window.setTimeout(function () {
$('.loader').hide();
$('.default').show();
}, 1000)
})
})
function printHandler() {
var printableContent = document.getElementById('money-receipt')
var printContents = printableContent.innerHTML;
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.setTimeout(function () {
document.title = "money-receipt"
window.print();
document.body.innerHTML = originalContents;
window.location.reload()
}, 1000);
}
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('user.ayaan.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/tradevaly/public_html/resources/views/user/pages/invoice/product_money_receipt.blade.php ENDPATH**/ ?>