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
52 datetime_undef_if_invalid: 1
66 =head2 credit_type_code
73 =head2 debit_type_code
92 =head2 amountoutstanding
100 data_type: 'timestamp'
101 datetime_undef_if_invalid: 1
102 default_value: current_timestamp
107 data_type: 'mediumtext'
137 __PACKAGE__->add_columns(
139 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
141 { data_type => "integer", is_nullable => 1 },
143 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
145 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
147 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
149 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
151 { data_type => "longtext", is_nullable => 1 },
153 { 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 },
157 { data_type => "varchar", is_nullable => 1, size => 16 },
159 { data_type => "varchar", is_nullable => 1, size => 80 },
161 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
164 data_type => "timestamp",
165 datetime_undef_if_invalid => 1,
166 default_value => \"current_timestamp",
170 { data_type => "mediumtext", is_nullable => 1 },
172 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
174 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
176 { data_type => "varchar", is_nullable => 0, size => 16 },
178 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
185 =item * L</accountlines_id>
191 __PACKAGE__->set_primary_key("accountlines_id");
195 =head2 account_offsets_credits
199 Related object: L<Koha::Schema::Result::AccountOffset>
203 __PACKAGE__->has_many(
204 "account_offsets_credits",
205 "Koha::Schema::Result::AccountOffset",
206 { "foreign.credit_id" => "self.accountlines_id" },
207 { cascade_copy => 0, cascade_delete => 0 },
210 =head2 account_offsets_debits
214 Related object: L<Koha::Schema::Result::AccountOffset>
218 __PACKAGE__->has_many(
219 "account_offsets_debits",
220 "Koha::Schema::Result::AccountOffset",
221 { "foreign.debit_id" => "self.accountlines_id" },
222 { cascade_copy => 0, cascade_delete => 0 },
225 =head2 borrowernumber
229 Related object: L<Koha::Schema::Result::Borrower>
233 __PACKAGE__->belongs_to(
235 "Koha::Schema::Result::Borrower",
236 { borrowernumber => "borrowernumber" },
240 on_delete => "SET NULL",
241 on_update => "CASCADE",
249 Related object: L<Koha::Schema::Result::Branch>
253 __PACKAGE__->belongs_to(
255 "Koha::Schema::Result::Branch",
256 { branchcode => "branchcode" },
260 on_delete => "SET NULL",
261 on_update => "CASCADE",
265 =head2 credit_type_code
269 Related object: L<Koha::Schema::Result::AccountCreditType>
273 __PACKAGE__->belongs_to(
275 "Koha::Schema::Result::AccountCreditType",
276 { code => "credit_type_code" },
280 on_delete => "RESTRICT",
281 on_update => "CASCADE",
285 =head2 debit_type_code
289 Related object: L<Koha::Schema::Result::AccountDebitType>
293 __PACKAGE__->belongs_to(
295 "Koha::Schema::Result::AccountDebitType",
296 { code => "debit_type_code" },
300 on_delete => "RESTRICT",
301 on_update => "CASCADE",
309 Related object: L<Koha::Schema::Result::Item>
313 __PACKAGE__->belongs_to(
315 "Koha::Schema::Result::Item",
316 { itemnumber => "itemnumber" },
320 on_delete => "SET NULL",
321 on_update => "CASCADE",
329 Related object: L<Koha::Schema::Result::Borrower>
333 __PACKAGE__->belongs_to(
335 "Koha::Schema::Result::Borrower",
336 { borrowernumber => "manager_id" },
340 on_delete => "SET NULL",
341 on_update => "CASCADE",
349 Related object: L<Koha::Schema::Result::CashRegister>
353 __PACKAGE__->belongs_to(
355 "Koha::Schema::Result::CashRegister",
356 { id => "register_id" },
360 on_delete => "SET NULL",
361 on_update => "CASCADE",
366 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-24 16:33:42
367 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:q4Ahb8xIxAsjT/aF9yjrdQ
369 sub koha_objects_class {
370 'Koha::Account::Lines';
372 sub koha_object_class {
373 'Koha::Account::Line';