Поддержка correction_info
This commit is contained in:
23
src/Exceptions/EmptyCorrectionNumberException.php
Normal file
23
src/Exceptions/EmptyCorrectionNumberException.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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 EmptyCorrectionNumberException extends AtolException
|
||||
{
|
||||
protected $message = 'Номер документа коррекции не может быть пустым';
|
||||
protected array $ffd_tags = [Ffd105Tags::CORRECTION_DATE];
|
||||
}
|
||||
33
src/Exceptions/InvalidCorrectionDateException.php
Normal file
33
src/Exceptions/InvalidCorrectionDateException.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 InvalidCorrectionDateException extends AtolException
|
||||
{
|
||||
protected array $ffd_tags = [Ffd105Tags::CORRECTION_DATE];
|
||||
|
||||
/**
|
||||
* Конструктор
|
||||
*
|
||||
* @param string $date
|
||||
* @param string $message
|
||||
*/
|
||||
public function __construct(string $date = '', string $message = '')
|
||||
{
|
||||
parent::__construct("Ошибка даты документа коррекции '$date': " . $message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user