Skip to content
Snippets Groups Projects
Commit df388a5a authored by Shani's avatar Shani
Browse files

Merge branch 'bills-BRCD-4284' into 'customer_portal'

BRCD-4284:Updated threshold parameter to be configured

See merge request sdoc/billrun!5350
parents 16a04824 3b2de901
Branches
Tags 5.16.0-beta50
No related merge requests found
...@@ -157,7 +157,17 @@ class BillAction extends ApiAction { ...@@ -157,7 +157,17 @@ class BillAction extends ApiAction {
$requestBody = $request; $requestBody = $request;
} }
$aids = json_decode($jsonAids, TRUE); $aids = json_decode($jsonAids, TRUE);
if (!is_null($request->get('threshold', null))) {
$min_debt = $request->get('threshold', null); $min_debt = $request->get('threshold', null);
Billrun_Factory::log("Using api threshold parameter value " . $min_debt, Zend_Log::DEBUG);
} else {
$min_debt = Billrun_Factory::config()->getConfigValue('api.bill.collection_debt.threshold', null);
if (!is_null($min_debt)) {
Billrun_Factory::log("Using configured threshold value " . $min_debt, Zend_Log::DEBUG);
} else {
Billrun_Factory::log("No threshold value was found", Zend_Log::DEBUG);
}
}
if (!is_array($aids) || json_last_error()) { if (!is_array($aids) || json_last_error()) {
$this->setError('Illegal account ids', $requestBody); $this->setError('Illegal account ids', $requestBody);
return FALSE; return FALSE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment