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 xact_finish/);
14 #-------------------------------------------------------------------------------
16 package money::grocery;
18 __PACKAGE__->table('money_grocery');
19 __PACKAGE__->columns(Primary => 'id');
20 __PACKAGE__->columns(Essential => qw/xact_start usr billing_location note xact_finish/);
21 #-------------------------------------------------------------------------------
23 package money::open_user_summary;
25 __PACKAGE__->table('money_open_user_summary');
26 __PACKAGE__->columns(Primary => 'usr');
27 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
28 #-------------------------------------------------------------------------------
30 package money::user_summary;
32 __PACKAGE__->table('money_user_summary');
33 __PACKAGE__->columns(Primary => 'usr');
34 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
35 #-------------------------------------------------------------------------------
37 package money::open_user_circulation_summary;
39 __PACKAGE__->table('money_open_user_circulation_summary');
40 __PACKAGE__->columns(Primary => 'usr');
41 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
42 #-------------------------------------------------------------------------------
44 package money::user_circulation_summary;
46 __PACKAGE__->table('money_user_circulation_summary');
47 __PACKAGE__->columns(Primary => 'usr');
48 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
49 #-------------------------------------------------------------------------------
51 package money::open_billable_transaction_summary;
53 __PACKAGE__->table('money_open_billable_transaction_summary');
54 __PACKAGE__->columns(Primary => 'id');
55 __PACKAGE__->columns(Essential => qw/xact_start usr xact_finish total_paid
56 last_payment_ts total_owed last_billing_ts
57 balance_owed xact_type last_billing_note last_billing_type
58 last_payment_note last_payment_type/);
59 #-------------------------------------------------------------------------------
61 package money::billable_transaction_summary;
63 __PACKAGE__->table('money_billable_transaction_summary');
64 __PACKAGE__->columns(Primary => 'id');
65 __PACKAGE__->columns(Essential => qw/xact_start usr xact_finish total_paid
66 last_payment_ts total_owed last_billing_ts
67 balance_owed xact_type last_billing_note last_billing_type
68 last_payment_note last_payment_type/);
69 #-------------------------------------------------------------------------------
71 package money::billing;
73 __PACKAGE__->table('money_billing');
74 __PACKAGE__->columns(Primary => 'id');
75 __PACKAGE__->columns(Essential => qw/xact amount billing_ts billing_type note voided voider void_time/);
76 #-------------------------------------------------------------------------------
78 package money::payment;
80 __PACKAGE__->table('money_payment');
81 __PACKAGE__->columns(Primary => 'id');
82 __PACKAGE__->columns(Essential => qw/xact amount payment_ts payment_type/);
83 __PACKAGE__->columns(Others => qw/note/);
84 #-------------------------------------------------------------------------------
86 package money::cash_payment;
88 __PACKAGE__->table('money_cash_payment');
89 __PACKAGE__->columns(Primary => 'id');
90 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer accepting_usr amount_collected/);
91 __PACKAGE__->columns(Others => qw/note/);
92 #-------------------------------------------------------------------------------
94 package money::check_payment;
96 __PACKAGE__->table('money_check_payment');
97 __PACKAGE__->columns(Primary => 'id');
98 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer check_number accepting_usr amount_collected/);
99 __PACKAGE__->columns(Others => qw/note/);
100 #-------------------------------------------------------------------------------
102 package money::credit_card_payment;
104 __PACKAGE__->table('money_credit_card_payment');
105 __PACKAGE__->columns(Primary => 'id');
106 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer
107 accepting_usr amount_collected cc_type
108 cc_number expire_month expire_year
110 __PACKAGE__->columns(Others => 'note');
111 #-------------------------------------------------------------------------------
113 package money::forgive_payment;
115 __PACKAGE__->table('money_forgive_payment');
116 __PACKAGE__->columns(Primary => 'id');
117 __PACKAGE__->columns(Essential => qw/xact amount payment_ts accepting_usr amount_collected/);
118 __PACKAGE__->columns(Others => qw/note/);
119 #-------------------------------------------------------------------------------
121 package money::work_payment;
122 use base qw/money::forgive_payment/;
123 __PACKAGE__->table('money_work_payment');
124 #-------------------------------------------------------------------------------
126 package money::credit_payment;
127 use base qw/money::forgive_payment/;
128 __PACKAGE__->table('money_credit_payment');
130 #-------------------------------------------------------------------------------