2016-06-26 17:49:12 +02:00
|
|
|
use strict;
|
|
|
|
|
2016-07-03 22:05:53 +02:00
|
|
|
package TrsrDB::CurrentArrears;
|
2016-06-26 17:49:12 +02:00
|
|
|
use base qw/DBIx::Class::Core/;
|
|
|
|
|
2016-07-03 22:05:53 +02:00
|
|
|
__PACKAGE__->table('CurrentArrears');
|
2016-06-26 17:49:12 +02:00
|
|
|
__PACKAGE__->add_columns(qw/billId debtor targetCredit date purpose difference/);
|
|
|
|
__PACKAGE__->set_primary_key("billId");
|
|
|
|
|
|
|
|
__PACKAGE__->belongs_to(
|
2016-07-06 22:28:56 +02:00
|
|
|
debtor => 'TrsrDB::Account',
|
|
|
|
{ 'foreign.ID' => 'self.debtor' }
|
2016-06-26 17:49:12 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
__PACKAGE__->many_to_many(
|
2016-07-06 22:28:56 +02:00
|
|
|
payable_with => debtor => 'available_credits'
|
2016-06-26 17:49:12 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
1;
|