From c604f9f41dadcd0dca145183cdb65750bb596c34 Mon Sep 17 00:00:00 2001 From: fds2610 Date: Wed, 14 Jan 2026 22:39:48 +0100 Subject: [PATCH] =?UTF-8?q?Hinweis=20Feld=20hinzugef=C3=BCgt=20-=20DBUPDAT?= =?UTF-8?q?E=20!!!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/dashboard.php | 2 ++ html/new_entry.php | 10 ++++++++-- update.sql | 3 +-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/html/dashboard.php b/html/dashboard.php index 4ca0f06..2e70109 100644 --- a/html/dashboard.php +++ b/html/dashboard.php @@ -87,6 +87,7 @@ $entries = $stmt->fetchAll(); Zahlweise Betreff Betrag +Hinweis @@ -99,6 +100,7 @@ $entries = $stmt->fetchAll(); + diff --git a/html/new_entry.php b/html/new_entry.php index 8f4812e..de0d60e 100644 --- a/html/new_entry.php +++ b/html/new_entry.php @@ -44,14 +44,15 @@ if (!empty($_POST)) { $person = isset($_POST['person']) ? $_POST['person'] : ''; $category = isset($_POST['category']) ? trim($_POST['category']) : ''; $subject = isset($_POST['subject']) ? trim($_POST['subject']) : ''; + $note = isset($_POST['note']) ? trim($_POST['note']) : ''; $amount = isset($_POST['amount']) ? (float)$_POST['amount'] : 0.0; $payment_method = isset($_POST['payment_method']) ? trim($_POST['payment_method']) : ''; $jsonPersonen = json_encode($person); try { $stmt = $pdo->prepare(" - INSERT INTO entries (date, user_id, person, category, subject, amount, payment_method) - VALUES (:date, :user_id, :person, :category, :subject, :amount, :payment_method) + INSERT INTO entries (date, user_id, person, category, subject, amount, payment_method, note) + VALUES (:date, :user_id, :person, :category, :subject, :amount, :payment_method, :note) "); $stmt->bindParam(':date', $date); $stmt->bindParam(':user_id', $user_id); @@ -60,6 +61,7 @@ if (!empty($_POST)) { $stmt->bindParam(':subject', $subject); $stmt->bindParam(':amount', $amount); $stmt->bindParam(':payment_method', $payment_method); + $stmt->bindParam(':note', $note); ob_start(); $stmt->debugDumpParams(); @@ -183,6 +185,10 @@ Daten gespeichert ! + +
+ +
diff --git a/update.sql b/update.sql index e9f53f7..c3620bf 100644 --- a/update.sql +++ b/update.sql @@ -1,2 +1 @@ -UPDATE entries SET payment_method = '1' WHERE LOWER(payment_method) = 'bar'; -alter table entries modify column payment_method int(11); +alter table entries add column note varchar(50);