Revision e73be2a8
Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt
SL/DB/Order.pm | ||
---|---|---|
343 | 343 |
{ from => 'purchase_order', to => 'sales_order', abbr => 'poso' }, |
344 | 344 |
{ from => 'sales_order', to => 'sales_quotation', abbr => 'sosq' }, |
345 | 345 |
{ from => 'purchase_order', to => 'request_quotation', abbr => 'porq' }, |
346 |
{ from => 'request_quotation', to => 'sales_quotation', abbr => 'rqsq' }, |
|
346 | 347 |
); |
347 | 348 |
my $from_to = (grep { $_->{from} eq $source->type && $_->{to} eq $destination_type} @from_tos)[0]; |
348 | 349 |
croak("Cannot convert from '" . $source->type . "' to '" . $destination_type . "'") if !$from_to; |
... | ... | |
381 | 382 |
$args{payment_id} = undef; |
382 | 383 |
$args{delivery_term_id} = undef; |
383 | 384 |
} |
384 |
if ( $is_abbr_any->(qw(poso)) ) { |
|
385 |
if ( $is_abbr_any->(qw(poso rqsq)) ) {
|
|
385 | 386 |
$args{vendor_id} = undef; |
386 | 387 |
} |
387 | 388 |
if ( $is_abbr_any->(qw(soso)) ) { |
388 | 389 |
$args{periodic_invoices_config} = $source->periodic_invoices_config->clone_and_reset if $source->periodic_invoices_config; |
389 | 390 |
} |
390 |
if ( $is_abbr_any->(qw(sosq porq)) ) { |
|
391 |
if ( $is_abbr_any->(qw(sosq porq rqsq)) ) {
|
|
391 | 392 |
$args{ordnumber} = undef; |
392 | 393 |
$args{quonumber} = undef; |
393 | 394 |
$args{reqdate} = DateTime->today_local->next_workday(); |
... | ... | |
432 | 433 |
$current_oe_item->sellprice($source_item->lastcost); |
433 | 434 |
$current_oe_item->discount(0); |
434 | 435 |
} |
435 |
if ( $is_abbr_any->(qw(poso)) ) { |
|
436 |
if ( $is_abbr_any->(qw(poso rqsq)) ) {
|
|
436 | 437 |
$current_oe_item->lastcost($source_item->sellprice); |
437 | 438 |
} |
438 | 439 |
$current_oe_item->{"converted_from_orderitems_id"} = $_->{id} if ref($item_parent) eq 'SL::DB::Order'; |
Auch abrufbar als: Unified diff
Auftrags-Controller: WF Preisanfrage -> Kunden-Angebot