+sub _before_save_remove_customer_pricegroup {
+ my ($self) = @_;
+
+ return 1 unless $::form->{SELF}{remove_customer_pricegroup};
+
+ my %attributes = (pricegroup_id => undef);
+ require SL::DB::Customer;
+ SL::DB::Manager::Customer->update_all(
+ set => \%attributes,
+ where => [
+ 'pricegroup_id' => $self->id,
+ ],
+ );
+
+ return 1;
+}
+