From d03763f6c37ed9a1fa9bfe56906c4092a146f87b Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 28 Aug 2014 06:30:01 +0200 Subject: [PATCH] Update Accounting Expert integration --- htdocs/accountancy/admin/account.php | 24 ++++---- .../accountancy/admin/{fiche.php => card.php} | 25 ++++---- htdocs/accountancy/admin/export.php | 24 ++++---- htdocs/accountancy/admin/importaccounts.php | 32 +++++----- htdocs/accountancy/admin/index.php | 38 ++++++------ htdocs/accountancy/admin/journaux.php | 28 +++++---- htdocs/accountancy/admin/productaccount.php | 18 +++--- .../accountancy/admin/thirdpartyaccount.php | 16 +++-- .../bookkeeping/balancebymonth.php | 14 ++--- .../bookkeeping/{fiche.php => card.php} | 21 ++++--- .../bookkeeping/{liste.php => list.php} | 22 +++---- .../{listebyyear.php => listbyyear.php} | 14 ++--- .../class/accountancysystem.class.php | 6 +- .../class/accountingaccount.class.php | 6 +- .../accountancy/class/bookkeeping.class.php | 40 ++++++------- .../class/html.formventilation.class.php | 7 ++- .../customer/{fiche.php => card.php} | 28 ++++----- htdocs/accountancy/customer/index.php | 22 +++---- .../customer/{lignes.php => lines.php} | 26 ++++----- .../customer/{liste.php => list.php} | 30 +++++----- htdocs/accountancy/journal/bankjournal.php | 38 ++++++------ htdocs/accountancy/journal/cashjournal.php | 42 +++++++------- htdocs/accountancy/journal/index.php | 11 ++-- .../accountancy/journal/purchasesjournal.php | 26 ++++----- htdocs/accountancy/journal/sellsjournal.php | 30 +++++----- .../supplier/{fiche.php => card.php} | 22 +++---- htdocs/accountancy/supplier/index.php | 21 +++---- .../supplier/{lignes.php => lines.php} | 28 ++++----- .../supplier/{liste.php => list.php} | 32 +++++----- htdocs/admin/dict.php | 58 ++++++------------- htdocs/core/modules/modAccounting.class.php | 14 ----- .../{accounting.lang => accountancy.lang} | 0 .../{accounting.lang => accountancy.lang} | 0 .../{accounting.lang => accountancy.lang} | 0 34 files changed, 354 insertions(+), 409 deletions(-) rename htdocs/accountancy/admin/{fiche.php => card.php} (94%) rename htdocs/accountancy/bookkeeping/{fiche.php => card.php} (93%) rename htdocs/accountancy/bookkeeping/{liste.php => list.php} (91%) rename htdocs/accountancy/bookkeeping/{listebyyear.php => listbyyear.php} (90%) rename htdocs/accountancy/customer/{fiche.php => card.php} (85%) rename htdocs/accountancy/customer/{lignes.php => lines.php} (90%) rename htdocs/accountancy/customer/{liste.php => list.php} (90%) rename htdocs/accountancy/supplier/{fiche.php => card.php} (89%) rename htdocs/accountancy/supplier/{lignes.php => lines.php} (89%) rename htdocs/accountancy/supplier/{liste.php => list.php} (88%) rename htdocs/langs/en_US/{accounting.lang => accountancy.lang} (100%) rename htdocs/langs/es_ES/{accounting.lang => accountancy.lang} (100%) rename htdocs/langs/fr_FR/{accounting.lang => accountancy.lang} (100%) 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 ''; $var = True; - while ( $i < min($num_lignes, $limit) ) { + while ( $i < min($num_lines, $limit) ) { $objp = $db->fetch_object($result); $var = ! $var; print ""; diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index d25dffe4c25..83fb8820f08 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -21,7 +21,7 @@ */ /** - * \file htdocs/accountingex/admin/index.php + * \file htdocs/accountancy/admin/index.php * \ingroup Accounting Expert * \brief Setup page to configure accounting expert module */ @@ -43,30 +43,28 @@ 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 COMPTA_* & ACCOUNTINGEX_* +// Other parameters COMPTA_* & ACCOUNTING_* $list = array ( - 'ACCOUNTINGEX_LIMIT_LIST_VENTILATION', - 'ACCOUNTINGEX_LENGTH_GACCOUNT', - 'ACCOUNTINGEX_LENGTH_AACCOUNT', + 'ACCOUNTING_LIMIT_LIST_VENTILATION', + 'ACCOUNTING_LENGTH_GACCOUNT', + 'ACCOUNTING_LENGTH_AACCOUNT', 'COMPTA_ACCOUNT_CUSTOMER', 'COMPTA_ACCOUNT_SUPPLIER', 'COMPTA_PRODUCT_BUY_ACCOUNT', 'COMPTA_PRODUCT_SOLD_ACCOUNT', 'COMPTA_SERVICE_BUY_ACCOUNT', 'COMPTA_SERVICE_SOLD_ACCOUNT', - 'ACCOUNTINGEX_ACCOUNT_SUSPENSE', - 'ACCOUNTINGEX_ACCOUNT_TRANSFER_CASH' + 'ACCOUNTING_ACCOUNT_SUSPENSE', + 'ACCOUNTING_ACCOUNT_TRANSFER_CASH' ); /* @@ -126,7 +124,7 @@ if ($action == 'update') if ($action == 'setlistsorttodo') { $setlistsorttodo = GETPOST('value', 'int'); - $res = dolibarr_set_const($db, "ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity); if (! $res > 0) $error ++; @@ -139,7 +137,7 @@ if ($action == 'setlistsorttodo') { if ($action == 'setlistsortdone') { $setlistsortdone = GETPOST('value', 'int'); - $res = dolibarr_set_const($db, "ACCOUNTINGEX_LIST_SORT_VENTILATION_DONE", $setlistsortdone, 'yesno', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_DONE", $setlistsortdone, 'yesno', 0, '', $conf->entity); if (! $res > 0) $error ++; if (! $error) { @@ -217,7 +215,7 @@ $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system"; $sql .= " WHERE active = 1"; $sql .= " AND fk_pays = " . $mysoc->country_id; -dol_syslog('accountingex/admin/index.php:: $sql=' . $sql); +dol_syslog('accountancy/admin/index.php:: $sql=' . $sql); $resql = $db->query($sql); $var = True; @@ -267,8 +265,8 @@ foreach ($list as $key) } print ""; -print '' . $langs->trans("ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO") . ''; -if (! empty($conf->global->ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO)) { +print '' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO") . ''; +if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) { print ''; print img_picto($langs->trans("Activated"), 'switch_on'); print ''; @@ -280,8 +278,8 @@ if (! empty($conf->global->ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO)) { print ''; print ""; -print '' . $langs->trans("ACCOUNTINGEX_LIST_SORT_VENTILATION_DONE") . ''; -if (! empty($conf->global->ACCOUNTINGEX_LIST_SORT_VENTILATION_DONE)) { +print '' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE") . ''; +if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) { print ''; print img_picto($langs->trans("Activated"), 'switch_on'); print ''; diff --git a/htdocs/accountancy/admin/journaux.php b/htdocs/accountancy/admin/journaux.php index f7b354090e9..139b8b37ae8 100644 --- a/htdocs/accountancy/admin/journaux.php +++ b/htdocs/accountancy/admin/journaux.php @@ -20,9 +20,9 @@ */ /** - * \file htdocs/accountingex/admin/journaux.php - * \ingroup Accounting Expert - * \brief Setup page to configure accounting expert module + * \file htdocs/accountancy/admin/journaux.php + * \ingroup Accounting Expert + * \brief Setup page to configure accounting expert module */ // Dolibarr environment @@ -42,23 +42,21 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; dol_include_once("/core/lib/bank.lib.php"); require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load('accountingex@accountingex'); +$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_SELL_JOURNAL', - 'ACCOUNTINGEX_PURCHASE_JOURNAL', - 'ACCOUNTINGEX_SOCIAL_JOURNAL', - 'ACCOUNTINGEX_CASH_JOURNAL', - 'ACCOUNTINGEX_MISCELLANEOUS_JOURNAL' + 'ACCOUNTING_SELL_JOURNAL', + 'ACCOUNTING_PURCHASE_JOURNAL', + 'ACCOUNTING_SOCIAL_JOURNAL', + 'ACCOUNTING_CASH_JOURNAL', + 'ACCOUNTING_MISCELLANEOUS_JOURNAL' ); /* @@ -134,7 +132,7 @@ $sql .= " FROM ".MAIN_DB_PREFIX."lx_bank_account as ba"; $sql .= " WHERE ba.clos = 0" ; $sql .= " ORDER BY label"; -dol_syslog('accountingex/admin/journaux.php:: $sql='.$sql); +dol_syslog('accountancy/admin/journaux.php:: $sql='.$sql); $resql = $db->query($sql); if ($resql) diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 89bc1996771..55e7b54031e 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -1,7 +1,7 @@ - * Copyright (C) 2013-2014 Alexandre Spangaro + * Copyright (C) 2013-2014 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * * This program is free software; you can redistribute it and/or modify @@ -19,9 +19,9 @@ */ /** - * \file accountingex/admin/productaccount.php - * \ingroup Accounting Expert - * \brief Onglet de gestion de parametrages des ventilations + * \file htdocs/accountancy/admin/productaccount.php + * \ingroup Accounting Expert + * \brief Onglet de gestion de parametrages des ventilations */ // Dolibarr environment @@ -43,13 +43,11 @@ dol_include_once("/product/class/product.class.php"); $langs->load("companies"); $langs->load("compta"); $langs->load("main"); -$langs->load("accountingex@accountingex"); +$langs->load("accountancy"); // Security check -if ($user->societe_id > 0) - accessforbidden(); -if (! $user->rights->accountingex->admin) - accessforbidden(); +if (!$user->admin) + accessforbidden(); llxHeader('', $langs->trans("Accounts")); @@ -70,7 +68,7 @@ $sql = "SELECT p.rowid, p.ref , p.label, p.description , p.accountancy_code_sell $sql .= " FROM " . MAIN_DB_PREFIX . "product as p"; $sql .= " WHERE p.accountancy_code_sell IS NULL AND p.tosell = 1 OR p.accountancy_code_buy IS NULL AND p.tobuy = 1"; -dol_syslog('accountingex/admin/productaccount.php:: $sql=' . $sql); +dol_syslog('accountancy/admin/productaccount.php:: $sql=' . $sql); $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); diff --git a/htdocs/accountancy/admin/thirdpartyaccount.php b/htdocs/accountancy/admin/thirdpartyaccount.php index c9af52fcc51..7c4745aac86 100644 --- a/htdocs/accountancy/admin/thirdpartyaccount.php +++ b/htdocs/accountancy/admin/thirdpartyaccount.php @@ -18,9 +18,9 @@ */ /** - * \file accountingex/admin/thirdpartyaccount.php - * \ingroup Accounting Expert - * \brief Onglet de gestion de parametrages des ventilations + * \file htdocs/accountancy/admin/thirdpartyaccount.php + * \ingroup Accounting Expert + * \brief Onglet de gestion de parametrages des ventilations */ // Dolibarr environment @@ -41,13 +41,11 @@ dol_include_once("/core/lib/date.lib.php"); $langs->load("companies"); $langs->load("compta"); $langs->load("main"); -$langs->load("accountingex@accountingex"); +$langs->load("accountancy"); // Security check -if ($user->societe_id > 0) - accessforbidden(); -if (! $user->rights->accountingex->admin) - accessforbidden(); +if (!$user->admin) + accessforbidden(); // Date range $year = GETPOST("year"); @@ -164,7 +162,7 @@ $sql .= ")"; $sql .= "ORDER BY name ASC"; -dol_syslog('accountingex/admin/thirdpartyaccount.php:: $sql=' . $sql); +dol_syslog('accountancy/admin/thirdpartyaccount.php:: $sql=' . $sql); $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); diff --git a/htdocs/accountancy/bookkeeping/balancebymonth.php b/htdocs/accountancy/bookkeeping/balancebymonth.php index 5ce55fef7f6..7506ad27a39 100644 --- a/htdocs/accountancy/bookkeeping/balancebymonth.php +++ b/htdocs/accountancy/bookkeeping/balancebymonth.php @@ -19,9 +19,9 @@ */ /** - * \file accountingex/bookkeeping/balancebymonth.php - * \ingroup Accounting Expert - * \brief Balance by month + * \file htdocs/accountancy/bookkeeping/balancebymonth.php + * \ingroup Accounting Expert + * \brief Balance by month */ // Dolibarr environment @@ -37,14 +37,14 @@ if (! $res) // Class dol_include_once("/core/lib/date.lib.php"); -dol_include_once("accountingex/core/lib/account.lib.php"); +dol_include_once("accountancy/core/lib/account.lib.php"); // Langs $langs->load("main"); $langs->load("compta"); $langs->load("bills"); $langs->load("other"); -$langs->load("accountingex@accountingex"); +$langs->load("accountancy"); // Filter $year = $_GET["year"]; @@ -71,7 +71,7 @@ $sql .= " , " . MAIN_DB_PREFIX . "facture as f"; $sql .= " WHERE fd.fk_code_ventilation = 0"; $sql .= " AND f.rowid = fd.fk_facture AND f.fk_statut = 1;"; -dol_syslog('accountingex/bookkeeping/balancebymonth.php:: $sql=' . $sql); +dol_syslog('accountancy/bookkeeping/balancebymonth.php:: $sql=' . $sql); $result = $db->query($sql); if ($result) { $row = $db->fetch_row($result); @@ -101,7 +101,7 @@ $sql .= " ROUND(SUM(IF(MONTH(bk.doc_date)=10,bk.montant,0)),2) AS 'Octobre',"; $sql .= " ROUND(SUM(IF(MONTH(bk.doc_date)=11,bk.montant,0)),2) AS 'Novembre',"; $sql .= " ROUND(SUM(IF(MONTH(bk.doc_date)=12,bk.montant,0)),2) AS 'Decembre',"; $sql .= " ROUND(SUM(bk.montant),2) as 'Total'"; -$sql .= " FROM " . MAIN_DB_PREFIX . "bookkeeping as bk"; +$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk"; $sql .= " WHERE bk.doc_date >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'"; $sql .= " AND bk.doc_date <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'"; $sql .= " GROUP BY bk.numero_compte"; diff --git a/htdocs/accountancy/bookkeeping/fiche.php b/htdocs/accountancy/bookkeeping/card.php similarity index 93% rename from htdocs/accountancy/bookkeeping/fiche.php rename to htdocs/accountancy/bookkeeping/card.php index b558f70e480..f6a9f347dc0 100644 --- a/htdocs/accountancy/bookkeeping/fiche.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -18,7 +18,7 @@ */ /** - * \file accountingex/bookkeeping/fiche.php + * \file htdocs/accountancy/bookkeeping/card.php * \ingroup Accounting Expert * \brief Page to show account */ @@ -35,10 +35,10 @@ if (! $res) die("Include of main fails"); // Class -dol_include_once("accountingex/class/bookkeeping.class.php"); +dol_include_once("accountancy/class/bookkeeping.class.php"); // Langs -$langs->load("accountingex@accountingex"); +$langs->load("accounting"); // Security check $id = GETPOST('id', 'int'); @@ -190,7 +190,6 @@ else if ($action == "confirm_create") { llxHeader(); $html = new Form($db); -$nbligne = 0; /* * Confirmation to delete the command @@ -205,16 +204,16 @@ if ($action == 'create') { print_fiche_titre($langs->trans("CreateMvts")); $code_journal_array = array ( - $conf->global->ACCOUNTINGEX_SELL_JOURNAL => $conf->global->ACCOUNTINGEX_SELL_JOURNAL, - $conf->global->ACCOUNTINGEX_PURCHASE_JOURNAL => $conf->global->ACCOUNTINGEX_PURCHASE_JOURNAL, - $conf->global->ACCOUNTINGEX_BANK_JOURNAL => $conf->global->ACCOUNTINGEX_BANK_JOURNAL, - $conf->global->ACCOUNTINGEX_SOCIAL_JOURNAL => $conf->global->ACCOUNTINGEX_SOCIAL_JOURNAL + $conf->global->ACCOUNTING_SELL_JOURNAL => $conf->global->ACCOUNTING_SELL_JOURNAL, + $conf->global->ACCOUNTING_PURCHASE_JOURNAL => $conf->global->ACCOUNTING_PURCHASE_JOURNAL, + $conf->global->ACCOUNTING_BANK_JOURNAL => $conf->global->ACCOUNTING_BANK_JOURNAL, + $conf->global->ACCOUNTING_SOCIAL_JOURNAL => $conf->global->ACCOUNTING_SOCIAL_JOURNAL ); $book = new BookKeeping($db); $next_num_mvt = $book->next_num_mvt(); - print '
'; + print ''; print '' . "\n"; print '' . "\n"; @@ -337,10 +336,10 @@ if ($action == 'create') { print ''; if ($user->rights->accoutingex->access) { - print ''; + print ''; print img_edit(); print ' '; - print ''; + print ''; print img_delete(); print ''; } diff --git a/htdocs/accountancy/bookkeeping/liste.php b/htdocs/accountancy/bookkeeping/list.php similarity index 91% rename from htdocs/accountancy/bookkeeping/liste.php rename to htdocs/accountancy/bookkeeping/list.php index f587663e71c..5826256db51 100644 --- a/htdocs/accountancy/bookkeeping/liste.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -19,8 +19,8 @@ */ /** - * \file accountingex/bookkeeping/liste.php - * \ingroup Accounting Expert + * \file htdocs/accountancy/bookkeeping/list.php + * \ingroup Accounting Expert * \brief List operation of book keeping */ @@ -36,8 +36,8 @@ if (! $res) die("Include of main fails"); // Class -dol_include_once("/accountingex/class/html.formventilation.class.php"); -dol_include_once("/accountingex/class/bookkeeping.class.php"); +dol_include_once("/accountancy/class/html.formventilation.class.php"); +dol_include_once("/accountancy/class/bookkeeping.class.php"); require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; $page = GETPOST("page"); @@ -64,7 +64,7 @@ if ($action == 'delbookkeeping') { if (! empty($import_key)) { $object = new BookKeeping($db); $result = $object->delete_by_importkey($import_key); - Header("Location: liste.php"); + Header("Location: list.php"); if ($result < 0) { setEventMessage($object->errors, 'errors'); } @@ -106,7 +106,7 @@ else { */ $sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num "; - $sql .= " FROM " . MAIN_DB_PREFIX . "bookkeeping as bk"; + $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk"; if (dol_strlen(trim(GETPOST("search_doc_type")))) { @@ -131,13 +131,13 @@ else { $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit + 1, $offset); - dol_syslog('accountingex/bookkeeping/liste.php:: $sql=' . $sql); + dol_syslog('accountancy/bookkeeping/list.php:: $sql=' . $sql); $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); $i = 0; - print_barre_liste($langs->trans("Bookkeeping"), $page, "liste.php", "", $sortfield, $sortorder, '', $num); + print_barre_liste($langs->trans("Bookkeeping"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num); print ''; print ''; @@ -149,7 +149,7 @@ else { print '
'; - print 'Nouveau mouvement comptable'; + print '' . $langs->trans("NewAccountingMvt") . ''; print '
'; print ''; @@ -174,7 +174,7 @@ else { print "\n"; print ''; - print ''; + print ''; print ''; print ' '; print ''; @@ -211,7 +211,7 @@ else { print '' . price($obj->montant) . ''; print '' . $obj->sens . ''; print '' . $obj->code_journal . ''; - print '' . img_edit() . ''; + print '' . img_edit() . ''; print "\n"; $i ++; } diff --git a/htdocs/accountancy/bookkeeping/listebyyear.php b/htdocs/accountancy/bookkeeping/listbyyear.php similarity index 90% rename from htdocs/accountancy/bookkeeping/listebyyear.php rename to htdocs/accountancy/bookkeeping/listbyyear.php index 2e17e1205ab..45c25f72fbe 100644 --- a/htdocs/accountancy/bookkeeping/listebyyear.php +++ b/htdocs/accountancy/bookkeeping/listbyyear.php @@ -19,7 +19,7 @@ */ /** - * \file accountingex/bookkeeping/listebyyear.php + * \file htdocs/accountancy/bookkeeping/listbyyear.php * \ingroup Accounting Expert * \brief Book keeping by year */ @@ -40,7 +40,7 @@ dol_include_once("/core/lib/date.lib.php"); require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; // Langs -$langs->load("accountingex@accountingex"); +$langs->load("accountancy"); $page = GETPOST("page"); $sortorder = GETPOST("sortorder"); @@ -65,8 +65,8 @@ $offset = $conf->liste_limit * $page; llxHeader('', $langs->trans("Bookkeeping")); -$textprevyear = "" . img_previous() . ""; -$textnextyear = " " . img_next() . ""; +$textprevyear = "" . img_previous() . ""; +$textnextyear = " " . img_next() . ""; /* * Mode Liste @@ -74,12 +74,12 @@ $textnextyear = " " */ $sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens, bk.code_journal"; -$sql .= " FROM " . MAIN_DB_PREFIX . "bookkeeping as bk"; +$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk"; // $sql .= " WHERE bk.doc_date >= '".$db->idate(dol_get_first_day($y,1,false))."'"; // $sql .= " AND bk.doc_date <= '".$db->idate(dol_get_last_day($y,12,false))."'"; $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit + 1, $offset); -dol_syslog('accountingex/bookkeeping/listebyyear.php:: $sql=' . $sql); +dol_syslog('accountancy/bookkeeping/listbyyear.php:: $sql=' . $sql); $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); @@ -122,7 +122,7 @@ if ($resql) { print '' . price($obj->montant) . ''; print '' . $obj->sens . ''; print '' . $obj->code_journal . ''; - print '' . img_edit() . ''; + print '' . img_edit() . ''; print "\n"; $i ++; diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index 63b59a95aaf..08d195aedcf 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -18,9 +18,9 @@ */ /** - * \file accountingex/class/accountancysystem.class.php - * \ingroup Accounting Expert - * \brief File of class to manage accountancy systems + * \file htdocs/accountancy/class/accountancysystem.class.php + * \ingroup Accounting Expert + * \brief File of class to manage accountancy systems */ /** diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 9cb29dc1e0b..34c23cb0a51 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -18,9 +18,9 @@ */ /** - * \file accountingex/class/Accountingaccount.class.php - * \ingroup Accounting Expert - * \brief Fichier de la classe des comptes comptable + * \file htdocs/accountancy/class/Accountingaccount.class.php + * \ingroup Accounting Expert + * \brief Fichier de la classe des comptes comptable */ /** diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 0ea235599b6..b1bc5b158f1 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -19,9 +19,9 @@ */ /** - * \file accountingex/class/bookkeeping.class.php - * \ingroup Accounting Expert - * \brief Fichier de la classe des comptes comptable + * \file htdocs/accountancy/class/bookkeeping.class.php + * \ingroup Accounting Expert + * \brief Fichier de la classe des comptes comptable */ /** @@ -63,7 +63,7 @@ class BookKeeping { * \brief Load record in memory */ function fetch_per_mvt($piecenum) { - $sql = "SELECT piece_num,doc_date,code_journal,doc_ref,doc_type FROM " . MAIN_DB_PREFIX . "bookkeeping WHERE "; + $sql = "SELECT piece_num,doc_date,code_journal,doc_ref,doc_type FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE "; $sql .= " piece_num = '" . $piecenum . "'"; dol_syslog(get_class($this) . "fetch_per_mvt sql=" . $sql, LOG_DEBUG); @@ -93,7 +93,7 @@ class BookKeeping { $sql .= "doc_ref, fk_doc, fk_docdet, code_tiers, "; $sql .= "numero_compte, label_compte, debit, credit, "; $sql .= " montant, sens, fk_user_author, import_key, code_journal, piece_num "; - $sql .= " FROM " . MAIN_DB_PREFIX . "bookkeeping "; + $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping "; $sql .= " WHERE rowid = '" . $id . "'"; dol_syslog(get_class($this) . "fetch sql=" . $sql, LOG_DEBUG); @@ -130,7 +130,7 @@ class BookKeeping { * \brief Return next num mvt */ function next_num_mvt() { - $sql = "SELECT MAX(piece_num)+1 as max FROM " . MAIN_DB_PREFIX . "bookkeeping"; + $sql = "SELECT MAX(piece_num)+1 as max FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping"; dol_syslog(get_class($this) . "next_num_mvt sql=" . $sql, LOG_DEBUG); $result = $this->db->query($sql); @@ -153,7 +153,7 @@ class BookKeeping { $sql .= "doc_ref, fk_doc, fk_docdet, code_tiers, "; $sql .= "numero_compte, label_compte, debit, credit, "; $sql .= " montant, sens, fk_user_author, import_key, code_journal, piece_num "; - $sql .= " FROM " . MAIN_DB_PREFIX . "bookkeeping "; + $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping "; $sql .= " WHERE piece_num = '" . $piecenum . "'"; dol_syslog(get_class($this) . "fetch_all_per_mvt sql=" . $sql, LOG_DEBUG); @@ -193,8 +193,8 @@ class BookKeeping { } /** - * \brief Insere une ligne dans bookkeeping - * \param user utilisateur qui effectue l'insertion + * \brief Insert line into bookkeeping + * \param user User who inserted operation */ function create() { global $conf, $user, $langs; @@ -203,7 +203,7 @@ class BookKeeping { // first check if line not yet in bookkeeping $sql = "SELECT count(*)"; - $sql .= " FROM " . MAIN_DB_PREFIX . "bookkeeping "; + $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping "; $sql .= " WHERE doc_type = '" . $this->doc_type . "'"; $sql .= " AND fk_docdet = " . $this->fk_docdet; $sql .= " AND numero_compte = '" . $this->numero_compte . "'"; @@ -217,7 +217,7 @@ class BookKeeping { // Determine piece_num $sqlnum = "SELECT piece_num"; - $sqlnum .= " FROM " . MAIN_DB_PREFIX . "bookkeeping "; + $sqlnum .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping "; $sqlnum .= " WHERE doc_type = '" . $this->doc_type . "'"; $sqlnum .= " AND fk_docdet = '" . $this->fk_docdet . "'"; $sqlnum .= " AND doc_ref = '" . $this->doc_ref . "'"; @@ -231,7 +231,7 @@ class BookKeeping { dol_syslog(get_class($this) . ":: create this->piece_num=" . $this->piece_num, LOG_DEBUG); if (empty($this->piece_num)) { $sqlnum = "SELECT MAX(piece_num)+1 as maxpiecenum"; - $sqlnum .= " FROM " . MAIN_DB_PREFIX . "bookkeeping "; + $sqlnum .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping "; dol_syslog(get_class($this) . ":: create sqlnum=" . $sqlnum, LOG_DEBUG); $resqlnum = $this->db->query($sqlnum); @@ -249,7 +249,7 @@ class BookKeeping { if (empty($this->date_create)) $this->date_create = $now(); - $sql = "INSERT INTO " . MAIN_DB_PREFIX . "bookkeeping (doc_date, "; + $sql = "INSERT INTO " . MAIN_DB_PREFIX . "accounting_bookkeeping (doc_date, "; $sql .= "doc_type, doc_ref,fk_doc,fk_docdet,code_tiers,numero_compte,label_compte,"; $sql .= "debit,credit,montant,sens,fk_user_author,import_key,code_journal,piece_num)"; $sql .= " VALUES ('" . $this->doc_date . "','" . $this->doc_type . "','" . $this->doc_ref . "'," . $this->fk_doc . ","; @@ -260,7 +260,7 @@ class BookKeeping { dol_syslog(get_class($this) . ":: create sql=" . $sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { - $id = $this->db->last_insert_id(MAIN_DB_PREFIX . "bookkeeping"); + $id = $this->db->last_insert_id(MAIN_DB_PREFIX . "accounting_bookkeeping"); if ($id > 0) { $this->id = $id; @@ -293,7 +293,7 @@ class BookKeeping { // first check if line not yet in bookkeeping $sql = "DELETE"; - $sql .= " FROM " . MAIN_DB_PREFIX . "bookkeeping "; + $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping "; $sql .= " WHERE import_key = '" . $importkey . "'"; $resql = $this->db->query($sql); @@ -364,7 +364,7 @@ class BookKeeping { // Put here code to add control on parameters values // Insert request - $sql = "INSERT INTO " . MAIN_DB_PREFIX . "bookkeeping("; + $sql = "INSERT INTO " . MAIN_DB_PREFIX . "accounting_bookkeeping("; $sql .= "doc_date,"; $sql .= "doc_type,"; @@ -414,7 +414,7 @@ class BookKeeping { } if (! $error) { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . "bookkeeping"); + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . "accounting_bookkeeping"); if (! $notrigger) { // Uncomment this and change MYOBJECT to your own tag if you @@ -491,7 +491,7 @@ class BookKeeping { // Put here code to add a control on parameters values // Update request - $sql = "UPDATE " . MAIN_DB_PREFIX . "bookkeeping SET"; + $sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping SET"; $sql .= " doc_date=" . (dol_strlen($this->doc_date) != 0 ? "'" . $this->db->idate($this->doc_date) . "'" : 'null') . ","; $sql .= " doc_type=" . (isset($this->doc_type) ? "'" . $this->db->escape($this->doc_type) . "'" : "null") . ","; @@ -577,7 +577,7 @@ class BookKeeping { } if (! $error) { - $sql = "DELETE FROM " . MAIN_DB_PREFIX . "bookkeeping"; + $sql = "DELETE FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping"; $sql .= " WHERE rowid=" . $this->id; dol_syslog(get_class($this) . "::delete sql=" . $sql); @@ -610,7 +610,7 @@ class BookKeeping { $sql .= "doc_ref, fk_doc, fk_docdet, code_tiers, "; $sql .= "numero_compte, label_compte, debit, credit, "; $sql .= " montant, sens, fk_user_author, import_key, code_journal, piece_num "; - $sql .= " FROM " . MAIN_DB_PREFIX . "bookkeeping "; + $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping "; $resql = $this->db->query($sql); diff --git a/htdocs/accountancy/class/html.formventilation.class.php b/htdocs/accountancy/class/html.formventilation.class.php index 16aeb01dd02..d6f5ce17404 100644 --- a/htdocs/accountancy/class/html.formventilation.class.php +++ b/htdocs/accountancy/class/html.formventilation.class.php @@ -18,8 +18,9 @@ */ /** - * \file accountingex/class/html.formventilation.class.php - * \brief Class for HML form + * \file htdocs/accountancy/class/html.formventilation.class.php + * \ingroup Accounting Expert + * \brief Class for HML form */ class FormVentilation extends Form { var $db; @@ -47,7 +48,7 @@ class FormVentilation extends Form { $date_array = array (); - $sql = 'SELECT DISTINCT import_key from ' . MAIN_DB_PREFIX . 'bookkeeping '; + $sql = 'SELECT DISTINCT import_key from ' . MAIN_DB_PREFIX . 'accounting_bookkeeping'; $sql .= ' ORDER BY import_key DESC'; $out = ''; print ''; @@ -164,7 +164,7 @@ if ($result) { $form = new Form($db); $var = True; - while ( $i < min($num_lignes, $limit) ) { + while ( $i < min($num_lines, $limit) ) { $objp = $db->fetch_object($result); $var = ! $var; print ""; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 28573c63677..11c3eb3f80b 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -70,7 +70,7 @@ $hookmanager->initHooks(array('admin')); // Put here declaration of dictionaries properties // Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this. -$taborder=array(9,0,4,3,2,0,1,8,19,16,0,5,11,0,6,0,10,25,12,13,0,14,0,7,17,0,22,20,18,21,0,15,0,24,23,0,26); +$taborder=array(9,0,4,3,2,0,1,8,19,16,0,5,11,0,6,0,10,23,12,13,0,14,0,7,17,0,22,20,18,21,0,15,0,24); // Name of SQL tables of dictionaries $tabname=array(); @@ -96,10 +96,8 @@ $tabname[19]= MAIN_DB_PREFIX."c_effectif"; $tabname[20]= MAIN_DB_PREFIX."c_input_method"; $tabname[21]= MAIN_DB_PREFIX."c_availability"; $tabname[22]= MAIN_DB_PREFIX."c_input_reason"; -$tabname[23]= MAIN_DB_PREFIX."accountingaccount"; -$tabname[24]= MAIN_DB_PREFIX."accounting_system"; -$tabname[25]= MAIN_DB_PREFIX."c_revenuestamp"; -$tabname[26]= MAIN_DB_PREFIX."c_type_resource"; +$tabname[23]= MAIN_DB_PREFIX."c_revenuestamp"; +$tabname[24]= MAIN_DB_PREFIX."c_type_resource"; // Dictionary labels $tablib=array(); @@ -125,10 +123,8 @@ $tablib[19]= "DictionaryStaff"; $tablib[20]= "DictionaryOrderMethods"; $tablib[21]= "DictionaryAvailability"; $tablib[22]= "DictionarySource"; -$tablib[23]= "DictionaryAccountancyplan"; -$tablib[24]= "DictionaryAccountancysystem"; -$tablib[25]= "DictionaryRevenueStamp"; -$tablib[26]= "DictionaryResourceType"; +$tablib[23]= "DictionaryRevenueStamp"; +$tablib[24]= "DictionaryResourceType"; // Requests to extract data $tabsql=array(); @@ -154,10 +150,8 @@ $tabsql[19]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREF $tabsql[20]= "SELECT rowid as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_input_method"; $tabsql[21]= "SELECT c.rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_availability AS c"; $tabsql[22]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_input_reason"; -$tabsql[23]= "SELECT rowid as rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number as accountancy_code, account_parent, label, active FROM ".MAIN_DB_PREFIX."accountingaccount"; -$tabsql[24]= "SELECT s.rowid as rowid, pcg_version, s.fk_pays as country_id, c.code as country_code, c.label as country, s.label, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s, ".MAIN_DB_PREFIX."c_country as c WHERE s.fk_pays=c.rowid and c.active=1"; -$tabsql[25]= "SELECT t.rowid, t.taux, c.label as country, c.code as country_code, t.fk_pays as country_id, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_revenuestamp as t, ".MAIN_DB_PREFIX."c_country as c WHERE t.fk_pays=c.rowid"; -$tabsql[26]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_type_resource"; +$tabsql[23]= "SELECT t.rowid, t.taux, c.label as country, c.code as country_code, t.fk_pays as country_id, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_revenuestamp as t, ".MAIN_DB_PREFIX."c_country as c WHERE t.fk_pays=c.rowid"; +$tabsql[24]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_type_resource"; // Criteria to sort dictionaries $tabsqlsort=array(); @@ -183,10 +177,8 @@ $tabsqlsort[19]="id ASC"; $tabsqlsort[20]="code ASC, libelle ASC"; $tabsqlsort[21]="code ASC, label ASC"; $tabsqlsort[22]="code ASC, label ASC"; -$tabsqlsort[23]="fk_pcg_version ASC, accountancy_code ASC"; -$tabsqlsort[24]="pcg_version ASC"; -$tabsqlsort[25]="country ASC, taux ASC"; -$tabsqlsort[26]="code ASC,label ASC"; +$tabsqlsort[23]="country ASC, taux ASC"; +$tabsqlsort[24]="code ASC,label ASC"; // Nom des champs en resultat de select pour affichage du dictionnaire $tabfield=array(); @@ -212,10 +204,8 @@ $tabfield[19]= "code,libelle"; $tabfield[20]= "code,libelle"; $tabfield[21]= "code,label"; $tabfield[22]= "code,label"; -$tabfield[23]= "fk_pcg_version,accountancy_code,account_parent,pcg_type,pcg_subtype,label"; -$tabfield[24]= "pcg_version,country_id,country,label"; -$tabfield[25]= "country_id,country,taux,accountancy_code_sell,accountancy_code_buy,note"; -$tabfield[26]= "code,label"; +$tabfield[23]= "country_id,country,taux,accountancy_code_sell,accountancy_code_buy,note"; +$tabfield[24]= "code,label"; // Nom des champs d'edition pour modification d'un enregistrement $tabfieldvalue=array(); @@ -241,10 +231,8 @@ $tabfieldvalue[19]= "code,libelle"; $tabfieldvalue[20]= "code,libelle"; $tabfieldvalue[21]= "code,label"; $tabfieldvalue[22]= "code,label"; -$tabfieldvalue[23]= "fk_pcg_version,accountancy_code,account_parent,pcg_type,pcg_subtype,label"; -$tabfieldvalue[24]= "pcg_version,country,label"; -$tabfieldvalue[25]= "country,taux,accountancy_code_sell,accountancy_code_buy,note"; -$tabfieldvalue[26]= "code,label"; +$tabfieldvalue[23]= "country,taux,accountancy_code_sell,accountancy_code_buy,note"; +$tabfieldvalue[24]= "code,label"; // Nom des champs dans la table pour insertion d'un enregistrement $tabfieldinsert=array(); @@ -270,10 +258,8 @@ $tabfieldinsert[19]= "code,libelle"; $tabfieldinsert[20]= "code,libelle"; $tabfieldinsert[21]= "code,label"; $tabfieldinsert[22]= "code,label"; -$tabfieldinsert[23]= "fk_pcg_version,account_number,account_parent,pcg_type,pcg_subtype,label"; -$tabfieldinsert[24]= "pcg_version,fk_pays,label"; -$tabfieldinsert[25]= "fk_pays,taux,accountancy_code_sell,accountancy_code_buy,note"; -$tabfieldinsert[26]= "code,label"; +$tabfieldinsert[23]= "fk_pays,taux,accountancy_code_sell,accountancy_code_buy,note"; +$tabfieldinsert[24]= "code,label"; // Nom du rowid si le champ n'est pas de type autoincrement // Example: "" if id field is "rowid" and has autoincrement on @@ -302,9 +288,7 @@ $tabrowid[20]= ""; $tabrowid[21]= "rowid"; $tabrowid[22]= "rowid"; $tabrowid[23]= ""; -$tabrowid[24]= ""; -$tabrowid[25]= ""; -$tabrowid[25]= ""; +$tabrowid[23]= ""; // Condition to show dictionary in setup page $tabcond=array(); @@ -330,10 +314,8 @@ $tabcond[19]= ! empty($conf->societe->enabled); $tabcond[20]= ! empty($conf->fournisseur->enabled); $tabcond[21]= ! empty($conf->propal->enabled); $tabcond[22]= (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled)); -$tabcond[23]= (! empty($conf->global->ACCOUNTING_USEDICTTOEDIT) && ! empty($conf->accounting->enabled)); // The accountancy plan should be edited with specific pages. You can set ACCOUNTING_USEDICTTOEDIT to 1 if you want to use dictionary editor. -$tabcond[24]= (! empty($conf->global->ACCOUNTING_USEDICTTOEDIT) && ! empty($conf->accounting->enabled)); // The accountancy system should be edited with specific pages. You can set ACCOUNTING_USEDICTTOEDIT to 1 if you want to use dictionary editor. -$tabcond[25]= true; -$tabcond[26]= ! empty($conf->resource->enabled); +$tabcond[23]= true; +$tabcond[24]= ! empty($conf->resource->enabled); // List of help for fields $tabhelp=array(); @@ -361,8 +343,6 @@ $tabhelp[21] = array(); $tabhelp[22] = array(); $tabhelp[23] = array(); $tabhelp[24] = array(); -$tabhelp[25] = array(); -$tabhelp[26] = array(); // List of check for fields (NOT USED YET) $tabfieldcheck=array(); @@ -390,8 +370,6 @@ $tabfieldcheck[21] = array(); $tabfieldcheck[22] = array(); $tabfieldcheck[23] = array(); $tabfieldcheck[24] = array(); -$tabfieldcheck[25] = array(); -$tabfieldcheck[26] = array(); // Complete all arrays with entries found into modules complete_dictionary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,$tabfield,$tabfieldvalue,$tabfieldinsert,$tabrowid,$tabcond,$tabhelp,$tabfieldcheck); diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index 7a83486f286..49d137a014f 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -204,20 +204,6 @@ class modAccounting extends DolibarrModules $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) $r ++; - $this->rights[$r][0] = 150002; // Permission id (must not be already used) - $this->rights[$r][1] = 'Administration_module'; // Permission label - $this->rights[$r][3] = 0; // Permission by default for new user (0/1) - $this->rights[$r][4] = 'admin'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) - $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) - $r ++; - - $this->rights[$r][0] = 150010; // Permission id (must not be already used) - $this->rights[$r][1] = 'Développement'; // Permission label - $this->rights[$r][3] = 0; // Permission by default for new user (0/1) - $this->rights[$r][4] = 'dev'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) - $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) - $r ++; - // Main menu entries $this->menus = array (); $r = 0; diff --git a/htdocs/langs/en_US/accounting.lang b/htdocs/langs/en_US/accountancy.lang similarity index 100% rename from htdocs/langs/en_US/accounting.lang rename to htdocs/langs/en_US/accountancy.lang diff --git a/htdocs/langs/es_ES/accounting.lang b/htdocs/langs/es_ES/accountancy.lang similarity index 100% rename from htdocs/langs/es_ES/accounting.lang rename to htdocs/langs/es_ES/accountancy.lang diff --git a/htdocs/langs/fr_FR/accounting.lang b/htdocs/langs/fr_FR/accountancy.lang similarity index 100% rename from htdocs/langs/fr_FR/accounting.lang rename to htdocs/langs/fr_FR/accountancy.lang