<<<<<<< HEAD @extends('admin.admin_dashboard') ======= @php use App\Support\GrnGradeCatalog; use App\Support\PaymentVoucherModes; $mode = $mode ?? PaymentVoucherModes::resolve(request('mode')); $voucherMode = $voucherMode ?? PaymentVoucherModes::get($mode); $voucherModes = $voucherModes ?? PaymentVoucherModes::all(); $gradeCatalog = $gradeCatalog ?? GrnGradeCatalog::all(); $saveVoucherRoute = route(PaymentVoucherModes::saveRouteName($mode)); @endphp @extends('admin.payment_voucher_layout') @section('voucher_toolbar')
Batch desk @include('admin.hope_coffee.green_bean.partials.payment-voucher-mode-bar')
@if($voucherMode['show_fml_modal'] ?? true) @endif @if($voucherMode['prices_editable'] ?? false) @endif @if($voucherMode['show_grading_modal'] ?? false) @endif
@endsection >>>>>>> origin/main @section('admin') <<<<<<< HEAD {{-- SweetAlert2 --}} {{-- A) Hard β€œinsufficient funds” error --}} @if($errors->has('balance')) @endif {{-- B) Overdraft *confirmation* --}} @if(session('overdraft_confirm')) @endif
======= @if(!empty($existingVoucher))
Voucher already saved for GRN #{{ $grn->id }}. Only one payment voucher is allowed per GRN. @if(Route::has('all.payment.vouchers')) View existing voucher @endif or request a rollback before creating another.
@endif @if(!empty($requiresGradedPurchase))
Graded coffee on this GRN. @php $gradeLabels = collect($activeGrades ?? []) ->map(fn ($qty, $field) => (GrnGradeCatalog::all()[$field]['label'] ?? $field).': '.number_format($qty, 0).' kg') ->values() ->implode(' Β· '); @endphp {{ $gradeLabels }}. Use Graded voucher to pay purchase prices, or Processing fees only to charge hulling, sacks{{ PaymentVoucherModes::grnHasScreenGrades($grn) ? ', and grading' : '' }} without coffee payment.
@endif @if(!empty($voucherMode['zero_purchase_prices']))
Processing fees only. {{ $voucherMode['description'] ?? 'Unit prices are zero β€” only processing deductions apply.' }} Net pay may be negative if the farmer owes fees.
@endif
>>>>>>> origin/main
<<<<<<< HEAD Company Logo ======= Company Logo >>>>>>> origin/main

HOPE COFFEE UGANDA

P.O Box 81 KYOTERA

SSANJE, KABANO

Farmer's Photo ======= class="chm-voucher-farmer-photo border border-2 border-coffee shadow-sm mb-2" loading="lazy" decoding="async" fetchpriority="low"> >>>>>>> origin/main
{{ \Carbon\Carbon::now()->format('l, F j, Y') }}

🌐 Website: www.hopecoffeeuganda.com | βœ‰οΈ Email: info@hopecoffeeuganda.com | πŸ“ž Contact: +256 706 058246

<<<<<<< HEAD Farmer Payment Voucher ======= {{ $voucherMode['title'] ?? 'Farmer Payment Voucher' }} >>>>>>> origin/main

Farmer Name: {{ $grn->farmer->farmer_fname }} {{ $grn->farmer->farmer_lname }}

Phone Number: {{ $grn->farmer->farmer_contact }}

Farmer Group: {{ $grn->farmer->group->group_name ?? 'N/A' }}

Gender: {{ $grn->farmer->farmer_gender }}

Farmer Village: {{ $grn->farmer->farmer_village ?? 'N/A' }}

Age: {{ \Carbon\Carbon::parse($grn->farmer->d_o_b)->age }}

Kibooko (Kgs): {{ $grn->kiboko }}

EUDR : {{ $grn->farmer->EUDR }}

Voucher No.: {{ $grn->id }}

<<<<<<< HEAD
@csrf ======= @csrf @if($voucherMode['require_mc_deduction'] ?? false) @else @endif >>>>>>> origin/main
<<<<<<< HEAD @php // Map database field names to display labels $grades = [ 'ungraded' => 'Ungraded', 'grade_1800' => 'Grade 18', 'grade_1700' => 'Grade 17', 'grade_1500' => 'Grade 15', 'grade_1200' => 'Grade 12', 'grade_1199' => 'Grade 1199' ]; @endphp @foreach($grades as $dbField => $displayLabel) ======= @php $gradeFields = array_keys($gradeCatalog); @endphp @foreach($gradeCatalog as $dbField => $meta) @php $qtyVal = (float) old($dbField, $grn->$dbField ?? 0); $zeroPrices = !empty($voucherMode['zero_purchase_prices']); $pricesEditable = !empty($voucherMode['prices_editable']) && ! $zeroPrices; $priceLocked = $zeroPrices || ! $pricesEditable || $qtyVal <= 0; $priceValue = ($zeroPrices || $qtyVal <= 0) ? '0' : old('unit_price_' . $dbField, $pricesEditable ? '' : number_format($gradePrices[$dbField] ?? 0, 0, '.', ',')); @endphp >>>>>>> origin/main @endforeach <<<<<<< HEAD ======= >>>>>>> origin/main <<<<<<< HEAD ======= >>>>>>> origin/main <<<<<<< HEAD ======= >>>>>>> origin/main
Grade Quantity (Kgs) Unit Price (UGX) Amount (UGX)
{{ $displayLabel }}
{{ $meta['label'] }}
Total Quantity (Kgs)
Sacks 1/100kg Subtotal
MC (Amazzi)
FAQ (Kase) Grading (Okusunsula) 80/kgGrading (Okusunsula) 80/kg
MC Kgs Ded Hulling (Okukuba) 200/kg
<<<<<<< HEAD ======= @if($voucherMode['show_mc_button'] ?? true) @endif >>>>>>> origin/main Sacks (Obukutiya)
Transport (Entambula) Transport (Entambula)
Posts to Farmers' Transport Contribution
>>>>>> origin/main >
Advance (Ebbanja)
Tarpaulin (Ettundubaali)
Total Deductions
NET PAY UGX
Farmers Name: {{ strtoupper($grn->farmer->farmer_fname) }} {{ strtoupper($grn->farmer->farmer_lname) }}
Signature:
Date:
Official Use Only
AUTHORISATION TO DEBIT 'HOPE COFFEE UGANDA ACCOUNT' NO. 2009000227
You are hereby authorized and directed to debit our Account by the amount of UGX to Account Number
Prepared By:
{{ strtoupper(auth()->user()->name) }}
@if(auth()->user()->sign) User Signature @endif
Approved By:
Hope Coffee Signatories
1. 2.

Generated by Celebrate Hope Ministries Enterprise Resource Planning System (CHM ERP)

<<<<<<< HEAD
<<<<<<< HEAD ======= @push('scripts') @endpush >>>>>>> origin/main
<<<<<<< HEAD ======= @include('admin.hope_coffee.green_bean.partials.payment-voucher-mc-deduction-modal') @include('admin.hope_coffee.green_bean.partials.payment-voucher-daily-prices') >>>>>>> origin/main <<<<<<< HEAD ======= @if($voucherMode['show_grading_modal'] ?? false) @endif >>>>>>> origin/main <<<<<<< HEAD @if (session('message')) @endif ======= return; } Swal.fire({ icon: 'success', title: 'Signature saved!', text: 'Your signature has been saved successfully.', }); } document.addEventListener('DOMContentLoaded', function () { const modalEl = document.getElementById('signatureModal'); if (!modalEl) { return; } modalEl.addEventListener('show.bs.modal', function () { if (window.__chmSignaturePadLoaded) { ensureSignaturePad(); return; } const script = document.createElement('script'); script.src = 'https://cdnjs.cloudflare.com/ajax/libs/signature_pad/2.3.2/signature_pad.min.js'; script.onload = function () { window.__chmSignaturePadLoaded = true; ensureSignaturePad(); }; document.body.appendChild(script); }, { once: false }); }); >>>>>>> origin/main @endsection