From aa0dd01e6654706e26eddff1ae9667025430a23f Mon Sep 17 00:00:00 2001 From: fds2610-bot Date: Fri, 15 May 2026 17:05:05 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Dateiname-Check=20entfernt=20=E2=80=93?= =?UTF-8?q?=20Dublettenpr=C3=BCfung=20=C3=BCbernimmt=20die=20Schutzfunktio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Controllers/BankController.php | 6 +----- src/Models/BankTransaction.php | 9 --------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/Controllers/BankController.php b/src/Controllers/BankController.php index 3f847e2..c28325c 100644 --- a/src/Controllers/BankController.php +++ b/src/Controllers/BankController.php @@ -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'])) { diff --git a/src/Models/BankTransaction.php b/src/Models/BankTransaction.php index 1b6b3b1..d4d9364 100644 --- a/src/Models/BankTransaction.php +++ b/src/Models/BankTransaction.php @@ -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(