@extends('adminlte::layouts.app') @section('htmlheader_title') Cost #{{ $cso->id }} @endsection @section('contentheader_title') Cost #{{ $cso->id }} @endsection @section('contentheader_description') @endsection @php($cost = 0) @php($charge = 0) @section('main-content')
Category | Service | Active | From | To | Base | Excess | Cost | Charge | Profit |
---|---|---|---|---|---|---|---|---|---|
Broadband | {{ $oo->first()->service->name }} | {{ $oo->first()->service->active ? 'YES' : 'NO' }} | {{ $oo->min('start_at')->format('Y-m-d') }} | {{ $oo->max('end_at')->format('Y-m-d') }} | ${{ number_format($a=$oo->sum('base'),2) }} | ${{ number_format($oo->sum('excess'),2) }} | ${{ number_format($x=$oo->sum('cost'),2) }} | ${{ number_format($b=$oo->first()->service->billing_charge_normalised,2) }} | ${{ number_format($b-$a,2) }} |
Phone | {{ $oo->first()->service->name }} | {{ $oo->first()->service->active ? 'YES' : 'NO' }} | {{ $oo->min('start_at')->format('Y-m-d') }} | {{ $oo->max('end_at')->format('Y-m-d') }} | ${{ number_format($a=$oo->sum('base'),2) }} | ${{ number_format($oo->sum('excess'),2) }} | ${{ number_format($x=$oo->sum('cost'),2) }} | ${{ number_format($b=$oo->first()->service->billing_charge_normalised,2) }} | ${{ number_format($b-$a,2) }} |
Generic | {{ ($xx=$oo->first()->service) ? $xx->name : '-' }} | {{ $xx ? ($xx->active ? 'YES' : 'NO') : '-' }} | {{ $oo->min('start_at')->format('Y-m-d') }} | {{ $oo->max('end_at')->format('Y-m-d') }} | ${{ number_format($a=$oo->sum('base'),2) }} | ${{ number_format($oo->sum('excess'),2) }} | ${{ number_format($x=$oo->sum('cost'),2) }} | ${{ number_format($b=($xx ? $xx->billing_monthly_price : 0),2) }} | ${{ number_format($b-$a,2) }} |
TOTAL | ${{ number_format($cost,2) }} | ${{ number_format($charge,2) }} | ${{ number_format($charge-$cost,2) }} |