Current File : //home/tradevaly/www/storage/framework/views/04737a9b6e22e9ee84b0a16f728204ecfef8c7d0.php |
<?php $__env->startPush('title'); ?> Money Receipt || Package <?php $__env->stopPush(); ?>
<?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">Invoice No.: <span class="value"><?php echo e($money_receipt->order_id); ?></span>
</td>
<td class="bold">Date: <span
class="value"><?php echo e(date('d F Y',strtotime($money_receipt->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($money_receipt->transaction ? $money_receipt->transaction->transaction_id:''); ?></span></td>
</tr>
<?php
$formatter = new NumberFormatter("en", NumberFormatter::SPELLOUT);
$amount = $money_receipt->transaction ? $money_receipt->transaction->total_amount : $money_receipt->amount;
?>
<tr>
<td class="bold">Amount: <span
class="text-right value">BDT <?php echo e(number_format($amount,2)); ?></span>
</td>
<td class="bold">In Words: <span
class="value text-capitalize"><?php echo e($formatter->format($amount)); ?></span>
</td>
</tr>
<tr>
<td class="bold">Payment Method: <span
class="value"><?php echo e($money_receipt->transaction ? $money_receipt->transaction->payment_method : ''); ?></span></td>
<td class="bold">Payment Type: <span
class="value"><?php echo e($money_receipt->transaction ?$money_receipt->transaction->payment_type : ''); ?></span></td>
</tr>
<tr>
<td class="bold">Payment For: <span
class="value text-capitalize"><?php echo e(str_replace('_',' ',$money_receipt->package ? $money_receipt->package->name : '')); ?></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($money_receipt->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('backend.ayaan.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/tradevaly/public_html/resources/views/backend/pages/subscriber/money_receipt.blade.php ENDPATH**/ ?>