@extends('layouts.app') @section('title', __('lang_v1.sell_payment_report')) @section('content')

{{ __('lang_v1.sell_payment_report') }}

@component('components.filters', ['title' => __('report.filters')]) {!! Form::open(['url' => 'reports/sell-payment-report', 'method' => 'get', 'id' => 'sell_payment_report_form']) !!}
{!! Form::label('customer_id', __('contact.customer') . ':') !!}
{!! Form::select( 'customer_id', $customers, !empty(request()->input('customer_id')) ? request()->input('customer_id') : null, [ 'class' => 'form-control select2', 'placeholder' => __('messages.all'), ], ) !!}
{!! Form::label('location_id', __('purchase.business_location') . ':') !!}
{!! Form::select( 'location_id', $business_locations, !empty(request()->input('location_id')) ? request()->input('location_id') : null, [ 'class' => 'form-control select2', 'placeholder' => __('messages.all'), ], ) !!}
{!! Form::label('payment_types', __('lang_v1.payment_method') . ':') !!}
{!! Form::select( 'payment_types', $payment_types, !empty(request()->input('payment_types')) ? request()->input('payment_types') : null, [ 'class' => 'form-control select2', 'placeholder' => __('messages.all'), ], ) !!}
{!! Form::label('customer_group_filter', __('lang_v1.customer_group') . ':') !!}
{!! Form::select( 'customer_group_filter', $customer_groups, !empty(request()->input('customer_group_filter')) ? request()->input('customer_group_filter') : null, ['class' => 'form-control select2'], ) !!}
{!! Form::label('spr_date_filter', __('report.date_range') . ':') !!} {!! Form::text('date_range', !empty(request()->input('date_range')) ? request()->input('date_range') : null, [ 'placeholder' => __('lang_v1.select_a_date_range'), 'class' => 'form-control', 'id' => 'spr_date_filter', 'readonly', ]) !!}
Reset
{!! Form::close() !!} @endcomponent
@component('components.widget', ['class' => 'box-primary'])
Show entries

@php $total_amount = 0; @endphp @foreach ($sell_payments as $sell_payment) @php $amount = $sell_payment->is_return == 1 ? -1 * $sell_payment->amount : $sell_payment->amount; $method = !empty($payment_types[$sell_payment->method]) ? $payment_types[$sell_payment->method] : ''; if ($sell_payment->method == 'cheque') { $method .= ' (' . __('lang_v1.cheque_no') . ': ' . $sell_payment->cheque_number . ')'; } elseif ($sell_payment->method == 'card') { $method .= ' (' . __('lang_v1.card_transaction_no') . ': ' . $sell_payment->card_transaction_number . ')'; } elseif ($sell_payment->method == 'bank_transfer') { $method .= ' (' . __('lang_v1.bank_account_no') . ': ' . $sell_payment->bank_account_number . ')'; } elseif ($sell_payment->method == 'custom_pay_1') { $method .= ' (' . __('lang_v1.transaction_no') . ': ' . $sell_payment->transaction_no . ')'; } elseif ($sell_payment->method == 'custom_pay_2') { $method .= ' (' . __('lang_v1.transaction_no') . ': ' . $sell_payment->transaction_no . ')'; } elseif ($sell_payment->method == 'custom_pay_3') { $method .= ' (' . __('lang_v1.transaction_no') . ': ' . $sell_payment->transaction_no . ')'; } if ($sell_payment->is_return == 1) { $method .= '
(' . __('lang_v1.change_return') . ')'; } $total_amount += $amount; @endphp @endforeach
  @lang('purchase.ref_no') @lang('lang_v1.paid_on') @lang('sale.amount') @lang('contact.customer') @lang('lang_v1.customer_group') @lang('lang_v1.payment_method') @lang('sale.sale') @lang('Asignee') @lang('messages.action')
{{ $sell_payment->payment_ref_no }} {{ @format_datetime($sell_payment->paid_on) }} {{ $sell_payment->customer_supplier_business_name }} {{ $sell_payment->customer }} {{ $sell_payment->customer_group }} {{ $method }} @if (!empty($sell_payment->transaction_id)) {{ $sell_payment->invoice_no }} @endif @if (!empty($sell_payment->username)) {{ $sell_payment->first_name }} {{ $sell_payment->last_name }} @else - @endif @if (!empty($sell_payment->document)) @lang('purchase.download_document') @endif
Showing {{ $sell_payments->firstItem() }} to {{ $sell_payments->lastItem() }} of {{ $sell_payments->total() }} entries
{{ $sell_payments->appends(request()->input())->links() }}
@endcomponent
@endsection @section('javascript') @include('report.partials.report_javascrpt') @endsection