Bugzilla – Attachment 73290 Details for
Bug 19479
Price display on a basketgroup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Attempt to display price formatted according to CurrencyFormat syspref using templates, with the English template as an example.
Attempt-to-display-price-formatted-according-to-Cu.patch (text/plain), 4.11 KB, created by
Jon Knight
on 2018-03-26 18:09:39 UTC
(
hide
)
Description:
Attempt to display price formatted according to CurrencyFormat syspref using templates, with the English template as an example.
Filename:
MIME Type:
Creator:
Jon Knight
Created:
2018-03-26 18:09:39 UTC
Size:
4.11 KB
patch
obsolete
>From 777088384ae50332ec431c39d2c3bbd83316c53b Mon Sep 17 00:00:00 2001 >From: Jon Knight <J.P.Knight@lboro.ac.uk> >Date: Mon, 26 Mar 2018 18:08:01 +0000 >Subject: [PATCH] Attempt to display price formatted according to > CurrencyFormat syspref using templates, with the English template as an > example. > > https://bugs.koha-community.org/show_bug.cgi?id=19479 >--- > acqui/basketgroup.pl | 6 +++++- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt | 5 +++-- > 2 files changed, 8 insertions(+), 3 deletions(-) > >diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl >index 8c0e4c4..1f195cb 100755 >--- a/acqui/basketgroup.pl >+++ b/acqui/basketgroup.pl >@@ -82,7 +82,7 @@ sub BasketTotal { > $total = $total + ( $order->{ecost_tax_excluded} * $order->{quantity} ); > } > } >- $total .= " " . ($bookseller->invoiceprice // 0); >+# $total .= " " . ($bookseller->invoiceprice // 0); > return $total; > } > >@@ -97,6 +97,8 @@ sub displaybasketgroups { > my $basketsqty = 0; > while($i < scalar(@$baskets)){ > my $basket = @$baskets[$i]; >+ my $active_currency = Koha::Acquisition::Currencies->get_active; >+ $basket->{currency} = $active_currency->currency; > if($basket->{'basketgroupid'} && $basket->{'basketgroupid'} == $basketgroup->{'id'}){ > $basket->{total} = BasketTotal($basket->{basketno}, $bookseller); > push(@{$basketgroup->{'baskets'}}, $basket); >@@ -254,6 +256,8 @@ if ( $op eq "add" ) { > my $selecteds = GetBasketsByBasketgroup($basketgroupid); > foreach my $basket(@{$selecteds}){ > $basket->{total} = BasketTotal($basket->{basketno}, $bookseller); >+ my $active_currency = Koha::Acquisition::Currencies->get_active; >+ $basket->{currency} = $active_currency->currency; > } > $template->param(basketgroupid => $basketgroupid, > selectedbaskets => $selecteds); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >index df6f723..8deacb4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >@@ -1,4 +1,5 @@ > [% USE Branches %] >+[% USE Price %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Basket grouping for [% booksellername |html %]</title> > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" /> >@@ -173,7 +174,7 @@ function submitForm(form) { > No name, basketnumber: [% basket.basketno %] > [% END %] > </a>, <br /> >- Total: [% basket.total %] >+ Total: [% basket.total | $Price %] ([% basket.currency %]) > <input type="hidden" class="basket" name="basket" value="[% basket.basketno %]" /> > </li> > [% END %] >@@ -259,7 +260,7 @@ function submitForm(form) { > No name, basketnumber: [% selectedbasket.basketno %] > [% END %] > </a>, <br /> >- Total: [% selectedbasket.total %] >+ Total: [% selectedbasket.total | $Price %] ([% selectedbasket.currency %]) > <input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno %]" /> > </li> > [% END %] >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19479
:
68276
|
68849
|
68972
|
71312
|
71313
|
73290
|
73291
|
73376
|
73377
|
73379
|
73491
|
73677
|
74274
|
74284
|
74739