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

(-)a/Koha/Schema/Result/AccountCredit.pm (+200 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::AccountCredit;
3
4
# Created by DBIx::Class::Schema::Loader
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7
=head1 NAME
8
9
Koha::Schema::Result::AccountCredit
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<account_credits>
19
20
=cut
21
22
__PACKAGE__->table("account_credits");
23
24
=head1 ACCESSORS
25
26
=head2 credit_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 borrowernumber
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 0
37
38
=head2 type
39
40
  data_type: 'varchar'
41
  is_nullable: 0
42
  size: 255
43
44
=head2 amount_received
45
46
  data_type: 'decimal'
47
  is_nullable: 1
48
  size: [28,6]
49
50
=head2 amount_paid
51
52
  data_type: 'decimal'
53
  is_nullable: 0
54
  size: [28,6]
55
56
=head2 amount_remaining
57
58
  data_type: 'decimal'
59
  is_nullable: 0
60
  size: [28,6]
61
62
=head2 notes
63
64
  data_type: 'text'
65
  is_nullable: 1
66
67
=head2 branchcode
68
69
  data_type: 'varchar'
70
  is_foreign_key: 1
71
  is_nullable: 1
72
  size: 10
73
74
=head2 manager_id
75
76
  data_type: 'integer'
77
  is_nullable: 1
78
79
=head2 created_on
80
81
  data_type: 'timestamp'
82
  datetime_undef_if_invalid: 1
83
  is_nullable: 1
84
85
=head2 updated_on
86
87
  data_type: 'timestamp'
88
  datetime_undef_if_invalid: 1
89
  is_nullable: 1
90
91
=cut
92
93
__PACKAGE__->add_columns(
94
  "credit_id",
95
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
96
  "borrowernumber",
97
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
98
  "type",
99
  { data_type => "varchar", is_nullable => 0, size => 255 },
100
  "amount_received",
101
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
102
  "amount_paid",
103
  { data_type => "decimal", is_nullable => 0, size => [28, 6] },
104
  "amount_remaining",
105
  { data_type => "decimal", is_nullable => 0, size => [28, 6] },
106
  "notes",
107
  { data_type => "text", is_nullable => 1 },
108
  "branchcode",
109
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
110
  "manager_id",
111
  { data_type => "integer", is_nullable => 1 },
112
  "created_on",
113
  {
114
    data_type => "timestamp",
115
    datetime_undef_if_invalid => 1,
116
    is_nullable => 1,
117
  },
118
  "updated_on",
119
  {
120
    data_type => "timestamp",
121
    datetime_undef_if_invalid => 1,
122
    is_nullable => 1,
123
  },
124
);
125
126
=head1 PRIMARY KEY
127
128
=over 4
129
130
=item * L</credit_id>
131
132
=back
133
134
=cut
135
136
__PACKAGE__->set_primary_key("credit_id");
137
138
=head1 RELATIONS
139
140
=head2 account_offsets
141
142
Type: has_many
143
144
Related object: L<Koha::Schema::Result::AccountOffset>
145
146
=cut
147
148
__PACKAGE__->has_many(
149
  "account_offsets",
150
  "Koha::Schema::Result::AccountOffset",
151
  { "foreign.credit_id" => "self.credit_id" },
152
  { cascade_copy => 0, cascade_delete => 0 },
153
);
154
155
=head2 borrowernumber
156
157
Type: belongs_to
158
159
Related object: L<Koha::Schema::Result::Borrower>
160
161
=cut
162
163
__PACKAGE__->belongs_to(
164
  "borrowernumber",
165
  "Koha::Schema::Result::Borrower",
166
  { borrowernumber => "borrowernumber" },
167
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
168
);
169
170
=head2 branchcode
171
172
Type: belongs_to
173
174
Related object: L<Koha::Schema::Result::Branch>
175
176
=cut
177
178
__PACKAGE__->belongs_to(
179
  "branchcode",
180
  "Koha::Schema::Result::Branch",
181
  { branchcode => "branchcode" },
182
  {
183
    is_deferrable => 1,
184
    join_type     => "LEFT",
185
    on_delete     => "CASCADE",
186
    on_update     => "CASCADE",
187
  },
188
);
189
190
191
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-07-15 10:08:16
192
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lkoQZ4EQDlmD9vpZQ7k7mA
193
194
__PACKAGE__->belongs_to(
195
  "borrower",
196
  "Koha::Schema::Result::Borrower",
197
  { borrowernumber => "borrowernumber" },
198
);
199
200
1;
(-)a/Koha/Schema/Result/AccountDebit.pm (+261 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::AccountDebit;
3
4
# Created by DBIx::Class::Schema::Loader
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7
=head1 NAME
8
9
Koha::Schema::Result::AccountDebit
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<account_debits>
19
20
=cut
21
22
__PACKAGE__->table("account_debits");
23
24
=head1 ACCESSORS
25
26
=head2 debit_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 borrowernumber
33
34
  data_type: 'integer'
35
  default_value: 0
36
  is_foreign_key: 1
37
  is_nullable: 0
38
39
=head2 itemnumber
40
41
  data_type: 'integer'
42
  is_nullable: 1
43
44
=head2 issue_id
45
46
  data_type: 'integer'
47
  is_nullable: 1
48
49
=head2 type
50
51
  data_type: 'varchar'
52
  is_nullable: 0
53
  size: 255
54
55
=head2 accruing
56
57
  data_type: 'tinyint'
58
  default_value: 0
59
  is_nullable: 0
60
61
=head2 amount_original
62
63
  data_type: 'decimal'
64
  is_nullable: 1
65
  size: [28,6]
66
67
=head2 amount_outstanding
68
69
  data_type: 'decimal'
70
  is_nullable: 1
71
  size: [28,6]
72
73
=head2 amount_last_increment
74
75
  data_type: 'decimal'
76
  is_nullable: 1
77
  size: [28,6]
78
79
=head2 description
80
81
  data_type: 'mediumtext'
82
  is_nullable: 1
83
84
=head2 notes
85
86
  data_type: 'text'
87
  is_nullable: 1
88
89
=head2 branchcode
90
91
  data_type: 'varchar'
92
  is_foreign_key: 1
93
  is_nullable: 1
94
  size: 10
95
96
=head2 manager_id
97
98
  data_type: 'integer'
99
  is_nullable: 1
100
101
=head2 created_on
102
103
  data_type: 'timestamp'
104
  datetime_undef_if_invalid: 1
105
  is_nullable: 1
106
107
=head2 updated_on
108
109
  data_type: 'timestamp'
110
  datetime_undef_if_invalid: 1
111
  is_nullable: 1
112
113
=cut
114
115
__PACKAGE__->add_columns(
116
  "debit_id",
117
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
118
  "borrowernumber",
119
  {
120
    data_type      => "integer",
121
    default_value  => 0,
122
    is_foreign_key => 1,
123
    is_nullable    => 0,
124
  },
125
  "itemnumber",
126
  { data_type => "integer", is_nullable => 1 },
127
  "issue_id",
128
  { data_type => "integer", is_nullable => 1 },
129
  "type",
130
  { data_type => "varchar", is_nullable => 0, size => 255 },
131
  "accruing",
132
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
133
  "amount_original",
134
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
135
  "amount_outstanding",
136
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
137
  "amount_last_increment",
138
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
139
  "description",
140
  { data_type => "mediumtext", is_nullable => 1 },
141
  "notes",
142
  { data_type => "text", is_nullable => 1 },
143
  "branchcode",
144
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
145
  "manager_id",
146
  { data_type => "integer", is_nullable => 1 },
147
  "created_on",
148
  {
149
    data_type => "timestamp",
150
    datetime_undef_if_invalid => 1,
151
    is_nullable => 1,
152
  },
153
  "updated_on",
154
  {
155
    data_type => "timestamp",
156
    datetime_undef_if_invalid => 1,
157
    is_nullable => 1,
158
  },
159
);
160
161
=head1 PRIMARY KEY
162
163
=over 4
164
165
=item * L</debit_id>
166
167
=back
168
169
=cut
170
171
__PACKAGE__->set_primary_key("debit_id");
172
173
=head1 RELATIONS
174
175
=head2 account_offsets
176
177
Type: has_many
178
179
Related object: L<Koha::Schema::Result::AccountOffset>
180
181
=cut
182
183
__PACKAGE__->has_many(
184
  "account_offsets",
185
  "Koha::Schema::Result::AccountOffset",
186
  { "foreign.debit_id" => "self.debit_id" },
187
  { cascade_copy => 0, cascade_delete => 0 },
188
);
189
190
=head2 borrowernumber
191
192
Type: belongs_to
193
194
Related object: L<Koha::Schema::Result::Borrower>
195
196
=cut
197
198
__PACKAGE__->belongs_to(
199
  "borrowernumber",
200
  "Koha::Schema::Result::Borrower",
201
  { borrowernumber => "borrowernumber" },
202
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
203
);
204
205
=head2 branchcode
206
207
Type: belongs_to
208
209
Related object: L<Koha::Schema::Result::Branch>
210
211
=cut
212
213
__PACKAGE__->belongs_to(
214
  "branchcode",
215
  "Koha::Schema::Result::Branch",
216
  { branchcode => "branchcode" },
217
  {
218
    is_deferrable => 1,
219
    join_type     => "LEFT",
220
    on_delete     => "CASCADE",
221
    on_update     => "CASCADE",
222
  },
223
);
224
225
226
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-07-15 10:03:44
227
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ns19xWix5RriwDPelPnhfw
228
229
__PACKAGE__->belongs_to(
230
  "item",
231
  "Koha::Schema::Result::Item",
232
  { itemnumber => "itemnumber" }
233
);
234
235
__PACKAGE__->belongs_to(
236
  "deleted_item",
237
  "Koha::Schema::Result::Deleteditem",
238
  { itemnumber => "itemnumber" }
239
);
240
241
__PACKAGE__->belongs_to(
242
  "issue",
243
  "Koha::Schema::Result::Issue",
244
  { issue_id => "issue_id" }
245
);
246
247
__PACKAGE__->belongs_to(
248
  "old_issue",
249
  "Koha::Schema::Result::OldIssue",
250
  { issue_id => "issue_id" }
251
);
252
253
__PACKAGE__->belongs_to(
254
  "borrower",
255
  "Koha::Schema::Result::Borrower",
256
  { borrowernumber => "borrowernumber" },
257
  { on_delete => "CASCADE", on_update => "CASCADE" },
258
);
259
260
# You can replace this text with custom content, and it will be preserved on regeneration
261
1;
(-)a/Koha/Schema/Result/AccountOffset.pm (+147 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::AccountOffset;
3
4
# Created by DBIx::Class::Schema::Loader
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7
=head1 NAME
8
9
Koha::Schema::Result::AccountOffset
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<account_offsets>
19
20
=cut
21
22
__PACKAGE__->table("account_offsets");
23
24
=head1 ACCESSORS
25
26
=head2 offset_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 debit_id
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 1
37
38
=head2 credit_id
39
40
  data_type: 'integer'
41
  is_foreign_key: 1
42
  is_nullable: 1
43
44
=head2 type
45
46
  data_type: 'varchar'
47
  is_nullable: 1
48
  size: 255
49
50
=head2 amount
51
52
  data_type: 'decimal'
53
  is_nullable: 0
54
  size: [28,6]
55
56
A positive number here represents a payment, a negative is a increase in a fine.
57
58
=head2 created_on
59
60
  data_type: 'timestamp'
61
  datetime_undef_if_invalid: 1
62
  default_value: current_timestamp
63
  is_nullable: 0
64
65
=cut
66
67
__PACKAGE__->add_columns(
68
  "offset_id",
69
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
70
  "debit_id",
71
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
72
  "credit_id",
73
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
74
  "type",
75
  { data_type => "varchar", is_nullable => 1, size => 255 },
76
  "amount",
77
  { data_type => "decimal", is_nullable => 0, size => [28, 6] },
78
  "created_on",
79
  {
80
    data_type => "timestamp",
81
    datetime_undef_if_invalid => 1,
82
    default_value => \"current_timestamp",
83
    is_nullable => 0,
84
  },
85
);
86
87
=head1 PRIMARY KEY
88
89
=over 4
90
91
=item * L</offset_id>
92
93
=back
94
95
=cut
96
97
__PACKAGE__->set_primary_key("offset_id");
98
99
=head1 RELATIONS
100
101
=head2 credit
102
103
Type: belongs_to
104
105
Related object: L<Koha::Schema::Result::AccountCredit>
106
107
=cut
108
109
__PACKAGE__->belongs_to(
110
  "credit",
111
  "Koha::Schema::Result::AccountCredit",
112
  { credit_id => "credit_id" },
113
  {
114
    is_deferrable => 1,
115
    join_type     => "LEFT",
116
    on_delete     => "CASCADE",
117
    on_update     => "CASCADE",
118
  },
119
);
120
121
=head2 debit
122
123
Type: belongs_to
124
125
Related object: L<Koha::Schema::Result::AccountDebit>
126
127
=cut
128
129
__PACKAGE__->belongs_to(
130
  "debit",
131
  "Koha::Schema::Result::AccountDebit",
132
  { debit_id => "debit_id" },
133
  {
134
    is_deferrable => 1,
135
    join_type     => "LEFT",
136
    on_delete     => "CASCADE",
137
    on_update     => "CASCADE",
138
  },
139
);
140
141
142
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-07-15 10:03:45
143
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CQJiVGoCnQEzkVu9ssgU/Q
144
145
146
# You can replace this text with custom content, and it will be preserved on regeneration
147
1;
(-)a/Koha/Schema/Result/Borrower.pm (-9 / +21 lines)
Lines 407-412 __PACKAGE__->table("borrowers"); Link Here
407
  default_value: 1
407
  default_value: 1
408
  is_nullable: 0
408
  is_nullable: 0
409
409
410
=head2 account_balance
411
412
  data_type: 'decimal'
413
  is_nullable: 0
414
  size: [28,6]
415
410
=cut
416
=cut
411
417
412
__PACKAGE__->add_columns(
418
__PACKAGE__->add_columns(
Lines 576-581 __PACKAGE__->add_columns( Link Here
576
  { data_type => "varchar", is_nullable => 1, size => 50 },
582
  { data_type => "varchar", is_nullable => 1, size => 50 },
577
  "privacy",
583
  "privacy",
578
  { data_type => "integer", default_value => 1, is_nullable => 0 },
584
  { data_type => "integer", default_value => 1, is_nullable => 0 },
585
  "account_balance",
586
  { data_type => "decimal", is_nullable => 0, size => [28, 6] },
579
);
587
);
580
588
581
=head1 PRIMARY KEY
589
=head1 PRIMARY KEY
Lines 606-637 __PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]); Link Here
606
614
607
=head1 RELATIONS
615
=head1 RELATIONS
608
616
609
=head2 accountlines
617
=head2 account_credits
610
618
611
Type: has_many
619
Type: has_many
612
620
613
Related object: L<Koha::Schema::Result::Accountline>
621
Related object: L<Koha::Schema::Result::AccountCredit>
614
622
615
=cut
623
=cut
616
624
617
__PACKAGE__->has_many(
625
__PACKAGE__->has_many(
618
  "accountlines",
626
  "account_credits",
619
  "Koha::Schema::Result::Accountline",
627
  "Koha::Schema::Result::AccountCredit",
620
  { "foreign.borrowernumber" => "self.borrowernumber" },
628
  { "foreign.borrowernumber" => "self.borrowernumber" },
621
  { cascade_copy => 0, cascade_delete => 0 },
629
  { cascade_copy => 0, cascade_delete => 0 },
622
);
630
);
623
631
624
=head2 accountoffsets
632
=head2 account_debits
625
633
626
Type: has_many
634
Type: has_many
627
635
628
Related object: L<Koha::Schema::Result::Accountoffset>
636
Related object: L<Koha::Schema::Result::AccountDebit>
629
637
630
=cut
638
=cut
631
639
632
__PACKAGE__->has_many(
640
__PACKAGE__->has_many(
633
  "accountoffsets",
641
  "account_debits",
634
  "Koha::Schema::Result::Accountoffset",
642
  "Koha::Schema::Result::AccountDebit",
635
  { "foreign.borrowernumber" => "self.borrowernumber" },
643
  { "foreign.borrowernumber" => "self.borrowernumber" },
636
  { cascade_copy => 0, cascade_delete => 0 },
644
  { cascade_copy => 0, cascade_delete => 0 },
637
);
645
);
Lines 1120-1125 __PACKAGE__->many_to_many("courses", "course_instructors", "course"); Link Here
1120
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-11-14 09:56:24
1128
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-11-14 09:56:24
1121
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UGa+abq4uilkf0nImxun/w
1129
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UGa+abq4uilkf0nImxun/w
1122
1130
1131
__PACKAGE__->belongs_to(
1132
    "branch",
1133
    "Koha::Schema::Result::Branch",
1134
    { branchcode => "branchcode" },
1135
);
1123
1136
1124
# You can replace this text with custom content, and it will be preserved on regeneration
1125
1;
1137
1;
(-)a/Koha/Schema/Result/Branch.pm (-1 / +31 lines)
Lines 187-192 __PACKAGE__->set_primary_key("branchcode"); Link Here
187
187
188
=head1 RELATIONS
188
=head1 RELATIONS
189
189
190
=head2 account_credits
191
192
Type: has_many
193
194
Related object: L<Koha::Schema::Result::AccountCredit>
195
196
=cut
197
198
__PACKAGE__->has_many(
199
  "account_credits",
200
  "Koha::Schema::Result::AccountCredit",
201
  { "foreign.branchcode" => "self.branchcode" },
202
  { cascade_copy => 0, cascade_delete => 0 },
203
);
204
205
=head2 account_debits
206
207
Type: has_many
208
209
Related object: L<Koha::Schema::Result::AccountDebit>
210
211
=cut
212
213
__PACKAGE__->has_many(
214
  "account_debits",
215
  "Koha::Schema::Result::AccountDebit",
216
  { "foreign.branchcode" => "self.branchcode" },
217
  { cascade_copy => 0, cascade_delete => 0 },
218
);
219
190
=head2 aqbaskets
220
=head2 aqbaskets
191
221
192
Type: has_many
222
Type: has_many
Lines 517-521 __PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode"); Link Here
517
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CGNPB/MkGLOihDThj43/4A
547
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CGNPB/MkGLOihDThj43/4A
518
548
519
549
520
# You can replace this text with custom content, and it will be preserved on regeneration
550
# You can replace this text with custom code or comments, and it will be preserved on regeneration
521
1;
551
1;
(-)a/Koha/Schema/Result/Deleteditem.pm (+11 lines)
Lines 383-388 __PACKAGE__->set_primary_key("itemnumber"); Link Here
383
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-10-24 09:58:16
383
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-10-24 09:58:16
384
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ru5DyaIlWJcMNAgpZRjOLg
384
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ru5DyaIlWJcMNAgpZRjOLg
385
385
386
__PACKAGE__->belongs_to(
387
  "biblio",
388
  "Koha::Schema::Result::Biblio",
389
  { biblionumber => "biblionumber" }
390
);
391
392
__PACKAGE__->belongs_to(
393
  "deleted_biblio",
394
  "Koha::Schema::Result::Deletedbiblio",
395
  { biblionumber => "biblionumber" }
396
);
386
397
387
# You can replace this text with custom content, and it will be preserved on regeneration
398
# You can replace this text with custom content, and it will be preserved on regeneration
388
1;
399
1;
(-)a/Koha/Schema/Result/Issue.pm (-4 / +29 lines)
Lines 23-28 __PACKAGE__->table("issues"); Link Here
23
23
24
=head1 ACCESSORS
24
=head1 ACCESSORS
25
25
26
=head2 issue_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
26
=head2 borrowernumber
32
=head2 borrowernumber
27
33
28
  data_type: 'integer'
34
  data_type: 'integer'
Lines 104-109 __PACKAGE__->table("issues"); Link Here
104
=cut
110
=cut
105
111
106
__PACKAGE__->add_columns(
112
__PACKAGE__->add_columns(
113
  "issue_id",
114
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
107
  "borrowernumber",
115
  "borrowernumber",
108
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
116
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
109
  "itemnumber",
117
  "itemnumber",
Lines 153-158 __PACKAGE__->add_columns( Link Here
153
  { data_type => "integer", default_value => 0, is_nullable => 0 },
161
  { data_type => "integer", default_value => 0, is_nullable => 0 },
154
);
162
);
155
163
164
=head1 PRIMARY KEY
165
166
=over 4
167
168
=item * L</issue_id>
169
170
=back
171
172
=cut
173
174
__PACKAGE__->set_primary_key("issue_id");
175
156
=head1 RELATIONS
176
=head1 RELATIONS
157
177
158
=head2 borrowernumber
178
=head2 borrowernumber
Lines 200-209 __PACKAGE__->belongs_to( Link Here
200
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7Y+5IerDnajn5GLwAY5thg
220
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7Y+5IerDnajn5GLwAY5thg
201
221
202
__PACKAGE__->belongs_to(
222
__PACKAGE__->belongs_to(
203
    "borrower",
223
  "borrower",
204
    "Koha::Schema::Result::Borrower",
224
  "Koha::Schema::Result::Borrower",
205
    { borrowernumber => "borrowernumber" },
225
  { borrowernumber => "borrowernumber" },
206
    { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
226
  {
227
    is_deferrable => 1,
228
    join_type     => "LEFT",
229
    on_delete     => "RESTRICT",
230
    on_update     => "CASCADE",
231
  },
207
);
232
);
208
233
209
__PACKAGE__->belongs_to(
234
__PACKAGE__->belongs_to(
(-)a/Koha/Schema/Result/Item.pm (-15 lines)
Lines 403-423 __PACKAGE__->add_unique_constraint("itembarcodeidx", ["barcode"]); Link Here
403
403
404
=head1 RELATIONS
404
=head1 RELATIONS
405
405
406
=head2 accountlines
407
408
Type: has_many
409
410
Related object: L<Koha::Schema::Result::Accountline>
411
412
=cut
413
414
__PACKAGE__->has_many(
415
  "accountlines",
416
  "Koha::Schema::Result::Accountline",
417
  { "foreign.itemnumber" => "self.itemnumber" },
418
  { cascade_copy => 0, cascade_delete => 0 },
419
);
420
421
=head2 biblioitemnumber
406
=head2 biblioitemnumber
422
407
423
Type: belongs_to
408
Type: belongs_to
(-)a/Koha/Schema/Result/OldIssue.pm (-2 / +47 lines)
Lines 23-28 __PACKAGE__->table("old_issues"); Link Here
23
23
24
=head1 ACCESSORS
24
=head1 ACCESSORS
25
25
26
=head2 issue_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
26
=head2 borrowernumber
32
=head2 borrowernumber
27
33
28
  data_type: 'integer'
34
  data_type: 'integer'
Lines 104-109 __PACKAGE__->table("old_issues"); Link Here
104
=cut
110
=cut
105
111
106
__PACKAGE__->add_columns(
112
__PACKAGE__->add_columns(
113
  "issue_id",
114
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
107
  "borrowernumber",
115
  "borrowernumber",
108
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
116
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
109
  "itemnumber",
117
  "itemnumber",
Lines 153-158 __PACKAGE__->add_columns( Link Here
153
  { data_type => "integer", default_value => 0, is_nullable => 0 },
161
  { data_type => "integer", default_value => 0, is_nullable => 0 },
154
);
162
);
155
163
164
=head1 PRIMARY KEY
165
166
=over 4
167
168
=item * L</issue_id>
169
170
=back
171
172
=cut
173
174
__PACKAGE__->set_primary_key("issue_id");
175
156
=head1 RELATIONS
176
=head1 RELATIONS
157
177
158
=head2 borrowernumber
178
=head2 borrowernumber
Lines 199-204 __PACKAGE__->belongs_to( Link Here
199
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-11-03 10:40:55
219
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-11-03 10:40:55
200
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lNB9CDFcwG4DjD0pl14mvQ
220
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lNB9CDFcwG4DjD0pl14mvQ
201
221
222
__PACKAGE__->belongs_to(
223
  "borrower",
224
  "Koha::Schema::Result::Borrower",
225
  { borrowernumber => "borrowernumber" },
226
  { join_type => "LEFT" },
227
);
228
229
__PACKAGE__->belongs_to(
230
  "item",
231
  "Koha::Schema::Result::Item",
232
  { itemnumber => "itemnumber" },
233
  { join_type => "LEFT" },
234
);
235
236
__PACKAGE__->belongs_to(
237
  "deletedborrower",
238
  "Koha::Schema::Result::Deletedborrower",
239
  { borrowernumber => "borrowernumber" },
240
  { join_type => "LEFT" },
241
);
242
243
__PACKAGE__->belongs_to(
244
  "deleteditem",
245
  "Koha::Schema::Result::Deleteditem",
246
  { itemnumber => "itemnumber" },
247
  { join_type => "LEFT" },
248
);
202
249
203
# You can replace this text with custom content, and it will be preserved on regeneration
204
1;
250
1;
205
- 

Return to bug 6427