@extends('layouts.app')
@section('title',$company->name.' • JAN Enterprises ERP')
@section('page_title',$company->name)
@section('page_subtitle','Company details, agreements, prices and historical business')
@section('content')
@php $agreement=$company->agreements->sortByDesc('start_date')->first(); $prices=$agreement?->prices?->keyBy('asset_id') ?? collect(); @endphp
Total Orders{{ $company->orders->count() }}
Historical Investment₹{{ number_format($company->orders->sum(fn($o)=>$o->items->sum('invested_amount')),0) }}
Historical Billing₹{{ number_format($company->orders->sum(fn($o)=>$o->items->sum('final_amount')),0) }}
Historical Profit₹{{ number_format($company->orders->sum(fn($o)=>$o->items->sum('profit')),0) }}
Company Master
Edit customer invoice information
Current Agreement
Price list is tied to this agreement @if($agreement)Agreement Start{{ $agreement->start_date->format('d M Y') }}
Agreement End{{ $agreement->end_date->format('d M Y') }}
Days Remaining{{ now()->startOfDay()->diffInDays($agreement->end_date,false) }}
@elseNo agreement found.
@endif
@if($agreement)Agreement Price Master
Update buy and company selling prices @endif
@endsection