Bug 603 - intnotes werden nicht übernommen wenn vom Kunden aus Auftraege/Buchungen...
[kivitendo-erp.git] / bin / mozilla / io.pl
index adb78ed..5b2b55c 100644 (file)
@@ -355,11 +355,10 @@ sub display_row {
     }
 
     $column_data{"unit"} = "<td>" .
-      ($qty_readonly ? "&nbsp;" :
        AM->unit_select_html($is_part ? $dimension_units :
                             $is_assigned ? $service_units : $all_units,
                             "unit_$i", $this_unit,
-                            $is_assigned ? $form->{"unit_$i"} : undef))
+                            $is_assigned ? $form->{"unit_$i"} : undef)
       . "</td>";
 
     # build in drop down list for pricesgroups
@@ -1657,10 +1656,16 @@ sub print_options {
   }
 
   $form->{groupitems} = "checked" if $form->{groupitems};
+  $form->{remove_draft} = "checked" if $form->{remove_draft};
 
   print qq|
           <td>| . $locale->text('Group Items') . qq|</td>
-          <td><input name=groupitems type=checkbox class=checkbox $form->{groupitems}></td>
+          <td><input name=groupitems type=checkbox class=checkbox $form->{groupitems}></td>|;
+
+  print qq|
+          <td>| . $locale->text('Remove Draft') . qq|</td>
+          <td><input name=remove_draft type=checkbox class=checkbox $form->{remove_draft}></td>| if (!$form->{id} && $form->{draft_id});
+  print qq|
         </tr>
       </table>
     </td>
@@ -1858,7 +1863,7 @@ sub print_form {
 
   # assign number
   $form->{what_done} = $form->{formname};
-  if (!$form->{"${inv}number"} && !$form->{preview}) {
+  if (!$form->{"${inv}number"} && !$form->{preview} && !$form->{id}) {
     $form->{"${inv}number"} = $form->update_defaults(\%myconfig, $numberfld);
     if ($form->{media} ne 'email') {