Gross Profit Report

{{ $job->job_number }} · {{ $job->contact?->full_name }} · {{ $job->stageLabel() }}
Generated: {{ now()->format('d M Y, g:ia') }}
{{ $margin }}%
Gross Margin
${{ number_format($revenue) }}
Revenue (ex. GST)
${{ number_format($totalCost) }}
Total Costs
${{ number_format($grossProfit) }}
Gross Profit
{{ $margin }}%
Gross Margin
{{-- Accepted Variants --}} @if(isset($acceptedVariants) && $acceptedVariants->count())

Accepted Variant Revenue

@foreach($acceptedVariants as $v) @endforeach
Variant Linked Quote Accepted By Date Price Adjustment
{{ $v->name }} {{ $v->quote?->quote_number ?? '—' }} {{ $v->respondedBy?->name ?? '—' }} {{ $v->responded_at?->format('d M Y') ?? '—' }} {{ $v->price_adjustment >= 0 ? '+' : '' }}${{ number_format($v->price_adjustment, 2) }}
Total Variant Revenue +${{ number_format($variantRevenue, 2) }}
@endif {{-- Invoice Deductions --}} @if(isset($invoiceLines) && $invoiceLines->count())

Invoice Deductions (reduces gross profit)

@foreach($invoiceLines as $inv) @endforeach
Invoice # Date Note Added By Amount (incl. GST)
{{ $inv['invoice_number'] }} {{ $inv['invoice_date'] }} {{ $inv['note'] ?: '—' }} {{ $inv['added_by'] }} -${{ number_format($inv['amount'], 2) }}
Total Invoice Deductions -${{ number_format($invoiceDeductions, 2) }}
@endif {{-- Works Order Fault Deductions --}} @if(isset($faultLines) && $faultLines->count())

Works Order Fault Costs (reduces gross profit)

@foreach($faultLines as $f) @endforeach
Works Order # Fault Type Approval Cost
{{ $f['wo_number'] }} Fault {{ $f['fault_num'] }} {{ $f['fault_type'] }} {{ ucfirst($f['approved'] ?? '—') }} -${{ number_format($f['cost'], 2) }}
Total Fault Deductions -${{ number_format($faultDeductions, 2) }}
@endif {{-- Materials --}}

Material Costs (Quote Items)

@if($allItems->count()) @foreach($allItems as $item) @endforeach
Description Item Code Qty W/Sale Retail Total W/Sale Total Retail
{{ $item->description }} {{ $item->item_code ?? '—' }} {{ number_format($item->qty, 2) }} ${{ number_format($item->wsale_price ?? 0, 2) }} ${{ number_format($item->retail_price ?? $item->unit_price ?? 0, 2) }} ${{ number_format($item->total_wsale ?? 0, 2) }} ${{ number_format($item->total_retail ?? $item->total ?? 0, 2) }}
Totals ${{ number_format($matCost, 2) }} ${{ number_format($revenue, 2) }}
@else

No quote items.

@endif {{-- Labour --}}

Labour Costs

@if($labourLines->count()) @foreach($labourLines as $line) @endforeach
Staff Date Hours Rate/hr Cost
{{ $line['staff'] }} {{ $line['date'] }} {{ number_format($line['hours'], 2) }}h ${{ number_format($line['rate'], 2) }} ${{ number_format($line['cost'], 2) }}
Total Labour ${{ number_format($labourCost, 2) }}
@else

No time entries recorded.

@endif {{-- PO Allocations --}} @if($poLines->count())

Inventory & Purchase Order Costs

@foreach($poLines as $line) @endforeach
Description Source Qty Unit Cost Total
{{ $line['description'] }} {{ $line['source'] ?? '—' }} {{ number_format($line['qty'], 2) }} ${{ number_format($line['unit_cost'], 2) }} ${{ number_format($line['total'], 2) }}
Total PO Allocations ${{ number_format($poCost, 2) }}
@endif {{-- Summary --}}

Profit Summary

Revenue (ex. GST)${{ number_format($revenue, 2) }}
Material Cost-${{ number_format($matCost, 2) }}
Labour Cost-${{ number_format($labourCost, 2) }}
@if($poCost > 0)
Inventory & PO Costs-${{ number_format($poCost, 2) }}
@endif @if(isset($invoiceDeductions) && $invoiceDeductions > 0)
Invoice Deductions-${{ number_format($invoiceDeductions, 2) }}
@endif @if(isset($faultDeductions) && $faultDeductions > 0)
WO Fault Costs-${{ number_format($faultDeductions, 2) }}
@endif
Gross Profit ${{ number_format($grossProfit, 2) }}
Gross Margin {{ $margin }}%