Gelangensbestätigung als Weiche in io.pl UND Helper PrintOptions.pm
authorJan Büren <jan@kivitendo-premium.de>
Sat, 30 Jan 2016 15:29:28 +0000 (16:29 +0100)
committerJan Büren <jan@kivitendo-premium.de>
Fri, 15 Apr 2016 07:01:13 +0000 (09:01 +0200)
SL/Helper/PrintOptions.pm
bin/mozilla/io.pl

index 2d842af..da6cdf3 100644 (file)
@@ -51,6 +51,7 @@ sub get_print_options {
     ($form->{type} eq 'sales_order') ? (
       opthash("sales_order",         $form->{PD}{sales_order},         $locale->text('Confirmation')),
       opthash("proforma",            $form->{PD}{proforma},            $locale->text('Proforma Invoice')),
+      opthash("ic_supply",           $form->{PD}{ic_supply},            $locale->text('Intra-Community supply')),
     ) : undef,
     ($form->{type} =~ /sales_quotation$/) ?
       opthash('sales_quotation',     $form->{PD}{sales_quotation},     $locale->text('Quotation')) : undef,
index 1dc7a64..f77a5f7 100644 (file)
@@ -1245,6 +1245,17 @@ sub print_form {
     $order                = 1;
   }
 
+  if (($form->{type} eq 'sales_order') && ($form->{formname} eq 'ic_supply') ) {
+    $inv                  = "inv";
+    $due                  = "due";
+    $form->{"${inv}date"} = $form->{transdate};
+    $form->{"invdate"}    = $form->{transdate};
+    $form->{invnumber}    = $form->{ordnumber};
+    $form->{label}        = $locale->text('Intra-Community supply');
+    $numberfld            = "sonumber";
+    $order                = 1;
+  }
+
   if ($form->{formname} eq 'request_quotation') {
     $inv                  = "quo";
     $due                  = "req";