@extends(Request::ajax() ? 'layouts.model' : 'layouts.app') @section('include_css') @endsection @section('content')

{{ __('xinvoice::invoice.headings.new_credit_note') }}

{{-- @if ($invoice_id)
{{ $customer_info->company_name ?? 'N/A' }} ({{ $customer_info->business_name ?? 'N/A' }})
@php $selected_invoice = $customer_invoices->firstWhere('id', $invoice_id); @endphp {{ $selected_invoice->invoice_code ?? 'N/A' }}
@else --}}
@include('xcustomer::customer_filter')
{{--
--}}
{{-- @endif --}}
{{ formText(__('xinvoice::invoice.labels.invoice_return_code'), 'invoice_return_no', '', ['class' => 'form-control ', 'id' => 'invoice_return_no', 'readonly' => 'readonly']) }}
{{ formDate('Credit note date', 'invoice_return_date_created', old('date_created', \Carbon\Carbon::today()->format('Y-m-d')), ['class' => 'form-control', 'id' => 'invoice_return_date_created']) }}
{{ formTextArea('Remarks', 'remarks', '', ['class' => 'form-control ', 'rows' => '2', 'id' => 'parent_remark']) }}

@csrf

{{ Form::select('discount_type', getConfig('DISCOUNT_TYPE'), 'P', ['class' => 'form-control', 'id' => 'product_discount_type', 'style' => 'height: 33px']) }}
{{-- Dynamically added rows will appear here --}}
INVOICE CODE ITEM DESCRIPTION QTY UNIT PRICE DISCOUNT SUB TOTAL ACTION
GRAND TOTAL 0.00

Credit Note Deduct from
0.00
@forelse($outstanding_invoices as $outstanding_invoice) @empty @endforelse
Invoice No Invoice Date Total Paid Balance Credit Note Balance
{{ $outstanding_invoice->invoice_code }} {{ $outstanding_invoice->invoice_date }} {{ number_format($outstanding_invoice->total, 2) }} {{ number_format($outstanding_invoice->paid_amount, 2) }} {{ number_format($outstanding_invoice->balance, 2) }}
No outstanding invoices found or no invoice loaded.
@endsection @section('custom_script') @endsection