Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5c8a0b36

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

  • ID 5c8a0b36440e012cd0a54e6b68eb3d1411243b1a
  • Vorgänger 9ce44b6f
  • Nachfolger 455a996a

S/D/Order: new_from/new_from_multi: Bearbeiter ist immer der aktuelle Benutzer

Bei Workflows zu neuen Belegen ist der Bearbeiter des neuen Belegs immer der
aktuelle Benutzer, egal, was im vorherigen Beleg steht.

Unterschiede anzeigen:

SL/DB/Order.pm
328 328
  }
329 329

  
330 330
  my %args = ( map({ ( $_ => $source->$_ ) } qw(amount cp_id currency_id cusordnumber customer_id delivery_customer_id delivery_term_id delivery_vendor_id
331
                                                department_id employee_id exchangerate globalproject_id intnotes marge_percent marge_total language_id netamount notes
331
                                                department_id exchangerate globalproject_id intnotes marge_percent marge_total language_id netamount notes
332 332
                                                ordnumber payment_id quonumber reqdate salesman_id shippingpoint shipvia taxincluded tax_point taxzone_id
333 333
                                                transaction_description vendor_id
334 334
                                             )),
......
336 336
               closed    => 0,
337 337
               delivered => 0,
338 338
               transdate => DateTime->today_local,
339
               employee  => SL::DB::Manager::Employee->current,
339 340
            );
340 341

  
341 342
  if ( $is_abbr_any->(qw(sopo poso)) ) {
342 343
    $args{ordnumber} = undef;
343 344
    $args{quonumber} = undef;
344 345
    $args{reqdate}   = DateTime->today_local->next_workday();
345
    $args{employee}  = SL::DB::Manager::Employee->current;
346 346
  }
347 347
  if ( $is_abbr_any->(qw(sopo)) ) {
348 348
    $args{customer_id}      = undef;
......
448 448
                       order_probability expected_billing_date)) {
449 449
    $attributes{$attr} = undef if any { ($sources->[0]->$attr//'') ne ($_->$attr//'') } @$sources;
450 450
  }
451
  foreach my $attr (qw(cp_id currency_id employee_id salesman_id department_id
451
  foreach my $attr (qw(cp_id currency_id salesman_id department_id
452 452
                       delivery_customer_id delivery_vendor_id shipto_id
453 453
                       globalproject_id exchangerate)) {
454 454
    $attributes{$attr} = undef if any { ($sources->[0]->$attr||0) != ($_->$attr||0) }   @$sources;
......
463 463
  # no periodic invoice config for new order
464 464
  $attributes{periodic_invoices_config} = undef;
465 465

  
466
  # set emplyee to the current one
467
  $attributes{employee} = SL::DB::Manager::Employee->current;
468

  
466 469
  # copy global ordnumber, transdate, cusordnumber into item scope
467 470
  #   unless already present there
468 471
  foreach my $attr (qw(ordnumber transdate cusordnumber)) {

Auch abrufbar als: Unified diff