Revision 6583ead0
Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
2302 | 2302 |
t8('Save and Sales Order'), |
2303 | 2303 |
call => [ 'kivi.submit_ajax_form', $self->url_for(action => "save_and_order_workflow", to_type => sales_order_type()), '#order_form' ], |
2304 | 2304 |
checks => [ @req_trans_cost_art ], |
2305 |
only_if => (any { $self->type eq $_ } (sales_quotation_type(), purchase_order_type())), |
|
2305 |
only_if => (any { $self->type eq $_ } (sales_quotation_type(), request_quotation_type(), purchase_order_type())),
|
|
2306 | 2306 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef, |
2307 | 2307 |
], |
2308 | 2308 |
action => [ |
SL/DB/Order.pm | ||
---|---|---|
344 | 344 |
{ from => 'sales_order', to => 'sales_quotation', abbr => 'sosq' }, |
345 | 345 |
{ from => 'purchase_order', to => 'request_quotation', abbr => 'porq' }, |
346 | 346 |
{ from => 'request_quotation', to => 'sales_quotation', abbr => 'rqsq' }, |
347 |
{ from => 'request_quotation', to => 'sales_order', abbr => 'rqso' }, |
|
347 | 348 |
); |
348 | 349 |
my $from_to = (grep { $_->{from} eq $source->type && $_->{to} eq $destination_type} @from_tos)[0]; |
349 | 350 |
croak("Cannot convert from '" . $source->type . "' to '" . $destination_type . "'") if !$from_to; |
... | ... | |
371 | 372 |
employee => SL::DB::Manager::Employee->current, |
372 | 373 |
); |
373 | 374 |
|
374 |
if ( $is_abbr_any->(qw(sopo poso)) ) { |
|
375 |
if ( $is_abbr_any->(qw(sopo poso rqso)) ) {
|
|
375 | 376 |
$args{ordnumber} = undef; |
376 | 377 |
$args{quonumber} = undef; |
377 | 378 |
$args{reqdate} = DateTime->today_local->next_workday(); |
... | ... | |
433 | 434 |
$current_oe_item->sellprice($source_item->lastcost); |
434 | 435 |
$current_oe_item->discount(0); |
435 | 436 |
} |
436 |
if ( $is_abbr_any->(qw(poso rqsq)) ) { |
|
437 |
if ( $is_abbr_any->(qw(poso rqsq rqso)) ) {
|
|
437 | 438 |
$current_oe_item->lastcost($source_item->sellprice); |
438 | 439 |
} |
439 | 440 |
$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-Auftrag