Fix: Dateiname-Check entfernt – Dublettenprüfung übernimmt die Schutzfunktion
This commit is contained in:
parent
eede667809
commit
aa0dd01e66
2 changed files with 1 additions and 14 deletions
|
|
@ -4,9 +4,9 @@ declare(strict_types=1);
|
|||
|
||||
namespace Steuerkram\Controllers;
|
||||
|
||||
use Steuerkram\Database;
|
||||
use Steuerkram\Models\BankImportFormat;
|
||||
use Steuerkram\Models\BankTransaction;
|
||||
use Steuerkram\Database;
|
||||
use Steuerkram\Models\Beleg;
|
||||
use Steuerkram\Services\BankImportParser;
|
||||
use Steuerkram\View;
|
||||
|
|
@ -84,10 +84,6 @@ class BankController
|
|||
View::redirect('/bank/upload', 'Keine Buchungszeilen in der Datei gefunden.', 'error');
|
||||
}
|
||||
|
||||
if (BankTransaction::filenameExists($origName)) {
|
||||
View::redirect('/bank/upload', 'Diese Datei wurde bereits importiert (' . $origName . ').', 'error');
|
||||
}
|
||||
|
||||
$split = BankTransaction::findDuplicates($rows);
|
||||
|
||||
if (!empty($split['dup'])) {
|
||||
|
|
|
|||
|
|
@ -145,15 +145,6 @@ class BankTransaction
|
|||
return ['new' => $new, 'dup' => $dup];
|
||||
}
|
||||
|
||||
public static function filenameExists(string $filename): bool
|
||||
{
|
||||
$row = Database::fetchOne(
|
||||
'SELECT id FROM bank_import_batches WHERE filename = ? LIMIT 1',
|
||||
[$filename]
|
||||
);
|
||||
return $row !== null;
|
||||
}
|
||||
|
||||
public static function createBatch(int $formatId, string $filename, int $rowCount): int
|
||||
{
|
||||
Database::execute(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue