Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 933ade61

Von Bernd Bleßmann vor 9 Monaten hinzugefügt

  • ID 933ade6179bb1bc208a5573605ef99f2e4e7575f
  • Vorgänger 5c49b870
  • Nachfolger 4b82a617

Erzeugnis fertigen: Fehleranzeige in Routine ausgelagert

Unterschiede anzeigen:

bin/mozilla/wh.pl
432 432
        my $ex = $@;
433 433
        die $ex unless blessed($ex) && $ex->isa('SL::X::Inventory::Allocation::Multi');
434 434

  
435
        $form->{title} = $locale->text('Allocate for Assembly');
436
        $form->header;
437
        print $form->parse_html_template(
438
          'wh/produce_assembly_error',
439
          {
440
            missing_qty_exceptions => [ grep {  $_->isa('SL::X::Inventory::Allocation::MissingQty') } @{ $ex->errors } ],
441
            other_exceptions       => [ grep { !$_->isa('SL::X::Inventory::Allocation::MissingQty') } @{ $ex->errors } ],
442
          });
443

  
435
        render_produce_assembly_error(title  => $locale->text('Allocate for Assembly'),
436
                                      errors => $ex->errors);
444 437
        return $::lxdebug->leave_sub();
445 438
      };
446 439

  
......
513 506
    my $ex = $@;
514 507
    die $ex unless blessed($ex) && $ex->isa('SL::X::Inventory::Allocation::Multi');
515 508

  
516
    $form->{title} = $locale->text('Produce Assembly');
517
    $form->header;
518
    print $form->parse_html_template(
519
      'wh/produce_assembly_error',
520
      {
521
        missing_qty_exceptions => [ grep {  $_->isa('SL::X::Inventory::Allocation::MissingQty') } @{ $ex->errors } ],
522
        other_exceptions       => [ grep { !$_->isa('SL::X::Inventory::Allocation::MissingQty') } @{ $ex->errors } ],
523
      });
524

  
509
    render_produce_assembly_error(title  => $locale->text('Produce Assembly'),
510
                                  errors => $ex->errors);
525 511
    return $::lxdebug->leave_sub();
526 512
  };
527 513

  
......
535 521
  $main::lxdebug->leave_sub();
536 522
}
537 523

  
524
sub render_produce_assembly_error {
525
  my (%params) = @_;
526

  
527
  my @errors       = @{$params{errors} || []};
528
  $::form->{title} = $params{title};
529

  
530
  $::form->header;
531
  print $::form->parse_html_template(
532
    'wh/produce_assembly_error',
533
    {
534
      missing_qty_exceptions => [ grep {  $_->isa('SL::X::Inventory::Allocation::MissingQty') } @errors ],
535
      other_exceptions       => [ grep { !$_->isa('SL::X::Inventory::Allocation::MissingQty') } @errors ],
536
    });
537
}
538

  
538 539
sub create_assembly_chargenumbers {
539 540
  my ($form, $stocked_by_parts_id, $needed_by_parts_id, $allocated_by_parts_id) = @_;
540 541

  

Auch abrufbar als: Unified diff