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

(-)a/Koha/Schema/Result/AcDebitTypesBranch.pm (+97 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::AcDebitTypesBranch;
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::AcDebitTypesBranch
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<ac_debit_types_branches>
19
20
=cut
21
22
__PACKAGE__->table("ac_debit_types_branches");
23
24
=head1 ACCESSORS
25
26
=head2 debit_type_code
27
28
  data_type: 'varchar'
29
  is_foreign_key: 1
30
  is_nullable: 1
31
  size: 16
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
  "debit_type_code",
44
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 16 },
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 debit_type_code
72
73
Type: belongs_to
74
75
Related object: L<Koha::Schema::Result::AccountDebitType>
76
77
=cut
78
79
__PACKAGE__->belongs_to(
80
  "debit_type_code",
81
  "Koha::Schema::Result::AccountDebitType",
82
  { code => "debit_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-09-26 15:59:23
93
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:y7zhbS7uj5zRCOskakhzLA
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/AccountDebitType.pm (+113 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::AccountDebitType;
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::AccountDebitType
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<account_debit_types>
19
20
=cut
21
22
__PACKAGE__->table("account_debit_types");
23
24
=head1 ACCESSORS
25
26
=head2 code
27
28
  data_type: 'varchar'
29
  is_nullable: 0
30
  size: 16
31
32
=head2 default_amount
33
34
  data_type: 'decimal'
35
  is_nullable: 1
36
  size: [28,6]
37
38
=head2 description
39
40
  data_type: 'varchar'
41
  is_nullable: 1
42
  size: 200
43
44
=head2 can_be_added_manually
45
46
  data_type: 'tinyint'
47
  default_value: 1
48
  is_nullable: 0
49
50
=cut
51
52
__PACKAGE__->add_columns(
53
  "code",
54
  { data_type => "varchar", is_nullable => 0, size => 16 },
55
  "default_amount",
56
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
57
  "description",
58
  { data_type => "varchar", is_nullable => 1, size => 200 },
59
  "can_be_added_manually",
60
  { data_type => "tinyint", default_value => 1, 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 ac_debit_types_branches
78
79
Type: has_many
80
81
Related object: L<Koha::Schema::Result::AcDebitTypesBranch>
82
83
=cut
84
85
__PACKAGE__->has_many(
86
  "ac_debit_types_branches",
87
  "Koha::Schema::Result::AcDebitTypesBranch",
88
  { "foreign.debit_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.debit_type" => "self.code" },
104
  { cascade_copy => 0, cascade_delete => 0 },
105
);
106
107
108
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-09-26 15:59:23
109
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jMTwuzzf39606BEjXzPGng
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/Accountline.pm (-2 / +31 lines)
Lines 69-74 __PACKAGE__->table("accountlines"); Link Here
69
  is_nullable: 1
69
  is_nullable: 1
70
  size: 80
70
  size: 80
71
71
72
=head2 debit_type
73
74
  data_type: 'varchar'
75
  is_foreign_key: 1
76
  is_nullable: 1
77
  size: 16
78
72
=head2 status
79
=head2 status
73
80
74
  data_type: 'varchar'
81
  data_type: 'varchar'
Lines 143-148 __PACKAGE__->add_columns( Link Here
143
  { data_type => "longtext", is_nullable => 1 },
150
  { data_type => "longtext", is_nullable => 1 },
144
  "accounttype",
151
  "accounttype",
145
  { data_type => "varchar", is_nullable => 1, size => 80 },
152
  { data_type => "varchar", is_nullable => 1, size => 80 },
153
  "debit_type",
154
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 16 },
146
  "status",
155
  "status",
147
  { data_type => "varchar", is_nullable => 1, size => 16 },
156
  { data_type => "varchar", is_nullable => 1, size => 16 },
148
  "payment_type",
157
  "payment_type",
Lines 252-257 __PACKAGE__->belongs_to( Link Here
252
  },
261
  },
253
);
262
);
254
263
264
=head2 debit_type
265
266
Type: belongs_to
267
268
Related object: L<Koha::Schema::Result::AccountDebitType>
269
270
=cut
271
272
__PACKAGE__->belongs_to(
273
  "debit_type",
274
  "Koha::Schema::Result::AccountDebitType",
275
  { code => "debit_type" },
276
  {
277
    is_deferrable => 1,
278
    join_type     => "LEFT",
279
    on_delete     => "SET NULL",
280
    on_update     => "CASCADE",
281
  },
282
);
283
255
=head2 itemnumber
284
=head2 itemnumber
256
285
257
Type: belongs_to
286
Type: belongs_to
Lines 313-320 __PACKAGE__->belongs_to( Link Here
313
);
342
);
314
343
315
344
316
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-09-23 10:45:21
345
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-09-26 15:59:23
317
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:L+QlTTT+MdGoA3shpyaBgQ
346
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:d0RP5LSuBHb3UF0Fcof11g
318
347
319
sub koha_objects_class {
348
sub koha_objects_class {
320
    'Koha::Account::Lines';
349
    '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 ac_debit_types_branches
215
216
Type: has_many
217
218
Related object: L<Koha::Schema::Result::AcDebitTypesBranch>
219
220
=cut
221
222
__PACKAGE__->has_many(
223
  "ac_debit_types_branches",
224
  "Koha::Schema::Result::AcDebitTypesBranch",
225
  { "foreign.branchcode" => "self.branchcode" },
226
  { cascade_copy => 0, cascade_delete => 0 },
227
);
228
214
=head2 accountlines
229
=head2 accountlines
215
230
216
Type: has_many
231
Type: has_many
Lines 677-684 __PACKAGE__->has_many( Link Here
677
);
692
);
678
693
679
694
680
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-09-23 10:45:22
695
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-09-26 15:59:23
681
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KDg4i49bpMxXQ1LP6OZFWQ
696
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IiEBfDpMBAi9cv7OqevVRQ
682
697
683
__PACKAGE__->add_columns(
698
__PACKAGE__->add_columns(
684
    '+pickup_location' => { is_boolean => 1 }
699
    '+pickup_location' => { is_boolean => 1 }
685
- 

Return to bug 23049