default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / FS / FS / cust_bill_pay_pkg.pm
index 0a17469..ccfa492 100644 (file)
@@ -1,5 +1,5 @@
 package FS::cust_bill_pay_pkg;
-use base qw( FS::Record );
+use base qw(  FS::cust_main_Mixin FS::Record );
 
 use strict;
 use FS::Conf;
@@ -97,7 +97,11 @@ sub insert {
 
   #payment receipt
   my $conf = new FS::Conf;
-  my $trigger = $conf->config('payment_receipt-trigger') || 'cust_pay';
+  my $trigger =
+    $conf->config('payment_receipt-trigger',
+                    $self->cust_bill_pay->cust_bill->cust_main->agentnum,
+                 )
+    || 'cust_pay';
   if ( $trigger eq 'cust_bill_pay_pkg' ) {
     my $error = $self->send_receipt(
       'manual'    => $options{'manual'},