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
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 },
148 data_type => "timestamp",
149 datetime_undef_if_invalid => 1,
153 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
155 { data_type => "longtext", is_nullable => 1 },
157 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
159 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
161 { data_type => "varchar", is_nullable => 1, size => 16 },
163 { data_type => "varchar", is_nullable => 1, size => 80 },
165 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
168 data_type => "timestamp",
169 datetime_undef_if_invalid => 1,
170 default_value => \"current_timestamp",
174 { data_type => "mediumtext", is_nullable => 1 },
176 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
178 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
180 { data_type => "varchar", is_nullable => 0, size => 16 },
182 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
189 =item * L</accountlines_id>
195 __PACKAGE__->set_primary_key("accountlines_id");
199 =head2 account_offsets_credits
203 Related object: L<Koha::Schema::Result::AccountOffset>
207 __PACKAGE__->has_many(
208 "account_offsets_credits",
209 "Koha::Schema::Result::AccountOffset",
210 { "foreign.credit_id" => "self.accountlines_id" },
211 { cascade_copy => 0, cascade_delete => 0 },
214 =head2 account_offsets_debits
218 Related object: L<Koha::Schema::Result::AccountOffset>
222 __PACKAGE__->has_many(
223 "account_offsets_debits",
224 "Koha::Schema::Result::AccountOffset",
225 { "foreign.debit_id" => "self.accountlines_id" },
226 { cascade_copy => 0, cascade_delete => 0 },
229 =head2 borrowernumber
233 Related object: L<Koha::Schema::Result::Borrower>
237 __PACKAGE__->belongs_to(
239 "Koha::Schema::Result::Borrower",
240 { borrowernumber => "borrowernumber" },
244 on_delete => "SET NULL",
245 on_update => "CASCADE",
253 Related object: L<Koha::Schema::Result::Branch>
257 __PACKAGE__->belongs_to(
259 "Koha::Schema::Result::Branch",
260 { branchcode => "branchcode" },
264 on_delete => "SET NULL",
265 on_update => "CASCADE",
269 =head2 credit_type_code
273 Related object: L<Koha::Schema::Result::AccountCreditType>
277 __PACKAGE__->belongs_to(
279 "Koha::Schema::Result::AccountCreditType",
280 { code => "credit_type_code" },
284 on_delete => "RESTRICT",
285 on_update => "CASCADE",
289 =head2 debit_type_code
293 Related object: L<Koha::Schema::Result::AccountDebitType>
297 __PACKAGE__->belongs_to(
299 "Koha::Schema::Result::AccountDebitType",
300 { code => "debit_type_code" },
304 on_delete => "RESTRICT",
305 on_update => "CASCADE",
313 Related object: L<Koha::Schema::Result::Item>
317 __PACKAGE__->belongs_to(
319 "Koha::Schema::Result::Item",
320 { itemnumber => "itemnumber" },
324 on_delete => "SET NULL",
325 on_update => "CASCADE",
333 Related object: L<Koha::Schema::Result::Borrower>
337 __PACKAGE__->belongs_to(
339 "Koha::Schema::Result::Borrower",
340 { borrowernumber => "manager_id" },
344 on_delete => "SET NULL",
345 on_update => "CASCADE",
353 Related object: L<Koha::Schema::Result::CashRegister>
357 __PACKAGE__->belongs_to(
359 "Koha::Schema::Result::CashRegister",
360 { id => "register_id" },
364 on_delete => "SET NULL",
365 on_update => "CASCADE",
370 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-19 09:20:20
371 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BuE4CYsSH4BwXZoQKE2MWw
377 Related object: L<Koha::Schema::Result::Branch>
381 __PACKAGE__->belongs_to(
383 "Koha::Schema::Result::Branch",
384 { branchcode => "branchcode" },
388 on_delete => "SET NULL",
389 on_update => "CASCADE",
393 sub koha_objects_class {
394 'Koha::Account::Lines';
396 sub koha_object_class {
397 'Koha::Account::Line';