<?php

/**
 * Business page (front-end app hub, route ?business=1).
 *
 * An overview + links hub for the "who and what" of the operation, kept out
 * of the per-job screens:
 *   - Painters roster (read-only) with a link to the WP-admin Painters/
 *     Helpers management page.
 *   - Vehicles with a company-vs-contractor OWNER (editable here; drives the
 *     Company/Contractor split on the vehicle expense report). Full add/
 *     retire management still lives on the Vehicle log page.
 *   - Taxes: a year selector, side-by-side year totals (job costs vs vehicle
 *     expenses, the two tax buckets), and one-click links to the vehicle
 *     expense report and each job's receipt coversheet for the year.
 *
 * Owner/admin only (this shows cost/tax figures), gated on
 * paintops_user_can_view_financials(). Required inline by the router in
 * manage-jobs.php, same as vehicle-log.php.
 */
if ( !defined( 'ABSPATH' ) ) {
    exit;
}
if ( !function_exists( 'paintops_user_can_view_financials' ) || !paintops_user_can_view_financials() ) {
    echo '<div class="cs-financial-box"><p>You do not have permission to view the Business page.</p></div>';
    return;
}
if ( !function_exists( 'paintops_pro_code_present' ) ) {
    // The page body exists only in the premium build; the free build's
    // nav never links here, so this shows only on a direct URL.
    if ( function_exists( 'paintops_render_pro_pointer' ) ) {
        paintops_render_pro_pointer( 'The Business page' );
    }
    return;
}
// paintops_fs()->is__premium_only()