diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php index e361a9954c0..c957b171e79 100644 --- a/htdocs/expensereport/payment/payment.php +++ b/htdocs/expensereport/payment/payment.php @@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class. require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->load("bills"); +$langs->load("banks"); $chid=GETPOST("id"); $action=GETPOST('action'); @@ -62,22 +63,22 @@ if ($action == 'add_payment') $datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); - if (! $_POST["fk_typepayment"] > 0) + if (! ($_POST["fk_typepayment"] > 0)) { - $mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("PaymentMode")); + setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentities("PaymentMode")), null, 'errors'); $error++; } if ($datepaid == '') { - $mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("Date")); + setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentities("Date")), null, 'errors'); $error++; } - if (! empty($conf->banque->enabled) && ! $accountid > 0) + if (! empty($conf->banque->enabled) && ! ($accountid > 0)) { - $mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountToCredit")); + setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountToDebit")), null, 'errors'); $error++; } - + if (! $error) { $paymentid = 0; @@ -163,7 +164,6 @@ $form=new Form($db); // Form to create expense report payment if (GETPOST("action") == 'create') { - $expensereport = new ExpenseReport($db); $expensereport->fetch($chid); @@ -171,11 +171,6 @@ if (GETPOST("action") == 'create') print load_fiche_titre($langs->trans("DoPayment")); - if ($mesg) - { - print "
$mesg
"; - } - print '
'; print ''; print ''; @@ -222,12 +217,15 @@ if (GETPOST("action") == 'create') print "\n"; print ''; - print ''; - print ''.$langs->trans('AccountToDebit').''; - print ''; - $form->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$expensereport->accountid, "accountid", 0, '',1); // Show open bank account list - print ''; - + if (! empty($conf->banque->enabled)) + { + print ''; + print ''.$langs->trans('AccountToDebit').''; + print ''; + $form->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$expensereport->accountid, "accountid", 0, '',1); // Show open bank account list + print ''; + } + // Number print ''.$langs->trans('Numero'); print ' ('.$langs->trans("ChequeOrTransferNumber").')'; @@ -243,9 +241,7 @@ if (GETPOST("action") == 'create') dol_fiche_end(); - /* - * Autres charges impayees - */ + // List of expenses ereport not already paid completely $num = 1; $i = 0; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 5105a8eef32..40d1326c45e 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1700,8 +1700,10 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra else $appli.=" ".DOL_VERSION; print '
'; if ($doliurl) print ''; + else print ''; print $appli; if ($doliurl) print ''; + else print ''; print '
'."\n"; // Link to bugtrack diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 72d63b55ff6..76cbad28f00 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1475,7 +1475,7 @@ font.vsmenudisabled { font-size:px; font-family: ; white-space: nowrap; } font.vsmenudisabledmargin { margin: 1px 1px 1px 8px; } -a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:px; font-family: ; text-align: ; font-weight: normal; color: #666666; text-decoration: none; } +a.help:link, a.help:visited, a.help:hover, a.help:active, span.help { font-size:px; font-family: ; text-align: ; font-weight: normal; color: #666666; text-decoration: none; } .vmenu div.blockvmenufirst, .vmenu div.blockvmenulogo, .vmenu div.blockvmenusearchphone, .vmenu div.blockvmenubookmarks { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index ad9bda1b4dd..32c0604386c 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1512,7 +1512,7 @@ font.vsmenudisabled { font-size:px; font-family: ; white-space: nowrap; } font.vsmenudisabledmargin { margin: 1px 1px 1px 8px; } -a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:px; font-family: ; text-align: ; font-weight: normal; color: #666666; text-decoration: none; } +a.help:link, a.help:visited, a.help:hover, a.help:active, span.help { font-size:px; font-family: ; text-align: ; font-weight: normal; color: #666666; text-decoration: none; } div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks