adding "voider" and "void_time" fields to billing
[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::billable_transaction;
10 use base qw/money/;
11 __PACKAGE__->table('money_billable_xact');
12 __PACKAGE__->columns(Primary => 'id');
13 __PACKAGE__->columns(Essential => qw/xact_start usr xact_finish/);
14 #-------------------------------------------------------------------------------
15
16 package money::grocery;
17 use base qw/money/;
18 __PACKAGE__->table('money_grocery');
19 __PACKAGE__->columns(Primary => 'id');
20 __PACKAGE__->columns(Essential => qw/xact_start usr billing_location note xact_finish/);
21 #-------------------------------------------------------------------------------
22
23 package money::open_user_summary;
24 use base qw/money/;
25 __PACKAGE__->table('money_open_user_summary');
26 __PACKAGE__->columns(Primary => 'usr');
27 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
28 #-------------------------------------------------------------------------------
29
30 package money::user_summary;
31 use base qw/money/;
32 __PACKAGE__->table('money_user_summary');
33 __PACKAGE__->columns(Primary => 'usr');
34 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
35 #-------------------------------------------------------------------------------
36
37 package money::open_user_circulation_summary;
38 use base qw/money/;
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 #-------------------------------------------------------------------------------
43
44 package money::user_circulation_summary;
45 use base qw/money/;
46 __PACKAGE__->table('money_user_circulation_summary');
47 __PACKAGE__->columns(Primary => 'usr');
48 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
49 #-------------------------------------------------------------------------------
50
51 package money::open_billable_transaction_summary;
52 use base qw/money/;
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 #-------------------------------------------------------------------------------
60
61 package money::billable_transaction_summary;
62 use base qw/money/;
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 #-------------------------------------------------------------------------------
70
71 package money::billing;
72 use base qw/money/;
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 #-------------------------------------------------------------------------------
77
78 package money::payment;
79 use base qw/money/;
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 #-------------------------------------------------------------------------------
85
86 package money::cash_payment;
87 use base qw/money/;
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 #-------------------------------------------------------------------------------
93
94 package money::check_payment;
95 use base qw/money/;
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 #-------------------------------------------------------------------------------
101
102 package money::credit_card_payment;
103 use base qw/money/;
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
109                                      approval_code/);
110 __PACKAGE__->columns(Others => 'note');
111 #-------------------------------------------------------------------------------
112
113 package money::forgive_payment;
114 use base qw/money/;
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 #-------------------------------------------------------------------------------
120
121 package money::work_payment;
122 use base qw/money::forgive_payment/;
123 __PACKAGE__->table('money_work_payment');
124 #-------------------------------------------------------------------------------
125
126 package money::credit_payment;
127 use base qw/money::forgive_payment/;
128 __PACKAGE__->table('money_credit_payment');
129
130 #-------------------------------------------------------------------------------
131
132 1;
133