diff --git a/lib/NGCP/Panel/Form/CustomerFraudEvents/Reseller.pm b/lib/NGCP/Panel/Form/CustomerFraudEvents/Reseller.pm index 0dbd795a73..c03964012a 100644 --- a/lib/NGCP/Panel/Form/CustomerFraudEvents/Reseller.pm +++ b/lib/NGCP/Panel/Form/CustomerFraudEvents/Reseller.pm @@ -64,7 +64,7 @@ has_field 'type' => ( has_field 'interval_cost' => ( type => 'Float', label => 'Interval cost', - precision => '4', + precision => '2', required => 1, element_attr => { rel => ['tooltip'], diff --git a/lib/NGCP/Panel/Role/API/CustomerFraudEvents.pm b/lib/NGCP/Panel/Role/API/CustomerFraudEvents.pm index 0bfbe0e0a8..a6fd1065ef 100644 --- a/lib/NGCP/Panel/Role/API/CustomerFraudEvents.pm +++ b/lib/NGCP/Panel/Role/API/CustomerFraudEvents.pm @@ -120,6 +120,8 @@ sub resource_from_item { } else { $resource{'interval_cost'} = $cpc{'customer_cost'}; } + $resource{'interval_cost'} = sprintf("%.2f",$resource{'interval_cost'}) + if (defined $resource{'interval_cost'} and length($resource{'interval_cost'}) > 0); if ('month' eq $cpc{'period'}) { if ('contract' eq $cpc{'fraud_limit_type'}) { if ($contract_fraud_preference) {