diff --git a/lib/NGCP/Panel/Controller/Customer.pm b/lib/NGCP/Panel/Controller/Customer.pm index cabc3c2094..892e68e240 100644 --- a/lib/NGCP/Panel/Controller/Customer.pm +++ b/lib/NGCP/Panel/Controller/Customer.pm @@ -162,6 +162,11 @@ sub create :Chained('list_customer') :PathPart('create') :Args(0) { product_id => $product_id, }); + if($contract->contact->reseller_id // -1 != + $billing_profile->reseller_id // -1) { + die( ["Contact and Billing profile should have the same reseller", "showdetails"] ); + } + NGCP::Panel::Utils::Contract::create_contract_balance( c => $c, profile => $billing_profile, @@ -356,6 +361,11 @@ sub edit :Chained('base') :PathPart('edit') :Args(0) { }); } + if($contract->contact->reseller_id // -1 != + $billing_mapping->billing_profile->reseller_id // -1) { + die( ["Contact and Billing profile should have the same reseller", "showdetails"] ); + } + delete $c->session->{created_objects}->{contact}; delete $c->session->{created_objects}->{billing_profile}; my $contract_id = $contract->id;