@extends('layouts.guest') @section('page-title', $invoice_number ) @section('sticky-navbar') @stop @section('content')
@include('partials.messages')

{{ format_invoice_number($invoice->id) }}

{!! format_organization_info() !!}
{{ trans('crm.invoice_bill_to') }}:
{!! format_customer_info($invoice, 'invoice', 'billing', true) !!}
@if($invoice->include_shipping == 1 && $invoice->show_shipping_on_invoice == 1) {{ trans('crm.ship_to') }}:
{!! format_customer_info($invoice, 'invoice', 'shipping') !!}
@endif

{{ trans('crm.invoice_data_date') }} {{ local_date_format($invoice->date) }}

@if(!empty($invoice->duedate))

{{ trans('crm.invoice_data_duedate') }} {{ local_date_format($invoice->duedate) }}

@endif @if($invoice->sale_agent != 0 && get_option('show_sale_agent_on_invoices') == 1)

{{ trans('crm.sale_agent_string') }}: {{ get_staff_full_name($invoice->sale_agent) }}

@endif
@foreach($invoice->items as $item) @endforeach
# Item Qty Rate Amount
1 {{ $item->description }} {{ $item->qty }} {{ $item->rate }} {{ $item->qty * $item->rate }}
@if(count($invoice->payments) > 0 && get_option('show_total_paid_on_invoice') == 1) @endif @if(get_option('show_amount_due_on_invoice') == 1 && $invoice->status != \CRM\Support\Enum\InvoiceStatus::STATUS_CANCELLED) @endif
{{ trans('crm.invoice_subtotal') }} {{ app_format_money($invoice->subtotal, $invoice->currency) }}
{{ trans('crm.invoice_total') }} {{ app_format_money($invoice->total, $invoice->currency) }}
{{ trans('crm.invoice_total_paid') }} {{ '-' . app_format_money($invoice->paid, $invoice->currency) }}
{{ trans('crm.invoice_amount_due') }} {{ app_format_money($invoice->total_left_to_pay, $invoice->currency) }}
@if(!empty($invoice->clientnote))
{!! trans('crm.invoice_note') !!}

{!! $invoice->clientnote !!}
@endif @if(!empty($invoice->terms))

{!! trans('crm.terms_and_conditions') !!}

{!! $invoice->terms !!}
@endif

@if(count($invoice->payments) > 0)

{{ trans('crm.invoice_received_payments') }}

@foreach($invoice->payments as $payment) @endforeach
{{ trans('crm.invoice_payments_table_number_heading') }} {{ trans('crm.invoice_payments_table_mode_heading') }} {{ trans('crm.invoice_payments_table_date_heading') }} {{ trans('crm.invoice_payments_table_amount_heading') }}
{{ $payment['id'] }} {!! Form::open() !!} {!! Form::close() !!} {{ $payment['name'] }} {{ local_date_format($payment['date']) }} {{ app_format_money($payment['amount'], $invoice->currency) }}

@else
{{ trans('crm.invoice_no_payments_found') }}

@endif
{{--No payments for paid and cancelled--}} @if (($invoice->status != \CRM\Support\Enum\InvoiceStatus::STATUS_PAID && $invoice->status != \CRM\Support\Enum\InvoiceStatus::STATUS_CANCELLED && $invoice->total > 0))
@php $found_online_mode = false; @endphp @if(found_invoice_mode($payment_modes,$invoice->id,false)) @php $found_online_mode = true; @endphp

@lang('crm.invoice_html_online_payment')

{!! Form::open(['route' => '', 'id' => 'online_payment_form' , 'novalidate'=>true]) !!} @foreach($payment_modes as $mode) @if(!is_numeric($mode['id']) && !empty($mode['id']) && is_payment_mode_allowed_for_invoice($mode['id'],$invoice->id))
@if(!empty($mode['description']))
{!! $mode['description'] !!}
@endif @endif @endforeach
@if(get_option('allow_payment_amount_to_be_modified') == 1)
{{ $invoice->symbol }}
@else

{{ sprintf(trans('invoice_html_total_pay', app_format_money($invoice->total_left_to_pay, $invoice->currency_name))) }}

@endif
{!! Form::close() !!}
@endif @if(found_invoice_mode($payment_modes,$invoice->id))

Allowed Payment Modes

@foreach($payment_modes as $mode) @if(is_numeric($mode['id']) && is_payment_mode_allowed_for_invoice($mode['id'],$invoice->id))

- {{ $mode['name'] }}

@if(!empty($mode['description']))
{!! $mode['description'] !!}
@endif @endif @endforeach
@endif
@endif
@stop @section('scripts') @stop