Skip to content

Commit

Permalink
Merge pull request #7373 from ehuelsmann/fix/master/service-creation-…
Browse files Browse the repository at this point in the history
…error

Don't create a new part when no parts match
  • Loading branch information
ehuelsmann committed Apr 29, 2023
2 parents cdd1334 + 678e876 commit ca16f28
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 63 deletions.
22 changes: 0 additions & 22 deletions old/bin/ir.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1243,28 +1243,6 @@ sub update {
$form->format_amount( \%myconfig, $form->{"${_}_$i"} );
}

} else {

# ok, so this is a new part
# ask if it is a part or service item

if ( $form->{"partsgroup_$i"}
&& ( $form->{"partsnumber_$i"} eq "" )
&& ( $form->{"description_$i"} eq "" ) )
{
$form->{rowcount}--;
$form->{id} = $form_id;
&display_form;
}
else {

$form->{"id_$i"} = 0;
$form->{"unit_$i"} = $locale->text('ea');

$form->{id} = $form_id;
&new_item;

}
}
}
}
Expand Down
22 changes: 0 additions & 22 deletions old/bin/is.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1326,28 +1326,6 @@ sub update {
$form->format_amount( \%myconfig, $form->{"${_}_$i"} );
}

} else {

# ok, so this is a new part
# ask if it is a part or service item

if ( $form->{"partsgroup_$i"}
&& ( $form->{"partsnumber_$i"} eq "" )
&& ( $form->{"description_$i"} eq "" ) )
{
$form->{rowcount}--;
$form->{id} = $form_id;
&display_form;
}
else {

$form->{"id_$i"} = 0;
$form->{"unit_$i"} = $locale->text('ea');

$form->{id} = $form_id;
&new_item;

}
}
}
}
Expand Down
19 changes: 0 additions & 19 deletions old/bin/oe.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1202,25 +1202,6 @@ sub update {
}

}
else {

# ok, so this is a new part
# ask if it is a part or service item

if ( $form->{"partsgroup_$i"}
&& ( $form->{"partsnumber_$i"} eq "" )
&& ( $form->{"description_$i"} eq "" ) )
{
$form->{rowcount}--;
&display_form;
}
else {

$form->{"id_$i"} = 0;
$form->{"unit_$i"} = $locale->text('ea');
&new_item;
}
}
}
}
$form->all_vc(\%myconfig, $form->{vc}, $form->{transdate}, 1) if ! @{$form->{"all_$form->{vc}"}};
Expand Down

0 comments on commit ca16f28

Please sign in to comment.