-<% $pre %>Credit<% $post %>
-by <% $cust_credit->otaker %><% "$reason$desc$apply$delete$unapply" %>
+<% $credit %>
+<% "$reason$desc$apply$delete$unapply" %>
<%init>
my( $cust_credit, %opt ) = @_;
+my $date_format = $opt{'date_format'} || '%m/%d/%Y';
+
my $conf = new FS::Conf;
my $curuser = $FS::CurrentUser::CurrentUser;
%cust_credit_bill_height = ('height' => 436);
}
-my( $pre, $post, $apply, $ext ) = ( '', '', '', '' );
+my( $apply, $ext ) = ( '', '', '', '' );
+my $credit = mt("Credit by [_1]", $cust_credit->otaker );
if ( scalar(@cust_credit_bill) == 0
&& scalar(@cust_credit_refund) == 0 ) {
#completely unapplied
- $pre = '<B><FONT COLOR="#FF0000">Unapplied ';
- $post = '</FONT></B>';
+ $credit = '<B><FONT COLOR="#FF0000">'
+ . mt("Unapplied Credit by [_1]", $cust_credit->otaker )
+ . '</FONT></B>';
if ( $curuser->access_right('Apply credit') ) {
if ( $cust_credit->cust_main->total_owed > 0 ) {
$apply = ' ('.
include( '/elements/popup_link.html',
- 'label' => 'apply',
+ 'label' => mt('apply'),
'action' => "${p}edit/cust_credit_bill.cgi?".
$cust_credit->crednum,
- 'actionlabel' => 'Apply credit',
+ 'actionlabel' => mt('Apply credit'),
%cust_credit_bill_width,
%cust_credit_bill_height,
).
if ( $cust_credit->cust_main->total_unapplied_refunds > 0 ) {
$apply.= ' ('.
include( '/elements/popup_link.html',
- 'label' => 'apply to refund',
+ 'label' => mt('apply to refund'),
'action' => "${p}edit/cust_credit_refund.cgi?".
$cust_credit->crednum,
- 'actionlabel' => 'Apply credit to refund',
+ 'actionlabel' => mt('Apply credit to refund'),
'width' => 392,
- #default# 'height' => 336,
).
')';
}
&& scalar(@cust_credit_refund) == 1
&& $cust_credit->credited == 0 ) {
#applied to one refund
- $desc .= ' refunded on '. time2str("%D", $cust_credit_refund[0]->_date);
+ $desc .= mt(" refunded on [_1]", time2str($date_format, $cust_credit_refund[0]->_date) );
} else {
#complicated
$desc .= '<BR>';
'$'. $app->amount.
' '. $app->applied_to_invoice.
'<BR>';
- #' on '. time2str("%D", $app->_date).
+ #' on '. time2str($date_format, $app->_date).
} elsif ( $app->isa('FS::cust_credit_refund') ) {
$desc .= ' '.
'$'. $app->amount.
- ' refunded on '. time2str("%D", $app->_date).
+ mt(" refunded on [_1]", 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->cust_main->total_owed > 0 ) {
$apply = ' ('.
include( '/elements/popup_link.html',
- 'label' => 'apply',
+ 'label' => mt('apply'),
'action' => "${p}edit/cust_credit_bill.cgi?".
$cust_credit->crednum,
- 'actionlabel' => 'Apply credit',
+ 'actionlabel' => mt('Apply credit'),
%cust_credit_bill_width,
%cust_credit_bill_height,
).
if ( $cust_credit->cust_main->total_unapplied_refunds > 0 ) {
$apply.= ' ('.
include( '/elements/popup_link.html',
- 'label' => 'apply to refund',
+ 'label' => mt('apply to refund'),
'action' => "${p}edit/cust_credit_refund.cgi?".
$cust_credit->crednum,
- 'actionlabel' => 'Apply credit to refund',
+ 'actionlabel' => mt('Apply credit to refund'),
'width' => 392,
- #default# 'height' => 336,
).
')';
}