- foreach my $quotationpkgnum (keys %$pkgnum_map) {
- # convert the objects to just pkgnums
- my $cust_pkg = $pkgnum_map->{$quotationpkgnum};
- $pkgnum_map->{$quotationpkgnum} = $cust_pkg->pkgnum;
+ if ($$params{'onhold'}) {
+ foreach my $quotationpkgnum (keys %$pkgnum_map) {
+ last if $error;
+ $error = $pkgnum_map->{$quotationpkgnum}->suspend();
+ }