1 package OpenILS::Application::Storage::CDBI::money;
4 #-------------------------------------------------------------------------------
6 use base qw/OpenILS::Application::Storage::CDBI/;
7 #-------------------------------------------------------------------------------
9 package money::collections_tracker;
11 __PACKAGE__->table('money_collections_tracker');
12 __PACKAGE__->columns(Primary => 'id');
13 __PACKAGE__->columns(Essential => qw/usr collector location enter_time/);
14 #-------------------------------------------------------------------------------
16 package money::billable_transaction;
18 __PACKAGE__->table('money_billable_xact');
19 __PACKAGE__->columns(Primary => 'id');
20 __PACKAGE__->columns(Essential => qw/xact_start usr xact_finish unrecovered/);
21 #-------------------------------------------------------------------------------
23 package money::grocery;
25 __PACKAGE__->table('money_grocery');
26 __PACKAGE__->columns(Primary => 'id');
27 __PACKAGE__->columns(Essential => qw/xact_start usr billing_location note xact_finish/);
28 #-------------------------------------------------------------------------------
30 package money::open_user_summary;
32 __PACKAGE__->table('money_open_user_summary');
33 __PACKAGE__->columns(Primary => 'usr');
34 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
35 #-------------------------------------------------------------------------------
37 package money::user_summary;
39 __PACKAGE__->table('money_user_summary');
40 __PACKAGE__->columns(Primary => 'usr');
41 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
42 #-------------------------------------------------------------------------------
44 package money::open_user_circulation_summary;
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 #-------------------------------------------------------------------------------
51 package money::user_circulation_summary;
53 __PACKAGE__->table('money_user_circulation_summary');
54 __PACKAGE__->columns(Primary => 'usr');
55 __PACKAGE__->columns(Essential => qw/total_paid total_owed balance_owed/);
56 #-------------------------------------------------------------------------------
58 package money::open_billable_transaction_summary;
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 #-------------------------------------------------------------------------------
68 package money::billable_transaction_summary;
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 #-------------------------------------------------------------------------------
78 package money::billing;
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 #-------------------------------------------------------------------------------
85 package money::payment;
87 __PACKAGE__->table('money_payment');
88 __PACKAGE__->columns(Primary => 'id');
89 __PACKAGE__->columns(Essential => qw/xact amount payment_ts payment_type note voided/);
90 #-------------------------------------------------------------------------------
92 package money::desk_payment;
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 #-------------------------------------------------------------------------------
99 package money::cash_payment;
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 #-------------------------------------------------------------------------------
106 package money::check_payment;
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 #-------------------------------------------------------------------------------
113 package money::credit_card_payment;
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 #-------------------------------------------------------------------------------
123 package money::forgive_payment;
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 #-------------------------------------------------------------------------------
130 package money::work_payment;
131 use base qw/money::forgive_payment/;
132 __PACKAGE__->table('money_work_payment');
133 #-------------------------------------------------------------------------------
135 package money::goods_payment;
136 use base qw/money::forgive_payment/;
137 __PACKAGE__->table('money_goods_payment');
138 #-------------------------------------------------------------------------------
140 package money::credit_payment;
141 use base qw/money::forgive_payment/;
142 __PACKAGE__->table('money_credit_payment');
144 #-------------------------------------------------------------------------------