@extends('layouts.app')
@section('title', 'إشعار مديونية جديد - '.config('app.name'))
@section('breadcrumb')
الرئيسية
›
المحاسبة
›
إشعارات المديونية
›
إشعار جديد
@endsection
@section('content')
@php
$debitNoteSupplierOptions = $suppliers->map(fn ($supplier) => [
'value' => $supplier->id,
'label' => trim((string) ($supplier->code ?? '').' - '.(string) ($supplier->name ?? '')),
])->all();
$debitNoteReasonTypeOpts = [
['value' => 'مرتجع مشتريات', 'label' => 'مرتجع مشتريات'],
['value' => 'خصم مورد', 'label' => 'خصم مورد'],
['value' => 'تسوية سعر', 'label' => 'تسوية سعر'],
['value' => 'أخرى', 'label' => 'أخرى'],
];
@endphp
@endsection
@php
$debitLineDefaults = old('lines', [
['description' => '', 'quantity' => 1, 'unit_price' => 0, 'tax_percent' => $defaultVatPercent],
]);
@endphp
@push('scripts')
@include('finance.partials.note-line-items-script', [
'tableBodyId' => 'debit-note-lines',
'addButtonId' => 'debit-add-line-btn',
'subtotalId' => 'debit-subtotal-text',
'taxId' => 'debit-tax-text',
'grandTotalId' => 'debit-grand-total-text',
'partySelectId' => 'supplier_id',
'invoiceSelectId' => 'purchase_invoice_id',
'invoicePartyAttr' => 'data-supplier-id',
'currencyLabel' => 'SAR',
'lineDefaults' => $debitLineDefaults,
'defaultVatJs' => (float) $defaultVatPercent,
])
@endpush