X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill.pm;h=83ddb656683d0ef06fdf2f87feeb61369767e09c;hb=4e082c20bcb6754f6f832cfc95d45198a2b920f5;hp=63ae88471c56c694020f65c6811110d4d5caeb9d;hpb=965d64dbe634d499face4cea77c8b73188282a46;p=freeside.git diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 63ae88471..83ddb6566 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2,7 +2,7 @@ package FS::cust_bill; use base qw( FS::Template_Mixin FS::cust_main_Mixin FS::Record ); use strict; -use vars qw( $DEBUG $me $date_format ); +use vars qw( $DEBUG $me ); # but NOT $conf use Fcntl qw(:flock); #for spool_csv use Cwd; @@ -44,7 +44,6 @@ $me = '[FS::cust_bill]'; #ask FS::UID to run this stuff for us later FS::UID->install_callback( sub { my $conf = new FS::Conf; #global - $date_format = $conf->config('date_format') || '%x'; #/YY } ); =head1 NAME @@ -1659,6 +1658,7 @@ sub send_csv { my $spooldir = "/usr/local/etc/freeside/export.". datasrc. "/cust_bill"; mkdir $spooldir, 0700 unless -d $spooldir; + # don't localize dates here, they're a defined format my $tracctnum = $self->invnum. time2str('-%Y%m%d%H%M%S', time); my $file = "$spooldir/$tracctnum.csv"; @@ -1965,7 +1965,7 @@ sub print_csv { my $taxtotal = 0; $taxtotal += $_->{'amount'} foreach $self->_items_tax; - my $duedate = $self->due_date2str('%m/%d/%Y'); #date_format? + my $duedate = $self->due_date2str('%m/%d/%Y'); # hardcoded, NOT date_format my( $previous_balance, @unused ) = $self->previous; #previous balance @@ -2252,7 +2252,7 @@ sub print_csv { ? time2str("%x", $cust_bill_pkg->sdate) : '' ), ($cust_bill_pkg->edate - ?time2str("%x", $cust_bill_pkg->edate) + ? time2str("%x", $cust_bill_pkg->edate) : '' ), ); @@ -2965,8 +2965,8 @@ sub _items_previous { my @b = (); foreach ( @pr_cust_bill ) { my $date = $conf->exists('invoice_show_prior_due_date') - ? 'due '. $_->due_date2str($date_format) - : time2str($date_format, $_->_date); + ? 'due '. $_->due_date2str('short') + : $self->time2str_local('short', $_->_date); push @b, { 'description' => $self->mt('Previous Balance, Invoice #'). $_->invnum. " ($date)", #'pkgpart' => 'N/A', @@ -3030,7 +3030,7 @@ sub _items_credits { # " (". time2str("%x",$_->cust_credit->_date) .")". # $reason, 'description' => $self->mt('Credit applied').' '. - time2str($date_format,$obj->_date). $reason, + $self->time2str_local('short', $obj->_date). $reason, 'amount' => sprintf("%.2f",$obj->amount), }; } @@ -3074,7 +3074,7 @@ sub _items_payments { foreach my $obj (@objects) { my $cust_pay = $obj->isa('FS::cust_pay') ? $obj : $obj->cust_pay; my $desc = $self->mt('Payment received').' '. - time2str($date_format, $cust_pay->_date ); + $self->time2str_local('short', $cust_pay->_date ); $desc .= $self->mt(' via ') . $cust_pay->payby_payinfo_pretty( $self->cust_main->locale ) if $detailed;