Files
kimai/src/Invoice/CalculatorInterface.php
Kevin Papst ad645f5b58 Release 2.7.0 (#4506)
* added api URL for simpler integration
* allow to request password change upon next login
* make ModifiedAt timesheet independent
* improved plugin api
* replace kernel calls with AutoconfigureTag and TaggedIterator attributes
* new translation keys (e.g. for days)
* support setting min and max date on date and daterange pickers
2023-12-26 14:49:11 +01:00

79 lines
1.7 KiB
PHP

<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Invoice;
use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;
/**
* CalculatorInterface defines all methods for any invoice price calculator.
*/
#[AutoconfigureTag]
interface CalculatorInterface
{
/**
* Return the invoice items that will be displayed on the invoice.
*
* @return InvoiceItem[]
*/
public function getEntries(): array;
/**
* Set the invoice model and can be used to fetch the customer.
*
* @param InvoiceModel $model
*/
public function setModel(InvoiceModel $model): void;
/**
* Returns the subtotal before taxes.
*
* @return float
*/
public function getSubtotal(): float;
/**
* Returns the tax amount for this invoice.
*
* @return float
*/
public function getTax(): float;
/**
* Returns the total amount for this invoice including taxes.
*
* @return float
*/
public function getTotal(): float;
/**
* Returns the percentage for the value-added tax (VAT) calculation.
*
* @return float
*/
public function getVat(): float;
/**
* Returns the total amount of worked time in seconds.
*
* @return int
*/
public function getTimeWorked(): int;
/**
* Returns the unique ID of this calculator.
*
* Prefix it with your company name followed by a hyphen (e.g. "acme-"),
* if this is a third-party calculator.
*
* @return string
*/
public function getId(): string;
}