my( $cust_credit, %opt ) = @_;
+my $date_format = $opt{'date_format'} || '%m/%d/%Y';
+
+my $conf = new FS::Conf;
my $curuser = $FS::CurrentUser::CurrentUser;
my @cust_credit_bill = $cust_credit->cust_credit_bill;
$desc .= ' for '. $cust_pkg->pkg_label_long;
}
+my %cust_credit_bill_width = ('width' => 392);
+my %cust_credit_bill_height = ();
+if ($conf->exists('cust_credit_bill_pkg-manual')) {
+ %cust_credit_bill_width = ('width' => 592);
+ %cust_credit_bill_height = ('height' => 436);
+}
+
my( $pre, $post, $apply, $ext ) = ( '', '', '', '' );
if ( scalar(@cust_credit_bill) == 0
&& scalar(@cust_credit_refund) == 0 ) {
'action' => "${p}edit/cust_credit_bill.cgi?".
$cust_credit->crednum,
'actionlabel' => 'Apply credit',
- 'width' => 392,
- #default# 'height' => 336,
+ %cust_credit_bill_width,
+ %cust_credit_bill_height,
).
')';
}
&& scalar(@cust_credit_refund) == 1
&& $cust_credit->credited == 0 ) {
#applied to one refund
- $desc .= ' refunded on '. time2str("%D", $cust_credit_refund[0]->_date);
+ $desc .= ' refunded on '. 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).
+ ' refunded on '. time2str($date_format, $app->_date).
'<BR>';
} else {
die "$app is not a FS::cust_credit_bill or a FS::cust_credit_refund";
'action' => "${p}edit/cust_credit_bill.cgi?".
$cust_credit->crednum,
'actionlabel' => 'Apply credit',
- 'width' => 392,
- #default# 'height' => 336,
+ %cust_credit_bill_width,
+ %cust_credit_bill_height,
).
')';
}