<?php

namespace Modules\Vrc\Services\Contracts;

/**
 * VRC ↔ ERP tax boundary. The totals builder never reads App\TaxRate
 * directly; it asks this contract for the effective percentage of a tax rate
 * (single or group) so VAT computation stays a single, swappable integration
 * point that reuses the ERP tax engine (spec §3.6 / §5.0).
 */
interface TaxServiceContract
{
    /**
     * Effective tax percentage (e.g. 14.0) for an ERP tax_rate id within a
     * business. Returns 0.0 for a null/unknown id (non-taxable line).
     */
    public function percentageFor(int $businessId, ?int $taxRateId): float;
}
