Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9aa58dc1

Von Bernd Bleßmann vor mehr als 6 Jahren hinzugefügt

  • ID 9aa58dc1c8cf72ad95a90688ae2245abe589dd78
  • Vorgänger c3db1b36
  • Nachfolger c4c97beb

Workflow VK-Rechnung->Auftrag auf neuen Controller bei experimentellen Features

Unterschiede anzeigen:

bin/mozilla/io.pl
909 909
sub order {
910 910
  $main::lxdebug->enter_sub();
911 911

  
912
  _order();
913

  
914
  if ($::instance_conf->get_feature_experimental) {
915
    my $order = _make_record();
916
    $order->globalproject_id(undef) if !$order->globalproject_id;
917
    $order->payment_id(undef)       if !$order->payment_id;
918
    my $row = 1;
919
    foreach my $item (@{$order->items_sorted}) {
920
      $item->custom_variables([]);
921

  
922
      $item->price_factor_id(undef) if !$item->price_factor_id;
923
      $item->project_id(undef)      if !$item->project_id;
924
      $item->discount($item->discount/100.0);
925

  
926
      # autovivify all cvars that are not in the form (cvars_by_config can do it).
927
      # workaround to pre-parse number-cvars (parse_custom_variable_values does not parse number values).
928
       foreach my $var (@{ $item->cvars_by_config }) {
929
        my $key = 'ic_cvar_' . $var->config->name . '_' . $row;
930
        $var->unparsed_value($::form->{$key});
931
        $var->unparsed_value($::form->parse_amount(\%::myconfig, $var->{__unparsed_value})) if ($var->config->type eq 'number' && exists($var->{__unparsed_value}));
932
      }
933
      $item->parse_custom_variable_values;
934

  
935
      $row++;
936
    }
937

  
938
    require SL::Controller::Order;
939
    my $c = SL::Controller::Order->new(order => $order);
940
    $c->action_edit();
941

  
942
    $main::lxdebug->leave_sub();
943
    $::dispatcher->end_request;
944
  }
945

  
946
  &display_form;
947

  
948
  $main::lxdebug->leave_sub();
949
}
950

  
951
sub _order {
912 952
  my $form     = $main::form;
913 953
  my %myconfig = %main::myconfig;
914 954
  my $locale   = $main::locale;
......
982 1022
  }
983 1023

  
984 1024
  &prepare_order;
985
  &display_form;
986

  
987
  $main::lxdebug->leave_sub();
988 1025
}
989 1026

  
990 1027
sub quotation {

Auch abrufbar als: Unified diff