Wiedervorlagen für Lieferscheine
authorThomas Heck <theck@linet-services.de>
Mon, 10 Sep 2012 06:59:45 +0000 (08:59 +0200)
committerThomas Heck <theck@linet-services.de>
Mon, 10 Sep 2012 06:59:45 +0000 (08:59 +0200)
fixt #1981

SL/FU.pm
bin/mozilla/do.pl
templates/webpages/do/form_footer.html
templates/webpages/do/form_header.html

index e2d2fc9..27836e0 100644 (file)
--- a/SL/FU.pm
+++ b/SL/FU.pm
@@ -330,6 +330,20 @@ sub link_details {
       'title' => $locale->text('Sales quotation') . " $params{trans_info}",
     };
 
+  } elsif ($params{trans_type} eq 'sales_delivery_order') {
+
+    $link = {
+      'url'   => 'do.pl?action=edit&type=sales_delivery_order&id=' . $params{trans_id} . '&edit_note_id=' . $form->quote($params{note_id}),
+      'title' => $locale->text('Sales delivery order') .' '. $params{trans_info},
+    };
+
+  } elsif ($params{trans_type} eq 'purchase_delivery_order') {
+
+    $link = {
+      'url'   => 'do.pl?action=edit&type=purchase_delivery_order&id=' . $params{trans_id} . '&edit_note_id=' . $form->quote($params{note_id}),
+      'title' => $locale->text('Purchase delivery order') .' '. $params{trans_info},
+    };
+
   } elsif ($params{trans_type} eq 'sales_order') {
     $link = {
       'url'   => 'oe.pl?action=edit&type=sales_order&id=' . $params{trans_id},
index 25020a0..d58c826 100644 (file)
@@ -307,6 +307,11 @@ sub form_header {
     $form->{onload} .= "document.do.submit();"
   }
 
+  my $follow_up_vc                =  $form->{ $form->{vc} eq 'customer' ? 'customer' : 'vendor' };
+  $follow_up_vc                   =~ s/--\d*\s*$//;
+
+  $form->{follow_up_trans_info} = $form->{donumber} .'('. $follow_up_vc .')';
+
   $form->header();
   # Fix für Bug 1082 Erwartet wird: 'abteilungsNAME--abteilungsID'
   # und Erweiterung für Bug 1760:
index a6a5129..cc7d34b 100644 (file)
@@ -74,6 +74,7 @@
    [%- END %]
    [%- END %]
    [%- IF id %]
+     <input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
    [%- UNLESS closed %]
    <input class="submit" type="submit" name="action_mark_closed" value="[% 'Mark closed' | $T8 %]">
    [%- END %]
index ec1e06e..b9c1d69 100644 (file)
@@ -12,6 +12,7 @@
  <script type="text/javascript" src="js/vendor_selection.js"></script>
  <script type="text/javascript" src="js/calculate_qty.js"></script>
  <script type="text/javascript" src="js/stock_in_out.js"></script>
+ <script type="text/javascript" src="js/follow_up.js"></script>
 
  <script type="text/javascript">
   <!--
 
  <form method="post" name="do" action="do.pl">
 
+  <input type="hidden" name="follow_up_trans_id_1" value="[% HTML.escape(id) %]">
+  <input type="hidden" name="follow_up_trans_type_1" value="[% HTML.escape(type) %]">
+  <input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
+  <input type="hidden" name="follow_up_rowcount" value="1">
+
+
   <input type="hidden" name="action" value="[% HTML.escape(action) %]">
   <input type="hidden" name="bcc" value="[% HTML.escape(bcc) %]">
   <input type="hidden" name="business" value="[% HTML.escape(business) %]">