@extends('layouts.app') @section('title', 'Job Costing #'.optional($job)->job_number) @section('breadcrumbs') @endsection @section('content')

Job #{{ $job->job_number ?? 'N/A' }}

{{ $job->customer->name ?? '' }} | {{ $job->shipment_number ?? '' }}

Back
@php $stats = [['label'=>'Revenue','count'=>'₹'.number_format($job->total_revenue ?? 0,2),'icon'=>'bi-arrow-up-circle','color'=>'success'],['label'=>'Total Cost','count'=>'₹'.number_format($job->total_cost ?? 0,2),'icon'=>'bi-arrow-down-circle','color'=>'danger'],['label'=>'Gross Margin','count'=>number_format($job->margin ?? 0,1).'%','icon'=>'bi-percent','color'=>($job->margin ?? 0)>=0?'info':'danger'],['label'=>'Cost Items','count'=>$job->items->count() ?? 0,'icon'=>'bi-list-check','color'=>'primary']]; @endphp @foreach($stats as $stat)
@endforeach
Revenue vs Expenses
Cost Breakdown
@forelse($job->items ?? [] as $item) @empty @endforelse
CategoryDescriptionAmount% of Total
{{ $item->category ?? 'Other' }} {{ $item->description ?? 'N/A' }} {{ number_format($item->amount ?? 0, 2) }} {{ $job->total_cost > 0 ? number_format(($item->amount / $job->total_cost) * 100, 1) : 0 }}%
No cost items
Margin Analysis
Revenue₹{{ number_format($job->total_revenue ?? 0, 2) }}
Direct Cost-₹{{ number_format($job->direct_cost ?? 0, 2) }}
Gross Profit₹{{ number_format(($job->total_revenue ?? 0) - ($job->direct_cost ?? 0), 2) }}
Overhead ({{ $job->overhead_rate ?? 10 }}%)-₹{{ number_format($job->overhead ?? 0, 2) }}
Net Profit₹{{ number_format($job->net_profit ?? 0, 2) }}
Target Margin: 15%
@endsection @push('scripts') @endpush