diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 7ab48eea70..3ee79b324f 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6020,6 +6020,27 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.09.00.063"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + my $gst_booksellers = $dbh->selectcol_arrayref("SELECT DISTINCT(gstrate) FROM aqbooksellers"); + my $gist_syspref = C4::Context->preference("gist"); + # remove the undef values and construct and array with the syspref and the supplier values + my @gstrates = map { defined $_ ? $_ : () } @$gst_booksellers; + push @gstrates, split ('\|', $gist_syspref); + # we want to compare integer (or float) + $_ = $_ + 0 for @gstrates; + use List::MoreUtils qw/uniq/; + # remove duplicate values + @gstrates = uniq sort @gstrates; + my $new_syspref_value = join '|', @gstrates; + # update the syspref with the new values + my $sth = $dbh->prepare("UPDATE systempreferences set value=? WHERE variable='gist'"); + $sth->execute( $new_syspref_value ); + + print "Upgrade to $DBversion done (Bug 8832, Set the syspref gist with the existing values)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index 96c6fb6a00..5533ebc807 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -451,23 +451,27 @@ $(document).ready(function() [% END %] [% END %] -
  • - [% IF ( close ) %] - Tax rate: - [% gstrate %]% - [% ELSE %] - - [% gstrate %]% + [% ELSE %] + + [% END %] - - [% END %] -
  • + [% ELSE %] + + + [% END %]
  • [% IF ( close ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt index 9cbc169a95..201c08043b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt @@ -156,8 +156,9 @@ if (f.company.value == "") { [% END %]
  • -
      -
    1. + [% IF gst_values %] +
        +
      1. -
      2. -
      +
    2. +
    + [% ELSE %] + + [% END %]
    1. %
    2. diff --git a/kohaversion.pl b/kohaversion.pl index b7798e405f..9c89734b63 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.09.00.062'; + our $VERSION = '3.09.00.063'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install