Several fix on module accountancy expert
This commit is contained in:
parent
d9ff53eb7f
commit
2f557fc09b
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/accountancy/admin/account.php
|
* \file htdocs/accountancy/admin/account.php
|
||||||
* \ingroup Advanced accountancy
|
* \ingroup Advanced accountancy
|
||||||
* \brief List accounting account
|
* \brief List accounting account
|
||||||
*/
|
*/
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/accountancy/admin/card.php
|
* \file htdocs/accountancy/admin/card.php
|
||||||
* \ingroup Advanced accountancy
|
* \ingroup Advanced accountancy
|
||||||
* \brief Card of accounting account
|
* \brief Card of accounting account
|
||||||
*/
|
*/
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|||||||
@ -16,12 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/accountancy/admin/fiscalyear.php
|
* \file htdocs/accountancy/admin/fiscalyear.php
|
||||||
* \ingroup fiscal year
|
* \ingroup Advanced accountancy
|
||||||
* \brief Setup page to configure fiscal year
|
* \brief Setup page to configure fiscal year
|
||||||
*/
|
*/
|
||||||
require '../../main.inc.php';
|
|
||||||
|
|
||||||
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php';
|
||||||
|
|
||||||
@ -45,9 +45,9 @@ $langs->load("compta");
|
|||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->fiscalyear)
|
if (! $user->rights->mouvements->lire) // If we can read accounting records, we shoul be able to see fiscal year.
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
// List of status
|
// List of status
|
||||||
@ -65,6 +65,7 @@ $errors = array ();
|
|||||||
|
|
||||||
$object = new Fiscalyear($db);
|
$object = new Fiscalyear($db);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -146,7 +147,14 @@ dol_fiche_end();
|
|||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
print '<a class="butAction" href="fiscalyear_card.php?action=create">' . $langs->trans("NewFiscalYear") . '</a>';
|
if (! empty($user->rights->accounting->fiscalyear))
|
||||||
|
{
|
||||||
|
print '<a class="butAction" href="fiscalyear_card.php?action=create">' . $langs->trans("NewFiscalYear") . '</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a class="butActionRefused" href="#">' . $langs->trans("NewFiscalYear") . '</a>';
|
||||||
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/accountancy/admin/fiscalyear_card.php
|
* \file htdocs/accountancy/admin/fiscalyear_card.php
|
||||||
* \brief Page to show a fiscal year
|
* \ingroup Advanced accountancy
|
||||||
|
* \brief Page to show a fiscal year
|
||||||
*/
|
*/
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
@ -30,7 +31,7 @@ $langs->load("compta");
|
|||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->fiscalyear)
|
if (empty($user->rights->accounting->fiscalyear))
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
@ -138,9 +139,12 @@ else if ($action == 'update') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$title = $langs->trans("Fiscalyear") . " - " . $langs->trans("Card");
|
$title = $langs->trans("Fiscalyear") . " - " . $langs->trans("Card");
|
||||||
$helpurl = "";
|
$helpurl = "";
|
||||||
llxHeader("",$title,$helpurl);
|
llxHeader("",$title,$helpurl);
|
||||||
@ -291,16 +295,19 @@ if ($action == 'create')
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
/*
|
if (! empty($user->rights->accounting->fiscalyear))
|
||||||
* Barre d'actions
|
{
|
||||||
*/
|
/*
|
||||||
print '<div class="tabsAction">';
|
* Barre d'actions
|
||||||
|
*/
|
||||||
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=edit&id=' . $id . '">' . $langs->trans('Modify') . '</a>';
|
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=edit&id=' . $id . '">' . $langs->trans('Modify') . '</a>';
|
||||||
|
|
||||||
print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&id=' . $id . '">' . $langs->trans('Delete') . '</a>';
|
print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&id=' . $id . '">' . $langs->trans('Delete') . '</a>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
|
|||||||
@ -16,11 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/accountancy/admin/fiscalyear_card.php
|
* \file htdocs/accountancy/admin/fiscalyear_info.php
|
||||||
* \brief Page to show info of a fiscal year
|
* \ingroup Advanced accountancy
|
||||||
|
* \brief Page to show info of a fiscal year
|
||||||
*/
|
*/
|
||||||
require '../../main.inc.php';
|
|
||||||
|
|
||||||
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/fiscalyear.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/fiscalyear.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user