@extends('header') @section('head') @parent @stop @section('content') @parent @include('accounts.nav', ['selected' => ACCOUNT_INVOICE_SETTINGS, 'advanced' => true]) {!! Former::open()->rules(['iframe_url' => 'url'])->addClass('warn-on-exit') !!} {{ Former::populate($account) }} {{ Former::populateField('auto_convert_quote', intval($account->auto_convert_quote)) }} {{ Former::populateField('auto_archive_quote', intval($account->auto_archive_quote)) }} {{ Former::populateField('auto_email_invoice', intval($account->auto_email_invoice)) }} {{ Former::populateField('auto_archive_invoice', intval($account->auto_archive_invoice)) }} {{ Former::populateField('custom_invoice_taxes1', intval($account->custom_invoice_taxes1)) }} {{ Former::populateField('custom_invoice_taxes2', intval($account->custom_invoice_taxes2)) }} {{ Former::populateField('share_counter', intval($account->share_counter)) }} @foreach (App\Models\Account::$customFields as $field) {{ Former::populateField("custom_fields[$field]", $account->customLabel($field)) }} @endforeach

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

{!! Former::inline_radios('invoice_number_type') ->onchange("onNumberTypeChange('invoice')") ->label(trans('texts.type')) ->radios([ trans('texts.prefix') => ['value' => 'prefix', 'name' => 'invoice_number_type'], trans('texts.pattern') => ['value' => 'pattern', 'name' => 'invoice_number_type'], ])->check($account->invoice_number_pattern ? 'pattern' : 'prefix') !!} {!! Former::text('invoice_number_prefix') ->addGroupClass('invoice-prefix') ->label(trans('texts.prefix')) !!} {!! Former::text('invoice_number_pattern') ->appendIcon('question-sign') ->addGroupClass('invoice-pattern') ->label(trans('texts.pattern')) ->addGroupClass('number-pattern') !!} {!! Former::text('invoice_number_counter') ->label(trans('texts.counter')) ->help(trans('texts.invoice_number_help') . ' ' . trans('texts.next_invoice_number', ['number' => $account->previewNextInvoiceNumber()])) !!}
{!! Former::inline_radios('quote_number_type') ->onchange("onNumberTypeChange('quote')") ->label(trans('texts.type')) ->radios([ trans('texts.prefix') => ['value' => 'prefix', 'name' => 'quote_number_type'], trans('texts.pattern') => ['value' => 'pattern', 'name' => 'quote_number_type'], ])->check($account->quote_number_pattern ? 'pattern' : 'prefix') !!} {!! Former::text('quote_number_prefix') ->addGroupClass('quote-prefix') ->label(trans('texts.prefix')) !!} {!! Former::text('quote_number_pattern') ->appendIcon('question-sign') ->addGroupClass('quote-pattern') ->addGroupClass('number-pattern') ->label(trans('texts.pattern')) !!} {!! Former::text('quote_number_counter') ->label(trans('texts.counter')) ->addGroupClass('pad-checkbox') ->append(Former::checkbox('share_counter')->raw()->value(1) ->onclick('setQuoteNumberEnabled()') . ' ' . trans('texts.share_invoice_counter')) ->help(trans('texts.quote_number_help') . ' ' . trans('texts.next_quote_number', ['number' => $account->previewNextInvoiceNumber(ENTITY_QUOTE)])) !!}
{!! Former::checkbox('client_number_enabled') ->label('client_number') ->onchange('onClientNumberEnabled()') ->text('enable') ->value(1) ->check($account->client_number_counter > 0) !!}
{!! Former::checkbox('credit_number_enabled') ->label('credit_number') ->onchange('onCreditNumberEnabled()') ->text('enable') ->value(1) ->check($account->credit_number_counter > 0) !!}
{!! Former::text('invoice_number_padding') ->help('padding_help') !!} {!! Former::text('recurring_invoice_number_prefix') ->label(trans('texts.recurring_prefix')) ->help(trans('texts.recurring_invoice_number_prefix_help')) !!} {!! Former::select('reset_counter_frequency_id') ->onchange('onResetFrequencyChange()') ->label('reset_counter') ->addOption(trans('texts.never'), '') ->options(\App\Models\Frequency::selectOptions()) ->help('reset_counter_help') !!} {!! Former::text('reset_counter_date') ->label('next_reset') ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT)) ->addGroupClass('reset_counter_date_group') ->append('') ->data_date_start_date($account->formatDate($account->getDateTime())) !!}

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

{!! Former::text('custom_fields[product1]') ->label('product_field') ->data_lpignore('true') !!} {!! Former::text('custom_fields[product2]') ->label('product_field') ->data_lpignore('true') ->help(trans('texts.custom_product_fields_help') . ' ' . trans('texts.custom_fields_tip')) !!}
{!! Former::text('custom_fields[client1]') ->label('client_field') !!} {!! Former::text('custom_fields[client2]') ->label('client_field') ->help(trans('texts.custom_client_fields_helps') . ' ' . trans('texts.custom_fields_tip')) !!}
{!! Former::text('custom_fields[contact1]') ->label('contact_field') !!} {!! Former::text('custom_fields[contact2]') ->label('contact_field') ->help(trans('texts.custom_contact_fields_help') . ' ' . trans('texts.custom_fields_tip')) !!}
{!! Former::text('custom_fields[invoice_text1]') ->label('invoice_field') !!} {!! Former::text('custom_fields[invoice_text2]') ->label('invoice_field') ->help(trans('texts.custom_invoice_fields_helps') . ' ' . trans('texts.custom_fields_tip')) !!} {!! Former::text('custom_fields[invoice1]') ->label('invoice_surcharge') ->addGroupClass('pad-checkbox') ->append(Former::checkbox('custom_invoice_taxes1') ->value(1) ->raw() . trans('texts.charge_taxes')) !!} {!! Former::text('custom_fields[invoice2]') ->label('invoice_surcharge') ->addGroupClass('pad-checkbox') ->append(Former::checkbox('custom_invoice_taxes2') ->value(1) ->raw() . trans('texts.charge_taxes')) ->help(trans('texts.custom_invoice_charges_helps')) !!}
{!! Former::text('custom_fields[task1]') ->label('task_field') !!} {!! Former::text('custom_fields[task2]') ->label('task_field') ->help(trans('texts.custom_task_fields_help') . ' ' . trans('texts.custom_fields_tip')) !!}
{!! Former::text('custom_fields[project1]') ->label('project_field') !!} {!! Former::text('custom_fields[project2]') ->label('project_field') ->help(trans('texts.custom_project_fields_help') . ' ' . trans('texts.custom_fields_tip')) !!}
{!! Former::text('custom_fields[expense1]') ->label(trans('texts.expense_field')) !!} {!! Former::text('custom_fields[expense2]') ->label(trans('texts.expense_field')) ->help(trans('texts.custom_expense_fields_help') . ' ' . trans('texts.custom_fields_tip')) !!}
{!! Former::text('custom_fields[vendor1]') ->label(trans('texts.vendor_field')) !!} {!! Former::text('custom_fields[vendor2]') ->label(trans('texts.vendor_field')) ->help(trans('texts.custom_vendor_fields_help') . ' ' . trans('texts.custom_fields_tip')) !!}
{!! Former::text('custom_fields[account1]') ->label(trans('texts.company_field')) !!} {!! Former::text('custom_value1') ->label(trans('texts.field_value')) !!}

 

{!! Former::text('custom_fields[account2]') ->label(trans('texts.company_field')) !!} {!! Former::text('custom_value2') ->label(trans('texts.field_value')) ->help(trans('texts.custom_account_fields_helps')) !!}

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

{!! Former::checkbox('auto_email_invoice') ->text(trans('texts.enable')) ->blockHelp(trans('texts.auto_email_invoice_help')) ->value(1) !!} {!! Former::checkbox('auto_archive_invoice') ->text(trans('texts.enable')) ->blockHelp(trans('texts.auto_archive_invoice_help')) ->value(1) !!}
{!! Former::checkbox('auto_convert_quote') ->text(trans('texts.enable')) ->blockHelp(trans('texts.auto_convert_quote_help')) ->value(1) !!} {!! Former::checkbox('auto_archive_quote') ->text(trans('texts.enable')) ->blockHelp(trans('texts.auto_archive_quote_help')) ->value(1) !!}

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

{!! Former::textarea('invoice_terms') ->label(trans('texts.default_invoice_terms')) ->rows(8) ->raw() !!}
{!! Former::textarea('quote_terms') ->label(trans('texts.default_quote_terms')) ->rows(8) ->raw() !!}
@if ($account->hasFeature(FEATURE_DOCUMENTS))
@endif
@if (Auth::user()->hasFeature(FEATURE_INVOICE_SETTINGS))
{!! Button::success(trans('texts.save'))->large()->submit()->appendIcon(Icon::create('floppy-disk')) !!}
@endif {!! Former::close() !!} @stop @section('onReady') $('#custom_invoice_label1').focus(); @stop