Redirect finance detail pages to their list when opened without an id
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
<?php
|
||||
session_start();
|
||||
require '../config.php';
|
||||
require '../include_header.php';
|
||||
|
||||
// A detail-only page: payment billings are created from their list, so with
|
||||
// no id there is nothing to show. Send the user there instead of rendering an
|
||||
// empty page that alerts "Payment billing id is required."
|
||||
$billing_id = (int)($_GET['id'] ?? 0);
|
||||
if (!$billing_id) {
|
||||
header('Location: ' . $server_url . 'finance/payment_billing.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
require '../include_header.php';
|
||||
?>
|
||||
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user