From: ivan Date: Wed, 30 Jun 2004 18:19:54 +0000 (+0000) Subject: payyment receipts template fixes X-Git-Tag: BEFORE_FINAL_MASONIZE~1001 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=197e1640b4d44a4769fccc947d0f1e128fbde3a8 payyment receipts template fixes --- diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index 91d525a27..799ceab51 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -178,6 +178,11 @@ sub insert { my @invoicing_list = grep { $_ ne 'POST' } $cust_main->invoicing_list; + my $payby = $self->payby; + my $payinfo = $self->payinfo; + $payby =~ s/^BILL$/Check/ if $payinfo; + $payinfo = $self->payinfo_masked if $payby eq 'CARD'; + my $error = send_email( 'from' => $conf->config('invoice_from'), #??? well as good as any 'to' => \@invoicing_list, @@ -186,11 +191,9 @@ sub insert { 'date' => time2str("%a %B %o, %Y", $self->_date), 'name' => $cust_main->name, 'paynum' => $self->paynum, - 'paid' => $self->paid, - 'payby' => ucfirst(lc($self->payby)), - 'payinfo' => ( $self->payby eq 'CARD' - ? $self->payinfo_masked - : $self->payinfo ), + 'paid' => sprintf("%.2f", $self->paid), + 'payby' => ucfirst(lc($payby)), + 'payinfo' => $payinfo, 'balance' => $cust_main->balance, } ) ], ); diff --git a/conf/payment_receipt_email b/conf/payment_receipt_email index fa5a735ef..1a0a75830 100644 --- a/conf/payment_receipt_email +++ b/conf/payment_receipt_email @@ -3,7 +3,7 @@ Dear { $name }, -This message is to inform you that your payment of ${ $amount } has been +This message is to inform you that your payment of ${ $paid } has been received. Payment ID: { $paynum }