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::user_circulation_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::billable_transaction_summary;
33 __PACKAGE__->table('money_billable_transaction_summary');
34 __PACKAGE__->columns(Primary => 'id');
35 __PACKAGE__->columns(Essential => qw/xact_start usr xact_finish total_paid
36 last_payment_ts total_owed last_billing_ts
37 balance_owed xact_type last_billing_note/);
38 #-------------------------------------------------------------------------------
40 package money::billing;
42 __PACKAGE__->table('money_billing');
43 __PACKAGE__->columns(Primary => 'id');
44 __PACKAGE__->columns(Essential => qw/xact amount billing_ts note voided/);
45 #-------------------------------------------------------------------------------
47 package money::payment;
49 __PACKAGE__->table('money_payment');
50 __PACKAGE__->columns(Primary => 'id');
51 __PACKAGE__->columns(Essential => qw/xact amount payment_ts payment_type/);
52 __PACKAGE__->columns(Others => qw/note/);
53 #-------------------------------------------------------------------------------
55 package money::cash_payment;
57 __PACKAGE__->table('money_cash_payment');
58 __PACKAGE__->columns(Primary => 'id');
59 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer accepting_usr amount_collected/);
60 __PACKAGE__->columns(Others => qw/note/);
61 #-------------------------------------------------------------------------------
63 package money::check_payment;
65 __PACKAGE__->table('money_check_payment');
66 __PACKAGE__->columns(Primary => 'id');
67 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer check_number accepting_usr amount_collected/);
68 __PACKAGE__->columns(Others => qw/note/);
69 #-------------------------------------------------------------------------------
71 package money::credit_card_payment;
73 __PACKAGE__->table('money_credit_card_payment');
74 __PACKAGE__->columns(Primary => 'id');
75 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer
76 accepting_usr amount_collected cc_type
77 cc_number expire_month expire_year
79 __PACKAGE__->columns(Others => 'note');
80 #-------------------------------------------------------------------------------
82 package money::forgive_payment;
84 __PACKAGE__->table('money_payment');
85 __PACKAGE__->columns(Primary => 'id');
86 __PACKAGE__->columns(Essential => qw/xact amount payment_ts accepting_usr amount_collected/);
87 __PACKAGE__->columns(Others => qw/note/);
88 #-------------------------------------------------------------------------------
90 package money::work_payment;
91 use base qw/money::forgive_payment/;
92 __PACKAGE__->table('money_work_payment');
93 #-------------------------------------------------------------------------------
95 package money::credit_payment;
96 use base qw/money::forgive_payment/;
97 __PACKAGE__->table('money_credit_payment');
99 #-------------------------------------------------------------------------------