Доработки Item

- поддержка `excise`, покрыта тестами
- фикс `setVat()`
- улучшен `jsonSerialize()`
This commit is contained in:
2021-12-02 00:23:37 +08:00
parent 650b46923e
commit 11646113b6
3 changed files with 134 additions and 15 deletions

View File

@@ -0,0 +1,33 @@
<?php
/*
* Copyright (c) 2020-2021 Антон Аксенов (Anthony Axenov)
*
* This code is licensed under MIT.
* Этот код распространяется по лицензии MIT.
* https://github.com/anthonyaxenov/atol-online/blob/master/LICENSE
*/
declare(strict_types = 1);
namespace AtolOnline\Exceptions;
use AtolOnline\Constants\Ffd105Tags;
/**
* Исключение, возникающее при попытке указать предмету расчёта отрицательный акциз
*/
class NegativeItemExciseException extends AtolException
{
protected array $ffd_tags = [Ffd105Tags::ITEM_EXCISE];
/**
* Конструктор
*
* @param string $name
* @param float $excise
*/
public function __construct(string $name, float $excise)
{
parent::__construct("Предмет расчёта '$name' не может иметь отрицательный акциз $excise");
}
}