diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php
index f0bbd02f330..d8a26ca1ec5 100644
--- a/htdocs/accountancy/admin/account.php
+++ b/htdocs/accountancy/admin/account.php
@@ -17,7 +17,7 @@
*/
/**
- * \file accountingex/admin/account.php
+ * \file htdocs/accountancy/admin/account.php
* \ingroup Accounting Expert
* \brief List accounting account
*/
@@ -35,12 +35,12 @@ if (! $res)
// Class
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
-dol_include_once("/accountingex/class/accountingaccount.class.php");
-dol_include_once("/accountingex/class/html.formventilation.class.php");
+dol_include_once("/accountancy/class/accountingaccount.class.php");
+dol_include_once("/accountancy/class/html.formventilation.class.php");
// Langs
$langs->load("compta");
-$langs->load("accountingex@accountingex");
+$langs->load("accountancy");
$mesg = '';
$action = GETPOST('action');
@@ -48,10 +48,8 @@ $id = GETPOST('id', 'int');
$rowid = GETPOST('rowid', 'int');
// Security check
-if ($user->societe_id > 0)
- accessforbidden();
-if (! $user->rights->accountingex->admin)
- accessforbidden();
+if (!$user->admin)
+ accessforbidden();
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
@@ -130,7 +128,7 @@ if (strlen(trim($_GET["search_pcgsubtype"]))) {
$sql .= $db->order($sortfield, $sortorder);
$sql .= $db->plimit($limit + 1, $offset);
-dol_syslog('accountingex/admin/account.php:: $sql=' . $sql);
+dol_syslog('accountancy/admin/account.php:: $sql=' . $sql);
$result = $db->query($sql);
if ($result) {
@@ -144,7 +142,7 @@ if ($result) {
print '
';
- print '' . $langs->trans("Addanaccount") . '';
+ print '' . $langs->trans("Addanaccount") . '';
print '' . $langs->trans("ImportAccount") . '';
print '
';
@@ -178,7 +176,7 @@ if ($result) {
$var = ! $var;
print '
';
- print '| ' . $obj->account_number . ' | ';
+ print '' . $obj->account_number . ' | ';
print '' . $obj->label . ' | ';
print '' . $obj->account_parent . ' | ';
print '' . $obj->pcg_type . ' | ';
@@ -197,10 +195,10 @@ if ($result) {
print '';
if ($user->rights->accountingex->admin) {
- print '';
+ print '';
print img_edit();
print ' ';
- print '';
+ print '';
print img_delete();
print '';
}
diff --git a/htdocs/accountancy/admin/fiche.php b/htdocs/accountancy/admin/card.php
similarity index 94%
rename from htdocs/accountancy/admin/fiche.php
rename to htdocs/accountancy/admin/card.php
index 76fc955fca2..68cdaf704a4 100644
--- a/htdocs/accountancy/admin/fiche.php
+++ b/htdocs/accountancy/admin/card.php
@@ -18,9 +18,9 @@
*/
/**
- * \file accountingex/admin/fiche.php
- * \ingroup Accounting Expert
- * \brief Page fiche de compte
+ * \file htdocs/accountancy/admin/card.php
+ * \ingroup Accounting Expert
+ * \brief Card accounting account
*/
$res = @include ("../main.inc.php");
if (! $res && file_exists("../main.inc.php"))
@@ -34,12 +34,12 @@ if (! $res)
// Class
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
-dol_include_once("/accountingex/class/accountingaccount.class.php");
-dol_include_once("/accountingex/class/html.formventilation.class.php");
+dol_include_once("/accountancy/class/accountingaccount.class.php");
+dol_include_once("/accountancy/class/html.formventilation.class.php");
// Langs
$langs->load("bills");
-$langs->load("accountingex@accountingex");
+$langs->load("accountancy");
$mesg = '';
$action = GETPOST('action');
@@ -47,17 +47,16 @@ $id = GETPOST('id', 'int');
$rowid = GETPOST('rowid', 'int');
// Security check
-if ($user->societe_id > 0)
- accessforbidden();
-if (! $user->rights->accountingex->admin)
- accessforbidden();
+if (!$user->admin)
+ accessforbidden();
+
$accounting = new AccountingAccount($db);
-// action
+// Action
if ($action == 'add') {
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
- dol_syslog('accountingex/admin/fiche.php:: $sql=' . $sql);
+ dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
$result = $db->query($sql);
$obj = $db->fetch_object($result);
@@ -89,7 +88,7 @@ if ($action == 'add') {
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
- dol_syslog('accountingex/admin/fiche.php:: $sql=' . $sql);
+ dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
$result2 = $db->query($sql);
$obj = $db->fetch_object($result2);
diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php
index a326b7058ad..2b042720b60 100644
--- a/htdocs/accountancy/admin/export.php
+++ b/htdocs/accountancy/admin/export.php
@@ -19,7 +19,7 @@
*/
/**
- * \file htdocs/accountingex/admin/export.php
+ * \file htdocs/accountancy/admin/export.php
* \ingroup Accounting Expert
* \brief Setup page to configure accounting expert module
*/
@@ -41,20 +41,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
$langs->load("compta");
$langs->load("bills");
-$langs->load('admin');
-$langs->load('accountingex@accountingex');
+$langs->load("admin");
+$langs->load("accountancy");
// Security check
-if ($user->societe_id > 0)
- accessforbidden();
-if (! $user->rights->accountingex->admin)
- accessforbidden();
+if (!$user->admin)
+ accessforbidden();
$action = GETPOST('action', 'alpha');
-// Other parameters ACCOUNTINGEX_*
+// Other parameters ACCOUNTING_*
$list = array (
- 'ACCOUNTINGEX_SEPARATORCSV'
+ 'ACCOUNTING_SEPARATORCSV'
);
/*
@@ -67,7 +65,7 @@ if ($action == 'update') {
if (! empty($modelcsv)) {
- if (! dolibarr_set_const($db, 'ACCOUNTINGEX_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) {
+ if (! dolibarr_set_const($db, 'ACCOUNTING_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
} else {
@@ -121,12 +119,12 @@ print " | " . $langs->trans("Selectmodelcsv") . " | ";
print "";
print ' |