Revision 095484d1
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
2252 | 2252 |
$self->order->add_phone_notes($phone_note) if $is_new; |
2253 | 2253 |
} |
2254 | 2254 |
|
2255 |
# check for purchase basket items |
|
2256 |
my %basket_item_id_to_orderitem = |
|
2257 |
map { $_->{basket_item_id} => $_ } |
|
2258 |
grep { $_->{basket_item_id} ne '' } |
|
2259 |
$self->order->orderitems; |
|
2260 |
my @basket_item_ids = keys %basket_item_id_to_orderitem; |
|
2261 |
if (scalar @basket_item_ids) { |
|
2262 |
my $basket_items = SL::DB::Manager::PurchaseBasketItem->get_all( |
|
2263 |
where => [ id => \@basket_item_ids ]); |
|
2264 |
if (scalar @$basket_items != scalar @basket_item_ids) { |
|
2265 |
my %basket_item_exists = map { $_->id => 1 } @$basket_items; |
|
2266 |
my @missing_for_positions = |
|
2267 |
map { $_->position } |
|
2268 |
map { $basket_item_id_to_orderitem{$_} } |
|
2269 |
grep { !$basket_item_exists{$_} } |
|
2270 |
@basket_item_ids; |
|
2271 |
return [t8('Purchase basket item not existing any more for position(s): #1.', |
|
2272 |
join(',', @missing_for_positions))]; |
|
2273 |
} |
|
2274 |
} |
|
2275 |
|
|
2255 | 2276 |
my $is_new = !$self->order->id; |
2256 | 2277 |
$db->with_transaction(sub { |
2257 | 2278 |
my $validity_token; |
Auch abrufbar als: Unified diff
DispositionManager: Fehlermeldung bei doppelter Bestellung von Artikeln