sub init_services_deliverable {
my ($self) = @_;
- if ($::form->{type} =~ m/^sales_/ || $self->{objects}->[0]->{customer_id}) {
+ if (($::form->{type}//'') =~ m/^sales_/ || $self->{objects}->[0]->{customer_id}) {
$::instance_conf->get_sales_delivery_order_check_service;
- } elsif ($::form->{type} =~ m/^purchase_/ || $self->{objects}->[0]->{vendor_id}) {
+ } elsif (($::form->{type}//'') =~ m/^purchase_/ || $self->{objects}->[0]->{vendor_id}) {
$::instance_conf->get_purchase_delivery_order_check_service;
} else {
croak "wrong call, no customer or vendor object referenced";