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

(-)a/circ/reserveratios.pl (-10 / +10 lines)
Lines 93-107 my $strsth = Link Here
93
        items.itemcallnumber,
93
        items.itemcallnumber,
94
        items.itemnumber,
94
        items.itemnumber,
95
        GROUP_CONCAT(DISTINCT items.itemcallnumber 
95
        GROUP_CONCAT(DISTINCT items.itemcallnumber 
96
        		ORDER BY items.itemnumber SEPARATOR '<br/>') as listcall,
96
            ORDER BY items.itemnumber SEPARATOR '|') as listcall,
97
        GROUP_CONCAT(DISTINCT homebranch
97
        GROUP_CONCAT(DISTINCT homebranch
98
            ORDER BY items.itemnumber SEPARATOR '<br/>') as homebranch_list,
98
            ORDER BY items.itemnumber SEPARATOR '|') as homebranch_list,
99
        GROUP_CONCAT(DISTINCT holdingbranch 
99
        GROUP_CONCAT(DISTINCT holdingbranch 
100
            ORDER BY items.itemnumber SEPARATOR '<br/>') as holdingbranch_list,
100
            ORDER BY items.itemnumber SEPARATOR '|') as holdingbranch_list,
101
        GROUP_CONCAT(DISTINCT items.location 
101
        GROUP_CONCAT(DISTINCT items.location 
102
        		ORDER BY items.itemnumber SEPARATOR '<br/>') as l_location,
102
            ORDER BY items.itemnumber SEPARATOR '|') as l_location,
103
        GROUP_CONCAT(DISTINCT items.itype 
103
        GROUP_CONCAT(DISTINCT items.itype 
104
        		ORDER BY items.itemnumber SEPARATOR '<br/>') as l_itype,
104
            ORDER BY items.itemnumber SEPARATOR '|') as l_itype,
105
105
106
        reserves.found,
106
        reserves.found,
107
        biblio.title,
107
        biblio.title,
Lines 147-164 while ( my $data = $sth->fetchrow_hashref ) { Link Here
147
            itemnum            => $data->{itemnumber},
147
            itemnum            => $data->{itemnumber},
148
            biblionumber       => $data->{biblionumber},
148
            biblionumber       => $data->{biblionumber},
149
            holdingbranch      => $data->{holdingbranch},
149
            holdingbranch      => $data->{holdingbranch},
150
            homebranch_list    => $data->{homebranch_list},
150
            homebranch_list    => [split('\|', $data->{homebranch_list})],
151
            holdingbranch_list => $data->{holdingbranch_list},
151
            holdingbranch_list => [split('\|', $data->{holdingbranch_list})],
152
            branch             => $data->{branch},
152
            branch             => $data->{branch},
153
            itemcallnumber     => $data->{itemcallnumber},
153
            itemcallnumber     => $data->{itemcallnumber},
154
            location           => $data->{l_location},
154
            location           => => [split('\|', $data->{l_location})],
155
            itype              => $data->{l_itype},
155
            itype              => => [split('\|', $data->{l_itype})],
156
            reservecount       => $data->{reservecount},
156
            reservecount       => $data->{reservecount},
157
            itemcount          => $data->{itemcount},
157
            itemcount          => $data->{itemcount},
158
            ratiocalc          => sprintf( "%.0d", $ratio_atleast1 ? ( $thisratio / $ratio ) : $thisratio ),
158
            ratiocalc          => sprintf( "%.0d", $ratio_atleast1 ? ( $thisratio / $ratio ) : $thisratio ),
159
            thisratio => sprintf( "%.2f", $thisratio ),
159
            thisratio => sprintf( "%.2f", $thisratio ),
160
            thisratio_atleast1 => ( $thisratio >= 1 ) ? 1 : 0,
160
            thisratio_atleast1 => ( $thisratio >= 1 ) ? 1 : 0,
161
            listcall => $data->{listcall}
161
            listcall           => [split('\|', $data->{listcall})]
162
        }
162
        }
163
    );
163
    );
164
}
164
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt (-6 / +39 lines)
Lines 1-4 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE AuthorisedValues %]
3
[% USE Branches %]
4
[% USE ItemTypes %]
2
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
6
<title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
4
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
Lines 30-35 Link Here
30
    .sql { display: none; }
33
    .sql { display: none; }
31
    .ulined { text-decoration: underline; }
34
    .ulined { text-decoration: underline; }
32
    .ratiolimit { color: blue; cursor: pointer; }
35
    .ratiolimit { color: blue; cursor: pointer; }
36
    #holdst ul li {  list-style: outside url("[% interface %]/[% theme %]/img/item-bullet.gif") disc; }
33
</style>
37
</style>
34
</head>
38
</head>
35
<body id="circ_reserveratios" class="circ">
39
<body id="circ_reserveratios" class="circ">
Lines 72-82 Link Here
72
            <td><p class="ratiolimit">[% reserveloo.thisratio %]</p></td>
76
            <td><p class="ratiolimit">[% reserveloo.thisratio %]</p></td>
73
            <td> [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %][% reserveloo.title |html %] [% IF ( reserveloo.subtitle ) %][% FOREACH subtitl IN reserveloo.subtitle %][% subtitl.subfield %][% END %][% END %]</a>[% IF ( reserveloo.author ) %] by [% reserveloo.author %][% END %]
77
            <td> [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %][% reserveloo.title |html %] [% IF ( reserveloo.subtitle ) %][% FOREACH subtitl IN reserveloo.subtitle %][% subtitl.subfield %][% END %][% END %]</a>[% IF ( reserveloo.author ) %] by [% reserveloo.author %][% END %]
74
            </td>
78
            </td>
75
            <td><p>[% reserveloo.homebranch_list %]</p></td>
79
            <td>
76
            <td><p>[% reserveloo.holdingbranch_list %]</p></td>
80
                  <ul>
77
            <td><p>[% reserveloo.location %]</p></td>
81
                      [% FOREACH homebranch IN reserveloo.homebranch_list %]
78
            <td><p>[% reserveloo.itype %]</p></td>
82
                          <li>[% Branches.GetName ( homebranch ) %]</li>
79
            <td><p>[% reserveloo.listcall %]</p></td>
83
                      [% END %]
84
                  </ul>
85
            </td>
86
            <td>
87
                  <ul>
88
                      [% FOREACH holdingbranch IN reserveloo.holdingbranch_list %]
89
                          <li>[% Branches.GetName ( holdingbranch ) %]</li>
90
                      [% END %]
91
                  </ul>
92
            </td>
93
            <td>
94
                  <ul>
95
                      [% FOREACH location IN reserveloo.location %]
96
                          <li>[% AuthorisedValues.GetByCode( 'LOC', location )%]</li>
97
                      [% END %]
98
                  </ul>
99
            </td>
100
            <td>
101
                  <ul>
102
                      [% FOREACH itype IN reserveloo.itype %]
103
                          <li>[% ItemTypes.GetDescription( itype ) %]</li>
104
                      [% END %]
105
                  </ul>
106
            </td>
107
            <td>
108
                  <ul>
109
                      [% FOREACH listcall IN reserveloo.listcall %]
110
                          <li>[% listcall %]</li>
111
                      [% END %]
112
                  </ul>
113
            </td>
80
            <td>[% IF ( reserveloo.thisratio_atleast1 ) %]<p>[% IF ( CAN_user_acquisition && basketno && booksellerid ) %]<!-- [% reserveloo.ratiocalc %] --><a href="/cgi-bin/koha/acqui/neworderempty.pl?biblionumber=[% reserveloo.biblionumber %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;rr_quantity_to_order=[% reserveloo.ratiocalc %]">[% END %]<b>[% reserveloo.ratiocalc %] to order</b>[% IF ( CAN_user_acquisition && basketno && booksellerid ) %]</a>[% END %]
114
            <td>[% IF ( reserveloo.thisratio_atleast1 ) %]<p>[% IF ( CAN_user_acquisition && basketno && booksellerid ) %]<!-- [% reserveloo.ratiocalc %] --><a href="/cgi-bin/koha/acqui/neworderempty.pl?biblionumber=[% reserveloo.biblionumber %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;rr_quantity_to_order=[% reserveloo.ratiocalc %]">[% END %]<b>[% reserveloo.ratiocalc %] to order</b>[% IF ( CAN_user_acquisition && basketno && booksellerid ) %]</a>[% END %]
81
            [% IF ( reserveloo.pendingorders ) %]<br><b>[% reserveloo.pendingorders %] pending</b>[% END %]</p>[% END %]</td>
115
            [% IF ( reserveloo.pendingorders ) %]<br><b>[% reserveloo.pendingorders %] pending</b>[% END %]</p>[% END %]</td>
82
        </tr>
116
        </tr>
83
- 

Return to bug 15672