Доработки Item
- поддержка `excise`, покрыта тестами - фикс `setVat()` - улучшен `jsonSerialize()`
This commit is contained in:
33
src/Exceptions/NegativeItemExciseException.php
Normal file
33
src/Exceptions/NegativeItemExciseException.php
Normal 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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user