@extends('layouts.invoicepayheader') @section('title') {{ __('Invoice') }} @endsection @section('title')
{{ __('Invoice') }} {{ '(' . $invoice->name . ')' }}
@endsection @push('css') @endpush @php if(isset($invoice)) { $payment_detail = Utility::getCompanyPaymentSetting($invoice->created_by); } elseif(\Auth::check()) { $payment_detail = Utility::getCompanyPaymentSetting(\Auth::user()->creatorId()); } @endphp @section('action-button') @if ($invoice->getDue($invoice->id) > 0) {{ __('Pay Now') }} @endif {{ __('Print') }} @endsection @section('content')
{{ __('Invoice ID') }}
{{ App\Models\User::invoiceNumberFormat($invoice->id) }}
{{ __('Invoice Date') }}
{{ App\Models\User::dateFormat($invoice->created_at) }}
{{ __(\App\Models\Invoice::$status[$invoice->status]) }}
{!! DNS2D::getBarcodeHTML( route('pay.invoice', \Illuminate\Support\Facades\Crypt::encrypt($invoice->id)),'QRCODE',2,2,) !!}
{{__('Project')}}
{{$invoice->project->title}}
{{__('Due Date')}}
{{\App\Models\Utility::getDateFormated($invoice->due_date)}}
{{__('Due Amount')}}
{{\App\Models\Utility::projectCurrencyFormat($invoice->project_id,$invoice->getDue(),true)}}

{{ __('Item List') }}
@php $totalQuantity = 0; $totalRate = 0; $totalAmount = 0; $totalTaxPrice = 0; $totalDiscount = 0; $taxesData = []; @endphp @foreach ($invoice->items as $invoiceitem) @php // $taxes=App\Models\Utility::tax($invoiceitem->tax); $totalQuantity += $invoiceitem->quantity; $totalRate += $invoiceitem->price; $totalDiscount += $invoiceitem->discount; if (!empty($taxes[0])) { foreach ($taxes as $taxe) { $taxDataPrice = App\Models\Utility::taxRate($taxe->rate, $invoiceitem->price, $invoiceitem->quantity); if (array_key_exists($taxe->tax_name, $taxesData)) { $taxesData[$taxe->tax_name] = $taxesData[$taxe->tax_name] + $taxDataPrice; } else { $taxesData[$taxe->tax_name] = $taxDataPrice; } } } @endphp @endforeach @foreach($invoice->items as $item) @endforeach @if (!empty($taxesData)) @foreach ($taxesData as $taxName => $taxPrice) @if ($taxName != 'No Tax') @endif @endforeach @endif
{{ __('Item') }} {{ __('Price') }} {{ __('Tax') }}
{{ $invoiceitem->item }} {{ App\Models\User::priceFormat($invoiceitem->price) }} {{ \App\Models\Utility::projectCurrencyFormat($invoice->project_id, $taxes, true) }}
{{ $item->item }} {{ App\Models\User::priceFormat($item->price) }} {{ App\Models\User::priceFormat($item->tax()) }}
  {{ __('Sub Total') }} {{ App\Models\User::priceFormat($invoice->getSubTotal()) }}
  {{ __('Discount') }} {{ App\Models\User::priceFormat($invoice->getTotalDiscount()) }}
{{ $taxName }} {{ App\Models\User::priceFormat($taxPrice) }}
  {{ __('Total') }} {{ App\Models\User::priceFormat($invoice->getTotal()) }}
{{ __('Total value') }}: {{ App\Models\User::priceFormat($invoice->getTotal()) }}
{{ __('From') }}
{{ __('Company Address') }}
{{ $left_address['address'] }}
{{ __('Company City') }}
{{ $left_address['city'] }}
{{ __('Company Country') }}
{{ $left_address['country'] }}
{{ __('Zip Code') }}
{{ $left_address['zipcode'] }}
{{ __('Company Contact') }}
{{ $left_address['telephone'] }}
{{ __('Billing Address') }}
{{ __('Billing Address') }}
{{ $left_address['address'] }}
{{ __('Billing City') }}
{{ $left_address['city'] }}
{{ __('Billing Country') }}
{{ $left_address['country'] }}
{{ __('Zip Code') }}
{{ $left_address['zipcode'] }}
{{ __('Billing Contact') }}
{{ !empty($left_address->contacts->name) ? $left_address->contacts->name : '--' }}
{{ __('Shipping Address') }}
{{ __('Shipping Address') }}
{{ $right_address['address'] }}
{{ __('Shipping City') }}
{{ $right_address['city'] }}
{{ __('Shipping Country') }}
{{ $right_address['country'] }}
{{ __('Zip Code') }}
{{ $right_address['zipcode'] }}
{{ __('Shipping Contact') }}
{{ !empty($invoice->contacts->name) ? $invoice->contacts->name : '--' }}

{{ __('Payment History') }}

@if($plan) @if($plan->storage_limit <= $total_storage && $plan->storage_limit != -1)
{{__('Note : Your plan storage limit is over , so you can not see customer uploaded payment receipt.')}}
@endif @endif
@php $i=0; @endphp @foreach ($invoice->payments as $payment) @endforeach @foreach($bankpayments as $bankpayment) @endforeach
{{ __('Transaction ID') }} {{ __('Payment Date') }} {{ __('Payment Type') }} {{ __('Receipt')}} {{ __('Note') }} {{ __('Amount') }}
{{ sprintf('%05d', $payment->transaction_id) }} {{ App\Models\User::dateFormat($payment->date) }} {{ $payment->payment_type }} {{'-'}} {{ !empty($payment->notes) ? $payment->notes : '-' }} {{ App\Models\User::priceFormat($payment->amount) }}
{{sprintf('%05d', $bankpayment->order_id)}} {{ App\Models\User::dateFormat($bankpayment->date) }} {{'Bank Transfer'}} @if($plan->storage_limit <= $total_storage != -1) @else {{'-'}} @endif {{(!empty($bankpayment->notes)) ? $bankpayment->notes : '-'}} {{\App\Models\Utility::projectCurrencyFormat($invoice->project_id,$bankpayment->amount,true)}}
@endsection @push('script') @if ($invoice->getDue() > 0 && isset($payment_detail['enable_stripe']) == 'on') @endif @if ($invoice->getDue() > 0 && isset($payment_detail['is_paystack_enabled']) && $payment_detail['is_paystack_enabled'] == 'on') @endif @if ($invoice->getDue() > 0 && isset($payment_detail['is_flutterwave_enabled']) && $payment_detail['is_flutterwave_enabled'] == 'on') @endif @if ($invoice->getDue() > 0 && isset($payment_detail['is_razorpay_enabled']) && $payment_detail['is_razorpay_enabled'] == 'on') @endif @endpush