0864ff3bad80756d2a02b00b82d10a770a6229d1
[Evergreen.git] / Open-ILS / src / perlmods / OpenILS / Application / Storage / CDBI / money.pm
1 package OpenILS::Application::Storage::CDBI::money;
2 our $VERSION = 1;
3
4 #-------------------------------------------------------------------------------
5 package money;
6 use base qw/OpenILS::Application::Storage::CDBI/;
7 #-------------------------------------------------------------------------------
8
9 package money::collections_tracker;
10 use base qw/money/;
11 __PACKAGE__->table('money_collections_tracker');
12 __PACKAGE__->columns(Primary => 'id');
13 __PACKAGE__->columns(Essential => qw/usr collector location enter_time/);
14 #-------------------------------------------------------------------------------
15
16 package money::billable_transaction;
17 use base qw/money/;
18 __PACKAGE__->table('money_billable_xact');
19 __PACKAGE__->columns(Primary => 'id');
20 __PACKAGE__->columns(Essential => qw/xact_start usr xact_finish/);
21 #-------------------------------------------------------------------------------
22
23 package money::grocery;
24 use base qw/money/;
25 __PACKAGE__->table('money_grocery');
26 __PACKAGE__->columns(Primary => 'id');
27 __PACKAGE__->columns(Essential => qw/xact_start usr billing_location note xact_finish/);
28 #-------------------------------------------------------------------------------
29
30 package money::open_user_summary;
31 use base qw/money/;
32 __PACKAGE__->table('money_open_user_summary');
33 __PACKAGE__->columns(Primary => 'usr');
34 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
35 #-------------------------------------------------------------------------------
36
37 package money::user_summary;
38 use base qw/money/;
39 __PACKAGE__->table('money_user_summary');
40 __PACKAGE__->columns(Primary => 'usr');
41 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
42 #-------------------------------------------------------------------------------
43
44 package money::open_user_circulation_summary;
45 use base qw/money/;
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 #-------------------------------------------------------------------------------
50
51 package money::user_circulation_summary;
52 use base qw/money/;
53 __PACKAGE__->table('money_user_circulation_summary');
54 __PACKAGE__->columns(Primary => 'usr');
55 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
56 #-------------------------------------------------------------------------------
57
58 package money::open_billable_transaction_summary;
59 use base qw/money/;
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 #-------------------------------------------------------------------------------
67
68 package money::billable_transaction_summary;
69 use base qw/money/;
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 #-------------------------------------------------------------------------------
77
78 package money::billing;
79 use base qw/money/;
80 __PACKAGE__->table('money_billing');
81 __PACKAGE__->columns(Primary => 'id');
82 __PACKAGE__->columns(Essential => qw/xact amount billing_ts billing_type note voided voider void_time/);
83 #-------------------------------------------------------------------------------
84
85 package money::payment;
86 use base qw/money/;
87 __PACKAGE__->table('money_payment');
88 __PACKAGE__->columns(Primary => 'id');
89 __PACKAGE__->columns(Essential => qw/xact amount payment_ts payment_type note/);
90 #-------------------------------------------------------------------------------
91
92 package money::desk_payment;
93 use base qw/money/;
94 __PACKAGE__->table('money_desk_payment');
95 __PACKAGE__->columns(Primary => 'id');
96 __PACKAGE__->columns(Essential => qw/xact amount payment_ts voided amount_collected accepting_usr cash_drawer payment_type note/);
97 #-------------------------------------------------------------------------------
98
99 package money::cash_payment;
100 use base qw/money/;
101 __PACKAGE__->table('money_cash_payment');
102 __PACKAGE__->columns(Primary => 'id');
103 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer accepting_usr amount_collected note/);
104 #-------------------------------------------------------------------------------
105
106 package money::check_payment;
107 use base qw/money/;
108 __PACKAGE__->table('money_check_payment');
109 __PACKAGE__->columns(Primary => 'id');
110 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer check_number accepting_usr amount_collected note/);
111 #-------------------------------------------------------------------------------
112
113 package money::credit_card_payment;
114 use base qw/money/;
115 __PACKAGE__->table('money_credit_card_payment');
116 __PACKAGE__->columns(Primary => 'id');
117 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer
118                                      accepting_usr amount_collected cc_type
119                                      cc_number expire_month expire_year
120                                      approval_code note/);
121 #-------------------------------------------------------------------------------
122
123 package money::forgive_payment;
124 use base qw/money/;
125 __PACKAGE__->table('money_forgive_payment');
126 __PACKAGE__->columns(Primary => 'id');
127 __PACKAGE__->columns(Essential => qw/xact amount payment_ts accepting_usr amount_collected note/);
128 #-------------------------------------------------------------------------------
129
130 package money::work_payment;
131 use base qw/money::forgive_payment/;
132 __PACKAGE__->table('money_work_payment');
133 #-------------------------------------------------------------------------------
134
135 package money::credit_payment;
136 use base qw/money::forgive_payment/;
137 __PACKAGE__->table('money_credit_payment');
138
139 #-------------------------------------------------------------------------------
140
141 1;
142