[freeside-commits] freeside/httemplate/view/cust_main/payment_history attempted_payment.html, 1.2, 1.3 credit.html, 1.8, 1.9 payment.html, 1.10, 1.11 pending_payment.html, 1.3, 1.4 refund.html, 1.5, 1.6 voided_payment.html, 1.8, 1.9
Erik Levinson
levinse at wavetail.420.am
Mon May 16 22:00:46 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history
In directory wavetail.420.am:/tmp/cvs-serv16996/view/cust_main/payment_history
Modified Files:
attempted_payment.html credit.html payment.html
pending_payment.html refund.html voided_payment.html
Log Message:
internationalization/localization, RT12515
Index: refund.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history/refund.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- refund.html 16 May 2011 19:47:20 -0000 1.5
+++ refund.html 17 May 2011 05:00:44 -0000 1.6
@@ -11,7 +11,6 @@
my $payinfo = $payby eq 'CARD'
? $cust_refund->paymask
: $cust_refund->payinfo;
-
$payby = translate_payby_refund($payby,$payinfo);
my $refund = mt("Refund by [_1]",$cust_refund->otaker);
@@ -29,7 +28,6 @@
).
')';
-
my $delete = '';
$delete = areyousure_link("${p}misc/delete-cust_refund.cgi?".$cust_refund->refundnum,
mt('Are you sure you want to delete this refund?'),
Index: attempted_payment.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history/attempted_payment.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- attempted_payment.html 16 May 2011 18:48:25 -0000 1.2
+++ attempted_payment.html 17 May 2011 05:00:43 -0000 1.3
@@ -3,22 +3,7 @@
my( $cust_pay_pending, %opt ) = @_;
-my $date_format = $opt{'date_format'} || '%m/%d/%Y';
-
-my $curuser = $FS::CurrentUser::CurrentUser;
-
-my $payby = $cust_pay_pending->payby;
-
-my $payinfo;
-if ( $payby eq 'CARD' ) {
- $payinfo = $cust_pay_pending->paymask;
-} elsif ( $payby eq 'CHEK' ) {
- my( $account, $aba ) = split('@', $cust_pay_pending->paymask );
- $payinfo = mt("ABA [_1], Acct #[_2]",$aba,$account);
-} else {
- $payinfo = $cust_pay_pending->payinfo;
-}
-
+my ($payby,$payinfo) = translate_payinfo($cust_pay_pending);
$payby = translate_payby($payby,$payinfo);
my $info = $payby ? "($payby$payinfo)" : '';
Index: credit.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history/credit.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -d -r1.8 -r1.9
--- credit.html 16 May 2011 19:47:19 -0000 1.8
+++ credit.html 17 May 2011 05:00:43 -0000 1.9
@@ -7,6 +7,7 @@
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 @cust_credit_bill = $cust_credit->cust_credit_bill;
@@ -74,23 +75,20 @@
foreach my $app ( sort { $a->_date <=> $b->_date }
( @cust_credit_bill, @cust_credit_refund ) ) {
if ( $app->isa('FS::cust_credit_bill') ) {
- $desc .= ' '.
- '$'. $app->amount.
- ' '. $app->applied_to_invoice.
- '<BR>';
- #' on '. time2str($date_format, $app->_date).
+ $desc .= ' ' . $money_char . $app->amount . ' '
+ . $app->applied_to_invoice . '<BR>';
} elsif ( $app->isa('FS::cust_credit_refund') ) {
$desc .= ' '.
- '$'. $app->amount.
- mt(" refunded on [_1]", time2str($date_format, $app->_date) ).
- '<BR>';
+ mt("[_1][_2] refunded on [_3]", $money_char, $app->amount,
+ time2str($date_format, $app->_date) ) . '<BR>';
} else {
die "$app is not a FS::cust_credit_bill or a FS::cust_credit_refund";
}
}
if ( $cust_credit->credited > 0 ) {
- $desc .= ' <B><FONT COLOR="#FF0000">$'.
- $cust_credit->credited. ' unapplied</FONT></B>';
+ $desc .= ' <B><FONT COLOR="#FF0000">' .
+ mt("[_1][_2] unapplied", $money_char, $cust_credit->credited) .
+ '</FONT></B>';
if ( $curuser->access_right('Apply credit') ) {
if ( $cust_credit->cust_main->total_owed > 0 ) {
$apply = ' ('.
Index: pending_payment.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history/pending_payment.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- pending_payment.html 16 May 2011 18:48:25 -0000 1.3
+++ pending_payment.html 17 May 2011 05:00:44 -0000 1.4
@@ -7,18 +7,7 @@
my $curuser = $FS::CurrentUser::CurrentUser;
-my $payby = $cust_pay_pending->payby;
-
-my $payinfo;
-if ( $payby eq 'CARD' ) {
- $payinfo = $cust_pay_pending->paymask;
-} elsif ( $payby eq 'CHEK' ) {
- my( $account, $aba ) = split('@', $cust_pay_pending->paymask );
- $payinfo = mt("ABA [_1], Acct #[_2]",$aba,$account);
-} else {
- $payinfo = $cust_pay_pending->payinfo;
-}
-
+my ($payby, $payinfo) = translate_payinfo($cust_pay_pending);
my $target = "$payby$payinfo";
$payby = translate_payby($payby,$payinfo);
my $info = $payby ? "($payby$payinfo)" : '';
@@ -33,7 +22,7 @@
my $edit_pending =
$FS::CurrentUser::CurrentUser->access_right('Edit customer pending payments');
-my $status = "Status: ".$cust_pay_pending->status;
+my $status = mt("Status: [_1]",$cust_pay_pending->status);
my $action = $statusaction{$cust_pay_pending->status};
Index: voided_payment.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history/voided_payment.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -d -r1.8 -r1.9
--- voided_payment.html 16 May 2011 19:47:20 -0000 1.8
+++ voided_payment.html 17 May 2011 05:00:44 -0000 1.9
@@ -13,18 +13,7 @@
my $curuser = $FS::CurrentUser::CurrentUser;
-my $payby = $cust_pay_void->payby;
-
-my $payinfo;
-if ( $payby eq 'CARD' ) {
- $payinfo = $cust_pay_void->paymask;
-} elsif ( $payby eq 'CHEK' ) {
- my( $account, $aba ) = split('@', $cust_pay_void->paymask );
- $payinfo = mt("ABA [_1], Acct #[_2]",$aba,$account);
-} else {
- $payinfo = $cust_pay_void->payinfo;
-}
-
+my ($payby,$payinfo) = translate_payinfo($cust_pay_void);
$payby = translate_payby($payby,$payinfo);
my $info = $payby ? "($payby$payinfo)" : '';
Index: payment.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history/payment.html,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -d -r1.10 -r1.11
--- payment.html 16 May 2011 19:47:19 -0000 1.10
+++ payment.html 17 May 2011 05:00:44 -0000 1.11
@@ -7,22 +7,13 @@
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 @@
%cust_bill_pay_height = ('height' => 436);
}
-my( $apply, $ext ) = ( '', '', '', '' );
+my $apply = '';
my $otaker = $cust_pay->otaker;
$otaker = '<i>auto billing</i>' if $otaker eq 'fs_daily';
@@ -95,24 +86,21 @@
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.
- '<BR>';
- #' on '. time2str($date_format, $cust_bill_pay->_date).
+ $desc .= ' ' . $money_char . $app->amount . ' ' .
+ $app->applied_to_invoice . '<BR>';
} elsif ( $app->isa('FS::cust_pay_refund') ) {
$desc .= ' '.
- '$'. $app->amount.
- mt(" refunded on [_1]", time2str($date_format, $app->_date) ) .
- '<BR>';
+ mt("[_1][_2] refunded on [_3]", $money_char, $app->amount,
+ time2str($date_format, $app->_date) ) . '<BR>';
} else {
die "$app is not a FS::cust_bill_pay or FS::cust_pay_refund";
}
}
if ( $cust_pay->unapplied > 0 ) {
$desc .= ' '.
- '<B><FONT COLOR="#FF0000">$'.
- $cust_pay->unapplied. ' unapplied</FONT></B>';
+ '<B><FONT COLOR="#FF0000">' .
+ mt("[_1][_2] unapplied", $money_char, $cust_pay->unapplied) .
+ '</FONT></B>';
if ( $curuser->access_right('Apply payment') ) {
if ( $cust_pay->cust_main->total_owed > 0 ) {
$apply = ' ('.
@@ -164,8 +152,8 @@
) {
$refund = qq! (<A HREF="${p}edit/cust_refund.cgi?payby=$1;!.
qq!paynum=!. $cust_pay->paynum. '"'.
- qq! TITLE="Send a refund for this payment to the payment gateway"!.
- qq!>refund</A>)!;
+ qq! TITLE="! .mt('Send a refund for this payment to the payment gateway')
+ . '">' . mt('refund') . '</A>)';
}
my $void = '';
More information about the freeside-commits
mailing list