Bug 11122 - publisher code and publication year not fetched in acq orders
In acquisition, several templates try to display publisher code and publication year : invoice.tt, parcel.tt, transferorder.tt.
Thoses pages use C4::Acquisition methods GetPendingOrders or GetInvoiceDetails.
The bug is that in the SQL query of those methods, biblioitems.publishercode and biblioitems.publicationyear.
In uncertainprice.pl those datas are fetch using GetBiblioData.
It whould be better to fetch them in GetPendingOrders and GetInvoiceDetails.
This patch changes SQL queries to fetch wanted datas : aqorders.*,biblio.title,biblio.author,biblioitems.isbn,biblioitems.publishercode,biblioitems.publicationyear. GetInvoiceDetails also needs : biblio.seriestitle,biblioitems.volume.
This patch also unifies the way biblio datas are displayed :
<a href="link to catalog using biblionumber">[title]</a> <em>by</em> [author] – [isbn]
<em>Publisher:</em> [publishercode], [publicationyear]
Test plan :
- Choose a biblio record containing a data in :
biblio.title,
biblio.author,
biblioitems.isbn,
biblioitems.publishercode,
biblioitems.publicationyear,
biblio.seriestitle,
biblioitems.volume.
- Create an order using this biblio.
- Look at this order in pages : parcel.pl, transferorder.pl, uncertainprice.pl
=> You see publisher code and publication year
- Look at this order in page : invoice.pl
=> You see publisher code, publication year, series title and volume
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c59e395b74)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
ad741d2512
commit
44a80fe066
|
|
@ -1706,6 +1706,8 @@ sub SearchOrders {
|
|||
biblio.*,
|
||||
biblioitems.isbn,
|
||||
biblioitems.biblioitemnumber,
|
||||
biblioitems.publishercode,
|
||||
biblioitems.publicationyear,
|
||||
aqbasket.authorisedby,
|
||||
aqbasket.booksellerid,
|
||||
aqbasket.closedate,
|
||||
|
|
@ -2617,6 +2619,7 @@ sub GetInvoiceDetails {
|
|||
SELECT aqorders.*,
|
||||
biblio.*,
|
||||
biblio.copyrightdate,
|
||||
biblioitems.isbn,
|
||||
biblioitems.publishercode,
|
||||
biblioitems.publicationyear,
|
||||
aqbasket.basketname,
|
||||
|
|
|
|||
|
|
@ -79,24 +79,8 @@ my $pendingorders = SearchOrders({
|
|||
basketno => $basketno,
|
||||
pending => 1,
|
||||
});
|
||||
my @orders;
|
||||
my @orders = grep { $_->{'uncertainprice'} } @$pendingorders;
|
||||
|
||||
foreach my $order (@{$pendingorders}) {
|
||||
if ( $order->{'uncertainprice'} ) {
|
||||
my $bibdata = &GetBiblioData($order->{'biblionumber'});
|
||||
$order->{'bibisbn'} = $bibdata->{'isbn'};
|
||||
$order->{'bibpublishercode'} = $bibdata->{'publishercode'};
|
||||
$order->{'bibpublicationyear'} = $bibdata->{'publicationyear'};
|
||||
$order->{'bibtitle'} = $bibdata->{'title'};
|
||||
$order->{'bibauthor'} = $bibdata->{'author'};
|
||||
$order->{'surname'} = $order->{'surname'};
|
||||
$order->{'firstname'} = $order->{'firstname'};
|
||||
my $order_as_from_db=GetOrder($order->{ordernumber});
|
||||
$order->{'quantity'} = $order_as_from_db->{'quantity'};
|
||||
$order->{'listprice'} = $order_as_from_db->{'listprice'};
|
||||
push(@orders, $order);
|
||||
}
|
||||
}
|
||||
if ( $op eq 'validate' ) {
|
||||
$template->param( validate => 1);
|
||||
my $count = scalar(@orders);
|
||||
|
|
|
|||
|
|
@ -157,13 +157,14 @@
|
|||
<tr>
|
||||
<td>
|
||||
[% IF order.biblionumber %]
|
||||
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title %]</a>
|
||||
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title |html %]</a>
|
||||
[% IF ( order.author ) %]
|
||||
<br /><em>by</em> [% order.author %]
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
<em>Deleted bibliographic record, can't find title</em>
|
||||
[% END %]
|
||||
[% IF ( order.isbn ) %] – [% order.isbn %][% END %]
|
||||
[% IF ( order.publishercode ) %]
|
||||
<br/>[% order.publishercode %]
|
||||
[% IF order.publicationyear > 0 %]
|
||||
|
|
|
|||
|
|
@ -270,7 +270,10 @@
|
|||
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loop_order.biblionumber %]">[% loop_order.title |html %]</a>
|
||||
[% IF ( loop_order.author ) %] by [% loop_order.author %][% END %]
|
||||
[% IF ( loop_order.isbn ) %] – [% loop_order.isbn %][% END %]
|
||||
[% IF ( loop_order.publishercode ) %]<br />Publisher:[% loop_order.publishercode %][% END %]
|
||||
[% IF ( loop_order.publishercode ) %]
|
||||
<br />Publisher: [% loop_order.publishercode %]
|
||||
[%- IF ( loop_order.publicationyear ) %], [% loop_order.publicationyear %][% END %]
|
||||
[% END %]
|
||||
[% IF ( loop_order.suggestionid ) %]
|
||||
<br/>
|
||||
Suggested by: [% loop_order.surnamesuggestedby %][% IF ( loop_order.firstnamesuggestedby ) %], [% loop_order.firstnamesuggestedby %] [% END %]
|
||||
|
|
@ -417,7 +420,10 @@
|
|||
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title |html %]</a>
|
||||
[% IF ( order.author ) %] / [% order.author %][% END %]
|
||||
[% IF ( order.isbn ) %] - [% order.isbn %][% END %]
|
||||
[% IF ( order.publishercode ) %]<br />Publisher :[% order.publishercode %][% END %]
|
||||
[% IF ( order.publishercode ) %]
|
||||
<br />Publisher: [% order.publishercode %]
|
||||
[%- IF ( order.publicationyear ) %], [% order.publicationyear %][% END %]
|
||||
[% END %]
|
||||
[% IF ( order.suggestionid ) %]
|
||||
<br/>
|
||||
Suggested by: [% order.surnamesuggestedby %][% IF ( order.firstnamesuggestedby ) %], [% order.firstnamesuggestedby %] [% END %]
|
||||
|
|
|
|||
|
|
@ -103,7 +103,10 @@
|
|||
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% ordersloo.biblionumber %]">[% ordersloo.title |html %]</a>
|
||||
[% IF ( ordersloo.author ) %] by [% ordersloo.author %][% END %]
|
||||
[% IF ( ordersloo.isbn ) %] – [% ordersloo.isbn %][% END %]
|
||||
[% IF ( ordersloo.publishercode ) %]<br />Publisher :[% ordersloo.publishercode %][% END %]
|
||||
[% IF ( ordersloo.publishercode ) %]
|
||||
<br />Publisher: [% ordersloo.publishercode %]
|
||||
[%- IF ( ordersloo.publicationyear ) %], [% ordersloo.publicationyear %][% END %]
|
||||
[% END %]
|
||||
</td>
|
||||
<td><a class="btn btn-default btn-xs" href="transferorder.pl?bookselleridfrom=[% ordersloo.bookselleridfrom %]&ordernumber=[% ordersloo.ordernumber %]">Transfer</a></td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -108,11 +108,18 @@ var MSG_INVALIDPRICE = _("ERROR: Price is not a valid number, please check the p
|
|||
[% uncertainpriceorder.basketname %]
|
||||
</td>
|
||||
<td>
|
||||
[% uncertainpriceorder.bibtitle %] / [% uncertainpriceorder.bibauthor %] <br /> [% uncertainpriceorder.bibpublishercode %], [% uncertainpriceorder.bibpublicationyear %]<br />[% uncertainpriceorder.bibisbn %]<br />
|
||||
<a href="neworderempty.pl?ordernumber=[% uncertainpriceorder.ordernumber %]&booksellerid=[% booksellerid %]&basketno=[% uncertainpriceorder.basketno %]">
|
||||
edit
|
||||
</a>
|
||||
</td>
|
||||
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% uncertainpriceorder.biblionumber %]">[% uncertainpriceorder.title |html %]</a>
|
||||
[% IF ( uncertainpriceorder.author ) %] <em>by</em> [% uncertainpriceorder.author %][% END %]
|
||||
[% IF ( uncertainpriceorder.publishercode ) %]
|
||||
<br /><em>Publisher:</em> [% uncertainpriceorder.publishercode %]
|
||||
[%- IF ( uncertainpriceorder.publicationyear ) %], [% uncertainpriceorder.publicationyear %][% END %]
|
||||
[% END %]
|
||||
[% IF ( uncertainpriceorder.isbn ) %]<br />[% uncertainpriceorder.isbn %][% END %]
|
||||
<br />
|
||||
<a href="neworderempty.pl?ordernumber=[% uncertainpriceorder.ordernumber %]&booksellerid=[% booksellerid %]&basketno=[% uncertainpriceorder.basketno %]">
|
||||
Edit
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
[% uncertainpriceorder.firstname %] [% uncertainpriceorder.surname %]
|
||||
</td>
|
||||
|
|
|
|||
Loading…
Reference in New Issue