commit a648b673fcb23982d6fecb0c0f97a40c0636a601
Author: Sven Schöling <s.schoeling@googlemail.com>
Date:   Fri Dec 11 16:12:43 2015 +0100

    Simple Übergaben von globals an templates in templates verschoben
    
    Da jetzt in allen Templates die kanonischen globals verfügbar sind,
    brauchen die nicht mehr übergeben werden.

diff --git a/bin/mozilla/bp.pl b/bin/mozilla/bp.pl
index d8180a630..d448685f3 100644
--- a/bin/mozilla/bp.pl
+++ b/bin/mozilla/bp.pl
@@ -187,7 +187,6 @@ sub list_spool {
 
   $::form->header;
   print $::form->parse_html_template('bp/list_spool', {
-     spool        => $::lx_office_conf{paths}->{spool},
      href         => build_std_url('bp.pl', @href_options),
      is_invoice   => scalar ($::form->{type} =~ /^invoice$/),
      is_order     => scalar ($::form->{type} =~ /_order$/),
diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl
index 563ea5fb7..c928830ea 100644
--- a/bin/mozilla/ic.pl
+++ b/bin/mozilla/ic.pl
@@ -115,9 +115,7 @@ sub search {
   $form->header;
 
   $form->get_lists('partsgroup'    => 'ALL_PARTSGROUPS');
-  print $form->parse_html_template('ic/search', { %is_xyz,
-                                                  dateformat => $myconfig{dateformat},
-                                                  limit => $myconfig{vclimit}, });
+  print $form->parse_html_template('ic/search', { %is_xyz, });
 
   $lxdebug->leave_sub();
 }    #end search()
diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl
index 3d3d94c6b..26fb98e3e 100644
--- a/bin/mozilla/io.pl
+++ b/bin/mozilla/io.pl
@@ -520,7 +520,6 @@ sub select_item {
                                                          ITEM_LIST       => \@item_list,
                                                          IS_ASSEMBLY     => $mode eq 'IC',
                                                          IS_PURCHASE     => $mode eq 'IS',
-                                                         SHOW_NOTES      => $::instance_conf->get_show_longdescription_select_item(),
                                                          PRE_ENTERED_QTY => $pre_entered_qty, });
 
   $main::lxdebug->leave_sub();
diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl
index ad4c62ea8..c9f371ef0 100644
--- a/bin/mozilla/oe.pl
+++ b/bin/mozilla/oe.pl
@@ -786,7 +786,6 @@ sub search {
   $form->header();
 
   print $form->parse_html_template('oe/search', {
-    %myconfig,
     is_order => scalar($form->{type} =~ /_order/),
   });
 
diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl
index 02023f532..ae2669fe3 100644
--- a/bin/mozilla/rp.pl
+++ b/bin/mozilla/rp.pl
@@ -199,8 +199,6 @@ sub report {
     year                => DateTime->today->year,
     today               => DateTime->today,
     nextsub             => $nextsub,
-    accrual             => $::instance_conf->get_accounting_method ne 'cash',
-    cash                => $::instance_conf->get_accounting_method eq 'cash',
     is_payments         => $is_payments,
     is_trial_balance    => $is_trial_balance,
     is_balance_sheet    => $is_balance_sheet,
@@ -1131,7 +1129,6 @@ sub e_mail {
 
   $::form->header;
   print $::form->parse_html_template('rp/e_mail', {
-    show_bcc      => $::auth->assert('email_bcc', 'may fail'),
     print_options => print_options(inline => 1),
     hidden_values => \@hidden_values,
   });
@@ -1630,8 +1627,6 @@ sub print_options {
   $::form->{SM}{ $::form->{sendmode} } = "selected";
 
   my $output = $::form->parse_html_template('rp/print_options', {
-    got_printer => $::myconfig{printer},
-    show_latex  => $::lx_office_conf{print_templates}->{latex},
     is_email    => $::form->{media} eq 'email',
   });
 
diff --git a/templates/webpages/am/config.html b/templates/webpages/am/config.html
index 47d0fccbe..0f012a164 100644
--- a/templates/webpages/am/config.html
+++ b/templates/webpages/am/config.html
@@ -232,7 +232,7 @@
       </td>
      </tr>
 
-     [%- IF AUTH_RIGHTS_SALES_QUOTATION_EDIT %]
+     [%- IF AUTH.assert('sales_quotation_edit', 'may_fail') %]
      <tr>
       <th align="right">[% 'Show overdue sales quotations and requests for quotations...' | $T8 %]</th>
       <td>
diff --git a/templates/webpages/bp/list_spool.html b/templates/webpages/bp/list_spool.html
index 2ce20ffa7..ce5aff8d2 100644
--- a/templates/webpages/bp/list_spool.html
+++ b/templates/webpages/bp/list_spool.html
@@ -46,7 +46,7 @@
   <td>[% L.link(url(row.module _ '.pl', action='edit' ,type=type, callback=list_spool__callback, id=row.id), row.quonumber) %]</td>
 [%- END %]
   <td>[% row.name | html %]</td>
-  <td>[% L.link(spool _ '/' _ row.spoolfile, row.spoolfile) %][% L.hidden_tag('spoolfile_' _ loop.count, row.spoolfile) %]</td>
+  <td>[% L.link(LXCONFIG.paths.spool _ '/' _ row.spoolfile, row.spoolfile) %][% L.hidden_tag('spoolfile_' _ loop.count, row.spoolfile) %]</td>
  </tr>
 [%- END %]
 
diff --git a/templates/webpages/ic/search.html b/templates/webpages/ic/search.html
index 8e71cb659..12cdcbbfe 100644
--- a/templates/webpages/ic/search.html
+++ b/templates/webpages/ic/search.html
@@ -44,7 +44,7 @@
            id_key        = 'id',
            label_key     = 'partsgroup',
            style         = 'width:250px',
-           limit         = limit,
+           limit         = MYCONFIG.vclimit,
            allow_textbox = 1
          -%]
        </td>
diff --git a/templates/webpages/io/select_item.html b/templates/webpages/io/select_item.html
index a212163fe..cbefece2a 100644
--- a/templates/webpages/io/select_item.html
+++ b/templates/webpages/io/select_item.html
@@ -12,7 +12,7 @@
     [%- END %]
     <th>[% LxERP.t8('Number') %]</th>
     <th>[% LxERP.t8('Part Description') %]</th>
-    [%- IF SHOW_NOTES %]
+    [%- IF INSTANCE_CONF.get_show_longdescription_select_item %]
       <th>[% LxERP.t8('Long Description') %]</th>
     [%- END %]
     <th>[% LxERP.t8('Other Matches') %]</th>
@@ -33,7 +33,7 @@
     [%- END %]
     <td>[% HTML.escape(item.partnumber) %]</td>
     <td>[% HTML.escape(item.description) %]</td>
-    [%- IF SHOW_NOTES %]
+    [%- IF INSTANCE_CONF.get_show_longdescription_select_item %]
       [% USE P %]
       <td>[% P.restricted_html(item.notes) %]</td>
     [%- END %]
diff --git a/templates/webpages/login/company_logo.html b/templates/webpages/login/company_logo.html
index b0c0dc9fd..1bd83c062 100644
--- a/templates/webpages/login/company_logo.html
+++ b/templates/webpages/login/company_logo.html
@@ -32,7 +32,7 @@
      <td>[% HTML.escape(MYCONFIG.name) %]</td>
     </tr>
     <tr>
-     <th align="left">[% IF AUTH_RIGHTS_ADMIN %]<a href="controller.pl?action=ClientConfig/edit" title="[% 'Client Configuration' | $T8 %]">[% END %][% 'Client' | $T8 %][% IF AUTH_RIGHTS_ADMIN %]</a>[% END %]</th>
+     <th align="left">[% IF AUTH.assert('admin', 'may_fail') %]<a href="controller.pl?action=ClientConfig/edit" title="[% 'Client Configuration' | $T8 %]">[% END %][% 'Client' | $T8 %][% IF AUTH.assert('admin', 'may_fail') %]</a>[% END %]</th>
      <td>[% HTML.escape(client.name) %]</td>
     </tr>
     <tr>
diff --git a/templates/webpages/oe/search.html b/templates/webpages/oe/search.html
index b7a24913a..e63f6cd1d 100644
--- a/templates/webpages/oe/search.html
+++ b/templates/webpages/oe/search.html
@@ -25,7 +25,7 @@
                  id_sub        = 'vc_keys',
                  label_key     = 'name',
                  select        = vc_select,
-                 limit         = vclimit,
+                 limit         = MYCONFIG.vclimit,
                  show_empty    = 1,
                  allow_textbox = 1,
                  class         = 'initial_focus',
@@ -46,7 +46,7 @@
                  DATA          = ALL_DEPARTMENTS,
                  id_key        = 'id',
                  label_key     = 'description',
-                 limit         = vclimit,
+                 limit         = MYCONFIG.vclimit,
                  show_empty    = 1,
                  allow_textbox = 1,
             -%]
@@ -87,12 +87,12 @@
      <th align="right">[% 'Project Number' | $T8 %]</th>
      <td colspan="3">
             [%- INCLUDE 'generic/multibox.html'
-                 name          =  vclimit < ALL_PROJECTS.size ? 'projectnumber' : 'project_id',
+                 name          =  MYCONFIG.vclimit < ALL_PROJECTS.size ? 'projectnumber' : 'project_id',
                  style         = "width: 250px",
                  DATA          =  ALL_PROJECTS,
                  id_key        = 'id',
                  label_key     = 'projectnumber',
-                 limit         = vclimit,
+                 limit         = MYCONFIG.vclimit,
                  show_empty    = 1,
                  allow_textbox = 1,
             -%]
diff --git a/templates/webpages/rp/e_mail.html b/templates/webpages/rp/e_mail.html
index 387769ec5..3c20bb8e5 100644
--- a/templates/webpages/rp/e_mail.html
+++ b/templates/webpages/rp/e_mail.html
@@ -17,7 +17,7 @@
   <tr>
     <th align=right nowrap>[% 'Subject' | $T8 %]</th>
     <td><input name=subject size=30 value="[% subject %]"></td>
-[% IF show_bcc %]
+[% IF AUTH.assert('email_bcc', 'may_fail') %]
     <th align=right nowrap=true>[% 'Bcc' | $T8 %]</th>
     <td><input name=bcc size=30 value="[% bcc | $T8 %]"></td>
 [%- END %]
diff --git a/templates/webpages/rp/print_options.html b/templates/webpages/rp/print_options.html
index 776a02d81..502055823 100644
--- a/templates/webpages/rp/print_options.html
+++ b/templates/webpages/rp/print_options.html
@@ -23,13 +23,13 @@
       <option value=inline [% SM.inline %]>[% 'In-line' | $T8 %]</option>
 [%- ELSE %]
       <option value=screen [% OP.screen %]>[% 'Screen' | $T8 %]</option>
-  [%- IF got_printer && show_latex %]
+  [%- IF MYCONFIG.printer && LXCONFIG.primt_templates.latex %]
       <option value=printer [% OP.printer %]>[% 'Printer' | $T8 %]</option>
   [%- END %]
 [%- END %]
      </select>
     </td>
-[%- IF got_printer && show_latex && !is_email %]
+[%- IF MYCONFIG.printer && LXCONFIG.primt_templates.latex && !is_email %]
       <td>[% 'Copies' | $T8 %]<input name=copies size=2 value=[% copies %]></td>
 [%- END %]
   </tr>
diff --git a/templates/webpages/rp/report.html b/templates/webpages/rp/report.html
index 93ef0a9ea..2e9775a96 100644
--- a/templates/webpages/rp/report.html
+++ b/templates/webpages/rp/report.html
@@ -62,8 +62,8 @@
   <tr>
     <th align=left>[% 'Method' | $T8 %]</th>
     <td colspan=3>
-      [% L.radio_button_tag('method', value='accrual', checked=accrual, label=LxERP.t8('Accrual')) %]
-      [% L.radio_button_tag('method', value='cash', checked=cash, label=LxERP.t8('cash')) %]
+      [% L.radio_button_tag('method', value='accrual', checked=(INSTANCE_CONF.get_accounting_method=='accrual'), label=LxERP.t8('Accrual')) %]
+      [% L.radio_button_tag('method', value='cash', checked=(INSTANCE_CONF.get_accounting_method=='cash'), label=LxERP.t8('cash')) %]
     </td>
   </tr>
 [%- END %]
