3773c3f123
* reworked and used TrsrDB::expand_ids more tightly * account item selection in TrsrDB::make_transfers * web_auth / User relation for coming HTTP interface * income and target inter-relations between TrsrDB::Credit and TrsrDB::Debit * Transfer note * reactivated enforceFixedCredit to take effect unless _temp table is empty * added CreditsInFocus and Report views
43 lines
1002 B
Perl
43 lines
1002 B
Perl
use strict;
|
|
|
|
package TrsrDB::Account;
|
|
use base qw/DBIx::Class::Core/;
|
|
|
|
__PACKAGE__->table('Account');
|
|
__PACKAGE__->add_columns(qw/ID type altId IBAN/);
|
|
__PACKAGE__->set_primary_key('ID');
|
|
|
|
__PACKAGE__->has_many(
|
|
statement_rows => 'TrsrDB::ReconstructedBankStatement',
|
|
{ 'foreign.account' => 'self.ID' }
|
|
);
|
|
__PACKAGE__->has_many(
|
|
debits => 'TrsrDB::Debit',
|
|
{ 'foreign.debtor' => 'self.ID' }
|
|
);
|
|
__PACKAGE__->has_many(
|
|
current_arrears => 'TrsrDB::CurrentArrears',
|
|
{ 'foreign.debtor' => 'self.ID' }
|
|
);
|
|
__PACKAGE__->has_many(
|
|
credits => 'TrsrDB::Credit',
|
|
{ 'foreign.account' => 'self.ID' }
|
|
);
|
|
__PACKAGE__->has_many(
|
|
available_credits => 'TrsrDB::AvailableCredits',
|
|
{ 'foreign.account' => 'self.ID' }
|
|
);
|
|
__PACKAGE__->has_one(
|
|
balance => 'TrsrDB::Balance', 'ID'
|
|
);
|
|
__PACKAGE__->has_many(
|
|
history => 'TrsrDB::History',
|
|
{ 'foreign.account' => 'self.ID' }
|
|
);
|
|
__PACKAGE__->has_many(
|
|
report => 'TrsrDB::Report',
|
|
{ 'foreign.account' => 'self.ID' }
|
|
);
|
|
|
|
1;
|