From b0a75da2ac62ca0fd34fd665d8c46ba4a0426bb8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 21 Mar 2017 17:50:52 +0100 Subject: [PATCH] Fix css --- htdocs/expensereport/card.php | 59 +++++------------------------------ 1 file changed, 8 insertions(+), 51 deletions(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 6061250bfbd..4c28fe0281c 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1217,53 +1217,10 @@ if (empty($reshook)) } } - - /* - * Generate or regenerate the PDF document - */ - if ($action == 'builddoc') // GET or POST - { - $depl = new ExpenseReport($db, 0, $_GET['id']); - $depl->fetch($id); - - if ($_REQUEST['model']) - { - $depl->setDocModel($user, $_REQUEST['model']); - } - - $outputlangs = $langs; - if (! empty($_REQUEST['lang_id'])) - { - $outputlangs = new Translate("",$conf); - $outputlangs->setDefaultLang($_REQUEST['lang_id']); - } - $result=expensereport_pdf_create($db, $depl, '', $depl->modelpdf, $outputlangs); - if ($result <= 0) - { - setEventMessages($object->error, $object->errors, 'errors'); - $action=''; - } - } - - // Remove file in doc form - else if ($action == 'remove_file') - { - $object = new ExpenseReport($db, 0, $_GET['id']); - if ($object->fetch($id)) - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - - $object->fetch_thirdparty(); - - $langs->load("other"); - $upload_dir = $conf->expensereport->dir_output; - $file = $upload_dir . '/' . GETPOST('file'); - $ret=dol_delete_file($file,0,0,0,$object); - if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); - $action=''; - } - } + // Actions to build doc + $upload_dir = $conf->expensereport->dir_output; + $permissioncreate = $user->rights->expensereport->creer; + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } @@ -1352,8 +1309,8 @@ if ($action == 'create') // Public note print ''; - print '' . $langs->trans('NotePublic') . ''; - print ''; + print '' . $langs->trans('NotePublic') . ''; + print ''; $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); @@ -1362,8 +1319,8 @@ if ($action == 'create') // Private note if (empty($user->societe_id)) { print ''; - print '' . $langs->trans('NotePrivate') . ''; - print ''; + print '' . $langs->trans('NotePrivate') . ''; + print ''; $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1);