1 package OpenILS::Application::Storage::CDBI::money;
4 #-------------------------------------------------------------------------------
6 use base qw/OpenILS::Application::Storage::CDBI/;
7 #-------------------------------------------------------------------------------
9 package money::collections_tracker;
11 __PACKAGE__->table('money_collections_tracker');
12 __PACKAGE__->columns(Primary => 'id');
13 __PACKAGE__->columns(Essential => qw/usr collector location enter_time/);
14 #-------------------------------------------------------------------------------
16 package money::billable_transaction;
18 __PACKAGE__->table('money_billable_xact');
19 __PACKAGE__->columns(Primary => 'id');
20 __PACKAGE__->columns(Essential => qw/xact_start usr xact_finish unrecovered/);
21 #-------------------------------------------------------------------------------
23 package money::grocery;
25 __PACKAGE__->table('money_grocery');
26 __PACKAGE__->columns(Primary => 'id');
27 __PACKAGE__->columns(Essential => qw/xact_start usr billing_location note xact_finish/);
28 #-------------------------------------------------------------------------------
30 package money::open_user_summary;
32 __PACKAGE__->table('money_open_user_summary');
33 __PACKAGE__->columns(Primary => 'usr');
34 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
35 #-------------------------------------------------------------------------------
37 package money::user_summary;
39 __PACKAGE__->table('money_user_summary');
40 __PACKAGE__->columns(Primary => 'usr');
41 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
42 #-------------------------------------------------------------------------------
44 package money::open_user_circulation_summary;
46 __PACKAGE__->table('money_open_user_circulation_summary');
47 __PACKAGE__->columns(Primary => 'usr');
48 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
49 #-------------------------------------------------------------------------------
51 package money::user_circulation_summary;
53 __PACKAGE__->table('money_user_circulation_summary');
54 __PACKAGE__->columns(Primary => 'usr');
55 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
56 #-------------------------------------------------------------------------------
58 package money::open_billable_transaction_summary;
60 __PACKAGE__->table('money_open_billable_transaction_summary');
61 __PACKAGE__->columns(Primary => 'id');
62 __PACKAGE__->columns(Essential => qw/xact_start usr xact_finish total_paid
63 last_payment_ts total_owed last_billing_ts
64 balance_owed xact_type last_billing_note last_billing_type
65 last_payment_note last_payment_type/);
66 #-------------------------------------------------------------------------------
68 package money::billable_transaction_summary;
70 __PACKAGE__->table('money_billable_transaction_summary');
71 __PACKAGE__->columns(Primary => 'id');
72 __PACKAGE__->columns(Essential => qw/xact_start usr xact_finish total_paid
73 last_payment_ts total_owed last_billing_ts
74 balance_owed xact_type last_billing_note last_billing_type
75 last_payment_note last_payment_type/);
76 #-------------------------------------------------------------------------------
78 package money::billing;
80 __PACKAGE__->table('money_billing');
81 __PACKAGE__->columns(Primary => 'id');
82 __PACKAGE__->columns(Essential => qw/xact amount billing_ts billing_type note
83 voided voider void_time btype/);
84 #-------------------------------------------------------------------------------
86 package money::payment;
88 __PACKAGE__->table('money_payment');
89 __PACKAGE__->columns(Primary => 'id');
90 __PACKAGE__->columns(Essential => qw/xact amount payment_ts payment_type note voided/);
91 #-------------------------------------------------------------------------------
93 package money::desk_payment;
95 __PACKAGE__->table('money_desk_payment');
96 __PACKAGE__->columns(Primary => 'id');
97 __PACKAGE__->columns(Essential => qw/xact amount payment_ts voided amount_collected accepting_usr cash_drawer payment_type note/);
98 #-------------------------------------------------------------------------------
100 package money::cash_payment;
102 __PACKAGE__->table('money_cash_payment');
103 __PACKAGE__->columns(Primary => 'id');
104 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer accepting_usr amount_collected note/);
105 #-------------------------------------------------------------------------------
107 package money::check_payment;
109 __PACKAGE__->table('money_check_payment');
110 __PACKAGE__->columns(Primary => 'id');
111 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer check_number accepting_usr amount_collected note/);
112 #-------------------------------------------------------------------------------
114 package money::credit_card_payment;
116 __PACKAGE__->table('money_credit_card_payment');
117 __PACKAGE__->columns(Primary => 'id');
118 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer
119 accepting_usr amount_collected cc_type
120 cc_number expire_month expire_year
121 approval_code note/);
122 #-------------------------------------------------------------------------------
124 package money::forgive_payment;
126 __PACKAGE__->table('money_forgive_payment');
127 __PACKAGE__->columns(Primary => 'id');
128 __PACKAGE__->columns(Essential => qw/xact amount payment_ts accepting_usr amount_collected note/);
129 #-------------------------------------------------------------------------------
131 package money::work_payment;
132 use base qw/money::forgive_payment/;
133 __PACKAGE__->table('money_work_payment');
134 #-------------------------------------------------------------------------------
136 package money::goods_payment;
137 use base qw/money::forgive_payment/;
138 __PACKAGE__->table('money_goods_payment');
139 #-------------------------------------------------------------------------------
141 package money::credit_payment;
142 use base qw/money::forgive_payment/;
143 __PACKAGE__->table('money_credit_payment');
145 #-------------------------------------------------------------------------------