Kosmetik
[kivitendo-erp.git] / bin / mozilla / ar.pl
index 04ddffe..eedf538 100644 (file)
@@ -136,6 +136,9 @@ sub create_links {
   $form->{oldcustomer} = "$form->{customer}--$form->{customer_id}";
   $form->{rowcount}    = 1;
 
+  # notes
+  $form->{notes} = $form->{intnotes} unless $form->{notes};
+
   # currencies
   @curr = split(/:/, $form->{currencies});
   chomp $curr[0];
@@ -359,8 +362,6 @@ sub form_header {
     }
   }
 
-  $taxincluded = "";
-
   $taxincluded = qq|
              <tr>
                <td align=right><input name=taxincluded class=checkbox type=checkbox value=1 $form->{taxincluded}></td>
@@ -387,7 +388,9 @@ sub form_header {
 
   $customer =
     ($form->{selectcustomer})
-    ? qq|<select name=customer>$form->{selectcustomer}</select>|
+    ? qq|<select name="customer"
+onchange="document.getElementById('update_button').click();">$form->{
+selectcustomer}</select>|
     : qq|<input name=customer value="$form->{customer}" size=35>|;
 
   $employee = qq|
@@ -848,10 +851,19 @@ sub form_footer {
 <br>
 |;
 
+  if (!$form->{id} && $form->{draft_id}) {
+    print(NTI($cgi->checkbox('-name' => 'remove_draft', '-id' => 'remove_draft',
+                             '-value' => 1, '-checked' => $form->{remove_draft},
+                             '-label' => '')) .
+          qq|&nbsp;<label for="remove_draft">| .
+          $locale->text("Remove draft when posting") .
+          qq|</label><br>|);
+  }
+
   $transdate = $form->datetonum($form->{transdate}, \%myconfig);
   $closedto  = $form->datetonum($form->{closedto},  \%myconfig);
 
-  print qq|<input class=submit type=submit name=action value="|
+  print qq|<input class="submit" type="submit" name="action" id="update_button" value="|
     . $locale->text('Update') . qq|">
 |;
   if ($form->{id}) {