diff options
author | ivan <ivan> | 2008-11-22 22:17:28 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-11-22 22:17:28 +0000 |
commit | 58f99accce35aa76abe9ff852f6c6ee84e8ce712 (patch) | |
tree | 4403996ba0953f5826d5b84b99d9f99f6629683e /FS/FS/part_event.pm | |
parent | 1d84feb7fe821b547e211ad03e5c200c8f218797 (diff) |
referral credits overhaul, use billing events, agents can self-configure, limit to once-per-customer, depend on any time from referred package, referred customer payment, specific packages, partial staged credits, RT#3983
Diffstat (limited to 'FS/FS/part_event.pm')
-rw-r--r-- | FS/FS/part_event.pm | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/FS/FS/part_event.pm b/FS/FS/part_event.pm index d0ab65e..6f2c536 100644 --- a/FS/FS/part_event.pm +++ b/FS/FS/part_event.pm @@ -286,18 +286,32 @@ i.e. 'cust_main'=>'cust_main.custnum' =cut sub eventtable_pkey_sql { - #my $class = shift; + my $class = shift; - my %hash = ( - 'cust_main' => 'cust_main.custnum', - 'cust_bill' => 'cust_bill.invnum', - 'cust_pkg' => 'cust_pkg.pkgnum', - 'cust_pay_batch' => 'cust_pay_batch.paybatchnum', - ); + my $hashref = $class->eventtable_pkey; + + my %hash = map { $_ => "$_.". $hashref->{$_} } keys %$hashref; \%hash; } +=item eventtable_pkey + +Returns a hash reference of full SQL primary key names for eventtable values, +i.e. 'cust_main'=>'custnum' + +=cut + +sub eventtable_pkey { + #my $class = shift; + + { + 'cust_main' => 'custnum', + 'cust_bill' => 'invnum', + 'cust_pkg' => 'pkgnum', + 'cust_pay_batch' => 'paybatchnum', + }; +} =item eventtables |