From 97e1bb871e237a5e1b35a283100578c52d3214b4 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 26 Dec 2015 06:14:02 +0100 Subject: [PATCH 1/2] Accountancy Add a list to select accounting account on salaries admin --- htdocs/admin/salaries.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/salaries.php b/htdocs/admin/salaries.php index 2d32db71af7..2e5b21f5a31 100644 --- a/htdocs/admin/salaries.php +++ b/htdocs/admin/salaries.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2015 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ require '../main.inc.php'; // Class require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php'; $langs->load("admin"); $langs->load("salaries"); @@ -75,6 +76,7 @@ if ($action == 'update') llxHeader('',$langs->trans('SalariesSetup')); $form = new Form($db); +if (! empty($conf->accounting->enabled)) $formaccountancy = New FormVentilation($db); $linkback=''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans('SalariesSetup'),$linkback,'title_setup'); @@ -105,7 +107,14 @@ foreach ($list as $key) // Value print ''; - print ''; + if (! empty($conf->accounting->enabled)) + { + print $formaccountancy->select_account($conf->global->$key, $key, 1, '', 1, 1); + } + else + { + print ''; + } print ''; } From f514c65ff79c8f0b7fb3762136d69b4c57445210 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 26 Dec 2015 06:41:03 +0100 Subject: [PATCH 2/2] Modify a style center --- htdocs/admin/salaries.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/salaries.php b/htdocs/admin/salaries.php index 2e5b21f5a31..b09f4820312 100644 --- a/htdocs/admin/salaries.php +++ b/htdocs/admin/salaries.php @@ -124,7 +124,7 @@ print "\n"; dol_fiche_end(); -print '
'; +print '
'; print '';