From e458f95bd8edd6d105fd09547b0323066b245031 Mon Sep 17 00:00:00 2001 From: electrocret Date: Tue, 6 Sep 2022 11:49:15 -0500 Subject: [PATCH] Billing module fix/cleanup (#14309) * Delete autoadd definitions Never actually used. Inherited from Observium. * Allow Billing API to set dir_95th (for agg bills) Currently we're unable to set dir_95th via API to configure Aggregate bills. This should fix that. --- includes/html/api_functions.inc.php | 3 +++ misc/config_definitions.json | 12 ------------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/includes/html/api_functions.inc.php b/includes/html/api_functions.inc.php index 4932d8c82c..89fa5187c1 100644 --- a/includes/html/api_functions.inc.php +++ b/includes/html/api_functions.inc.php @@ -1833,6 +1833,7 @@ function create_edit_bill(Illuminate\Http\Request $request) 'bill_custid' => $bill['bill_custid'], 'bill_ref' => $bill['bill_ref'], 'bill_notes' => $bill['bill_notes'], + 'dir_95th' => $bill['dir_95th'], ]; $update = dbUpdate($update_data, 'bills', 'bill_id=?', [$bill_id]); if ($update === false || $update < 0) { @@ -1853,6 +1854,7 @@ function create_edit_bill(Illuminate\Http\Request $request) 'bill_custid', 'bill_ref', 'bill_notes', + 'dir_95th', ]; if ($data['bill_type'] == 'quota') { @@ -1891,6 +1893,7 @@ function create_edit_bill(Illuminate\Http\Request $request) 'bill_custid' => $bill['bill_custid'], 'bill_ref' => $bill['bill_ref'], 'bill_notes' => $bill['bill_notes'], + 'dir_95th' => $bill['dir_95th'], ], 'bills' ); diff --git a/misc/config_definitions.json b/misc/config_definitions.json index 0cd182425b..e51d43e21f 100644 --- a/misc/config_definitions.json +++ b/misc/config_definitions.json @@ -813,18 +813,6 @@ "default": 1000, "type": "integer" }, - "billing.bill_autoadd": { - "default": false, - "type": "boolean" - }, - "billing.circuit_autoadd": { - "default": false, - "type": "boolean" - }, - "billing.customer_autoadd": { - "default": false, - "type": "boolean" - }, "callback_clear": { "default": "https://stats.librenms.org/clear.php", "type": "text"