@extends('snit.layouts.app') @section('content') @if (count($allBooks) < 1)

You have no books click here to create a new book

@else

Revenue (Sales) Report

Total Books Published: {{ count($allBooks) }}

Total Sales Generated: ₦ {{ number_format(author()->totalSalesFromBooks()) }}

Total Profit Generated: ₦ {{ number_format(author()->presentTotalProfit()) }}

@foreach ($table_headers as $heading) @endforeach @foreach ($allBooks as $book) {{-- front cover image --}} {{-- general pricing --}} {{-- total hardcover books sold --}} {{-- total ebooks sold --}} {{-- total books sold --}} {{-- total income generated --}} @endforeach
{!! $heading !!}
{{ $book->doc->front_cover ?? 'No Image' }} {{ $book->name }} ₦{{ money($book->price) }} | ₦{{ money($book->eBookPrice()) }} {{ money($book->service->totalHardcoverOrders()->count()) }} {{ money($book->service->totalEbookOrders()->count()) }} {{ money($book->service->getTotalNumberSold()) }} {{ '₦' . money($book->presentTotalSalesGenerated()) }}
@endif @endsection