diff --git a/lib/NGCP/Panel/Controller/API/CustomerZoneCostsItem.pm b/lib/NGCP/Panel/Controller/API/CustomerZoneCostsItem.pm index b390e24caa..689d0d3d96 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerZoneCostsItem.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerZoneCostsItem.pm @@ -41,7 +41,7 @@ sub GET :Allow { { last unless $self->valid_id($c, $id); my $field_dev = $self->item_by_id($c, $id); - last unless $self->resource_exists($c, deviceprofile => $field_dev); + last unless $self->resource_exists($c, customerzonecosts => $field_dev); my $hal = $self->hal_from_item($c, $field_dev); last unless $hal; diff --git a/lib/NGCP/Panel/Role/API/CustomerZoneCosts.pm b/lib/NGCP/Panel/Role/API/CustomerZoneCosts.pm index a5b3471d08..1c46621675 100644 --- a/lib/NGCP/Panel/Role/API/CustomerZoneCosts.pm +++ b/lib/NGCP/Panel/Role/API/CustomerZoneCosts.pm @@ -81,8 +81,7 @@ sub resource_from_item { stime => $stime, etime => $etime, subscriber_uuid => $subscriber_uuid, - in => 1, - out => 1, + call_direction => ($c->request->query_params->{direction} ? $c->request->query_params->{direction} : 'in_out'), group_by_detail => 0, );