]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/money.pm
52b69e895604c9644cd6282a173979cb7e004736
[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/);
14 __PACKAGE__->columns(Others => qw/xact_finish/);
15 #-------------------------------------------------------------------------------
16
17 package money::user_summary;
18 use base qw/money/;
19 __PACKAGE__->table('money_user_summary');
20 __PACKAGE__->columns(Primary => 'usr');
21 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
22 #-------------------------------------------------------------------------------
23
24 package money::billable_transaction_summary;
25 use base qw/money/;
26 __PACKAGE__->table('money_billable_transaction_summary');
27 __PACKAGE__->columns(Primary => 'id');
28 __PACKAGE__->columns(Essential => qw/xact_start usr xact_finish total_paid
29                                      last_payment_ts total_owed last_billing_ts
30                                      balance_owed/);
31 #-------------------------------------------------------------------------------
32
33 package money::billing;
34 use base qw/money/;
35 __PACKAGE__->table('money_billing');
36 __PACKAGE__->columns(Primary => 'id');
37 __PACKAGE__->columns(Essential => qw/xact amount billing_ts note voided/);
38 #-------------------------------------------------------------------------------
39
40 package money::payment;
41 use base qw/money/;
42 __PACKAGE__->table('money_payment');
43 __PACKAGE__->columns(Primary => 'id');
44 __PACKAGE__->columns(Essential => qw/xact amount payment_ts/);
45 __PACKAGE__->columns(Others => qw/note/);
46 #-------------------------------------------------------------------------------
47
48 package money::cash_payment;
49 use base qw/money/;
50 __PACKAGE__->table('money_cash_payment');
51 __PACKAGE__->columns(Primary => 'id');
52 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer accepting_usr amount_collected/);
53 __PACKAGE__->columns(Others => qw/note/);
54 #-------------------------------------------------------------------------------
55
56 package money::check_payment;
57 use base qw/money/;
58 __PACKAGE__->table('money_check_payment');
59 __PACKAGE__->columns(Primary => 'id');
60 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer check_number accepting_usr amount_collected/);
61 __PACKAGE__->columns(Others => qw/note/);
62 #-------------------------------------------------------------------------------
63
64 package money::credit_card_payment;
65 use base qw/money/;
66 __PACKAGE__->table('money_credit_card_payment');
67 __PACKAGE__->columns(Primary => 'id');
68 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer
69                                      accepting_usr amount_collected cc_type
70                                      cc_number expire_month expire_year
71                                      approval_code/);
72 __PACKAGE__->columns(Others => 'note');
73 #-------------------------------------------------------------------------------
74
75 package money::forgive_payment;
76 use base qw/money/;
77 __PACKAGE__->table('money_payment');
78 __PACKAGE__->columns(Primary => 'id');
79 __PACKAGE__->columns(Essential => qw/xact amount payment_ts accepting_usr amount_collected/);
80 __PACKAGE__->columns(Others => qw/note/);
81 #-------------------------------------------------------------------------------
82
83 package money::work_payment;
84 use base qw/money::forgive_payment/;
85 __PACKAGE__->table('money_work_payment');
86 #-------------------------------------------------------------------------------
87
88 package money::credit_payment;
89 use base qw/money::forgive_payment/;
90 __PACKAGE__->table('money_credit_payment');
91
92 #-------------------------------------------------------------------------------
93
94 1;
95