Revision cc369842
Von Kivitendo Admin vor mehr als 9 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
864 | 864 |
|
865 | 865 |
# and remember for the rest of the function |
866 | 866 |
my $is_collective_order = scalar @ids; |
867 |
$form->{useasnew} = !!$is_collective_order; |
|
867 |
|
|
868 |
# If collective order was created from exactly 1 order, we assume the same |
|
869 |
# behaviour as a "save as new" from within an order is actually desired, i.e. |
|
870 |
# the original order isn't part of a workflow where we want to remember |
|
871 |
# record_links, but simply a quick way of generating a new order from an old |
|
872 |
# one without having to enter everything again. |
|
873 |
# Setting useasnew will prevent the creation of record_links for the items |
|
874 |
# when saving the new order. |
|
875 |
# This form variable is probably not necessary, could just set saveasnew instead |
|
876 |
$form->{useasnew} = 1 if $is_collective_order == 1; |
|
868 | 877 |
|
869 | 878 |
if (!$form->{id}) { |
870 | 879 |
my $extra_days = $form->{type} eq 'sales_quotation' ? $::instance_conf->get_reqdate_interval : 1; |
... | ... | |
1069 | 1078 |
} |
1070 | 1079 |
|
1071 | 1080 |
# delete orderitems_id in collective orders, so that they get cloned no matter what |
1081 |
# is this correct? or is the following meant? |
|
1082 |
# remember orderitems_ids in converted_from_orderitems_ids, so that they may be linked |
|
1072 | 1083 |
$ref->{converted_from_orderitems_id} = delete $ref->{orderitems_id} if $is_collective_order; |
1073 | 1084 |
|
1074 | 1085 |
# get tax rates and description |
Auch abrufbar als: Unified diff
Sammelaufträge - fehlerhaftes Verhalten
Standardmäßig wird der Sammelauftrag, zusammen mit den Positionen, per
RecordLinks verlinkt. Eine Ausnahme besteht wenn der Sammelauftrag aus
genau einem Auftrag entstanden ist, in dem Fall wird angenommen, daß
"als neu speichern" gemeint ist, und es gibt keine Verlinkung.
Dies entspricht dem eigentlich gewünschten Verhalten aus Commit d40a8e2 .