Fix back to link

This commit is contained in:
Laurent Destailleur 2017-09-06 19:56:01 +02:00
parent 7c2c496823
commit 25254a19fc

View File

@ -63,7 +63,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
{ {
if (! $cancel) { if (! $cancel) {
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS; $sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
dol_syslog('accountancy/admin/card.php:: $sql=' . $sql); dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
$result = $db->query($sql); $result = $db->query($sql);
$obj = $db->fetch_object($result); $obj = $db->fetch_object($result);
@ -172,16 +172,16 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
} }
} else if ($action == 'delete' && $user->rights->accounting->chartofaccount) { } else if ($action == 'delete' && $user->rights->accounting->chartofaccount) {
$result = $object->fetch($id); $result = $object->fetch($id);
if (! empty($object->id)) { if (! empty($object->id)) {
$result = $object->delete($user); $result = $object->delete($user);
if ($result > 0) { if ($result > 0) {
header("Location: account.php"); header("Location: account.php");
exit; exit;
} }
} }
if ($result < 0) { if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
} }
@ -270,7 +270,7 @@ if ($action == 'create') {
$head = accounting_prepare_head($object); $head = accounting_prepare_head($object);
// Edit mode // Edit mode
if ($action == 'update') if ($action == 'update')
{ {
dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr'); dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr');
@ -327,7 +327,7 @@ if ($action == 'create') {
print '</form>'; print '</form>';
} else { } else {
// View mode // View mode
$linkback = '<a href="../admin/account.php">' . $langs->trans("BackToChartofaccounts") . '</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php">' . $langs->trans("BackToList") . '</a>';
dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr'); dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr');