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

(-)a/Koha/Schema/Result/AccountOffset.pm (+145 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 id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 credit_id
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 1
37
38
=head2 debit_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: 0
48
  size: 16
49
50
=head2 amount
51
52
  data_type: 'decimal'
53
  is_nullable: 0
54
  size: [26,6]
55
56
=head2 created_on
57
58
  data_type: 'timestamp'
59
  datetime_undef_if_invalid: 1
60
  default_value: current_timestamp
61
  is_nullable: 0
62
63
=cut
64
65
__PACKAGE__->add_columns(
66
  "id",
67
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
68
  "credit_id",
69
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
70
  "debit_id",
71
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
72
  "type",
73
  { data_type => "varchar", is_nullable => 0, size => 16 },
74
  "amount",
75
  { data_type => "decimal", is_nullable => 0, size => [26, 6] },
76
  "created_on",
77
  {
78
    data_type => "timestamp",
79
    datetime_undef_if_invalid => 1,
80
    default_value => \"current_timestamp",
81
    is_nullable => 0,
82
  },
83
);
84
85
=head1 PRIMARY KEY
86
87
=over 4
88
89
=item * L</id>
90
91
=back
92
93
=cut
94
95
__PACKAGE__->set_primary_key("id");
96
97
=head1 RELATIONS
98
99
=head2 credit
100
101
Type: belongs_to
102
103
Related object: L<Koha::Schema::Result::Accountline>
104
105
=cut
106
107
__PACKAGE__->belongs_to(
108
  "credit",
109
  "Koha::Schema::Result::Accountline",
110
  { accountlines_id => "credit_id" },
111
  {
112
    is_deferrable => 1,
113
    join_type     => "LEFT",
114
    on_delete     => "CASCADE",
115
    on_update     => "CASCADE",
116
  },
117
);
118
119
=head2 debit
120
121
Type: belongs_to
122
123
Related object: L<Koha::Schema::Result::Accountline>
124
125
=cut
126
127
__PACKAGE__->belongs_to(
128
  "debit",
129
  "Koha::Schema::Result::Accountline",
130
  { accountlines_id => "debit_id" },
131
  {
132
    is_deferrable => 1,
133
    join_type     => "LEFT",
134
    on_delete     => "CASCADE",
135
    on_update     => "CASCADE",
136
  },
137
);
138
139
140
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-07-12 14:26:28
141
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eu/gSdbAUL5bwhcvC+MGsw
142
143
144
# You can replace this text with custom code or comments, and it will be preserved on regeneration
145
1;
(-)a/Koha/Schema/Result/Accountline.pm (-2 / +32 lines)
Lines 185-190 __PACKAGE__->set_primary_key("accountlines_id"); Link Here
185
185
186
=head1 RELATIONS
186
=head1 RELATIONS
187
187
188
=head2 account_offsets_credits
189
190
Type: has_many
191
192
Related object: L<Koha::Schema::Result::AccountOffset>
193
194
=cut
195
196
__PACKAGE__->has_many(
197
  "account_offsets_credits",
198
  "Koha::Schema::Result::AccountOffset",
199
  { "foreign.credit_id" => "self.accountlines_id" },
200
  { cascade_copy => 0, cascade_delete => 0 },
201
);
202
203
=head2 account_offsets_debits
204
205
Type: has_many
206
207
Related object: L<Koha::Schema::Result::AccountOffset>
208
209
=cut
210
211
__PACKAGE__->has_many(
212
  "account_offsets_debits",
213
  "Koha::Schema::Result::AccountOffset",
214
  { "foreign.debit_id" => "self.accountlines_id" },
215
  { cascade_copy => 0, cascade_delete => 0 },
216
);
217
188
=head2 borrowernumber
218
=head2 borrowernumber
189
219
190
Type: belongs_to
220
Type: belongs_to
Lines 221-228 __PACKAGE__->belongs_to( Link Here
221
);
251
);
222
252
223
253
224
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-01-26 17:18:34
254
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-07-12 14:26:28
225
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RCQohhphtg+0+RszpB4wLg
255
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:88YKCYpyxgZHWCWQ4X956g
226
256
227
257
228
# You can replace this text with custom content, and it will be preserved on regeneration
258
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Accountoffset.pm (-106 lines)
Lines 1-106 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<accountoffsets>
19
20
=cut
21
22
__PACKAGE__->table("accountoffsets");
23
24
=head1 ACCESSORS
25
26
=head2 borrowernumber
27
28
  data_type: 'integer'
29
  default_value: 0
30
  is_foreign_key: 1
31
  is_nullable: 0
32
33
=head2 accountno
34
35
  data_type: 'smallint'
36
  default_value: 0
37
  is_nullable: 0
38
39
=head2 offsetaccount
40
41
  data_type: 'smallint'
42
  default_value: 0
43
  is_nullable: 0
44
45
=head2 offsetamount
46
47
  data_type: 'decimal'
48
  is_nullable: 1
49
  size: [28,6]
50
51
=head2 timestamp
52
53
  data_type: 'timestamp'
54
  datetime_undef_if_invalid: 1
55
  default_value: current_timestamp
56
  is_nullable: 0
57
58
=cut
59
60
__PACKAGE__->add_columns(
61
  "borrowernumber",
62
  {
63
    data_type      => "integer",
64
    default_value  => 0,
65
    is_foreign_key => 1,
66
    is_nullable    => 0,
67
  },
68
  "accountno",
69
  { data_type => "smallint", default_value => 0, is_nullable => 0 },
70
  "offsetaccount",
71
  { data_type => "smallint", default_value => 0, is_nullable => 0 },
72
  "offsetamount",
73
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
74
  "timestamp",
75
  {
76
    data_type => "timestamp",
77
    datetime_undef_if_invalid => 1,
78
    default_value => \"current_timestamp",
79
    is_nullable => 0,
80
  },
81
);
82
83
=head1 RELATIONS
84
85
=head2 borrowernumber
86
87
Type: belongs_to
88
89
Related object: L<Koha::Schema::Result::Borrower>
90
91
=cut
92
93
__PACKAGE__->belongs_to(
94
  "borrowernumber",
95
  "Koha::Schema::Result::Borrower",
96
  { borrowernumber => "borrowernumber" },
97
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
98
);
99
100
101
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
102
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OTfcUiJCPb5aU/gjqAb/bA
103
104
105
# You can replace this text with custom content, and it will be preserved on regeneration
106
1;
(-)a/Koha/Schema/Result/Borrower.pm (-18 / +2 lines)
Lines 661-681 __PACKAGE__->has_many( Link Here
661
  { cascade_copy => 0, cascade_delete => 0 },
661
  { cascade_copy => 0, cascade_delete => 0 },
662
);
662
);
663
663
664
=head2 accountoffsets
665
666
Type: has_many
667
668
Related object: L<Koha::Schema::Result::Accountoffset>
669
670
=cut
671
672
__PACKAGE__->has_many(
673
  "accountoffsets",
674
  "Koha::Schema::Result::Accountoffset",
675
  { "foreign.borrowernumber" => "self.borrowernumber" },
676
  { cascade_copy => 0, cascade_delete => 0 },
677
);
678
679
=head2 aqbasketusers
664
=head2 aqbasketusers
680
665
681
Type: has_many
666
Type: has_many
Lines 1232-1239 Composing rels: L</aqorder_users> -> ordernumber Link Here
1232
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1217
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1233
1218
1234
1219
1235
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-07-08 13:37:33
1220
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-07-12 13:45:54
1236
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GiEcKBFRhzHwXPekj6fSPg
1221
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AeU4me6MM3qpKLzJryVeQw
1237
1222
1238
__PACKAGE__->belongs_to(
1223
__PACKAGE__->belongs_to(
1239
    "guarantor",
1224
    "guarantor",
1240
- 

Return to bug 14826