@extends('header') @section('head') @parent @include('money_script') @foreach ($account->getFontFolders() as $font) @endforeach @stop @section('head_css') @parent @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('quote_design_id', $account->quote_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_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') !!}

{!! Former::select('invoice_design_id') ->label('default_design') ->fromQuery($invoiceDesigns, 'name', 'id') !!} {!! Former::select('quote_design_id') ->label('quote_design') ->fromQuery($invoiceDesigns, 'name', 'id') !!} {!! 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::select('label_field') ->placeholder('select_label') ->label('label') ->onchange('onFieldChange()') ->options(array_combine(App\Models\Account::$customLabels, Utils::trans(App\Models\Account::$customLabels))) !!}
@foreach (App\Models\Account::$customLabels as $field) {!! Former::text('labels_' . $field) ->label($field) ->addGroupClass($field . '-label-group label-group') !!} @endforeach
@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'))->small() ->withAttributes(['onclick' => 'sweetConfirm(function() { resetInvoiceFields(); })']) !!}
@include('accounts.partials.invoice_fields_selector', ['section' => 'product_fields', 'fields' => INVOICE_FIELDS_PRODUCT, 'colWidth' => 6]) @include('accounts.partials.invoice_fields_selector', ['section' => 'task_fields', 'fields' => INVOICE_FIELDS_TASK, 'colWidth' => 6])
{{ trans('texts.product_fields_help') }}
{!! Button::normal(trans('texts.reset'))->small() ->withAttributes(['onclick' => 'sweetConfirm(function() { resetProductFields(); })']) !!}
{!! 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::inline_radios('all_pages_header') ->label(trans('texts.all_pages_header')) ->radios([ trans('texts.first_page') => ['value' => 0, 'name' => 'all_pages_header'], trans('texts.all_pages') => ['value' => 1, 'name' => 'all_pages_header'], ])->check($account->all_pages_header) !!} {!! Former::inline_radios('all_pages_footer') ->label(trans('texts.all_pages_footer')) ->radios([ trans('texts.last_page') => ['value' => 0, 'name' => 'all_pages_footer'], trans('texts.all_pages') => ['value' => 1, 'name' => 'all_pages_footer'], ])->check($account->all_pages_footer) !!}
{!! $account->getCustomDesign(CUSTOM_DESIGN1) ? DropdownButton::primary(trans('texts.customize')) ->withContents($account->present()->customDesigns) ->large() : Button::primary(trans('texts.customize')) ->appendIcon(Icon::create('edit')) ->asLinkTo(URL::to('/settings/customize_design') . '?design_id=' . CUSTOM_DESIGN1) ->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