treasuredb/TrsrDB/CurrentArrears.pm
Florian "flowdy" Heß 3985b46224 Added TrsrDB::autobalance(). Renamings and fixes.
Renamed "debts" to "arrears", because of psychologically slightly more positive
connotations. Renamed field "Id" of table Credit to "credId" in analogy to
field "billId" of table Debit.
2016-07-03 22:26:58 +02:00

20 lines
426 B
Perl

use strict;
package TrsrDB::CurrentArrears;
use base qw/DBIx::Class::Core/;
__PACKAGE__->table('CurrentArrears');
__PACKAGE__->add_columns(qw/billId debtor targetCredit date purpose difference/);
__PACKAGE__->set_primary_key("billId");
__PACKAGE__->belongs_to(
account => 'TrsrDB::Account',
{ 'foreign.ID' => 'self.account' }
);
__PACKAGE__->many_to_many(
payable_with => account => 'available_credits'
);
1;