my @cust_credit_bill = $cust_credit->cust_credit_bill;
my @cust_credit_refund = $cust_credit->cust_credit_refund;
my @cust_credit_bill = $cust_credit->cust_credit_bill;
my @cust_credit_refund = $cust_credit->cust_credit_refund;
$credit = '<B><FONT COLOR="#FF0000">'
. emt("Unapplied Credit by [_1]", $cust_credit->otaker )
. '</FONT></B>';
$credit = '<B><FONT COLOR="#FF0000">'
. emt("Unapplied Credit by [_1]", $cust_credit->otaker )
. '</FONT></B>';
$apply.= ' ('.
include( '/elements/popup_link.html',
'label' => emt('apply to refund'),
$apply.= ' ('.
include( '/elements/popup_link.html',
'label' => emt('apply to refund'),
foreach my $app ( sort { $a->_date <=> $b->_date }
( @cust_credit_bill, @cust_credit_refund ) ) {
if ( $app->isa('FS::cust_credit_bill') ) {
foreach my $app ( sort { $a->_date <=> $b->_date }
( @cust_credit_bill, @cust_credit_refund ) ) {
if ( $app->isa('FS::cust_credit_bill') ) {
. $app->applied_to_invoice . '<BR>';
} elsif ( $app->isa('FS::cust_credit_refund') ) {
$desc .= ' ' .
. $app->applied_to_invoice . '<BR>';
} elsif ( $app->isa('FS::cust_credit_refund') ) {
$desc .= ' ' .
- emt("[_1][_2] refunded on [_3]", $money_char, $app->amount,
+ emt("[_1][_2] refunded on [_3]", $opt{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 ) {
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">' .
- emt("[_1][_2] unapplied", $money_char, $cust_credit->credited) .
+ $desc .= ' <B><FONT COLOR="#FF0000">'.
+ emt("[_1][_2] unapplied",$opt{money_char},$cust_credit->credited).
$apply.= ' ('.
include( '/elements/popup_link.html',
'label' => emt('apply to refund'),
$apply.= ' ('.
include( '/elements/popup_link.html',
'label' => emt('apply to refund'),
-if ( $cust_credit->closed !~ /^Y/i && scalar(@cust_credit_bill)
- && $curuser->access_right('Unapply credit') );
+ if $cust_credit->closed !~ /^Y/i
+ && scalar(@cust_credit_bill)
+ && $opt{'Unapply credit'};