From 05a964edbb594efa59d77daf9cb18b2fc74ded4a Mon Sep 17 00:00:00 2001 From: fds2610-bot Date: Sun, 12 Apr 2026 11:40:51 +0200 Subject: [PATCH] =?UTF-8?q?Feature:=20Anlageverm=C3=B6gen-Modal=20beim=20B?= =?UTF-8?q?uchen=20auf=20AV-Konto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Controllers/BelegController.php | 3 + src/Views/belege/detail.php | 184 +++++++++++++++++++++++++++- 2 files changed, 186 insertions(+), 1 deletion(-) diff --git a/src/Controllers/BelegController.php b/src/Controllers/BelegController.php index 8a4448d..9a70468 100644 --- a/src/Controllers/BelegController.php +++ b/src/Controllers/BelegController.php @@ -7,6 +7,7 @@ namespace Steuerkram\Controllers; use Steuerkram\Models\Beleg; use Steuerkram\Models\Booking; use Steuerkram\Models\Account; +use Steuerkram\Models\Asset; use Steuerkram\Models\Supplier; use Steuerkram\Config; use Steuerkram\View; @@ -198,6 +199,7 @@ class BelegController $integrity = Beleg::verifyIntegrity((int)$params['id']); $accounts = Account::all(['aktiv' => 1]); $suppliers = Supplier::all(); + $assets = Asset::all(); $svc = new KontierungsvorschlagService(); $kiAktiv = $svc->isEnabled(); @@ -214,6 +216,7 @@ class BelegController 'bookings' => $bookings, 'integrity' => $integrity, 'accounts' => $accounts, + 'assets' => $assets, 'kiAktiv' => $kiAktiv, 'kiVorschlag' => $kiVorschlag, ]), diff --git a/src/Views/belege/detail.php b/src/Views/belege/detail.php index a37633e..5fbab21 100644 --- a/src/Views/belege/detail.php +++ b/src/Views/belege/detail.php @@ -380,7 +380,7 @@ $suppliers = $suppliers ?? []; data-target="kategorie_konto_id" autocomplete="off" style="margin-bottom:.3rem" value=""> + @@ -488,6 +491,185 @@ $suppliers = $suppliers ?? []; + + + + [ + 'id' => (int)$a['id'], + 'lfd_nr' => (int)$a['lfd_nr'], + 'bezeichnung' => $a['bezeichnung'], + 'anschaffungsdatum' => $a['anschaffungsdatum'], + 'anschaffungskosten' => (float)$a['anschaffungskosten'], + 'account_id' => $a['account_id'] !== null ? (int)$a['account_id'] : null, +], $assets ?? []), JSON_HEX_TAG); +?> + + +