From: Mark Wells Date: Fri, 29 Mar 2013 03:10:49 +0000 (-0700) Subject: show more detail about payments on invoice, #21949 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=804bcfa0ca42ec19595d0cf79d010e66a09a2109;p=freeside.git show more detail about payments on invoice, #21949 --- diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 88da6f767..36947ad82 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -5086,6 +5086,13 @@ and customer address. Include units.', 'type' => 'text', }, + { + 'key' => 'invoice_payment_details', + 'section' => 'invoicing', + 'description' => 'When displaying payments on an invoice, show the payment method used, including the check or credit card number. Credit card numbers will be masked.', + 'type' => 'checkbox', + }, + { 'key' => 'cust_main-status_module', 'section' => 'UI', diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index aed1ca5a7..b50f35234 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -5342,11 +5342,16 @@ sub _items_payments { #something more elaborate if $_->amount ne ->cust_pay->paid ? + my $desc = $self->mt('Payment received').' '. + time2str($date_format,$_->cust_pay->_date ); + $desc .= $self->mt(' via ' . $_->cust_pay->payby_payinfo_pretty) + if ( $self->conf->exists('invoice_payment_details') ); + push @b, { - 'description' => $self->mt('Payment received').' '. - time2str($date_format,$_->cust_pay->_date ), + 'description' => $desc, 'amount' => sprintf("%.2f", $_->amount ) }; + } @b;