Debugmeldungen...
[kivitendo-erp.git] / bin / mozilla / is.pl
index 5901ab0..4637f6b 100644 (file)
@@ -244,11 +244,9 @@ sub prepare_invoice {
   if ($form->{type} eq "credit_note") {
     $form->{type}     = "credit_note";
     $form->{formname} = "credit_note";
-    $form->{media}    = "screen";
   } else {
     $form->{type}     = "invoice";
     $form->{formname} = "invoice";
-    $form->{media}    = "screen";
   }
 
   if ($form->{id}) {
@@ -582,6 +580,13 @@ sub form_header {
     $onload = qq|alert('$credittext')|;
   }
 
+  $form->{"javascript"} .= qq|<script type="text/javascript" src="js/show_form_details.js"></script>|;
+
+  $jsscript .=
+    $form->write_trigger(\%myconfig, 2,
+                         "orddate", "BL", "trigger_orddate",
+                         "quodate", "BL", "trigger_quodate");
+
   $form->header;
 
   print qq|
@@ -748,10 +753,20 @@ print qq|     <tr>
                <th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
                <td><input name=ordnumber size=11 value="$form->{ordnumber}"></td>
              </tr>
+        <tr>
+          <th align="right" nowrap>| . $locale->text('Order Date') . qq|</th>
+          <td><input name="orddate" id="orddate" size="11" title="$myconfig{dateformat}" value="| . Q($form->{orddate}) . qq|"></td>
+          <td><input type="button" name="b_orddate" id="trigger_orddate" value="?"></td>
+        </tr>
              <tr>
                <th align=right nowrap>| . $locale->text('Quotation Number') . qq|</th>
                <td><input name=quonumber size=11 value="$form->{quonumber}"></td>
              </tr>
+        <tr>
+          <th align="right" nowrap>| . $locale->text('Quotation Date') . qq|</th>
+          <td><input name="quodate" id="quodate" size="11" title="$myconfig{dateformat}" value="| . Q($form->{quodate}) . qq|"></td>
+          <td><input type="button" name="b_quodate" id="trigger_quodate" value="?"></td>
+        </tr>
              <tr>
                <th align=right nowrap>| . $locale->text('Customer Order Number') . qq|</th>
                <td><input name=cusordnumber size=11 value="$form->{cusordnumber}"></td>
@@ -912,7 +927,7 @@ sub form_footer {
              <tr valign=top>
                <td>$notes</td>
                <td>$intnotes</td>
-                <td><select name=payment_id onChange="set_duedate(['payment_id__' + this.value],['duedate'])">$payment
+                <td><select name=payment_id onChange="if (this.value) set_duedate(['payment_id__' + this.value],['duedate'])">$payment
                 </select></td>
              </tr>
            </table>
@@ -1086,7 +1101,7 @@ if ($form->{type} eq "credit_note") {
 
   if ($form->{id}) {
     print qq|
-    <input class=submit type=submit accesskey="u" name=action value="|
+    <input class=submit type=submit accesskey="u" name=action id=update_button value="|
       . $locale->text('Update') . qq|">
     <input class=submit type=submit name=action value="|
       . $locale->text('Ship to') . qq|">
@@ -1125,7 +1140,7 @@ if ($form->{type} eq "credit_note") {
 
   } else {
     if ($invdate > $closedto) {
-      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|">
       <input class=submit type=submit name=action value="|
         . $locale->text('Ship to') . qq|">
@@ -1140,11 +1155,6 @@ if ($form->{type} eq "credit_note") {
     }
   }
 
-  if ($form->{menubar}) {
-    require "$form->{path}/menu.pl";
-    &menubar;
-  }
-
   print $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) .
     qq|