Skip to content
Snippets Groups Projects

[RTFixed] Dev#176783 task#189903

Merged Henri-Damien LAURENT requested to merge dev#176783_task#189903 into master
All threads resolved!
Compare and Show latest version
2 files
+ 9
7
Preferences
Compare changes
Files
2
@@ -24,16 +24,15 @@ class Intonation_View_User_BorrowerLinks extends ZendAfi_View_Helper_FicheAbonne
public function User_BorrowerLinks(Class_User_Cards $cards) : array {
$links = [];
if ($this->_showDebts())
$links [] = $this->_renderNumberOfDebts();
$debts_links = $this->_renderNumberOfDebts();
if (Class_Users::getIdentity()->displaySimpleAccountLinks())
return array_merge( $this->_displaySimpleAccountLinks(), $links);
return [ ...$this->_displaySimpleAccountLinks(), $debts_links];
if ($cards->hasPagedLoans())
return array_merge( $this->_displayLoansPagesAllLink(), $links);
return [ ...$this->_displayLoansPagesAllLink(), $debts_links];
$loans_count = $cards->getLoansCount();
$late_loans_count = $cards->getLateLoansCount();
@@ -47,7 +46,10 @@ class Intonation_View_User_BorrowerLinks extends ZendAfi_View_Helper_FicheAbonne
if ($holds_count)
$account_links[] = $this->_getHoldsCount($holds_count);
return array_filter(array_merge($account_links, $links)) ??[];
if ($debts_links)
array_push($account_links, $debts_links);
return array_filter($account_links) ??[];
}