improve error handling during invoice generation (#2932)
* prevent that items will be marked as exported if invoice can not be generated * check for existing invoice number to prevent that invalid invoices will be generated * allow to add a unique id to invoice preview files on batch export * hide delete invoice action with deactivated permission * try to automatically fix duplicate invoice id
This commit is contained in:
18
src/Invoice/DuplicateInvoiceNumberException.php
Normal file
18
src/Invoice/DuplicateInvoiceNumberException.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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;
|
||||
|
||||
final class DuplicateInvoiceNumberException extends \Exception
|
||||
{
|
||||
public function __construct(string $invoiceNumber)
|
||||
{
|
||||
parent::__construct('Invoice number "' . $invoiceNumber . '" already existing');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user