Browse Source

Bug 15049: Add warning about "No active currency" to Acquisitions start page

If no active currency is defined, Acquisitions does not work properly and software
can occur while receiving.
This patch adds the warning message about missing active currency to Home > Acquisitions

To test:
- Apply patch
- Go to Home > Administration > Currencies & Exchange Rates > Currencies
- Make sure that no active currency is set
- Go to Home > Acquisitions
- Verify that a warning displays:
  - If user has at least permission for parameters_remaining_perissions,
    the warning should display a link to Currencies and exchange rates (currency.pl)
  - If the user has no permission to edit the Currencies and exchange rates,
    no link is displayed.
- Set an active currency
- Veryfy that the warning no longer displays

(Amended to remove superfluous line / mv)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No errors

Signed-off-by: JM Broust <jean-manuel.broust@univ-lyon2.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
new_12478_elasticsearch
Marc Véron 9 years ago
committed by Brendan A Gallagher
parent
commit
9d2e268739
  1. 7
      acqui/acqui-home.pl
  2. 2
      koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc
  3. 1
      koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt

7
acqui/acqui-home.pl

@ -129,4 +129,11 @@ $template->param(
suggestions_count => $suggestions_count,
);
my $cur = GetCurrency();
if ( $cur ) {
$template->param(
currency => $cur->{currency},
);
}
output_html_with_http_headers $query, $cookie, $template->output;

2
koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc

@ -1 +1 @@
[% IF ( currency ) %]<p><b>Currency = [% currency %]</b></p>[% ELSE %]<div class="dialog alert"><h3>No active currency is defined</h3><p>Please <a href="/cgi-bin/koha/admin/currency.pl">specify an active currency</a>.</p></div>[% END %]
[% IF ( currency ) %]<p><b>Currency = [% currency %]</b></p>[% ELSE %]<div class="dialog alert"><h3>No active currency is defined</h3><p>[% IF CAN_user_parameters_parameters_remaining_permissions %]Please <a href="/cgi-bin/koha/admin/currency.pl">specify an active currency</a>.[% ELSE %]Your administrator must specify an active currency.[% END %]</p></div>[% END %]

1
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt

@ -98,6 +98,7 @@ $(document).ready(function() {
[% INCLUDE 'acquisitions-toolbar.inc' %]
<h1>Acquisitions</h1>
[% INCLUDE 'budgets-active-currency.inc' %]
[% UNLESS ( loop_budget ) %]
[% IF ( CAN_user_acquisition_period_manage ) %]
<div class="dialog alert">You must <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">define a budget</a> in Administration</div>

Loading…
Cancel
Save