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

(-)a/Koha/Schema/Result/AccountCreditType.pm (+113 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::AccountCreditType;
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::AccountCreditType
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<account_credit_types>
19
20
=cut
21
22
__PACKAGE__->table("account_credit_types");
23
24
=head1 ACCESSORS
25
26
=head2 code
27
28
  data_type: 'varchar'
29
  is_nullable: 0
30
  size: 80
31
32
=head2 description
33
34
  data_type: 'varchar'
35
  is_nullable: 1
36
  size: 200
37
38
=head2 can_be_added_manually
39
40
  data_type: 'tinyint'
41
  default_value: 1
42
  is_nullable: 0
43
44
=head2 is_system
45
46
  data_type: 'tinyint'
47
  default_value: 0
48
  is_nullable: 0
49
50
=cut
51
52
__PACKAGE__->add_columns(
53
  "code",
54
  { data_type => "varchar", is_nullable => 0, size => 80 },
55
  "description",
56
  { data_type => "varchar", is_nullable => 1, size => 200 },
57
  "can_be_added_manually",
58
  { data_type => "tinyint", default_value => 1, is_nullable => 0 },
59
  "is_system",
60
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
61
);
62
63
=head1 PRIMARY KEY
64
65
=over 4
66
67
=item * L</code>
68
69
=back
70
71
=cut
72
73
__PACKAGE__->set_primary_key("code");
74
75
=head1 RELATIONS
76
77
=head2 account_credit_types_branches
78
79
Type: has_many
80
81
Related object: L<Koha::Schema::Result::AccountCreditTypesBranch>
82
83
=cut
84
85
__PACKAGE__->has_many(
86
  "account_credit_types_branches",
87
  "Koha::Schema::Result::AccountCreditTypesBranch",
88
  { "foreign.credit_type_code" => "self.code" },
89
  { cascade_copy => 0, cascade_delete => 0 },
90
);
91
92
=head2 accountlines
93
94
Type: has_many
95
96
Related object: L<Koha::Schema::Result::Accountline>
97
98
=cut
99
100
__PACKAGE__->has_many(
101
  "accountlines",
102
  "Koha::Schema::Result::Accountline",
103
  { "foreign.credit_type_code" => "self.code" },
104
  { cascade_copy => 0, cascade_delete => 0 },
105
);
106
107
108
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-14 09:59:52
109
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Uycu/23b681kWHNX+/gNiw
110
111
112
# You can replace this text with custom code or comments, and it will be preserved on regeneration
113
1;
(-)a/Koha/Schema/Result/AccountCreditTypesBranch.pm (+97 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::AccountCreditTypesBranch;
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::AccountCreditTypesBranch
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<account_credit_types_branches>
19
20
=cut
21
22
__PACKAGE__->table("account_credit_types_branches");
23
24
=head1 ACCESSORS
25
26
=head2 credit_type_code
27
28
  data_type: 'varchar'
29
  is_foreign_key: 1
30
  is_nullable: 1
31
  size: 80
32
33
=head2 branchcode
34
35
  data_type: 'varchar'
36
  is_foreign_key: 1
37
  is_nullable: 1
38
  size: 10
39
40
=cut
41
42
__PACKAGE__->add_columns(
43
  "credit_type_code",
44
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
45
  "branchcode",
46
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
47
);
48
49
=head1 RELATIONS
50
51
=head2 branchcode
52
53
Type: belongs_to
54
55
Related object: L<Koha::Schema::Result::Branch>
56
57
=cut
58
59
__PACKAGE__->belongs_to(
60
  "branchcode",
61
  "Koha::Schema::Result::Branch",
62
  { branchcode => "branchcode" },
63
  {
64
    is_deferrable => 1,
65
    join_type     => "LEFT",
66
    on_delete     => "CASCADE",
67
    on_update     => "RESTRICT",
68
  },
69
);
70
71
=head2 credit_type_code
72
73
Type: belongs_to
74
75
Related object: L<Koha::Schema::Result::AccountCreditType>
76
77
=cut
78
79
__PACKAGE__->belongs_to(
80
  "credit_type_code",
81
  "Koha::Schema::Result::AccountCreditType",
82
  { code => "credit_type_code" },
83
  {
84
    is_deferrable => 1,
85
    join_type     => "LEFT",
86
    on_delete     => "CASCADE",
87
    on_update     => "RESTRICT",
88
  },
89
);
90
91
92
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-14 09:59:52
93
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1oX/zPeT8gmc3ZwdTiyovA
94
95
96
# You can replace this text with custom code or comments, and it will be preserved on regeneration
97
1;
(-)a/Koha/Schema/Result/Accountline.pm (-5 / +26 lines)
Lines 63-71 __PACKAGE__->table("accountlines"); Link Here
63
  data_type: 'longtext'
63
  data_type: 'longtext'
64
  is_nullable: 1
64
  is_nullable: 1
65
65
66
=head2 accounttype
66
=head2 credit_type_code
67
67
68
  data_type: 'varchar'
68
  data_type: 'varchar'
69
  is_foreign_key: 1
69
  is_nullable: 1
70
  is_nullable: 1
70
  size: 80
71
  size: 80
71
72
Lines 148-155 __PACKAGE__->add_columns( Link Here
148
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
149
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
149
  "description",
150
  "description",
150
  { data_type => "longtext", is_nullable => 1 },
151
  { data_type => "longtext", is_nullable => 1 },
151
  "accounttype",
152
  "credit_type_code",
152
  { data_type => "varchar", is_nullable => 1, size => 80 },
153
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
153
  "debit_type_code",
154
  "debit_type_code",
154
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
155
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
155
  "status",
156
  "status",
Lines 261-266 __PACKAGE__->belongs_to( Link Here
261
  },
262
  },
262
);
263
);
263
264
265
=head2 credit_type_code
266
267
Type: belongs_to
268
269
Related object: L<Koha::Schema::Result::AccountCreditType>
270
271
=cut
272
273
__PACKAGE__->belongs_to(
274
  "credit_type_code",
275
  "Koha::Schema::Result::AccountCreditType",
276
  { code => "credit_type_code" },
277
  {
278
    is_deferrable => 1,
279
    join_type     => "LEFT",
280
    on_delete     => "SET NULL",
281
    on_update     => "CASCADE",
282
  },
283
);
284
264
=head2 debit_type_code
285
=head2 debit_type_code
265
286
266
Type: belongs_to
287
Type: belongs_to
Lines 342-349 __PACKAGE__->belongs_to( Link Here
342
);
363
);
343
364
344
365
345
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-11 11:36:33
366
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-14 09:59:52
346
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WZ2Mcd5gwQc69yDSEsJHGA
367
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vlCQOQhtMztgyn5M5KVdOg
347
368
348
sub koha_objects_class {
369
sub koha_objects_class {
349
    'Koha::Account::Lines';
370
    'Koha::Account::Lines';
(-)a/Koha/Schema/Result/Branch.pm (-3 / +17 lines)
Lines 211-216 __PACKAGE__->set_primary_key("branchcode"); Link Here
211
211
212
=head1 RELATIONS
212
=head1 RELATIONS
213
213
214
=head2 account_credit_types_branches
215
216
Type: has_many
217
218
Related object: L<Koha::Schema::Result::AccountCreditTypesBranch>
219
220
=cut
221
222
__PACKAGE__->has_many(
223
  "account_credit_types_branches",
224
  "Koha::Schema::Result::AccountCreditTypesBranch",
225
  { "foreign.branchcode" => "self.branchcode" },
226
  { cascade_copy => 0, cascade_delete => 0 },
227
);
228
214
=head2 account_debit_types_branches
229
=head2 account_debit_types_branches
215
230
216
Type: has_many
231
Type: has_many
Lines 692-699 __PACKAGE__->has_many( Link Here
692
);
707
);
693
708
694
709
695
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-11 11:36:33
710
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-14 09:59:52
696
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HCQKMSgKhVKtDSrvs1IeRg
711
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vWDJAm3K2jiyRS3htyip6A
697
712
698
__PACKAGE__->add_columns(
713
__PACKAGE__->add_columns(
699
    '+pickup_location' => { is_boolean => 1 }
714
    '+pickup_location' => { is_boolean => 1 }
700
- 

Return to bug 23805