Revision e73be2a8
Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
851 | 851 |
|
852 | 852 |
my $destination_type = $::form->{to_type} ? $::form->{to_type} : ''; |
853 | 853 |
|
854 |
my $from_side = $self->order->is_sales ? 'sales' : 'purchase'; |
|
855 |
my $to_side = (any { $destination_type eq $_ } (sales_order_type(), sales_quotation_type())) ? 'sales' : 'purchase'; |
|
856 |
|
|
854 | 857 |
# check for direct delivery |
855 | 858 |
# copy shipto in custom shipto (custom shipto will be copied by new_from() in case) |
856 | 859 |
my $custom_shipto; |
... | ... | |
861 | 864 |
|
862 | 865 |
$self->order(SL::DB::Order->new_from($self->order, destination_type => $destination_type)); |
863 | 866 |
|
864 |
# no linked records from order to quotations |
|
865 |
if (any { $destination_type eq $_ } (sales_quotation_type(), request_quotation_type())) { |
|
867 |
# no linked records to quotations from the same side (sales -> sales or purchase -> purchase) |
|
868 |
if ( (any { $destination_type eq $_ } (sales_quotation_type(), request_quotation_type())) |
|
869 |
&& $from_side eq $to_side) { |
|
866 | 870 |
delete $::form->{id}; |
867 | 871 |
delete $::form->{$_} for qw(converted_from_oe_id converted_from_orderitems_ids); |
868 | 872 |
} else { |
... | ... | |
2285 | 2289 |
t8('Save and Quotation'), |
2286 | 2290 |
call => [ 'kivi.submit_ajax_form', $self->url_for(action => "save_and_order_workflow", to_type => sales_quotation_type()), '#order_form' ], |
2287 | 2291 |
checks => [ @req_trans_cost_art, @req_cusordnumber ], |
2288 |
only_if => (any { $self->type eq $_ } (sales_order_type())), |
|
2292 |
only_if => (any { $self->type eq $_ } (sales_order_type(), request_quotation_type())),
|
|
2289 | 2293 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef, |
2290 | 2294 |
], |
2291 | 2295 |
action => [ |
Auch abrufbar als: Unified diff
Auftrags-Controller: WF Preisanfrage -> Kunden-Angebot