Bug 19593 Basketcount correction on Bookseller.pm
authorGwendal Joncour <gwendal.joncour@univ-rennes2.fr>
Wed, 8 Nov 2017 11:21:58 +0000 (12:21 +0100)
committerChris Cormack <chrisc@catalyst.net.nz>
Mon, 18 Dec 2017 02:43:51 +0000 (15:43 +1300)
To test:
1/ go to /cgi-bin/koha/acqui/booksellers.pl or
/cgi-bin/koha/acqui/supplier.pl
2/ Note that it displays the delete vendor button instead of the
receive shipments button
3/ Apply patch
4/ Reload the page and notice the button is fixed

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Koha/Acquisition/Bookseller.pm

index 57a6113..326be54 100644 (file)
@@ -24,6 +24,8 @@ sub fetch {
     return unless $bookseller;
 
     my $self = $class->new( $bookseller );
+    $self->{'basketcount'} = $self->basket_count;
+    $self->{'subscriptioncount'} = $self->subscription_count;
     $self->contacts; # TODO: This should be generated on demand.
     return $self;
 }