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();
= htmlspecialchars($entry['zahlweise'] ?? '') ?> |
= htmlspecialchars($entry['subject']) ?> |
= htmlspecialchars( number_format($entry['amount'], 2, ',', '.')) ?> |
+= htmlspecialchars($entry['note']) ?> |
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);