1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Hide PDF is live preview is disabled

This commit is contained in:
Hillel Coren 2016-10-30 19:46:52 +02:00
parent 752e674a34
commit 85786afce8

View File

@ -563,7 +563,14 @@
</div>
<p>&nbsp;</p>
@include('invoices.pdf', ['account' => Auth::user()->account])
@if (Auth::user()->account->live_preview))
@include('invoices.pdf', ['account' => Auth::user()->account])
@else
<script type="text/javascript">
var invoiceLabels = {!! json_encode($account->getInvoiceLabels()) !!};
function refreshPDF() {}
</script>
@endif
@if (!Auth::user()->account->isPro())
<div style="font-size:larger">
@ -1167,11 +1174,6 @@
window.generatedPDF = false;
function getPDFString(cb, force) {
@if (!$account->live_preview)
if (window.generatedPDF) {
return;
}
@endif
var invoice = createInvoiceModel();
var design = getDesignJavascript();
if (!design) return;