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

(-)a/installer/data/mysql/kohastructure.sql (-4 lines)
Lines 1144-1150 CREATE TABLE `issues` ( -- information related to check outs or issues Link Here
1144
  `itemnumber` int(11), -- foreign key, linking this to the items table for the item that was checked out
1144
  `itemnumber` int(11), -- foreign key, linking this to the items table for the item that was checked out
1145
  `date_due` datetime default NULL, -- datetime the item is due (yyyy-mm-dd hh:mm::ss)
1145
  `date_due` datetime default NULL, -- datetime the item is due (yyyy-mm-dd hh:mm::ss)
1146
  `branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out
1146
  `branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out
1147
  `issuingbranch` varchar(18) default NULL,
1148
  `returndate` datetime default NULL, -- date the item was returned, will be NULL until moved to old_issues
1147
  `returndate` datetime default NULL, -- date the item was returned, will be NULL until moved to old_issues
1149
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1148
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1150
  `return` varchar(4) default NULL,
1149
  `return` varchar(4) default NULL,
Lines 1156-1162 CREATE TABLE `issues` ( -- information related to check outs or issues Link Here
1156
  KEY `issuesborridx` (`borrowernumber`),
1155
  KEY `issuesborridx` (`borrowernumber`),
1157
  KEY `itemnumber_idx` (`itemnumber`),
1156
  KEY `itemnumber_idx` (`itemnumber`),
1158
  KEY `branchcode_idx` (`branchcode`),
1157
  KEY `branchcode_idx` (`branchcode`),
1159
  KEY `issuingbranch_idx` (`issuingbranch`),
1160
  KEY `bordate` (`borrowernumber`,`timestamp`),
1158
  KEY `bordate` (`borrowernumber`,`timestamp`),
1161
  CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE RESTRICT ON UPDATE CASCADE,
1159
  CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE RESTRICT ON UPDATE CASCADE,
1162
  CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE RESTRICT ON UPDATE CASCADE
1160
  CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE RESTRICT ON UPDATE CASCADE
Lines 1618-1624 CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r Link Here
1618
  `itemnumber` int(11) default NULL, -- foreign key, linking this to the items table for the item that was checked out
1616
  `itemnumber` int(11) default NULL, -- foreign key, linking this to the items table for the item that was checked out
1619
  `date_due` datetime default NULL, -- date the item is due (yyyy-mm-dd)
1617
  `date_due` datetime default NULL, -- date the item is due (yyyy-mm-dd)
1620
  `branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out
1618
  `branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out
1621
  `issuingbranch` varchar(18) default NULL,
1622
  `returndate` datetime default NULL, -- date the item was returned
1619
  `returndate` datetime default NULL, -- date the item was returned
1623
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1620
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1624
  `return` varchar(4) default NULL,
1621
  `return` varchar(4) default NULL,
Lines 1630-1636 CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r Link Here
1630
  KEY `old_issuesborridx` (`borrowernumber`),
1627
  KEY `old_issuesborridx` (`borrowernumber`),
1631
  KEY `old_issuesitemidx` (`itemnumber`),
1628
  KEY `old_issuesitemidx` (`itemnumber`),
1632
  KEY `branchcode_idx` (`branchcode`),
1629
  KEY `branchcode_idx` (`branchcode`),
1633
  KEY `issuingbranch_idx` (`issuingbranch`),
1634
  KEY `old_bordate` (`borrowernumber`,`timestamp`),
1630
  KEY `old_bordate` (`borrowernumber`,`timestamp`),
1635
  CONSTRAINT `old_issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`)
1631
  CONSTRAINT `old_issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`)
1636
    ON DELETE SET NULL ON UPDATE SET NULL,
1632
    ON DELETE SET NULL ON UPDATE SET NULL,
(-)a/installer/data/mysql/updatedatabase.pl (+12 lines)
Lines 9793-9798 if(CheckVersion($DBversion)) { Link Here
9793
    SetVersion($DBversion);
9793
    SetVersion($DBversion);
9794
}
9794
}
9795
9795
9796
$DBversion = "3.19.00.XXX";
9797
if ( CheckVersion($DBversion) ) {
9798
    $dbh->do(q|
9799
        ALTER TABLE issues DROP COLUMN issuingbranch
9800
    |);
9801
    $dbh->do(q|
9802
        ALTER TABLE old_issues DROP COLUMN issuingbranch
9803
    |);
9804
    print "Upgrade to $DBversion done (Bug 2806: Remove issuingbranch columns)\n";
9805
    SetVersion ($DBversion);
9806
}
9807
9796
=head1 FUNCTIONS
9808
=head1 FUNCTIONS
9797
9809
9798
=head2 TableExists($table)
9810
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt (-1 / +2 lines)
Lines 1-5 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE Koha %]
2
[% USE Koha %]
3
[% USE Branches %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Circulation History for [% INCLUDE 'patron-title.inc' %]</title>
5
<title>Circulation History for [% INCLUDE 'patron-title.inc' %]</title>
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
Lines 108-114 Link Here
108
          <td>
109
          <td>
109
            <span title="[% issue.issuedate %]">[% issue.issuedate | $KohaDates %]</span></td>
110
            <span title="[% issue.issuedate %]">[% issue.issuedate | $KohaDates %]</span></td>
110
          </td>
111
          </td>
111
          <td>[% issue.issuingbranch %]</td>
112
          <td>[% Branches.GetName( issue.branchcode ) %]</td>
112
          <td>
113
          <td>
113
            [% IF issue.date_due %]
114
            [% IF issue.date_due %]
114
                <span title="[% issue.date_due %]">[% issue.date_due | $KohaDates %]</span>
115
                <span title="[% issue.date_due %]">[% issue.date_due | $KohaDates %]</span>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt (-1 / +1 lines)
Lines 152-158 Link Here
152
					</select></li>
152
					</select></li>
153
	<li><label for="criteria">By: </label><select name="Criteria" id="criteria">
153
	<li><label for="criteria">By: </label><select name="Criteria" id="criteria">
154
						<option value ="" selected="selected">None</option>
154
						<option value ="" selected="selected">None</option>
155
						<option value ="issuingbranch">Library</option>
155
                        <option value ="branch">Library</option>
156
						<option value ="categorycode">Categorycode</option>
156
						<option value ="categorycode">Categorycode</option>
157
						<option value ="itemtype">Itemtype</option>
157
						<option value ="itemtype">Itemtype</option>
158
						<option value ="Day">Day</option>
158
						<option value ="Day">Day</option>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt (-8 lines)
Lines 172-185 Link Here
172
                                    </select>
172
                                    </select>
173
                                </td>
173
                                </td>
174
			</tr>
174
			</tr>
175
<!-- Modified according to statistics table
176
			<tr>
177
                <td>Issuing library</td>
178
				<td><input type="radio" name="Line" value="issuingbranch"></td>
179
				<td><input type="radio" name="Column" value="issuingbranch"></td>
180
				<td >[% CGIBranch %]</td>
181
			</tr> -->
182
<!--End Modified -->
183
			[% IF ( hassort1 ) %]
175
			[% IF ( hassort1 ) %]
184
				<tr class="hilighted"> 
176
				<tr class="hilighted"> 
185
					<td>Sort1</td>
177
					<td>Sort1</td>
(-)a/members/readingrec.pl (-4 lines)
Lines 74-82 if ( $borrowernumber eq C4::Context->preference('AnonymousPatron') ){ Link Here
74
}
74
}
75
75
76
my $branches = GetBranches();
76
my $branches = GetBranches();
77
foreach my $issue ( @{$issues} ) {
78
    $issue->{issuingbranch} = $branches->{ $issue->{branchcode} }->{branchname};
79
}
80
77
81
#   barcode export
78
#   barcode export
82
if ( $op eq 'export_barcodes' ) {
79
if ( $op eq 'export_barcodes' ) {
83
- 

Return to bug 2806