2 package Koha::Schema::Result::Accountline;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Accountline
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<accountlines>
22 __PACKAGE__->table("accountlines");
26 =head2 accountlines_id
51 data_type: 'timestamp'
52 datetime_undef_if_invalid: 1
66 =head2 credit_type_code
73 =head2 debit_type_code
86 autogenerated number for credits
100 =head2 amountoutstanding
108 data_type: 'timestamp'
109 datetime_undef_if_invalid: 1
110 default_value: current_timestamp
115 data_type: 'mediumtext'
145 __PACKAGE__->add_columns(
147 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
149 { data_type => "integer", is_nullable => 1 },
151 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
153 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
156 data_type => "timestamp",
157 datetime_undef_if_invalid => 1,
161 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
163 { data_type => "longtext", is_nullable => 1 },
165 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
167 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
169 { data_type => "varchar", is_nullable => 1, size => 20 },
171 { data_type => "varchar", is_nullable => 1, size => 16 },
173 { data_type => "varchar", is_nullable => 1, size => 80 },
175 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
178 data_type => "timestamp",
179 datetime_undef_if_invalid => 1,
180 default_value => \"current_timestamp",
184 { data_type => "mediumtext", is_nullable => 1 },
186 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
188 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
190 { data_type => "varchar", is_nullable => 0, size => 16 },
192 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
199 =item * L</accountlines_id>
205 __PACKAGE__->set_primary_key("accountlines_id");
209 =head2 account_offsets_credits
213 Related object: L<Koha::Schema::Result::AccountOffset>
217 __PACKAGE__->has_many(
218 "account_offsets_credits",
219 "Koha::Schema::Result::AccountOffset",
220 { "foreign.credit_id" => "self.accountlines_id" },
221 { cascade_copy => 0, cascade_delete => 0 },
224 =head2 account_offsets_debits
228 Related object: L<Koha::Schema::Result::AccountOffset>
232 __PACKAGE__->has_many(
233 "account_offsets_debits",
234 "Koha::Schema::Result::AccountOffset",
235 { "foreign.debit_id" => "self.accountlines_id" },
236 { cascade_copy => 0, cascade_delete => 0 },
239 =head2 borrowernumber
243 Related object: L<Koha::Schema::Result::Borrower>
247 __PACKAGE__->belongs_to(
249 "Koha::Schema::Result::Borrower",
250 { borrowernumber => "borrowernumber" },
254 on_delete => "SET NULL",
255 on_update => "CASCADE",
263 Related object: L<Koha::Schema::Result::Branch>
267 __PACKAGE__->belongs_to(
269 "Koha::Schema::Result::Branch",
270 { branchcode => "branchcode" },
274 on_delete => "SET NULL",
275 on_update => "CASCADE",
279 =head2 credit_type_code
283 Related object: L<Koha::Schema::Result::AccountCreditType>
287 __PACKAGE__->belongs_to(
289 "Koha::Schema::Result::AccountCreditType",
290 { code => "credit_type_code" },
294 on_delete => "RESTRICT",
295 on_update => "CASCADE",
299 =head2 debit_type_code
303 Related object: L<Koha::Schema::Result::AccountDebitType>
307 __PACKAGE__->belongs_to(
309 "Koha::Schema::Result::AccountDebitType",
310 { code => "debit_type_code" },
314 on_delete => "RESTRICT",
315 on_update => "CASCADE",
323 Related object: L<Koha::Schema::Result::Item>
327 __PACKAGE__->belongs_to(
329 "Koha::Schema::Result::Item",
330 { itemnumber => "itemnumber" },
334 on_delete => "SET NULL",
335 on_update => "CASCADE",
343 Related object: L<Koha::Schema::Result::Borrower>
347 __PACKAGE__->belongs_to(
349 "Koha::Schema::Result::Borrower",
350 { borrowernumber => "manager_id" },
354 on_delete => "SET NULL",
355 on_update => "CASCADE",
363 Related object: L<Koha::Schema::Result::CashRegister>
367 __PACKAGE__->belongs_to(
369 "Koha::Schema::Result::CashRegister",
370 { id => "register_id" },
374 on_delete => "SET NULL",
375 on_update => "CASCADE",
380 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-06-25 09:19:20
381 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:I/S3NLbod+8BgBMcwYz+cA
387 Related object: L<Koha::Schema::Result::Branch>
391 __PACKAGE__->belongs_to(
393 "Koha::Schema::Result::Branch",
394 { branchcode => "branchcode" },
398 on_delete => "SET NULL",
399 on_update => "CASCADE",
403 sub koha_objects_class {
404 'Koha::Account::Lines';
406 sub koha_object_class {
407 'Koha::Account::Line';