Merge pull request #14614 from aspangaro/13a10
New Accountancy Add predefined url in getNomUrl
This commit is contained in:
commit
4da10b5f63
@ -448,9 +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 $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)
|
||||
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';
|
||||
@ -459,7 +460,13 @@ class AccountingAccount extends CommonObject
|
||||
|
||||
$result = '';
|
||||
|
||||
$url = DOL_URL_ROOT.'/accountancy/admin/card.php?id='.$this->id;
|
||||
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 ($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 ($option == 'accountcard') {
|
||||
$url = DOL_URL_ROOT . '/accountancy/admin/card.php?id=' . $this->id;
|
||||
}
|
||||
|
||||
// Add param to save lastsearch_values or not
|
||||
$add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
|
||||
|
||||
@ -122,7 +122,7 @@ class FormFile
|
||||
$out .= '<input type="hidden" name="sortorder" value="'.GETPOST('sortorder', 'aZ09').'">';
|
||||
}
|
||||
|
||||
$out .= '<table class="nobordernopadding cenpercent">';
|
||||
$out .= '<table class="nobordernopadding centpercent">';
|
||||
$out .= '<tr>';
|
||||
|
||||
if (!empty($options)) $out .= '<td>'.$options.'</td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user