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 optional authorised value PAYMENT_TYPE
102 =head2 amountoutstanding
110 data_type: 'timestamp'
111 datetime_undef_if_invalid: 1
112 default_value: current_timestamp
117 data_type: 'mediumtext'
145 the branchcode of the library where a payment was made, a manual invoice created, etc.
149 __PACKAGE__->add_columns(
151 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
153 { data_type => "integer", is_nullable => 1 },
155 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
157 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
160 data_type => "timestamp",
161 datetime_undef_if_invalid => 1,
165 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
167 { data_type => "longtext", is_nullable => 1 },
169 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
171 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
173 { data_type => "varchar", is_nullable => 1, size => 20 },
175 { data_type => "varchar", is_nullable => 1, size => 16 },
177 { data_type => "varchar", is_nullable => 1, size => 80 },
179 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
182 data_type => "timestamp",
183 datetime_undef_if_invalid => 1,
184 default_value => \"current_timestamp",
188 { data_type => "mediumtext", is_nullable => 1 },
190 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
192 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
194 { data_type => "varchar", is_nullable => 0, size => 16 },
196 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
203 =item * L</accountlines_id>
209 __PACKAGE__->set_primary_key("accountlines_id");
213 =head2 account_offsets_credits
217 Related object: L<Koha::Schema::Result::AccountOffset>
221 __PACKAGE__->has_many(
222 "account_offsets_credits",
223 "Koha::Schema::Result::AccountOffset",
224 { "foreign.credit_id" => "self.accountlines_id" },
225 { cascade_copy => 0, cascade_delete => 0 },
228 =head2 account_offsets_debits
232 Related object: L<Koha::Schema::Result::AccountOffset>
236 __PACKAGE__->has_many(
237 "account_offsets_debits",
238 "Koha::Schema::Result::AccountOffset",
239 { "foreign.debit_id" => "self.accountlines_id" },
240 { cascade_copy => 0, cascade_delete => 0 },
243 =head2 borrowernumber
247 Related object: L<Koha::Schema::Result::Borrower>
251 __PACKAGE__->belongs_to(
253 "Koha::Schema::Result::Borrower",
254 { borrowernumber => "borrowernumber" },
258 on_delete => "SET NULL",
259 on_update => "CASCADE",
267 Related object: L<Koha::Schema::Result::Branch>
271 __PACKAGE__->belongs_to(
273 "Koha::Schema::Result::Branch",
274 { branchcode => "branchcode" },
278 on_delete => "SET NULL",
279 on_update => "CASCADE",
283 =head2 credit_type_code
287 Related object: L<Koha::Schema::Result::AccountCreditType>
291 __PACKAGE__->belongs_to(
293 "Koha::Schema::Result::AccountCreditType",
294 { code => "credit_type_code" },
298 on_delete => "RESTRICT",
299 on_update => "CASCADE",
303 =head2 debit_type_code
307 Related object: L<Koha::Schema::Result::AccountDebitType>
311 __PACKAGE__->belongs_to(
313 "Koha::Schema::Result::AccountDebitType",
314 { code => "debit_type_code" },
318 on_delete => "RESTRICT",
319 on_update => "CASCADE",
327 Related object: L<Koha::Schema::Result::Item>
331 __PACKAGE__->belongs_to(
333 "Koha::Schema::Result::Item",
334 { itemnumber => "itemnumber" },
338 on_delete => "SET NULL",
339 on_update => "CASCADE",
347 Related object: L<Koha::Schema::Result::Borrower>
351 __PACKAGE__->belongs_to(
353 "Koha::Schema::Result::Borrower",
354 { borrowernumber => "manager_id" },
358 on_delete => "SET NULL",
359 on_update => "CASCADE",
367 Related object: L<Koha::Schema::Result::CashRegister>
371 __PACKAGE__->belongs_to(
373 "Koha::Schema::Result::CashRegister",
374 { id => "register_id" },
378 on_delete => "SET NULL",
379 on_update => "CASCADE",
384 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
385 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MBdnk+5gD5TMX/ZOqEf3kA
391 Related object: L<Koha::Schema::Result::Branch>
395 __PACKAGE__->belongs_to(
397 "Koha::Schema::Result::Branch",
398 { branchcode => "branchcode" },
402 on_delete => "SET NULL",
403 on_update => "CASCADE",
407 sub koha_objects_class {
408 'Koha::Account::Lines';
410 sub koha_object_class {
411 'Koha::Account::Line';