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 usr/);
14 __PACKAGE__->columns(Others => qw/xact_finish/);
15 #-------------------------------------------------------------------------------
17 package money::user_summary;
19 __PACKAGE__->table('money_user_summary');
20 __PACKAGE__->columns(Primary => 'usr');
21 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
22 #-------------------------------------------------------------------------------
24 package money::billable_transaction_summary;
26 __PACKAGE__->table('money_billable_transaction_summary');
27 __PACKAGE__->columns(Primary => 'id');
28 __PACKAGE__->columns(Essential => qw/xact_start usr xact_finish total_paid
29 last_payment_ts total_owed last_billing_ts
31 #-------------------------------------------------------------------------------
33 package money::billing;
35 __PACKAGE__->table('money_billing');
36 __PACKAGE__->columns(Primary => 'id');
37 __PACKAGE__->columns(Essential => qw/xact amount billing_ts/);
38 __PACKAGE__->columns(Others => qw/note/);
39 #-------------------------------------------------------------------------------
41 package money::payment;
43 __PACKAGE__->table('money_payment');
44 __PACKAGE__->columns(Primary => 'id');
45 __PACKAGE__->columns(Essential => qw/xact amount payment_ts/);
46 __PACKAGE__->columns(Others => qw/note/);
47 #-------------------------------------------------------------------------------
49 package money::cash_payment;
51 __PACKAGE__->table('money_cash_payment');
52 __PACKAGE__->columns(Primary => 'id');
53 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer accepting_usr amount_collected/);
54 __PACKAGE__->columns(Others => qw/note/);
55 #-------------------------------------------------------------------------------
57 package money::check_payment;
59 __PACKAGE__->table('money_check_payment');
60 __PACKAGE__->columns(Primary => 'id');
61 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer check_number accepting_usr amount_collected/);
62 __PACKAGE__->columns(Others => qw/note/);
63 #-------------------------------------------------------------------------------
65 package money::credit_card_payment;
67 __PACKAGE__->table('money_credit_card_payment');
68 __PACKAGE__->columns(Primary => 'id');
69 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer
70 accepting_usr amount_collected cc_type
71 cc_number expire_month expire_year
73 __PACKAGE__->columns(Others => 'note');
74 #-------------------------------------------------------------------------------
76 package money::forgive_payment;
78 __PACKAGE__->table('money_payment');
79 __PACKAGE__->columns(Primary => 'id');
80 __PACKAGE__->columns(Essential => qw/xact amount payment_ts accepting_usr amount_collected/);
81 __PACKAGE__->columns(Others => qw/note/);
82 #-------------------------------------------------------------------------------
84 package money::work_payment;
85 use base qw/money::forgive_payment/;
86 __PACKAGE__->table('money_work_payment');
87 #-------------------------------------------------------------------------------
89 package money::credit_payment;
90 use base qw/money::forgive_payment/;
91 __PACKAGE__->table('money_credit_payment');
93 #-------------------------------------------------------------------------------