|
@@ -1,7 +1,7 @@
|
|
|
<?php
|
|
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
|
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
|
|
- * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
|
|
+ * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
|
|
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
|
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
|
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
|
@@ -132,6 +132,18 @@ if ($action == 'setdisabledirectinput') {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+if ($action == 'setenabledraftexport') {
|
|
|
+ $setenabledraftexport = GETPOST('value', 'int');
|
|
|
+ $res = dolibarr_set_const($db, "ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL", $setenabledraftexport, 'yesno', 0, '', $conf->entity);
|
|
|
+ if (! $res > 0)
|
|
|
+ $error ++;
|
|
|
+ if (! $error) {
|
|
|
+ setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
|
|
+ } else {
|
|
|
+ setEventMessages($langs->trans("Error"), null, 'mesgs');
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* View
|
|
|
*/
|
|
@@ -213,6 +225,19 @@ if (! empty($user->admin))
|
|
|
}
|
|
|
print '</tr>';
|
|
|
|
|
|
+ print '<tr class="oddeven">';
|
|
|
+ print '<td>' . $langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL") . '</td>';
|
|
|
+ if (! empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) {
|
|
|
+ print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setenabledraftexport&value=0">';
|
|
|
+ print img_picto($langs->trans("Activated"), 'switch_on');
|
|
|
+ print '</a></td>';
|
|
|
+ } else {
|
|
|
+ print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setenabledraftexport&value=1">';
|
|
|
+ print img_picto($langs->trans("Disabled"), 'switch_off');
|
|
|
+ print '</a></td>';
|
|
|
+ }
|
|
|
+ print '</tr>';
|
|
|
+
|
|
|
print '<tr class="oddeven">';
|
|
|
print '<td>' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
|
|
|
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
|