@extends('header') @section('head') @parent @include('money_script') @foreach ($account->getFontFolders() as $font) @endforeach @stop @section('content') @parent @include('accounts.nav', ['selected' => ACCOUNT_INVOICE_DESIGN, 'advanced' => true]) @include('accounts.partials.invoice_fields')
{!! Former::open()->addClass('warn-on-exit')->onchange('if(!window.loadingFonts)refreshPDF()') !!} {!! Former::populateField('invoice_design_id', $account->invoice_design_id) !!} {!! Former::populateField('body_font_id', $account->getBodyFontId()) !!} {!! Former::populateField('header_font_id', $account->getHeaderFontId()) !!} {!! Former::populateField('font_size', $account->font_size) !!} {!! Former::populateField('page_size', $account->page_size) !!} {!! Former::populateField('invoice_embed_documents', intval($account->invoice_embed_documents)) !!} {!! Former::populateField('primary_color', $account->primary_color) !!} {!! Former::populateField('secondary_color', $account->secondary_color) !!} {!! Former::populateField('hide_quantity', intval($account->hide_quantity)) !!} {!! Former::populateField('hide_paid_to_date', intval($account->hide_paid_to_date)) !!} {!! Former::populateField('all_pages_header', intval($account->all_pages_header)) !!} {!! Former::populateField('all_pages_footer', intval($account->all_pages_footer)) !!} @foreach ($invoiceLabels as $field => $value) {!! Former::populateField("labels_{$field}", $value) !!} @endforeach
{!! Former::text('invoice_fields_json')->data_bind('value: ko.mapping.toJSON(model)') !!}

{!! trans('texts.invoice_design') !!}

@if (!Utils::hasFeature(FEATURE_MORE_INVOICE_DESIGNS) || \App\Models\InvoiceDesign::count() == COUNT_FREE_DESIGNS_SELF_HOST) {!! Former::select('invoice_design_id') ->fromQuery($invoiceDesigns, 'name', 'id') ->addOption(trans('texts.more_designs') . '...', '-1') !!} @else {!! Former::select('invoice_design_id') ->fromQuery($invoiceDesigns, 'name', 'id') !!} @endif {!! Former::select('body_font_id') ->fromQuery($invoiceFonts, 'name', 'id') !!} {!! Former::select('header_font_id') ->fromQuery($invoiceFonts, 'name', 'id') !!}
{{ Former::setOption('TwitterBootstrap3.labelWidths.large', 6) }} {{ Former::setOption('TwitterBootstrap3.labelWidths.small', 6) }} {!! Former::select('page_size') ->options($pageSizes) !!} {!! Former::text('font_size') ->type('number') ->min('0') ->step('1') !!} {!! Former::text('primary_color') !!} {!! Former::text('secondary_color') !!} {{ Former::setOption('TwitterBootstrap3.labelWidths.large', 4) }} {{ Former::setOption('TwitterBootstrap3.labelWidths.small', 4) }}
{{ trans('texts.color_font_help') }}
{!! Former::text('labels_item')->label('item') !!} {!! Former::text('labels_description')->label('description') !!} {!! Former::text('labels_unit_cost')->label('unit_cost') !!} {!! Former::text('labels_quantity')->label('quantity') !!} {!! Former::text('labels_line_total')->label('line_total') !!} {!! Former::text('labels_terms')->label('terms') !!} {!! Former::text('labels_subtotal')->label('subtotal') !!}
{!! Former::text('labels_discount')->label('discount') !!} {!! Former::text('labels_paid_to_date')->label('paid_to_date') !!} {!! Former::text('labels_balance_due')->label('balance_due') !!} {!! Former::text('labels_partial_due')->label('partial_due') !!} {!! Former::text('labels_tax')->label('tax') !!} {!! Former::text('labels_po_number')->label('po_number') !!} {!! Former::text('labels_due_date')->label('due_date') !!}
@include('accounts.partials.invoice_fields_selector', ['section' => 'invoice_fields', 'fields' => INVOICE_FIELDS_INVOICE]) @include('accounts.partials.invoice_fields_selector', ['section' => 'client_fields', 'fields' => INVOICE_FIELDS_CLIENT]) @include('accounts.partials.invoice_fields_selector', ['section' => 'account_fields1', 'fields' => INVOICE_FIELDS_ACCOUNT]) @include('accounts.partials.invoice_fields_selector', ['section' => 'account_fields2', 'fields' => INVOICE_FIELDS_ACCOUNT])
{{ trans('texts.invoice_fields_help') }}
{!! Button::normal(trans('texts.reset')) ->withAttributes(['onclick' => 'sweetConfirm(function() { resetFields(); })']) ->small() !!}
{!! Former::checkbox('hide_quantity')->text(trans('texts.hide_quantity_help'))->value(1) !!} {!! Former::checkbox('hide_paid_to_date')->text(trans('texts.hide_paid_to_date_help'))->value(1) !!} {!! Former::checkbox('invoice_embed_documents')->text(trans('texts.invoice_embed_documents_help'))->value(1) !!}

{!! Former::actions( Button::primary(trans('texts.customize')) ->appendIcon(Icon::create('edit')) ->asLinkTo(URL::to('/settings/customize_design')) ->large(), Auth::user()->hasFeature(FEATURE_CUSTOMIZE_INVOICE_DESIGN) ? Button::success(trans('texts.save')) ->submit()->large() ->appendIcon(Icon::create('floppy-disk')) ->withAttributes(['class' => 'save-button']) : false ) !!}
{!! Former::close() !!}
@include('invoices.pdf', ['account' => Auth::user()->account, 'pdfHeight' => 800]) @stop