mirror of
https://github.com/itflow-org/itflow
synced 2026-08-05 07:07:14 +00:00
Recurring Expense: Fix edit not keeping client
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user