Revision 55f3c5e6
Von Bernd Bleßmann vor 12 Monaten hinzugefügt
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 => SALES_ORDER_TYPE(), abbr => 'pocso' }, |
|
512 |
{ from => PURCHASE_ORDER_CONFIRMATION_TYPE(), to => PURCHASE_ORDER_TYPE(), abbr => 'pocpo' }, |
|
513 |
{ from => PURCHASE_ORDER_TYPE(), to => PURCHASE_ORDER_CONFIRMATION_TYPE(), abbr => 'popoc' }, |
|
509 | 514 |
); |
510 | 515 |
my $from_to = (grep { $_->{from} eq $source->record_type && $_->{to} eq $destination_type} @from_tos)[0]; |
511 | 516 |
croak("Cannot convert from '" . $source->record_type . "' to '" . $destination_type . "'") if !$from_to; |
... | ... | |
561 | 566 |
? undef |
562 | 567 |
: $from_to->{to} =~ m/^purchase_quotation_intake$/ |
563 | 568 |
? $source->reqdate |
569 |
: $from_to->{to} =~ m/^purchase_order_confirmation$/ |
|
570 |
? $source->reqdate |
|
564 | 571 |
: die "Wrong state for reqdate"; |
565 | 572 |
} elsif ( ref($source) eq 'SL::DB::Reclamation') { |
566 | 573 |
%args = ( map({ ( $_ => $source->$_ ) } qw( |
... | ... | |
577 | 584 |
); |
578 | 585 |
} |
579 | 586 |
|
580 |
if ( $is_abbr_any->(qw(soipo sopo poso rqso soisq sosq porq rqsq sqrq soirq sorq pqisq pqiso)) ) { |
|
587 |
if ( $is_abbr_any->(qw(soipo sopo poso rqso soisq sosq porq rqsq sqrq soirq sorq pqisq pqiso pocsq pocso)) ) {
|
|
581 | 588 |
$args{ordnumber} = undef; |
582 | 589 |
$args{quonumber} = undef; |
583 | 590 |
} |
... | ... | |
587 | 594 |
$args{payment_id} = undef; |
588 | 595 |
$args{delivery_term_id} = undef; |
589 | 596 |
} |
590 |
if ( $is_abbr_any->(qw(poso rqsq pqisq pqiso)) ) { |
|
597 |
if ( $is_abbr_any->(qw(poso rqsq pqisq pqiso pocsq pocso)) ) {
|
|
591 | 598 |
$args{vendor_id} = undef; |
592 | 599 |
} |
593 | 600 |
if ( $is_abbr_any->(qw(soso)) ) { |
... | ... | |
596 | 603 |
if ( $is_abbr_any->(qw(sqrq soirq sorq)) ) { |
597 | 604 |
$args{cusordnumber} = undef; |
598 | 605 |
} |
599 |
if ( $is_abbr_any->(qw(soiso)) ) { |
|
606 |
if ( $is_abbr_any->(qw(soiso pocpoc pocpo popoc)) ) {
|
|
600 | 607 |
$args{ordnumber} = undef; |
601 | 608 |
} |
602 | 609 |
if ( $is_abbr_any->(qw(rqpqi pqisq)) ) { |
... | ... | |
657 | 664 |
$current_oe_item->sellprice($source_item->lastcost); |
658 | 665 |
$current_oe_item->discount(0); |
659 | 666 |
} |
660 |
if ( $is_abbr_any->(qw(poso rqsq rqso pqisq pqiso)) ) { |
|
667 |
if ( $is_abbr_any->(qw(poso rqsq rqso pqisq pqiso pocsq pocso)) ) {
|
|
661 | 668 |
$current_oe_item->lastcost($source_item->sellprice); |
662 | 669 |
} |
663 | 670 |
unless ($params{no_linked_records}) { |
Auch abrufbar als: Unified diff
Lieferantenauftragsbestätigung: S:D:Order:new_from