X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpayment_history%2Fcredit.html;h=fa5838e4ed0ed100a39fc3a5052b28333b14e74b;hb=dc404e7519cf0ec3a0024a662c5e0c5566f9a194;hp=058c6f536e9a47b260abe07dc8ca64d2931f63ec;hpb=3402ff329fde97d6ac96723b5c2a4ed46ed2ce25;p=freeside.git diff --git a/httemplate/view/cust_main/payment_history/credit.html b/httemplate/view/cust_main/payment_history/credit.html index 058c6f536..fa5838e4e 100644 --- a/httemplate/view/cust_main/payment_history/credit.html +++ b/httemplate/view/cust_main/payment_history/credit.html @@ -4,6 +4,8 @@ by <% $cust_credit->otaker %><% "$reason$desc$apply$delete$unapply" %> my( $cust_credit, %opt ) = @_; +my $date_format = $opt{'date_format'} || '%m/%d/%Y'; + my $curuser = $FS::CurrentUser::CurrentUser; my @cust_credit_bill = $cust_credit->cust_credit_bill; @@ -56,7 +58,7 @@ if ( scalar(@cust_credit_bill) == 0 && 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 .= '
'; @@ -67,11 +69,11 @@ if ( scalar(@cust_credit_bill) == 0 '$'. $app->amount. ' '. $app->applied_to_invoice. '
'; - #' 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). '
'; } else { die "$app is not a FS::cust_credit_bill or a FS::cust_credit_refund";