1 package OpenILS::Application::Storage::CDBI::money;
4 #-------------------------------------------------------------------------------
6 use base qw/OpenILS::Application::Storage::CDBI/;
7 #-------------------------------------------------------------------------------
9 package money::billable_transaction;
11 __PACKAGE__->table('money_billable_xact');
12 __PACKAGE__->columns(Primary => 'id');
13 __PACKAGE__->columns(Essential => qw/xact_start xact_finish usr/);
14 #-------------------------------------------------------------------------------
16 package money::billing;
18 __PACKAGE__->table('money_billing');
19 __PACKAGE__->columns(Primary => 'id');
20 __PACKAGE__->columns(Essential => qw/xact amount billing_ts note/);
21 #-------------------------------------------------------------------------------
23 package money::payment;
25 __PACKAGE__->table('money_payment');
26 __PACKAGE__->columns(Primary => 'id');
27 __PACKAGE__->columns(Essential => "split_part(tableoid2name(tableoid),'.',2) as payment_type", qw/xact amount payment_ts note/);
28 #-------------------------------------------------------------------------------
30 package money::cash_payment;
32 __PACKAGE__->table('money_cash_payment');
33 __PACKAGE__->columns(Primary => 'id');
34 __PACKAGE__->columns(Essential => qw/xact amount payment_ts note cash_drawer accepting_usr amount_collected/);
35 #-------------------------------------------------------------------------------
37 package money::check_payment;
39 __PACKAGE__->table('money_check_payment');
40 __PACKAGE__->columns(Primary => 'id');
41 __PACKAGE__->columns(Essential => qw/xact amount payment_ts note cash_drawer check_number accepting_usr amount_collected/);
42 #-------------------------------------------------------------------------------
44 package money::credit_card_payment;
46 __PACKAGE__->table('money_credit_card_payment');
47 __PACKAGE__->columns(Primary => 'id');
48 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer
49 accepting_usr amount_collected cc_type
50 cc_number expire_month expire_year
52 __PACKAGE__->columns(Others => 'note');
53 #-------------------------------------------------------------------------------
55 package money::forgive_payment;
57 __PACKAGE__->table('money_payment');
58 __PACKAGE__->columns(Primary => 'id');
59 __PACKAGE__->columns(Essential => qw/xact amount payment_ts note accepting_usr amount_collected/);
60 #-------------------------------------------------------------------------------
62 package money::work_payment;
63 use base qw/money::forgive_payment/;
64 __PACKAGE__->table('money_work_payment');
65 #-------------------------------------------------------------------------------
67 package money::credit_payment;
68 use base qw/money::forgive_payment/;
69 __PACKAGE__->table('money_credit_payment');
71 #-------------------------------------------------------------------------------