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::open_user_summary;
19 __PACKAGE__->table('money_open_user_summary');
20 __PACKAGE__->columns(Primary => 'usr');
21 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
22 #-------------------------------------------------------------------------------
24 package money::user_summary;
26 __PACKAGE__->table('money_user_summary');
27 __PACKAGE__->columns(Primary => 'usr');
28 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
29 #-------------------------------------------------------------------------------
31 package money::open_user_circulation_summary;
33 __PACKAGE__->table('money_open_user_circulation_summary');
34 __PACKAGE__->columns(Primary => 'usr');
35 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
36 #-------------------------------------------------------------------------------
38 package money::user_circulation_summary;
40 __PACKAGE__->table('money_user_circulation_summary');
41 __PACKAGE__->columns(Primary => 'usr');
42 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
43 #-------------------------------------------------------------------------------
45 package money::open_billable_transaction_summary;
47 __PACKAGE__->table('money_open_billable_transaction_summary');
48 __PACKAGE__->columns(Primary => 'id');
49 __PACKAGE__->columns(Essential => qw/xact_start usr xact_finish total_paid
50 last_payment_ts total_owed last_billing_ts
51 balance_owed xact_type last_billing_note last_billing_type
52 last_payment_note last_payment_type/);
53 #-------------------------------------------------------------------------------
55 package money::billable_transaction_summary;
57 __PACKAGE__->table('money_billable_transaction_summary');
58 __PACKAGE__->columns(Primary => 'id');
59 __PACKAGE__->columns(Essential => qw/xact_start usr xact_finish total_paid
60 last_payment_ts total_owed last_billing_ts
61 balance_owed xact_type last_billing_note last_billing_type
62 last_payment_note last_payment_type/);
63 #-------------------------------------------------------------------------------
65 package money::billing;
67 __PACKAGE__->table('money_billing');
68 __PACKAGE__->columns(Primary => 'id');
69 __PACKAGE__->columns(Essential => qw/xact amount billing_ts note voided/);
70 #-------------------------------------------------------------------------------
72 package money::payment;
74 __PACKAGE__->table('money_payment');
75 __PACKAGE__->columns(Primary => 'id');
76 __PACKAGE__->columns(Essential => qw/xact amount payment_ts payment_type/);
77 __PACKAGE__->columns(Others => qw/note/);
78 #-------------------------------------------------------------------------------
80 package money::cash_payment;
82 __PACKAGE__->table('money_cash_payment');
83 __PACKAGE__->columns(Primary => 'id');
84 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer accepting_usr amount_collected/);
85 __PACKAGE__->columns(Others => qw/note/);
86 #-------------------------------------------------------------------------------
88 package money::check_payment;
90 __PACKAGE__->table('money_check_payment');
91 __PACKAGE__->columns(Primary => 'id');
92 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer check_number accepting_usr amount_collected/);
93 __PACKAGE__->columns(Others => qw/note/);
94 #-------------------------------------------------------------------------------
96 package money::credit_card_payment;
98 __PACKAGE__->table('money_credit_card_payment');
99 __PACKAGE__->columns(Primary => 'id');
100 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer
101 accepting_usr amount_collected cc_type
102 cc_number expire_month expire_year
104 __PACKAGE__->columns(Others => 'note');
105 #-------------------------------------------------------------------------------
107 package money::forgive_payment;
109 __PACKAGE__->table('money_forgive_payment');
110 __PACKAGE__->columns(Primary => 'id');
111 __PACKAGE__->columns(Essential => qw/xact amount payment_ts accepting_usr amount_collected/);
112 __PACKAGE__->columns(Others => qw/note/);
113 #-------------------------------------------------------------------------------
115 package money::work_payment;
116 use base qw/money::forgive_payment/;
117 __PACKAGE__->table('money_work_payment');
118 #-------------------------------------------------------------------------------
120 package money::credit_payment;
121 use base qw/money::forgive_payment/;
122 __PACKAGE__->table('money_credit_payment');
124 #-------------------------------------------------------------------------------