Update accountingaccount.class.php

This commit is contained in:
Laurent Destailleur 2020-09-03 12:32:51 +02:00 committed by GitHub
parent b3cd9688d5
commit 87113a77b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -448,10 +448,10 @@ class AccountingAccount extends CommonObject
* @param int $notooltip 1=Disable tooltip
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @param int $withcompletelabel 0=Short label (field short label), 1=Complete label (field label)
* @param int $targeturl 0=bookkeeping, 1=bookkeeping listbyaccount, 2=account card
* @param int $option 'bookkeeping', 'bookkeepinglistbyaccount', 'accountcard'
* @return string String with URL
*/
public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $withcompletelabel = 0, $targeturl = 0)
public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $withcompletelabel = 0, $option = '')
{
global $langs, $conf, $user;
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
@ -460,11 +460,11 @@ class AccountingAccount extends CommonObject
$result = '';
if (empty($targeturl)) {
if (empty($option)) {
$url = DOL_URL_ROOT . '/accountancy/bookkeeping/list.php?search_accountancy_code_start=' . $this->account_number . '&search_accountancy_code_end=' . $this->account_number;
} elseif ($targeturl == 1) {
} elseif ($option == 'bookkeepinglistbyaccount') {
$url = DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start=' . $this->account_number . '&search_accountancy_code_end=' . $this->account_number;
} elseif ($targeturl == 2) {
} elseif ($option == 'accountcard') {
$url = DOL_URL_ROOT . '/accountancy/admin/card.php?id=' . $this->id;
}