From c45639af5a1ecc561c0fc02327a534f39248767e Mon Sep 17 00:00:00 2001 From: Alessio Garzi Date: Tue, 30 May 2023 12:49:08 +0200 Subject: [PATCH] MT#57447 Set reseller_id preference automatically when an account is created This commit forces the creation of reseller_id preference whenever a new subscriber is created in the same fashion of the already existing preference account_id. Change-Id: I8cc2b3b65e0e7a81e72452a3840fdd3540146968 --- lib/NGCP/Panel/Utils/Subscriber.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/NGCP/Panel/Utils/Subscriber.pm b/lib/NGCP/Panel/Utils/Subscriber.pm index 0177696921..ad97930a70 100644 --- a/lib/NGCP/Panel/Utils/Subscriber.pm +++ b/lib/NGCP/Panel/Utils/Subscriber.pm @@ -784,6 +784,7 @@ sub create_subscriber { tz => 'vienna', }); $preferences->{account_id} = $contract->id; + $preferences->{reseller_id} = $contract->contact->reseller_id; $preferences->{ac} = $params->{e164}{ac} if(defined $params->{e164}{ac} && length($params->{e164}{ac}) > 0); $preferences->{cc} = $params->{e164}{cc}