]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/money.pm
adding billing and circulation stuff to the Storage server
[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 xact_finish usr/);
14 #-------------------------------------------------------------------------------
15
16 package money::billing;
17 use base qw/money/;
18 __PACKAGE__->table('money_billing');
19 __PACKAGE__->columns(Primary => 'id');
20 __PACKAGE__->columns(Essential => qw/xact amount billing_ts note/);
21 #-------------------------------------------------------------------------------
22
23 package money::payment;
24 use base qw/money/;
25 __PACKAGE__->table('money_payment');
26 __PACKAGE__->columns(Primary => 'id');
27 __PACKAGE__->columns(Essential => "split_part(tableoid2name(tableoid),'.',2) as payment_type", qw/xact amount payment_ts note/);
28 #-------------------------------------------------------------------------------
29
30 package money::cash_payment;
31 use base qw/money/;
32 __PACKAGE__->table('money_cash_payment');
33 __PACKAGE__->columns(Primary => 'id');
34 __PACKAGE__->columns(Essential => qw/xact amount payment_ts note cash_drawer accepting_usr amount_collected/);
35 #-------------------------------------------------------------------------------
36
37 package money::check_payment;
38 use base qw/money/;
39 __PACKAGE__->table('money_check_payment');
40 __PACKAGE__->columns(Primary => 'id');
41 __PACKAGE__->columns(Essential => qw/xact amount payment_ts note cash_drawer check_number accepting_usr amount_collected/);
42 #-------------------------------------------------------------------------------
43
44 package money::credit_card_payment;
45 use base qw/money/;
46 __PACKAGE__->table('money_credit_card_payment');
47 __PACKAGE__->columns(Primary => 'id');
48 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer
49                                      accepting_usr amount_collected cc_type
50                                      cc_number expire_month expire_year
51                                      approval_code/);
52 __PACKAGE__->columns(Others => 'note');
53 #-------------------------------------------------------------------------------
54
55 package money::forgive_payment;
56 use base qw/money/;
57 __PACKAGE__->table('money_payment');
58 __PACKAGE__->columns(Primary => 'id');
59 __PACKAGE__->columns(Essential => qw/xact amount payment_ts note accepting_usr amount_collected/);
60 #-------------------------------------------------------------------------------
61
62 package money::work_payment;
63 use base qw/money::forgive_payment/;
64 __PACKAGE__->table('money_work_payment');
65 #-------------------------------------------------------------------------------
66
67 package money::credit_payment;
68 use base qw/money::forgive_payment/;
69 __PACKAGE__->table('money_credit_payment');
70
71 #-------------------------------------------------------------------------------
72
73 1;
74