Recurring Expense: Fix edit not keeping client

This commit is contained in:
johnnyq
2026-08-01 12:09:39 -04:00
parent abe02d7d8e
commit 4fec57709a
2 changed files with 10 additions and 2 deletions

View File

@@ -31,8 +31,8 @@ if ($client_id) {
enforceClientAccess();
}
// Generate the HTML form content using output buffering.
ob_start();
?>
<div class="modal-header bg-dark">
@@ -240,7 +240,7 @@ ob_start();
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
</div>
<select class="form-control select2" name="client">
<select class="form-control select2" name="client_id">
<option value="">- Select Client -</option>
<?php

View File

@@ -23,6 +23,10 @@ if (isset($_POST['create_recurring_expense'])) {
$description = escapeSql($_POST['description']);
$reference = escapeSql($_POST['reference']);
if ($client_id) {
enforceClientAccess();
}
$year = date('Y');
if (strtotime("$year-$month-$day") < time()) {
$year++;
@@ -59,6 +63,10 @@ if (isset($_POST['edit_recurring_expense'])) {
$description = escapeSql($_POST['description']);
$reference = escapeSql($_POST['reference']);
if ($client_id) {
enforceClientAccess();
}
$year = date('Y');
if (strtotime("$year-$month-$day") < time()) {
$year++;