From b34ae4eed266d88c967dbdbd7e94106bff0bb7d2 Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Tue, 1 Jul 2014 14:25:22 +0200 Subject: [PATCH] MT#7803 Fix customer balance creation on new month --- lib/NGCP/Panel/Controller/Customer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/NGCP/Panel/Controller/Customer.pm b/lib/NGCP/Panel/Controller/Customer.pm index db1ac5a1d2..90a27a2604 100644 --- a/lib/NGCP/Panel/Controller/Customer.pm +++ b/lib/NGCP/Panel/Controller/Customer.pm @@ -235,7 +235,7 @@ sub base :Chained('list_customer') :PathPart('') :CaptureArgs(1) { my $billing_mapping = $contract_rs->first->billing_mappings->find($contract_rs->first->get_column('bmid')); my $stime = NGCP::Panel::Utils::DateTime::current_local()->truncate(to => 'month'); - my $etime = $stime->clone->add(months => 1); + my $etime = $stime->clone->add(months => 1)->subtract(seconds => 1); my $balance; try {