mirror of
https://github.com/itflow-org/itflow
synced 2026-07-23 08:50:42 +00:00
Expense: On create enforce client Access only if Client is selected
This commit is contained in:
@@ -14,6 +14,10 @@ if (isset($_POST['add_expense'])) {
|
||||
|
||||
require_once 'expense_model.php';
|
||||
|
||||
if ($client_id) {
|
||||
enforceClientAccess();
|
||||
}
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO expenses SET expense_date = '$date', expense_amount = $amount, expense_currency_code = '$session_company_currency', expense_account_id = $account, expense_vendor_id = $vendor, expense_client_id = $client_id, expense_category_id = $category, expense_description = '$description', expense_reference = '$reference'");
|
||||
|
||||
$expense_id = mysqli_insert_id($mysqli);
|
||||
|
||||
Reference in New Issue
Block a user