Bugzilla – Attachment 7767 Details for
Bug 7235
Adding invoice number and vendor name to the moredetail page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7235: Add order date and checks for permissions
Bug-7235-Add-order-date-and-checks-for-permissions.patch (text/plain), 8.93 KB, created by
Katrin Fischer
on 2012-02-20 06:21:57 UTC
(
hide
)
Description:
Bug 7235: Add order date and checks for permissions
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2012-02-20 06:21:57 UTC
Size:
8.93 KB
patch
obsolete
>From f0ccad49cfe111e0c9996d12cc1ec5f3966114ee Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Mon, 20 Feb 2012 00:12:13 +0100 >Subject: [PATCH] Bug 7235: Add order date and checks for permissions > >- Adds order date in above vendor >- Reordered fields to reflect history of the item >- Order information (order date, vendor) is only shown, when an order exists >- Accession date is only linked, when item was received in acquisition >- Links to basket and invoice are only shown when user has the correct permission > - order date: manage_order > - accession date: receive_shipment for invoice >- Changes all dates to use the KohaDates TT plugin >- Corrects display of rental price, removing additional zeros > >To test: >1) Create a record with >- 1 item created in cataloguing >- 1 item ordered >- 1 item ordered and received >2) Verify the correct information is shown for each >3) Verify links from the dates work correctly >4) Toggle permissions for the user >--- > catalogue/moredetail.pl | 6 +- > .../prog/en/modules/catalogue/moredetail.tt | 58 +++++++++++--------- > 2 files changed, 34 insertions(+), 30 deletions(-) > >diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl >index d75e36f..bc5e221 100755 >--- a/catalogue/moredetail.pl >+++ b/catalogue/moredetail.pl >@@ -31,7 +31,6 @@ use C4::Bookseller qw(GetBookSellerFromId); > use C4::Output; # contains gettemplate > use C4::Auth; > use C4::Serials; >-use C4::Dates qw/format_date/; > use C4::Circulation; # to use itemissues > use C4::Members; # to use GetMember > use C4::Search; # enabled_staff_search_views >@@ -120,7 +119,7 @@ my $ccodes= GetKohaAuthorisedValues('items.ccode',$fw); > my $itemtypes = GetItemTypes; > > $data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'}; >- >+$data->{'rentalcharge'} = sprintf( "%.2f", $data->{'rentalcharge'} ); > foreach ( keys %{$data} ) { > $template->param( "$_" => defined $data->{$_} ? $data->{$_} : '' ); > } >@@ -132,7 +131,7 @@ foreach my $item (@items){ > $item->{'collection'} = $ccodes->{ $item->{ccode} } if ($ccodes); > $item->{'itype'} = $itemtypes->{ $item->{'itype'} }->{'description'}; > $item->{'replacementprice'} = sprintf( "%.2f", $item->{'replacementprice'} ); >- $item->{$_} = format_date( $item->{$_} ) foreach qw/datelastborrowed dateaccessioned datelastseen lastreneweddate/; >+ $item->{$_} = qw/datelastborrowed dateaccessioned datelastseen lastreneweddate/; > $item->{'copyvol'} = $item->{'copynumber'}; > > >@@ -148,6 +147,7 @@ foreach my $item (@items){ > $item->{'ordernumber'} = $order->{'ordernumber'}; > $item->{'basketno'} = $order->{'basketno'}; > $item->{'booksellerinvoicenumber'} = $order->{'booksellerinvoicenumber'}; >+ $item->{'orderdate'} = $order->{'entrydate'}; > if ($item->{'basketno'}){ > my $basket = GetBasket($item->{'basketno'}); > my $bookseller = GetBookSellerFromId($basket->{'booksellerid'}); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >index e9cbe74..2a64779 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -4,7 +4,7 @@ > <style type="text/css">h3{padding-top: 1em; border-top: 2px solid #CCCCCC;}</style> > </head> > <body> >- >+[% USE KohaDates %] > [% INCLUDE 'header.inc' %] > [% INCLUDE 'cat-search.inc' %] > >@@ -153,51 +153,55 @@ > <div class="listgroup"><h4>History</h4> > <ol class="bibliodetails"> > >- <li><span class="label"> >- [% IF ( CAN_user_editcatalogue_edit_catalogue ) %] >- >- Accession Date:</span> >- [% IF ( ITEM_DAT.basketno ) %] >- <a href="/cgi-bin/koha/acqui/parcel.pl?supplierid=[% ITEM_DAT.booksellerid %]&invoice=[% ITEM_DAT.booksellerinvoicenumber %]&datereceived=[% ITEM_DAT.datereceived %]">[% ITEM_DAT.dateaccessioned %]</a> >+ [% IF ITEM_DAT.basketno %] >+ <li><span class="label">Order date:</span> >+ [% IF ( CAN_user_acquisition_order_manage ) %] >+ <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% ITEM_DAT.basketno %]">[% ITEM_DAT.orderdate | $KohaDates %]</a> > [% ELSE %] >- [% ITEM_DAT.dateaccessioned %] >+ [% ITEM_DAT.orderdate | $KohaDates %] > [% END %] >- [% ELSE %] >- [% ITEM_DAT.dateaccessioned %] >- [% END %] >+ </li> >+ <li><span class="label">Vendor:</span> >+ [% ITEM_DAT.vendor %] > </li> >- [% IF ITEM_DAT.vendor %] >- <li><span class="label">Vendor</span> >- [% ITEM_DAT.vendor %] >+ [% END %] >+ >+ [% IF ITEM_DAT.dateaccessioned %] >+ <li><span class="label">Accession date:</span> >+ [% IF ( CAN_user_acquisition_order_receive && ITEM_DAT.booksellerinvoicenumber ) %] >+ <a href="/cgi-bin/koha/acqui/parcel.pl?supplierid=[% ITEM_DAT.booksellerid %]&invoice=[% ITEM_DAT.booksellerinvoicenumber %]&datereceived=[% ITEM_DAT.datereceived %]">[% ITEM_DAT.dateaccessioned | $KohaDates %]</a> >+ [% ELSE %] >+ [% ITEM_DAT.dateaccessioned | $KohaDates %] >+ [% END %] > </li> >- [% IF ITEM_DAT.booksellerinvoicenumber %] >- <li><span class="label">Invoice number</span> >- [% ITEM_DAT.booksellerinvoicenumber %] >+ [% END %] >+ [% IF ( ITEM_DAT.booksellerinvoicenumber ) %] >+ <li><span class="label">Invoice number:</span> >+ [% ITEM_DAT.booksellerinvoicenumber %] > </li> >- [% END %] >- [% END %] >- >+ [% END %] >+ > <li><span class="label">Total Checkouts:</span>[% IF ( ITEM_DAT.issues ) %][% ITEM_DAT.issues %][% ELSE %]0[% END %] (<a href="/cgi-bin/koha/circ/bookcount.pl?&biblionumber=[% ITEM_DAT.biblionumber %]&bi=[% ITEM_DAT.biblioitemnumber %]&itm=[% ITEM_DAT.itemnumber %]">View item's checkout history</a>)</li> > >- <li><span class="label">Last seen:</span> [% ITEM_DAT.datelastseen %] </li> >- <li><span class="label">Last borrowed:</span> [% ITEM_DAT.datelastborrowed %] </li> >+ <li><span class="label">Last seen:</span> [% ITEM_DAT.datelastseen | $KohaDates %] </li> >+ <li><span class="label">Last borrowed:</span> [% ITEM_DAT.datelastborrowed | $KohaDates %] </li> > [% IF ( ITEM_DAT.card0 ) %]<li><span class="label">Last Borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower0 %]">[% ITEM_DAT.card0 %]</a> </li>[% END %] > [% IF ( ITEM_DAT.card1 ) %]<li><span class="label">Previous Borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower1 %]">[% ITEM_DAT.card1 %]</a> </li>[% END %] >- [% IF ( ITEM_DAT.card2 ) %]<li><span class="label">Previous Borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower2 %]">[% ITEM_DAT.card2 %]</a> </li>[% END %] >+ [% IF ( ITEM_DAT.card2 ) %]<li><span class="label">Previous Borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower2 %]">[% ITEM_DAT.card2 %]</a> </li>[% END %] > <li><span class="label">Paid for?:</span> [% ITEM_DAT.paidfor %] </li> > <li><span class="label">Serial enumeration:</span> [% ITEM_DAT.enumchron %] </li> > <li><span class="label">Public Note:</span> > [% IF ( CAN_user_editcatalogue_edit_items ) %] >- <form class="inline" action="updateitem.pl" method="post"><input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" /> >+ <form class="inline" action="updateitem.pl" method="post"><input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" /> > <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" /><input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber %]" /> > <textarea name="itemnotes" rows="2" cols="30">[% ITEM_DAT.itemnotes %]</textarea><input type="submit" name="submit" class="submit" value="Update" /> >- </form> >- </li> >- </ol> >+ </form> > [% ELSE %] > [% ITEM_DAT.itemnotes %] > > [% END %] >+ </li> >+ </ol> > </div> > </div> > [% END %] >-- >1.7.5.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 7235
:
6315
|
6710
|
6711
|
6880
|
7766
|
7767
|
7794
|
7795
|
8258
|
8271
|
8290