diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php index e361a9954c03eaca15b0294505322b137b626364..c957b171e7969673756ed2329cde5fe05786b069 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 "<div class=\"error\">$mesg</div>"; - } - print '<form name="add_payment" action="'.$_SERVER['PHP_SELF'].'" method="post">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="id" value="'.$chid.'">'; @@ -222,12 +217,15 @@ if (GETPOST("action") == 'create') print "</td>\n"; print '</tr>'; - print '<tr>'; - print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>'; - print '<td colspan="2">'; - $form->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$expensereport->accountid, "accountid", 0, '',1); // Show open bank account list - print '</td></tr>'; - + if (! empty($conf->banque->enabled)) + { + print '<tr>'; + print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>'; + print '<td colspan="2">'; + $form->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$expensereport->accountid, "accountid", 0, '',1); // Show open bank account list + print '</td></tr>'; + } + // Number print '<tr><td>'.$langs->trans('Numero'); print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>'; @@ -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 5105a8eef32717e466f7327fa20c51ece3117dfd..40d1326c45e162ce0c847d4fc1b0fdaa2b0ccb69 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 '<div id="blockvmenuhelpapp" class="blockvmenuhelp">'; if ($doliurl) print '<a class="help" target="_blank" href="'.$doliurl.'">'; + else print '<span class="help">'; print $appli; if ($doliurl) print '</a>'; + else print '</span>'; print '</div>'."\n"; // Link to bugtrack diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 72d63b55ff6a079338e278004906489307367a58..76cbad28f00d186a3b34ce0c0e947125e96b0ec0 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1475,7 +1475,7 @@ font.vsmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php p a.vsmenu:link, a.vsmenu:visited { color: #<?php echo $colortextbackvmenu; ?>; white-space: nowrap; } font.vsmenudisabledmargin { margin: 1px 1px 1px 8px; } -a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:<?php print $fontsizesmaller ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #666666; text-decoration: none; } +a.help:link, a.help:visited, a.help:hover, a.help:active, span.help { font-size:<?php print $fontsizesmaller ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; 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 ad9bda1b4ddab9ed4b3c134922be230bf9f9fab4..32c0604386c2995a137a04bb82f3f6c3e75b41c7 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1512,7 +1512,7 @@ font.vsmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php p a.vsmenu:link, a.vsmenu:visited { color: #<?php echo $colortextbackvmenu; ?>; white-space: nowrap; } font.vsmenudisabledmargin { margin: 1px 1px 1px 8px; } -a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:<?php print $fontsizesmaller ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #666666; text-decoration: none; } +a.help:link, a.help:visited, a.help:hover, a.help:active, span.help { font-size:<?php print $fontsizesmaller ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #666666; text-decoration: none; } div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks