Skip to content

Commit

Permalink
Merge pull request #224 from kivitendo/20231113-fix-falsche-WF-Abkuer…
Browse files Browse the repository at this point in the history
…zung

20231113 fix falsche wf abkuerzung
  • Loading branch information
bblessmann authored Nov 14, 2023
2 parents 3ed0a46 + f4632ae commit a626a5b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions SL/DB/Order.pm
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,14 @@ sub new_from {
croak("Cannot convert from '" . $source->record_type . "' to '" . $destination_type . "'") if !$from_to;

my $is_abbr_any = sub {
any { $from_to->{abbr} eq $_ } @_;
my (@abbrs) = @_;

my $missing_abbr;
if (any { $missing_abbr = $_; !grep { $_->{abbr} eq $missing_abbr } @from_tos } @abbrs) {
die "no such workflow abbreviation '$missing_abbr'";
}

any { $from_to->{abbr} eq $_ } @abbrs;
};

my ($item_parent_id_column, $item_parent_column);
Expand Down Expand Up @@ -570,7 +577,7 @@ sub new_from {
);
}

if ( $is_abbr_any->(qw(soipo sopo poso rqso soisq sosq porq rqsq sqrq soirq sorq poisq poiso)) ) {
if ( $is_abbr_any->(qw(soipo sopo poso rqso soisq sosq porq rqsq sqrq soirq sorq pqisq pqiso)) ) {
$args{ordnumber} = undef;
$args{quonumber} = undef;
}
Expand Down

0 comments on commit a626a5b

Please sign in to comment.