From c652d5b02d385940511e424283dad7564719a706 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 23 Apr 2016 16:06:33 +0200 Subject: [PATCH] NEW: Loan - Add list to select accounting account in admin --- htdocs/admin/loan.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php index 1cc55bd5a36..3213503835d 100644 --- a/htdocs/admin/loan.php +++ b/htdocs/admin/loan.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2016 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("loan"); @@ -76,6 +77,7 @@ if ($action == 'update') llxHeader(); $form = new Form($db); +if (! empty($conf->accounting->enabled)) $formaccountancy = New FormVentilation($db); $linkback=''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans('ConfigLoan'),$linkback,'title_setup'); @@ -104,7 +106,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 ''; }