@extends('layouts.admin') @section('page-title') {{ __('Invoices') }} @endsection @section('links') @if (\Auth::guard('client')->check()) @else @endif @if (\Auth::guard('client')->check()) @else @endif @endsection @push('scripts') @endpush @section('action-button') @auth('client') @if ($invoice->getDueAmount() > 0) @if ( $currentWorkspace->is_stripe_enabled == 1 || $currentWorkspace->is_paypal_enabled == 1 || (isset($paymentSetting['is_bank_enabled']) && $paymentSetting['is_bank_enabled'] == 'on') || (isset($paymentSetting['is_paystack_enabled']) && $paymentSetting['is_paystack_enabled'] == 'on') || (isset($paymentSetting['is_flutterwave_enabled']) && $paymentSetting['is_flutterwave_enabled'] == 'on') || (isset($paymentSetting['is_razorpay_enabled']) && $paymentSetting['is_razorpay_enabled'] == 'on') || (isset($paymentSetting['is_mercado_enabled']) && $paymentSetting['is_mercado_enabled'] == 'on') || (isset($paymentSetting['is_paytm_enabled']) && $paymentSetting['is_paytm_enabled'] == 'on') || (isset($paymentSetting['is_mollie_enabled']) && $paymentSetting['is_mollie_enabled'] == 'on') || (isset($paymentSetting['is_skrill_enabled']) && $paymentSetting['is_skrill_enabled'] == 'on') || (isset($paymentSetting['is_coingate_enabled']) && $paymentSetting['is_coingate_enabled'] == 'on') || (isset($paymentSetting['is_paymentwall_enabled']) && $paymentSetting['is_paymentwall_enabled'] == 'on') || (isset($paymentSetting['is_toyyibpay_enabled']) && $paymentSetting['is_toyyibpay_enabled'] == 'on') || (isset($paymentSetting['is_payfast_enabled']) && $paymentSetting['is_payfast_enabled'] == 'on') || (isset($paymentSetting['is_iyzipay_enabled']) && $paymentSetting['is_iyzipay_enabled'] == 'on') || (isset($paymentSetting['is_sspay_enabled']) && $paymentSetting['is_sspay_enabled'] == 'on') || (isset($paymentSetting['is_paytab_enabled']) && $paymentSetting['is_paytab_enabled'] == 'on') || (isset($paymentSetting['is_benefit_enabled']) && $paymentSetting['is_benefit_enabled'] == 'on') || (isset($paymentSetting['is_cashfree_enabled']) && $paymentSetting['is_cashfree_enabled'] == 'on') || (isset($paymentSetting['is_aamarpay_enabled']) && $paymentSetting['is_aamarpay_enabled'] == 'on') || (isset($paymentSetting['is_paytr_enabled']) && $paymentSetting['is_paytr_enabled'] == 'on') || (isset($paymentSetting['is_midtrans_enabled']) && $paymentSetting['is_midtrans_enabled'] == 'on') || (isset($paymentSetting['is_xendit_enabled']) && $paymentSetting['is_xendit_enabled'] == 'on') || (isset($paymentSetting['is_yookassa_enabled']) && $paymentSetting['is_yookassa_enabled'] == 'on') || (isset($paymentSetting['is_paiementpro_enabled']) && $paymentSetting['is_paiementpro_enabled'] == 'on') || (isset($paymentSetting['is_nepalste_enabled']) && $paymentSetting['is_nepalste_enabled'] == 'on') || (isset($paymentSetting['is_cinetpay_enabled']) && $paymentSetting['is_cinetpay_enabled'] == 'on') || (isset($paymentSetting['is_fedapay_enabled']) && $paymentSetting['is_fedapay_enabled'] == 'on') || (isset($paymentSetting['is_payhere_enabled']) && $paymentSetting['is_payhere_enabled'] == 'on') || (isset($paymentSetting['is_powertranz_enabled']) && $paymentSetting['is_powertranz_enabled'] == 'on') || (isset($paymentSetting['is_payu_enabled']) && $paymentSetting['is_payu_enabled'] == 'on')) $ @endif @endif @endauth @auth('web') @if ($currentWorkspace->creater->id == Auth::user()->id) @endif @endauth @auth('web') @if ($currentWorkspace->creater->id == Auth::user()->id) @if ($invoice->getDueAmount() > 0) @endif @endif @endauth @endsection @section('content')
{{ App\Models\Utility::invoiceNumberFormat($invoice->invoice_id) }}
{{ __('From') }}:
@if ($currentWorkspace->company)
{{ $currentWorkspace->company }}
@endif @if ($currentWorkspace->address) {{ $currentWorkspace->address }},
@endif @if ($currentWorkspace->city) {{ $currentWorkspace->city }}, @endif @if ($currentWorkspace->state) {{ $currentWorkspace->state }}, @endif @if ($currentWorkspace->zipcode) {{ $currentWorkspace->zipcode }},
@endif @if ($currentWorkspace->country) {{ $currentWorkspace->country }},
@endif @if ($currentWorkspace->telephone) {{ $currentWorkspace->telephone }} @endif
{{ __('To') }}:
@if ($invoice->client)
{{ $invoice->client->name }}
{{ $invoice->client->email }}
@if ($invoice->client) @if ($invoice->client->address) {{ $invoice->client->address }},
@endif @if ($invoice->client->city) {{ $invoice->client->city }}, @endif @if ($invoice->client->state) {{ $invoice->client->state }}, @endif @if ($invoice->client->zipcode) {{ $invoice->client->zipcode }},
@endif @if ($invoice->client->country) {{ $invoice->client->country }},
@endif @if ($invoice->client->telephone) {{ $invoice->client->telephone }} @endif @endif @endif
{{ __('Description') }} :
@if ($invoice->status == 'sent') @elseif($invoice->status == 'paid') @elseif($invoice->status == 'partialy paid') @elseif($invoice->status == 'canceled') @endif
{{ __('Project') }} : {{ $invoice->project->name }}
{{ __('Issue Date') }} :{{ App\Models\Utility::dateFormat($invoice->issue_date) }}
{{ __('Status') }} : {{ __('Sent') }} {{ __('Status') }} : {{ __('Paid') }} {{ __('Status') }} : {{ __('Partialy Paid') }} {{ __('Status') }} : {{ __('Canceled') }}
{{ __('Due Date') }}: {{ App\Models\Utility::dateFormat($invoice->due_date) }}
@if ($currentWorkspace->qr_display == 'on')
{!! DNS2D::getBarcodeHTML( route('pay.invoice', [$currentWorkspace->slug, \Illuminate\Support\Facades\Crypt::encrypt($invoice->id)]), 'QRCODE', 2, 2, ) !!}
@endif
{{ __('Order Summary') }}
@auth('web') @if ($currentWorkspace->creater->id == Auth::user()->id) @endif @endauth
@auth('web') @endauth @foreach ($invoice->items as $key => $item) @auth('web') @endauth @endforeach
# {{ __('Item') }} {{ __('Totals') }}{{ __('Action') }}
{{ $key + 1 }} {{ $item->task ? $item->task->title : '' }}- {{ $item->task->invoiceproject->name ?? '' }} {{ $currentWorkspace->priceFormat($item->price * $item->qty) }}
@if ($invoice->discount) @endif @if ($invoice->tax) @endif
{{ __('Subtotal') }} : {{ $currentWorkspace->priceFormat($invoice->getSubTotal()) }}
{{ __('Discount') }} : {{ $currentWorkspace->priceFormat($invoice->discount) }}
{{ __('Tax') }}{{ $invoice->tax->name }}({{ $invoice->tax->rate }}%): {{ $currentWorkspace->priceFormat($invoice->getTaxTotal()) }}
{{ __('Total') }} : {{ $currentWorkspace->priceFormat($invoice->getTotal()) }}
{{ __('Due Amount') }} : {{ $currentWorkspace->priceFormat($invoice->getDueAmount()) }}
@php $payments = App\Models\InvoicePayment::where('invoice_id', $invoice->id) ->orderBy('updated_at', 'DESC') ->get(); @endphp @if ($payments)
{{ __('Payments') }}
@if (Auth::user()->type == 'user' && $currentWorkspace->creater->id == Auth::user()->id) @endif @foreach ($payments as $key => $payment) @if (Auth::user()->type == 'user' && $currentWorkspace->creater->id == Auth::user()->id) @endif @endforeach
# {{ __('Id') }} {{ __('Amount') }} {{ __('Currency') }} {{ __('Status') }} {{ __('Payment Type') }} {{ __('Date') }} {{ __('Receipt') }}{{ __('Action') }}
{{ $key + 1 }} {{ $payment->order_id }} {{ $currentWorkspace->priceFormat($payment->amount) }} {{ strtoupper($payment->currency) }} @if ($payment->payment_status == 'succeeded' || $payment->payment_status == 'approved') {{ __(ucfirst($payment->payment_status)) }} @else {{ __(ucfirst($payment->payment_status)) }} @endif {{ __($payment->payment_type) }} {{ App\Models\Utility::dateFormat($payment->created_at) }} @if (!empty($payment->receipt)) {{ __('Receipt') }} @endif @if ($payment->payment_type == 'Bank Transfer' && $payment->payment_status == 'pending') @endif {!! Form::open([ 'method' => 'DELETE', 'route' => ['invoice.payments.destroy', $payment->id], 'id' => 'delete-form-' . $payment->id, ]) !!} {!! Form::close() !!}
@endif
@if (auth('web') && $invoice->getDueAmount() > 0) @endif @auth('client') @if ($invoice->getDueAmount() > 0) @endif @endauth @endsection @auth('client') @if ( ($invoice->getDueAmount() > 0 && $currentWorkspace->is_stripe_enabled == 1) || $currentWorkspace->is_paypal_enabled == 1 || (isset($paymentSetting['is_paypal_enabled']) && $paymentSetting['is_paypal_enabled'] == 'on') || (isset($paymentSetting['is_paystack_enabled']) && $paymentSetting['is_paystack_enabled'] == 'on') || (isset($paymentSetting['is_flutterwave_enabled']) && $paymentSetting['is_flutterwave_enabled'] == 'on') || (isset($paymentSetting['is_razorpay_enabled']) && $paymentSetting['is_razorpay_enabled'] == 'on') || (isset($paymentSetting['is_mercado_enabled']) && $paymentSetting['is_mercado_enabled'] == 'on') || (isset($paymentSetting['is_paytm_enabled']) && $paymentSetting['is_paytm_enabled'] == 'on') || (isset($paymentSetting['is_mollie_enabled']) && $paymentSetting['is_mollie_enabled'] == 'on') || (isset($paymentSetting['is_skrill_enabled']) && $paymentSetting['is_skrill_enabled'] == 'on') || (isset($paymentSetting['is_coingate_enabled']) && $paymentSetting['is_coingate_enabled'] == 'on') || (isset($paymentSetting['is_toyyibpay_enabled']) && $paymentSetting['is_toyyibpay_enabled'] == 'on')) @push('css-page') @endpush @push('scripts') @if ($currentWorkspace->is_stripe_enabled == 1) @endif {{-- @if (isset($paymentSetting['is_paystack_enabled']) && $paymentSetting['is_paystack_enabled'] == 'on') @endif --}} @if (isset($paymentSetting['is_paystack_enabled']) && $paymentSetting['is_paystack_enabled'] == 'on') @endif {{-- @if (isset($paymentSetting['is_flutterwave_enabled']) && $paymentSetting['is_flutterwave_enabled'] == 'on') @endif --}} @if (isset($paymentSetting['is_flutterwave_enabled']) && $paymentSetting['is_flutterwave_enabled'] == 'on') @endif {{-- @if (isset($paymentSetting['is_razorpay_enabled']) && $paymentSetting['is_razorpay_enabled'] == 'on') @endif --}} @if (isset($paymentSetting['is_razorpay_enabled']) && $paymentSetting['is_razorpay_enabled'] == 'on') @endif @endpush @endif @endauth