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

(-)a/catalogue/moredetail.pl (-5 / +2 lines)
Lines 31-37 use C4::Bookseller qw(GetBookSellerFromId); Link Here
31
use C4::Output;             # contains gettemplate
31
use C4::Output;             # contains gettemplate
32
use C4::Auth;
32
use C4::Auth;
33
use C4::Serials;
33
use C4::Serials;
34
use C4::Dates qw/format_date/;
35
use C4::Circulation;  # to use itemissues
34
use C4::Circulation;  # to use itemissues
36
use C4::Members; # to use GetMember
35
use C4::Members; # to use GetMember
37
use C4::Search;		# enabled_staff_search_views
36
use C4::Search;		# enabled_staff_search_views
Lines 120-126 my $ccodes= GetKohaAuthorisedValues('items.ccode',$fw); Link Here
120
my $itemtypes = GetItemTypes;
119
my $itemtypes = GetItemTypes;
121
120
122
$data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'};
121
$data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'};
123
122
$data->{'rentalcharge'} = sprintf( "%.2f", $data->{'rentalcharge'} );
124
foreach ( keys %{$data} ) {
123
foreach ( keys %{$data} ) {
125
    $template->param( "$_" => defined $data->{$_} ? $data->{$_} : '' );
124
    $template->param( "$_" => defined $data->{$_} ? $data->{$_} : '' );
126
}
125
}
Lines 132-141 foreach my $item (@items){ Link Here
132
    $item->{'collection'}              = $ccodes->{ $item->{ccode} } if ($ccodes);
131
    $item->{'collection'}              = $ccodes->{ $item->{ccode} } if ($ccodes);
133
    $item->{'itype'}                   = $itemtypes->{ $item->{'itype'} }->{'description'};
132
    $item->{'itype'}                   = $itemtypes->{ $item->{'itype'} }->{'description'};
134
    $item->{'replacementprice'}        = sprintf( "%.2f", $item->{'replacementprice'} );
133
    $item->{'replacementprice'}        = sprintf( "%.2f", $item->{'replacementprice'} );
135
    $item->{$_}                        = format_date( $item->{$_} ) foreach qw/datelastborrowed dateaccessioned datelastseen lastreneweddate/;
136
    $item->{'copyvol'}                 = $item->{'copynumber'};
134
    $item->{'copyvol'}                 = $item->{'copynumber'};
137
135
138
139
    # item has a host number if its biblio number does not match the current bib
136
    # item has a host number if its biblio number does not match the current bib
140
    if ($item->{biblionumber} ne $biblionumber){
137
    if ($item->{biblionumber} ne $biblionumber){
141
        $item->{hostbiblionumber} = $item->{biblionumber};
138
        $item->{hostbiblionumber} = $item->{biblionumber};
Lines 148-153 foreach my $item (@items){ Link Here
148
    $item->{'ordernumber'}             = $order->{'ordernumber'};
145
    $item->{'ordernumber'}             = $order->{'ordernumber'};
149
    $item->{'basketno'}                = $order->{'basketno'};
146
    $item->{'basketno'}                = $order->{'basketno'};
150
    $item->{'booksellerinvoicenumber'} = $order->{'booksellerinvoicenumber'};
147
    $item->{'booksellerinvoicenumber'} = $order->{'booksellerinvoicenumber'};
148
    $item->{'orderdate'}               = $order->{'entrydate'};
151
    if ($item->{'basketno'}){
149
    if ($item->{'basketno'}){
152
	    my $basket = GetBasket($item->{'basketno'});
150
	    my $basket = GetBasket($item->{'basketno'});
153
	    my $bookseller = GetBookSellerFromId($basket->{'booksellerid'});
151
	    my $bookseller = GetBookSellerFromId($basket->{'booksellerid'});
Lines 169-175 foreach my $item (@items){ Link Here
169
    $item->{'homebranchname'} = GetBranchName($item->{'homebranch'});
167
    $item->{'homebranchname'} = GetBranchName($item->{'homebranch'});
170
    $item->{'holdingbranchname'} = GetBranchName($item->{'holdingbranch'});
168
    $item->{'holdingbranchname'} = GetBranchName($item->{'holdingbranch'});
171
    if ($item->{'datedue'}) {
169
    if ($item->{'datedue'}) {
172
        $item->{'datedue'} = format_date($item->{'datedue'});
173
        $item->{'issue'}= 1;
170
        $item->{'issue'}= 1;
174
    } else {
171
    } else {
175
        $item->{'issue'}= 0;
172
        $item->{'issue'}= 0;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt (-29 / +32 lines)
Lines 4-10 Link Here
4
<style type="text/css">h3{padding-top: 1em; border-top: 2px solid #CCCCCC;}</style>
4
<style type="text/css">h3{padding-top: 1em; border-top: 2px solid #CCCCCC;}</style>
5
</head>
5
</head>
6
<body>
6
<body>
7
7
[% USE KohaDates %]
8
[% INCLUDE 'header.inc' %]
8
[% INCLUDE 'header.inc' %]
9
[% INCLUDE 'cat-search.inc' %]
9
[% INCLUDE 'cat-search.inc' %]
10
10
Lines 69-75 Link Here
69
69
70
            <ol class="bibliodetails">
70
            <ol class="bibliodetails">
71
            <li><span class="label">Current Location:</span> [% ITEM_DAT.holdingbranchname %]&nbsp;</li>
71
            <li><span class="label">Current Location:</span> [% ITEM_DAT.holdingbranchname %]&nbsp;</li>
72
            <li><span class="label">Checkout Status:</span> [% IF ( ITEM_DAT.issue ) %]Checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% ITEM_DAT.borrowernumber %]">[% ITEM_DAT.cardnumber %]</a>[% IF ( ITEM_DAT.lastreneweddate ) %], Last renewed [% ITEM_DAT.lastreneweddate %][% END %], Due back on [% ITEM_DAT.datedue %][% ELSE %]Not Checked out [% END %]</li>
72
            <li><span class="label">Checkout Status:</span> [% IF ( ITEM_DAT.issue ) %]Checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% ITEM_DAT.borrowernumber %]">[% ITEM_DAT.cardnumber %]</a>[% IF ( ITEM_DAT.lastreneweddate ) %], Last renewed [% ITEM_DAT.lastreneweddate | $KohaDates %][% END %], Due back on [% ITEM_DAT.datedue | $KohaDates %][% ELSE %]Not Checked out [% END %]</li>
73
            <li><span class="label">Current Renewals:</span> [% ITEM_DAT.renewals %]&nbsp;</li>
73
            <li><span class="label">Current Renewals:</span> [% ITEM_DAT.renewals %]&nbsp;</li>
74
            [% IF ( ITEM_DAT.itemlostloop ) %]
74
            [% IF ( ITEM_DAT.itemlostloop ) %]
75
                <li><span class="label">Lost Status:</span>
75
                <li><span class="label">Lost Status:</span>
Lines 153-203 Link Here
153
            <div class="listgroup"><h4>History</h4>
153
            <div class="listgroup"><h4>History</h4>
154
            <ol class="bibliodetails">
154
            <ol class="bibliodetails">
155
155
156
                <li><span class="label">
156
            [% IF ITEM_DAT.basketno %]
157
                [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
157
                <li><span class="label">Order date:</span>
158
158
                    [% IF ( CAN_user_acquisition_order_manage ) %]
159
                    Accession Date:</span>
159
                        <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% ITEM_DAT.basketno %]">[% ITEM_DAT.orderdate | $KohaDates %]</a>
160
                    [% IF ( ITEM_DAT.basketno ) %]
161
                    <a href="/cgi-bin/koha/acqui/parcel.pl?booksellerid=[% ITEM_DAT.booksellerid %]&amp;invoice=[% ITEM_DAT.booksellerinvoicenumber %]&amp;datereceived=[% ITEM_DAT.datereceived %]">[% ITEM_DAT.dateaccessioned %]</a>
162
                    [% ELSE %]
160
                    [% ELSE %]
163
                    [% ITEM_DAT.dateaccessioned %]
161
                        [% ITEM_DAT.orderdate | $KohaDates %]
164
                    [% END %]
162
                    [% END %]
165
                [% ELSE %]
163
                 </li>
166
                    [% ITEM_DAT.dateaccessioned %]
164
                <li><span class="label">Vendor:</span>
167
                [% END %]
165
                    [% ITEM_DAT.vendor %]
168
                </li>
166
                </li>
169
                [% IF ITEM_DAT.vendor %]
167
            [% END %]
170
                <li><span class="label">Vendor</span>
168
171
                  [% ITEM_DAT.vendor %]
169
            [% IF ITEM_DAT.dateaccessioned %]
170
                <li><span class="label">Accession date:</span>
171
                    [% IF ( CAN_user_acquisition_order_receive && ITEM_DAT.booksellerinvoicenumber ) %]
172
                        <a href="/cgi-bin/koha/acqui/parcel.pl?supplierid=[% ITEM_DAT.booksellerid %]&amp;invoice=[% ITEM_DAT.booksellerinvoicenumber %]&amp;datereceived=[% ITEM_DAT.datereceived %]">[% ITEM_DAT.dateaccessioned | $KohaDates %]</a>
173
                    [% ELSE %]
174
                        [% ITEM_DAT.dateaccessioned | $KohaDates %]
175
                    [% END %]
172
                </li>
176
                </li>
173
                    [% IF ITEM_DAT.booksellerinvoicenumber %]
177
            [% END %]
174
                <li><span class="label">Invoice number</span>
178
            [% IF ( ITEM_DAT.booksellerinvoicenumber ) %]
175
                  [% ITEM_DAT.booksellerinvoicenumber %]
179
                <li><span class="label">Invoice number:</span>
180
                    [% ITEM_DAT.booksellerinvoicenumber %]
176
                </li>
181
                </li>
177
                    [% END %]
182
            [% END %]
178
                [% END %]
183
179
                
180
                <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?&amp;biblionumber=[% ITEM_DAT.biblionumber %]&amp;bi=[% ITEM_DAT.biblioitemnumber %]&amp;itm=[% ITEM_DAT.itemnumber %]">View item's checkout history</a>)</li>
184
                <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?&amp;biblionumber=[% ITEM_DAT.biblionumber %]&amp;bi=[% ITEM_DAT.biblioitemnumber %]&amp;itm=[% ITEM_DAT.itemnumber %]">View item's checkout history</a>)</li>
181
185
182
                <li><span class="label">Last seen:</span> [% ITEM_DAT.datelastseen %]&nbsp;</li>
186
                <li><span class="label">Last seen:</span> [% ITEM_DAT.datelastseen | $KohaDates %]&nbsp;</li>
183
                <li><span class="label">Last borrowed:</span> [% ITEM_DAT.datelastborrowed %]&nbsp;</li>
187
                <li><span class="label">Last borrowed:</span> [% ITEM_DAT.datelastborrowed | $KohaDates %]&nbsp;</li>
184
                [% 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>&nbsp;</li>[% END %]
188
                [% 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>&nbsp;</li>[% END %]
185
                [% 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>&nbsp;</li>[% END %]
189
                [% 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>&nbsp;</li>[% END %]
186
		[% 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>&nbsp;</li>[% END %]
190
                [% 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>&nbsp;</li>[% END %]
187
                <li><span class="label">Paid for?:</span> [% ITEM_DAT.paidfor %]&nbsp;</li>
191
                <li><span class="label">Paid for?:</span> [% ITEM_DAT.paidfor %]&nbsp;</li>
188
            <li><span class="label">Serial enumeration:</span> [% ITEM_DAT.enumchron %]&nbsp;</li>
192
            <li><span class="label">Serial enumeration:</span> [% ITEM_DAT.enumchron %]&nbsp;</li>
189
            <li><span class="label">Public Note:</span>
193
            <li><span class="label">Public Note:</span>
190
                [% IF ( CAN_user_editcatalogue_edit_items ) %]
194
                [% IF ( CAN_user_editcatalogue_edit_items ) %]
191
              <form class="inline" action="updateitem.pl" method="post"><input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" />
195
                <form class="inline" action="updateitem.pl" method="post"><input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" />
192
                    <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" /><input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber %]" />
196
                    <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" /><input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber %]" />
193
                    <textarea name="itemnotes" rows="2" cols="30">[% ITEM_DAT.itemnotes %]</textarea><input type="submit" name="submit" class="submit" value="Update" />
197
                    <textarea name="itemnotes" rows="2" cols="30">[% ITEM_DAT.itemnotes %]</textarea><input type="submit" name="submit" class="submit" value="Update" />
194
              </form>
198
                </form>
195
            </li>
196
            </ol>
197
                [% ELSE %]
199
                [% ELSE %]
198
                    [% ITEM_DAT.itemnotes %]
200
                    [% ITEM_DAT.itemnotes %]
199
                    &nbsp;
201
                    &nbsp;
200
                [% END %]
202
                [% END %]
203
            </li>
204
            </ol>
201
            </div>
205
            </div>
202
</div>
206
</div>
203
[% END %]
207
[% END %]
204
- 

Return to bug 7235