Revision bb6b8647
Von root vor mehr als 8 Jahren hinzugefügt
SL/BackgroundJob/ShopOrderMassTransfer.pm | ||
---|---|---|
35 | 35 |
my ( $self ) = @_; |
36 | 36 |
my $job_obj = $self->{job_obj}; |
37 | 37 |
my $db = $job_obj->db; |
38 |
|
|
38 |
my %error_report; |
|
39 | 39 |
$job_obj->set_data(CONVERTING_TO_DELIVERY_ORDER())->save; |
40 | 40 |
|
41 | 41 |
foreach my $shop_order_id (@{ $job_obj->data_as_hash->{shop_order_record_ids} }) { |
42 | 42 |
my $shop_order = SL::DB::ShopOrder->new(id => $shop_order_id)->load; |
43 |
die "can't find shoporder with id $shop_order_id" unless $shop_order; |
|
43 |
# die "can't find shoporder with id $shop_order_id" unless $shop_order;
|
|
44 | 44 |
#TODO Kundenabfrage so ändern, dass es nicht abricht |
45 |
unless($shop_order){ |
|
46 |
push @{ $error_report{$shop_order_id}} }, 'Shoporder not found'; |
|
47 |
} |
|
45 | 48 |
my $customer = SL::DB::Manager::Customer->find_by(id => $shop_order->{kivi_customer_id}); |
46 | 49 |
die "Can't find customer" unless $customer; |
47 | 50 |
my $employee = SL::DB::Manager::Employee->current; |
Auch abrufbar als: Unified diff
Shoporder Anfang Fehlerabfrage