make postal invoice fee a per-agent config, RT7240
authorlevinse <levinse>
Fri, 29 Apr 2011 15:07:43 +0000 (15:07 +0000)
committerlevinse <levinse>
Fri, 29 Apr 2011 15:07:43 +0000 (15:07 +0000)
FS/FS/Conf.pm
FS/FS/cust_main.pm

index 331645e..02133b0 100644 (file)
@@ -3010,6 +3010,7 @@ and customer address. Include units.',
     'section'     => 'billing',
     'description' => 'This allows selection of a package to insert on invoices for customers with postal invoices selected.',
     'type'        => 'select-part_pkg',
+    'per_agent'   => 1,
   },
 
   {
index 8345d92..b2bcbdc 100644 (file)
@@ -3410,7 +3410,7 @@ sub charge {
 sub charge_postal_fee {
   my $self = shift;
 
-  my $pkgpart = $conf->config('postal_invoice-fee_pkgpart');
+  my $pkgpart = $conf->config('postal_invoice-fee_pkgpart', $self->agentnum);
   return '' unless ($pkgpart && grep { $_ eq 'POST' } $self->invoicing_list);
 
   my $cust_pkg = new FS::cust_pkg ( {