diff --git a/lib/NGCP/Panel/Utils/Billing.pm b/lib/NGCP/Panel/Utils/Billing.pm index 6aabefccdf..d7efe40d75 100644 --- a/lib/NGCP/Panel/Utils/Billing.pm +++ b/lib/NGCP/Panel/Utils/Billing.pm @@ -448,8 +448,19 @@ sub switch_prepaid { } sub get_contract_count_stmt { - #die("todo"); - return "select count(distinct c.id) from `billing`.`contracts_billing_profile_network` cbpn join `billing`.`contracts` c on c.id = cbpn.contract_id where cbpn.`billing_profile_id` = `me`.`id` and c.status != 'terminated' and (cbpn.end_date is null or cbpn.end_date >= now())"; + + return <= now())"; + + return <