Wiedervorlage aus Angebot/Auftrag: Betreff aus Vorgangsbezeichnung vorbelegen
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Tue, 12 Jan 2021 15:34:00 +0000 (16:34 +0100)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Tue, 12 Jan 2021 15:34:00 +0000 (16:34 +0100)
nur "neuer" Controller

bin/mozilla/fu.pl
js/follow_up.js
js/kivi.Order.js

index 9b19ba8..d9001e3 100644 (file)
@@ -42,6 +42,8 @@ sub add {
   $form->get_employee($form->get_standard_dbh(\%myconfig));
   $form->{created_for_user} = $form->{employee_id};
 
+  $form->{subject} = $form->{trans_subject_1} if $form->{trans_subject_1};
+
   my $link_details;
 
   if (0 < scalar @{ $form->{LINKS} }) {
index 4b11dcd..f22308b 100644 (file)
@@ -12,14 +12,16 @@ function follow_up_window() {
 
   if (typeof trans_rowcount != "undefined") {
     for (i = 1; i <= trans_rowcount[0].value; i++) {
-      var trans_id   = document.getElementsByName("follow_up_trans_id_" + i);
-      var trans_type = document.getElementsByName("follow_up_trans_type_" + i);
-      var trans_info = document.getElementsByName("follow_up_trans_info_" + i);
+      var trans_id      = document.getElementsByName("follow_up_trans_id_" + i);
+      var trans_type    = document.getElementsByName("follow_up_trans_type_" + i);
+      var trans_info    = document.getElementsByName("follow_up_trans_info_" + i);
+      var trans_subject = document.getElementsByName("follow_up_trans_subject_" + i);
 
       url += "&" +
-        "trans_id_"   + i + "=" + encodeURIComponent(typeof trans_id   != "undefined" ? trans_id[0].value   : "") + "&" +
-        "trans_type_" + i + "=" + encodeURIComponent(typeof trans_type != "undefined" ? trans_type[0].value : "") + "&" +
-        "trans_info_" + i + "=" + encodeURIComponent(typeof trans_info != "undefined" ? trans_info[0].value : "");
+        "trans_id_"      + i + "=" + encodeURIComponent(typeof trans_id      != "undefined" ? trans_id[0].value      : "") + "&" +
+        "trans_type_"    + i + "=" + encodeURIComponent(typeof trans_type    != "undefined" ? trans_type[0].value    : "") + "&" +
+        "trans_info_"    + i + "=" + encodeURIComponent(typeof trans_info    != "undefined" ? trans_info[0].value    : "") + "&" +
+        "trans_subject_" + i + "=" + encodeURIComponent(typeof trans_subject != "undefined" ? trans_subject[0].value : "");
     }
 
     url += "&trans_rowcount=" + encodeURIComponent(trans_rowcount[0].value);
index d74e347..8a40e28 100644 (file)
@@ -904,6 +904,7 @@ namespace('kivi.Order', function(ns) {
     $('<input type="hidden" name="follow_up_trans_id_1">').appendTo('#order_form').val(id);
     $('<input type="hidden" name="follow_up_trans_type_1">').appendTo('#order_form').val(type);
     $('<input type="hidden" name="follow_up_trans_info_1">').appendTo('#order_form').val(info);
+    $('<input type="hidden" name="follow_up_trans_subject_1">').appendTo('#order_form').val($('#order_transaction_description').val());
 
     follow_up_window();
   };