diff --git a/htdocs/accountancy/admin/subaccount.php b/htdocs/accountancy/admin/subaccount.php index 4f2274269d8..2f6a731ca48 100644 --- a/htdocs/accountancy/admin/subaccount.php +++ b/htdocs/accountancy/admin/subaccount.php @@ -19,17 +19,18 @@ /** * \file htdocs/accountancy/admin/subaccount.php - * \ingroup Accountancy (Double entries) - * \brief List of accounting sub-account (auxiliary accounts) + * \ingroup Accountancy (Double entries) + * \brief List of accounting sub-account (auxiliary accounts) */ // Load Dolibarr environment require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; + // Load translation files required by the page -$langs->loadLangs(array("compta", "bills", "admin", "accountancy", "salaries", "hrm", "errors")); +$langs->loadLangs(array("accountancy", "admin", "bills", "compta", "errors", "hrm", "salaries")); $mesg = ''; $action = GETPOST('action', 'aZ09'); @@ -81,6 +82,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL < 2) { unset($arrayfields['reconcilable']); } + /* * Actions */ @@ -120,11 +122,13 @@ if (empty($reshook)) { $form = new Form($db); -$help_url = ''; -$title = $langs->trans('ChartOfIndividualAccountsOfSubsidiaryLedger'); +// Page Header +$help_url = 'EN:Module_Double_Entry_Accounting#Setup'; +$title = $langs->trans('ChartOfIndividualAccountsOfSubsidiaryLedger'); llxHeader('', $title, $help_url); + // Customer $sql = "SELECT sa.rowid, sa.nom as label, sa.code_compta as subaccount, '1' as type, sa.entity"; $sql .= " FROM ".MAIN_DB_PREFIX."societe sa"; @@ -219,7 +223,7 @@ if (!empty($search_type) && $search_type >= 0) { $sql .= " HAVING type LIKE '".$db->escape($search_type)."'"; } -// User +// User - Employee $sql .= " UNION "; $sql .= " SELECT u.rowid, u.lastname as label, u.accountancy_code as subaccount, '3' as type, u.entity FROM ".MAIN_DB_PREFIX."user u"; $sql .= " WHERE u.entity IN (".getEntity('user').")"; @@ -400,14 +404,17 @@ if ($resql) { if (!empty($arrayfields['type']['checked'])) { print ''; $s = ''; + // Customer if ($obj->type == 1) { $s .= ''.$langs->trans("Customer").''; } elseif ($obj->type == 2) { - // Supplier + + // Supplier $s .= ''.$langs->trans("Supplier").''; } elseif ($obj->type == 3) { - // User + + // User - Employee $s .= ''.$langs->trans("Employee").''; } print $s; @@ -440,14 +447,17 @@ if ($resql) { // Action print ''; $e = ''; + // Customer if ($obj->type == 1) { $e .= ''.img_edit().''; } elseif ($obj->type == 2) { - // Supplier + + // Supplier $e .= ''.img_edit().''; } elseif ($obj->type == 3) { - // User + + // User - Employee $e .= ''.img_edit().''; } print $e;