X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event.pm;h=6f2c5366dbe104364b3376fddfd705b63a434b88;hb=58f99accce35aa76abe9ff852f6c6ee84e8ce712;hp=d0ab65e3f0f42315d05a33544143b6d49b01e14c;hpb=1d84feb7fe821b547e211ad03e5c200c8f218797;p=freeside.git diff --git a/FS/FS/part_event.pm b/FS/FS/part_event.pm index d0ab65e3f..6f2c5366d 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