Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9084019c

Von Bernd Bleßmann vor etwa 1 Jahr hinzugefügt

  • ID 9084019c9708ba84ad3b177edaaf2df444e48134
  • Vorgänger beb2740d
  • Nachfolger a51fdba2

Lieferantenauftragsbestätigung: S:D:Order:new_from

Unterschiede anzeigen:

SL/DB/Order.pm
506 506
    { from => PURCHASE_QUOTATION_INTAKE_TYPE(), to => SALES_ORDER_TYPE(),               abbr => 'pqiso'  },
507 507
    { from => PURCHASE_QUOTATION_INTAKE_TYPE(), to => PURCHASE_ORDER_TYPE(),            abbr => 'pqipo'  },
508 508
    { from => REQUEST_QUOTATION_TYPE(),         to => PURCHASE_QUOTATION_INTAKE_TYPE(), abbr => 'rqpqi'  },
509
    { from => PURCHASE_ORDER_CONFIRMATION_TYPE(), to => PURCHASE_ORDER_CONFIRMATION_TYPE(), abbr => 'pocpoc' },
510
    { from => PURCHASE_ORDER_CONFIRMATION_TYPE(), to => SALES_QUOTATION_TYPE(),         abbr => 'pocsq' },
511
    { from => PURCHASE_ORDER_CONFIRMATION_TYPE(), to => PURCHASE_ORDER_TYPE(),          abbr => 'pocpo' },
512
    { from => PURCHASE_ORDER_TYPE(),            to => PURCHASE_ORDER_CONFIRMATION_TYPE(), abbr => 'popoc' },
509 513
  );
510 514
  my $from_to = (grep { $_->{from} eq $source->record_type && $_->{to} eq $destination_type} @from_tos)[0];
511 515
  croak("Cannot convert from '" . $source->record_type . "' to '" . $destination_type . "'") if !$from_to;
......
554 558
                   ? undef
555 559
                   : $from_to->{to} =~ m/^purchase_quotation_intake$/
556 560
                   ? $source->reqdate
561
                   : $from_to->{to} =~ m/^purchase_order_confirmation$/
562
                   ? $source->reqdate
557 563
                   : die "Wrong state for reqdate";
558 564
  } elsif ( ref($source) eq 'SL::DB::Reclamation') {
559 565
    %args = ( map({ ( $_ => $source->$_ ) } qw(
......
570 576
   );
571 577
  }
572 578

  
573
  if ( $is_abbr_any->(qw(soipo sopo poso rqso soisq sosq porq rqsq sqrq soirq sorq poisq poiso)) ) {
579
  if ( $is_abbr_any->(qw(soipo sopo poso rqso soisq sosq porq rqsq sqrq soirq sorq poisq poiso pocsq)) ) {
574 580
    $args{ordnumber} = undef;
575 581
    $args{quonumber} = undef;
576 582
  }
......
580 586
    $args{payment_id}       = undef;
581 587
    $args{delivery_term_id} = undef;
582 588
  }
583
  if ( $is_abbr_any->(qw(poso rqsq pqisq pqiso)) ) {
589
  if ( $is_abbr_any->(qw(poso rqsq pqisq pqiso pocsq)) ) {
584 590
    $args{vendor_id} = undef;
585 591
  }
586 592
  if ( $is_abbr_any->(qw(soso)) ) {
......
589 595
  if ( $is_abbr_any->(qw(sqrq soirq sorq)) ) {
590 596
    $args{cusordnumber} = undef;
591 597
  }
592
  if ( $is_abbr_any->(qw(soiso)) ) {
598
  if ( $is_abbr_any->(qw(soiso pocpoc pocpo popoc)) ) {
593 599
    $args{ordnumber} = undef;
594 600
  }
595 601
  if ( $is_abbr_any->(qw(rqpqi pqisq)) ) {
......
650 656
      $current_oe_item->sellprice($source_item->lastcost);
651 657
      $current_oe_item->discount(0);
652 658
    }
653
    if ( $is_abbr_any->(qw(poso rqsq rqso pqisq pqiso)) ) {
659
    if ( $is_abbr_any->(qw(poso rqsq rqso pqisq pqiso pocsq)) ) {
654 660
      $current_oe_item->lastcost($source_item->sellprice);
655 661
    }
656 662
    unless ($params{no_linked_records}) {

Auch abrufbar als: Unified diff