Fix: Dateiname-Check entfernt – Dublettenprüfung übernimmt die Schutzfunktion

This commit is contained in:
fds2610-bot 2026-05-15 17:05:05 +02:00
parent eede667809
commit aa0dd01e66
2 changed files with 1 additions and 14 deletions

View file

@ -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'])) {

View file

@ -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(