Auftrags-Controller: Belegnummer in Titlezeile anzeigen
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 12 Mar 2018 14:37:47 +0000 (15:37 +0100)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 12 Mar 2018 14:39:30 +0000 (15:39 +0100)
js/kivi.Order.js
templates/webpages/order/form.html
templates/webpages/order/tabs/basic_data.html

index 1a5924c..ef30e13 100644 (file)
@@ -150,6 +150,10 @@ namespace('kivi.Order', function(ns) {
     email_dialog.dialog("close");
   };
 
+  ns.set_number_in_title = function(elt) {
+    $('#nr_in_title').html($(elt).val());
+  };
+
   ns.reload_cv_dependant_selections = function() {
     var data = $('#order_form').serializeArray();
     data.push({ name: 'action', value: 'Order/customer_vendor_changed' });
index 0e28642..6020fd7 100644 (file)
@@ -2,7 +2,7 @@
 [%- USE LxERP %]
 [%- USE L %]
 [%- USE HTML %]
-<h1>[% FORM.title %]</h1>
+<h1>[% FORM.title %] <span id='nr_in_title'>[%- SELF.order.number -%]</span></h1>
 
 <div id="print_options" style="display:none">
   <form method="post" action="controller.pl" id="print_options_form">
index 877e5fd..b686842 100644 (file)
           [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
           <tr>
             <th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
-            <td>[% L.input_tag('order.ordnumber', SELF.order.ordnumber, size = 11) %]</td>
+            <td>[% L.input_tag('order.ordnumber', SELF.order.ordnumber, size = 11, onchange='kivi.Order.set_number_in_title(this)') %]</td>
           </tr>
           [%- END -%]
 
           [%- END -%]
           <tr>
             <th width="70%" align="right" nowrap>[% quo_nr_txt | $T8 %]</th>
-            <td>[% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11) %]</td>
+            [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
+              <td>[% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11) %]</td>
+            [%- ELSE -%]
+              <td>[% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11, onchange='kivi.Order.set_number_in_title(this)') %]</td>
+            [%- END -%]
           </tr>
 
           [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]