@extends('public.header') @section('head') @parent @include('money_script') @foreach ($invoice->client->account->getFontFolders() as $font) @endforeach @if ($account->showSignature($invoice)) @endif @if (!empty($transactionToken) && $accountGateway->gateway_id == GATEWAY_BRAINTREE && $accountGateway->getPayPalEnabled())
@elseif(!empty($enableWePayACH)) @elseif (! empty($accountGateway) && $accountGateway->getApplePayEnabled()) @endif @stop @section('content')
@if ($message = $invoice->client->customMessage($invoice->getCustomMessageType())) @include('invited.custom_message', ['message' => $message]) @endif @if (!empty($partialView)) @include($partialView) @else
@if ($invoice->isQuote()) {!! Button::normal(trans('texts.download'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}   @if ($showApprove) {!! Button::success(trans('texts.approve'))->withAttributes(['id' => 'approveButton', 'onclick' => 'onApproveClick()', 'class' => 'require-authorization'])->large() !!} @elseif ($invoiceLink = $invoice->getInvoiceLinkForQuote($contact->id)) {!! Button::success(trans('texts.view_invoice'))->asLinkTo($invoiceLink)->large() !!} @endif @elseif ( ! $invoice->canBePaid()) {!! Button::normal(trans('texts.download'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!} @elseif ($invoice->client->account->isGatewayConfigured() && floatval($invoice->balance) && !$invoice->is_recurring) {!! Button::normal(trans('texts.download'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}   @if (count($paymentTypes) > 1) {!! DropdownButton::success(trans('texts.pay_now'))->withContents($paymentTypes)->large() !!} @elseif (count($paymentTypes) == 1) {{ trans('texts.pay_now') }} {!! $invoice->present()->gatewayFee($gatewayTypeId) !!} @endif @else {!! Button::normal(trans('texts.download'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!} @endif @if ($account->isNinjaAccount()) {!! Button::primary(trans('texts.return_to_app'))->asLinkTo(URL::to('/settings/account_management'))->large() !!} @endif
@endif
@if(!empty($documentsZipURL)) {!! Button::normal(trans('texts.download_documents', array('size'=>Form::human_filesize($documentsZipSize))))->asLinkTo($documentsZipURL)->large() !!} @endif

 

@if ($account->isPro() && $invoice->hasDocuments())

{{ trans('texts.documents_header') }}

@endif @if ($account->hasFeature(FEATURE_DOCUMENTS) && $account->invoice_embed_documents) @foreach ($invoice->documents as $document) @if($document->isPDFEmbeddable()) @endif @endforeach @foreach ($invoice->expenses as $expense) @foreach ($expense->documents as $document) @if($document->isPDFEmbeddable()) @endif @endforeach @endforeach @endif @include('invoices.pdf', ['account' => $invoice->client->account])

 

@if ($customGateway = $account->getGatewayByType(GATEWAY_TYPE_CUSTOM1)) @include('invited.custom_gateway', ['customGateway' => $customGateway, 'number' => 1]) @endif @if ($customGateway = $account->getGatewayByType(GATEWAY_TYPE_CUSTOM2)) @include('invited.custom_gateway', ['customGateway' => $customGateway, 'number' => 2]) @endif @if ($customGateway = $account->getGatewayByType(GATEWAY_TYPE_CUSTOM3)) @include('invited.custom_gateway', ['customGateway' => $customGateway, 'number' => 3]) @endif @if ($account->requiresAuthorization($invoice)) @endif @stop