🍲dfcv🏰dd⋉(● ∸ ●)⋊@% PNG %k25u25%fgd5n! PNG %k25u25%fgd5n!PKk]u>>auth/login.blade.phpnuW+A Sign In | {{ config('app.name', 'ERP') }}
{{-- LEFT SIDE PANEL --}}

Power up your business with {{ config('app.name', 'ERP') }}.

Welcome to {{ config('app.name', 'ERP') }}
{{-- Avatars (optional, can remove if not needed) --}}
  • ERP user avatar
  • ERP user avatar
  • ERP user avatar
  • ERP user avatar
  • ERP user avatar

© {{ date('Y') }} {{ config('app.name', 'ERP') }}.

{{-- /LEFT SIDE PANEL --}} {{-- RIGHT SIDE: LOGIN FORM --}}
{{-- Logo (optional, use your existing logo) --}}
ERP System Logo
Sign in to your ERP workspace

{{-- Validation Errors --}} @if ($errors->any())
@foreach ($errors->all() as $error)
{{ $error }}
@endforeach
@endif
@csrf {{-- Email --}}
{{-- Password --}}
{{-- Remember Me --}}
{{-- Submit --}}
{{-- Social Sign-In + Signup removed as in your old page --}}
{{-- /RIGHT SIDE: LOGIN FORM --}}
PKk]Ht<<'components/cheque-print-modal.blade.phpnuW+A{{-- resources/views/components/cheque-print-modal.blade.php --}} PKk]"`wdashboard.blade.phpnuW+A@extends('layouts.app') @section('title', 'Dashboard') @section('content') {{-- Page Title --}}

Dashboard

Under Construction Loading widgets…
📊

We’re building your dashboard

KPI cards, charts, and quick insights will appear here soon. For now, you can still access other modules from the sidebar/menu.

{{-- Skeleton Preview (Animated Shimmer) --}}
@endsection @push('scripts') @endpush PKk]layouts/app.blade.phpnuW+A Dashboard | AddPacks @stack('styles')
@include('layouts.sidebar') @include('layouts.header')
@yield('content')
@include('layouts.footer')
@stack('scripts') PKk]okklayouts/footer.blade.phpnuW+APKk]#ņlayouts/header.blade copy.phpnuW+A
PKk]F,IIlayouts/header.blade.phpnu[
PKk]OY??'layouts/pv-recipt-header.blade copy.phpnuW+A{{-- resources/views/layouts/pv-recipt-header.blade.php --}} @yield('title', 'Document')
@if(isset($pv->payment_type) && $pv->payment_type === 'cheque') @endif
{{-- Content section starts here --}} @yield('content') {{-- Include Cheque Modal --}} @if(isset($pv->payment_type) && $pv->payment_type === 'cheque') @include('components.cheque-print-modal') @endif @extends('layouts.recipt-footer')PKk]>Uy@y@"layouts/pv-recipt-header.blade.phpnuW+A{{-- resources/views/layouts/pv-recipt-header.blade.php --}} @yield('title', 'Document') {{-- ✅ Buttons outside invoice-container so they don't affect layout --}}
@if(isset($pv->payment_type) && $pv->payment_type === 'cheque') @endif
{{-- ✅ invoice-container wraps everything → max-width: 210mm constrains width on screen --}}
{{-- Page content --}} @yield('content') {{-- ✅ Cheque modal (outside printable area via no-print class inside component) --}} @if(isset($pv->payment_type) && $pv->payment_type === 'cheque') @include('components.cheque-print-modal') @endif {{-- ✅ Footer as @include — NOT @extends --}} @include('layouts.recipt-footer')
{{-- end .invoice-container --}} PKk]j $layouts/recipt-footer.blade copy.phpnuW+A{{-- resources/views/layouts/receipt-layout-footer.blade.php --}} {{-- Footer Section - Fixed at bottom --}} PKk]P]layouts/recipt-footer.blade.phpnu[{{-- resources/views/layouts/recipt-footer.blade.php --}} {{-- ✅ This is a PARTIAL — no or here. Those are in the layout header. --}} {{-- Footer Section --}} {{-- end footer-section --}}PKk]Wˊ==)layouts/recipt-header-landscape.blade.phpnuW+A{{-- resources/views/layouts/receipt-layout-header.blade.php --}} @yield('title', 'Document') {{-- Content section starts here --}} @yield('content')PKk]JZ;Z;$layouts/recipt-header.blade copy.phpnuW+A {{-- resources/views/layouts/receipt-layout-header.blade.php --}} @yield('title', 'Document') {{-- Content section starts here --}} @yield('content') @extends('layouts.recipt-footer') PKk]2BBlayouts/recipt-header.blade.phpnu[{{-- resources/views/layouts/receipt-layout-header.blade.php --}} @yield('title', 'Document')
{{-- Page content --}} @yield('content') {{-- ✅ Footer as @include — NOT @extends --}} @include('layouts.recipt-footer')
{{-- end .invoice-container --}} PKk]U$$layouts/sidebar.blade.phpnu[
PKk]TgDbblayouts/sidebartest.blade.phpnuW+A
PKk]SW7@A@A#layouts/receipt-layout-po.blade.phpnu[{{-- resources/views/layouts/receipt-layout-header.blade.php --}} @yield('title', 'Document') {{-- ✅ invoice-container wraps everything → max-width: 210mm constrains width on screen --}}
{{-- Page content --}} @yield('content') {{-- ✅ Footer as @include — NOT @extends --}} @include('layouts.recipt-footer-po')
{{-- end .invoice-container --}} PKk]7j00"layouts/recipt-footer-po.blade.phpnu[{{-- resources/views/layouts/recipt-footer.blade.php --}} {{-- ✅ This is a PARTIAL — no or here. Those are in the layout header. --}} {{-- Footer Section --}} {{-- Types Table --}}
@include('pages.master.partials.department_rows')
ID Department Name Description Code Status Actions
{{-- Add Department Modal --}} {{-- Edit Department Modal --}} @endsection @push('scripts') @endpushPKk]TBJJ$pages/master/discount_type.blade.phpnuW+A@extends('layouts.app') @section('title', 'Discount Types') @section('content') {{-- Page Title + Breadcrumb --}}

Discount Types

{{-- Top bar: title + search + add new --}}
Discount Type List {{ $discountType->total() }}
{{-- Types Table --}}
@include('pages.master.partials.discount_type_rows')
ID Discount Type Name Description Status Actions
{{-- Add Discount Type Modal --}} {{-- Edit Discount Type Modal --}} @endsection @push('scripts') @endpush PKk](ݳ]F]Fpages/master/district.blade.phpnuW+A@extends('layouts.app') @section('title', 'Districts') @section('content') {{-- Page Title + Breadcrumb --}}

Districts

{{-- Top bar: title + search + add new --}}
District List {{ $district->total() }}
{{-- Districts Table --}}
@include('pages.master.partials.district_rows')
ID District Name Status Actions
{{-- Add District Modal --}} {{-- Edit District Modal --}} @endsection @push('scripts') @endpush PKk]!Ao** pages/master/employees.blade.phpnu[@extends('layouts.app') @section('content') {{-- ── Page title ──────────────────────────────────────────────── --}}

Employees

{{-- ── Top bar ──────────────────────────────────────────────────── --}}
Employee List {{ $employees->total() }}
{{-- ── Table ────────────────────────────────────────────────────── --}}
@include('pages.master.partials.employee_rows', ['employees' => $employees])
No Emp ID Name Position Department Contact Status Actions
{{-- ══════════════════════════════════════════════════════ ADD EMPLOYEE MODAL ══════════════════════════════════════════════════════ --}} @foreach(['add','edit'] as $mode) @endforeach {{-- ══════════════════════════════════════════════════════ VIEW EMPLOYEE MODAL ══════════════════════════════════════════════════════ --}} @endsection @push('scripts') @endpushPKk] 0pages/master/estimation_templates.blade copy.phpnuW+A@extends('layouts.app') @section('title', 'Estimation Templates') @section('content')

Estimation Templates

Template List {{ $templates->total() }}
Create Template
@include('pages.master.partials.estimation_template_rows', ['templates' => $templates])
No Template Name VAT Discount % Actions
{{-- ========================= MODAL: ADD TEMPLATE ========================= --}} {{-- ========================= MODAL: EDIT TEMPLATE ========================= --}} {{-- ========================= MODAL: VIEW TEMPLATE ========================= --}} @endsection @push('scripts') @endpushPKk]+pages/master/estimation_templates.blade.phpnuW+A@extends('layouts.app') @section('title', 'Estimation Templates') @section('content')

Estimation Templates

Template List {{ $templates->total() }}
Create Template
@include('pages.master.partials.estimation_template_rows', ['templates' => $templates])
No Template Name VAT Discount % Actions
{{-- ========================= MODAL: ADD TEMPLATE ========================= --}} {{-- ========================= MODAL: EDIT TEMPLATE ========================= --}} {{-- ========================= MODAL: VIEW TEMPLATE ========================= --}} @endsection @push('scripts') @endpushPKk]NLEkEk$pages/master/internal_bank.blade.phpnuW+A@extends('layouts.app') @section('title', 'Internal Banks') @section('content') {{-- Page Title + Breadcrumb --}}

Internal Banks

{{-- Top bar: title + search + add new --}}
Internal Bank List {{ $internalBank->total() }}
{{-- Types Table --}}
@include('pages.master.partials.internal_bank_rows')
ID Bank Name Bank Number Bank Branch Status Actions
{{-- Add Internal Bank Modal --}} {{-- Edit Internal Bank Modal --}} {{-- View Model --}} @endsection @push('scripts') @endpush PKk]{m%;%;pages/master/job_type.blade.phpnuW+A@extends('layouts.app') @section('title', 'Job Types') @section('content') {{-- Page Title + Breadcrumb --}}

Job Types

{{-- Top bar: title + search + add new --}}
Job Type List {{ $jobType->total() }}
{{-- Table --}}
@include('pages.master.partials.job_type_rows')
ID Code Job Type Name Status Actions
{{-- Add Modal --}} {{-- Edit Modal --}} @endsection @push('scripts') @endpush PKk]GS+L+L!pages/master/other_bank.blade.phpnuW+A@extends('layouts.app') @section('title', 'Other Banks') @section('content') {{-- Page Title + Breadcrumb --}}

Other Banks

{{-- Top bar: title + search + add new --}}
Other Bank List {{ $otherBank->total() }}
{{-- Types Table --}}
@include('pages.master.partials.other_bank_rows')
ID Bank Name Bank Number Bank Branch Status Actions
{{-- Add Other Bank Modal --}} {{-- Edit Other Bank Modal --}} @endsection @push('scripts') @endpush PKk]1pages/master/partials/account_type_rows.blade.phpnuW+A@forelse ($accountType as $accountType)
{{ $accountType->id }} {{ $accountType->code }} {{ $accountType->name }} @if ($accountType->active == 1) Active @else Inactive @endif @empty No account types found. @endforelse PKk] 5pages/master/partials/chart_of_account_rows.blade.phpnuW+A@forelse ($chartOfAccount as $chartOfAccount)
{{ $chartOfAccount->id }} {{ $chartOfAccount->accountType?->name ?? '-' }} {{ $chartOfAccount->code }} {{ $chartOfAccount->name }} @php $balance = $chartOfAccount->net_balance ?? 0; @endphp @if ($balance > 0) {{ number_format($balance, 2) }} Dr @elseif ($balance < 0) {{ number_format(abs($balance), 2) }} Cr @else 0.00 @endif {{-- View --}} {{-- Edit --}} {{-- Activate / Deactivate --}} @if ($chartOfAccount->active == 1) @else @endif @empty No chart of account found. @endforelsePKk]:2,pages/master/partials/country_rows.blade.phpnuW+A@forelse ($country as $country)
{{ $country->id }} {{ $country->name }} @if ($country->active == 1) Active @else Inactive @endif @empty No countries found. @endforelse PKk]p-pages/master/partials/currency_rows.blade.phpnuW+A@forelse ($currency as $currency)
{{ $currency->id }} {{ $currency->name }} {{ $currency->short_name }} {{ $currency->rate }} @if ($currency->active == 1) Active @else Inactive @endif @empty No currencies found. @endforelse PKk]]/pages/master/partials/department_rows.blade.phpnu[@forelse ($department as $dept)
{{ $dept->id }} {{ $dept->name }} {{ \Illuminate\Support\Str::limit($dept->description, 60) }} @if($dept->dept_code) {{ $dept->dept_code }} @else - @endif @if ($dept->active == 1) Active @else Inactive @endif @empty No departments found. @endforelsePKk]9>>2pages/master/partials/discount_type_rows.blade.phpnuW+A@forelse ($discountType as $discountType)
{{ $discountType->id }} {{ $discountType->name }} {{ Str::limit($discountType->description, 60) }} @if ($discountType->active == 1) Active @else Inactive @endif @empty No discount types found. @endforelse PKk]a-pages/master/partials/district_rows.blade.phpnuW+A@forelse ($district as $district)
{{ $district->id }} {{ $district->name }} @if ($district->active == 1) Active @else Inactive @endif @empty No districts found. @endforelse PKk]$ -pages/master/partials/employee_rows.blade.phpnuW+A@forelse($employees as $employee)
{{ $employee->row_no ?? '' }} {{ $employee->employee_id }}
@if($employee->profile_picture) {{ $employee->name }} @else
@endif {{ $employee->name }}
{{ $employee->position }} {{ $employee->department }} {{ $employee->contact }} @if($employee->status === 'active') Active @elseif($employee->status === 'on_leave') On Leave @elseif($employee->status === 'terminated') Terminated @else Inactive @endif
@empty

No employees found

@endforelsePKk]]#hh8pages/master/partials/estimation_template_rows.blade.phpnuW+A@php $no = ($templates->currentPage() - 1) * $templates->perPage() + 1; @endphp @if($templates->count() == 0) No templates found @else @foreach($templates as $t) {{ $no++ }}
{{ $t->name }}
@if(!empty($t->notes)) {{ $t->notes }} @endif @if(($t->vat_status ?? 0) == 1) Enabled ({{ number_format((float) ($t->vat_percentage ?? 0), 1) }}%) @else Disabled @endif {{ number_format((float) ($t->discount_percentage ?? 0), 1) }} @endforeach @endifPKk]:wO2pages/master/partials/internal_bank_rows.blade.phpnuW+A@forelse ($internalBank as $internalBank)
{{ $internalBank->id }} {{ $internalBank->name }} {{ $internalBank->number }} {{ $internalBank->branch }} @if ($internalBank->active == 1) Active @else Inactive @endif {{-- Deactivate / Activate --}} @if ($internalBank->active == 1) @else @endif @empty No internal bank found. @endforelse PKk].9-pages/master/partials/job_type_rows.blade.phpnuW+A@forelse($jobType as $row) {{ $row->id }} {{ $row->code ?? '-' }} {{ $row->name }} @if($row->active) Active @else Inactive @endif @if($row->active) @endif @empty No job types found. @endforelse PKk]/pages/master/partials/other_bank_rows.blade.phpnuW+A@forelse ($otherBank as $otherBank)
{{ $otherBank->id }} {{ $otherBank->name }} {{ $otherBank->number }} {{ $otherBank->branch }} @if ($otherBank->active == 1) Active @else Inactive @endif {{-- Deactivate / Activate --}} @if ($otherBank->active == 1) @else @endif @empty No bank found. @endforelse PKk]݂1pages/master/partials/payment_term_rows.blade.phpnuW+A@forelse ($paymentTerm as $paymentTerm)
{{ $paymentTerm->id }} {{ $paymentTerm->name }} @if ($paymentTerm->active == 1) Active @else Inactive @endif @empty No payment terms found. @endforelse PKk]E1pages/master/partials/payment_type_rows.blade.phpnuW+A@forelse ($paymentType as $paymentType)
{{ $paymentType->id }} {{ $paymentType->name }} {{ $paymentType->days }} @if ($paymentType->active == 1) Active @else Inactive @endif @empty No payment types found. @endforelse PKk]-pages/master/partials/province_rows.blade.phpnuW+A@forelse ($province as $province)
{{ $province->id }} {{ $province->name }} @if ($province->active == 1) Active @else Inactive @endif @empty No provinces found. @endforelse PKk]wBgg/pages/master/partials/supervisor_rows.blade.phpnuW+A@forelse($supervisors as $row) {{ $row->id }} {{ $row->code ?? '-' }} {{ $row->name }} {{ $row->phone ?? '-' }} {{ $row->email ?? '-' }} @if($row->active) Active @else Inactive @endif @if($row->active) @endif @empty No supervisors found. @endforelse PKk]Ŕ.pages/master/partials/transport_rows.blade.phpnuW+A@forelse ($transports as $transport)
{{ $transport->row_no }} {{ $transport->vehicle_number }} {{ $transport->vehicle_name }} {{ $transport->vehicle_type }} {{ $transport->driver_name }} {{ $transport->driver_contact }} @php $statusMap = [ 'active' => ['bg-success-subtle text-success', 'Active'], 'inactive' => ['bg-secondary-subtle text-secondary', 'Inactive'], 'maintenance' => ['bg-warning-subtle text-warning', 'Maintenance'], 'retired' => ['bg-danger-subtle text-danger', 'Retired'], ]; [$cls, $label] = $statusMap[$transport->status] ?? ['bg-secondary-subtle text-secondary', ucfirst($transport->status ?? '-')]; @endphp {{ $label }} @empty No transport records found. @endforelsePKk]*wLL8pages/master/partials/unit_of_measurement_rows.blade.phpnuW+A@forelse ($unitOfMeasurement as $unitOfMeasurement)
{{ $unitOfMeasurement->id }} {{ $unitOfMeasurement->name }} @if ($unitOfMeasurement->active == 1) Active @else Inactive @endif @empty No Unit Of Measurements found. @endforelse PKk]ǝ-pages/master/partials/warranty_rows.blade.phpnuW+A@forelse ($warranty as $warranty)
{{ $warranty->id }} {{ $warranty->name }} @if ($warranty->active == 1) Active @else Inactive @endif @empty No warranties found. @endforelse PKk]J<)pages/master/partials/area_rows.blade.phpnu[@forelse ($area as $area) {{ $area->id }} {{ $area->area_code ?? '-' }} {{ $area->name }} @if ($area->active == 1) Active @else Inactive @endif @empty No areas found. @endforelsePKk]Yb< < 3pages/master/partials/employee_group_rows.blade.phpnu[@forelse($groups as $group)
{{ ($groups->currentPage() - 1) * $groups->perPage() + $loop->iteration }} {{ $group->group_code }}
{{ $group->group_name }}
{{ $group->description ?? '-' }} {{ $group->members_count ?? 0 }} Members @if((int)$group->is_active === 1) Active @else Inactive @endif
@if((int)$group->is_active === 1) @endif
@empty

No employee groups found

@endforelsePKk]ǣGG#pages/master/payment_term.blade.phpnuW+A@extends('layouts.app') @section('title', 'Payment Terms') @section('content') {{-- Page Title + Breadcrumb --}}

Payment Terms

{{-- Top bar: title + search + add new --}}
Payment Term List {{ $paymentTerm->total() }}
{{-- Payment Terms Table --}}
@include('pages.master.partials.payment_term_rows')
ID Payment Term Name Status Actions
{{-- Add Payment Term Modal --}} {{-- Edit Payment Term Modal --}} @endsection @push('scripts') @endpush PKk]b\J\J#pages/master/payment_type.blade.phpnuW+A@extends('layouts.app') @section('title', 'Payment Types') @section('content') {{-- Page Title + Breadcrumb --}}

Payment Types

{{-- Top bar: title + search + add new --}}
Payment Type List {{ $paymentType->total() }}
{{-- Payment Types Table --}}
@include('pages.master.partials.payment_type_rows')
ID Payment Type Name Days Status Actions
{{-- Add Payment Type Modal --}} {{-- Edit Payment Type Modal --}} @endsection @push('scripts') @endpush PKk]eQYFYFpages/master/province.blade.phpnuW+A@extends('layouts.app') @section('title', 'provinces') @section('content') {{-- Page Title + Breadcrumb --}}

Provinces

{{-- Top bar: title + search + add new --}}
Province List {{ $province->total() }}
{{-- Types Table --}}
@include('pages.master.partials.province_rows')
ID Province Name Status Actions
{{-- Add Province Modal --}} {{-- Edit Province Modal --}} @endsection @push('scripts') @endpush PKk](L@@!pages/master/supervisor.blade.phpnuW+A@extends('layouts.app') @section('title', 'Supervisors') @section('content') {{-- Page Title + Breadcrumb --}}

Supervisors

{{-- Top bar: title + search + add new --}}
Supervisor List {{ $supervisors->total() }}
{{-- Table --}}
@include('pages.master.partials.supervisor_rows')
ID Code Supervisor Name Phone Email Status Actions
{{-- Add Modal --}} {{-- Edit Modal --}} @endsection @push('scripts') @endpush PKk],!pages/master/transports.blade.phpnu[@extends('layouts.app') @section('content') {{-- Page Title + Breadcrumb --}}

Transport

{{-- Top bar --}}
Transport List {{ $transports->total() ?? '' }}
Add Transport
{{-- Table --}}
@include('pages.master.partials.transport_rows', ['transports' => $transports])
No Vehicle No Vehicle Name Type Driver Driver Contact Status Actions
{{-- ============================ ADD TRANSPORT MODAL ============================ --}} {{-- ============================ EDIT TRANSPORT MODAL ============================ --}} {{-- ============================ VIEW TRANSPORT MODAL ============================ --}} @endsection @push('scripts') @endpushPKk]II*pages/master/unit_of_measurement.blade.phpnuW+A@extends('layouts.app') @section('title', 'Unit Of Measurements') @section('content') {{-- Page Title + Breadcrumb --}}

Unit Of Measurements

{{-- Top bar: title + search + add new --}}
Unit Of Measurement List {{ $unitOfMeasurement->total() }}
{{-- Unit Of Measurement Table --}}
@include('pages.master.partials.unit_of_measurement_rows')
ID Unit Of Measurement Status Actions
{{-- Add Unit Of Measurement Modal --}} {{-- Edit Unit Of Measurement Modal --}} @endsection @push('scripts') @endpush PKk](!#lFlFpages/master/warranty.blade.phpnuW+A@extends('layouts.app') @section('title', 'Warranties') @section('content') {{-- Page Title + Breadcrumb --}}

Warranties

{{-- Top bar: title + search + add new --}}
Warranty List {{ $warranty->total() }}
{{-- Warranty Table --}}
@include('pages.master.partials.warranty_rows')
ID Warranty Name Status Actions
{{-- Add warranty Modal --}} {{-- Edit warranty Modal --}} @endsection @push('scripts') @endpush PKk]5!My*y*pages/master/area.blade.phpnu[@extends('layouts.app') @section('title', 'Areas') @section('content') {{-- Page Title + Breadcrumb --}}

Areas

{{-- Top bar --}}
Area List {{ $area->total() }}
{{-- TABLE --}}
@include('pages.master.partials.area_rows')
ID Code Area Name Status Actions
{{-- ADD MODAL --}} {{-- EDIT MODAL --}} @endsection @push('scripts') @endpushPKk]~pucuc&pages/master/employee_groups.blade.phpnu[@extends('layouts.app') @section('content')

Employee Groups

Group List {{ $groups->total() }}
@include('pages.master.partials.employee_group_rows', ['groups' => $groups])
No Group Code Group Name Description Members Status Actions
{{-- ADD GROUP MODAL --}} {{-- EDIT GROUP MODAL --}} {{-- MANAGE MEMBERS MODAL --}} @endsection @push('styles') @endpush @push('scripts') @endpushPKk]!9|w6pages/payments/partials/payment_receipt_rows.blade.phpnuW+A{{-- pages/payments/partials/payment_receipt_rows.blade.php --}} @forelse ($paymentReceipts as $pr) @php $methodMap = [ 'cash' => ['bg-success-subtle text-success', 'ri-cash-line', 'Cash'], 'cheque' => ['bg-info-subtle text-info', 'ri-bank-card-line', 'Cheque'], 'credit_card' => ['bg-warning-subtle text-warning', 'ri-bank-card-2-line', 'Card'], 'bank_transfer' => ['bg-primary-subtle text-primary', 'ri-exchange-dollar-line', 'Transfer'], 'online' => ['bg-purple-subtle text-primary', 'ri-smartphone-line', 'Online'], ]; [$mCls, $mIco, $mLbl] = $methodMap[$pr->payment_type] ?? ['bg-secondary-subtle text-secondary', 'ri-question-line', $pr->payment_type ?? '—']; $isAdvance = ($pr->receipt_mode === 'advance'); $modeCls = $isAdvance ? 'bg-warning-subtle text-warning' : 'bg-success-subtle text-success'; $modeIco = $isAdvance ? 'ri-file-list-2-line' : 'ri-file-text-line'; $modeLbl = $isAdvance ? 'Advance' : 'Customer'; $receiptNo = $pr->receipt_no ?? $pr->formatted_receipt_no ?? 'PR-' . str_pad($pr->id, 6, '0', STR_PAD_LEFT); $paymentDate = $pr->payment_date instanceof \Carbon\Carbon ? $pr->payment_date->format('d M Y') : $pr->payment_date; // Set-off indicator $hasSetoff = (bool) $pr->setoff_posted; $setoffAmt = (float) ($pr->setoff_amount ?? 0); // For advance receipts: calculate remaining balance $advanceUsed = 0; $advanceAvailable = 0; if ($isAdvance) { $advanceUsed = (float) \App\Models\PaymentReceiptItem::where('payment_receipt_id', $pr->id) ->where('is_setoff', 1)->where('active', 1)->sum('paid_amount'); $advanceAvailable = max(0, (float) $pr->total_amount - $advanceUsed); } @endphp {{-- ID --}} {{ $pr->id }} {{-- Date --}} {{ $paymentDate }} {{-- Receipt No --}} {{ $receiptNo }} {{-- Show set-off badge on the customer receipt when it has been set-offed --}} @if (!$isAdvance && $hasSetoff)
Set-off {{ number_format($setoffAmt, 2) }}
@endif {{-- Show remaining balance on advance receipts --}} @if ($isAdvance) @if ($advanceAvailable > 0)
Bal: {{ number_format($advanceAvailable, 2) }}
@else
Fully Applied
@endif @endif {{-- Type badge --}} {{ $modeLbl }} {{-- Customer --}}
{{ $pr->customer?->company_name ?? $pr->customer?->name ?? '—' }}
@if ($pr->customer?->customer_code)
{{ $pr->customer->customer_code }}
@endif {{-- Payment method --}} {{ $mLbl }} {{-- Reference --}} {{ $pr->ref_no ?: '—' }} {{-- Amount --}} {{ number_format($pr->total_amount, 2) }} {{-- Actions --}}
{{-- View --}} {{-- Set-off: only for CUSTOMER receipts that have not yet been set-offed --}} @if (!$isAdvance && !$hasSetoff) @elseif (!$isAdvance && $hasSetoff) Set-offed @endif {{-- Print --}} {{-- Delete --}}
@empty

No payment receipts found

@endforelsePKk]h 6pages/payments/partials/payment_voucher_rows.blade.phpnuW+A@php $start = ($paymentVouchers->currentPage() - 1) * $paymentVouchers->perPage() + 1; @endphp @forelse($paymentVouchers as $i => $pv) @php $no = $start + $i; @endphp {{ $no }} {{ $pv->doc_date ?? '-' }} {{ $pv->receipt_id ?? ($pv->id ?? '-') }} {{ $pv->supplier->company_name ?? '-' }} @if($pv->payment_type == 'cash') CASH @elseif($pv->payment_type == 'cheque') CHEQUE @else {{ strtoupper($pv->payment_type) }} @endif {{-- Prepaid Badge --}} @if($pv->is_prepaid) PREPAID @endif {{ $pv->ref_no ?? '-' }} {{ Str::limit($pv->note ?? '-', 30) }} {{-- Replace the Paid Amount column cell with: --}} {{ number_format($pv->total_amount ?? 0, 2) }} {{-- Set Off Button - Only show for prepaid with available balance --}} @if ($pv->is_prepaid && $pv->prepaid_balance > 0) @endif @empty No Payment Vouchers found @endforelse PKk]6((2pages/payments/partials/prepaid_bill_tab.blade.phpnuW+A{{-- Prepaid Bill Tab Content --}}
{{-- Entity Selection --}}
{{-- Two Column Layout --}}
{{-- LEFT PANEL --}}
{{-- Accounting Entries Section --}}
Accounting Entries
Acc Code Acc Description Voucher N Description Amount DR Amount CR Inven N
Enter amount to generate entries
Total Debit: 0.00
Total Credit: 0.00
Balance: 0.00
{{-- RIGHT PANEL: Payment Details --}}
{{-- Date --}}
{{-- Payment Method --}}
{{-- Cheque Details --}} {{-- Bank Debit --}}
{{-- Bank Credit --}}
{{-- Total Amount --}}
{{-- Reference No --}}
{{-- Note --}}
{{-- Bottom Display --}}
Total Payment

0.00

PKk]E--2pages/payments/partials/receipt/pr_print.blade.phpnuW+A{{-- resources/views/pages/payments/partials/receipt/pr_print.blade.php --}} @extends('layouts.pv-recipt-header') @section('title', 'Payment Receipt - ' . ($receipt->receipt_no ?? 'PR-' . str_pad($receipt->id, 6, '0', STR_PAD_LEFT))) @section('invoice-title', 'Payment Receipt') @section('content')
Receipt No: {{ $receipt->receipt_no ?? 'PR-' . str_pad($receipt->id, 6, '0', STR_PAD_LEFT) }}
Date: {{ $receipt->payment_date ? \Carbon\Carbon::parse($receipt->payment_date)->format('m/d/Y') : 'N/A' }}
Mode: {{ ucfirst($receipt->receipt_mode ?? 'N/A') }}
Payment Type: {{ ucfirst(str_replace('_', ' ', $receipt->payment_type ?? 'N/A')) }}
@php $detail = $receipt->details->first(); @endphp
@if($receipt->payment_type === 'cheque')
Cheque No: {{ $detail->cheque_number ?? 'N/A' }}
@elseif($receipt->payment_type === 'credit_card')
Card No: {{ $detail->card_number ? '****' . substr($detail->card_number, -4) : 'N/A' }}
@elseif(in_array($receipt->payment_type, ['bank_transfer', 'online']))
Transaction Ref: {{ $detail->transaction_ref ?? 'N/A' }}
@else
Customer's Name: {{ $receipt->customer->company_name ?? $receipt->customer->name ?? 'N/A' }}
@endif
@if($receipt->payment_type === 'cheque')
Cheque Date: {{ $detail && $detail->cheque_date ? \Carbon\Carbon::parse($detail->cheque_date)->format('m/d/Y') : 'N/A' }}
@else
Payment Date: {{ $detail && $detail->payment_date ? \Carbon\Carbon::parse($detail->payment_date)->format('m/d/Y') : 'N/A' }}
@endif
Reference No: {{ $receipt->ref_no ?? 'N/A' }}
Created By: {{ $receipt->user->name ?? 'N/A' }}
@php $rowsPerPage = 20; $currentRow = 0; @endphp @foreach ($invoices as $index => $item) @php $description = $item['invoice_no'] ?? ('INV-' . ($item['id'] ?? '')); // Word-wrap description into lines of ~55 chars $descriptionLines = []; $words = explode(' ', str_replace("\n", ' ', $description)); $currentLine = ''; foreach ($words as $word) { $test = $currentLine ? $currentLine . ' ' . $word : $word; if (mb_strlen($test) <= 55) { $currentLine = $test; } else { if ($currentLine) $descriptionLines[] = $currentLine; $currentLine = $word; } } if ($currentLine) $descriptionLines[] = $currentLine; $totalLinesForThisItem = count($descriptionLines); @endphp @for ($i = 0; $i < $totalLinesForThisItem; $i++) @php $currentRow++; if ($currentRow > $rowsPerPage) { echo '
Ref Invoice No Type Invoice Amount Paid Amount Balance
'; echo '
'; echo '
Payment Receipt
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $currentRow = 1; } @endphp @if ($i === 0) @else {{-- Continuation lines: only description column has text --}} @php $isLast = ($i === $totalLinesForThisItem - 1); $borderStyle = 'border-top: none; border-bottom: ' . ($isLast ? '1px solid #dee2e6' : 'none') . '; padding-top: 0; padding-bottom: 0;'; @endphp @endif @endfor @endforeach {{-- Total row --}}
RefInvoice NoTypeInvoice AmountPaid AmountBalance
{{ $index + 1 }} {{ $descriptionLines[$i] }} {{ ucfirst($item['invoice_type'] ?? 'N/A') }} {{ number_format($item['invoice_amount'] ?? 0, 2, '.', ',') }} {{ number_format($item['paid_amount'] ?? 0, 2, '.', ',') }} {{ number_format($item['balance_amount'] ?? 0, 2, '.', ',') }} {{ $descriptionLines[$i] }}
TOTAL: {{ number_format($receipt->total_amount ?? 0, 2, '.', ',') }}
Total Amount: Rs. {{ number_format($receipt->total_amount ?? 0, 2, '.', ',') }}
@if($receipt->note)
Note: {{ $receipt->note }}
@endif
@endsectionPKk]5XQ'Q'2pages/payments/partials/receipt/pv_print.blade.phpnuW+A{{-- resources/views/pages/payments/partials/receipt/pv_print.blade.php --}} @extends('layouts.pv-recipt-header') @section('title', 'Payment Voucher - ' . ($pv->ref_no ?? 'PV-' . str_pad($pv->id, 6, '0', STR_PAD_LEFT))) @section('invoice-title', 'Payment Voucher') @section('content')
Supplier's TIN: {{ $pv->supplier->tin ?? 'N/A' }}
Supplier's Name: {{ $pv->supplier->company_name ?? 'N/A' }}
Address: {{ $pv->supplier->address ?? 'N/A' }}
Telephone No: {{ $pv->supplier->phone ?? 'N/A' }}
Company's TIN: {{ $company->tin ?? 'N/A' }}
Company's Name: {{ $company->company_name ?? 'N/A' }}
Address: {{ $company->address ?? 'N/A' }}
Telephone No: {{ $company->phone ?? 'N/A' }}
PV No: {{ $pv->ref_no ?? 'PV-' . str_pad($pv->id, 6, '0', STR_PAD_LEFT) }}
Date: {{ $pv->doc_date ? \Carbon\Carbon::parse($pv->doc_date)->format('m/d/Y') : 'N/A' }}
Due Date: {{ $pv->due_date ? \Carbon\Carbon::parse($pv->due_date)->format('m/d/Y') : 'N/A' }}
Payment Type: {{ $pv->payment_type ?? 'N/A' }}
Bank: {{ $pv->details->first()->internalBank->name ?? 'N/A' }} @if(isset($pv->details->first()->internalBank->account_no)) | {{ $pv->details->first()->internalBank->account_no }} @endif
Cheque No: {{ $pv->details->first()->chq_number ?? 'N/A' }}
Payment Date: {{ $pv->details->first()->payment_date ? \Carbon\Carbon::parse($pv->details->first()->payment_date)->format('m/d/Y') : 'N/A' }}
Reference No: {{ $pv->ref_no ?? 'N/A' }}
@php $rowsPerPage = 20; $currentRow = 0; @endphp @foreach ($pv->items as $index => $item) @php $description = $item->doc_type ?? 'N/A'; if (!empty($item->doc_id)) { $description .= ' - ' . $item->doc_id; } $descriptionLines = []; $words = explode(' ', str_replace("\n", ' ', $description)); $currentLine = ''; foreach ($words as $word) { $test = $currentLine ? $currentLine . ' ' . $word : $word; if (mb_strlen($test) <= 60) { $currentLine = $test; } else { if ($currentLine) { $descriptionLines[] = $currentLine; } $currentLine = $word; } } if ($currentLine) { $descriptionLines[] = $currentLine; } $totalLinesForThisItem = count($descriptionLines); @endphp @for ($i = 0; $i < $totalLinesForThisItem; $i++) @php $currentRow++; if ($currentRow > $rowsPerPage) { echo '
Ref Description Doc ID Amount Paid Amount
'; echo '
'; echo '
Payment Voucher
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $currentRow = 1; } @endphp @if ($i === 0) @else @endif @endfor @endforeach
RefDescriptionDoc IDAmountPaid Amount
{{ $index + 1 }} {{ $descriptionLines[$i] }} {{ $item->doc_id ?? '-' }} {{ number_format($item->amount ?? 0, 2, '.', ',') }} {{ number_format($item->paid_amount ?? 0, 2, '.', ',') }} {{ $descriptionLines[$i] }}
TOTAL: {{ number_format($pv->total_amount ?? 0, 2, '.', ',') }}
Total Amount: Rs. {{ number_format($pv->total_amount ?? 0, 2, '.', ',') }}
@endsection PKk]6p#Q Q 0pages/payments/payment_receipts.blade copy 2.phpnuW+A@extends('layouts.app') @section('title', 'Payment Receipts') @section('content') {{-- ══ BREADCRUMB ══ --}}

Payment Receipts

{{-- ══ TOP BAR ══ --}}
Payment Receipt List {{ $paymentReceipts->total() ?? '' }}
New Receipt
{{-- ══ LIST TABLE ══ --}}
@include('pages.payments.partials.payment_receipt_rows', ['paymentReceipts' => $paymentReceipts])
# Date Receipt No Type Customer Method Reference Amount Actions
{{-- ══ ADD MODAL ══ --}} {{-- ══ VIEW MODAL ══ --}} {{-- ══ SET-OFF MODAL ══ --}} @endsection @push('scripts') @endpushPKk]?br[[.pages/payments/payment_receipts.blade copy.phpnuW+A@extends('layouts.app') @section('title', 'Payment Receipts') @section('content') {{-- ── Breadcrumb ── --}}

Payment Receipts

{{-- ── Top bar ── --}}
Payment Receipt List {{ $paymentReceipts->total() ?? '' }}
New Receipt
{{-- ── List Table ── --}}
@include('pages.payments.partials.payment_receipt_rows', [ 'paymentReceipts' => $paymentReceipts, ])
# Date Receipt No Customer Method Reference Note Amount Actions
{{-- ══════════════════════════════════════════════ ADD PAYMENT RECEIPT MODAL ══════════════════════════════════════════════ --}} {{-- ══════════════════════════════════════════════ VIEW PAYMENT RECEIPT MODAL ══════════════════════════════════════════════ --}} @endsection @push('scripts') @endpushPKk]B$H??)pages/payments/payment_receipts.blade.phpnu[@extends('layouts.app') @section('title', 'Payment Receipts') @section('content') {{-- ══ BREADCRUMB ══ --}}

Payment Receipts

{{-- ══ TOP BAR ══ --}}
Payment Receipt List {{ $paymentReceipts->total() ?? '' }}
New Receipt
{{-- ══ LIST TABLE ══ --}}
@include('pages.payments.partials.payment_receipt_rows', ['paymentReceipts' => $paymentReceipts])
# Date Receipt No Type Customer Method Reference Amount Actions
{{-- ══ ADD MODAL ══ --}} {{-- ══ VIEW MODAL ══ --}} {{-- ══ SET-OFF MODAL ══ --}} @endsection @push('scripts') @endpush PKk]`;||.pages/payments/payment_vouchers.blade copy.phpnuW+A@extends('layouts.app') @section('title', 'Payment Vouchers') @section('content') {{-- Page Title + Breadcrumb --}}

Payment Vouchers

{{-- Top bar --}}
Payment Voucher List {{ $paymentVouchers->total() ?? '' }}
New Payment
{{-- Table --}}
@include('pages.payments.partials.payment_voucher_rows', [ 'paymentVouchers' => $paymentVouchers, ])
# Date Receipt ID Supplier Payment Type Reference No Description Paid Amount Actions
{{-- ========================================================= ADD PAYMENT VOUCHER MODAL ========================================================= --}} {{-- ✅ END ADD PAYMENT VOUCHER MODAL --}} {{-- ========================================================= VIEW PAYMENT VOUCHER MODAL ========================================================= --}} {{-- ✅ END VIEW PAYMENT VOUCHER MODAL --}} {{-- ========================================================= SET OFF MODAL ========================================================= --}} {{-- END SET OFF MODAL --}} @endsection @push('scripts') @endpush PKk]#oII)pages/payments/payment_vouchers.blade.phpnuW+A@extends('layouts.app') @section('title', 'Payment Vouchers') @section('content') {{-- ══ BREADCRUMB ══ --}}

Payment Vouchers

{{-- ══ TOP BAR ══ --}}
Payment Voucher List {{ $paymentVouchers->total() ?? '' }}
New Voucher
{{-- ══ LIST TABLE ══ --}}
@include('pages.payments.partials.payment_voucher_rows', ['paymentVouchers' => $paymentVouchers])
# Date Voucher No Type Supplier Method Reference Amount Actions
{{-- ══════════════════════════════════════════════════════════ ADD MODAL ══════════════════════════════════════════════════════════ --}} {{-- ══════════════════════════════════════════════════════════ VIEW MODAL ══════════════════════════════════════════════════════════ --}} {{-- ══════════════════════════════════════════════════════════ SET-OFF MODAL ══════════════════════════════════════════════════════════ --}} @endsection @push('scripts') @endpushPKk]lod+\+\!pages/purchase/grn.blade copy.phpnuW+A@extends('layouts.app') @section('title', 'Create GRN') @section('content') {{-- Page Title --}}

Goods Received Note (GRN)

{{-- Top bar --}}
GRN List {{ $grns->total() ?? 0 }}
Create GRN
{{-- GRN List Table --}}
@include('pages.purchase.partials.grn_list_rows', ['grns' => $grns])
# GRN No Invoice Supplier Created_at Receipt Qty Amount GRN Date Actions
{{-- ========================= CREATE MODAL ========================= --}} {{-- ========================= DP MODAL ========================= --}} {{-- ========================= VIEW GRN MODAL (PO-Like Layout) ========================= --}} @endsection @push('scripts') {{-- Hidden template for NEW ITEM ROWS --}} @endpushPKk]&pages/purchase/grn.blade.phpnu[@extends('layouts.app') @section('title', 'Create GRN') @section('content') {{-- Page Title --}}

Goods Received Note (GRN)

{{-- Top bar --}}
GRN List {{ $grns->total() ?? 0 }}
Create GRN
{{-- GRN List Table --}}
@include('pages.purchase.partials.grn_list_rows', ['grns' => $grns])
# GRN No Invoice Supplier Created_at Receipt Qty Amount GRN Date Actions
{{-- ========================= CREATE MODAL ========================= --}} {{-- ========================= DP MODAL ========================= --}} {{-- ========================= VIEW GRN MODAL (PO-Like Layout) ========================= --}} @endsection @push('scripts') {{-- Hidden template for NEW ITEM ROWS --}} @endpushPKk]]'pppages/purchase/grnA.blade.phpnuW+A@extends('layouts.app') @section('title', 'Create GRN') @section('content') {{-- Page Title --}}

Goods Received Note (GRN)

{{-- Top bar --}}
GRN List {{ $grns->total() ?? 0 }}
Create GRN
{{-- GRN List Table --}}
@include('pages.purchase.partials.grn_list_rows', ['grns' => $grns])
# GRN No Invoice Supplier Created_at Receipt Qty Amount GRN Date Actions
{{-- ========================= CREATE MODAL ========================= --}} {{-- ========================= DP MODAL ========================= --}} {{-- ========================= VIEW GRN MODAL (PO-Like Layout) ========================= --}} @endsection @push('scripts') {{-- Hidden template for NEW ITEM ROWS --}} @endpushPKk]ܒDmm/pages/purchase/partials/grn_list_rows.blade.phpnuW+A @php $start = ($grns->currentPage() - 1) * $grns->perPage() + 1; @endphp @forelse($grns as $i => $g) {{ $start + $i }} GRN-{{ $g->id }} {{ $g->supplier_invoice_no ?? '-' }} {{ $g->supplier->company_name ?? '-' }} {{ optional($g->created_at)->format('Y-m-d') }} {{ number_format((float) ($g->receipt_qty ?? 0), 2) }} {{ number_format((float) ($g->grand_total ?? 0), 2) }} {{ $g->doc_date ?? '-' }} @empty No GRNs found @endforelsePKk]0TV /pages/purchase/partials/grn_rows.blade copy.phpnuW+A @php // $idx must be passed from blade or template @endphp {{-- ITEM + SERIALS --}}
{{-- DP JSON holder + badge --}} DP Added {{-- WARRANTY --}} {{-- QTY --}} {{-- COST --}} {{-- SALES PRICE + DP --}}
{{-- AMOUNT --}} 0.00 {{-- BATCH / EXP --}}
{{-- ACTION --}} PKk]${*pages/purchase/partials/grn_rows.blade.phpnu[ @php // $idx must be passed from blade or template @endphp {{-- ITEM + SERIALS --}}
{{-- DP JSON holder + badge --}} DP Added {{-- WARRANTY --}} {{-- UNIT --}} - {{-- QTY --}} {{-- COST --}} {{-- SALES PRICE + DP --}}
{{-- AMOUNT --}} 0.00 {{-- BATCH / EXP --}}
{{-- ACTION --}} PKk]k, , *pages/purchase/partials/pmr_rows.blade.phpnuW+A@php $i = ($mrs->currentPage() - 1) * $mrs->perPage(); @endphp @forelse($mrs as $mr) @php $status = strtolower($mr->status ?? ''); @endphp {{ ++$i }} {{ $mr->mr_no }} {{ $mr->job_no ?? '-' }} {{ $mr->mr_date }} {{ $mr->required_date ?? '-' }} {{ $mr->status ?? '-' }} {{ number_format((float) ($mr->sub_total ?? 0), 2) }} {{-- View --}} {{-- Print --}} {{-- Approve --}} @if(in_array($status, ['draft','submitted'])) {{-- Reject --}} @endif {{-- Delete (hidden after approve) --}} @if($status !== 'approved') @endif @empty No records found @endforelsePKk] 5pages/purchase/partials/purchase_order_rows.blade.phpnuW+A@php $start = ($purchaseOrders->currentPage() - 1) * $purchaseOrders->perPage() + 1; @endphp @forelse($purchaseOrders as $i => $po) @php $no = $start + $i; $ordered = (float) ($po->ordered_qty ?? 0); $received = (float) ($po->received_qty ?? 0); $pct = $ordered > 0 ? round(($received / $ordered) * 100, 1) : 0; if ($pct > 100) $pct = 100; $barClass = $pct >= 100 ? 'bg-success' : ($pct >= 50 ? 'bg-warning' : 'bg-danger'); @endphp {{ $no }} {{ $po->purchase_order_scl ?? '-' }} {{ $po->doc_date ?? '-' }} {{ $po->supplier->company_name ?? '-' }}
Received {{ $pct }}%
{{ number_format($received, 2) }} / {{ number_format($ordered, 2) }}
{{ $po->ref_no ?? '-' }} @if(($po->active ?? 1) == 1) Active @else Inactive @endif @empty No Purchase Orders found @endforelse PKk]6pages/purchase/partials/purchase_return_rows.blade.phpnuW+A@php $start = ($purchaseReturns->currentPage() - 1) * $purchaseReturns->perPage() + 1; @endphp @forelse($purchaseReturns as $i => $pr) @php $no = $start + $i; $totalQty = $pr->items->sum('qty'); @endphp {{ $no }} {{-- Show ID as RETURN ID --}} PR-{{ str_pad($pr->id, 6, '0', STR_PAD_LEFT) }} {{ $pr->doc_date ?? '-' }} {{ $pr->supplier->company_name ?? '-' }} {{ rtrim(rtrim(number_format($totalQty, 2, '.', ''), '0'), '.') }} {{ $pr->ref_no ?? '-' }} {{ number_format($pr->grand_total ?? 0, 2) }} {{-- Show active status only --}} @if (($pr->active ?? 1) == 1) Active @else Inactive @endif @empty No Purchase Returns found @endforelse PKk]+ѣ&114pages/purchase/partials/reciept/bill_print.blade.phpnuW+A{{-- resources/views/pages/purchase/partials/receipt/bill_print.blade.php --}} @extends('layouts.recipt-header') @section('title', 'Bill - ' . ($bill->bill_scl ?? 'BILL-' . str_pad($bill->id, 6, '0', STR_PAD_LEFT))) @section('invoice-title', 'Expense Bill') @section('content')
Supplier's TIN: {{ $bill->supplier->tin ?? 'N/A' }}
Supplier's Name: {{ $bill->supplier->company_name ?? $bill->supplier->name ?? 'N/A' }}
Address: {{ $bill->supplier->address ?? 'N/A' }}
Telephone No: {{ $bill->supplier->phone ?? 'N/A' }}
Company TIN: {{ $company->tin ?? 'N/A' }}
Company Name: {{ $company->company_name ?? 'N/A' }}
Address: {{ $company->address ?? 'N/A' }}
Telephone No: {{ $company->phone ?? 'N/A' }}
Bill No:{{ $bill->bill_scl ?? 'BILL-' . str_pad($bill->id, 6, '0', STR_PAD_LEFT) }}
Bill Date:{{ $bill->bill_date ? \Carbon\Carbon::parse($bill->bill_date)->format('m/d/Y') : 'N/A' }}
Reference No:{{ $bill->ref_no ?? 'N/A' }}
Payment Method:{{ $bill->payment_method == 'cash' ? 'Cash' : 'Cheque' }}
@if($bill->payment_method == 'cheque' && $bill->cheque_no)
Cheque No:{{ $bill->cheque_no }}
@endif @if($bill->note)
Note:{{ $bill->note }}
@endif
@php $totalQty = 0; $totalAmount = 0; $rowsPerPage = 20; $currentRow = 0; @endphp @foreach ($bill->items as $index => $item) @php $totalQty += $item->qty ?? 0; $totalAmount += $item->amount ?? 0; $drCoaName = $item->chartOfAccount->name ?? 'N/A'; $drCoaCode = $item->chartOfAccount->code ?? ''; $drCoa = $drCoaCode ? "$drCoaCode - $drCoaName" : $drCoaName; $crCoaName = $item->creditChartOfAccount->name ?? 'N/A'; $crCoaCode = $item->creditChartOfAccount->code ?? ''; $crCoa = $crCoaCode ? "$crCoaCode - $crCoaName" : $crCoaName; $description = $item->description ?? '-'; // Split long text into multiple lines $drCoaLines = []; $words = explode(' ', $drCoa); $currentLine = ''; foreach ($words as $word) { $test = $currentLine ? $currentLine . ' ' . $word : $word; if (mb_strlen($test) <= 30) { $currentLine = $test; } else { if ($currentLine) $drCoaLines[] = $currentLine; $currentLine = $word; } } if ($currentLine) $drCoaLines[] = $currentLine; $crCoaLines = []; $words = explode(' ', $crCoa); $currentLine = ''; foreach ($words as $word) { $test = $currentLine ? $currentLine . ' ' . $word : $word; if (mb_strlen($test) <= 30) { $currentLine = $test; } else { if ($currentLine) $crCoaLines[] = $currentLine; $currentLine = $word; } } if ($currentLine) $crCoaLines[] = $currentLine; $descLines = []; $words = explode(' ', $description); $currentLine = ''; foreach ($words as $word) { $test = $currentLine ? $currentLine . ' ' . $word : $word; if (mb_strlen($test) <= 40) { $currentLine = $test; } else { if ($currentLine) $descLines[] = $currentLine; $currentLine = $word; } } if ($currentLine) $descLines[] = $currentLine; $totalLinesForThisItem = max(count($drCoaLines), count($crCoaLines), count($descLines)); @endphp @for ($i = 0; $i < $totalLinesForThisItem; $i++) @php $currentRow++; if ($currentRow > $rowsPerPage) { echo '
Ref DR Chart of Account CR Chart of Account Description Qty Unit Cost Amount
'; echo '
'; echo '
Expense Bill
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $currentRow = 1; } @endphp @if ($i === 0) @else @endif @endfor @endforeach
RefDR Chart of AccountCR Chart of AccountDescriptionQtyUnit CostAmount
{{ $index + 1 }} {{ $drCoaLines[$i] ?? '' }} {{ $crCoaLines[$i] ?? '' }} {{ $descLines[$i] ?? '' }} {{ rtrim(rtrim(number_format($item->qty ?? 0, 2, '.', ''), '0'), '.') }} {{ number_format($item->unit_cost ?? 0, 2, '.', ',') }} {{ number_format($item->amount ?? 0, 2, '.', ',') }} {{ $drCoaLines[$i] ?? '' }} {{ $crCoaLines[$i] ?? '' }} {{ $descLines[$i] ?? '' }}
TOTAL: {{ rtrim(rtrim(number_format($totalQty, 2, '.', ''), '0'), '.') }} {{ number_format($totalAmount, 2, '.', ',') }}
Total Amount: Rs. {{ number_format($totalAmount, 2, '.', ',') }}
@endsection PKk]\Vz663pages/purchase/partials/reciept/grn_print.blade.phpnu[{{-- resources/views/pages/purchase/partials/receipt/grn_print.blade.php --}} @extends('layouts.recipt-header') @section('title', 'Goods Received Note - ' . ($grn->grn_scl ?? 'GRN-' . str_pad($grn->id, 6, '0', STR_PAD_LEFT))) @section('invoice-title', 'Goods Received Note (GRN)') @section('content')
@php $totalItems = $grn->items->count(); $totalQty = $grn->items->sum('qty'); @endphp
GRN No: {{ $grn->id }}
Date: {{ \Carbon\Carbon::parse($grn->doc_date)->format('d/m/Y') }}
PO No: {{ $grn->purchase_order_id }}
Supplier: {{ $grn->supplier->company_name }}
Invoice No: {{ $grn->supplier_invoice_no }}
Items: {{ $totalItems }}
Total Qty: {{ rtrim(rtrim(number_format($totalQty, 2, '.', ''), '0'), '.') }}
Manual No: -
Print Date: {{ now()->format('d/m/Y') }}
Page No: 1
@php $totalQty = 0; $rowsPerPage = 20; $currentRow = 0; $totalItems = $grn->items->count(); @endphp @foreach ($grn->items as $index => $item) @php $totalQty += $item->qty ?? 0; $itemName = $item->item->name ?? 'N/A'; $itemCode = $item->item->itemcode ?? ''; $description = $itemCode ? "$itemCode - $itemName" : $itemName; if (!empty($item->item_description)) { $description .= ' ' . $item->item_description; } $descriptionLines = []; $words = explode(' ', str_replace("\n", ' ', $description)); $currentLine = ''; foreach ($words as $word) { $test = $currentLine ? $currentLine . ' ' . $word : $word; if (mb_strlen($test) <= 50) { $currentLine = $test; } else { if ($currentLine) { $descriptionLines[] = $currentLine; } $currentLine = $word; } } if ($currentLine) { $descriptionLines[] = $currentLine; } $totalLinesForThisItem = count($descriptionLines); @endphp @for ($i = 0; $i < $totalLinesForThisItem; $i++) @php $currentRow++; if ($currentRow > $rowsPerPage) { echo '
Ref Description Batch/Serial Expiry Qty Unit Cost UOM Amount
'; echo '
'; echo '
Goods Received Note (GRN)
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $currentRow = 1; } @endphp @if ($i === 0) @else @endif @endfor @endforeach
RefDescriptionBatch/SerialExpiryQtyUnit CostUOMAmount
{{ $index + 1 }} {{ $descriptionLines[$i] }} {{ $item->batch_no ?? ($item->serial_no ?? '-') }} {{ $item->expiry ? \Carbon\Carbon::parse($item->expiry)->format('m/d/Y') : '-' }} {{ rtrim(rtrim(number_format($item->qty ?? 0, 2, '.', ''), '0'), '.') }} {{ number_format($item->cost ?? 0, 2, '.', ',') }} {{ $item->item->unitMeasure->name ?? '-' }} {{ number_format($item->amount ?? 0, 2, '.', ',') }} {{ $descriptionLines[$i] }}
TOTAL: {{ rtrim(rtrim(number_format($totalQty, 2, '.', ''), '0'), '.') }} {{ number_format($grn->sub_total ?? 0, 2, '.', ',') }}
Sub Total: Rs. {{ number_format($grn->sub_total ?? 0, 2, '.', ',') }}
@if (($grn->discount ?? 0) > 0) @php $discountPercentage = ($grn->sub_total ?? 0) > 0 ? (($grn->discount / $grn->sub_total) * 100) : 0; @endphp
Discount ({{ number_format($discountPercentage, 2) }}%): Rs. {{ number_format($grn->discount, 2, '.', ',') }}
Net Amount: Rs. {{ number_format($grn->net_value ?? 0, 2, '.', ',') }}
@endif @if (isset($grn->vat_status) && $grn->vat_status == 1)
VAT Amount (18%): Rs. {{ number_format($grn->vat_amount ?? 0, 2, '.', ',') }}
@endif
Grand Total: Rs. {{ number_format($grn->grand_total ?? 0, 2, '.', ',') }}
@endsection PKk].s"..2pages/purchase/partials/reciept/po_print.blade.phpnu[{{-- resources/views/pages/purchase/partials/receipt/po_print.blade.php --}} @extends('layouts.receipt-layout-po') @section('title', 'Purchase Order - ' . ($po->purchase_order_scl ?? 'PO-' . str_pad($po->id, 6, '0', STR_PAD_LEFT))) @section('invoice-title', 'Purchase Order') @section('content')
Supplier's TIN: {{ $po->supplier->tin ?? 'N/A' }}
Supplier's Name: {{ $po->supplier->company_name ?? 'N/A' }}
Address: {{ $po->supplier->address ?? 'N/A' }}
Telephone No: {{ $po->supplier->phone ?? 'N/A' }}
Purchaser's TIN: {{ $company->tin ?? 'N/A' }}
Purchaser's Name: {{ $company->company_name ?? 'N/A' }}
Address: {{ $company->address ?? 'N/A' }}
Telephone No: {{ $company->phone ?? 'N/A' }}
PO No:{{ $po->purchase_order_scl ?? 'PO-' . str_pad($po->id, 6, '0', STR_PAD_LEFT) }}
Date:{{ $po->doc_date ? \Carbon\Carbon::parse($po->doc_date)->format('m/d/Y') : 'N/A' }}
Requested Date:{{ $po->request_date ? \Carbon\Carbon::parse($po->request_date)->format('m/d/Y') : 'N/A' }}
Reference No:{{ $po->ref_no ?? 'N/A' }}
Delivery Address:{{ $po->delivery_address ?? 'N/A' }}
Payment Term:{{ $po->paymentTerm->name ?? 'N/A' }}
Attention:{{ $po->attention ?? 'N/A' }}
Note:{{ $po->note ?? 'N/A' }}
@php $totalQty = 0; $totalAmount = 0; $rowsPerPage = 20; $currentRow = 0; $activeItems = $po->items->where('active', 1)->values(); // important for correct index @endphp @foreach ($activeItems as $index => $item) @php $totalQty += $item->qty ?? 0; $totalAmount += $item->amount ?? 0; $itemName = $item->item->name ?? 'N/A'; $itemCode = $item->item->itemcode ?? ''; $description = $itemCode ? "$itemCode - $itemName" : $itemName; if (!empty($item->item_description)) { $description .= ' ' . $item->item_description; } $descriptionLines = []; $words = explode(' ', str_replace("\n", ' ', $description)); $currentLine = ''; foreach ($words as $word) { $test = $currentLine ? $currentLine . ' ' . $word : $word; if (mb_strlen($test) <= 60) { $currentLine = $test; } else { if ($currentLine) { $descriptionLines[] = $currentLine; } $currentLine = $word; } } if ($currentLine) { $descriptionLines[] = $currentLine; } $totalLinesForThisItem = count($descriptionLines); @endphp @for ($i = 0; $i < $totalLinesForThisItem; $i++) @php $currentRow++; if ($currentRow > $rowsPerPage) { echo '
Ref Description UOM Qty Rate Amount
'; echo '
'; echo '
Purchase Order
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $currentRow = 1; } @endphp @if ($i === 0) @else @endif @endfor @endforeach
RefDescriptionUOMQtyUnit PriceAmount
{{ $index + 1 }} {{ $descriptionLines[$i] }} {{ $item->item->unitMeasure->name ?? 'N/A' }} {{ rtrim(rtrim(number_format($item->qty ?? 0, 2, '.', ''), '0'), '.') }} {{ number_format($item->cost ?? 0, 2, '.', ',') }} {{ number_format($item->amount ?? 0, 2, '.', ',') }} {{ $descriptionLines[$i] }}
TOTAL: {{ number_format($totalAmount, 2, '.', ',') }}
Total Value of Supply: Rs. {{ number_format($po->amount ?? 0, 2, '.', ',') }}
@if (isset($po->discount_amount) && $po->discount_amount > 0)
Discount ({{ number_format($po->discount_percentage ?? 0, 2) }}%): Rs. {{ number_format($po->discount_amount ?? 0, 2, '.', ',') }}
Net Amount: Rs. {{ number_format($po->net_amount ?? 0, 2, '.', ',') }}
@endif @if (isset($po->vat_status) && $po->vat_status == 1)
VAT Amount (18%): Rs. {{ number_format($po->vat ?? 0, 2, '.', ',') }}
@endif
Total Amount including VAT: Rs. {{ number_format($po->grand_total ?? 0, 2, '.', ',') }}
@endsection PKk]`jV002pages/purchase/partials/reciept/pr_print.blade.phpnuW+A{{-- resources/views/pages/purchase/partials/receipt/pr_print.blade.php --}} @extends('layouts.recipt-header') @section('title', 'Purchase Return - ' . ($pr->purchase_return_scl ?? 'PR-' . str_pad($pr->id, 6, '0', STR_PAD_LEFT))) @section('invoice-title', 'Purchase Return') @section('content')
Supplier's TIN: {{ $pr->supplier->tin ?? 'N/A' }}
Supplier's Name: {{ $pr->supplier->company_name ?? 'N/A' }}
Address: {{ $pr->supplier->address ?? 'N/A' }}
Telephone No: {{ $pr->supplier->phone ?? 'N/A' }}
Company's TIN: {{ $company->tin ?? 'N/A' }}
Company's Name: {{ $company->company_name ?? 'N/A' }}
Address: {{ $company->address ?? 'N/A' }}
Telephone No: {{ $company->phone ?? 'N/A' }}
Return ID:{{ $pr->purchase_return_scl ?? 'PR-' . str_pad($pr->id, 6, '0', STR_PAD_LEFT) }}
Date:{{ $pr->doc_date ? \Carbon\Carbon::parse($pr->doc_date)->format('m/d/Y') : 'N/A' }}
Reference No:{{ $pr->ref_no ?? 'N/A' }}
Supplier Invoice No:{{ $pr->supplier_invoice_no ?? 'N/A' }}
@php $totalQty = 0; $rowsPerPage = 18; $currentRow = 0; @endphp @foreach ($pr->items as $index => $item) @php $totalQty += $item->qty ?? 0; $itemName = $item->item->name ?? 'N/A'; $itemCode = $item->item->itemcode ?? ''; $description = $itemCode ? "$itemCode - $itemName" : $itemName; if (!empty($item->item_description)) { $description .= ' ' . $item->item_description; } $descriptionLines = []; $words = explode(' ', str_replace("\n", ' ', $description)); $currentLine = ''; foreach ($words as $word) { $test = $currentLine ? $currentLine . ' ' . $word : $word; if (mb_strlen($test) <= 55) { $currentLine = $test; } else { if ($currentLine) { $descriptionLines[] = $currentLine; } $currentLine = $word; } } if ($currentLine) { $descriptionLines[] = $currentLine; } $totalLinesForThisItem = count($descriptionLines); @endphp @for ($i = 0; $i < $totalLinesForThisItem; $i++) @php $currentRow++; if ($currentRow > $rowsPerPage) { echo '
Ref Description Batch/Serial Expiry Qty Cost Sales Price Amount
'; echo '
'; echo '
Purchase Return
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $currentRow = 1; } @endphp @if ($i === 0) @else @endif @endfor @endforeach
RefDescriptionBatch/SerialExpiryQtyCostSales PriceAmount
{{ $index + 1 }} {{ $descriptionLines[$i] }} {{ $item->batch_no ?? ($item->serial_no ?? '-') }} {{ $item->expiry ? \Carbon\Carbon::parse($item->expiry)->format('m/d/Y') : '-' }} {{ rtrim(rtrim(number_format($item->qty ?? 0, 2, '.', ''), '0'), '.') }} {{ number_format($item->cost ?? 0, 2, '.', ',') }} {{ number_format($item->sales_price ?? 0, 2, '.', ',') }} {{ number_format($item->amount ?? 0, 2, '.', ',') }} {{ $descriptionLines[$i] }}
TOTAL: {{ rtrim(rtrim(number_format($totalQty, 2, '.', ''), '0'), '.') }} {{ number_format($pr->amount ?? 0, 2, '.', ',') }}
Sub Total: Rs. {{ number_format($pr->sub_total ?? 0, 2, '.', ',') }}
@if (($pr->discount ?? 0) > 0) @php $discountPercentage = ($pr->sub_total ?? 0) > 0 ? (($pr->discount / $pr->sub_total) * 100) : 0; $netAmount = ($pr->sub_total ?? 0) - ($pr->discount ?? 0); @endphp
Discount ({{ number_format($discountPercentage, 2) }}%): Rs. {{ number_format($pr->discount, 2, '.', ',') }}
Net Amount: Rs. {{ number_format($netAmount, 2, '.', ',') }}
@endif @if (isset($pr->vat_status) && $pr->vat_status == 1)
VAT Amount (18%): Rs. {{ number_format($pr->vat_amount ?? 0, 2, '.', ',') }}
@endif
Grand Total: Rs. {{ number_format($pr->grand_total ?? 0, 2, '.', ',') }}
@endsection PKk]jj4pages/purchase/partials/reciept/pr_print.bladenn.phpnuW+A Purchase Return - {{ $pr->purchase_return_scl ?? 'PR-' . str_pad($pr->id, 6, '0', STR_PAD_LEFT) }} @php $ROWS_PER_PAGE = 12; // <-- change row count here $chunks = $pr->items->values()->chunk($ROWS_PER_PAGE); $totalPages = $chunks->count(); $totalQtyAll = $pr->items->sum(fn($x) => (float) ($x->qty ?? 0)); @endphp @foreach ($chunks as $pageIndex => $pageItems) @endforeach PKk]@$$;pages/purchase/partials/reciept/purchase_mr_print.blade.phpnuW+A@extends('layouts.recipt-header') @section('title', 'Material Request - ' . ($mr->mr_no ?? 'MR-' . str_pad($mr->id, 6, '0', STR_PAD_LEFT))) @section('invoice-title', 'Material Request') @section('content')
MR No: {{ $mr->mr_no ?? 'N/A' }}
MR Date: {{ $mr->mr_date ? \Carbon\Carbon::parse($mr->mr_date)->format('m/d/Y') : 'N/A' }}
Notes: {{ $mr->notes ?? 'N/A' }}
Job No: {{ $mr->job_no ?? 'N/A' }}
Required Date: {{ $mr->required_date ? \Carbon\Carbon::parse($mr->required_date)->format('m/d/Y') : 'N/A' }}
Status: @php $st = strtolower($mr->status ?? ''); @endphp {{ $mr->status ?? 'N/A' }}
@php $totalQty = 0; $rowsPerPage = 20; $currentRow = 0; @endphp @foreach ($mr->items as $index => $item) @php $totalQty += $item->qty ?? 0; $itemName = $item->item->name ?? 'N/A'; $itemCode = $item->item->itemcode ?? ''; $description = $itemCode ? "$itemCode - $itemName" : $itemName; if (!empty($item->item_description)) { $description .= ' ' . $item->item_description; } $descriptionLines = []; $words = explode(' ', str_replace("\n", ' ', $description)); $currentLine = ''; foreach ($words as $word) { $test = $currentLine ? $currentLine . ' ' . $word : $word; if (mb_strlen($test) <= 60) { $currentLine = $test; } else { if ($currentLine) { $descriptionLines[] = $currentLine; } $currentLine = $word; } } if ($currentLine) { $descriptionLines[] = $currentLine; } $totalLinesForThisItem = count($descriptionLines); @endphp @for ($i = 0; $i < $totalLinesForThisItem; $i++) @php $currentRow++; if ($currentRow > $rowsPerPage) { echo '
Ref Description Qty Est. Cost Amount
'; echo '
'; echo '
Material Request
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $currentRow = 1; } @endphp @if ($i === 0) @else @endif @endfor @endforeach
RefDescriptionQtyEst. CostAmount
{{ $index + 1 }} {{ $descriptionLines[$i] }} {{ rtrim(rtrim(number_format($item->qty ?? 0, 2, '.', ''), '0'), '.') }} {{ number_format($item->estimated_cost ?? 0, 2, '.', ',') }} {{ number_format($item->amount ?? 0, 2, '.', ',') }} {{ $descriptionLines[$i] }}
TOTAL: {{ rtrim(rtrim(number_format($totalQty, 2, '.', ''), '0'), '.') }} Rs. {{ number_format($mr->sub_total ?? 0, 2, '.', ',') }}
Sub Total: Rs. {{ number_format($mr->sub_total ?? 0, 2, '.', ',') }}
@endsection PKk]_FZZ<pages/purchase/partials/recipt_print/grn_print_css.blade.phpnuW+A{{-- File: resources/views/pages/purchase/partials/recipt_print/grn_print_css.blade.php --}} PKk]p;pages/purchase/partials/recipt_print/po_print_css.blade.phpnuW+A PKk](I9$pages/purchase/purchase_mr.blade.phpnuW+A{{-- resources/views/pages/purchase/purchase_mr.blade.php --}} @extends('layouts.app') @section('title', 'Purchase MR') @section('content') @push('styles') @endpush

Purchase MR

MR List {{ $mrs->total() ?? '' }}
Create MR
@include('pages.purchase.partials.pmr_rows', ['mrs' => $mrs])
No MR No Job No MR Date Required Status Sub Total Actions
{{-- ========================================================= ADD MR MODAL (FULLSCREEN) ========================================================= --}} {{-- ========================================================= VIEW MR MODAL ========================================================= --}} @endsection @push('scripts') @endpushPKk]6tt(pages/purchase/purchase_orders.blade.phpnu[{{-- File: resources/views/pages/purchase/purchase_orders.blade.php --}} @extends('layouts.app') @section('title', 'Purchase Orders') @section('content') {{-- Print CSS payload used by iframe --}} @include('pages.purchase.partials.recipt_print.po_print_css') {{-- Page Title + Breadcrumb --}}

Purchase Orders

{{-- Top bar --}}
Purchase Order List {{ $purchaseOrders->total() ?? '' }}
Add Purchase Order
{{-- Table --}}
@include('pages.purchase.partials.purchase_order_rows', ['purchaseOrders' => $purchaseOrders])
No PO No Date Supplier Received Ref No Status Actions
{{-- ========================================================= ADD PO MODAL ========================================================= --}} {{-- ========================================================= EDIT PO MODAL ========================================================= --}} {{-- ========================= VIEW PO MODAL ========================= --}} {{-- ========================= PRINT PO MODAL ========================= --}} {{-- ✅ Hidden iframe used for printing (isolated print, NO duplicates) --}} @endsection @push('scripts') @endpushPKk];;)pages/purchase/purchase_returns.blade.phpnu[@extends('layouts.app') @section('title', 'Purchase Returns') @section('content') {{-- ======================================== STYLES ======================================== --}} {{-- ======================================== PAGE HEADER & BREADCRUMB ======================================== --}}

Purchase Returns

{{-- ======================================== TOP BAR (Title, Search, Create Button) ======================================== --}}
Purchase Return List {{ $purchaseReturns->total() ?? '' }}
Create Purchase Return
{{-- ======================================== TABLE - Purchase Returns List ======================================== --}}
@include('pages.purchase.partials.purchase_return_rows', [ 'purchaseReturns' => $purchaseReturns, ])
No Return ID Date Supplier Return Qty Ref No Amount Status Actions
{{-- ======================================== MODAL - ADD PURCHASE RETURN ======================================== --}} {{-- ======================================== MODAL - VIEW PURCHASE RETURN ======================================== --}} @endsection @push('scripts') @endpush PKk]X!$pages/sales/dispatch_notes.blade.phpnu[{{-- resources/views/pages/sales/dispatch_notes.blade.php --}} @extends('layouts.app') @section('title', 'Good Issue Notes') @section('content') @push('styles') @endpush {{-- PAGE TITLE --}}

Good Issue Notes

{{-- HEADER BAR --}}
GIN List {{ $dns->total() ?? '' }}
Create GIN
{{-- LIST TABLE --}}
@include('pages.sales.partials.dn_rows', ['dns' => $dns])
No GIN No Date Store SR Job Status Actions
{{-- ========================================================= ADD DN MODAL (FULLSCREEN) - MR BASED ========================================================= --}} {{-- ========================================================= VIEW DN MODAL ========================================================= --}} {{-- SERIAL ENTRY MODAL --}} @endsection @push('scripts') @endpushPKk]pages/sales/invoices.blade.phpnuW+A{{-- resources/views/pages/sales/invoices.blade.php --}} @extends('layouts.app') @section('title', 'Invoices') @section('content') {{-- PAGE HEADER --}}

Invoices

{{-- TOP BAR --}}
Invoice List {{ $invoices->total() ?? '' }}
Create Job Invoice
{{-- TABLE --}}
@include('pages.sales.partials.invoice_rows', ['invoices' => $invoices])
No Invoice No Date Job Customer Grand Total Status Actions
{{-- MODAL - ADD INVOICE --}} {{-- VIEW MODAL --}} @endsection @push('scripts') @endpush PKk]0bn!pages/sales/job_returns.blade.phpnuW+A{{-- resources/views/pages/sales/job_returns.blade.php --}} @extends('layouts.app') @section('title', 'Job Returns') @push('styles') @endpush @section('content') {{-- PAGE TITLE --}}

Job Returns

{{-- HEADER BAR --}}
Job Return List {{ $returns->total() ?? '' }}
Create Job Return
{{-- LIST TABLE --}}
@include('pages.sales.partials.job_return_rows', ['returns' => $returns])
No JR No Date Store Job Status Actions
{{-- ADD MODAL --}} {{-- VIEW MODAL (same pattern as your GIN view) --}} {{-- SERIAL ENTRY MODAL (same as yours) --}} @endsection @push('scripts') @endpushPKk]6nFF'pages/sales/material_requests.blade.phpnu[{{-- resources/views/pages/sales/material_requests.blade.php --}} @extends('layouts.app') @section('title', 'Material Requests') @section('content') @php use Illuminate\Support\Str; @endphp @push('styles') @endpush {{-- PAGE TITLE --}}

Store Requests

{{-- HEADER BAR --}}
SR List {{ $mrs->total() ?? '' }}
Create SR
{{-- LIST TABLE --}}
@include('pages.sales.partials.mr_rows', ['mrs' => $mrs])
No SR No Date Job Status Actions
{{-- ========================================================= ADD MR MODAL (FULLSCREEN) ========================================================= --}} {{-- ========================================================= EDIT MR MODAL (FULLSCREEN) ========================================================= --}} {{-- ========================================================= VIEW MR MODAL ========================================================= --}} @endsection @push('scripts') @endpushPKk]pv/+pages/sales/non_stock_job_costing.blade.phpnuW+A@extends('layouts.app') @section('title', 'Non-Stock Job Costing') @section('content') @push('styles') @endpush {{-- Page title --}}

Non-Stock Job Costing

{{-- Top bar --}}
NS Cost List {{ $records->total() ?? '' }}
Create Cost Doc
{{-- Table --}}
@include('pages.sales.partials.non_stock_job_costing_rows', ['records' => $records])
No Doc No Date Job Status Sub Total VAT SSCL Grand Total Actions
{{-- ========================================================= ADD MODAL (FULLSCREEN) ========================================================= --}} {{-- ========================================================= VIEW MODAL ========================================================= --}} @endsection @push('scripts') @endpushPKk]'##&pages/sales/partials/dn_rows.blade.phpnu[@forelse($dns as $i => $dn) @php $status = strtolower($dn->status ?? ''); @endphp {{-- ROW NUMBER --}} {{ ($dns->currentPage() - 1) * $dns->perPage() + $i + 1 }} {{-- DN NO --}}
{{ $dn->dn_no ?? ('DN#' . $dn->id) }}
{{ $dn->dn_date }}
{{-- DN DATE --}} {{ $dn->dn_date }} {{-- STORE --}} {{ $dn->store_name ?? ('Store ' . $dn->multi_store_id) }} {{-- MATERIAL REQUEST --}} @if(!empty($dn->mr_no)) {{ $dn->mr_no }} @else @endif {{-- JOB --}} @if(!empty($dn->job_no)) {{ $dn->job_no }} @else @endif {{-- STATUS --}} @php $statusClass = match ($dn->status) { 'Draft' => 'bg-secondary', 'Submitted' => 'bg-warning text-dark', 'Approved' => 'bg-success', 'Rejected' => 'bg-danger', 'Cancelled' => 'bg-dark', default => 'bg-light text-dark', }; @endphp {{ $dn->status }} {{-- ACTIONS --}} {{-- View --}} {{-- Print --}} {{-- Submit (Draft only) --}} @if($status === 'draft') @endif @if(in_array($status, ['draft', 'submitted'])) @endif {{-- Approve / Reject (Submitted only) --}} @if($status === 'submitted') @endif {{-- Delete (Draft only) --}} @if($status === 'draft') @endif @empty No Dispatch Notes found @endforelsePKk]܌AA/pages/sales/partials/invoice_item_row.blade.phpnuW+A{{-- resources/views/pages/sales/partials/invoice_item_row.blade.php --}} 0.00 PKk]>.r+pages/sales/partials/invoice_rows.blade.phpnuW+A@php $i = ($invoices->currentPage() - 1) * $invoices->perPage(); @endphp @forelse($invoices as $inv) @php $i++; @endphp {{ $i }} {{ $inv->invoice_no }} {{ optional($inv->doc_date)->format('Y-m-d') }} {{ $inv->job?->job_no ?? '-' }} {{ $inv->customer?->display_name ?? $inv->customer?->company_name ?? '-' }} {{ number_format((float)$inv->grand_total, 2) }} @php $st = strtolower((string)$inv->status); @endphp @if($st === 'approved') Approved @elseif($st === 'draft') Draft @else {{ $inv->status }} @endif @if(strtolower((string)$inv->status) === 'draft') @endif @empty No invoices found. @endforelse PKk] NN.pages/sales/partials/job_return_rows.blade.phpnuW+A@php $i = ($returns->currentPage() - 1) * $returns->perPage(); @endphp @forelse($returns as $r) @php $status = strtolower($r->status ?? ''); @endphp {{ ++$i }} {{ $r->jr_no }} {{ $r->jr_date }} {{ $r->multi_store_id }} {{ $r->job_no ?? '-' }} @php $cls = $r->status === 'Approved' ? 'success' : ($r->status === 'Submitted' ? 'warning' : 'secondary'); @endphp {{ $r->status }} {{-- View --}} {{-- Approve --}} @if(in_array($status, ['draft','submitted'])) @endif {{-- Delete (hidden after approved) --}} @if($status !== 'approved') @endif @empty No records found. @endforelsePKk]891 1 &pages/sales/partials/mr_rows.blade.phpnu[{{-- resources/views/pages/sales/partials/mr_rows.blade.php --}} @php $n = ($mrs->currentPage() - 1) * $mrs->perPage(); @endphp @forelse($mrs as $mr) @php $status = strtolower($mr->status ?? 'draft'); $isSubmitted = $status === 'submitted'; $isApproved = $status === 'approved'; @endphp {{ ++$n }} {{ $mr->mr_no ?? ('SR-' . $mr->id) }} {{ $mr->mr_date ?? '-' }}
{{ $mr->job_no ?? ($mr->job->job_no ?? '-') }}
{{ $mr->customer_name ?? ($mr->job->customer_name ?? '') }}
@php $st = $mr->status ?? 'Draft'; $cls = 'bg-secondary-subtle text-secondary'; if ($st === 'Approved') $cls = 'bg-success-subtle text-success'; elseif ($st === 'Submitted') $cls = 'bg-primary-subtle text-primary'; elseif ($st === 'Rejected') $cls = 'bg-danger-subtle text-danger'; elseif ($st === 'Cancelled') $cls = 'bg-dark-subtle text-dark'; @endphp {{ $st }} {{-- ACTIONS --}} {{-- View --}} {{-- Print --}} {{-- Edit (only when not Approved) --}} @if(!$isApproved) @endif {{-- Approve --}} @if($isSubmitted) @endif {{-- Delete --}} @empty No records found. @endforelsePKk]$ 9pages/sales/partials/non_stock_job_costing_rows.blade.phpnuW+A@php $i = ($records->currentPage() - 1) * $records->perPage(); @endphp @forelse($records as $r) @php $status = strtolower($r->status ?? ''); $isSubmitted = $status === 'submitted'; @endphp {{ ++$i }}
{{ $r->doc_no }}
@if($r->reference_no)
Ref: {{ $r->reference_no }}
@endif {{ $r->doc_date?->format('Y-m-d') ?? $r->doc_date }}
{{ $r->job->job_no ?? ('Job #' . $r->job_id) }}
{{ $r->job->customer_name ?? '' }}
@php $st = strtolower($r->status ?? ''); $cls = match ($st) { 'draft' => 'bg-warning', 'submitted' => 'bg-info', 'approved' => 'bg-success', 'rejected' => 'bg-danger', default => 'bg-secondary', }; @endphp {{ $r->status }} {{ number_format((float) ($r->sub_total ?? 0), 2) }} @if(($r->vat_amount ?? 0) > 0) {{ number_format((float) $r->vat_amount, 2) }} @else - @endif @if(($r->sscl_amount ?? 0) > 0) {{ number_format((float) $r->sscl_amount, 2) }} @else - @endif {{ number_format((float) ($r->grand_total ?? 0), 2) }} {{-- ACTIONS --}} {{-- View --}} {{-- Approve --}} @if($isSubmitted) @endif {{-- Delete (hide after approved) --}} @if($status !== 'approved') @endif @empty No records found. @endforelsePKk]../pages/sales/partials/receipt/dn_print.blade.phpnu[{{-- resources/views/pages/sales/partials/receipt/dispatch_note_print.blade.php --}} @extends('layouts.recipt-header') @section('title', 'Dispatch Note - ' . ($dn->dn_no ?? 'DN-' . str_pad($dn->id, 6, '0', STR_PAD_LEFT))) @section('invoice-title', 'Good Issue Note') @section('content')
GIN No: {{ $dn->dn_no ?? 'DN-' . str_pad($dn->id, 6, '0', STR_PAD_LEFT) }}
Date: {{ $dn->dn_date ? \Carbon\Carbon::parse($dn->dn_date)->format('m/d/Y') : 'N/A' }}
SR No: {{ $dn->mr_no ?? ($dn->materialRequest->mr_no ?? 'N/A') }}
Store: {{ $dn->store_name ?? ($dn->store->name ?? 'Store ' . $dn->multi_store_id) }}
Job No: {{ $dn->job_no ?? 'N/A' }}
Description: {{ $dn->notes ?? 'N/A' }}
Customer: {{ $dn->customer_name ?? 'N/A' }}
@php $totalIssuedQty = 0; $totalAmount = 0; $rowsPerPage = 20; $currentRow = 0; @endphp @foreach ($dn->items as $index => $item) @php $totalIssuedQty += $item->issued_qty ?? 0; $totalAmount += $item->amount ?? 0; $itemName = $item->item->name ?? $item->item_name ?? 'N/A'; $itemCode = $item->item->itemcode ?? ''; $description = $itemCode ? "$itemCode - $itemName" : $itemName; if (!empty($item->item_description)) { $description .= ' ' . $item->item_description; } if (!empty($item->remarks)) { $description .= ' ' . $item->remarks; } $descriptionLines = []; $words = explode(' ', str_replace("\n", ' ', $description)); $currentLine = ''; foreach ($words as $word) { $test = $currentLine ? $currentLine . ' ' . $word : $word; if (mb_strlen($test) <= 45) { $currentLine = $test; } else { if ($currentLine) { $descriptionLines[] = $currentLine; } $currentLine = $word; } } if ($currentLine) { $descriptionLines[] = $currentLine; } $totalLinesForThisItem = count($descriptionLines); @endphp @for ($i = 0; $i < $totalLinesForThisItem; $i++) @php $currentRow++; if ($currentRow > $rowsPerPage) { echo '
Ref Item Description Unit Source Issued Qty Batch No Serial No Expiry Date Unit Cost
'; echo '
'; echo '
Good Issue Note
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $currentRow = 1; } @endphp @if ($i === 0) @else @endif @endfor @endforeach
RefItem DescriptionUnitSourceIssued QtyBatch NoSerial NoExpiry DateUnit Cost
{{ $index + 1 }} {{ $descriptionLines[$i] }} {{ $item->item->unitMeasure->name ?? '-' }} {{ $item->source_type ?? 'MR' }} {{ rtrim(rtrim(number_format($item->issued_qty ?? 0, 2, '.', ''), '0'), '.') }} {{ $item->batch_no ?? '-' }} {{ $item->serial_nos ?? '-' }} {{ $item->expire_date_no ?? '-' }} {{ number_format($item->unit_cost ?? 0, 2, '.', ',') }} {{ $descriptionLines[$i] }}
TOTAL: {{ rtrim(rtrim(number_format($totalIssuedQty, 2, '.', ''), '0'), '.') }}
Total Issued Quantity: {{ rtrim(rtrim(number_format($totalIssuedQty, 2, '.', ''), '0'), '.') }}
@endsectionPKk]g^!^!/pages/sales/partials/receipt/mr_print.blade.phpnu[@extends('layouts.recipt-header') @section('title', 'Store Request - ' . ($mr->mr_no ?? 'ST-' . str_pad($mr->id, 6, '0', STR_PAD_LEFT))) @section('invoice-title', 'Store Request') @section('content')
ST No: {{ $mr->st_no ?? 'ST-' . str_pad($mr->id, 6, '0', STR_PAD_LEFT) }}
Date: {{ $mr->mr_date ? \Carbon\Carbon::parse($mr->mr_date)->format('m/d/Y') : 'N/A' }}
Description: {{ $mr->notes ?? 'N/A' }}
Job No: {{ $mr->job_no ?? ($mr->job->job_no ?? 'N/A') }}
Customer: {{ $mr->customer_name ?? ($mr->job->customer->display_name ?? $mr->job->customer->company_name ?? 'N/A') }}
Status: {{ $mr->status ?? 'Draft' }}
@php $rowsPerPage = 20; $currentRow = 0; @endphp @foreach ($mr->items as $index => $item) @php $itemName = $item->item->name ?? $item->item_name ?? 'N/A'; $itemCode = $item->item->itemcode ?? ''; $description = $itemCode ? "$itemCode - $itemName" : $itemName; if (!empty($item->item_description)) { $description .= ' ' . $item->item_description; } if (!empty($item->note)) { $description .= ' ' . $item->note; } $descriptionLines = []; $words = explode(' ', str_replace("\n", ' ', $description)); $currentLine = ''; foreach ($words as $word) { $test = $currentLine ? $currentLine . ' ' . $word : $word; if (mb_strlen($test) <= 50) { $currentLine = $test; } else { if ($currentLine) { $descriptionLines[] = $currentLine; } $currentLine = $word; } } if ($currentLine) { $descriptionLines[] = $currentLine; } $totalLinesForThisItem = count($descriptionLines); @endphp @for ($i = 0; $i < $totalLinesForThisItem; $i++) @php $currentRow++; if ($currentRow > $rowsPerPage) { echo '
Ref Item Description Source UOM Qty
'; echo '
'; echo '
Store Request
'; echo ''; echo ''; $currentRow = 1; } @endphp @if ($i === 0) @else @endif @endfor @endforeach
Ref Item Description Source UOM Qty
{{ $index + 1 }} {{ $descriptionLines[$i] }} {{ $item->source_type ?? 'JOB' }} {{ \App\Models\UnitOfMeasurement::find($item->unit_of_measurement_id)->name ?? '-' }} {{ rtrim(rtrim(number_format($item->requested_qty ?? 0, 2, '.', ''), '0'), '.') }} {{ $descriptionLines[$i] }}
@endsectionPKk]D:E7E7=pages/sales/partials/receipt/sales_estimation_print.blade.phpnu[@extends('layouts.recipt-header') @section('title', 'Sales Estimation - ' . ($estimation->doc_no ?? 'SE-' . str_pad($estimation->id, 6, '0', STR_PAD_LEFT))) @section('invoice-title', 'Job Card') @section('content')
Job No: {{ $estimation->job->job_no ?? 'N/A' }}
Date: {{ $estimation->doc_date ? \Carbon\Carbon::parse($estimation->doc_date)->format('m/d/Y') : 'N/A' }}
Project Value: Rs. {{ number_format($estimation->job_value ?? 0, 2, '.', ',') }}
GP: Rs. {{ number_format($gp, 2, '.', ',') }}
GP %: {{ number_format($gpPct, 2) }}%
Customer: {{ $estimation->customer->display_name ?? ($estimation->customer->company_name ?? 'N/A') }}
Description: {{ $estimation->job->notes ?? 'N/A' }}
@php $groupedItems = $estimation->items->groupBy(function ($i) { return trim($i->item->category->name ?? 'Other'); }); $bottomKeywords = [ 'NON-STOCK', 'LABOUR', 'LABOR', 'TRANSPORT', 'OTHER MATERIAL', 'OTHER MATERIALS', ]; $normalGroups = collect(); $bottomGroups = collect(); foreach ($groupedItems as $categoryName => $items) { $upperName = strtoupper(trim($categoryName)); $isBottom = collect($bottomKeywords)->contains(function ($keyword) use ($upperName) { return str_contains($upperName, $keyword); }); if ($isBottom) { $bottomGroups->put($categoryName, $items); } else { $normalGroups->put($categoryName, $items); } } // Merge normal first + special categories last $groupedItems = $normalGroups->merge($bottomGroups); $index = 1; $totalQty = 0; $rowsPerPage = 20; $currentRow = 0; @endphp @foreach ($groupedItems as $categoryName => $items) {{-- CATEGORY HEADER --}} @foreach ($items as $item) @php $totalQty += $item->qty ?? 0; $itemName = $item->item->name ?? 'N/A'; $itemCode = $item->item->itemcode ?? ''; $description = $itemCode ? "$itemCode - $itemName" : $itemName; if (!empty($item->item_description)) { $description .= ' ' . $item->item_description; } if (!empty($item->note)) { $description .= ' ' . $item->note; } /* UOM comes from Item model relationship: Item -> unitMeasure() If your UnitOfMeasurement table column is not "name", change "name" below to your actual column. */ $uom = $item->item->unitMeasure->name ?? $item->item->unitMeasure->unit_name ?? $item->item->unitMeasure->symbol ?? $item->item->unitMeasure->code ?? '-'; $descriptionLines = []; $words = explode(' ', str_replace("\n", ' ', $description)); $currentLine = ''; foreach ($words as $word) { $test = $currentLine ? $currentLine . ' ' . $word : $word; if (mb_strlen($test) <= 60) { $currentLine = $test; } else { if ($currentLine) { $descriptionLines[] = $currentLine; } $currentLine = $word; } } if ($currentLine) { $descriptionLines[] = $currentLine; } $totalLinesForThisItem = count($descriptionLines); @endphp @for ($i = 0; $i < $totalLinesForThisItem; $i++) @if ($i === 0) @else @endif @endfor @endforeach @endforeach
Ref Description Qty UOM Unit Cost Amount
{{ $categoryName }}
{{ $index }} @php $index++; @endphp {{ $descriptionLines[$i] }} {{ rtrim(rtrim(number_format($item->qty ?? 0, 2, '.', ''), '0'), '.') }} {{ $uom }} {{ number_format($item->cost ?? 0, 2, '.', ',') }} {{ number_format(($item->qty ?? 0) * ($item->cost ?? 0), 2, '.', ',') }} {{ $descriptionLines[$i] }}
TOTAL: {{ rtrim(rtrim(number_format($totalQty, 2, '.', ''), '0'), '.') }} Rs. {{ number_format($estimation->items->sum(fn($i) => ($i->qty ?? 0) * ($i->cost ?? 0)), 2, '.', ',') }}
Sub Total: @php $costTotal = $estimation->items->sum(fn($i) => ($i->qty ?? 0) * ($i->cost ?? 0)); @endphp Rs. {{ number_format($costTotal, 2, '.', ',') }}
@if (($estimation->discount_amount ?? 0) > 0)
Discount ({{ number_format($estimation->discount_percentage ?? 0, 2) }}%): Rs. {{ number_format($estimation->discount_amount, 2, '.', ',') }}
Net Amount: Rs. {{ number_format($estimation->net_value ?? 0, 2, '.', ',') }}
@endif @if (($estimation->vat_status ?? 0) == 1)
VAT Amount ({{ number_format($estimation->vat ?? 18, 0) }}%): Rs. {{ number_format($estimation->vat_amount ?? 0, 2, '.', ',') }}
@endif
Grand Total: Rs. {{ number_format($costTotal, 2, '.', ',') }}
@endsectionPKk]@!&&9pages/sales/partials/receipt/sales_return_print.blade.phpnuW+A@extends('layouts.recipt-header') @section('title', 'Sales Return - ' . ($sr->return_no ?? 'N/A')) @section('invoice-title', 'Sales Return') @section('content')
{{-- ============================= --}} {{-- INFO SECTION --}} {{-- ============================= --}}
Return No: {{ $sr->return_no ?? 'N/A' }}
Date: {{ $sr->doc_date ? \Carbon\Carbon::parse($sr->doc_date)->format('m/d/Y') : 'N/A' }}
Customer:
{{ optional($sr->customer)->display_name ?: optional($sr->customer)->company_name ?: 'N/A' }} @if (optional($sr->customer)->customer_no)
{{ $sr->customer->customer_no }}
@endif
Ref Invoice: {{ $sr->invoice->invoice_no ?? '-' }}
{{-- ============================= --}} {{-- ITEMS TABLE --}} {{-- ============================= --}} @php $items = $sr->items->where('active', 1); $totalQty = 0; @endphp @if($items->count()) @foreach($items as $i => $item) @php $totalQty += $item->qty; @endphp @endforeach {{-- TOTAL QTY --}}
# Description Qty Rate Amount
{{ $i + 1 }} {{ $item->item_code ? $item->item_code . ' | ' : '' }} {{ $item->item_name }} {{ rtrim(rtrim(number_format($item->qty, 2), '0'), '.') }} {{ number_format($item->unit_price, 2) }} {{ number_format($item->amount, 2) }}
TOTAL QTY: {{ rtrim(rtrim(number_format($totalQty, 2), '0'), '.') }}
@endif {{-- ============================= --}} {{-- SUMMARY --}} {{-- ============================= --}} @php $subTotal = (float) $sr->sub_total; $discPct = (float) $sr->discount_percentage; $discAmt = (float) $sr->discount_amount; $net = (float) $sr->net_value; $sscl = (float) $sr->sscl_amount; $vat = (float) $sr->vat_amount; $grand = (float) $sr->grand_total; @endphp
Sub Total: Rs. {{ number_format($subTotal,2) }}
@if($discAmt > 0)
Discount ({{ number_format($discPct,2) }}%) Rs. {{ number_format($discAmt,2) }}
@endif
Net: Rs. {{ number_format($net,2) }}
@if($sr->sscl_enabled && $sscl > 0)
SSCL ({{ $sr->sscl_percentage }}%) Rs. {{ number_format($sscl,2) }}
@endif @if($sr->vat_enabled && $vat > 0)
VAT ({{ $sr->vat_percentage }}%) Rs. {{ number_format($vat,2) }}
@endif
Grand Total: Rs. {{ number_format($grand,2) }}
{{-- REMARKS --}} @if($sr->remarks)
Remarks:
{!! nl2br(e($sr->remarks)) !!}
@endif
@endsectionPKk]vM[,,/pages/sales/partials/receipt/si_print.blade.phpnuW+A{{-- resources/views/pages/sales/partials/receipt/si_print.blade.php --}} @extends('layouts.recipt-header') @section('title', 'Sales Inquiry - SI-' . str_pad($si->id, 6, '0', STR_PAD_LEFT)) @section('invoice-title', 'Sales Inquiry') @section('content')
Customer's TIN: {{ $si->customer->tin ?? 'N/A' }}
Customer's Name: {{ $si->customer->display_name ?? $si->customer->company_name ?? 'N/A' }}
Address: {{ $si->customer->address ?? 'N/A' }}
Telephone No: {{ $si->customer->phone ?? 'N/A' }}
Company's TIN: {{ $company->tin ?? 'N/A' }}
Company's Name: {{ $company->company_name ?? 'N/A' }}
Address: {{ $company->address ?? 'N/A' }}
Telephone No: {{ $company->phone ?? 'N/A' }}
SI No: SI-{{ str_pad($si->id, 6, '0', STR_PAD_LEFT) }}
Date: {{ $si->doc_date ? \Carbon\Carbon::parse($si->doc_date)->format('m/d/Y') : 'N/A' }}
Due Date: {{ $si->due_date ? \Carbon\Carbon::parse($si->due_date)->format('m/d/Y') : 'N/A' }}
Department: {{ $si->department->name ?? 'N/A' }}
Payment Term: {{ $si->paymentTerm->name ?? 'N/A' }}
Notes: {{ $si->notes ?? 'N/A' }}
@php $totalQty = 0; $rowsPerPage = 20; $currentRow = 0; @endphp @foreach ($si->items as $index => $item) @php $totalQty += $item->qty ?? 0; $itemName = $item->item->name ?? 'N/A'; $itemCode = $item->item->itemcode ?? ''; $description = $itemCode ? "$itemCode - $itemName" : $itemName; $descriptionLines = []; $words = explode(' ', str_replace("\n", ' ', $description)); $currentLine = ''; foreach ($words as $word) { $test = $currentLine ? $currentLine . ' ' . $word : $word; if (mb_strlen($test) <= 70) { $currentLine = $test; } else { if ($currentLine) { $descriptionLines[] = $currentLine; } $currentLine = $word; } } if ($currentLine) { $descriptionLines[] = $currentLine; } $totalLinesForThisItem = count($descriptionLines); @endphp @for ($i = 0; $i < $totalLinesForThisItem; $i++) @php $currentRow++; if ($currentRow > $rowsPerPage) { echo '
Ref Description Qty Cost Sales Price Amount
'; echo '
'; echo '
Sales Inquiry
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $currentRow = 1; } @endphp @if ($i === 0) @else @endif @endfor @endforeach
RefDescriptionQtyCostSales PriceAmount
{{ $index + 1 }} {{ $descriptionLines[$i] }} {{ rtrim(rtrim(number_format($item->qty ?? 0, 2, '.', ''), '0'), '.') }} {{ number_format($item->cost ?? 0, 2, '.', ',') }} {{ number_format($item->sales_price ?? 0, 2, '.', ',') }} {{ number_format($item->amount ?? 0, 2, '.', ',') }} {{ $descriptionLines[$i] }}
TOTAL: {{ rtrim(rtrim(number_format($totalQty, 2, '.', ''), '0'), '.') }} {{ number_format($si->sub_total ?? 0, 2, '.', ',') }}
Total Value of Supply: Rs. {{ number_format($si->sub_total ?? 0, 2, '.', ',') }}
@if (($si->discount ?? 0) > 0) @php $discountPercentage = ($si->sub_total ?? 0) > 0 ? (($si->discount / $si->sub_total) * 100) : 0; @endphp
Discount ({{ number_format($discountPercentage, 2) }}%): Rs. {{ number_format($si->discount, 2, '.', ',') }}
Net Amount: Rs. {{ number_format($si->net_value ?? 0, 2, '.', ',') }}
@endif @if (isset($si->vat_status) && $si->vat_status == 1)
VAT Amount (18%): Rs. {{ number_format($si->vat_amount ?? 0, 2, '.', ',') }}
@endif
Total Amount including VAT: Rs. {{ number_format($si->grand_total ?? 0, 2, '.', ',') }}
@endsection PKk]P`i{d-d-?pages/sales/partials/receipt/supplement_request_print.blade.phpnu[@extends('layouts.recipt-header') @section('title', 'Supplement Request - ' . ($sr->sr_no ?? 'SR-' . str_pad($sr->id, 6, '0', STR_PAD_LEFT))) @section('invoice-title', 'Supplement Request') @section('content')
SR No: {{ $sr->sr_no ?? 'N/A' }}
Date: {{ $sr->sr_date ? \Carbon\Carbon::parse($sr->sr_date)->format('m/d/Y') : 'N/A' }}
Description: {{ $sr->notes ?? 'N/A' }}
Customer: {{ $sr->job->customer_name ?? 'N/A' }}
Job No: {{ $sr->job->job_no ?? ($sr->job_no ?? 'N/A') }}
Status: {{ $sr->status ?? 'N/A' }}
Pricing: {{ $sr->pricing_note ?? ($sr->pricing_source ?? 'N/A') }}
@php $totalQty = 0; $rowsPerPage = 20; $currentRow = 0; @endphp @foreach ($sr->items as $index => $item) @php $totalQty += $item->qty ?? 0; $uomName = $item->uom_name ?? ''; $itemName = $item->item_name ?? 'N/A'; $description = $itemName; if (!empty($item->item_description)) { $description .= ' ' . $item->item_description; } $descriptionLines = []; $words = explode(' ', str_replace("\n", ' ', $description)); $currentLine = ''; foreach ($words as $word) { $test = $currentLine ? $currentLine . ' ' . $word : $word; if (mb_strlen($test) <= 55) { $currentLine = $test; } else { if ($currentLine) { $descriptionLines[] = $currentLine; } $currentLine = $word; } } if ($currentLine) { $descriptionLines[] = $currentLine; } $totalLinesForThisItem = count($descriptionLines); @endphp @for ($i = 0; $i < $totalLinesForThisItem; $i++) @php $currentRow++; if ($currentRow > $rowsPerPage) { echo '
Ref Description Qty UOM Unit Price Amount
'; echo '
'; echo '
Supplement Request
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $currentRow = 1; } @endphp @if ($i === 0) @else @endif @endfor @endforeach
RefDescriptionQtyUOMUnit PriceAmount
{{ $index + 1 }} {{ $descriptionLines[$i] }} {{ rtrim(rtrim(number_format($item->qty ?? 0, 2, '.', ''), '0'), '.') }} {{ $uomName }} {{ number_format($item->unit_cost ?? 0, 2, '.', ',') }} {{ number_format(($item->qty ?? 0) * ($item->unit_cost ?? 0), 2, '.', ',') }} {{ $descriptionLines[$i] }}
TOTAL: {{ rtrim(rtrim(number_format($totalQty, 2, '.', ''), '0'), '.') }} Rs. {{ number_format($sr->sub_total ?? 0, 2, '.', ',') }}
Sub Total: Rs. {{ number_format($sr->sub_total ?? 0, 2, '.', ',') }}
@if (isset($sr->discount_amount) && $sr->discount_amount > 0)
Discount ({{ number_format($sr->discount_percentage ?? 0, 2) }}%): Rs. {{ number_format($sr->discount_amount ?? 0, 2, '.', ',') }}
Net Amount: Rs. {{ number_format($sr->net_value ?? 0, 2, '.', ',') }}
@endif @if (isset($sr->vat_status) && $sr->vat_status == 1)
VAT Amount ({{ number_format($sr->vat_percentage ?? 18, 0) }}%): Rs. {{ number_format($sr->vat_amount ?? 0, 2, '.', ',') }}
@endif
Grand Total: Rs. {{ number_format($sr->grand_total ?? 0, 2, '.', ',') }}
@endsectionPKk]--0pages/sales/partials/receipt/ejc_print.blade.phpnu[@extends('layouts.recipt-header') @section('title', 'Employee Job Cost - ' . ($doc->doc_no ?? 'EJC-' . str_pad($doc->id, 6, '0', STR_PAD_LEFT))) @section('invoice-title', 'Employee Job Costing') @section('content')
{{-- ── HEADER INFO GRID ── --}} {{-- ── HEADER INFO GRID ── --}}
EJC No
{{ $doc->doc_no ?? 'EJC-' . str_pad($doc->id, 6, '0', STR_PAD_LEFT) }}
Date
{{ $doc->doc_date ? \Carbon\Carbon::parse($doc->doc_date)->format('m/d/Y') : 'N/A' }}
Status
{{ $doc->status ?? 'N/A' }}
Reference No
{{ $doc->reference_no ?? 'N/A' }}
Shift
{{ $doc->shift_checkin ?? '08:00' }} – {{ $doc->shift_checkout ?? '17:00' }} @if($doc->shift_break) (Break: {{ $doc->shift_break }}h) @endif
Day Type
@if($doc->is_holiday) Holiday @elseif($doc->is_sunday) Sunday @elseif($doc->is_saturday) Saturday @else Normal Day @endif
Remarks
{{ $doc->remarks ?? 'N/A' }}
{{-- ── ITEMS TABLE ── --}} @php $grandRowNum = 0; $totalWorkHours = 0; $totalOtHours = 0; $totalNormal = 0; $totalOt = 0; $totalAmount = 0; $sortedEmployeeLines = collect(); foreach ($doc->items as $item) { foreach ($item->employeeLines as $line) { $sortedEmployeeLines->push([ 'item' => $item, 'line' => $line, ]); } } $sortedEmployeeLines = $sortedEmployeeLines->sortBy(function ($row) { return (int) ( $row['line']->employee->emp_code ?? $row['line']->employee->employee_no ?? $row['line']->employee->employee_code ?? $row['line']->employee_id ); }); @endphp @foreach ($sortedEmployeeLines as $row) @php $item = $row['item']; $line = $row['line']; $grandRowNum++; $empNo = $line->employee->emp_code ?? $line->employee->employee_no ?? $line->employee->employee_code ?? $line->employee_id; $empName = $line->employee->name ?? $line->employee->full_name ?? ('Employee #' . $line->employee_id); $totalWorkHours += (float) ($line->work_hours ?? 0); $totalOtHours += (float) ($line->ot_hours ?? 0); $totalNormal += (float) ($line->normal_amount ?? 0); $totalOt += (float) ($line->ot_amount ?? 0); $totalAmount += (float) ($line->amount ?? 0); $inDate = $line->in_date ? \Carbon\Carbon::parse($line->in_date)->format('m/d/Y') : '-'; $outDate = $line->out_date ? \Carbon\Carbon::parse($line->out_date)->format('m/d/Y') : '-'; @endphp @endforeach {{-- TOTALS ROW --}}
# Employee Job Date In Time In Date Out Time Out Work Hrs OT Hrs Rate/Hr OT Rate Amount
{{ $grandRowNum }} {{ $empNo }}
{{ $empName }} @if($line->employee->position ?? null)
{{ $line->employee->position }}
@endif @if($line->is_overnight)
(Overnight)
@endif
{{ $item->job->job_no ?? '-' }} @if($item->job->customer_name ?? null)
{{ $item->job->customer_name }}
@endif
{{ $inDate }} {{ $line->in_time ?? '-' }} {{ $outDate }} {{ $line->out_time ?? '-' }} {{ rtrim(rtrim(number_format($line->work_hours ?? 0, 2, '.', ''), '0'), '.') }} {{ rtrim(rtrim(number_format($line->ot_hours ?? 0, 2, '.', ''), '0'), '.') }} @if($line->is_double_ot) (2×) @endif {{ number_format($line->unit_cost ?? 0, 2, '.', ',') }} {{ number_format($line->ot_rate ?? 0, 2, '.', ',') }} {{ number_format($line->amount ?? 0, 2, '.', ',') }}
TOTAL: {{ rtrim(rtrim(number_format($totalWorkHours, 2, '.', ''), '0'), '.') }} {{ rtrim(rtrim(number_format($totalOtHours, 2, '.', ''), '0'), '.') }} {{ number_format($totalAmount, 2, '.', ',') }}
{{-- ── SUMMARY SECTION ── --}}
Sub Total: {{ number_format($doc->sub_total ?? $totalAmount, 2, '.', ',') }}
@if($doc->apply_sscl && ($doc->sscl_amount ?? 0) > 0)
SSCL (2.5%): {{ number_format($doc->sscl_amount, 2, '.', ',') }}
@endif @if($doc->apply_vat && ($doc->vat_amount ?? 0) > 0)
VAT (18%): {{ number_format($doc->vat_amount, 2, '.', ',') }}
@endif
Grand Total: {{ number_format($doc->grand_total ?? $totalAmount, 2, '.', ',') }}
@endsectionPKk]v6pages/sales/partials/receipt/transport_print.blade.phpnu[@extends('layouts.recipt-header') @section('title', 'Transport Job Cost - ' . ($doc->doc_no ?? 'TRN-' . str_pad($doc->id, 6, '0', STR_PAD_LEFT))) @section('invoice-title', 'Transport Job Costing') @section('content')
TRN No
{{ $doc->doc_no }}
Date
{{ $doc->doc_date ? \Carbon\Carbon::parse($doc->doc_date)->format('m/d/Y') : 'N/A' }}
Status
{{ $doc->status ?? 'N/A' }}
Reference No
{{ $doc->reference_no ?? 'N/A' }}
Remarks
{{ $doc->remarks ?? 'N/A' }}
@php $rowNo = 0; $totalDistance = 0; $totalAmount = 0; @endphp @foreach($doc->items as $item) @foreach($item->transportLines as $line) @php $rowNo++; $totalDistance += (float) ($line->distance ?? 0); $totalAmount += (float) ($line->amount ?? 0); @endphp @endforeach @endforeach
# Vehicle Job Start Location End Location Distance Rate/Km Amount
{{ $rowNo }} {{ $line->transport->vehicle_name ?? '-' }} @if($line->transport->vehicle_number ?? null)
{{ $line->transport->vehicle_number }} @endif
{{ $item->job->job_no ?? '-' }} @if($item->job->customer_name ?? null)
{{ $item->job->customer_name }}
@endif
{{ $line->start_location ?? '-' }} {{ $line->end_location ?? '-' }} {{ number_format($line->distance ?? 0, 2) }} {{ number_format($line->rate_per_km ?? 0, 2) }} {{ number_format($line->amount ?? 0, 2) }}
TOTAL: {{ number_format($totalDistance, 2) }} {{ number_format($totalAmount, 2) }}
Sub Total: {{ number_format($doc->sub_total ?? $totalAmount, 2) }}
Grand Total: {{ number_format($doc->grand_total ?? $totalAmount, 2) }}
@endsectionPKk]4pages/sales/partials/sales_estimation_rows.blade.phpnu[@forelse($salesEstimations as $k => $se) @php $isApproved = strtolower($se->status ?? '') === 'approved'; @endphp {{ ($salesEstimations->firstItem() ?? 1) + $k }} #SE-{{ $se->id }} {{ $se->doc_date ?? '-' }} {{ $se->customer->display_name ?? $se->customer->company_name ?? '-' }} {{-- Source --}} {{-- Job --}} @if($se->job) #{{ $se->job->job_no }} @else - @endif {{-- Cost Total --}} {{ number_format($se->cost_sub_total ?? 0, 2) }} {{-- Status --}} @php $st = strtolower((string) ($se->status ?? 'draft')); $stLabel = ucfirst($st); $stClass = match ($st) { 'approved' => 'bg-success', 'sent' => 'bg-primary', 'cancelled' => 'bg-danger', 'draft' => 'bg-secondary', default => 'bg-secondary', }; @endphp {{ $stLabel }} {{-- MR --}} @php $mr = $se->purchaseMr; @endphp @if($mr) MR: {{ $mr->mr_no ?? ('#' . $mr->id) }} {{ $mr->status }} @else No MR @endif {{-- ACTIONS --}} {{-- View --}} {{-- Print --}} {{-- MR --}} {{-- Approve --}} @if(!$isApproved) @endif {{-- Delete --}} @empty No records found @endforelsePKk]!!1pages/sales/partials/sales_inquiry_rows.blade.phpnu[@php $typeColors = [ 'new_sales' => 'bg-primary-subtle text-primary', 'new_project' => 'bg-info-subtle text-info', 'warranty' => 'bg-warning-subtle text-warning', 'complaint' => 'bg-danger-subtle text-danger', 'other' => 'bg-secondary-subtle text-secondary', ]; $typeLabels = [ 'new_sales' => 'New Sales', 'new_project' => 'New Project', 'warranty' => 'Warranty', 'complaint' => 'Complaint', 'other' => 'Other', ]; $statusColors = [ 'new' => 'bg-info-subtle text-info', 'assigned' => 'bg-primary-subtle text-primary', 'contacted' => 'bg-warning-subtle text-warning', 'follow_up' => 'bg-purple-subtle text-purple', 'converted' => 'bg-success-subtle text-success', 'closed' => 'bg-secondary-subtle text-secondary', ]; $statusLabels = [ 'new' => 'New', 'assigned' => 'Assigned', 'contacted' => 'Contacted', 'follow_up' => 'Follow-up', 'converted' => 'Converted', 'closed' => 'Closed', ]; $srcLabels = [ 'salesperson_visit' => 'Visit', 'phone' => 'Phone', 'walk_in' => 'Walk-in', 'other' => 'Other', ]; @endphp @forelse($salesInquiries as $si) {{-- # --}} {{ $loop->iteration + ($salesInquiries->currentPage() - 1) * $salesInquiries->perPage() }} {{-- SI No --}} #SI-{{ str_pad($si->id, 5, '0', STR_PAD_LEFT) }} {{-- Date --}}
{{ $si->doc_date ? \Carbon\Carbon::parse($si->doc_date)->format('d M Y') : '-' }}
@if($si->followup_date) {{ \Carbon\Carbon::parse($si->followup_date)->format('d M') }} @endif {{-- Customer --}} {{-- Customer column — REPLACE --}} @if($si->customer) {{ $si->customer->display_name ?? $si->customer->company_name ?? '-' }} @elseif($si->walkInCustomer) {{ $si->walkInCustomer->customer_name }} Walk-in @else - @endif {{-- Salesperson column — REPLACE --}} @forelse($si->salespersons as $sp) {{ $sp->name }} @empty - @endforelse {{-- Type --}} @if($si->inquiry_type) {{ $typeLabels[$si->inquiry_type] ?? $si->inquiry_type }} @else - @endif {{-- Source --}} {{ $srcLabels[$si->inquiry_source ?? ''] ?? '-' }} {{-- Status --}} {{ $statusLabels[$si->inquiry_status ?? 'new'] ?? ucfirst($si->inquiry_status ?? 'new') }} {{-- Actions --}}
@empty No sales inquiries found. @endforelse PKk]8׾  0pages/sales/partials/sales_return_rows.blade.phpnuW+A@forelse($returns as $index => $sr) {{ $returns->firstItem() + $index }} {{ $sr->return_no }} {{ \Carbon\Carbon::parse($sr->doc_date)->format('d M Y') }} {{ $sr->invoice->invoice_no ?? 'N/A' }} {{ $sr->customer->display_name ?? $sr->customer->company_name ?? 'N/A' }} @if($sr->customer && $sr->customer->customer_no)
{{ $sr->customer->customer_no }} @endif {{ number_format($sr->grand_total, 2) }} @if($sr->status === 'Approved') Approved @elseif($sr->status === 'Draft') Draft @else {{ $sr->status }} @endif
@if($sr->status === 'Draft') @endif
@empty

No sales returns found

@endforelsePKk]+$&pages/sales/partials/sr_rows.blade.phpnu[{{-- resources/views/pages/sales/partials/sr_rows.blade.php --}} @php $badge = function ($status) { $s = strtolower(trim((string) $status)); if ($s === 'draft') return 'bg-secondary-subtle text-secondary'; if ($s === 'submitted') return 'bg-warning-subtle text-warning'; if ($s === 'approved') return 'bg-success-subtle text-success'; if ($s === 'rejected') return 'bg-danger-subtle text-danger'; if ($s === 'cancelled') return 'bg-dark-subtle text-dark'; return 'bg-primary-subtle text-primary'; }; @endphp @if(($srs ?? null) && $srs->count()) @foreach($srs as $sr) @php $status = strtolower($sr->status ?? ''); $isApproved = $status === 'approved'; $isRejected = $status === 'rejected'; $isDraft = $status === 'draft'; @endphp {{ ($srs->firstItem() ?? 1) + $loop->index }}
{{ $sr->sr_no }}
#{{ $sr->id }}
{{ $sr->sr_date ? \Carbon\Carbon::parse($sr->sr_date)->format('Y-m-d') : '-' }}
{{ $sr->job->job_no ?? ('Job #' . ($sr->job_id ?? '-')) }}
{{ $sr->job->customer_name ?? '-' }}
{{ $sr->status ?? '-' }} {{ $sr->status }} @if($sr->purchase_mr) MR @endif {{-- ACTIONS --}} {{-- View --}} {{-- Print --}} {{-- Edit (Draft only) --}} @if($isDraft) {{-- Edit --}} @endif {{-- Approve --}} @if(!$isApproved) @endif {{-- Reject --}} {{-- Delete --}} @endforeach @else No supplement requests found. @endifPKk]$Yf Apages/sales/partials/subcontractor_payment_request_rows.blade.phpnuW+A@php $start = ($records->currentPage() - 1) * $records->perPage(); @endphp @forelse($records as $index => $r) {{-- Row Number --}} {{ $start + $index + 1 }} {{-- Doc No --}} {{ $r->doc_no }} {{-- Date --}} {{ $r->doc_date }} {{-- Job --}} @if($r->job)
{{ $r->job->job_no }}
{{ $r->job->customer_name ?? '' }} @else - @endif {{-- Subcontractor --}}
{{ $r->subcontractor_name }}
@if($r->subcontractor_contact) {{ $r->subcontractor_contact }} @endif {{-- Status --}} @php $status = strtolower($r->status); $badgeClass = match($status) { 'approved' => 'bg-success', 'submitted' => 'bg-warning', 'rejected' => 'bg-danger', default => 'bg-secondary' }; @endphp {{ $r->status }} {{-- Grand Total --}} {{ number_format($r->grand_total, 2) }} {{-- Actions --}} {{-- View --}} {{-- Approve --}} @if(strtolower($r->status) === 'submitted') @endif {{-- Delete --}} @if(strtolower($r->status) !== 'approved') @endif @empty No records found @endforelse PKk]ΛI/pages/sales/partials/salesperson_rows.blade.phpnu[@forelse ($salespersons as $i => $sp) {{ $salespersons->firstItem() + $loop->index }} {{ $sp->code ?: '-' }} {{ $sp->name }} {{ $sp->email ?: '-' }} {{ $sp->phone ?: '-' }} {{ $sp->department?->name ?: '-' }} {{ $sp->active ? 'Active' : 'Inactive' }} @empty No salespersons found. @endforelse PKk]]p p -pages/sales/partials/emp_cost_table.blade.phpnu[@forelse(($records ?? []) as $i => $record) {{ $i + 1 }} {{ $record->doc_no ?? '-' }} {{ isset($record->doc_date) ? \Carbon\Carbon::parse($record->doc_date)->format('d M Y') : '-' }} @php $status = strtolower($record->status ?? 'draft'); $badgeClass = match ($status) { 'approved' => 'bg-success-subtle text-success', 'submitted' => 'bg-primary-subtle text-primary', 'rejected' => 'bg-danger-subtle text-danger', default => 'bg-warning-subtle text-warning', }; @endphp {{ $record->status ?? 'Draft' }}
@if(strtoupper($record->status ?? '') !== 'APPROVED') @else Approved @endif
@empty No records found @endforelsePKk] 3pages/sales/partials/transport_cost_table.blade.phpnu[@forelse($records as $i => $r) {{ $i + 1 }} {{ $r->doc_no }} {{ \Carbon\Carbon::parse($r->doc_date)->format('d M Y') }} @php $status = strtolower($r->status); $badgeClass = match ($status) { 'approved' => 'bg-success-subtle text-success', 'submitted' => 'bg-primary-subtle text-primary', 'rejected' => 'bg-danger-subtle text-danger', default => 'bg-warning-subtle text-warning', }; @endphp {{ $r->status }}
@if($r->status !== 'APPROVED') @else Approved @endif
@empty No transport cost records found @endforelsePKk]e⋐=pages/sales/partials/sales_estimation_item_row_copy.blade.phpnu[{{-- resources/views/pages/sales/partials/sales_estimation_item_row.blade.php --}} @php $idx = isset($index) ? (int) $index : 0; @endphp
- 0.00 PKk]ub b 8pages/sales/partials/sales_estimation_item_row.blade.phpnu[{{-- resources/views/pages/sales/partials/sales_estimation_item_row.blade.php --}} @php $idx = isset($index) ? (int) $index : 0; @endphp {{-- Item --}}
{{-- UOM --}} - {{-- Quantity --}} {{-- Editable Cost --}} {{-- Sales Price --}} {{-- Amount --}} 0.00 {{-- Action --}} PKk]*u#pages/sales/sales_inquiry.blade.phpnu[@extends('layouts.app') @section('title', 'Sales Inquiries') @section('content') {{-- Page Title --}}

Sales Inquiries

{{-- Top Bar --}}
Sales Inquiry List {{ $salesInquiries->total() }}
Create Inquiry
{{-- List Table --}}
@include('pages.sales.partials.sales_inquiry_rows', [ 'salesInquiries' => $salesInquiries, ])
# SI No Date Customer Salesperson Type Source Status Actions
{{-- ════════════════════════════════════════ ADD MODAL ════════════════════════════════════════ --}} {{-- ════════════════════════════════════════ VIEW MODAL ════════════════════════════════════════ --}} @endsection @push('scripts') @endpush PKk]s"pages/sales/sales_return.blade.phpnuW+A@extends('layouts.app') @section('title', 'Sales Returns') @section('content')

Sales Returns

Sales Return List {{ $returns->total() ?? '' }}
Create Sales Return
@include('pages.sales.partials.sales_return_rows', ['returns' => $returns])
No Return No Date Invoice Customer Grand Total Status Actions
@endsection @push('scripts') @endpushPKk]jdR3pages/sales/subcontractor_payment_request.blade.phpnuW+A{{-- ========================================================= FILE: resources/views/pages/sales/subcontractor_payment_request.blade.php FULL PAGE (NSJC-style) + FULL SCRIPT ========================================================= --}} @extends('layouts.app') @section('title', 'Subcontractor Payment Request') @section('content') @push('styles') @endpush {{-- Page Title + Breadcrumb --}}

Subcontractor Payment Request

{{-- Top bar --}}
SPR List {{ $records->total() ?? '' }}
Create SPR
{{-- Table --}}
@include('pages.sales.partials.subcontractor_payment_request_rows', ['records' => $records])
No Doc No Date Job Subcontractor Status Grand Total Actions
{{-- ========================================================= ADD MODAL (FULLSCREEN) ========================================================= --}} {{-- ========================================================= VIEW MODAL ========================================================= --}} @endsection @push('scripts') @endpushPKk]3ȁ 9 9)pages/sales/supplement_requests.blade.phpnu[{{-- resources/views/pages/sales/supplement_requests.blade.php --}} @extends('layouts.app') @section('title', 'Supplement Requests') @section('content') @push('styles') @endpush

Supplement Requests

SR List {{ $srs->total() ?? '' }}
Create SR
@include('pages.sales.partials.sr_rows', ['srs' => $srs])
No SR No Date Job Status MR Actions
{{-- ========================================================= ADD SR MODAL (FULLSCREEN) ========================================================= --}} {{-- ========================================================= JOB SIDE PANEL (BOOTSTRAP OFFCANVAS) ========================================================= --}}
Job Details
-
Job No
-
-
Pricing
-
-

Job ID
-
Status
-
Job Items
0
Item Qty Unit Amount
Select a job…
* These are job_item rows (snapshot of the job). SR item prices are still resolved by pricing mode.
{{-- ========================================================= VIEW SR MODAL ========================================================= --}} {{-- ========================================================= EDIT SR MODAL (FULLSCREEN) — NEW ========================================================= --}} @endsection @push('scripts') @endpushPKk] )O)O"pages/sales/salespersons.blade.phpnu[@extends('layouts.app') @section('title', 'Salespersons') @section('content') @php function spSortIcon($col, $sort, $dir) { if ($sort !== $col) return 'ri-arrow-up-down-line'; return $dir === 'asc' ? 'ri-arrow-up-line' : 'ri-arrow-down-line'; } @endphp {{-- Page Title --}}

Salespersons

{{-- Top Bar --}}
Salesperson List {{ $salespersons->total() }}
{{-- Table --}}
@include('pages.sales.partials.salesperson_rows', ['salespersons' => $salespersons])
# Code Name Email Phone Department Status Actions
{{-- ADD MODAL --}} {{-- EDIT MODAL --}} {{-- VIEW MODAL --}} @endsection @push('scripts') @endpush PKk]o55*pages/sales/job_employee_costing.blade.phpnu[@extends('layouts.app') @section('title', 'Job Employee Costing') @section('content') @push('styles') {{-- Select2 CSS (skip if already loaded globally) --}} @endpush {{-- Page title --}}

Job Employee Costing

{{-- Top bar --}}
Employee Cost List {{ $records->total() ?? 0 }}
Create Employee Cost
{{-- Table --}}
@include('pages.sales.partials.emp_cost_table', ['records' => $records])
No Doc No Date Status Actions
{{-- ========================================================= VIEW MODAL ========================================================= --}} {{-- ========================================================= ADD / EDIT MODAL (fullscreen) ========================================================= --}} @endsection @push('scripts') {{-- Select2 JS (skip if already loaded globally) --}} @endpushPKk]FƼƼ+pages/sales/job_transport_costing.blade.phpnu[@extends('layouts.app') @section('title', 'Job Transport Costing') @section('content') @push('styles') @endpush {{-- Page title --}}

Job Transport Costing

{{-- Top bar --}}
Transport Cost List {{ $records->total() ?? 0 }}
Create Transport Cost
{{-- Table --}}
@include('pages.sales.partials.transport_cost_table', ['records' => $records])
No Doc No Date Status Actions
{{-- ========================================================= VIEW MODAL ========================================================= --}} {{-- ========================================================= ADD MODAL FULLSCREEN ========================================================= --}} @endsection @push('scripts') @endpushPKk]3,pages/sales/sales_estimations_copy.blade.phpnu[{{-- resources/views/pages/sales/sales_estimations.blade.php --}} @extends('layouts.app') @section('title', 'Project Estimations') @section('content') {{-- PAGE HEADER --}}

Project Estimations

{{-- TOP BAR --}}
Project Estimation List {{ $salesEstimations->total() ?? '' }}
Create Project Estimation
{{-- TABLE --}}
@include('pages.sales.partials.sales_estimation_rows', [ 'salesEstimations' => $salesEstimations, ])
No SE No Date Customer Job Estimate Total Status MR Actions
{{-- MODAL - ADD SE --}} {{-- MODAL - VIEW SE --}} {{-- TEMPLATE APPLY CHOICE MODAL --}} {{-- TEMPLATE ORDER QTY MODAL --}} @endsection @push('scripts') @endpush PKk]'pages/sales/sales_estimations.blade.phpnu[{{-- resources/views/pages/sales/sales_estimations.blade.php --}} @extends('layouts.app') @section('title', 'Project Estimations') @section('content') {{-- PAGE HEADER --}}

Project Estimations

{{-- TOP BAR --}}
Project Estimation List {{ $salesEstimations->total() ?? '' }}
Create Project Estimation
{{-- TABLE --}}
@include('pages.sales.partials.sales_estimation_rows', [ 'salesEstimations' => $salesEstimations, ])
No SE No Date Customer Job Estimate Total Status MR Actions
{{-- MODAL - ADD SE --}} {{-- MODAL - VIEW SE --}} {{-- TEMPLATE APPLY CHOICE MODAL --}} {{-- TEMPLATE ORDER QTY MODAL --}} @endsection @push('scripts') @endpush PKk]6"$"$6pages/settings/finance/account_configuration.blade.phpnuW+A@extends('layouts.app') @section('title', 'Account Configuration') @section('content') {{-- Page Title --}}

Account Configuration

{{-- Top Bar --}}
Account Configuration List
{{-- Table --}}
@foreach($settings as $setting) @php $mapped = $accounts->firstWhere('id', $setting->coa_id); @endphp @endforeach
Module Setting Mapped Account Actions
{{ $setting->module }}
{{ $setting->label }}
{{ $setting->description }}
@if($mapped)
{{ $mapped->label }}
{{ $mapped->accountType->name ?? '' }}
@else Not Configured @endif
{{-- Edit Modal --}} @endsection @push('scripts') @endpushPKk] 槞Dpages/settings/finance/partials/account_configuration_rows.blade.phpnuW+A@foreach($settings as $setting) {{ $setting->module }}
{{ $setting->label }}
{{ $setting->description }}
@php $mapped = $accounts->firstWhere('id', $setting->coa_id); @endphp @if($mapped) {{ $mapped->label }}
{{ $mapped->accountType->name ?? '' }}
@else Not Configured @endif @endforeachPKk]H<qCqC2pages/settings/SiteSettings/menu_builder.blade.phpnu[@extends('layouts.app') @section('title', 'Menu Builder') @push('styles') @endpush @section('content')
Menu Builder

Drag categories and pages to arrange the side menu

{{-- Hint bar --}} {{-- Category list --}} @endsection @push('scripts') @endpushPKk]t[|3pages/stockadjustment/good_transfers.blade copy.phpnuW+A@extends('layouts.app') @section('title', 'Good Transfer Notes') @section('content') {{-- ======================================== STYLES (match Purchase Returns UI) ======================================== --}} {{-- ======================================== PAGE HEADER & BREADCRUMB ======================================== --}}

Good Transfer Notes

{{-- ======================================== TOP BAR (Title, Search, Create Button) ======================================== --}}
Good Transfer List {{ $notes->total() ?? '' }}
Create Good Transfer
{{-- ======================================== TABLE - Good Transfer List ======================================== --}}
@include('pages.stockadjustment.partials.good_transfer_rows', ['notes' => $notes])
No Transfer ID Date From Store To Store Total Qty Amount Status Actions
{{-- ======================================== MODAL - ADD GOOD TRANSFER ======================================== --}} {{-- ======================================== MODAL - EDIT GOOD TRANSFER ======================================== --}} {{-- ======================================== MODAL - VIEW GOOD TRANSFER ======================================== --}} @endsection @push('scripts') @endpushPKk] .gt-modal-header { background: #fff; border-bottom: 1px solid #e9ecef; padding: 1rem 1.5rem; color: #334155; } .gt-modal-footer { background: #fff; border-top: 1px solid #e9ecef; padding: 1rem 1.5rem; } #addGTModal .form-control, #addGTModal .form-select, #editGTModal .form-control, #editGTModal .form-select { border: 1px solid #ced4da; padding: .55rem .8rem; font-size: .92rem; } #addGTModal .form-control:focus, #addGTModal .form-select:focus, #editGTModal .form-control:focus, #editGTModal .form-select:focus { border-color: #86b7fe; box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .12); } #addGTModal .form-label, #editGTModal .form-label { font-size: .8rem; font-weight: 700; letter-spacing: .2px; margin-bottom: .35rem; color: #334155; } #addGTModal .modal-body, #editGTModal .modal-body, #viewGTModal .modal-body { background: #f8fafc; } #addGTModal .card, #editGTModal .card, #viewGTModal .card { border: 0; border-radius: 14px; box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06); overflow: hidden; } #addGTModal hr, #editGTModal hr { opacity: 1; border-top: 1px dashed #e6eaf0; } .section-title { font-weight: 800; color: #0f172a; font-size: .95rem; display: flex; align-items: center; gap: .5rem; } .section-title i { color: #4f46e5; font-size: 1.05rem; } .gt-table { font-size: .8rem; } .gt-table thead th { background: #eef0f7; border-bottom: 2px solid #dee2e6; font-weight: 800; padding: .75rem; text-transform: uppercase; font-size: .72rem; color: #000000ff; vertical-align: middle; white-space: nowrap; } .gt-table tbody td { padding: .6rem; vertical-align: top; } .sortable { cursor: pointer; user-select: none; white-space: nowrap; } .sort-ico { font-size: 14px; margin-left: 6px; opacity: .55; } .sort-ico.active { opacity: 1; } .req::after { content: " *"; color: #dc3545; font-weight: 800; } .table-responsive { overflow: visible !important; } .gt-table td.text-end, .gt-table th.text-end { font-variant-numeric: tabular-nums; } .stock-badge { display: inline-block; padding: .25rem .5rem; border-radius: 4px; font-size: .72rem; font-weight: 600; margin-top: .25rem; } .stock-badge.stock-ok { background: #d1fae5; color: #065f46; } .stock-badge.stock-low { background: #fed7aa; color: #92400e; } .stock-badge.stock-none { background: #fecaca; color: #991b1b; } {{-- ======================================== PAGE HEADER & BREADCRUMB ======================================== --}}

Good Transfer Notes

{{-- ======================================== TOP BAR (Title, Search, Create Button) ======================================== --}}
Good Transfer List {{ $notes->total() ?? '' }}
{{-- ======================================== TABLE - Good Transfer List ======================================== --}}
@include('pages.stockadjustment.partials.good_transfer_rows', ['notes' => $notes])
No Transfer ID Date From Store To Store Total Qty Amount Status Actions
{{-- ======================================== MODAL - ADD GOOD TRANSFER ======================================== --}} {{-- ======================================== MODAL - EDIT GOOD TRANSFER ======================================== --}} {{-- ======================================== MODAL - VIEW GOOD TRANSFER ======================================== --}} @endsection @push('scripts') @endpushPKk]gnsPP;pages/stockadjustment/partials/good_transfer_rows.blade.phpnuW+A@php $start = ($notes->currentPage() - 1) * $notes->perPage() + 1; @endphp @forelse($notes as $i => $n) @php $no = $start + $i; $totalQty = $n->items->sum('qty'); @endphp {{ $no }} GT-{{ str_pad($n->id, 6, '0', STR_PAD_LEFT) }} {{ $n->doc_date ?? '-' }} {{ $n->fromStore->name ?? '-' }} {{ $n->toStore->name ?? '-' }} {{ rtrim(rtrim(number_format($totalQty, 2, '.', ''), '0'), '.') }} {{ number_format($n->grand_total ?? 0, 2) }} @if (($n->active ?? 1) == 1) Active @else Inactive @endif @empty No Good Transfers found @endforelsePKk]fe3030Ipages/stockadjustment/partials/receipt/good_transfer_note_print.blade.phpnuW+A{{-- resources/views/pages/stockadjustment/partials/receipt/good_transfer_note_print.blade.php --}} @extends('layouts.recipt-header') @section('title', 'Good Transfer Note - ' . ($note->doc_no ?? 'GTN-' . str_pad($note->id, 6, '0', STR_PAD_LEFT))) @section('invoice-title', 'Good Transfer Note') @section('content')
From Store
Store Name: {{ $note->fromStore->name ?? 'N/A' }}
Address: {{ $note->fromStore->address ?? 'N/A' }}
Telephone No: {{ $note->fromStore->phone ?? 'N/A' }}
To Store
Store Name: {{ $note->toStore->name ?? 'N/A' }}
Address: {{ $note->toStore->address ?? 'N/A' }}
Telephone No: {{ $note->toStore->phone ?? 'N/A' }}
GTN No:{{ $note->doc_no ?? 'GTN-' . str_pad($note->id, 6, '0', STR_PAD_LEFT) }}
Date:{{ $note->doc_date ? \Carbon\Carbon::parse($note->doc_date)->format('m/d/Y') : 'N/A' }}
Reference No:{{ $note->ref_no ?? 'N/A' }}
Status:{{ ($note->active ?? 1) == 1 ? 'Active' : 'Inactive' }}
@php $totalQty = 0; $rowsPerPage = 18; $currentRow = 0; @endphp @foreach ($note->items as $index => $item) @php $totalQty += $item->qty ?? 0; $itemName = $item->item->name ?? 'N/A'; $itemCode = $item->item->itemcode ?? ''; $description = $itemCode ? "$itemCode - $itemName" : $itemName; if (!empty($item->item_description)) { $description .= ' ' . $item->item_description; } $descriptionLines = []; $words = explode(' ', str_replace("\n", ' ', $description)); $currentLine = ''; foreach ($words as $word) { $test = $currentLine ? $currentLine . ' ' . $word : $word; if (mb_strlen($test) <= 45) { $currentLine = $test; } else { if ($currentLine) { $descriptionLines[] = $currentLine; } $currentLine = $word; } } if ($currentLine) { $descriptionLines[] = $currentLine; } $totalLinesForThisItem = count($descriptionLines); @endphp @for ($i = 0; $i < $totalLinesForThisItem; $i++) @php $currentRow++; if ($currentRow > $rowsPerPage) { echo '
Ref Description Batch Serial Expiry Qty Cost Amount
'; echo '
'; echo '
Good Transfer Note
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $currentRow = 1; } @endphp @if ($i === 0) @else @endif @endfor @endforeach
RefDescriptionBatchSerialExpiryQtyCostAmount
{{ $index + 1 }} {{ $descriptionLines[$i] }} {{ $item->batch_no ?? '-' }} {{ $item->serial_no ?? '-' }} {{ $item->expiry ? \Carbon\Carbon::parse($item->expiry)->format('m/d/Y') : '-' }} {{ rtrim(rtrim(number_format($item->qty ?? 0, 2, '.', ''), '0'), '.') }} {{ number_format($item->cost ?? 0, 2, '.', ',') }} {{ number_format($item->amount ?? 0, 2, '.', ',') }} {{ $descriptionLines[$i] }}
TOTAL: {{ rtrim(rtrim(number_format($totalQty, 2, '.', ''), '0'), '.') }} {{ number_format($note->sub_total ?? 0, 2, '.', ',') }}
Sub Total: Rs. {{ number_format($note->sub_total ?? 0, 2, '.', ',') }}
@if (($note->discount ?? 0) > 0) @php $discountPercentage = ($note->sub_total ?? 0) > 0 ? (($note->discount / $note->sub_total) * 100) : 0; @endphp
Discount ({{ number_format($discountPercentage, 2) }}%): Rs. {{ number_format($note->discount, 2, '.', ',') }}
Net Amount: Rs. {{ number_format($note->net_value ?? 0, 2, '.', ',') }}
@endif @if (($note->vat_status ?? 0) == 1)
VAT Amount (18%): Rs. {{ number_format($note->vat_amount ?? 0, 2, '.', ',') }}
@endif
Grand Total: Rs. {{ number_format($note->grand_total ?? 0, 2, '.', ',') }}
@endsection PKk]R8pages/supplier/partials/supplier_category_rows.blade.phpnuW+A@forelse ($categories as $category)
{{ $category->id }} {{ $category->name }} {{ Str::limit($category->description, 60) }} @if ($category->status == 1) Active @else Inactive @endif @empty No supplier categories found. @endforelsePKk]c-!5pages/supplier/partials/supplier_group_rows.blade.phpnuW+A@forelse ($groups as $group)
{{ $group->id }} {{ $group->name }} {{ Str::limit($group->description, 60) }} @if ($group->status == 1) Active @else Inactive @endif @empty No supplier groups found. @endforelsePKk]Y/pages/supplier/partials/supplier_rows.blade.phpnuW+A@php $start = ($suppliers->currentPage() - 1) * $suppliers->perPage() + 1; @endphp @forelse($suppliers as $i => $s) @php $no = $start + $i; $pc = $s->primaryContact; $pcName = $pc ? trim(($pc->title ? $pc->title . ' ' : '') . ($pc->name ?? '')) : ''; $pcMeta = $pc ? trim(($pc->mobile_number ?? '') . ($pc->email ? ' | ' . $pc->email : '')) : ''; @endphp {{ $no }}
{{ $s->company_name }}
{{ $s->supplier_code ?? '-' }}
{{ $s->type->name ?? '-' }} {{ $s->group->name ?? '-' }} {{ $s->category->name ?? '-' }} @if($pc)
{{ $pcName ?: '-' }}
{{ $pcMeta ?: '-' }}
@else - @endif @if($s->status) Active @else Inactive @endif @empty No suppliers found. @endforelsePKk]!6<pages/supplier/partials/supplier_sub_category_rows.blade.phpnuW+A@forelse($subCategories as $sub)
{{ $sub->id }} {{ $sub->supplierCategory?->name ?? '-' }} {{ $sub->name }} {{ $sub->description ?? '-' }} @if($sub->status == 1) Active @else Inactive @endif {{-- Edit --}} {{-- Deactivate / Activate --}} @if($sub->status == 1) @else @endif @empty No sub categories found. @endforelse PKk]mӰGG9pages/supplier/partials/supplier_sub_group_rows.blade.phpnuW+A@forelse ($subGroups as $sub)
{{ $sub->id }} {{ $sub->supplierGroup?->name ?? '-' }} {{ $sub->name }} {{ Str::limit($sub->description, 60) }} @if ($sub->status == 1) Active @else Inactive @endif @empty No supplier sub groups found. @endforelse PKk]g@ť4pages/supplier/partials/supplier_type_rows.blade.phpnuW+A@forelse ($types as $type)
{{ $type->id }} {{ $type->name }} {{ Str::limit($type->description, 60) }} @if ($type->status == 1) Active @else Inactive @endif @empty No supplier types found. @endforelse PKk] "pages/supplier/suppliers.blade.phpnuW+A@extends('layouts.app') @section('title', 'Suppliers') @section('content') {{-- Page Title --}}

Suppliers

{{-- Top bar --}}
Supplier List {{ $suppliers->total() }}
{{-- Supplier Filter Icon + Popup --}}
0 {{-- Popup panel --}}
Supplier Filters
{{-- Table --}}
@include('pages.supplier.partials.supplier_rows')
No Name Type Group Category Primary Contact Status Actions
{{-- ========================= ADD SUPPLIER MODAL ========================= --}} {{-- ========================= EDIT SUPPLIER MODAL ========================= --}} {{-- ========================= VIEW SUPPLIER MODAL (PRO) ========================= --}} @endsection @push('scripts') @endpushPKk]~JJ*pages/supplier/supplier_category.blade.phpnuW+A@extends('layouts.app') @section('title', 'Supplier Categories') @section('content') {{-- Page Title + Breadcrumb --}}

Supplier Categories

{{-- Top bar: title + search + add new --}}
Category List {{ $categories->total() }}
{{-- Categories Table --}}
@include('pages.supplier.partials.supplier_category_rows')
ID Category Name Description Status Actions
{{-- Add Category Modal --}} {{-- Edit Category Modal --}} @endsection @push('scripts') @endpushPKk]HH(pages/supplier/supplier_groups.blade.phpnuW+A@extends('layouts.app') @section('title', 'Supplier Groups') @section('content') {{-- Page Title + Breadcrumb --}}

Supplier Groups

{{-- Top bar: title + search + add new --}}
Group List {{ $groups->total() }}
{{-- Groups Table --}}
@include('pages.supplier.partials.supplier_group_rows')
ID Group Name Description Status Actions
{{-- Add Group Modal --}} {{-- Edit Group Modal --}} @endsection @push('scripts') @endpush PKk]%LL0pages/supplier/supplier_sub_catogories.blade.phpnuW+A@extends('layouts.app') @section('title', 'Supplier Sub Categories') @section('content') {{-- Page Title + Breadcrumb --}}

Supplier Sub Categories

{{-- Top bar --}}
Sub Category List {{ $subCategories->total() }}
{{-- Table --}}
@include('pages.supplier.partials.supplier_sub_category_rows', ['subCategories' => $subCategories])
ID Category Sub Category Name Description Status Actions
{{-- Add Modal --}} {{-- Edit Modal --}} @endsection @push('scripts') @endpush PKk]ROO,pages/supplier/supplier_sub_groups.blade.phpnuW+A@extends('layouts.app') @section('title', 'Supplier Sub Groups') @section('content') {{-- Page Title + Breadcrumb --}}

Supplier Sub Groups

{{-- Top bar --}}
Sub Group List {{ $subGroups->total() }}
{{-- Table --}}
@include('pages.supplier.partials.supplier_sub_group_rows')
ID Group Sub Group Name Description Status Actions
{{-- Add Modal --}} {{-- Edit Modal --}} @endsection @push('scripts') @endpushPKk]xiHH'pages/supplier/supplier_types.blade.phpnuW+A@extends('layouts.app') @section('title', 'Supplier Types') @section('content') {{-- Page Title + Breadcrumb --}}

Supplier Types

{{-- Top bar --}}
Type List {{ $types->total() }}
{{-- Table --}}
@include('pages.supplier.partials.supplier_type_rows')
ID Type Name Description Status Actions
{{-- Add Modal --}} {{-- Edit Modal --}} @endsection @push('scripts') @endpushPKk]SJ$pages/usermanagement/pages.blade.phpnu[@extends('layouts.app') @section('title', 'Pages') @section('content') @php $opt = isset($pageOptions) ? $pageOptions->keyBy('label') : collect(); @endphp {{-- Page Title + Breadcrumb --}}

Pages

{{-- Top bar --}}
Page List {{ $pages->total() }}
@opt($opt, 'Create') Add Page @endopt
{{-- Table --}}
@include('pages.usermanagement.partials.page_rows', ['opt' => $opt])
ID Page Name Route name Page Code Category Status Actions
{{-- Add Modal --}} {{-- Edit Modal --}} @endsection @push('scripts') @endpushPKk]ӛ3[3[,pages/usermanagement/page_category.blade.phpnu[@extends('layouts.app') @section('title', 'Page Categories') @section('content') @php $opt = isset($pageOptions) ? $pageOptions->keyBy('label') : collect(); @endphp {{-- Page Title + Breadcrumb --}}

Page Categories

{{-- Top bar: title + search + add new --}}
Category List {{ $categories->total() }}
@opt($opt, 'Create') Add Category @endopt
{{-- Categories Table --}}
@include('pages.usermanagement.partials.page_category_rows')
Category ID Icon Category Name Category Code Description Status Actions
{{-- Add Category Modal --}} {{-- Edit Category Modal --}} @endsection @push('scripts') @endpushPKk]*[[+pages/usermanagement/page_options.blade.phpnu[@extends('layouts.app') @section('title', 'Page Options') @section('content') @php $opt = isset($pageOptions) ? $pageOptions->keyBy('label') : collect(); @endphp {{-- Page Title + Breadcrumb --}}

Page Options

{{-- Top bar --}}
Option List {{ $options->total() }}
@opt($opt, 'Create') Add Option @endopt
{{-- Table --}}
@include('pages.usermanagement.partials.page_option_rows')
ID Page name Page code Option code Status Actions
{{-- Add Modal --}} {{-- Edit Modal --}} @endsection @push('scripts') @endpushPKk]Y.R R :pages/usermanagement/partials/page_category_rows.blade.phpnu[@php $opt = isset($pageOptions) ? $pageOptions->keyBy('label') : collect(); @endphp @opt($opt, 'View') @forelse ($categories as $category)
{{-- Category ID --}} CAT-{{ str_pad($category->category_id, 3, '0', STR_PAD_LEFT) }} {{-- Icon --}} {{-- Category Name --}} {{ $category->category_name }} {{-- Category Code --}} {{ $category->category_code }} {{-- Description --}} {{ $category->description ?? '-' }} {{-- Status --}} @if ($category->status == 1) Active @else Inactive @endif {{-- Actions --}}
{{-- Edit --}} @opt($opt, 'Edit') @endopt {{-- Delete --}} @opt($opt, 'Delete') @endopt
@empty No categories found. @endforelse @else You do not have permission to view categories. @endoptPKk]Ǡ8pages/usermanagement/partials/page_option_rows.blade.phpnu[@php $opt = isset($pageOptions) ? $pageOptions->keyBy('label') : collect(); @endphp @opt($opt, 'View') @forelse ($options as $option)
{{ $option->id }} {{ $option->label }} {{ $option->page_code }} {{ $option->option_code }} {{-- Status --}} @if ($option->status == 1) Active @else Inactive @endif {{-- Actions --}} {{-- Edit --}} @opt($opt, 'Edit') @endopt {{-- Toggle --}} @opt($opt, 'Delete') @endopt @empty No options found. @endforelse @else You do not have permission to view options. @endoptPKk]3` ` 1pages/usermanagement/partials/page_rows.blade.phpnu[@php $opt = isset($pageOptions) ? $pageOptions->keyBy('label') : collect(); @endphp @opt($opt, 'View') @forelse($pages as $page)
{{ $page->page_id }} {{ $page->page_name }} {{ $page->route_name }} {{ $page->page_code }} {{ $page->category_code }} {{-- Status --}} @if ($page->status == 1) Active @else Inactive @endif {{-- Actions --}} {{-- Edit --}} @opt($opt, 'Edit') @endopt {{-- Delete --}} @opt($opt, 'Delete') @endopt @empty No pages found. @endforelse @else You do not have permission to view this data. @endoptPKk]%7pages/usermanagement/partials/permission_rows.blade.phpnu[@php $opt = isset($pageOptions) ? $pageOptions->keyBy('label') : collect(); $i = ($permissions->currentPage() - 1) * $permissions->perPage(); @endphp @opt($opt, 'View') @forelse($permissions as $permission) @php $i++; $targetLabel = $permission->option_label ? ($permission->page_name ? $permission->page_name . ' — ' . $permission->option_label : $permission->option_label) : ($permission->page_name ? $permission->page_name : ($permission->category_name ?: 'Code ' . $permission->permission_code)); @endphp {{ $i }} {{-- Role --}} {{ $permission->role_name ?? 'N/A' }} {{-- Permission --}} {{ $permission->permission_code }} | {{ $targetLabel }} {{-- Status --}} @if($permission->allow) Allowed @else Blocked @endif {{-- Actions --}} @opt($opt, 'Edit') @endopt @empty No permissions found. @endforelse @else You do not have permission to view permissions. @endoptPKk]T* 1pages/usermanagement/partials/role_rows.blade.phpnu[@php $opt = isset($pageOptions) ? $pageOptions->keyBy('label') : collect(); @endphp @opt($opt, 'View') @forelse ($roles as $role)
{{-- Role ID --}} ROLE-{{ str_pad($role->id, 3, '0', STR_PAD_LEFT) }} {{-- Role Name --}} {{ $role->role_name }} {{-- Role Code --}} {{ $role->role_code }} {{-- Description --}} {{ $role->description ?? '-' }} {{-- Status --}} @if ($role->status == 1) Active @else Inactive @endif {{-- Actions --}}
{{-- Edit --}} @opt($opt, 'Edit') @endopt {{-- Delete --}} @opt($opt, 'Delete') @endopt
@empty No roles found. @endforelse @else You do not have permission to view roles. @endoptPKk]rU U 1pages/usermanagement/partials/user_rows.blade.phpnu[@php $opt = isset($pageOptions) ? $pageOptions->keyBy('label') : collect(); @endphp @opt($opt, 'View') @forelse ($users as $user)
{{-- User ID --}} USR-{{ str_pad($user->id, 3, '0', STR_PAD_LEFT) }} {{-- Avatar + Name + Role --}}
avatar
{{ $user->name }}
@if ($user->role)
{{ $user->role->role_name }}
@endif
{{-- Email --}} {{ $user->email }} {{-- Role --}} {{ $user->role->role_name ?? '-' }} {{-- Status --}} @if ($user->is_active ?? 1) Active @else Inactive @endif {{-- Actions --}}
{{-- Edit --}} @opt($opt, 'Edit') @endopt {{-- Delete --}} @opt($opt, 'Delete') @endopt
@empty No users found. @endforelse @else You do not have permission to view users. @endoptPKk]7*pages/usermanagement/permissions.blade.phpnu[@extends('layouts.app') @section('title', 'Permissions') @section('content') @php $opt = isset($pageOptions) ? $pageOptions->keyBy('label') : collect(); @endphp {{-- NAV TABS AT TOP --}}
{{-- Page Title --}}

Permissions

@opt($opt, 'Create') @endopt
{{-- CARD WRAPPER --}}
{{-- Tab panes --}}
{{-- TAB 1: ALL PERMISSIONS --}}
All Permissions
{{-- 🔎 SEARCH + FILTER POPUP (RIGHT-ALIGNED) --}}
{{-- Search Box --}} {{-- Custom Filter Popup + badge --}}
0 {{-- Popup panel --}}
Filter Options
{{-- FILTER: ROLE --}}
{{-- FILTER: STATUS --}}
{{-- TABLE: ALL PERMISSIONS --}}
@include('pages.usermanagement.partials.permission_rows')
# Role Permission (CODE | NAME) Status Actions
{{-- TAB 2: PERMISSION STRUCTURE --}}
Permission Structure

This reference view shows how permission codes are organised across categories, pages and page options.

{{-- /.tab-content --}}
{{-- ===================================================================== ADD PERMISSIONS MODAL – Toggle-tree version ===================================================================== --}} @endsection @push('scripts') @endpushPKk] v P P#pages/usermanagement/role.blade.phpnu[@extends('layouts.app') @section('title', 'Roles') @section('content') @php $opt = isset($pageOptions) ? $pageOptions->keyBy('label') : collect(); @endphp {{-- Page Title + Breadcrumb --}}

Roles

{{-- Top bar: title + search + add new --}}
Role List {{ $roles->total() }}
@opt($opt, 'Create') Add Role @endopt
{{-- Roles Table --}}
@include('pages.usermanagement.partials.role_rows')
Role ID Role Name Role Code Description Status Actions
{{-- Add Role Modal --}} {{-- Edit Role Modal --}} @endsection @push('scripts') @endpushPKk]-k#pages/usermanagement/user.blade.phpnu[@extends('layouts.app') @section('title', 'Users') @section('content') @php $opt = isset($pageOptions) ? $pageOptions->keyBy('label') : collect(); @endphp {{-- Page Title + Breadcrumb --}}

Users

{{-- Top bar: title + search + add new --}}
User List {{ $users->total() }}
@opt($opt, 'Create') Add User @endopt
{{-- Users Table --}}
@include('pages.usermanagement.partials.user_rows')
User ID User Email Role Status Actions
{{-- end table --}}
{{-- Add User Modal --}} {{-- Edit User Modal --}} {{-- Delete User Modal --}} @endsection @push('scripts') @endpushPKk]oYb++/pages/usermanagement/permissions.blade copy.phpnu[@extends('layouts.app') @section('title', 'Permissions') @section('content') {{-- NAV TABS AT TOP --}}
{{-- Page Title --}}

Permissions

{{-- CARD WRAPPER --}}
{{-- Tab panes --}}
{{-- TAB 1: ALL PERMISSIONS --}}
All Permissions
{{-- 🔎 SEARCH + FILTER POPUP (RIGHT-ALIGNED) --}}
{{-- Search Box --}} {{-- Custom Filter Popup + badge --}}
0 {{-- Popup panel --}}
Filter Options
{{-- FILTER: ROLE --}}
{{-- options only visible when activated --}}
{{-- FILTER: STATUS --}}
{{-- TABLE: ALL PERMISSIONS --}}
@include('pages.usermanagement.partials.permission_rows')
# Role Permission (CODE | NAME) Status Actions
{{-- TAB 2: PERMISSION STRUCTURE --}}
Permission Structure

This reference view shows how permission codes are organised across categories, pages and page options.

{{-- /.tab-content --}}
{{-- ADD PERMISSIONS MODAL --}} @endsection @push('scripts') @endpush PKk] .rpt-card { border:0 !important; border-radius:14px !important; box-shadow:0 4px 20px rgba(15,23,42,.07) !important; } .rpt-table thead th { background:#f8fafc; font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.5px; color:#6b7280; padding:.6rem .85rem; white-space:nowrap; } .rpt-table tbody td { padding:.55rem .85rem; vertical-align:middle; font-size:.83rem; } .rpt-table tbody tr:hover { background:#f0f7ff; } .rpt-stat { background:#f8fafc; border-radius:12px; padding:14px 16px; } .rpt-stat .val { font-size:1.6rem; font-weight:800; line-height:1.1; } .rpt-stat .lbl { font-size:.68rem; text-transform:uppercase; letter-spacing:.6px; color:#9ca3af; } .form-label { font-size:.78rem; font-weight:700; color:#374151; margin-bottom:.3rem; } .bar-wrap { background:#f1f5f9; border-radius:99px; height:7px; overflow:hidden; } .bar-fill { height:100%; border-radius:99px; transition:width .6s ease; } .report-nav-btn { border:1px solid #e5e7eb; background:#fff; border-radius:10px; padding:10px 14px; text-align:left; transition:all .2s; cursor:pointer; width:100%; } .report-nav-btn:hover { border-color:#3b82f6; background:#eff6ff; } .report-nav-btn.active { border-color:#3b82f6; background:#eff6ff; } .report-nav-btn .title { font-size:.83rem; font-weight:700; color:#0f172a; } .report-nav-btn .sub { font-size:.72rem; color:#9ca3af; }

CRM Reports

{{-- Left: Report selector + filters --}}
{{-- Report type selector --}}
Report Type
@php $reportTypes = [ 'inquiry_lead' => ['title'=>'Inquiry & Lead', 'icon'=>'ri-file-list-3-line', 'sub'=>'Inquiry volume & status'], 'salesperson_performance'=> ['title'=>'Salesperson Performance', 'icon'=>'ri-user-star-line', 'sub'=>'Visits, inquiries & conversions'], 'pipeline' => ['title'=>'Opportunity Pipeline', 'icon'=>'ri-filter-3-line', 'sub'=>'Pipeline stages & values'], 'quotation_conversion' => ['title'=>'Quotation & Conversion', 'icon'=>'ri-exchange-line', 'sub'=>'Won vs lost & reasons'], ]; @endphp @foreach($reportTypes as $key => $rt) @endforeach
{{-- Filters --}}
Filters
{{-- Right: Report content --}}
@if($report === 'inquiry_lead') {{-- ── INQUIRY & LEAD REPORT ── --}}
{{ $rows->count() }}
Total Inquiries
{{ $rows->where('inquiry_status','converted')->count() }}
Converted
{{ $rows->whereNotIn('inquiry_status',['converted','closed'])->count() }}
Open
@php $cRate = $rows->count() > 0 ? round(($rows->where('inquiry_status','converted')->count()/$rows->count())*100,1) : 0; @endphp
{{ $cRate }}%
Conversion Rate
By Status
@php $statusLabels = ['new'=>'New','assigned'=>'Assigned','contacted'=>'Contacted','follow_up'=>'Follow-up','converted'=>'Converted','closed'=>'Closed']; @endphp @foreach($byStatus as $st => $cnt)
{{ $statusLabels[$st] ?? ucfirst($st) }} {{ $cnt }}
@endforeach
By Type
@php $typeLabels = ['new_sales'=>'New Sales','new_project'=>'New Project','warranty'=>'Warranty','complaint'=>'Complaint','other'=>'Other']; @endphp @foreach($byType as $tp => $cnt)
{{ $typeLabels[$tp] ?? ucfirst($tp) }} {{ $cnt }}
@endforeach
By Salesperson
@foreach($bySalesperson as $sp)
{{ $sp['name'] }} {{ $sp['count'] }}
@endforeach
@php $siStatusColors=['new'=>'bg-info-subtle text-info','assigned'=>'bg-primary-subtle text-primary','contacted'=>'bg-warning-subtle text-warning','follow_up'=>'bg-purple-subtle text-purple','converted'=>'bg-success-subtle text-success','closed'=>'bg-secondary-subtle text-secondary']; $typeColors=['new_sales'=>'bg-primary-subtle text-primary','new_project'=>'bg-info-subtle text-info','warranty'=>'bg-warning-subtle text-warning','complaint'=>'bg-danger-subtle text-danger','other'=>'bg-secondary-subtle text-secondary']; @endphp @forelse($rows as $si) @empty @endforelse
SI No Date Customer Salesperson Type Source Status
#SI-{{ str_pad($si->id,5,'0',STR_PAD_LEFT) }} {{ $si->doc_date }} {{ $si->customer?->display_name ?? $si->customer?->company_name ?? '-' }} {{ $si->salesperson?->name ?? '-' }} {{ $typeLabels[$si->inquiry_type??''] ?? '-' }} {{ ucfirst(str_replace('_',' ',$si->inquiry_source??'-')) }} {{ $statusLabels[$si->inquiry_status??'new'] ?? '-' }}
No inquiries in this period
@elseif($report === 'salesperson_performance') {{-- ── SALESPERSON PERFORMANCE REPORT ── --}}
{{-- --}} @forelse($rows as $r) @php $bc = $r['visit_pct'] >= 100 ? '#10b981' : ($r['visit_pct'] >= 60 ? '#3b82f6' : '#f59e0b'); @endphp {{-- --}} @empty @endforelse
Salesperson Visit Target Visits Done Achievement Inquiries Opportunities Visit→Inquiry %Won Value
{{ strtoupper(substr($r['salesperson']->name??'S',0,1)) }}
{{ $r['salesperson']->name }}
{{ $r['visit_target'] }} {{ $r['visits'] }}
{{ $r['visit_pct'] }}%
{{ $r['inquiries'] }} {{ $r['opportunities'] }} {{ $r['conv_rate'] }}% {{ number_format($r['won_value'], 2) }}
No data
@elseif($report === 'pipeline') {{-- ── PIPELINE REPORT ── --}}
{{ $opps->count() }}
Total Opportunities
{{ number_format($totalPipeline,0) }}
Pipeline Value
{{ $wonRate }}%
Win Rate
{{ $totalLost }}
Lost Deals
@php $stageColors = ['new'=>'#06b6d4','contacted'=>'#3b82f6','qualified'=>'#f59e0b','negotiation'=>'#8b5cf6','won'=>'#10b981','lost'=>'#ef4444']; $stageLabels = ['new'=>'New','contacted'=>'Contacted','qualified'=>'Qualified','negotiation'=>'Negotiation','won'=>'Won','lost'=>'Lost']; @endphp @foreach($byStatus as $st => $data)
{{ $data['count'] }}
{{ $stageLabels[$st]??ucfirst($st) }}
{{ number_format($data['value'],0) }}
@endforeach
@php $oppColors=['new'=>'bg-info-subtle text-info','contacted'=>'bg-primary-subtle text-primary','qualified'=>'bg-warning-subtle text-warning','negotiation'=>'bg-purple-subtle text-purple','won'=>'bg-success-subtle text-success','lost'=>'bg-danger-subtle text-danger']; @endphp @forelse($opps as $opp) {{-- --}} @empty @endforelse
OPP No Title Customer Salesperson Created Close Date Status
{{ $opp->opportunity_no ?? '#'.str_pad($opp->id,5,'0',STR_PAD_LEFT) }} {{ Str::limit($opp->title??'-',30) }} {{ Str::limit($opp->customer?->display_name??$opp->customer?->company_name??'-',20) }} {{ $opp->salesperson?->name ?? '-' }} {{ $opp->created_date }} {{ $opp->expected_close_date ?? '-' }} {{ number_format($opp->estimated_value,2) }}{{ $stageLabels[$opp->status??'new'] ?? '-' }}
No opportunities
@elseif($report === 'quotation_conversion') {{-- ── QUOTATION & CONVERSION REPORT ── --}}
{{ $converted }}
Won / Converted
{{ $lost }}
Lost
{{ $convRate }}%
Win Rate
{{ number_format($totalValue,0) }}
Total Won Value
@if(count($byReason))
Loss Reasons
@php $reasonLabels=['competitor_selected'=>'Competitor Selected','budget_issues'=>'Budget Issues','project_cancelled'=>'Project Cancelled','quotation_rejected'=>'Quotation Rejected','other'=>'Other']; @endphp @foreach($byReason as $reason => $cnt)
{{ $reasonLabels[$reason]??ucfirst($reason) }}
{{ $cnt }}
@endforeach
@endif
@forelse($rows as $opp) {{-- --}} @empty @endforelse
OPP No Customer Salesperson Close Date Value Outcome Job
{{ $opp->opportunity_no ?? '#'.str_pad($opp->id,5,'0',STR_PAD_LEFT) }} {{ Str::limit($opp->customer?->display_name??$opp->customer?->company_name??'-',20) }} {{ $opp->salesperson?->name ?? '-' }} {{ $opp->actual_close_date }}{{ number_format($opp->estimated_value,2) }} @if($opp->status === 'won') Won @else Lost @endif {{ $opp->rejection_reason ? ($reasonLabels[$opp->rejection_reason]??ucfirst($opp->rejection_reason)) : '-' }} @if($opp->job) {{ $opp->job->job_no }} @else - @endif
No data
@endif
@endsection @push('scripts') @endpush PKk]bNpages/crm/visits.blade.phpnu[@extends('layouts.app') @section('title', 'Visit & Target Management') @section('content') {{-- Page title --}}

Visit & Target Management

{{-- Today stats --}}
{{ $todayVisits }}
Visits today
{{ $todayTargets }}
Today's target
@php $pct = $todayTargets > 0 ? min(100, round(($todayVisits/$todayTargets)*100)) : 0; @endphp
{{ $pct }}%
Achievement
{{ max(0, $todayTargets - $todayVisits) }}
Remaining
{{-- Tabs --}}
{{-- ── VISIT LOG TAB ── --}}
{{-- Filters --}}
{{-- Table --}}
@include('pages.crm.partials.visit_rows', ['visits' => $visits])
# Date Salesperson Customer Time In/Out Location Inquiry Actions
{{-- ── TARGETS TAB ── --}}
{{-- ADD THIS --}} @include('pages.crm.partials.target_rows', ['targets' => $targets])
Date / Range Salesperson Visit Target Visits Done Achievement Status Inquiry Target Inquiries Target AmountActions
{{-- ── ADD VISIT MODAL ── --}} {{-- ── ADD TARGET MODAL ── --}} @endsection @push('scripts') @endpush PKk] /* ══════════════════════════════════════════ SALESPERSON DASHBOARD ══════════════════════════════════════════ */ /* Hero greeting */ .sp-hero { background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 60%, #06b6d4 100%); border-radius: 20px; padding: 28px 32px; color: #fff; margin-bottom: 1.5rem; position: relative; overflow: hidden; } .sp-hero::before { content: ''; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .06); } .sp-hero::after { content: ''; position: absolute; right: 60px; bottom: -60px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .04); } .sp-hero .greeting { font-size: 1.05rem; opacity: .75; font-weight: 500; } .sp-hero .name { font-size: 1.8rem; font-weight: 900; line-height: 1.1; } .sp-hero .date-str { font-size: .82rem; opacity: .6; margin-top: 4px; } .sp-hero .hero-stats { display: flex; gap: 24px; margin-top: 20px; flex-wrap: wrap; } .sp-hero .hs-item { text-align: center; } .sp-hero .hs-val { font-size: 1.8rem; font-weight: 900; line-height: 1; } .sp-hero .hs-lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .7px; opacity: .65; margin-top: 2px; } .sp-hero .hs-divider { width: 1px; background: rgba(255, 255, 255, .2); align-self: stretch; } /* Stat cards */ .sp-stat { border: 0; border-radius: 16px; box-shadow: 0 4px 20px rgba(15, 23, 42, .07); transition: transform .2s; } .sp-stat:hover { transform: translateY(-3px); } .sp-stat .stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; } .sp-stat .stat-value { font-size: 1.7rem; font-weight: 800; line-height: 1; } .sp-stat .stat-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .7px; color: #6b7280; margin-top: 4px; } /* Progress slim */ .progress-slim { height: 6px; border-radius: 99px; background: #e5e7eb; overflow: hidden; } .progress-slim .bar { height: 100%; border-radius: 99px; transition: width .8s ease; } /* Donut */ .donut-wrap { position: relative; width: 110px; height: 110px; } .donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; } .donut-center .dv { font-size: 1.4rem; font-weight: 900; line-height: 1; } .donut-center .dl { font-size: .6rem; color: #9ca3af; text-transform: uppercase; letter-spacing: .4px; } /* Dash card */ .dash-card { border: 0 !important; border-radius: 16px !important; box-shadow: 0 4px 20px rgba(15, 23, 42, .07) !important; } .dash-card .card-header { background: transparent; border-bottom: 2px solid #f1f5f9; padding: .9rem 1.25rem .7rem; font-weight: 800; font-size: .86rem; color: #0f172a; } /* Task list */ .task-item { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px dashed #e5e7eb; } .task-item:last-child { border-bottom: none; } .task-dot { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: .85rem; flex-shrink: 0; } .task-item .t-name { font-size: .85rem; font-weight: 700; color: #111827; } .task-item .t-meta { font-size: .74rem; color: #9ca3af; } .task-item .t-time { font-size: .72rem; font-weight: 700; min-width: 44px; text-align: right; flex-shrink: 0; } /* Overdue pulse */ @keyframes pulse-red { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .4); } 70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } } .pulse-red { animation: pulse-red 2s infinite; } /* Pipeline item */ .pipe-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; } .pipe-item:last-child { border-bottom: none; } .pipe-badge { font-size: .65rem; padding: 2px 7px; border-radius: 99px; font-weight: 700; white-space: nowrap; } /* Timeline dot for upcoming */ .fu-timeline { display: flex; flex-direction: column; gap: 0; } .fu-item { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid #f8fafc; } .fu-item:last-child { border-bottom: none; } .fu-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .8rem; flex-shrink: 0; } /* Overdue alert box */ .overdue-box { background: #fef2f2; border: 1.5px solid #fecaca; border-radius: 14px; padding: 12px 16px; } /* Quick link */ .quick-link { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-radius: 10px; background: #f8fafc; border: 1px solid #f1f5f9; text-decoration: none; color: inherit; transition: all .2s; font-size: .83rem; font-weight: 600; } .quick-link:hover { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; } /* Today visit log */ .visit-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; } .visit-item:last-child { border-bottom: none; } /* Badge styles */ .status-chip { font-size: .65rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; } /* Add to existing @endpush @section('content') @if(isset($error))
Account Not Linked
{{ $error }}
@else {{-- ── Hero greeting ── --}} {{-- ── Hero greeting ── --}}
Good {{ \Carbon\Carbon::now()->hour < 12 ? 'morning' : (\Carbon\Carbon::now()->hour < 17 ? 'afternoon' : 'evening') }},
{{ $user->name }}
{{ \Carbon\Carbon::now()->format('l, d F Y') }}
{{ $sp_daily_visits }}
Visits Today
{{ $myOpenInquiries->count() }}
Open Inquiries
{{ $myActiveOpps->count() }}
Active Opps
{{-- ── Period Tab Switcher ── --}} {{-- ── Period Tab Switcher ── --}}
{{-- ── Overdue alert ── --}} @php $totalOverdue = $myOverdueFollowUps->count() + count($myOverdueActivities); @endphp @if ($totalOverdue > 0)
{{ $totalOverdue }} Overdue Task{{ $totalOverdue > 1 ? 's' : '' }}
{{-- Overdue activities with mark-done button --}} @foreach ($myOverdueActivities->take(3) as $oa) {{ $oa->opportunity?->customer?->display_name ?? ($oa->opportunity?->title ?? 'Activity') }} • {{ \Carbon\Carbon::parse($oa->activity_date)->format('d M') }} @endforeach @if ($totalOverdue > 6) +{{ $totalOverdue - 6 }} more @endif
@endif {{-- ══ DAILY TAB ══ --}}
{{-- ── Daily performance stats ── --}}
Target: {{ $sp_daily_target }}
{{ $sp_daily_visits }}
Visits Today
{{ $sp_daily_visit_pct }}% of target
{{ $sp_daily_inquiries }}
Inquiries Today
{{ $myActiveOpps->count() }}
Active Opportunities
{{-- ── Main content grid ── --}}
{{-- TODAY'S TASKS column --}}
{{-- Today's follow-up tasks --}}
Today's Tasks {{ $myFollowUps->count() + count($myScheduledActivities) }}
{{-- Scheduled activities --}} @foreach ($myScheduledActivities as $act) @php $aIcons = [ 'meeting' => 'ri-group-line', 'site_visit' => 'ri-map-pin-line', 'phone_call' => 'ri-phone-line', 'email' => 'ri-mail-line', 'document_sharing' => 'ri-file-transfer-line', 'other' => 'ri-calendar-event-line', ]; $aColors = [ 'meeting' => 'bg-primary-subtle text-primary', 'site_visit' => 'bg-info-subtle text-info', 'phone_call' => 'bg-success-subtle text-success', 'email' => 'bg-warning-subtle text-warning', 'document_sharing' => 'bg-secondary-subtle text-secondary', 'other' => 'bg-secondary-subtle text-secondary', ]; @endphp
{{ $act->opportunity?->customer?->display_name ?? ($act->opportunity?->title ?? 'Activity') }}
{{ ucfirst(str_replace('_', ' ', $act->activity_type)) }} @if ($act->notes) • {{ Str::limit($act->notes, 30) }} @endif
{{ $act->activity_time_in ? \Carbon\Carbon::parse($act->activity_time_in)->format('H:i') : '--' }}
@endforeach {{-- Follow-ups --}} @foreach ($myFollowUps as $fu) @php $fuC = $fu->opportunity?->customer ?? $fu->salesInquiry?->customer; $fuTime = \Carbon\Carbon::parse($fu->followup_datetime); $isOvr = $fuTime->isPast(); $fuIcons = [ 'call' => 'ri-phone-line', 'visit' => 'ri-map-pin-line', 'email' => 'ri-mail-line', 'other' => 'ri-alarm-line', ]; $fuColors = [ 'call' => 'bg-success-subtle text-success', 'visit' => 'bg-info-subtle text-info', 'email' => 'bg-warning-subtle text-warning', 'other' => 'bg-secondary-subtle text-secondary', ]; @endphp
{{ $fuC?->display_name ?? ($fuC?->company_name ?? 'Customer') }}
{{ ucfirst($fu->interaction_type ?? 'follow-up') }} @if ($fu->notes) • {{ Str::limit($fu->notes, 35) }} @endif
{{ $fuTime->format('H:i') }} @if ($isOvr)
LATE
@endif
@endforeach @if ($myFollowUps->isEmpty() && empty($myScheduledActivities))
All clear! No tasks scheduled.
@endif
{{-- Visit target donut --}}
Today's Visit Target
{{ $sp_daily_visit_pct }}%
done
{{ $sp_daily_visits }} completed
{{ max(0, $sp_daily_target - $sp_daily_visits) }} remaining
{{ $sp_daily_target }} target
{{-- My Targets --}} {{--
My Targets
--}} {{-- Daily --}} {{--
Daily Visits {{ $sp_daily_visits }} / {{ $sp_daily_target ?: '—' }}
{{ $sp_daily_visit_pct }}% achieved today
--}} {{-- Monthly --}} {{--
Monthly Visits {{ $sp_monthly_visits }} / {{ $sp_monthly_target ?: '—' }}
{{ $sp_monthly_visit_pct }}% of {{ $sp_monthly_target }} target this month
--}} {{--
--}} {{-- Target Progress --}} {{-- Quick links --}}
{{-- END tasks column --}} {{-- PIPELINE + UPCOMING column --}}
{{-- Monthly stats bar --}} {{--
{{ $sp_monthly_visits }}
Visits This Month
{{ $sp_monthly_visit_pct }}% of {{ $sp_monthly_target }}
{{ $sp_monthly_inquiries }}
Inquiries (Month)
{{ $sp_monthly_opps }}
Opportunities (Month)
{{ number_format($sp_monthly_won_value, 0) }}
Won Value (LKR)
--}} {{-- Open Inquiries --}}
My Open Inquiries {{ $myOpenInquiries->count() }}
@if ($myOpenInquiries->isEmpty())
No open inquiries
@else @php $siCols=['new'=>'bg-info-subtle text-info','assigned'=>'bg-primary-subtle text-primary','contacted'=>'bg-warning-subtle text-warning','follow_up'=>'bg-purple-subtle text-purple','converted'=>'bg-success-subtle text-success']; @endphp @foreach ($myOpenInquiries as $si) @endforeach
SI No Customer Type Status
#SI-{{ str_pad($si->id, 5, '0', STR_PAD_LEFT) }} {{ Str::limit($si->customer?->display_name ?? '-', 22) }} {{ ucfirst(str_replace('_', ' ', $si->inquiry_type ?? '-')) }} {{ ucfirst(str_replace('_', ' ', $si->inquiry_status ?? 'new')) }}
@endif
{{-- Active Opportunities --}}
My Active Opportunities {{ $myActiveOpps->count() }}
@if ($myActiveOpps->isEmpty())
No active opportunities
@else @php $oppCols=['new'=>'bg-info-subtle text-info','contacted'=>'bg-primary-subtle text-primary','qualified'=>'bg-warning-subtle text-warning','negotiation'=>'bg-purple-subtle text-purple']; @endphp @foreach ($myActiveOpps as $opp) @endforeach
OPP No Title Value Status
{{ $opp->opportunity_no ?? '#' . str_pad($opp->id, 5, '0', STR_PAD_LEFT) }} {{ Str::limit($opp->title ?? '-', 24) }} {{ number_format($opp->estimated_value, 0) }} {{ ucfirst($opp->status ?? 'new') }}
@endif
{{-- END pipeline column --}}
{{-- ── Today's Visit Log ── --}}
Today's Visit Log
{{ $myTodayVisitLog->count() }} logged Log Visit
@if ($myTodayVisitLog->isEmpty())
No visits logged today yet
Log My First Visit
@else
@foreach ($myTodayVisitLog as $v)
{{ $v->customer?->display_name ?? ($v->customer?->company_name ?? 'Customer') }}
@if ($v->visit_time_in || $v->visit_time_out)
{{ $v->visit_time_in ?? '--' }} – {{ $v->visit_time_out ?? '--' }}
@endif @if ($v->notes)
{{ Str::limit($v->notes, 50) }}
@endif @if ($v->latitude && $v->longitude)
GPS captured
@endif
@endforeach
@endif
{{-- ══ MONTHLY TAB ══ --}}
{{-- Monthly KPI stat cards --}}
{{ $sp_monthly_visits }}
Visits This Month
{{ $sp_monthly_visit_pct }}% of {{ $sp_monthly_target }}
{{ $sp_monthly_inquiries }}
Inquiries (Month)
{{ $sp_monthly_opps }}
Opportunities (Month)
{{ number_format($sp_monthly_won_value, 0) }}
Won Value (LKR)
{{-- Monthly Target Progress (3 targets with donuts) --}}
{{-- Visit Target Donut --}}
Visit Target
{{ $sp_visit_target_pct }}%
done
{{ $sp_target_visit_achieved }} done
{{ max(0, $sp_target_visit_assigned - $sp_target_visit_achieved) }} remaining
{{ $sp_target_visit_assigned }} target
{{-- Inquiry Target Donut --}}
Inquiry Target
{{ $sp_inquiry_target_pct }}%
done
{{ $sp_target_inquiry_achieved }} done
{{ max(0, $sp_target_inquiry_assigned - $sp_target_inquiry_achieved) }} remaining
{{ $sp_target_inquiry_assigned }} target
{{-- Amount Target Donut --}}
{{ $sp_amount_target_pct }}%
done
LKR {{ number_format($sp_target_amount_achieved, 0) }} achieved (won)
LKR {{ number_format(max(0, $sp_target_amount_assigned - $sp_target_amount_achieved), 0) }} remaining
LKR {{ number_format($sp_target_amount_assigned, 0) }} target
{{-- Monthly detailed target progress per period --}}
Target Breakdown (This Month)
@forelse($myTargetProgress as $tp)
{{ \Carbon\Carbon::parse($tp['from'])->format('d M') }} @if ($tp['from'] != $tp['to']) – {{ \Carbon\Carbon::parse($tp['to'])->format('d M') }} @endif
@if ($tp['visit_assigned'] > 0)
Visits {{ $tp['visit_achieved'] }} / {{ $tp['visit_assigned'] }}
@endif @if ($tp['inquiry_assigned'] > 0)
Inquiries {{ $tp['inquiry_achieved'] }} / {{ $tp['inquiry_assigned'] }}
@endif @if ($tp['amount_assigned'] > 0)
Amount Target (LKR) {{ number_format($tp['amount_achieved'], 0) }} won / {{ number_format($tp['amount_assigned'], 0) }}
Remaining: LKR {{ number_format(max(0, $tp['amount_assigned'] - $tp['amount_achieved']), 0) }} {{ $tp['amount_pct'] }}% achieved
@endif
@empty
No targets assigned this month
@endforelse
{{-- END MONTHLY TAB --}} @endif @endsection @push('scripts') @endpush PKk];æ}}pages/crm/dashboard.blade.phpnu[@extends('layouts.app') @section('title', 'CRM Dashboard') @push('css') @endpush @section('content') {{-- ══ PAGE HEADER ═══════════════════════════════════════════════════ --}}

CRM Dashboard

{{ \Carbon\Carbon::now()->format('l, d F Y') }}
{{-- Period tabs --}}
{{-- ══════════════════════════════════════════════════════════════════════ DAILY TAB ══════════════════════════════════════════════════════════════════════ --}} {{-- ── ALL-TIME TOTAL SALES ── --}}
Monthly Total Revenue — All Won Opportunities
LKR {{ number_format($wonThisMonth, 2) }} {{-- ({{ $monthlyWonCount }} deals) --}}
{{ $totalWonCountAllTime }} deals closed  |  This month: ({{ $monthlyWonCount }} deals)
Pipeline (active)
{{--
LKR {{ number_format($totalPipelineValue, 0) }}
--}}
{{-- ── Stat row ── --}} {{-- ── Stat row ── --}}
@if ($daily_inquiries > 0) +{{ $daily_inquiries }} @endif
{{ $daily_inquiries }}
New Inquiries
{{ $daily_open_inquiries }} still open
@if ($daily_won > 0) {{ $daily_won }} won @endif
{{ $daily_opportunities }}
New Opps
{{ $daily_won }} won today
@if ($daily_visit_pct >= 100) Done @endif
{{ $daily_visits }}
Visits Completed
{{ $daily_visits }} of {{ $daily_targets }} visits done
@if ($daily_activities > 0) +{{ $daily_activities }} @endif
{{ $daily_activities }}
Activities Today
@if ($daily_won_value > 0) {{ $daily_won }} deals @endif
{{ number_format($daily_won_value, 0) }}
Won Today (LKR)
{{-- END stat row --}} {{-- ── Daily tasks + Overview grid ── --}}
{{-- Today's scheduled tasks --}} {{-- Today's scheduled tasks --}}
Today's Scheduled Tasks {{ $todayFollowUps->count() + count($todayActivities) }}
{{-- Activities --}} @foreach ($todayActivities as $act) @php $aIcons = [ 'meeting' => 'ri-group-line', 'site_visit' => 'ri-map-pin-line', 'phone_call' => 'ri-phone-line', 'email' => 'ri-mail-line', 'document_sharing' => 'ri-file-transfer-line', 'other' => 'ri-calendar-event-line', ]; $aColors = [ 'meeting' => 'text-primary', 'site_visit' => 'text-info', 'phone_call' => 'text-success', 'email' => 'text-warning', 'document_sharing' => 'text-secondary', 'other' => 'text-secondary', ]; $aBgs = [ 'meeting' => '#eff6ff', 'site_visit' => '#ecfeff', 'phone_call' => '#f0fdf4', 'email' => '#fffbeb', 'document_sharing' => '#f8fafc', 'other' => '#f8fafc', ]; $isDone = $act->completion_status === 'completed'; @endphp
{{-- Icon badge --}}
{{-- Content --}}
{{ $act->opportunity?->customer?->display_name ?? ($act->opportunity?->title ?? 'Activity') }}
{{ ucfirst(str_replace('_', ' ', $act->activity_type)) }} @if ($act->salespersons?->count()) • {{ $act->salespersons->pluck('name')->join(', ') }} @endif
@if ($isDone) Completed @endif
{{-- Time + action --}}
{{ $act->activity_time_in ? \Carbon\Carbon::parse($act->activity_time_in)->format('H:i') : '--' }}
@if (!$isDone) @endif
@endforeach {{-- Follow-ups --}} @foreach ($todayFollowUps as $fu) @php $fuC = $fu->opportunity?->customer ?? $fu->salesInquiry?->customer; $fuIcons = [ 'call' => 'ri-phone-line', 'visit' => 'ri-map-pin-line', 'email' => 'ri-mail-line', 'other' => 'ri-alarm-line', ]; $fuColors = [ 'call' => 'text-success', 'visit' => 'text-info', 'email' => 'text-warning', 'other' => 'text-secondary', ]; $fuBgs = [ 'call' => '#f0fdf4', 'visit' => '#ecfeff', 'email' => '#fffbeb', 'other' => '#f8fafc', ]; $fuTime = \Carbon\Carbon::parse($fu->followup_datetime); $isOverdue = $fuTime->isPast(); $isDoneFu = $fu->status === 'completed'; @endphp
{{-- Icon badge --}}
{{-- Content --}}
{{ $fuC?->display_name ?? ($fuC?->company_name ?? 'Customer') }}
{{ $fu->salesperson?->name ?? '-' }} • {{ ucfirst($fu->interaction_type ?? 'follow-up') }} @if ($fu->notes) • {{ Str::limit($fu->notes, 28) }} @endif
@if ($isDoneFu) Completed @elseif($isOverdue) Overdue @endif
{{-- Time + action --}}
{{ $fuTime->format('H:i') }}
@if (!$isDoneFu) @endif
@endforeach @if ($todayFollowUps->isEmpty() && empty($todayActivities))
No tasks scheduled for today
@endif
{{-- Daily graphical overview --}}
{{-- Visit progress donut --}}
Visits Completed
{{ $daily_visits }}
completed
{{-- Salesperson-wise visit breakdown --}}
@php $todayStr = \Carbon\Carbon::today()->toDateString(); $spVisitBreakdown = \App\Models\CrmSalespersonVisit::where('active', 1) ->whereDate('visit_date', $todayStr) ->selectRaw('salesperson_id, count(*) as visit_count') ->with('salesperson') ->groupBy('salesperson_id') ->orderByDesc('visit_count') ->get(); @endphp @forelse($spVisitBreakdown as $spv)
{{ strtoupper(substr($spv->salesperson?->name ?? 'S', 0, 1)) }}
{{ $spv->salesperson?->name ?? 'Unknown' }}
{{ $spv->visit_count }} visits
@empty
No visits today
@endforelse
{{-- Inquiry status donut --}}
Open Inquiries
{{ $openInquiries }}
open
@php $siColors = [ 'new' => '#06b6d4', 'assigned' => '#3b82f6', 'contacted' => '#f59e0b', 'follow_up' => '#8b5cf6', 'converted' => '#10b981', 'closed' => '#9ca3af', ]; @endphp @foreach ($inquiryByStatus as $st => $cnt)
{{ ucfirst(str_replace('_', ' ', $st)) }}
{{ $cnt }}
@endforeach
{{-- Active opps summary --}} {{-- Pipeline Snapshot --}}
Pipeline snapshot
@php $pipeItems = [ 'new' => ['label'=>'New', 'color'=>'#0891b2', 'track'=>'#cffafe'], 'contacted' => ['label'=>'Contacted', 'color'=>'#185FA5', 'track'=>'#dbeafe'], 'qualified' => ['label'=>'Qualified', 'color'=>'#BA7517', 'track'=>'#fef3c7'], 'negotiation' => ['label'=>'Negotiation', 'color'=>'#534AB7', 'track'=>'#ede9fe'], 'won' => ['label'=>'Won', 'color'=>'#3B6D11', 'track'=>'#d1fae5'], 'lost' => ['label'=>'Lost', 'color'=>'#A32D2D', 'track'=>'#fee2e2'], ]; $pMax = max(1, collect($oppByStatus)->sum('count')); @endphp @foreach($pipeItems as $k => $p) @php $cnt = $oppByStatus[$k]['count'] ?? 0; $pct = max(4, round(($cnt / $pMax) * 100)); @endphp
{{ $p['label'] }}
{{ $cnt }}
@endforeach
{{-- Upcoming follow-ups mini --}} {{--
Next 7 Days All
@forelse($upcomingFollowUps->take(6) as $fu) @php $fuC = $fu->opportunity?->customer ?? $fu->salesInquiry?->customer; $fuDt = \Carbon\Carbon::parse($fu->followup_datetime); $lbl = $fuDt->isToday() ? 'Today' : ($fuDt->isTomorrow() ? 'Tomorrow' : $fuDt->format('d M')); @endphp
{{ $fuC?->display_name ?? $fuC?->company_name ?? '-' }}
{{ $fu->salesperson?->name ?? '-' }}
{{ $lbl }}
{{ $fuDt->format('H:i') }}
@empty
No upcoming follow-ups
@endforelse
--}}
{{-- END tasks + overview --}} {{-- ── Recent records ── --}}
Recent Inquiries All
@php $siCols=['new'=>'bg-info-subtle text-info','assigned'=>'bg-primary-subtle text-primary','contacted'=>'bg-warning-subtle text-warning','follow_up'=>'bg-purple-subtle text-purple','converted'=>'bg-success-subtle text-success','closed'=>'bg-secondary-subtle text-secondary']; @endphp @forelse($recentInquiries as $si) @empty @endforelse
SI No Customer Salesperson Status
#SI-{{ str_pad($si->id, 5, '0', STR_PAD_LEFT) }} {{ Str::limit($si->customer?->display_name ?? ($si->customer?->company_name ?? '-'), 20) }} {{ $si->salesperson?->name ?? '-' }} {{ ucfirst(str_replace('_', ' ', $si->inquiry_status ?? 'new')) }}
No inquiries
Recent Opportunities All
@php $oppCols=['new'=>'bg-info-subtle text-info','contacted'=>'bg-primary-subtle text-primary','qualified'=>'bg-warning-subtle text-warning','negotiation'=>'bg-purple-subtle text-purple','won'=>'bg-success-subtle text-success','lost'=>'bg-danger-subtle text-danger']; @endphp @forelse($recentOpportunities as $opp) @empty @endforelse
OPP No Title Value Status
{{ $opp->opportunity_no ?? '#' . str_pad($opp->id, 5, '0', STR_PAD_LEFT) }} {{ Str::limit($opp->title ?? '-', 22) }} {{ number_format($opp->estimated_value, 0) }} {{ ucfirst($opp->status ?? 'new') }}
No opportunities
{{-- END DAILY TAB --}} {{-- ══════════════════════════════════════════════════════════════════════ MONTHLY TAB ══════════════════════════════════════════════════════════════════════ --}}
{{ \Carbon\Carbon::now()->format('F Y') }}
Month-to-date performance
{{-- ── Monthly KPI cards ── --}}
{{ $monthly_inquiries }}
Inquiries
{{ $monthly_converted }} converted ({{ $monthly_conversion_rate }}%)
{{ $monthly_opportunities }}
Opportunities
{{ $monthly_won }} won
{{ $monthly_visits }}
Visits
{{ $monthly_visit_pct }}% of {{ $monthly_visit_target }} target
{{ $monthly_activities }}
Activities
{{ number_format($monthly_won_value, 0) }}
Won Value (LKR)
Pipeline: {{ number_format($monthly_pipeline_value, 0) }}
{{-- ── Charts ── --}}
{{-- 12-month trend chart --}}
12-Month Trend
{{-- Salesperson performance --}}
Salesperson Performance (This Month)
@php $maxV = $salespersonPerf->max('visit_count') ?: 1; @endphp @forelse($salespersonPerf as $sp)
{{ strtoupper(substr($sp->salesperson?->name ?? 'S', 0, 1)) }}
@php $spWonVal = \App\Models\CrmOpportunity::where('active', 1) ->where('salesperson_id', $sp->salesperson_id) ->where('status', 'won') ->whereMonth('actual_close_date', now()->month) ->whereYear('actual_close_date', now()->year) ->sum('target_amount'); @endphp
{{ $sp->salesperson?->name ?? 'Unknown' }} {{ $sp->visit_count }} visits
Won: LKR {{ number_format($spWonVal, 0) }}
@empty
No visit data this month
@endforelse
{{-- ── KPI summary grid ── --}}
{{-- ── Salesperson Target Progress ── --}}
Salesperson Target Progress — {{ \Carbon\Carbon::now()->format('F Y') }} {{ $allSpTargetProgress->count() }} salespersons
@forelse($allSpTargetProgress as $sp) @php $spName = $sp['salesperson']?->name ?? 'Unknown'; $spInitial = strtoupper(substr($spName, 0, 1)); @endphp
{{-- Salesperson header --}}
{{ $spInitial }}
{{ $spName }}
{{-- Visit target --}} @if ($sp['visit_assigned'] > 0)
Visit Target
{{ $sp['visit_achieved'] }} done {{ $sp['visit_remaining'] }} left / {{ $sp['visit_assigned'] }}
{{ $sp['visit_pct'] }}% achieved
@endif {{-- Inquiry target --}} @if ($sp['inquiry_assigned'] > 0)
Inquiry Target
{{ $sp['inquiry_achieved'] }} done {{ $sp['inquiry_remaining'] }} left / {{ $sp['inquiry_assigned'] }}
{{ $sp['inquiry_pct'] }}% achieved
@endif {{-- Amount target --}} @if ($sp['amount_assigned'] > 0)
Amount Target (LKR)
{{ number_format($sp['amount_achieved'], 0) }} {{ number_format($sp['amount_remaining'], 0) }} left / {{ number_format($sp['amount_assigned'], 0) }}
{{ $sp['amount_pct'] }}% achieved
{{ $sp['won_count'] ?? 0 }} deals won {{ $sp['visit_count'] ?? 0 }} visits Remaining: LKR {{ number_format($sp['amount_remaining'], 0) }}
@endif
@empty
No targets assigned this month
@endforelse
{{-- ── Improved Monthly Achievement Summary ── --}} {{-- ── Monthly Achievement Summary ── --}} @php $monthly_amount_assigned = \App\Models\CrmSalespersonTarget::where('active',1) ->whereMonth('target_date', now()->month) ->whereYear('target_date', now()->year) ->sum('target_amount'); $monthly_amount_achieved = \App\Models\CrmOpportunity::where('active',1) ->where('status','won') ->whereMonth('actual_close_date', now()->month) ->whereYear('actual_close_date', now()->year) ->sum('target_amount'); $monthly_amount_remaining = max(0, $monthly_amount_assigned - $monthly_amount_achieved); $monthly_amount_pct = $monthly_amount_assigned > 0 ? min(100, round(($monthly_amount_achieved / $monthly_amount_assigned) * 100)) : 0; $monthly_won_count = \App\Models\CrmOpportunity::where('active',1) ->where('status','won') ->whereMonth('actual_close_date', now()->month) ->whereYear('actual_close_date', now()->year) ->count(); $monthly_lost_count = \App\Models\CrmOpportunity::where('active',1) ->where('status','lost') ->whereMonth('updated_at', now()->month) ->whereYear('updated_at', now()->year) ->count(); $monthly_win_rate = ($monthly_won_count + $monthly_lost_count) > 0 ? min(100, round($monthly_won_count / ($monthly_won_count + $monthly_lost_count) * 100)) : 0; @endphp
Monthly Achievement Summary {{ \Carbon\Carbon::now()->format('F Y') }}
{{-- ── Amount Target Bar ── --}}
Monthly amount target achievement
Total assigned vs won (LKR)
{{ $monthly_amount_pct }}% achieved
LKR {{ number_format($monthly_amount_achieved, 0) }}
Achieved
LKR {{ number_format($monthly_amount_remaining, 0) }}
Remaining
LKR {{ number_format($monthly_amount_assigned, 0) }}
Total target
{{-- ── 3 Ring KPIs ── --}}
{{ $monthly_visit_pct }}%
{{ $monthly_visit_pct }}%
Visit achievement
{{ number_format($monthly_visits) }} of {{ number_format($monthly_visit_target) }} visits
{{ $monthly_conversion_rate }}%
{{ $monthly_conversion_rate }}%
Conversion rate
{{ $monthly_converted }} of {{ $monthly_inquiries }} inquiries
{{ $monthly_win_rate }}%
{{ $monthly_win_rate }}%
Win rate
{{ $monthly_won_count }} won · {{ $monthly_lost_count }} lost
{{-- ── 8-stat mini grid ── --}}
@php $mStats = [ ['val' => number_format($monthly_inquiries), 'lbl' => 'Inquiries', 'col' => '#185FA5'], ['val' => number_format($monthly_converted), 'lbl' => 'Converted', 'col' => '#3B6D11'], ['val' => number_format($monthly_opportunities), 'lbl' => 'Opportunities', 'col' => '#BA7517'], ['val' => number_format($monthly_won_count), 'lbl' => 'Deals won', 'col' => '#059669'], ['val' => number_format($monthly_lost_count), 'lbl' => 'Deals lost', 'col' => '#dc2626'], ['val' => number_format($monthly_visits), 'lbl' => 'Total visits', 'col' => '#0891b2'], ['val' => number_format($monthly_activities), 'lbl' => 'Activities', 'col' => '#7c3aed'], ['val' => 'LKR '.number_format($monthly_won_value/1000,1).'K', 'lbl' => 'Revenue won', 'col' => '#059669'], ]; @endphp @foreach($mStats as $s)
{{ $s['val'] }}
{{ $s['lbl'] }}
@endforeach
{{-- ── Monthly Division Performance ── --}}
Monthly Division Performance — {{ \Carbon\Carbon::now()->format('F Y') }} {{ $monthlyDivisionPerf->count() }} active
@forelse($monthlyDivisionPerf as $div) @php $maxAmt = $monthlyDivisionPerf->max('won_amount') ?: 1; $barPct = min(100, round(($div->won_amount / $maxAmt) * 100)); $initial = strtoupper(substr($div->salesperson?->name ?? 'S', 0, 1)); @endphp
{{-- Avatar --}}
{{ $initial }}
{{-- Name + bar --}}
{{ $div->salesperson?->name ?? 'Unknown' }} LKR {{ number_format($div->won_amount, 0) }}
{{ $div->won_count }} projects won {{ $barPct }}% of top
{{-- Badge --}}
{{ $div->won_count }} deals
@empty
No won deals this month yet
@endforelse
{{-- Footer summary --}} @if ($monthlyDivisionPerf->count()) @endif
{{-- END MONTHLY TAB --}} {{-- ══════════════════════════════════════════════════════════════════════ YEARLY TAB ══════════════════════════════════════════════════════════════════════ --}}
{{ \Carbon\Carbon::now()->format('Y') }} Annual Overview
Year-to-date performance across all metrics
{{-- ── Yearly KPI strip ── --}}
{{ $yearly_inquiries }}
Total Inquiries
{{ $yearly_converted }} converted
{{ $yearly_opportunities }}
Opportunities
{{ $yearly_won }} won / {{ $yearly_lost }} lost
{{ $yearly_visits }}
Total Visits
{{ $yearly_visit_pct }}% of {{ number_format($yearly_visit_target) }} target
{{ $yearly_activities }}
Activities
{{ number_format($yearly_won_value, 0) }}
Won Value (LKR)
Win rate: {{ $yearly_win_rate }}%
{{-- ── Annual bar chart + win rate ── --}}
{{ \Carbon\Carbon::now()->format('Y') }} Monthly Breakdown
Annual KPIs
@php $kpis = [ [ 'label' => 'Inquiry → Opportunity Rate', 'val' => $yearly_conversion_rate, 'color' => '#3b82f6', ], ['label' => 'Visit Achievement', 'val' => $yearly_visit_pct, 'color' => '#10b981'], [ 'label' => 'Win Rate (Won vs Closed)', 'val' => $yearly_win_rate, 'color' => '#f59e0b', ], ]; @endphp @foreach ($kpis as $kpi)
{{ $kpi['label'] }} {{ $kpi['val'] }}%
@endforeach
{{ $yearly_lost }}
Deals Lost
LKR {{ number_format($yearly_pipeline_value / 1000, 1) }}K
Active Pipeline
{{-- ── Year achievement summary ── --}} {{-- ── Year Achievement Summary ── --}} @php $yearly_visit_target = $yearly_visit_target ?? 0; $yearly_visit_target_assigned = \App\Models\CrmSalespersonTarget::where('active',1) ->whereYear('target_date', now()->year)->sum('visit_target'); $yearly_amount_assigned = \App\Models\CrmSalespersonTarget::where('active',1) ->whereYear('target_date', now()->year)->sum('target_amount'); $yearly_amount_achieved = \App\Models\CrmOpportunity::where('active',1) ->where('status','won') ->whereYear('actual_close_date', now()->year) ->sum('target_amount'); $yearly_amount_remaining = max(0, $yearly_amount_assigned - $yearly_amount_achieved); $yearly_amount_pct = $yearly_amount_assigned > 0 ? min(100, round(($yearly_amount_achieved / $yearly_amount_assigned) * 100)) : 0; @endphp
Year Achievement Summary — {{ \Carbon\Carbon::now()->format('Y') }}
{{-- ── Amount Target Progress Bar ── --}}
Yearly Amount Target Achievement
Total assigned vs won (LKR)
{{ $yearly_amount_pct }}% achieved
LKR {{ number_format($yearly_amount_achieved, 0) }}
Achieved
LKR {{ number_format($yearly_amount_remaining, 0) }}
Remaining
LKR {{ number_format($yearly_amount_assigned, 0) }}
Total Target
{{-- ── 3 Ring KPIs ── --}}
{{ $yearly_visit_pct }}%
Visit Achievement
{{ number_format($yearly_visits) }} of {{ number_format($yearly_visit_target) }} visits
{{ $yearly_conversion_rate }}%
Conversion Rate
{{ $yearly_converted }} of {{ $yearly_inquiries }} inquiries
{{ $yearly_win_rate }}%
Win Rate
{{ $yearly_won }} won · {{ $yearly_lost }} lost
{{-- ── Bottom stat mini grid ── --}}
@php $yrStats = [ ['val' => number_format($yearly_inquiries), 'lbl' => 'Total Inquiries', 'col' => '#2563eb'], ['val' => number_format($yearly_converted), 'lbl' => 'Converted', 'col' => '#10b981'], ['val' => number_format($yearly_opportunities), 'lbl' => 'Opportunities', 'col' => '#f59e0b'], ['val' => number_format($yearly_won), 'lbl' => 'Deals Won', 'col' => '#059669'], ['val' => number_format($yearly_lost), 'lbl' => 'Deals Lost', 'col' => '#ef4444'], ['val' => number_format($yearly_visits), 'lbl' => 'Total Visits', 'col' => '#06b6d4'], ['val' => number_format($yearly_activities), 'lbl' => 'Activities', 'col' => '#8b5cf6'], ['val' => 'LKR '.number_format($yearly_won_value/1000,1).'K', 'lbl' => 'Revenue Won', 'col' => '#10b981'], ]; @endphp @foreach($yrStats as $s)
{{ $s['val'] }}
{{ $s['lbl'] }}
@endforeach
{{-- END YEARLY TAB }} {{-- ══ EMAIL MODAL ══════════════════════════════════════════════════ --}} {{-- --}} @endsection @push('scripts') @endpush PKk]SE'pages/crm/partials/visit_rows.blade.phpnu[{{-- ============================== VISIT ROWS PARTIAL resources/views/pages/crm/partials/visit_rows.blade.php ============================== --}} @php $outcomeLabels = [ 'inquiry_created' => ['label' => 'Inquiry Created', 'class' => 'bg-success-subtle text-success'], 'follow_up' => ['label' => 'Follow-up', 'class' => 'bg-warning-subtle text-warning'], 'no_outcome' => ['label' => 'No Outcome', 'class' => 'bg-secondary-subtle text-secondary'], 'other' => ['label' => 'Other', 'class' => 'bg-light text-dark border'], ]; @endphp @forelse($visits as $v) {{ $loop->iteration + ($visits->currentPage() - 1) * $visits->perPage() }}
{{ $v->visit_date ? \Carbon\Carbon::parse($v->visit_date)->format('d M Y') : '-' }}
@if (\Carbon\Carbon::parse($v->visit_date)->isToday()) Today @endif
{{ strtoupper(substr($v->salesperson->name ?? 'S', 0, 1)) }}
{{ $v->salesperson->name ?? '-' }}
{{ $v->customer?->display_name ?? ($v->customer?->company_name ?? '-') }}
{{ $v->visit_time_in ?? '-' }} @if ($v->visit_time_out) → {{ $v->visit_time_out }} @endif {{-- @if ($v->outcome) {{ $outcomeLabels[$v->outcome]['label'] ?? ucfirst($v->outcome) }} @else - @endif --}} @if ($v->location_confirmed) GPS ✓ @elseif($v->manually_confirmed) Manual @else Not confirmed @endif @if ($v->salesInquiry) SI-{{ str_pad($v->salesInquiry->id, 5, '0', STR_PAD_LEFT) }} @else - @endif @empty No visits found. @endforelse PKk]&؀(pages/crm/partials/target_rows.blade.phpnu[{{-- resources/views/pages/crm/partials/target_rows.blade.php --}} @forelse($targets as $t) @php $visitPct = $t->visit_target > 0 ? min(100, round(($t->visits_completed / $t->visit_target) * 100)) : 0; $inqPct = $t->inquiry_target > 0 ? min(100, round(($t->inquiries_created / $t->inquiry_target) * 100)) : 0; $barColor = $visitPct >= 100 ? '#10b981' : ($visitPct >= 60 ? '#3b82f6' : '#f59e0b'); // Date range display $from = $t->target_date_from ? \Carbon\Carbon::parse($t->target_date_from) : null; $to = $t->target_date_to ? \Carbon\Carbon::parse($t->target_date_to) : null; $isRange = $from && $to && !$from->eq($to); $isActive = $from && $to && now()->between($from, $to); $now = \Carbon\Carbon::now(); $expired = $t->target_date_to && \Carbon\Carbon::parse($t->target_date_to)->lt($now); $active = $t->target_date_from && $t->target_date_to && $now->between( \Carbon\Carbon::parse($t->target_date_from), \Carbon\Carbon::parse($t->target_date_to) ); // Achievement status if ($visitPct >= 100) { $achieveStatus = ['label' => '✅ Achieved', 'color' => 'success']; } elseif ($expired && $visitPct < 100) { $achieveStatus = ['label' => '❌ Missed', 'color' => 'danger']; } elseif ($active && $visitPct >= 60) { $achieveStatus = ['label' => '🔵 In Progress', 'color' => 'primary']; } elseif ($active && $visitPct < 60) { $achieveStatus = ['label' => '⚠️ Needs Attention','color' => 'warning']; } else { $achieveStatus = ['label' => '🟡 Upcoming', 'color' => 'secondary']; } @endphp {{-- DATE (range or single) --}} @if ($isRange)
{{ $from->format('d M Y') }}
→ {{ $to->format('d M Y') }}
@if ($isActive) Active @elseif($to && $to->isPast()) Expired @endif @else {{ $from ? $from->format('d M Y') : '-' }} @if ($from && $from->isToday()) Today @endif @endif {{-- SALESPERSON --}}
{{ strtoupper(substr($t->salesperson?->name ?? 'S', 0, 1)) }}
{{ $t->salesperson?->name ?? '-' }}
{{-- Show linked opportunity if any --}} @if ($t->opportunity)
{{ $t->opportunity->opportunity_no }}
@endif
{{-- VISIT TARGET --}} {{ $t->visit_target }} {{-- VISITS DONE --}} {{ $t->visits_completed }} {{-- ACHIEVEMENT BAR --}}
{{ $visitPct }}%
{{ $achieveStatus['label'] }} {{-- Show days remaining if active --}} @if($active && $visitPct < 100) @php $daysLeft = \Carbon\Carbon::now() ->diffInDays(\Carbon\Carbon::parse($t->target_date_to), false); @endphp
{{ round($daysLeft) }} days left
@endif {{-- Show how many visits missed if expired --}} @if($expired && $visitPct < 100)
{{ $t->visit_target - $t->visits_completed }} visits short
@endif {{-- INQUIRY TARGET --}} {{ $t->inquiry_target }} {{-- INQUIRIES DONE --}} {{ $t->inquiries_created }} {{-- TARGET AMOUNT (new column) --}} @if ($t->target_amount > 0) {{ number_format($t->target_amount, 2) }} @else @endif {{-- ACTIONS --}}
@if($t->repeat_monthly) @endif
@empty No targets found for this period. @endforelse PKk]c?-pages/crm/partials/opportunity_rows.blade.phpnu[@php $statusColors = [ 'new' => 'bg-info-subtle text-info', 'contacted' => 'bg-primary-subtle text-primary', 'qualified' => 'bg-warning-subtle text-warning', 'negotiation' => 'bg-purple-subtle text-purple', 'won' => 'bg-success-subtle text-success', 'lost' => 'bg-danger-subtle text-danger', ]; $statusLabels = [ 'new' => 'New', 'contacted' => 'Contacted', 'qualified' => 'Qualified', 'negotiation' => 'Negotiation', 'won' => 'Won', 'lost' => 'Lost', ]; @endphp @forelse($opportunities as $opp) {{ $loop->iteration + ($opportunities->currentPage() - 1) * $opportunities->perPage() }} {{ $opp->opportunity_no ?? '#OPP-'.str_pad($opp->id,5,'0',STR_PAD_LEFT) }}
{{ $opp->title ?? '-' }}
@if($opp->salesInquiry) SI-{{ str_pad($opp->salesInquiry->id, 5, '0', STR_PAD_LEFT) }} @endif {{-- Customer column --}} @if($opp->customer) {{ $opp->customer->display_name ?? $opp->customer->company_name }} @elseif($opp->salesInquiry?->walkInCustomer) {{ $opp->salesInquiry->walkInCustomer->customer_name }} Walk-in @else - @endif {{-- Salesperson column --}} @if($opp->salesperson) {{ $opp->salesperson->name }} @elseif($opp->salesInquiry?->salespersons?->count()) {{ $opp->salesInquiry->salespersons->pluck('name')->join(', ') }} @else - @endif
Created
{{ $opp->created_date ? \Carbon\Carbon::parse($opp->created_date)->format('d M Y') : '-' }}
@if($opp->expected_close_date) @php $close = \Carbon\Carbon::parse($opp->expected_close_date); @endphp
{{ $close->format('d M Y') }}
@if($close->isPast() && !in_array($opp->status,['won','lost'])) Overdue @endif @else - @endif {{-- {{ number_format($opp->estimated_value, 2) }} --}} {{ $statusLabels[$opp->status] ?? ucfirst($opp->status) }} @if($opp->approved && $opp->status === 'won')
Approved
@endif
@if($opp->status === 'won' && !$opp->approved) @endif @if($opp->approved && $opp->status === 'won' && !$opp->job_id) @endif
@empty No opportunities found. @endforelse PKk]q^^!pages/crm/opportunities.blade.phpnu[@extends('layouts.app') @section('title', 'Opportunities') @section('content') {{-- Page title --}}

Opportunities

{{-- Pipeline status bar --}}
@php $chips = [ 'new' => ['label' => 'New', 'class' => 'chip-new'], 'contacted' => ['label' => 'Contacted', 'class' => 'chip-contacted'], 'qualified' => ['label' => 'Qualified', 'class' => 'chip-qualified'], 'negotiation' => ['label' => 'Negotiation', 'class' => 'chip-negotiation'], 'won' => ['label' => 'Won', 'class' => 'chip-won'], 'lost' => ['label' => 'Lost', 'class' => 'chip-lost'], ]; @endphp
{{ array_sum($pipeline) }}
All
@foreach ($chips as $key => $chip)
{{ $pipeline[$key] ?? 0 }}
{{ $chip['label'] }}
@endforeach
{{-- Top bar --}}
Opportunity List {{ $opportunities->total() }}
{{-- Table --}}
{{-- --}} @include('pages.crm.partials.opportunity_rows', [ 'opportunities' => $opportunities, ])
# OPP No Title / SI Customer Salesperson Created Follow-up / Close Est. Value Status Actions
{{-- ════════════════════════════════════ ADD OPPORTUNITY MODAL ════════════════════════════════════ --}} {{-- VIEW / MANAGE OPPORTUNITY MODAL --}} {{-- END #viewOppModal --}} @endsection @push('scripts') @endpush PKk]Pvv3pages/hr/attendance/attendance_management.blade.phpnu[@extends('layouts.app') @section('content') @php $selectedFromDate = request()->query('from_date', $fromDate); $selectedToDate = request()->query('to_date', $toDate); $selectedDepartment = request()->query('department', ''); $selectedEmployeeGroup = request()->query('employee_group_id', ''); $selectedEmpCode = request()->query('emp_code', ''); $selectedPunchState = request()->query('punch_state', ''); $selectedTerminal = request()->query('terminal_alias', ''); $rowStart = ($records->currentPage() - 1) * $records->perPage(); function minutesToHourTextLocal($minutes) { $minutes = (int) $minutes; return intdiv($minutes, 60) . 'h ' . ($minutes % 60) . 'm'; } @endphp

Attendance Management

Manage raw attendance punches before attendance processing.
Raw Attendance Punches
{{ $records->total() }} records
@forelse($records as $record) @php $employeeName = trim(($record->first_name ?? '') . ' ' . ($record->last_name ?? '')); @endphp @empty @endforelse
No Emp Code Name Department Punch Time Punch Type Device Source Actions
{{ $rowStart + $loop->iteration }} {{ $record->emp_code }} {{ $employeeName ?: '-' }} {{ $record->department ?? '-' }} {{ $record->punch_time ? \Carbon\Carbon::parse($record->punch_time)->format('Y-m-d H:i:s') : '-' }} {{ $record->punch_state == '0' ? 'CHECK IN' : 'CHECK OUT' }} {{ $record->terminal_alias ?? '-' }} {{ strtoupper($record->source ?? '-') }}
@csrf @method('DELETE')
@if(!$hasFilters) Please apply filters to load attendance punches. @else No attendance punches found. @endif
{{ $records->links() }}
Temporary Work Summary
{{ $summaryRows->count() }} records
@forelse($summaryRows as $row) @php $employeeName = trim(($row->first_name ?? '') . ' ' . ($row->last_name ?? '')); @endphp @empty @endforelse
No Date Emp Code Name Department Check In Check Out Work Hrs OT Hrs Total Punches
{{ $loop->iteration }} {{ $row->attendance_date }} {{ $row->emp_code }} {{ $employeeName ?: '-' }} {{ $row->department ?? '-' }} {{ $row->check_in ? \Carbon\Carbon::parse($row->check_in)->format('Y-m-d H:i:s') : '-' }} {{ $row->check_out ? \Carbon\Carbon::parse($row->check_out)->format('Y-m-d H:i:s') : '-' }} {{ minutesToHourTextLocal($row->work_minutes) }} {{ minutesToHourTextLocal($row->ot_minutes) }} {{ $row->total_punches }}
@if(!$hasFilters) Please apply filters to load work summary. @else No work summary records found. @endif
Note: This is temporary calculation only. Final attendance calculation should be done from Attendance Processing module.
{{-- ADD MODAL --}} {{-- EDIT MODAL --}} @endsection @push('styles') @endpush @push('scripts') @endpushPKk]f4\!!Bpages/hr/attendance/partials/attendance_management_print.blade.phpnu[@extends('layouts.recipt-header') @section('title', ($printType ?? 'raw') === 'summary' ? 'Attendance Work Summary' : 'Raw Attendance Punch Report') @section('invoice-title', ($printType ?? 'raw') === 'summary' ? 'Attendance Work Summary' : 'Raw Attendance Punch Report') @section('content')
Report
{{ ($printType ?? 'raw') === 'summary' ? 'Work Summary' : 'Attendance Management' }}
Generated Date
{{ now()->format('m/d/Y H:i') }}
Total Records
{{ $records->count() }}
Source
{{ ($printType ?? 'raw') === 'summary' ? 'Temporary Raw Log Summary' : 'Raw Attendance Logs' }}
@if(($printType ?? 'raw') === 'summary') @forelse($records as $row) @php $employeeName = trim(($row->first_name ?? '') . ' ' . ($row->last_name ?? '')); $workMinutes = (int) ($row->work_minutes ?? 0); $otMinutes = (int) ($row->ot_minutes ?? 0); $workHrs = intdiv($workMinutes, 60) . 'h ' . ($workMinutes % 60) . 'm'; $otHrs = intdiv($otMinutes, 60) . 'h ' . ($otMinutes % 60) . 'm'; @endphp @empty @endforelse
# Date Emp Code Employee Department Check In Check Out Work Hrs OT Hrs Job  
{{ $loop->iteration }} {{ $row->attendance_date ?? '-' }} {{ $row->emp_code }} {{ $employeeName ?: '-' }} {{ $row->department ?? '-' }} @if($row->check_in)
{{ \Carbon\Carbon::parse($row->check_in)->format('m/d/Y') }} {{ \Carbon\Carbon::parse($row->check_in)->format('H:i') }}
@else - @endif
@if($row->check_out)
{{ \Carbon\Carbon::parse($row->check_out)->format('m/d/Y') }} {{ \Carbon\Carbon::parse($row->check_out)->format('H:i') }}
@else - @endif
{{ $workHrs }} {{ $otHrs }}
No attendance summary records found.
@else @forelse($records as $record) @php $employeeName = trim(($record->first_name ?? '') . ' ' . ($record->last_name ?? '')); $punchDate = $record->punch_time ? \Carbon\Carbon::parse($record->punch_time)->format('m/d/Y') : '-'; $punchTime = $record->punch_time ? \Carbon\Carbon::parse($record->punch_time)->format('H:i') : '-'; @endphp @empty @endforelse
# Emp Code Employee Department Punch Date Punch Time Type Job  
{{ $loop->iteration }} {{ $record->emp_code }} {{ $employeeName ?: '-' }} @if($record->source)
Source: {{ strtoupper($record->source) }}
@endif
{{ $record->department ?? '-' }} {{ $punchDate }} @if($record->punch_time) {{ $punchTime }} @else - @endif {{ $record->punch_state == '0' ? 'Check In' : 'Check Out' }}
No attendance punches found.
@endif
@endsectionPKk]rܣbb!reports/available-stock.blade.phpnu[@extends('reports.layouts.report') @section('report-title') Available Stock Valuation Report @endsection @section('extra-filters') {{-- As At Date --}}
{{-- Store --}}
{{-- Category --}}
{{-- Item --}}
{{-- UOM --}}
{{-- Stock Status --}}
{{-- Minimum Cost --}}
{{-- Maximum Cost --}}
{{-- Item search --}}
@endsection @section('report-table') @if ($data->isEmpty())

No stock records were found for the selected filters.

@else {{-- Summary Cards --}}
Unique Items
{{ $data->pluck('item_id')->unique()->count() }}
Physical Stock
{{ number_format($data->sum('physical_stock'), 4) }}
Reserved Stock
{{ number_format($data->sum('reserved_stock'), 4) }}
Available Stock
{{ number_format($data->sum('available_qty'), 4) }}
Total Stock Value
{{ number_format($data->sum('amount'), 2) }}
{{-- Hidden and used by DataTables RowGroup --}} @foreach ($data as $index => $row) @endforeach
#Category Item Code Item Description UOM Store Physical Stock Reserved Stock Available Qty Rate (Cost) Amount
{{ $index + 1 }} {{ $row->category_name }} {{ $row->item_code }}
{{ $row->item_name }}
@if ( $row->re_order_level > 0 && $row->available_qty > 0 && $row->available_qty <= $row->re_order_level ) Low Stock @endif
{{ $row->uom }} {{ $row->store_name }} {{ number_format($row->physical_stock, 4) }} @if ($row->reserved_stock > 0) {{ number_format($row->reserved_stock, 4) }} @else - @endif {{ number_format($row->available_qty, 4) }} @if ($row->available_qty == 0) Out of Stock @elseif ($row->available_qty < 0) Negative @endif {{ number_format($row->rate, 2) }} {{ number_format($row->amount, 2) }}
Grand Total {{ number_format($data->sum('physical_stock'), 4) }} {{ number_format($data->sum('reserved_stock'), 4) }} {{ number_format($data->sum('available_qty'), 4) }} - {{ number_format($data->sum('amount'), 2) }}
@endif @endsection @push('scripts') @endpushPKk] "VVreports/bills.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Bills Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No records found for the selected filters.

@elseif ($data->isNotEmpty()) {{-- Summary Cards --}}
Total Bills
{{ $data->count() }}
Total Amount
{{ number_format($data->sum('total_amount'), 2) }}
Cash Bills
{{ $data->filter(fn($r) => strtolower($r->payment_method ?? '') == 'cash')->count() }}
Cheque Bills
{{ $data->filter(fn($r) => strtolower($r->payment_method ?? '') == 'cheque')->count() }}
{{-- Table --}}
@foreach ($data as $i => $bill) @endforeach
# Bill Date Ref No Name Supplier Payment Method Cheque No Total Amount Note
{{ $i + 1 }} {{ optional($bill->bill_date)->format('Y-m-d') ?? '-' }} {{ $bill->ref_no ?? '-' }} {{ $bill->name ?? '-' }} {{ $bill->supplier?->company_name ?? '-' }} @php $pm = strtolower($bill->payment_method ?? ''); $pmColor = match($pm) { 'cash' => 'success', 'cheque' => 'primary', default => 'secondary', }; @endphp {{ strtoupper($bill->payment_method ?? '-') }} {{ $bill->cheque_no ?? '-' }} {{ number_format($bill->total_amount ?? 0, 2) }} {{ Str::limit($bill->note ?? '-', 35) }}
Total {{ number_format($data->sum('total_amount'), 2) }}
@endif @endsection @push('scripts') @endpush PKk]FQ''reports/customers.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Customer Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty())

No customers found for the selected filters.

@else {{-- Summary Cards --}}
Total Customers
{{ $data->count() }}
Active
{{ $data->filter(fn($r) => strtolower($r->status ?? '') == 'active')->count() }}
VAT Registered
{{ $data->where('vat_status', 1)->count() }}
Total Credit Limit
{{ number_format($data->sum('credit_limit'), 2) }}
{{-- Table --}}
@foreach ($data as $i => $cust) @endforeach
# Customer No Company Name Display Name Email Phone Status VAT Credit Limit Credit Days Opening Balance Registered Date
{{ $i + 1 }} {{ $cust->customer_no ?? '-' }} {{ $cust->company_name ?? '-' }} {{ $cust->display_name ?? '-' }} {{ $cust->email ?? '-' }} {{ $cust->phone ?? '-' }} @php $sc = match(strtolower($cust->status ?? '')) { 'active' => 'success', 'inactive' => 'warning', 'blocked' => 'danger', default => 'secondary', }; @endphp {{ ucfirst($cust->status ?? '-') }} @if ($cust->vat_status) VAT @else Non-VAT @endif {{ number_format($cust->credit_limit ?? 0, 2) }} {{ $cust->credit_days ?? '-' }} {{ number_format($cust->opening_balance ?? 0, 2) }} {{ $cust->registered_date ?? '-' }}
Total {{ number_format($data->sum('credit_limit'), 2) }} {{ number_format($data->sum('opening_balance'), 2) }}
@endif @endsection @push('scripts') @endpush PKk]%XNN reports/general_ledger.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') General Ledger @endsection @section('extra-filters')
{{--
--}} {{--
--}} @endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No ledger entries found for the selected filters.

@elseif ($data->isNotEmpty()) {{-- ── Financial Summary Panel ─────────────────────────────── --}}
{{-- Top row: DR / CR / Net --}}
Total Debit (DR)
{{ number_format($summary['total_dr'], 2) }}
{{ $summary['debit_entries'] }} entries
DR
Total Credit (CR)
{{ number_format($summary['total_cr'], 2) }}
{{ $summary['credit_entries'] }} entries
CR
@php $netBalance = $summary['net_balance']; @endphp
Net Balance
{{ $netBalance >= 0 ? '' : '-' }}{{ number_format(abs($netBalance), 2) }}
{{ $netBalance >= 0 ? 'Debit Balance' : 'Credit Balance' }}
{{ $netBalance >= 0 ? '▲' : '▼' }}
{{-- Bottom row: Qty & Count stats --}}
Total Entries
{{ $data->count() }}
{{--
Total DR Qty
{{ number_format($summary['total_dr_qty'], 2) }}
Total CR Qty
{{ number_format($summary['total_cr_qty'], 2) }}
Net Qty
{{ number_format($summary['total_dr_qty'] - $summary['total_cr_qty'], 2) }}
--}}
{{-- ── Ledger Table ─────────────────────────────────────────── --}}
{{-- --}} {{-- --}} {{-- @php $docTypeMap = [ 1 => ['label' => 'GRN', 'color' => 'primary'], 2 => ['label' => 'NS-GRN', 'color' => 'info'], 3 => ['label' => 'Bill', 'color' => 'warning'], 4 => ['label' => 'NS-Job Costing', 'color' => 'secondary'], 5 => ['label' => 'Subcontractor', 'color' => 'danger'], 6 => ['label' => 'Payment Voucher', 'color' => 'success'], 7 => ['label' => 'Invoice', 'color' => 'primary'], ]; @endphp --}} @foreach ($data as $i => $entry) @php $isDr = ($entry->dr ?? 0) > 0; $isCr = ($entry->cr ?? 0) > 0; $rowBg = $isDr ? 'rgba(46,125,50,0.04)' : ($isCr ? 'rgba(198,40,40,0.04)' : ''); $balance = $entry->running_balance ?? 0; @endphp {{-- --}} {{-- DR column --}} {{-- CR column --}} {{-- --}} {{-- Running Balance --}} @endforeach {{-- ── Totals Footer ──────────────────────── --}} {{-- --}}
# Date Account Party Doc TypeDoc RefDebit (DR) Credit (CR)DR Qty CR QtyBalance
{{ $i + 1 }}
{{ optional($entry->created_at)->format('Y-m-d') }}
{{ optional($entry->created_at)->format('H:i') }}
{{ $entry->chartOfAccount?->name ?? '-' }} @if ($entry->supplier)
{{ $entry->supplier->company_name }}
@elseif ($entry->customer)
{{ $entry->customer->company_name }}
@else - @endif
{{ $entry->doc_type_name }} #{{ $entry->doc_id ?? '-' }} @if ($isDr) {{ number_format($entry->dr, 2) }} @else @endif @if ($isCr) {{ number_format($entry->cr, 2) }} @else @endif {{ ($entry->dr_qty ?? 0) > 0 ? number_format($entry->dr_qty, 2) : '—' }} {{ ($entry->cr_qty ?? 0) > 0 ? number_format($entry->cr_qty, 2) : '—' }} @if ($balance < 0) - @endif {{ number_format(abs($balance), 2) }}
{{ $balance >= 0 ? 'DR' : 'CR' }}
Totals {{ number_format($summary['total_dr'], 2) }} {{ number_format($summary['total_cr'], 2) }} {{ number_format($summary['total_dr_qty'], 2) }} {{ number_format($summary['total_cr_qty'], 2) }} @if ($summary['net_balance'] < 0) - @endif {{ number_format(abs($summary['net_balance']), 2) }}
{{ $summary['net_balance'] >= 0 ? 'DR Balance' : 'CR Balance' }}
@endif @endsection @push('scripts') @endpush PKk]? ? reports/gin.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Good Issue Note Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No records found for the selected filters.

@elseif ($data->isNotEmpty()) {{-- Summary Cards --}}
Total Dispatch Notes
{{-- ← changed --}}
{{ $data->count() }}
Posted
{{ $data->where('status', 'posted')->count() }}
Pending / Draft
{{ $data->where('status', 'pending')->count() }} / {{ $data->where('status', 'draft')->count() }}
{{-- Table --}}
{{-- ← changed --}} {{-- ← changed --}} {{-- ← changed --}} @foreach ($data as $i => $dn) {{-- ← changed --}} {{-- ← changed --}} {{-- ← changed --}} @endforeach {{-- ← changed --}}
# DN NoDate Job No Customer Status Posted ByPosted AtNotes
{{ $i + 1 }} {{ $dn->dn_no ?? 'DN-' . $dn->id }} {{-- ← changed --}} {{ optional($dn->dn_date)->format('Y-m-d') ?? '-' }} @if ($dn->job_no) {{ $dn->job_no }} @else - @endif {{ $dn->customer->company_name ?? $dn->customer_name ?? '-' }} @php $statusColor = match(strtolower($dn->status ?? '')) { 'posted' => 'success', 'dispatched' => 'info', 'pending' => 'warning', 'cancelled' => 'danger', 'draft' => 'secondary', default => 'secondary', }; @endphp {{ ucfirst($dn->status ?? '-') }} {{ $dn->posted_by ?? '-' }}{{ optional($dn->posted_at)->format('Y-m-d H:i') ?? '-' }}{{ Str::limit($dn->notes ?? '-', 35) }}
Total Records {{ $data->count() }} dispatch note(s)
@endif @endsection @push('scripts') @endpush PKk])Ѧ$$ reports/good_transfers.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Good Transfer Notes Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No records found for the selected filters.

@elseif ($data->isNotEmpty()) {{-- Summary Cards --}}
Total Transfers
{{ $data->count() }}
Total Net Value
{{ number_format($data->sum('net_value'), 2) }}
Total VAT Amount
{{ number_format($data->sum('vat_amount'), 2) }}
Total Grand Total
{{ number_format($data->sum('grand_total'), 2) }}
{{-- Table --}}
@foreach ($data as $i => $gtn) @endforeach
# Date Ref No From Store To Store Sub Total Discount Net Value VAT VAT Amount Grand Total
{{ $i + 1 }} {{ optional($gtn->doc_date)->format('Y-m-d') ?? '-' }} {{ $gtn->ref_no ?? '-' }} {{ $gtn->fromStore?->name ?? $gtn->from_store ?? '-' }} {{ $gtn->toStore?->name ?? $gtn->to_store ?? '-' }} {{ number_format($gtn->sub_total ?? 0, 2) }} {{ ($gtn->discount ?? 0) > 0 ? '- ' . number_format($gtn->discount, 2) : '-' }} {{ number_format($gtn->net_value ?? 0, 2) }} @if ($gtn->vat_status) With VAT @else No VAT @endif {{ number_format($gtn->vat_amount ?? 0, 2) }} {{ number_format($gtn->grand_total ?? 0, 2) }}
Total {{ number_format($data->sum('sub_total'), 2) }} {{ number_format($data->sum('discount'), 2) }} {{ number_format($data->sum('net_value'), 2) }} {{ number_format($data->sum('vat_amount'), 2) }} {{ number_format($data->sum('grand_total'), 2) }}
@endif @endsection @push('scripts') @endpush PKk]%CK1"1"reports/grn.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') GRN Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No records found for the selected filters.

@elseif ($data->isNotEmpty()) {{-- Summary Cards --}}
Total GRNs
{{ $data->count() }}
Sub Total
{{ number_format($data->sum('sub_total'), 2) }}
Total VAT
{{ number_format($data->sum('vat_amount'), 2) }}
Grand Total
{{ number_format($data->sum('grand_total'), 2) }}
{{-- Table --}}
@php $start = 1; @endphp @foreach ($data as $i => $row) @endforeach {{-- --}}
# GRN ID Doc Date Due Date Supplier GRN Type Ref No Invoice No VAT Sub Total Discount Grand Total
{{ $start + $i }} #{{ $row->id }} {{ $row->doc_date ? $row->doc_date->format('Y-m-d') : '-' }} {{ $row->due_date ? $row->due_date->format('Y-m-d') : '-' }} {{ $row->supplier->company_name ?? '-' }} @if ($row->grn_type === 'non_stock_grn') Non-Stock @else GRN @endif {{ $row->ref_no ?? '-' }} {{ $row->supplier_invoice_no ?? '-' }} @if ($row->vat_status) VAT @else No VAT @endif {{ number_format($row->sub_total, 2) }} {{ number_format($row->discount, 2) }} {{ number_format($row->grand_total, 2) }}
Totals {{ number_format($data->sum('sub_total'), 2) }} {{ number_format($data->sum('discount'), 2) }}{{ number_format($data->sum('grand_total'), 2) }}
@endif @endsection @push('scripts') @endpush PKk]&  reports/index.blade.phpnu[{{-- resources/views/reports/index.blade.php --}} @extends('layouts.app') @section('content')

Reports

@php $reportGroups = [ 'Purchase' => [ ['label' => 'GRN Report', 'route' => 'reports.grn'], ['label' => 'Purchase Orders Report', 'route' => 'reports.purchase_orders'], ['label' => 'Purchase Returns Report', 'route' => 'reports.purchase_returns'], ['label' => 'Payments to Supplier', 'route' => 'reports.payments_to_supplier'], ], 'Sales' => [ ['label' => 'Sales Estimations Report', 'route' => 'reports.sales-estimations'], ['label' => 'Job Report', 'route' => 'reports.jobs'], ['label' => 'Good Issue Notes Report', 'route' => 'reports.gin'], ['label' => 'Material Request Report', 'route' => 'reports.purchase-mr'], ['label' => 'Supplement Request Report', 'route' => 'reports.supplement-requests'], ['label' => 'Non-Stock Job Costing Report', 'route' => 'reports.non-stock-job-costing'], ['label' => 'Employee Job Costing Report', 'route' => 'reports.employee-job-costing'], ['label' => 'Store Request Report', 'route' => 'reports.store-requests'], ['label' => 'Dispatch Notes Report', 'route' => 'reports.dispatch_notes'], ['label' => 'Invoice Report', 'route' => 'reports.invoices'], ], 'Stock' => [ ['label' => 'Good Transfer Notes Report', 'route' => 'reports.good-transfers'], ['label' => 'Stock Transaction Report', 'route' => 'reports.stock'], ['label' => 'Available Stock Report', 'route' => 'reports.available-stock'], ], 'Items' => [ ['label' => 'Items Report', 'route' => 'reports.items'], ['label' => 'Serial Item Flow Report', 'route' => 'reports.serial_item_flow'], ['label' => 'Item Flow Report', 'route' => 'reports.item_flow'], ], 'Customer' => [ ['label' => 'Customer Report', 'route' => 'reports.customers'], ['label' => 'Customer Outstanding Report', 'route' => 'reports.customer.outstanding'], ], 'Expences' => [ ['label' => 'Bill Report', 'route' => 'reports.bills'], ], 'Finance' => [ ['label' => 'General Ledger Report', 'route' => 'reports.general-ledger'], ['label' => 'Trial Balance Report', 'route' => 'reports.trial-balance'], ['label' => 'VAT Summary Report', 'route' => 'reports.vat_summary'], ], // Add more groups ]; @endphp @foreach ($reportGroups as $group => $reports)
{{ $group }}
@endforeach
@endsectionPKk]7%+1+1reports/invoices.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Invoice Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No records found for the selected filters.

@elseif ($data->isNotEmpty()) {{-- Summary Cards --}}
Total Invoices
{{ $data->count() }}
Grand Total
{{ number_format($data->sum('grand_total'), 2) }}
Total Paid
{{ number_format($data->sum('payable_amount'), 2) }}
Total VAT
{{ number_format($data->sum('vat_amount'), 2) }}
Total SSCL
{{ number_format($data->sum('sscl_amount'), 2) }}
{{-- Table --}}
@foreach ($data as $i => $inv) @endforeach
# Invoice No Date Due Date Customer Type Job No Status Net Value VAT SSCL Grand Total Payable Amount
{{ $i + 1 }} {{ $inv->invoice_no }} @if ($inv->is_advance_payment) ADVANCE @endif {{ optional($inv->doc_date)->format('Y-m-d') ?? '-' }} {{ optional($inv->due_date)->format('Y-m-d') ?? '-' }} {{ $inv->customer?->company_name ?? '-' }} @if ($inv->invoiceType) {{ $inv->invoiceType->type_name }} @else - @endif @if ($inv->job?->job_no) {{ $inv->job->job_no }} @else - @endif @php $sc = match(strtolower($inv->status ?? '')) { 'approved' => 'success', 'paid' => 'success', 'partially paid' => 'info', 'pending' => 'warning', 'cancelled' => 'danger', 'draft' => 'secondary', default => 'secondary', }; @endphp {{ ucfirst($inv->status ?? '-') }} {{ number_format($inv->net_value ?? 0, 2) }} @if ($inv->vat_enabled) {{ number_format($inv->vat_amount ?? 0, 2) }} @else - @endif @if ($inv->sscl_enabled) {{ number_format($inv->sscl_amount ?? 0, 2) }} @else - @endif {{ number_format($inv->grand_total ?? 0, 2) }} {{ number_format($inv->payable_amount ?? 0, 2) }}
Total {{ number_format($data->sum('net_value'), 2) }} {{ number_format($data->sum('vat_amount'), 2) }} {{ number_format($data->sum('sscl_amount'), 2) }} {{ number_format($data->sum('grand_total'), 2) }} {{ number_format($data->sum('payable_amount'), 2) }}
@endif @endsection @push('scripts') @endpush PKk]Uhb..reports/items.blade.phpnu[@extends('reports.layouts.report') @section('report-title') Items Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty())

No items found for the selected filters.

@else @php $flatData = empty($filters['item_category_id']) ? $data->flatten(1) : $data; @endphp @php $stockTypes = [ 1 => 'Stock', 2 => 'Non-Stock', 3 => 'Service', ]; @endphp {{-- Summary Cards --}}
Total Items
{{ $flatData->count() }}
Unit
{{ $flatData->where('active_sales', 1)->count() }}
Stock / Non-Stock
{{ $flatData->where('stock_type', 1)->count() }} / {{ $flatData->where('stock_type', 2)->count() }} / {{ $flatData->where('stock_type', 3)->count() }}
Avg Sales Price
{{ number_format($flatData->avg('sales_price') ?? 0, 2) }}
{{-- Table --}}
@php $rowNumber = 1; @endphp @if(empty($filters['item_category_id'])) @foreach ($data as $categoryId => $items) @php $categoryName = optional($itemCategories->firstWhere('id', $categoryId))->name ?? 'Uncategorized'; @endphp @foreach ($items as $item) @endforeach @endforeach @else @foreach ($data as $i => $item) @endforeach @endif
# Item Code Barcode Name Group Stock Type Cost Sales Price Re-Order Level Max Sale Level Unit
{{ $categoryName }}
{{ $rowNumber++ }} {{ $item->itemcode ?? '-' }} {{ $item->barcode ?? '-' }} {{ $item->name ?? '-' }} {{ $item->item_group ?? '-' }} {{ $stockTypes[$item->stock_type] ?? '-' }} {{ number_format($item->cost ?? 0, 2) }} {{ number_format($item->sales_price ?? 0, 2) }} {{ $item->re_order_level ?? '-' }} {{ $item->max_sale_level ?? '-' }} {{ $item->unitMeasure->name ?? '-' }}
{{ $i + 1 }} {{ $item->itemcode ?? '-' }} {{ $item->barcode ?? '-' }} {{ $item->name ?? '-' }} {{ $item->item_group ?? '-' }} {{ $stockTypes[$item->stock_type] ?? '-' }} {{ number_format($item->cost ?? 0, 2) }} {{ number_format($item->sales_price ?? 0, 2) }} {{ $item->re_order_level ?? '-' }} {{ $item->max_sale_level ?? '-' }} {{ $item->unitMeasure->name ?? '-' }}
Total / Avg {{ number_format($flatData->avg('cost') ?? 0, 2) }} {{ number_format($flatData->avg('sales_price') ?? 0, 2) }}
@endif @endsection @push('scripts') @endpushPKk]GӲ5&5&reports/jobs.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Jobs Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No records found for the selected filters.

@elseif ($data->isNotEmpty()) {{-- Summary Cards --}}
Total Jobs
{{ $data->count() }}
Total Job Value
{{ number_format($data->sum('job_value'), 2) }}
Total Sub Total
{{ number_format($data->sum('sub_total'), 2) }}
Total Gross Profit
{{ number_format($data->sum(fn($r) => $r->gross_profit ?? $r->gp_amount ?? 0), 2) }}
{{-- Table --}}
@foreach ($data as $i => $job) @endforeach
# Job No Job Date Required Date Customer Status Priority Job Value Sub Total Gross Profit GP %
{{ $i + 1 }} {{ $job->job_no }} {{ optional($job->job_date)->format('Y-m-d') ?? '-' }} {{ optional($job->required_date)->format('Y-m-d') ?? '-' }} {{ $job->customer->company_name ?? $job->customer_name ?? '-' }} @php $statusColor = match($job->status) { 'completed' => 'success', 'in_progress' => 'primary', 'pending' => 'warning', 'cancelled' => 'danger', 'on_hold' => 'secondary', default => 'secondary', }; @endphp {{ ucwords(str_replace('_', ' ', $job->status ?? '-')) }} @php $priorityColor = match(strtolower($job->priority ?? '')) { 'high' => 'danger', 'medium' => 'warning', 'low' => 'success', default => 'secondary', }; @endphp {{ ucfirst($job->priority ?? '-') }} {{ number_format($job->job_value ?? 0, 2) }} {{ number_format($job->sub_total ?? 0, 2) }} {{ number_format($job->gross_profit ?? $job->gp_amount ?? 0, 2) }} {{ number_format($job->profit_pct ?? $job->gp_percentage ?? 0, 2) }}%
Total {{ number_format($data->sum('job_value'), 2) }} {{ number_format($data->sum('sub_total'), 2) }} {{ number_format($data->sum(fn($r) => $r->gross_profit ?? $r->gp_amount ?? 0), 2) }}
@endif @endsection @push('scripts') @endpush PKk]})wgg reports/layouts/report.blade.phpnu[{{-- resources/views/reports/layouts/report.blade.php --}} @extends('layouts.app') @section('content')
{{-- Page Header --}}

@yield('report-title')

Back to Page
{{-- Filter Form --}}
@yield('extra-filters')
Reset
{{-- Report Table --}}
@yield('report-table')
{{-- Print Styles --}} @endsectionPKk]_: o""'reports/non_stock_job_costing.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Non-Stock Job Costing Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No records found for the selected filters.

@elseif ($data->isNotEmpty())
Total Records
{{ $data->count() }}
Total Sub Total
{{ number_format($data->sum('sub_total'), 2) }}
Total Tax Amount
{{ number_format($data->sum('tax_amount'), 2) }}
Total Grand Total
{{ number_format($data->sum('grand_total'), 2) }}
@foreach ($data as $i => $ns) @endforeach
# Doc No Date Job No Supplier Cost Category Ref No Status Sub Total Tax Amount Grand Total Remarks
{{ $i + 1 }} {{ $ns->doc_no }} {{ optional($ns->doc_date)->format('Y-m-d') ?? '-' }} @if ($ns->job?->job_no) {{ $ns->job->job_no }} @else - @endif {{ $ns->supplier?->company_name ?? $ns->supplier_name ?? '-' }} {{ $ns->cost_category ?? '-' }} {{ $ns->reference_no ?? '-' }} @php $sc = match(strtolower($ns->status ?? '')) { 'approved' => 'success', 'pending' => 'warning', 'cancelled'=> 'danger', default => 'secondary' }; @endphp {{ ucfirst($ns->status ?? '-') }} {{ number_format($ns->sub_total ?? 0, 2) }} {{ number_format($ns->tax_amount ?? 0, 2) }} {{ number_format($ns->grand_total ?? 0, 2) }} {{ Str::limit($ns->remarks ?? '-', 30) }}
Total {{ number_format($data->sum('sub_total'), 2) }} {{ number_format($data->sum('tax_amount'), 2) }} {{ number_format($data->sum('grand_total'), 2) }}
@endif @endsection @push('scripts') @endpush PKk] ""&reports/payments_to_supplier.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Payments to Supplier @endsection @section('extra-filters')
{{-- Prepaid Filter --}}
{{-- Item / Document Type Filter --}}
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No records found for the selected filters.

@elseif ($data->isNotEmpty()) {{-- Summary Cards --}}
Total Payments
{{ $data->count() }}
Total Amount
{{ number_format($data->sum('total_amount'), 2) }}
Cash / Cheque
{{ $data->where('payment_type', 'cash')->count() }} / {{ $data->where('payment_type', 'cheque')->count() }}
{{-- Table --}}
@php $start = 1; @endphp @foreach ($data as $i => $pv) @endforeach
# Receipt ID Date Supplier Type Payment Type Ref No Note Amount
{{ $start + $i }} RT-{{ $pv->id }} @if ($pv->is_prepaid) PREPAID @endif {{ $pv->doc_date ?? '-' }} {{ $pv->supplier->company_name ?? '-' }} @if ($pv->doc_type_labels->isEmpty()) - @else @foreach ($pv->doc_type_labels as $type) {{ $type['label'] }} @endforeach @endif @if ($pv->payment_type == 'cash') CASH @elseif ($pv->payment_type == 'cheque') CHEQUE @else {{ strtoupper($pv->payment_type ?? '-') }} @endif {{ $pv->ref_no ?? '-' }} {{ Str::limit($pv->note ?? '-', 30) }} {{ number_format($pv->total_amount ?? 0, 2) }}
Total {{ number_format($data->sum('total_amount'), 2) }}
@endif @endsection @push('scripts') @endpush PKk]yreports/purchase_mr.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Purchase MR Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No records found for the selected filters.

@elseif ($data->isNotEmpty())
Total MRs
{{ $data->count() }}
Total Sub Total
{{ number_format($data->sum('sub_total'), 2) }}
Approved
{{ $data->filter(fn($r) => strtolower($r->status) == 'approved')->count() }}
Pending / Draft
{{ $data->filter(fn($r) => strtolower($r->status) == 'pending')->count() }} / {{ $data->filter(fn($r) => strtolower($r->status) == 'draft')->count() }}
@foreach ($data as $i => $mr) @endforeach
# MR No MR Date Required Date Job No Customer Status Sub Total Notes
{{ $i + 1 }} {{ $mr->mr_no }} {{ optional($mr->mr_date)->format('Y-m-d') ?? '-' }} {{ optional($mr->required_date)->format('Y-m-d') ?? '-' }} @if ($mr->job?->job_no) {{ $mr->job->job_no }} @else - @endif {{ $mr->customer?->company_name ?? '-' }} @php $sc = match(strtolower($mr->status ?? '')) { 'approved' => 'success', 'ordered' => 'info', 'pending' => 'warning', 'cancelled' => 'danger', default => 'secondary' }; @endphp {{ ucfirst($mr->status ?? '-') }} {{ number_format($mr->sub_total ?? 0, 2) }} {{ Str::limit($mr->notes ?? '-', 35) }}
Total {{ number_format($data->sum('sub_total'), 2) }}
@endif @endsection @push('scripts') @endpush PKk]\S?99!reports/purchase_orders.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Purchase Orders @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No records found for the selected filters.

@elseif ($data->isNotEmpty())
Total Orders
{{ $data->count() }}
Total Amount
{{ number_format($data->sum('amount'), 2) }}
Total VAT
{{ number_format($data->sum('vat'), 2) }}
Grand Total
{{ number_format($data->sum('grand_total'), 2) }}
@foreach ($data as $i => $row) @endforeach {{-- --}}
# PO No SCL No Date Supplier Ref No Note Status Amount VAT Grand Total
{{ $i + 1 }} PO-{{ $row->id }} {{ $row->purchase_order_scl ?? '-' }} {{ $row->doc_date ?? '-' }} {{ $row->supplier->company_name ?? '-' }} {{ $row->ref_no ?? '-' }} {{ Str::limit($row->note ?? '-', 30) }} @php $s = strtolower($row->status ?? '') @endphp @if($s === 'approved') Approved @elseif($s === 'pending') Pending @elseif($s === 'cancelled') Cancelled @else {{ ucfirst($row->status ?? '-') }} @endif {{ number_format($row->amount ?? 0, 2) }} {{ number_format($row->vat ?? 0, 2) }} {{ number_format($row->grand_total ?? 0, 2) }}
Total {{ number_format($data->sum('amount'), 2) }} {{ number_format($data->sum('vat'), 2) }}{{ number_format($data->sum('grand_total'), 2) }}
@endif @endsection @push('scripts') @endpush PKk],s"reports/purchase_returns.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Purchase Returns @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No records found for the selected filters.

@elseif ($data->isNotEmpty())
Total Returns
{{ $data->count() }}
Total Discount
{{ number_format($data->sum('discount'), 2) }}
Total VAT
{{ number_format($data->sum('vat_amount'), 2) }}
Grand Total
{{ number_format($data->sum('grand_total'), 2) }}
@foreach ($data as $i => $row) @endforeach {{-- --}}
# Return ID Date Supplier Invoice No Ref No Sub Total Discount VAT Net Value Grand Total
{{ $i + 1 }} PR-{{ $row->id }} {{ $row->doc_date ?? '-' }} {{ $row->supplier->company_name ?? '-' }} {{ $row->supplier_invoice_no ?? '-' }} {{ $row->ref_no ?? '-' }} {{ number_format($row->sub_total ?? 0, 2) }} {{ number_format($row->discount ?? 0, 2) }} {{ number_format($row->vat_amount ?? 0, 2) }} {{ number_format($row->net_value ?? 0, 2) }} {{ number_format($row->grand_total ?? 0, 2) }}
Total {{ number_format($data->sum('sub_total'), 2) }} {{ number_format($data->sum('discount'), 2) }} {{ number_format($data->sum('vat_amount'), 2) }} {{ number_format($data->sum('net_value'), 2) }}{{ number_format($data->sum('grand_total'), 2) }}
@endif @endsection @push('scripts') @endpush PKk]'WA"A"#reports/sales_estimations.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Sales Estimations Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No records found for the selected filters.

@elseif ($data->isNotEmpty()) {{-- Summary Cards --}}
Total Estimations
{{ $data->count() }}
Total Job Value
{{ number_format($data->sum('job_value'), 2) }}
Total Sub Total
{{ number_format($data->sum('sub_total'), 2) }}
Total Gross Profit
{{ number_format($data->sum('gross_profit'), 2) }}
{{-- Table --}}
@foreach ($data as $i => $se) @endforeach
# Doc No Doc Date Due Date Customer Status Order Qty Job Value Sub Total Gross Profit Profit %
{{ $i + 1 }} {{ $se->doc_no }} {{ optional($se->doc_date)->format('Y-m-d') ?? '-' }} {{ optional($se->due_date)->format('Y-m-d') ?? '-' }} {{ $se->customer->company_name ?? '-' }} @php $statusColor = match($se->status) { 'approved' => 'success', 'converted' => 'primary', 'pending' => 'warning', 'rejected' => 'danger', 'draft' => 'secondary', default => 'secondary', }; @endphp {{ ucfirst($se->status ?? '-') }} {{ $se->order_qty ?? '-' }} {{ number_format($se->job_value ?? 0, 2) }} {{ number_format($se->sub_total ?? 0, 2) }} {{ number_format($se->gross_profit ?? 0, 2) }} {{ number_format($se->profit_pct ?? 0, 2) }}%
Total {{ number_format($data->sum('job_value'), 2) }} {{ number_format($data->sum('sub_total'), 2) }} {{ number_format($data->sum('gross_profit'), 2) }}
@endif @endsection @push('scripts') @endpush PKk]ll"reports/serial_item_flow.blade.phpnuW+A@extends('reports.layouts.report') @section('title', 'Serial Item Flow Report') @section('content') {{-- ─── Page Header ─────────────────────────────────────────────────────── --}} {{-- ─── Dark Header Bar ─────────────────────────────────────────────────── --}}
SERIAL ITEM FLOW REPORT
@if($selectedItem && $selectedSerial) Export Excel @endif
{{-- ─── Filter Card ─────────────────────────────────────────────────────── --}}
{{-- Back Button --}} {{-- From Date --}}
{{-- To Date --}}
{{-- Item Select --}}
{{-- Serial Number --}}
{{-- Action Buttons --}}
@if($selectedItem && $selectedSerial) {{-- ─── Summary Cards ───────────────────────────────────────────────────── --}}

ITEM

{{ $selectedItem->name }}

@if($selectedItem->itemcode) Code: {{ $selectedItem->itemcode }} @endif

SERIAL NUMBER

{{ $selectedSerial }}
@php $statusBg = match($currentStatus) { 'In Stock' => '#d4f5e9', 'Sold' => '#fde8e8', default => '#fff3cd' }; $statusColor = match($currentStatus) { 'In Stock' => '#1a7a4a', 'Sold' => '#b91c1c', default => '#856404' }; @endphp {{ $currentStatus ?? 'Unknown' }} @if($currentStore) — {{ $currentStore }}@endif

TOTAL RECEIVED

{{ $totalReceived }}

TOTAL ISSUED

{{ $totalIssued }}

AVAILABLE

{{ $availableQty }}

@foreach($sectionOrder as $section) {{-- ═══════════════════════════════════════════════════════════════════════ SECTION 1 — ITEM RECEIVED / STOCK ADJUSTMENT ═══════════════════════════════════════════════════════════════════════ --}} @if($section === 'received' && $received->count())
ITEM RECEIVED / STOCK ADJUSTMENT
@foreach($received as $i => $row) type === 'ADJ') style="background:#fffbe6;" @endif> @endforeach
# DATE DOCUMENT NO. REF / SUPPLIER INV SUPPLIER / PARTY STORE QTY UNIT COST AMOUNT TYPE
{{ $i + 1 }} {{ $row->doc_date ? \Carbon\Carbon::parse($row->doc_date)->format('d M Y') : '—' }} {{ $row->doc_no }} {{ $row->ref_no ?? ($row->supplier_inv ?? '—') }} {{ $row->party }} {{ $row->store }} {{ $row->qty }} {{ number_format($row->unit_cost, 2) }} {{ number_format($row->amount, 2) }} @if($row->type === 'ADJ') ADJ @else GRN @endif
TOTAL {{ $received->sum('qty') }} {{ number_format($received->sum('amount'), 2) }}
@endif {{-- ═══════════════════════════════════════════════════════════════════════ SECTION 2 — PURCHASE RETURNED ═══════════════════════════════════════════════════════════════════════ --}} @if($section === 'purchaseReturned' && $purchaseReturned->count())
PURCHASE RETURNED
@foreach($purchaseReturned as $i => $row) @endforeach
# DATE DOCUMENT NO. REF / SUPPLIER INV SUPPLIER STORE QTY
{{ $i + 1 }} {{ $row->doc_date ? \Carbon\Carbon::parse($row->doc_date)->format('d M Y') : '—' }} {{ $row->doc_no }} {{ $row->ref_no ?? ($row->supplier_inv ?? '—') }} {{ $row->party }} {{ $row->store }} {{ $row->qty }}
TOTAL {{ $purchaseReturned->sum('qty') }}
@endif {{-- ═══════════════════════════════════════════════════════════════════════ SECTION 3 — SOLD ITEMS ═══════════════════════════════════════════════════════════════════════ --}} @if($section === 'soldItems' && $soldItems->count())
SOLD ITEMS
@foreach($soldItems as $i => $row) @endforeach
# DATE INVOICE NO. CUSTOMER STORE BILLING MODE JOB NO. STATUS QTY UNIT PRICE AMOUNT
{{ $i + 1 }} {{ $row->doc_date ? \Carbon\Carbon::parse($row->doc_date)->format('d M Y') : '—' }} {{ $row->doc_no }} {{ $row->party }} {{ $row->store }} {{ ucfirst($row->billing_mode) }} @if($row->job_id) Job #{{ $row->job_id }} @else @endif @php $sc = match($row->status) { 'Paid' => ['#d4f5e9','#1a7a4a'], 'Partially Paid' => ['#fff3cd','#856404'], 'Approved' => ['#d1ecf1','#0c5460'], 'Cancelled' => ['#fde8e8','#b91c1c'], 'Saved' => ['#eef0fd','#4e6cf2'], default => ['#f8f9fc','#6c757d'], }; @endphp {{ $row->status }} {{ $row->qty }} {{ number_format($row->unit_price, 2) }} {{ number_format($row->amount, 2) }}
TOTAL {{ $soldItems->sum('qty') }} {{ number_format($soldItems->sum('amount'), 2) }}
@endif {{-- ═══════════════════════════════════════════════════════════════════════ SECTION 4 — SALES RETURN ═══════════════════════════════════════════════════════════════════════ --}} @if($section === 'salesReturn' && $salesReturn->count())
SALES RETURN
@foreach($salesReturn as $i => $row) @endforeach
# DATE DOCUMENT NO. STORE QTY
{{ $i + 1 }} {{ $row->doc_date ? \Carbon\Carbon::parse($row->doc_date)->format('d M Y') : '—' }} {{ $row->doc_no }} {{ $row->store }} {{ $row->qty }}
TOTAL {{ $salesReturn->sum('qty') }}
@endif {{-- ═══════════════════════════════════════════════════════════════════════ SECTION 5 — STOCK TRANSFERS ═══════════════════════════════════════════════════════════════════════ --}} @if($section === 'stockTransfers' && $stockTransfers->count())
STOCK TRANSFER
@foreach($stockTransfers as $i => $row) @endforeach
# DATE DOCUMENT NO. REF NO. FROM STORE TO STORE QTY COST AMOUNT
{{ $i + 1 }} {{ $row->doc_date ? \Carbon\Carbon::parse($row->doc_date)->format('d M Y') : '—' }} {{ $row->doc_no }} {{ $row->ref_no ?? '—' }} {{ $row->from_store }} {{ $row->to_store }} {{ $row->qty }} {{ number_format($row->cost, 2) }} {{ number_format($row->amount, 2) }}
TOTAL {{ $stockTransfers->sum('qty') }} {{ number_format($stockTransfers->sum('amount'), 2) }}
@endif {{-- ═══════════════════════════════════════════════════════════════════════ SECTION 6 — GOOD ISSUE NOTES (DISPATCH NOTES) ═══════════════════════════════════════════════════════════════════════ --}} @if($section === 'goodIssueNotes' && $goodIssueNotes->count())
GOOD ISSUE NOTES (DISPATCH)
@foreach($goodIssueNotes as $i => $row) @endforeach
# DATE GIN NO. JOB NO. MR / REQ NO. CUSTOMER / PARTY STORE STATUS QTY UNIT COST AMOUNT
{{ $i + 1 }} {{ $row->doc_date ? \Carbon\Carbon::parse($row->doc_date)->format('d M Y') : '—' }} {{ $row->doc_no }} @if($row->job_no && $row->job_no !== '—') {{ $row->job_no }} @if($row->job_customer)
{{ $row->job_customer }} @endif @else @endif
{{ $row->source_no ?? '—' }} {{ $row->party }} {{ $row->store }} {{ $row->status ?? '—' }} {{ $row->qty }} {{ number_format($row->unit_cost, 2) }} {{ number_format($row->amount, 2) }}
TOTAL {{ $goodIssueNotes->sum('qty') }} {{ number_format($goodIssueNotes->sum('amount'), 2) }}
@endif @endforeach {{-- ═══════════════════════════════════════════════════════════════════════ AVAILABLE QUANTITY SUMMARY FOOTER ═══════════════════════════════════════════════════════════════════════ --}}
Current Serial Status

Serial: {{ $selectedSerial }}  |  Item: {{ $selectedItem->name }} @if($fromDate) |  From: {{ \Carbon\Carbon::parse($fromDate)->format('d M Y') }}@endif

TOTAL RECEIVED

{{ $totalReceived }}

TOTAL ISSUED

{{ $totalIssued }}

STATUS

{{ $currentStatus ?? '—' }} @if($currentStore)
{{ $currentStore }}@endif
{{-- No data message --}} @if(!$received->count() && !$soldItems->count() && !$goodIssueNotes->count() && !$stockTransfers->count() && !$purchaseReturned->count() && !$salesReturn->count())
No movement records found for serial {{ $selectedSerial }}

Try removing the date filter or check if this serial has any transactions.

@endif @elseif($selectedItemId && !$selectedSerial)
Please select a serial number to view its flow

{{ $serialNumbers->count() }} serial number(s) available for this item.

@else
Serial Item Flow Report

Select an item and serial number above to trace its complete transaction history.

@endif @endsection @push('styles') @endpush @push('scripts') @endpush PKk]XV#V#reports/stock.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Stock Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No records found for the selected filters.

@elseif ($data->isNotEmpty()) {{-- Summary Cards --}}
Total Records
{{ $data->count() }}
Total Received
{{ number_format($data->sum('received'), 4) }}
Total Issued
{{ number_format($data->sum('issued'), 4) }}
Net Qty
{{ number_format($data->sum('received') - $data->sum('issued'), 4) }}
{{-- Table --}}
@foreach ($data as $i => $row) @endforeach
# Date Store Doc Type Doc ID Item Qty Received Issued
{{ $i + 1 }} {{ optional($row->created_at)->format('Y-m-d') ?? '-' }} {{ $row->store?->name ?? '-' }} @if ($row->docType) {{ $row->docType->name }} @else - @endif #{{ $row->doc_id }} {{ $row->item?->name ?? '-' }} {{ number_format($row->qty, 4) }} @if ($row->received > 0) {{ number_format($row->received, 4) }} @else - @endif @if ($row->issued > 0) {{ number_format($row->issued, 4) }} @else - @endif
Total {{ number_format($data->sum('qty'), 4) }} {{ number_format($data->sum('received'), 4) }} {{ number_format($data->sum('issued'), 4) }}
@endif @endsection @push('scripts') @endpush PKk] reports/store_requests.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Store Requests Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No records found for the selected filters.

@elseif ($data->isNotEmpty())
Total Requests
{{ $data->count() }}
Total Sub Total
{{ number_format($data->sum('sub_total'), 2) }}
Approved
{{ $data->filter(fn($r) => strtolower($r->status) == 'approved')->count() }}
Pending / Draft
{{ $data->filter(fn($r) => strtolower($r->status) == 'pending')->count() }} / {{ $data->filter(fn($r) => strtolower($r->status) == 'draft')->count() }}
@foreach ($data as $i => $mr) @endforeach
# MR No Date Job No Status Sub Total Approved At Issued At Notes
{{ $i + 1 }} {{ $mr->mr_no }} {{ optional($mr->mr_date)->format('Y-m-d') ?? '-' }} @if ($mr->job_no ?? $mr->job?->job_no) {{ $mr->job_no ?? $mr->job?->job_no }} @else - @endif @php $sc = match(strtolower($mr->status ?? '')) { 'approved' => 'success', 'issued' => 'info', 'pending' => 'warning', 'cancelled' => 'danger', default => 'secondary' }; @endphp {{ ucfirst($mr->status ?? '-') }} {{ number_format($mr->sub_total ?? 0, 2) }} {{ optional($mr->approved_at)->format('Y-m-d H:i') ?? '-' }} {{ optional($mr->issued_at)->format('Y-m-d H:i') ?? '-' }} {{ Str::limit($mr->notes ?? '-', 35) }}
Total {{ number_format($data->sum('sub_total'), 2) }}
@endif @endsection @push('scripts') @endpush PKk]O>ڏ##%reports/supplement_requests.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Supplement Requests Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No records found for the selected filters.

@elseif ($data->isNotEmpty())
Total Requests
{{ $data->count() }}
Total Net Value
{{ number_format($data->sum('net_value'), 2) }}
Total VAT Amount
{{ number_format($data->sum('vat_amount'), 2) }}
Total Grand Total
{{ number_format($data->sum('grand_total'), 2) }}
@foreach ($data as $i => $sr) @endforeach
# SR No Date Job No Status Sub Total Discount Net Value VAT VAT Amount Grand Total Notes
{{ $i + 1 }} {{ $sr->sr_no }} {{ optional($sr->sr_date)->format('Y-m-d') ?? '-' }} @if ($sr->job_no ?? $sr->job?->job_no) {{ $sr->job_no ?? $sr->job?->job_no }} @else - @endif @php $sc = match(strtolower($sr->status ?? '')) { 'approved' => 'success', 'pending' => 'warning', 'cancelled'=> 'danger', default => 'secondary' }; @endphp {{ ucfirst($sr->status ?? '-') }} {{ number_format($sr->sub_total ?? 0, 2) }} {{ ($sr->discount_amount ?? 0) > 0 ? '- ' . number_format($sr->discount_amount, 2) : '-' }} {{ number_format($sr->net_value ?? 0, 2) }} @php $vc = match(strtolower($sr->vat_status ?? '')) { 'inclusive' => 'success', 'exclusive' => 'warning', default => 'secondary' }; @endphp {{ ucfirst($sr->vat_status ?? 'None') }} {{ number_format($sr->vat_amount ?? 0, 2) }} {{ number_format($sr->grand_total ?? 0, 2) }} {{ Str::limit($sr->notes ?? '-', 30) }}
Total {{ number_format($data->sum('sub_total'), 2) }} {{ number_format($data->sum('discount_amount'), 2) }} {{ number_format($data->sum('net_value'), 2) }} {{ number_format($data->sum('vat_amount'), 2) }} {{ number_format($data->sum('grand_total'), 2) }}
@endif @endsection @push('scripts') @endpush PKk]а77reports/trial_balance.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') Trial Balance @endsection {{-- No extra filters needed beyond date range (inherited from layout) --}} @section('report-table') @if ($data->isEmpty() && !empty($filters))

No entries found for the selected date range.

@elseif ($data->isNotEmpty()) {{-- ── Summary Cards ───────────────────────────────────────── --}}
{{-- Total DR --}}
Total Debit (DR)
{{ number_format($summary['total_dr'], 2) }}
{{ $summary['account_count'] }} accounts
DR
{{-- Total CR --}}
Total Credit (CR)
{{ number_format($summary['total_cr'], 2) }}
 
CR
{{-- Net Balance --}} @php $net = $summary['net_balance']; @endphp
Net Balance
{{ $net < 0 ? '-' : '' }}{{ number_format(abs($net), 2) }}
{{ $net >= 0 ? 'Debit Balance' : 'Credit Balance' }}
{{ $net >= 0 ? '▲' : '▼' }}
{{-- ── Trial Balance Table — grouped by Account Type ───────── --}} @php $grouped = $data->groupBy('account_type')->sortKeys(); @endphp
@foreach ($grouped as $accountType => $accounts) {{-- ── Account-Type Group Header ───────────── --}} @php $groupDr = 0; $groupCr = 0; @endphp @foreach ($accounts as $row) @php $groupDr += $row->total_dr ?? 0; $groupCr += $row->total_cr ?? 0; $net = $row->net_balance ?? 0; @endphp {{-- Account Code --}} {{-- Account Name --}} {{-- DR --}} {{-- CR --}} {{-- Net Balance --}} @endforeach {{-- ── Group Sub-total ─────────────────────── --}} @php $groupNet = $groupDr - $groupCr; @endphp {{-- spacer between groups --}} @endforeach {{-- ── Grand Total Footer ─────────────────────────── --}}
Acc Code Description Debit (DR) Credit (CR) Net Balance
{{ $accountType }}
{{ $accountType }} — Subtotal {{ number_format($groupDr, 2) }} {{ number_format($groupCr, 2) }} {{ $groupNet < 0 ? '-' : '' }}{{ number_format(abs($groupNet), 2) }}
{{ $groupNet >= 0 ? 'DR' : 'CR' }}
Grand Total {{ number_format($summary['total_dr'], 2) }} {{ number_format($summary['total_cr'], 2) }} @php $gNet = $summary['net_balance']; @endphp {{ $gNet < 0 ? '-' : '' }}{{ number_format(abs($gNet), 2) }}
{{ $gNet >= 0 ? 'DR Balance' : 'CR Balance' }}
@endif @endsection @push('scripts') @endpush PKk]>ܤ<<reports/vat_summary.blade.phpnuW+A@extends('reports.layouts.report') @section('report-title') VAT Summary Report @endsection @section('extra-filters') {{-- VAT Type --}}
{{-- Supplier --}}
{{-- Customer --}}
{{-- Doc Type --}}
{{-- Print Button --}} {{-- @if (!empty($data) && $data->isNotEmpty())
@endif --}} @endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No VAT entries found for the selected filters.

@elseif ($data->isNotEmpty()) {{-- ── VAT Summary Cards ──────────────────────────────────────────── --}}
{{-- VAT Input --}}
VAT Input
{{ number_format($summary['total_vat_input'], 2) }}
{{ $summary['input_entries'] }} entries
IN
{{-- VAT Output --}}
VAT Output
{{ number_format($summary['total_vat_output'], 2) }}
{{ $summary['output_entries'] }} entries
OUT
{{-- Net VAT --}} @php $net = $summary['net_vat']; @endphp
Net VAT
{{ $net < 0 ? '-' : '' }}{{ number_format(abs($net), 2) }}
{{ $net >= 0 ? '▲ VAT Refundable' : '▼ VAT Payable' }}
NET
{{-- Entry count --}}
Total Entries
{{ $summary['total_entries'] }}
Total DR
{{ number_format($summary['total_dr'], 2) }}
Total CR
{{ number_format($summary['total_cr'], 2) }}
{{-- ── VAT Table ──────────────────────────────────────────────────── --}}
@foreach ($data as $i => $entry) @php $isInput = $entry->vat_category === 'Input'; $rowBg = $isInput ? 'rgba(46,125,50,0.04)' : 'rgba(198,40,40,0.04)'; @endphp @endforeach
# Date VAT Type Account Party Doc Type Debit (DR) Credit (CR)
{{ $i + 1 }}
{{ optional($entry->created_at)->format('Y-m-d') }}
{{ optional($entry->created_at)->format('H:i') }}
{{ $entry->vat_category }} VAT {{ $entry->chartOfAccount?->name ?? '-' }} @if ($entry->supplier)
{{ $entry->supplier->company_name }}
@elseif ($entry->customer)
{{ $entry->customer->company_name }}
@else - @endif
{{ $entry->doc_type_name }} @if (($entry->dr ?? 0) > 0) {{ number_format($entry->dr, 2) }} @else @endif @if (($entry->cr ?? 0) > 0) {{ number_format($entry->cr, 2) }} @else @endif
Totals {{ number_format($summary['total_dr'], 2) }} {{ number_format($summary['total_cr'], 2) }}
Net VAT {{ $summary['net_vat'] >= 0 ? '(Refundable)' : '(Payable)' }} {{ $summary['net_vat'] < 0 ? '-' : '' }} {{ number_format(abs($summary['net_vat']), 2) }}
@endif @endsection @push('scripts') @endpush PKk] З!!&reports/customer_outstanding.blade.phpnu[@extends('reports.layouts.report') @section('report-title') Customer Outstanding Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($agingData->isEmpty())

No outstanding data found.

@else {{-- ================= SUMMARY ================= --}}
Customers
{{ $agingData->count() }}
0–30 Days
{{ number_format($agingData->sum('bucket_30'),2) }}
31–60 Days
{{ number_format($agingData->sum('bucket_60'),2) }}
90+ Days
{{ number_format($agingData->sum('bucket_120'),2) }}
{{-- ================= TABS ================= --}}
{{-- ================= AGING TAB ================= --}}
@foreach ($agingData as $i => $row) @endforeach
# Customer 0–30 31–60 61–90 90+ Total
{{ $i+1 }} {{ $row->customer->company_name }} {{ number_format($row->bucket_30,2) }} {{ number_format($row->bucket_60,2) }} {{ number_format($row->bucket_90,2) }} {{ number_format($row->bucket_120,2) }} {{ number_format($row->total,2) }}
{{-- ================= INVOICE TAB ================= --}}
@foreach ($invoiceData as $i => $inv) @endforeach
# Invoice No Customer Date Due Date Amount Paid Balance Aging
{{ $i+1 }} {{ $inv->invoice_no }} {{ $inv->customer->company_name }} {{ $inv->doc_date }} {{ $inv->due_date }} {{ number_format($inv->amount,2) }} {{ number_format($inv->paid,2) }} {{ number_format($inv->balance,2) }} {{ $inv->aging_label }}
{{-- ================= PRINT VERSION ================= --}} @endif @endsection @push('scripts') @endpushPKk]a##reports/item_flow.blade.phpnu[@extends('reports.layouts.report') @section('title', 'Item Flow Report') @section('content')
ITEM FLOW REPORT
@if($selectedItem) @endif
@if($selectedItem)

ITEM

{{ $selectedItem->name }}
@if($selectedItem->itemcode) Code: {{ $selectedItem->itemcode }} @endif

TOTAL IN

{{ number_format($totalIn, 2) }}

TOTAL OUT

{{ number_format($totalOut, 2) }}

CLOSING QTY

{{ number_format($closingQty, 2) }}

ITEM MOVEMENT LEDGER
@forelse($movements as $i => $row) @empty @endforelse
# Date Doc Type Doc No Party Store In Qty Out Qty Balance Unit Cost/Price Amount
{{ $i + 1 }} {{ $row->doc_date ? \Carbon\Carbon::parse($row->doc_date)->format('d M Y') : '—' }} {{ $row->doc_type }} {{ $row->doc_no }} {{ $row->party ?? '—' }} {{ $row->store ?? '—' }} {{ $row->in_qty > 0 ? number_format($row->in_qty, 2) : '—' }} {{ $row->out_qty > 0 ? number_format($row->out_qty, 2) : '—' }} {{ number_format($row->balance, 2) }} {{ number_format($row->unit_cost ?? 0, 2) }} {{ number_format($row->amount ?? 0, 2) }}
No item movement records found.
TOTAL {{ number_format($totalIn, 2) }} {{ number_format($totalOut, 2) }} {{ number_format($closingQty, 2) }} {{ number_format($movements->sum('amount'), 2) }}
@else
Item Flow Report

Select an item above to view its complete stock movement ledger.

@endif @endsection @push('styles') @endpushPKk]uJJ&reports/employee_job_costing.blade.phpnu[@extends('reports.layouts.report') @section('report-title') Employee Job Costing Report @endsection @section('extra-filters')
@endsection @section('report-table') @if ($data->isEmpty() && !empty($filters))

No employee job costing records found for the selected filters.

@elseif ($data->isNotEmpty())
Records
{{ $summary['total_records'] ?? 0 }}
Employees
{{ $summary['total_employees'] ?? 0 }}
Jobs
{{ $summary['total_jobs'] ?? 0 }}
Work Hours
{{ number_format($summary['total_work_hours'] ?? 0, 2) }}
OT Hours
{{ number_format($summary['total_ot_hours'] ?? 0, 2) }}
Total Cost
{{ number_format($summary['total_amount'] ?? 0, 2) }}
@foreach ($data as $i => $row) @endforeach
# Doc No Doc Date Job No Customer Employee Position In Out Work Hrs Pre OT Post OT OT Hrs Rate OT Rate Normal Amt OT Amt Total Status
{{ $i + 1 }} {{ $row->doc_no ?? '-' }} {{ $row->doc_date ?? '-' }} {{ $row->job_no ?? '-' }} {{ $row->customer_name ?? '-' }}
{{ $row->employee_name ?? '-' }}
{{ $row->employee_code ?? $row->emp_code ?? '-' }}
{{ $row->employee_position ?? '-' }} {{ $row->in_date ?? '-' }}
{{ $row->in_time ? substr($row->in_time, 0, 5) : '-' }}
{{ $row->out_date ?? '-' }}
{{ $row->out_time ? substr($row->out_time, 0, 5) : '-' }} @if ($row->is_overnight)
Overnight @endif
{{ number_format($row->work_hours ?? 0, 2) }} {{ number_format($row->pre_ot_hours ?? 0, 2) }} {{ number_format($row->post_ot_hours ?? 0, 2) }} {{ number_format($row->ot_hours ?? 0, 2) }} @if ($row->is_double_ot) 2x @endif {{ number_format($row->unit_cost ?? 0, 2) }} {{ number_format($row->ot_rate ?? 0, 2) }} {{ number_format($row->normal_amount ?? 0, 2) }} {{ number_format($row->ot_amount ?? 0, 2) }} {{ number_format($row->amount ?? 0, 2) }} @php $statusColor = match(strtoupper($row->status ?? '')) { 'APPROVED' => 'success', 'SUBMITTED' => 'primary', 'DRAFT' => 'secondary', 'REJECTED' => 'danger', default => 'secondary', }; @endphp {{ ucfirst(strtolower($row->status ?? '-')) }}
Total {{ number_format($data->sum('work_hours'), 2) }} {{ number_format($data->sum('pre_ot_hours'), 2) }} {{ number_format($data->sum('post_ot_hours'), 2) }} {{ number_format($data->sum('ot_hours'), 2) }} {{ number_format($data->sum('normal_amount'), 2) }} {{ number_format($data->sum('ot_amount'), 2) }} {{ number_format($data->sum('amount'), 2) }}
@endif @endsection @push('scripts') @endpushPKk]test.blade copy.phpnuW+APKk]vG'G'test.blade.phpnuW+A Dashboard | Steex - Admin & Dashboard Template
PKk] user.blade.phpnuW+A@extends('layouts.app') @section('title', 'User Management') @section('content')

Total Clients

300

+19.01%

Active Clients

270

+19.01%

Inactive Clients

30

+19.01%

New Clients

300

+19.01%
Client ID Client Name Company Name Email Phone Status
Cli-001 BrightWave Innovations [email protected] (163) 2459 315 Active
Cli-002 Stellar Dynamics [email protected] (146) 1249 296 Active
Cli-003
img
Cameron Drake
Director
Quantum Nexus [email protected] (135) 3489 516 Active
Cli-004
img
Doris Crowley
Consultant
EcoVision Enterprises [email protected] (158) 3459 596 Active
Cli-005 Aurora Technologies [email protected] (196) 4862 196 Active
Cli-006 BlueSky Ventures [email protected] (163) 6498 256 Active
Cli-007 TerraFusion Energy [email protected] (154) 6481 075 Active
Cli-008 UrbanPulse Design [email protected] (184) 6348 195 Inactive
Cli-009 Nimbus Networks [email protected] (175) 2496 125 Active
Cli-010
img
Angela Thomas
Consultant
Epicurean Delights [email protected] (132) 3145 977 Active
@endsectionPKk]NBBwelcome.blade.phpnuW+A {{ config('app.name', 'Laravel') }} @if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot'))) @vite(['resources/css/app.css', 'resources/js/app.js']) @else @endif
@if (Route::has('login')) @endif

Let's get started

Laravel has an incredibly rich ecosystem.
We suggest starting with the following.

{{-- Laravel Logo --}} {{-- Light Mode 12 SVG --}} {{-- Dark Mode 12 SVG --}}
@if (Route::has('login')) @endif PKk]Weaa$emails/quotation_submitted.blade.phpnu[

Quotation — {{ $quotation->revision_no }}

Dear {{ $opportunity->customer?->display_name ?? $opportunity->customer?->company_name ?? 'Customer' }},

Please find below the details of our latest quotation revision for your reference.

@if($quotation->negotiation_notes) @endif
Opportunity {{ $opportunity->title }}
Revision No {{ $quotation->revision_no }}
Date {{ $quotation->quotation_date }}
Amount LKR {{ number_format($quotation->amount, 2) }}
Notes {{ $quotation->negotiation_notes }}
@if($quotation->attachment)

📎 The quotation document is attached to this email.

@endif

Please do not hesitate to contact us if you have any questions.

Thank you.

PKk] =ii'emails/sales_inquiry_assigned.blade.phpnu[

Hello,

A new Sales Inquiry has been assigned to you.

SI NoSI-{{ str_pad($si->id,5,'0',STR_PAD_LEFT) }}
Customer{{ $si->customer?->display_name ?? $si->walkInCustomer?->customer_name ?? 'Walk-in' }}
Type{{ ucfirst(str_replace('_',' ',$si->inquiry_type)) }}
Date{{ $si->doc_date }}
Notes{{ $si->notes ?: '-' }}

Please log in to take action.

PKk]u>>auth/login.blade.phpnuW+APKk]Ht<<'>components/cheque-print-modal.blade.phpnuW+APKk]"`w{dashboard.blade.phpnuW+APKk]layouts/app.blade.phpnuW+APKk]okkҪlayouts/footer.blade.phpnuW+APKk]#ņlayouts/header.blade copy.phpnuW+APKk]F,IIbulayouts/header.blade.phpnu[PKk]OY??'layouts/pv-recipt-header.blade copy.phpnuW+APKk]>Uy@y@"alayouts/pv-recipt-header.blade.phpnuW+APKk]j $,@layouts/recipt-footer.blade copy.phpnuW+APKk]P]pKlayouts/recipt-footer.blade.phpnu[PKk]Wˊ==)f\layouts/recipt-header-landscape.blade.phpnuW+APKk]JZ;Z;$Ilayouts/recipt-header.blade copy.phpnuW+APKk]2BBlayouts/recipt-header.blade.phpnu[PKk]U$$ layouts/sidebar.blade.phpnu[PKk]TgDbbx4layouts/sidebartest.blade.phpnuW+APKk]SW7@A@A#jlayouts/receipt-layout-po.blade.phpnu[PKk]7j00"layouts/recipt-footer-po.blade.phpnu[PKk]3o;;-pages/customer/business_owner_types.blade.phpnuW+APKk]g"\'pages/customer/customers.blade.phpnu[PKk]пDD/8@pages/customer/customer_address_types.blade.phpnuW+APKk]tI]DD,Gpages/customer/customer_categories.blade.phpnuW+APKk]H><</.pages/customer/customer_contact_types.blade.phpnuW+APKk]0dAP;P;+pages/customer/customer_doc_types.blade.phpnuW+APKk]q0C0C(>Bpages/customer/customer_groups.blade.phpnuW+APKk]HH0ƅpages/customer/customer_sub_categories.blade.phpnuW+APKk]+=@H@H,Epages/customer/customer_sub_groups.blade.phpnuW+APKk]e%::'pages/customer/customer_types.blade.phpnuW+APKk] Z:Qpages/customer/partials/business_owner_type_rows.blade.phpnuW+APKk]s;<Wpages/customer/partials/customer_address_type_rows.blade.phpnuW+APKk]mVv8^pages/customer/partials/customer_category_rows.blade.phpnuW+APKk]2<jdpages/customer/partials/customer_contact_type_rows.blade.phpnuW+APKk]qʋ8Yjpages/customer/partials/customer_doc_type_rows.blade.phpnuW+APKk]L5@ppages/customer/partials/customer_group_rows.blade.phpnuW+APKk] }}/.r2K pages/invoice/partials/invoice_rows.blade copy.phpnuW+APKk]9P P - pages/invoice/partials/invoice_rows.blade.phpnuW+APKk]7" " ./ pages/invoice/partials/proforma_rows.blade.phpnu[PKk]JVf<<= pages/invoice/partials/receipt/direct_invoice_print.blade.phpnuW+APKk]lӇ^::6 pages/invoice/partials/receipt/invoice_print.blade.phpnu[PKk]U$j};;7 !pages/invoice/partials/receipt/proforma_print.blade.phpnuW+APKk]udd)S!pages/invoice/proforma_invoices.blade.phpnu[PKk]^`%%9"pages/item/items.blade.phpnu[PKk]k6w3H3H$ $pages/item/item_categories.blade.phpnuW+APKk] x7F7F U$pages/item/item_groups.blade.phpnuW+APKk]DII'-$pages/item/item_subcategories.blade.phpnuW+APKk]p"O"O$s$pages/item/item_sub_groups.blade.phpnuW+APKk]ݷII5%pages/item/item_types.blade.phpnuW+APKk]ɼZ  0K%pages/item/partials/item_category_rows.blade.phpnuW+APKk]44-%pages/item/partials/Item_group_rows.blade.phpnuW+APKk]$2'2'%pages/item/partials/item_rows.blade.phpnuW+APKk]}Z!!4%pages/item/partials/item_sub_category_rows.blade.phpnuW+APKk]bc1%pages/item/partials/item_sub_group_rows.blade.phpnuW+APKk]=x,%pages/item/partials/item_type_rows.blade.phpnuW+APKk] ҷ e%pages/jobs/jobs.blade copy 2.phpnuW+APKk]" sg&pages/jobs/jobs.blade copy 3.phpnuW+APKk]ít 5'pages/jobs/jobs.blade copy 4.phpnuW+APKk] ҷ(pages/jobs/jobs.blade copy.phpnuW+APKk]Ā&(pages/jobs/jobs.blade.phpnu[PKk] 5  &!)pages/jobs/partials/job_rows.blade.phpnu[PKk]$$8)pages/jobs/partials/receipt/jobcost_print.blade copy.phpnuW+APKk]Ac`G`G3B*pages/jobs/partials/receipt/jobcost_print.blade.phpnu[PKk]ww/݉*pages/jobs/partials/receipt/job_print.blade.phpnu[PKk]VJVJ#*pages/master/account_type.blade.phpnuW+APKk]z34ww'\*pages/master/chart_of_account.blade.phpnuW+APKk]?09 F Fl+pages/master/country.blade.phpnuW+APKk]YPQLQL+pages/master/currency.blade.phpnuW+APKk]zgyIyI!+pages/master/department.blade.phpnu[PKk]TBJJ$XI,pages/master/discount_type.blade.phpnuW+APKk](ݳ]F]Fd,pages/master/district.blade.phpnuW+APKk]!Ao** ,pages/master/employees.blade.phpnu[PKk] 0 .pages/master/estimation_templates.blade copy.phpnuW+APKk]+G.pages/master/estimation_templates.blade.phpnuW+APKk]NLEkEk$O/pages/master/internal_bank.blade.phpnuW+APKk]{m%;%;/pages/master/job_type.blade.phpnuW+APKk]GS+L+L!\*0pages/master/other_bank.blade.phpnuW+APKk]1v0pages/master/partials/account_type_rows.blade.phpnuW+APKk] 5P}0pages/master/partials/chart_of_account_rows.blade.phpnuW+APKk]:2,0pages/master/partials/country_rows.blade.phpnuW+APKk]p-0pages/master/partials/currency_rows.blade.phpnuW+APKk]]/0pages/master/partials/department_rows.blade.phpnu[PKk]9>>2#0pages/master/partials/discount_type_rows.blade.phpnuW+APKk]a-ã0pages/master/partials/district_rows.blade.phpnuW+APKk]$ -٩0pages/master/partials/employee_rows.blade.phpnuW+APKk]]#hh80pages/master/partials/estimation_template_rows.blade.phpnuW+APKk]:wO20pages/master/partials/internal_bank_rows.blade.phpnuW+APKk].9-0pages/master/partials/job_type_rows.blade.phpnuW+APKk]/50pages/master/partials/other_bank_rows.blade.phpnuW+APKk]݂1k0pages/master/partials/payment_term_rows.blade.phpnuW+APKk]E10pages/master/partials/payment_type_rows.blade.phpnuW+APKk]-00pages/master/partials/province_rows.blade.phpnuW+APKk]wBgg/F0pages/master/partials/supervisor_rows.blade.phpnuW+APKk]Ŕ. 0pages/master/partials/transport_rows.blade.phpnuW+APKk]*wLL810pages/master/partials/unit_of_measurement_rows.blade.phpnuW+APKk]ǝ-0pages/master/partials/warranty_rows.blade.phpnuW+APKk]J<)1pages/master/partials/area_rows.blade.phpnu[PKk]Yb< < 3o1pages/master/partials/employee_group_rows.blade.phpnu[PKk]ǣGG#1pages/master/payment_term.blade.phpnuW+APKk]b\J\J#Z1pages/master/payment_type.blade.phpnuW+APKk]eQYFYF1pages/master/province.blade.phpnuW+APKk](L@@![1pages/master/supervisor.blade.phpnuW+APKk],!\,2pages/master/transports.blade.phpnu[PKk]II*@3pages/master/unit_of_measurement.blade.phpnuW+APKk](!#lFlFh3pages/master/warranty.blade.phpnuW+APKk]5!My*y*B3pages/master/area.blade.phpnu[PKk]~pucuc&3pages/master/employee_groups.blade.phpnu[PKk]!9|w6=4pages/payments/partials/payment_receipt_rows.blade.phpnuW+APKk]h 6[4pages/payments/partials/payment_voucher_rows.blade.phpnuW+APKk]6((2/f4pages/payments/partials/prepaid_bill_tab.blade.phpnuW+APKk]E--24pages/payments/partials/receipt/pr_print.blade.phpnuW+APKk]5XQ'Q'24pages/payments/partials/receipt/pv_print.blade.phpnuW+APKk]6p#Q Q 0^4pages/payments/payment_receipts.blade copy 2.phpnuW+APKk]?br[[.6pages/payments/payment_receipts.blade copy.phpnuW+APKk]B$H??)M8pages/payments/payment_receipts.blade.phpnu[PKk]`;||.:pages/payments/payment_vouchers.blade copy.phpnuW+APKk]#oII)Yb<pages/payments/payment_vouchers.blade.phpnuW+APKk]lod+\+\!Ы>pages/purchase/grn.blade copy.phpnuW+APKk]&L@pages/purchase/grn.blade.phpnu[PKk]]'pp;Apages/purchase/grnA.blade.phpnuW+APKk]ܒDmm/Bpages/purchase/partials/grn_list_rows.blade.phpnuW+APKk]0TV /fCpages/purchase/partials/grn_rows.blade copy.phpnuW+APKk]${*U Cpages/purchase/partials/grn_rows.blade.phpnu[PKk]k, , *Cpages/purchase/partials/pmr_rows.blade.phpnuW+APKk] 5&Cpages/purchase/partials/purchase_order_rows.blade.phpnuW+APKk]6b1Cpages/purchase/partials/purchase_return_rows.blade.phpnuW+APKk]+ѣ&114{9Cpages/purchase/partials/reciept/bill_print.blade.phpnuW+APKk]\Vz663kCpages/purchase/partials/reciept/grn_print.blade.phpnu[PKk].s"..2¢Cpages/purchase/partials/reciept/po_print.blade.phpnu[PKk]`jV002 Cpages/purchase/partials/reciept/pr_print.blade.phpnuW+APKk]jj4<Dpages/purchase/partials/reciept/pr_print.bladenn.phpnuW+APKk]@$$;mDpages/purchase/partials/reciept/purchase_mr_print.blade.phpnuW+APKk]_FZZ<Dpages/purchase/partials/recipt_print/grn_print_css.blade.phpnuW+APKk]p;Dpages/purchase/partials/recipt_print/po_print_css.blade.phpnuW+APKk](I9$ԳDpages/purchase/purchase_mr.blade.phpnuW+APKk]6tt(^Epages/purchase/purchase_orders.blade.phpnu[PKk];;)IGpages/purchase/purchase_returns.blade.phpnu[PKk]X!$zIpages/sales/dispatch_notes.blade.phpnu[PKk]\.Jpages/sales/invoices.blade.phpnuW+APKk]0bn!HKpages/sales/job_returns.blade.phpnuW+APKk]6nFF'Kpages/sales/material_requests.blade.phpnu[PKk]pv/+%Lpages/sales/non_stock_job_costing.blade.phpnuW+APKk]'##&Mpages/sales/partials/dn_rows.blade.phpnu[PKk]܌AA/Mpages/sales/partials/invoice_item_row.blade.phpnuW+APKk]>.r+Mpages/sales/partials/invoice_rows.blade.phpnuW+APKk] NN.Mpages/sales/partials/job_return_rows.blade.phpnuW+APKk]891 1 &xMpages/sales/partials/mr_rows.blade.phpnu[PKk]$ 9Npages/sales/partials/non_stock_job_costing_rows.blade.phpnuW+APKk]../NNpages/sales/partials/receipt/dn_print.blade.phpnu[PKk]g^!^!/CNpages/sales/partials/receipt/mr_print.blade.phpnu[PKk]D:E7E7=keNpages/sales/partials/receipt/sales_estimation_print.blade.phpnu[PKk]@!&&9Npages/sales/partials/receipt/sales_return_print.blade.phpnuW+APKk]vM[,,/Npages/sales/partials/receipt/si_print.blade.phpnuW+APKk]P`i{d-d-?Npages/sales/partials/receipt/supplement_request_print.blade.phpnu[PKk]--0Opages/sales/partials/receipt/ejc_print.blade.phpnu[PKk]v6C>Opages/sales/partials/receipt/transport_print.blade.phpnu[PKk]4ISOpages/sales/partials/sales_estimation_rows.blade.phpnu[PKk]!!1QbOpages/sales/partials/sales_inquiry_rows.blade.phpnu[PKk]8׾  0uOpages/sales/partials/sales_return_rows.blade.phpnuW+APKk]+$&EOpages/sales/partials/sr_rows.blade.phpnu[PKk]$Yf A&Opages/sales/partials/subcontractor_payment_request_rows.blade.phpnuW+APKk]ΛI/Opages/sales/partials/salesperson_rows.blade.phpnu[PKk]]p p -ݡOpages/sales/partials/emp_cost_table.blade.phpnu[PKk] 3Opages/sales/partials/transport_cost_table.blade.phpnu[PKk]e⋐=Opages/sales/partials/sales_estimation_item_row_copy.blade.phpnu[PKk]ub b 8Opages/sales/partials/sales_estimation_item_row.blade.phpnu[PKk]*u#VOpages/sales/sales_inquiry.blade.phpnu[PKk]s"Ppages/sales/sales_return.blade.phpnuW+APKk]jdR3 Qpages/sales/subcontractor_payment_request.blade.phpnuW+APKk]3ȁ 9 9)noRpages/sales/supplement_requests.blade.phpnu[PKk] )O)O"ԨSpages/sales/salespersons.blade.phpnu[PKk]o55*OSpages/sales/job_employee_costing.blade.phpnu[PKk]FƼƼ+ާUpages/sales/job_transport_costing.blade.phpnu[PKk]3,dVpages/sales/sales_estimations_copy.blade.phpnu[PKk]'W Xpages/sales/sales_estimations.blade.phpnu[PKk]6"$"$6Ypages/settings/finance/account_configuration.blade.phpnuW+APKk] 槞D(Ypages/settings/finance/partials/account_configuration_rows.blade.phpnuW+APKk]H<qCqC2:Ypages/settings/SiteSettings/menu_builder.blade.phpnu[PKk]t[|3 $Zpages/stockadjustment/good_transfers.blade copy.phpnuW+APKk]ڏ##% mreports/supplement_requests.blade.phpnuW+APKk]а77 nreports/trial_balance.blade.phpnuW+APKk]>ܤ<<&Cnreports/vat_summary.blade.phpnuW+APKk] З!!&3nreports/customer_outstanding.blade.phpnu[PKk]a## nreports/item_flow.blade.phpnu[PKk]uJJ&9nreports/employee_job_costing.blade.phpnu[PKk]Rotest.blade copy.phpnuW+APKk]vG'G'otest.blade.phpnuW+APKk] 9puser.blade.phpnuW+APKk]NBBbpwelcome.blade.phpnuW+APKk]Weaa$+3remails/quotation_submitted.blade.phpnu[PKk] =ii':remails/sales_inquiry_assigned.blade.phpnu[PKu=r