}
$column_data{"unit"} = "<td>" .
- ($qty_readonly ? " " :
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
}
$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>
# 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') {