]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/money.pm
37f4060add35cdd2aa1b1c2033a57dafca3efc0a
[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::cash_payment;
93 use base qw/money/;
94 __PACKAGE__->table('money_cash_payment');
95 __PACKAGE__->columns(Primary => 'id');
96 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer accepting_usr amount_collected note/);
97 #-------------------------------------------------------------------------------
98
99 package money::check_payment;
100 use base qw/money/;
101 __PACKAGE__->table('money_check_payment');
102 __PACKAGE__->columns(Primary => 'id');
103 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer check_number accepting_usr amount_collected note/);
104 #-------------------------------------------------------------------------------
105
106 package money::credit_card_payment;
107 use base qw/money/;
108 __PACKAGE__->table('money_credit_card_payment');
109 __PACKAGE__->columns(Primary => 'id');
110 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer
111                                      accepting_usr amount_collected cc_type
112                                      cc_number expire_month expire_year
113                                      approval_code note/);
114 #-------------------------------------------------------------------------------
115
116 package money::forgive_payment;
117 use base qw/money/;
118 __PACKAGE__->table('money_forgive_payment');
119 __PACKAGE__->columns(Primary => 'id');
120 __PACKAGE__->columns(Essential => qw/xact amount payment_ts accepting_usr amount_collected note/);
121 #-------------------------------------------------------------------------------
122
123 package money::work_payment;
124 use base qw/money::forgive_payment/;
125 __PACKAGE__->table('money_work_payment');
126 #-------------------------------------------------------------------------------
127
128 package money::credit_payment;
129 use base qw/money::forgive_payment/;
130 __PACKAGE__->table('money_credit_payment');
131
132 #-------------------------------------------------------------------------------
133
134 1;
135