X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpayment_history%2Fpayment.html;fp=httemplate%2Fview%2Fcust_main%2Fpayment_history%2Fpayment.html;h=43f0afbb051138f4e0e9817685f454eea5e10ad5;hb=93519f9371b41ded713a93fba031ed7a361be04c;hp=7df16cf875ed90e7da566dc09ffb1a3e26bcf502;hpb=5d5e197dd0c74b419a4c4cb0791bf23e68e4c3bb;p=freeside.git
diff --git a/httemplate/view/cust_main/payment_history/payment.html b/httemplate/view/cust_main/payment_history/payment.html
index 7df16cf87..43f0afbb0 100644
--- a/httemplate/view/cust_main/payment_history/payment.html
+++ b/httemplate/view/cust_main/payment_history/payment.html
@@ -7,22 +7,13 @@ my( $cust_pay, %opt ) = @_;
my $date_format = $opt{'date_format'} || '%m/%d/%Y';
my $conf = new FS::Conf;
+my $money_char = $conf->config('money_char') || '$';
my $curuser = $FS::CurrentUser::CurrentUser;
-my $payby = $cust_pay->payby;
-
-my $payinfo;
-if ( $payby eq 'CARD' ) {
- $payinfo = $cust_pay->paymask;
-} elsif ( $payby eq 'CHEK' ) {
- my( $account, $aba ) = split('@', $cust_pay->paymask );
- $payinfo = mt("ABA [_1], Acct #[_2]",$aba,$account);
-} else {
- $payinfo = $cust_pay->payinfo;
-}
my @cust_bill_pay = $cust_pay->cust_bill_pay;
my @cust_pay_refund = $cust_pay->cust_pay_refund;
+my ($payby,$payinfo) = translate_payinfo($cust_pay);
my $target = "$payby$payinfo";
$payby = translate_payby($payby,$payinfo);
my $info = $payby ? "($payby$payinfo)" : '';
@@ -40,7 +31,7 @@ if ($conf->exists('cust_bill_pay_pkg-manual')) {
%cust_bill_pay_height = ('height' => 436);
}
-my( $apply, $ext ) = ( '', '', '', '' );
+my $apply = '';
my $otaker = $cust_pay->otaker;
$otaker = 'auto billing' if $otaker eq 'fs_daily';
@@ -95,24 +86,21 @@ if ( scalar(@cust_bill_pay) == 0
foreach my $app ( sort { $a->_date <=> $b->_date }
( @cust_bill_pay, @cust_pay_refund ) ) {
if ( $app->isa('FS::cust_bill_pay') ) {
- $desc .= ' '.
- '$'. $app->amount.
- ' '. $app->applied_to_invoice.
- '
';
- #' on '. time2str($date_format, $cust_bill_pay->_date).
+ $desc .= ' ' . $money_char . $app->amount . ' ' .
+ $app->applied_to_invoice . '
';
} elsif ( $app->isa('FS::cust_pay_refund') ) {
- $desc .= ' '.
- '$'. $app->amount.
- mt(" refunded on [_1]", time2str($date_format, $app->_date) ) .
- '
';
+ $desc .= ' ' .
+ mt("[_1][_2] refunded on [_3]", $money_char, $app->amount,
+ time2str($date_format, $app->_date) ) . '
';
} else {
die "$app is not a FS::cust_bill_pay or FS::cust_pay_refund";
}
}
if ( $cust_pay->unapplied > 0 ) {
$desc .= ' '.
- '$'.
- $cust_pay->unapplied. ' unapplied';
+ '' .
+ mt("[_1][_2] unapplied", $money_char, $cust_pay->unapplied) .
+ '';
if ( $curuser->access_right('Apply payment') ) {
if ( $cust_pay->cust_main->total_owed > 0 ) {
$apply = ' ('.
@@ -164,8 +152,8 @@ if ( $cust_pay->closed !~ /^Y/i
) {
$refund = qq! (refund)!;
+ qq! TITLE="! .mt('Send a refund for this payment to the payment gateway')
+ . '">' . mt('refund') . ')';
}
my $void = '';