mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Merge pull request #29227 from hregis/fix_dev_phan_error2
FIX phan error PhanTypeMismatchReturnNullable
This commit is contained in:
@@ -238,7 +238,7 @@ class FormAccounting extends Form
|
||||
* @param int $maxlen Max length of text in combo box
|
||||
* @param int $help Add or not the admin help picto
|
||||
* @param int $allcountries All countries
|
||||
* @return string HTML component with the select
|
||||
* @return void|string HTML component with the select
|
||||
*/
|
||||
public function select_accounting_category($selected = 0, $htmlname = 'account_category', $useempty = 0, $maxlen = 0, $help = 1, $allcountries = 0)
|
||||
{
|
||||
@@ -250,6 +250,8 @@ class FormAccounting extends Form
|
||||
exit;
|
||||
}
|
||||
|
||||
$out = '';
|
||||
|
||||
if (!empty($mysoc->country_id)) {
|
||||
$sql = "SELECT c.rowid, c.label as type, c.range_account";
|
||||
$sql .= " FROM ".$this->db->prefix()."c_accounting_category as c";
|
||||
@@ -280,7 +282,7 @@ class FormAccounting extends Form
|
||||
if ($num) {
|
||||
$this->nbaccounts_category = $num;
|
||||
|
||||
$out = '<select class="flat minwidth200" id="'.$htmlname.'" name="'.$htmlname.'">';
|
||||
$out .= '<select class="flat minwidth200" id="'.$htmlname.'" name="'.$htmlname.'">';
|
||||
$i = 0;
|
||||
|
||||
if ($useempty) {
|
||||
@@ -308,7 +310,7 @@ class FormAccounting extends Form
|
||||
|
||||
$out .= ajax_combobox($htmlname, array());
|
||||
} else {
|
||||
$out = '<span class="opacitymedium">'.$langs->trans("ErrorNoAccountingCategoryForThisCountry", $mysoc->country_code, $langs->transnoentitiesnoconv("Accounting"), $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("AccountingCategories")).'</span>';
|
||||
$out .= '<span class="opacitymedium">'.$langs->trans("ErrorNoAccountingCategoryForThisCountry", $mysoc->country_code, $langs->transnoentitiesnoconv("Accounting"), $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("AccountingCategories")).'</span>';
|
||||
}
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
|
||||
Reference in New Issue
Block a user