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

(-)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 (-41 / +80 lines)
Lines 1-12 Link Here
1
use utf8;
1
use utf8;
2
package Koha::Schema::Result::Accountoffset;
2
package Koha::Schema::Result::AccountOffset;
3
3
4
# Created by DBIx::Class::Schema::Loader
4
# Created by DBIx::Class::Schema::Loader
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
6
7
=head1 NAME
7
=head1 NAME
8
8
9
Koha::Schema::Result::Accountoffset
9
Koha::Schema::Result::AccountOffset
10
10
11
=cut
11
=cut
12
12
Lines 15-54 use warnings; Link Here
15
15
16
use base 'DBIx::Class::Core';
16
use base 'DBIx::Class::Core';
17
17
18
=head1 TABLE: C<accountoffsets>
18
=head1 TABLE: C<account_offsets>
19
19
20
=cut
20
=cut
21
21
22
__PACKAGE__->table("accountoffsets");
22
__PACKAGE__->table("account_offsets");
23
23
24
=head1 ACCESSORS
24
=head1 ACCESSORS
25
25
26
=head2 borrowernumber
26
=head2 id
27
27
28
  data_type: 'integer'
28
  data_type: 'integer'
29
  default_value: 0
29
  is_auto_increment: 1
30
  is_foreign_key: 1
31
  is_nullable: 0
30
  is_nullable: 0
32
31
33
=head2 accountno
32
=head2 credit_id
34
33
35
  data_type: 'smallint'
34
  data_type: 'integer'
36
  default_value: 0
35
  is_foreign_key: 1
37
  is_nullable: 0
36
  is_nullable: 1
38
37
39
=head2 offsetaccount
38
=head2 debit_id
39
40
  data_type: 'integer'
41
  is_foreign_key: 1
42
  is_nullable: 1
40
43
41
  data_type: 'smallint'
44
=head2 type
42
  default_value: 0
45
46
  data_type: 'varchar'
43
  is_nullable: 0
47
  is_nullable: 0
48
  size: 16
44
49
45
=head2 offsetamount
50
=head2 amount
46
51
47
  data_type: 'decimal'
52
  data_type: 'decimal'
48
  is_nullable: 1
53
  is_nullable: 0
49
  size: [28,6]
54
  size: [26,6]
50
55
51
=head2 timestamp
56
=head2 created_on
52
57
53
  data_type: 'timestamp'
58
  data_type: 'timestamp'
54
  datetime_undef_if_invalid: 1
59
  datetime_undef_if_invalid: 1
Lines 58-77 __PACKAGE__->table("accountoffsets"); Link Here
58
=cut
63
=cut
59
64
60
__PACKAGE__->add_columns(
65
__PACKAGE__->add_columns(
61
  "borrowernumber",
66
  "id",
62
  {
67
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
63
    data_type      => "integer",
68
  "credit_id",
64
    default_value  => 0,
69
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
65
    is_foreign_key => 1,
70
  "debit_id",
66
    is_nullable    => 0,
71
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
67
  },
72
  "type",
68
  "accountno",
73
  { data_type => "varchar", is_nullable => 0, size => 16 },
69
  { data_type => "smallint", default_value => 0, is_nullable => 0 },
74
  "amount",
70
  "offsetaccount",
75
  { data_type => "decimal", is_nullable => 0, size => [26, 6] },
71
  { data_type => "smallint", default_value => 0, is_nullable => 0 },
76
  "created_on",
72
  "offsetamount",
73
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
74
  "timestamp",
75
  {
77
  {
76
    data_type => "timestamp",
78
    data_type => "timestamp",
77
    datetime_undef_if_invalid => 1,
79
    datetime_undef_if_invalid => 1,
Lines 80-106 __PACKAGE__->add_columns( Link Here
80
  },
82
  },
81
);
83
);
82
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
83
=head1 RELATIONS
97
=head1 RELATIONS
84
98
85
=head2 borrowernumber
99
=head2 credit
86
100
87
Type: belongs_to
101
Type: belongs_to
88
102
89
Related object: L<Koha::Schema::Result::Borrower>
103
Related object: L<Koha::Schema::Result::Accountline>
90
104
91
=cut
105
=cut
92
106
93
__PACKAGE__->belongs_to(
107
__PACKAGE__->belongs_to(
94
  "borrowernumber",
108
  "credit",
95
  "Koha::Schema::Result::Borrower",
109
  "Koha::Schema::Result::Accountline",
96
  { borrowernumber => "borrowernumber" },
110
  { accountlines_id => "credit_id" },
97
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
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
  },
98
);
137
);
99
138
100
139
101
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
140
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-07-12 14:26:28
102
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OTfcUiJCPb5aU/gjqAb/bA
141
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eu/gSdbAUL5bwhcvC+MGsw
103
142
104
143
105
# You can replace this text with custom content, and it will be preserved on regeneration
144
# You can replace this text with custom code or comments, and it will be preserved on regeneration
106
1;
145
1;
(-)a/Koha/Schema/Result/Borrower.pm (-18 / +2 lines)
Lines 673-693 __PACKAGE__->has_many( Link Here
673
  { cascade_copy => 0, cascade_delete => 0 },
673
  { cascade_copy => 0, cascade_delete => 0 },
674
);
674
);
675
675
676
=head2 accountoffsets
677
678
Type: has_many
679
680
Related object: L<Koha::Schema::Result::Accountoffset>
681
682
=cut
683
684
__PACKAGE__->has_many(
685
  "accountoffsets",
686
  "Koha::Schema::Result::Accountoffset",
687
  { "foreign.borrowernumber" => "self.borrowernumber" },
688
  { cascade_copy => 0, cascade_delete => 0 },
689
);
690
691
=head2 aqbasketusers
676
=head2 aqbasketusers
692
677
693
Type: has_many
678
Type: has_many
Lines 1334-1341 Composing rels: L</aqorder_users> -> ordernumber Link Here
1334
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1319
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1335
1320
1336
1321
1337
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-31 10:39:35
1322
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-01-19 14:42:05
1338
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lc6GQ2E7d+tyzTk3v2sWjQ
1323
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CBJKHM62c0zXbjX9gK8MSw
1339
1324
1340
__PACKAGE__->belongs_to(
1325
__PACKAGE__->belongs_to(
1341
    "guarantor",
1326
    "guarantor",
1342
- 

Return to bug 14826