View | Details | Raw Unified | Return to bug 19479
Collapse All | Expand All

(-)a/acqui/basketgroup.pl (-1 / +4 lines)
Lines 82-88 sub BasketTotal { Link Here
82
            $total = $total + ( $order->{ecost_tax_excluded} * $order->{quantity} );
82
            $total = $total + ( $order->{ecost_tax_excluded} * $order->{quantity} );
83
        }
83
        }
84
    }
84
    }
85
    $total .= " " . ($bookseller->invoiceprice // 0);
86
    return $total;
85
    return $total;
87
}
86
}
88
87
Lines 97-102 sub displaybasketgroups { Link Here
97
            my $basketsqty = 0;
96
            my $basketsqty = 0;
98
            while($i < scalar(@$baskets)){
97
            while($i < scalar(@$baskets)){
99
                my $basket = @$baskets[$i];
98
                my $basket = @$baskets[$i];
99
		my $active_currency = Koha::Acquisition::Currencies->get_active;
100
		$basket->{currency} = $active_currency->currency;
100
                if($basket->{'basketgroupid'} && $basket->{'basketgroupid'} == $basketgroup->{'id'}){
101
                if($basket->{'basketgroupid'} && $basket->{'basketgroupid'} == $basketgroup->{'id'}){
101
                    $basket->{total} = BasketTotal($basket->{basketno}, $bookseller);
102
                    $basket->{total} = BasketTotal($basket->{basketno}, $bookseller);
102
                    push(@{$basketgroup->{'baskets'}}, $basket);
103
                    push(@{$basketgroup->{'baskets'}}, $basket);
Lines 254-259 if ( $op eq "add" ) { Link Here
254
        my $selecteds = GetBasketsByBasketgroup($basketgroupid);
255
        my $selecteds = GetBasketsByBasketgroup($basketgroupid);
255
        foreach my $basket(@{$selecteds}){
256
        foreach my $basket(@{$selecteds}){
256
            $basket->{total} = BasketTotal($basket->{basketno}, $bookseller);
257
            $basket->{total} = BasketTotal($basket->{basketno}, $bookseller);
258
	    my $active_currency = Koha::Acquisition::Currencies->get_active;
259
	    $basket->{currency} = $active_currency->currency;
257
        }
260
        }
258
        $template->param(basketgroupid => $basketgroupid,
261
        $template->param(basketgroupid => $basketgroupid,
259
                         selectedbaskets => $selecteds);
262
                         selectedbaskets => $selecteds);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt (-3 / +3 lines)
Lines 1-5 Link Here
1
[% USE Asset %]
1
[% USE Asset %]
2
[% USE Branches %]
2
[% USE Branches %]
3
[% USE Price %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Basket grouping for [% booksellername |html %]</title>
5
<title>Koha &rsaquo; Basket grouping for [% booksellername |html %]</title>
5
[% Asset.css("css/datatables.css") %]
6
[% Asset.css("css/datatables.css") %]
Lines 174-180 function submitForm(form) { Link Here
174
                                                                        No name, basketnumber: [% basket.basketno %]
175
                                                                        No name, basketnumber: [% basket.basketno %]
175
                                                                    [% END %]
176
                                                                    [% END %]
176
                                                                </a>, <br />
177
                                                                </a>, <br />
177
                                                                Total: [% basket.total %]
178
                                                                Total: [% basket.total | $Price %]
178
                                                                <input type="hidden" class="basket" name="basket" value="[% basket.basketno %]" />
179
                                                                <input type="hidden" class="basket" name="basket" value="[% basket.basketno %]" />
179
                                                            </li>
180
                                                            </li>
180
                                                        [% END %]
181
                                                        [% END %]
Lines 260-266 function submitForm(form) { Link Here
260
                                                                No name, basketnumber: [% selectedbasket.basketno %]
261
                                                                No name, basketnumber: [% selectedbasket.basketno %]
261
                                                            [% END %]
262
                                                            [% END %]
262
                                                        </a>, <br />
263
                                                        </a>, <br />
263
                                                        Total: [% selectedbasket.total %]
264
                                                        Total: [% selectedbasket.total | $Price %]
264
                                                        <input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno %]" />
265
                                                        <input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno %]" />
265
                                                    </li>
266
                                                    </li>
266
                                                [% END %]
267
                                                [% END %]
267
- 

Return to bug 19479