=================================================================== RCS file: /cvs/RT/Invoicing/rt_invoices.pl,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- RT/Invoicing/rt_invoices.pl 2011/03/22 02:37:14 1.14 +++ RT/Invoicing/rt_invoices.pl 2011/03/22 02:41:43 1.15 @@ -120,7 +120,6 @@ } } - $cust->{address} ||= get_user($custid); $cust->{invoice} = $invoice; } @@ -189,8 +188,8 @@ } if ($discount_time) { - $invoice->{discount}{amount} - += round($discount_time * $fee->{rate}); + $invoice->{discount}{amount} + += round( $discount_time * $fee->{rate} ); $invoice->{discount}{hours}{$h_type} += $discount_time; $h_type = '' if $h_type eq 'default'; @@ -242,10 +241,10 @@ next unless $invoice->{total} > 0 || $invoice->{total_due}; - # XXX Here we need to "make_address" + $invoice->{info} = $config->get('info'); $invoice->{from} = make_address( $config->get('from') ); - $invoice->{to} = make_address( $cust->{address} ); + $invoice->{to} = make_address( $cust->{address} || get_user($custid) ); $state->{lastinvoice}++; $invoice->{id} = $state->{lastinvoice}; @@ -326,7 +325,6 @@ return unless $custid; my $cust = $config->get('default') || {}; - $cust->{address} = get_user($custid); $cust->{match} = [ { type => 'requestors',