mirror of
https://github.com/itflow-org/itflow
synced 2026-08-16 04:25:13 +00:00
Recurring Expense: Fix edit not keeping client
This commit is contained in:
@@ -31,8 +31,8 @@ if ($client_id) {
|
|||||||
enforceClientAccess();
|
enforceClientAccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate the HTML form content using output buffering.
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="modal-header bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
@@ -240,7 +240,7 @@ ob_start();
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<select class="form-control select2" name="client">
|
<select class="form-control select2" name="client_id">
|
||||||
<option value="">- Select Client -</option>
|
<option value="">- Select Client -</option>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ if (isset($_POST['create_recurring_expense'])) {
|
|||||||
$description = escapeSql($_POST['description']);
|
$description = escapeSql($_POST['description']);
|
||||||
$reference = escapeSql($_POST['reference']);
|
$reference = escapeSql($_POST['reference']);
|
||||||
|
|
||||||
|
if ($client_id) {
|
||||||
|
enforceClientAccess();
|
||||||
|
}
|
||||||
|
|
||||||
$year = date('Y');
|
$year = date('Y');
|
||||||
if (strtotime("$year-$month-$day") < time()) {
|
if (strtotime("$year-$month-$day") < time()) {
|
||||||
$year++;
|
$year++;
|
||||||
@@ -59,6 +63,10 @@ if (isset($_POST['edit_recurring_expense'])) {
|
|||||||
$description = escapeSql($_POST['description']);
|
$description = escapeSql($_POST['description']);
|
||||||
$reference = escapeSql($_POST['reference']);
|
$reference = escapeSql($_POST['reference']);
|
||||||
|
|
||||||
|
if ($client_id) {
|
||||||
|
enforceClientAccess();
|
||||||
|
}
|
||||||
|
|
||||||
$year = date('Y');
|
$year = date('Y');
|
||||||
if (strtotime("$year-$month-$day") < time()) {
|
if (strtotime("$year-$month-$day") < time()) {
|
||||||
$year++;
|
$year++;
|
||||||
|
|||||||
Reference in New Issue
Block a user