Merge pull request #14663 from aspangaro/13a11
NEW Link on balance to the ledger
This commit is contained in:
commit
aebbb7df39
@ -390,7 +390,7 @@ if ($resql)
|
||||
if (!empty($arrayfields['aa.account_number']['checked']))
|
||||
{
|
||||
print "<td>";
|
||||
print $accountstatic->getNomUrl(1, 0, 0, '', 0, 1);
|
||||
print $accountstatic->getNomUrl(1, 0, 0, '', 0, 1, 0, 'accountcard');
|
||||
print "</td>\n";
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
@ -44,6 +44,8 @@ $cancel = GETPOST('cancel', 'alpha');
|
||||
$accountingaccount = GETPOST('accountingaccount', 'alpha');
|
||||
|
||||
// Security check
|
||||
if ($user->socid > 0) accessforbidden();
|
||||
if (!$user->rights->accounting->chartofaccount) accessforbidden();
|
||||
|
||||
|
||||
$object = new AccountingAccount($db);
|
||||
|
||||
@ -252,8 +252,8 @@ if ($action != 'export_csv')
|
||||
print $langs->trans('to');
|
||||
print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, '');
|
||||
print '</td>';
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto = $form->showFilterAndCheckAddButtons(0);
|
||||
print '<td class="liste_titre center">';
|
||||
$searchpicto = $form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
||||
@ -290,7 +290,7 @@ if ($action != 'export_csv')
|
||||
{
|
||||
$accountingaccountstatic->fetch(null, $line->numero_compte, true);
|
||||
if (!empty($accountingaccountstatic->account_number)) {
|
||||
$accounting_account = $accountingaccountstatic->getNomUrl(0, 1, 1, '', 1);
|
||||
$accounting_account = $accountingaccountstatic->getNomUrl(0, 1);
|
||||
} else {
|
||||
$accounting_account = length_accountg($line->numero_compte);
|
||||
}
|
||||
|
||||
@ -460,12 +460,15 @@ class AccountingAccount extends CommonObject
|
||||
|
||||
$result = '';
|
||||
|
||||
if (empty($option)) {
|
||||
if (empty($option) || $option == 'bookkeeping') {
|
||||
$url = DOL_URL_ROOT . '/accountancy/bookkeeping/list.php?search_accountancy_code_start=' . $this->account_number . '&search_accountancy_code_end=' . $this->account_number;
|
||||
$labelurl = $langs->trans("ShowAccountingAccountInBookKeeping");
|
||||
} 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;
|
||||
$labelurl = $langs->trans("ShowAccountingAccountInBookKeepingByAccount");
|
||||
} elseif ($option == 'accountcard') {
|
||||
$url = DOL_URL_ROOT . '/accountancy/admin/card.php?id=' . $this->id;
|
||||
$labelurl = $langs->trans("ShowAccountingAccount");
|
||||
}
|
||||
|
||||
// Add param to save lastsearch_values or not
|
||||
@ -483,7 +486,7 @@ class AccountingAccount extends CommonObject
|
||||
$labeltoshow = $this->labelshort;
|
||||
}
|
||||
|
||||
$label = '<u>'.$langs->trans("ShowAccountingAccount").'</u>';
|
||||
$label = '<u>'.$labelurl.'</u>';
|
||||
if (!empty($this->account_number))
|
||||
$label .= '<br><b>'.$langs->trans('AccountAccounting').':</b> '.length_accountg($this->account_number);
|
||||
if (!empty($labeltoshow))
|
||||
@ -495,7 +498,7 @@ class AccountingAccount extends CommonObject
|
||||
{
|
||||
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
{
|
||||
$label = $langs->trans("ShowAccountingAccount");
|
||||
$label = $labelurl;
|
||||
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||
}
|
||||
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||
|
||||
@ -7538,7 +7538,7 @@ class Form
|
||||
}
|
||||
|
||||
/**
|
||||
* Return HTML to show the search and clear seach button
|
||||
* Return HTML to show the search and clear search button
|
||||
*
|
||||
* @param string $cssclass CSS class
|
||||
* @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes
|
||||
@ -7611,7 +7611,7 @@ class Form
|
||||
*/
|
||||
public function selectExpenseCategories($selected = '', $htmlname = 'fk_c_exp_tax_cat', $useempty = 0, $excludeid = array(), $target = '', $default_selected = 0, $params = array(), $info_admin = 1)
|
||||
{
|
||||
global $db, $conf, $langs, $user;
|
||||
global $db, $langs, $user;
|
||||
|
||||
$out = '';
|
||||
$sql = 'SELECT rowid, label FROM '.MAIN_DB_PREFIX.'c_exp_tax_cat WHERE active = 1';
|
||||
@ -7933,7 +7933,7 @@ class Form
|
||||
*/
|
||||
public function searchComponent($arrayofcriterias, $search_component_params, $arrayofinputfieldsalreadyoutput = array())
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $langs;
|
||||
|
||||
$ret = '';
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ function accounting_prepare_head(AccountingAccount $object)
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/accountancy/admin/card.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Asset");
|
||||
$head[$h][1] = $langs->trans("AccountAccounting");
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -89,6 +89,8 @@ SubledgerAccount=Subledger account
|
||||
SubledgerAccountLabel=Subledger account label
|
||||
ShowAccountingAccount=Show accounting account
|
||||
ShowAccountingJournal=Show accounting journal
|
||||
ShowAccountingAccountInBookKeeping=Show accounting account in ledger
|
||||
ShowAccountingAccountInBookKeepingByAccount=Show accounting account in ledger by account
|
||||
AccountAccountingSuggest=Accounting account suggested
|
||||
MenuDefaultAccounts=Default accounts
|
||||
MenuBankAccounts=Bank accounts
|
||||
|
||||
Loading…
Reference in New Issue
Block a user