@php use Carbon\Carbon; $subdomain = request()->route()->parameter('subdomain'); $is_student = app(\Hyn\Tenancy\Repositories\HostnameRepository::class)->findByHostname($subdomain)->website->company->is_student; @endphp @extends('sales::layouts.exporting.print.master-local-style') @section('title', __('sales::customer_receipts.Customer Receipts')) @if ($is_student) @section('custom-pdf') @endsection @endif @section('koolreport') @foreach($customerPaymentReceipts as $customerPaymentReceipt)
getLocale() == 'en') style="position: relative; direction:ltr;" @else style="position: relative; direction:rtl;" @endif>
{{__('sales::customer_receipts.Reference ID')}} :
{{isset($customerPaymentReceipt)? $customerPaymentReceipt->reference : $formDesign->reference}}
{{__('sales::customer_receipts.Payment Date')}} :
{{isset($customerPaymentReceipt)? $customerPaymentReceipt->formatDate($customerPaymentReceipt->date) : ".................."}}
{{__('sales::customer_receipts.Customer')}} :
{{isset($customerPaymentReceipt)? $customerPaymentReceipt->customer->name : ".................."}}
@lang('sales::customer_receipts.Amount') :
{{ isset($customerPaymentReceipt)? (($customerPaymentReceipt->paid_amount < 0 ) ? '(' . abs($customerPaymentReceipt->paid_amount ) . ')' : $customerPaymentReceipt->paid_amount) : ".................." }}
{{__('sales::customer_receipts.Payment Account')}} :
{{isset($customerPaymentReceipt)? $customerPaymentReceipt->account->name : ".................."}}
{{__('sales::customer_receipts.Kind')}} :
{{isset($customerPaymentReceipt)? Modules\Purchases\Enums\PaymentReceiptTypesEnum::toString($customerPaymentReceipt->kind) : ".................."}}
{{__('products::cost_center.Cost Center')}} :
@if(isset($customerPaymentReceipt))
{{$costCenter?$costCenter['code'] . ' - ' . $costCenter['name_' . app()->getLocale()]: __('products::cost_center.main center') }}
@else
..................
@endif
{{__('sales::customer_receipts.Description')}} :
{{ isset($customerPaymentReceipt)? $customerPaymentReceipt->description : ".................." }}
@if(isset($customerPaymentReceipt)) @if(count($customerPaymentReceipt->invoicesPayments)) @if($customerPaymentReceipt->kind == Modules\Purchases\Enums\PaymentReceiptTypesEnum::PAID) @php $permission = 'sales.invoice-returns.view'; @endphp @elseif($customerPaymentReceipt->kind == Modules\Purchases\Enums\PaymentReceiptTypesEnum::RECEIVED) @php $permission = 'sales.invoices.view'; @endphp @endif @can($permission)

@lang('sales::customer_receipts.Assigned Bills')

@if($customerPaymentReceipt->kind == Modules\Purchases\Enums\PaymentReceiptTypesEnum::PAID) @elseif($customerPaymentReceipt->kind == Modules\Purchases\Enums\PaymentReceiptTypesEnum::RECEIVED) @endif @foreach($customerPaymentReceipt->invoicesPayments as $payment) @endforeach
@lang('sales::invoice_returns.Reference ID') @lang('sales::invoice_returns.Amount')@lang('sales::invoices.Reference ID') @lang('sales::invoices.Amount')
{{$payment->invoice->reference}} {{$payment->allocated_amount}}
@endcan @endif @else

@lang('sales::customer_receipts.Assigned Bills')

@lang('sales::invoices.Reference ID') @lang('sales::invoices.Amount')
@endif
@if($formDesign->bank_name || $formDesign->account_name || $formDesign->iban)

{{ __('settings::forms_design.payment_information')}} :

@if($formDesign->bank_name)
{{ __('sales::estimates.bank_name')}} :
{{$formDesign->bank_name}}
@endif @if($formDesign->account_name)
{{__('settings::forms_design.account_name')}} :
{{$formDesign->account_name}}
@endif @if($formDesign->iban)
{{__('settings::forms_design.iban')}} :
{{$formDesign->iban}}
@endif @endif
@php $notes= (isset($customerPaymentReceipt) && $customerPaymentReceipt->notes) ? $customerPaymentReceipt->notes : $formDesign->notes ; $notes = filterImageTag($notes); @endphp @if( $formDesign->print_notes && !empty($notes))

{{ __('sales::customer_receipts.notes') }} :

{!! $notes !!}

@endif
@php $terms= isset($customerPaymentReceipt) && $customerPaymentReceipt->terms ? $customerPaymentReceipt->terms : $formDesign->terms; $terms = filterImageTag($terms); @endphp @if(!is_null($terms))

{{ __('sales::customer_receipts.terms_and_condition') }}

{!! $terms !!}

@endif
@if($formDesign->printing_language == \Modules\Settings\Enums\PrintingLanguagesEnum::BOTH_ENGLISH_ARABIC)