1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/resources/views/invoices/history.blade.php

60 lines
1.8 KiB
PHP
Raw Normal View History

2015-03-16 22:45:25 +01:00
@extends('header')
@section('head')
@parent
2015-12-30 19:45:52 +01:00
@include('money_script')
2016-01-07 08:08:30 +01:00
@foreach (Auth::user()->account->getFontFolders() as $font)
<script src="{{ asset('js/vfs_fonts/'.$font.'.js') }}" type="text/javascript"></script>
@endforeach
2016-01-31 20:36:50 +01:00
<script src="{{ asset('pdf.built.js') }}" type="text/javascript"></script>
2015-03-16 22:45:25 +01:00
<script>
2015-04-16 19:12:56 +02:00
var invoiceDesigns = {!! $invoiceDesigns !!};
2016-01-07 08:08:30 +01:00
var invoiceFonts = {!! $invoiceFonts !!};
2015-04-16 19:12:56 +02:00
var currentInvoice = {!! $invoice !!};
var versionsJson = {!! $versionsJson !!};
2015-03-16 22:45:25 +01:00
function getPDFString(cb) {
2015-03-16 22:45:25 +01:00
var version = $('#version').val();
var invoice;
if (parseInt(version)) {
invoice = versionsJson[version];
} else {
invoice = currentInvoice;
}
invoice.image = window.accountLogo;
var invoiceDesignId = parseInt(invoice.invoice_design_id);
var invoiceDesign = _.findWhere(invoiceDesigns, {id: invoiceDesignId});
if (!invoiceDesign) {
invoiceDesign = invoiceDesigns[0];
}
2015-07-21 20:51:56 +02:00
generatePDF(invoice, invoiceDesign.javascript, true, cb);
2015-03-16 22:45:25 +01:00
}
$(function() {
refreshPDF();
});
</script>
@stop
@section('content')
2015-04-16 19:12:56 +02:00
{!! Former::open()->addClass('form-inline')->onchange('refreshPDF()') !!}
2015-04-27 14:28:40 +02:00
{!! Former::select('version')->options($versionsSelect)->label(trans('select_version'))->style('background-color: white !important') !!}
2015-05-19 21:14:00 +02:00
{!! Button::primary(trans('texts.edit_' . $invoice->getEntityType()))->asLinkTo(URL::to('/' . $invoice->getEntityType() . 's/' . $invoice->public_id . '/edit'))->withAttributes(array('class' => 'pull-right')) !!}
2015-04-16 19:12:56 +02:00
{!! Former::close() !!}
2015-03-16 22:45:25 +01:00
<br/>&nbsp;<br/>
@include('invoices.pdf', ['account' => Auth::user()->account, 'pdfHeight' => 800])
@stop