Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
authorSven Schöling <s.schoeling@linet-services.de>
Wed, 18 Jan 2012 15:51:52 +0000 (16:51 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Wed, 18 Jan 2012 15:51:52 +0000 (16:51 +0100)
SL/Template/Plugin/L.pm
bin/mozilla/gl.pl
templates/webpages/gl/form_footer.html [new file with mode: 0644]
templates/webpages/gl/form_header.html [new file with mode: 0644]

index bc38088..f7ffc11 100644 (file)
@@ -295,7 +295,7 @@ sub date_tag {
     onChange => $onchange,
     ) : ()),
     %params,
-  ) . ((!$params{no_cal}) ?
+  ) . ((!$params{no_cal} && !$params{readonly}) ?
   $self->html_tag('img', undef,
     src    => 'image/calendar.png',
     alt    => $::locale->text('Calendar'),
@@ -421,12 +421,19 @@ sub areainput_tag {
   my ($self, $name, $value, @slurp) = @_;
   my %attributes      = _hashify(@slurp);
 
-  my $rows = delete $attributes{rows}     || 1;
+  my ($rows, $cols);
   my $min  = delete $attributes{min_rows} || 1;
 
+  if (exists $attributes{cols}) {
+    $cols = delete $attributes{cols};
+    $rows = $::form->numtextrows($value, $cols);
+  } else {
+    $rows = delete $attributes{rows} || 1;
+  }
+
   return $rows > 1
-    ? $self->textarea_tag($name, $value, %attributes, rows => max $rows, $min)
-    : $self->input_tag($name, $value, %attributes);
+    ? $self->textarea_tag($name, $value, %attributes, rows => max($rows, $min), ($cols ? (cols => $cols) : ()))
+    : $self->input_tag($name, $value, %attributes, ($cols ? (size => $cols) : ()));
 }
 
 sub multiselect2side {
@@ -691,7 +698,8 @@ should be selected by default.
 =item C<areainput_tag $name, $content, %PARAMS>
 
 Creates a generic input tag or textarea tag, depending on content size. The
-mount of desired rows must be given with C<rows> parameter, Accpeted parameters
+amount of desired rows must be either given with the C<rows> parameter or can
+be computed from the value and the C<cols> paramter, Accepted parameters
 include C<min_rows> for rendering a minimum of rows if a textarea is displayed.
 
 You can force input by setting rows to 1, and you can force textarea by setting
index f4f87cc..a4f2d1d 100644 (file)
@@ -849,385 +849,73 @@ sub display_rows {
 }
 
 sub form_header {
-  my ($init) = @_;
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('general_ledger');
+  $::lxdebug->enter_sub;
+  $::auth->assert('general_ledger');
 
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-  my $locale   = $main::locale;
+  my ($init) = @_;
 
-  my @old_project_ids = ();
-  map({ push(@old_project_ids, $form->{"project_id_$_"})
-          if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"}));
+  my @old_project_ids = grep { $_ } map{ $::form->{"project_id_$_"} } 1..$::form->{rowcount};
 
-  $form->get_lists("projects"  => { "key"       => "ALL_PROJECTS",
+  $::form->get_lists("projects"  => { "key"       => "ALL_PROJECTS",
                                     "all"       => 0,
                                     "old_id"    => \@old_project_ids },
                    "charts"    => { "key"       => "ALL_CHARTS",
-                                    "transdate" => $form->{transdate} },
+                                    "transdate" => $::form->{transdate} },
                    "taxcharts" => "ALL_TAXCHARTS");
 
-  GL->get_chart_balances('charts' => $form->{ALL_CHARTS});
-
-  my $title      = $form->{title};
-  $form->{title} = $locale->text("$title General Ledger Transaction");
-  my $readonly   = ($form->{id}) ? "readonly" : "";
-
-  my $show_details_checked   = $form->{show_details}   ? "checked" : '';
-  my $ob_transaction_checked = $form->{ob_transaction} ? "checked" : '';
-  my $cb_transaction_checked = $form->{cb_transaction} ? "checked" : '';
+  GL->get_chart_balances('charts' => $::form->{ALL_CHARTS});
 
+  my $title      = $::form->{title};
+  $::form->{title} = $::locale->text("$title General Ledger Transaction");
   # $locale->text('Add General Ledger Transaction')
   # $locale->text('Edit General Ledger Transaction')
 
-  map { $form->{$_} =~ s/\"/&quot;/g }
-    qw(reference description chart taxchart);
-
-  $form->{javascript} = qq|<script type="text/javascript">
-  <!--
-  function setTaxkey(row) {
-    var accno  = document.getElementById('accno_' + row);
-    var taxkey = accno.options[accno.selectedIndex].value;
-    var reg = /--([0-9]*)/;
-    var found = reg.exec(taxkey);
-    var index = found[1];
-    index = parseInt(index);
-    var tax = 'taxchart_' + row;
-    for (var i = 0; i < document.getElementById(tax).options.length; ++i) {
-      var reg2 = new RegExp("^"+ index, "");
-      if (reg2.exec(document.getElementById(tax).options[i].value)) {
-        document.getElementById(tax).options[i].selected = true;
-        break;
-      }
-    }
-  };
-
-  function copy_debit_to_credit() {
-    var txt = document.getElementsByName('debit_1')[0].value;
-    document.getElementsByName('credit_2')[0].value = txt;
-  };
-  //-->
-  </script>
-  <script type="text/javascript" src="js/show_form_details.js"></script>
-  <script type="text/javascript" src="js/jquery.js"></script>
-|;
-
-  $form->{selectdepartment} =~ s/ selected//;
-  $form->{selectdepartment} =~
-    s/option>\Q$form->{department}\E/option selected>$form->{department}/;
+  map { $::form->{$_} =~ s/\"/&quot;/g }
+    qw(chart taxchart);
 
-  my $description;
-  if ((my $rows = $form->numtextrows($form->{description}, 50)) > 1) {
-    $description =
-      qq|<textarea name=description rows=$rows cols=50 wrap=soft $readonly >$form->{description}</textarea>|;
-  } else {
-    $description =
-      qq|<input name=description size=50 value="$form->{description}" $readonly>|;
-  }
-
-  my $taxincluded = ($form->{taxincluded}) ? "checked" : "";
-
-  if ($init) {
-    $taxincluded = "checked";
-  }
+  $::form->{selectdepartment} =~ s/ selected//;
+  $::form->{selectdepartment} =~
+    s/option>\Q$::form->{department}\E/option selected>$::form->{department}/;
 
-  my $department;
-  $department = qq|
-        <tr>
-          <th align=right nowrap>| . $locale->text('Department') . qq|</th>
-          <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
-          <input type=hidden name=selectdepartment value="$form->{selectdepartment}">
-        </tr>
-| if $form->{selectdepartment};
   if ($init) {
-    $form->{fokus} = "gl.reference";
+    $::form->{fokus} = "gl.reference";
+    $::form->{taxincluded} = "1";
   } else {
-    $form->{fokus} = qq|gl.accno_$form->{rowcount}|;
+    $::form->{fokus} = qq|gl.accno_$::form->{rowcount}|;
   }
 
-  # use JavaScript Calendar or not
-  $form->{jsscript} = 1;
-  my $jsscript = "";
-  my ($button1, $button2);
-  if ($form->{jsscript}) {
-
-    # with JavaScript Calendar
-    $button1 = qq|
-       <td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" $readonly onBlur=\"check_right_date_format(this)\">
-       <input type=button name=transdate id="trigger1" value=|
-      . $locale->text('button') . qq|></td>
-       |;
-
-    #write Trigger
-    $jsscript =
-      Form->write_trigger(\%myconfig, "1", "transdate", "BL", "trigger1");
-  } else {
-
-    # without JavaScript Calendar
-    $button1 =
-      qq|<td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" $readonly onBlur=\"check_right_date_format(this)\"></td>|;
-  }
-
-  $form->{previous_id}     ||= "--";
-  $form->{previous_gldate} ||= "--";
-
-  $jsscript .= $form->parse_html_template('gl/form_header_chart_balances_js');
-
-  $form->header;
-
-  print qq|
-<body onLoad="focus()">
-
-<script type="text/javascript" src="js/follow_up.js"></script>
-
-<form method=post name="gl" action=gl.pl>
-|;
-
-  $form->hide_form(qw(id closedto locked storno storno_id previous_id previous_gldate));
-
-  print qq|
-<input type=hidden name=title value="$title">
-
-<input type="hidden" name="follow_up_trans_id_1" value="| . H($form->{id}) . qq|">
-<input type="hidden" name="follow_up_trans_type_1" value="gl_transaction">
-<input type="hidden" name="follow_up_trans_info_1" value="| . H($form->{id}) . qq|">
-<input type="hidden" name="follow_up_rowcount" value="1">
-
-<table width=100%>
-  <tr>
-    <th class=listtop>$form->{title}</th>
-  </tr>| .
-
-  ($form->{saved_message} ? qq|
-  <tr>
-    <td>$form->{saved_message}</th>
-  </tr>| : '') .
-
-qq|
-  <tr height="5"></tr>
-  <tr>
-    <td>
-      <table width=100%>
-        <tr>
-          <td colspan="6" align="left">|
-    . $locale->text("Previous transnumber text")
-    . " $form->{previous_id} "
-    . $locale->text("Previous transdate text")
-    . " $form->{previous_gldate}"
-    . qq|</td>
-        </tr>
-        <tr>
-          <th align=right>| . $locale->text('Reference') . qq|</th>
-          <td><input name=reference size=20 value="$form->{reference}" $readonly></td>
-          <td align=left>
-            <table>
-              <tr>
-                <th align=right nowrap>| . $locale->text('Date') . qq|</th>
-                $button1
-              </tr>
-            </table>
-          </td>
-        </tr>|;
-  if ($form->{id}) {
-    print qq|
-        <tr>
-          <th align=right>| . $locale->text('Belegnummer') . qq|</th>
-          <td><input name=id size=20 value="$form->{id}" $readonly></td>
-          <td align=left>
-          <table>
-              <tr>
-                <th align=right width=50%>| . $locale->text('Buchungsdatum') . qq|</th>
-                <td align=left><input name=gldate size=11 title="$myconfig{dateformat}" value=$form->{gldate} $readonly onBlur=\"check_right_date_format(this)\"></td>
-              </tr>
-            </table>
-          </td>
-        </tr>|;
-  }
-  print qq|
-        $department|;
-  if ($form->{id}) {
-    print qq|
-        <tr>
-          <th align=right width=1%>| . $locale->text('Description') . qq|</th>
-          <td width=1%>$description</td>
-          <td>
-            <table>
-              <tr>
-                <th align=left>| . $locale->text('MwSt. inkl.') . qq|</th>
-                <td><input type=checkbox name=taxincluded value=1 $taxincluded></td>
-              </tr>
-            </table>
-         </td>
-          <td align=left>
-            <table width=100%>
-              <tr>
-                <th align=right width=50%>| . $locale->text('Mitarbeiter') . qq|</th>
-                <td align=left><input name=employee size=20  value="| . H($form->{employee}) . qq|" readonly></td>
-              </tr>
-            </table>
-          </td>
-        </tr>|;
-  } else {
-    print qq|
-        <tr>
-          <th align=left width=1%>| . $locale->text('Description') . qq|</th>
-          <td width=1%>$description</td>
-          <td>
-            <table>
-              <tr>
-                <th align=left>| . $locale->text('MwSt. inkl.') . qq|</th>
-                <td><input type=checkbox name=taxincluded value=1 $taxincluded></td>
-              </tr>
-            </table>
-         </td>
-        </tr>|;
-  }
-
-  print qq|
-      <tr>
-      <tr><td colspan=4><table><tr>
-       <td>
-        | . $locale->text('OB Transaction') . qq|<input type="checkbox" name="ob_transaction" value="1" $ob_transaction_checked>
-       </td>
-       <td>
-        | . $locale->text('CB Transaction') . qq|<input type="checkbox" name="cb_transaction" value="1" $cb_transaction_checked>
-       </td>
-      </tr></table></td></tr>
-      <tr>
-       <td width="1%" align="right" nowrap>| . $locale->text('Show details') . qq|</td>
-       <td width="1%"><input type="checkbox" onclick="show_form_details();" name="show_details" value="1" $show_details_checked></td>
-      </tr>|;
-
-  print qq|
-      <tr>
-      <td colspan=4>
-          <table width=100%>
-           <tr class=listheading>
-          <th class=listheading style="width:15%">|
-    . $locale->text('Account') . qq|</th>
-          <th class=listheading style="width:10%">| . $locale->text('Chart balance') . qq|</th>
-          <th class=listheading style="width:10%">|
-    . $locale->text('Debit') . qq|</th>
-          <th class=listheading style="width:10%">|
-    . $locale->text('Credit') . qq|</th>
-          <th class=listheading style="width:10%">|
-    . $locale->text('Tax') . qq|</th>
-          <th class=listheading style="width:5%">|
-    . $locale->text('Taxkey') . qq|</th>|;
-
-  if ($form->{show_details}) {
-    print qq|
-          <th class=listheading style="width:20%">| . $locale->text('Source') . qq|</th>
-          <th class=listheading style="width:20%">| . $locale->text('Memo') . qq|</th>
-          <th class=listheading style="width:20%">| . $locale->text('Project Number') . qq|</th>
-|;
-  }
+  $::form->{previous_id}     ||= "--";
+  $::form->{previous_gldate} ||= "--";
 
-  print qq|
-        </tr>
+  $::form->header;
+  print $::form->parse_html_template('gl/form_header', {
+    hide_title => $title,
+  });
 
-$jsscript
-|;
-  $main::lxdebug->leave_sub();
+  $::lxdebug->leave_sub;
 
 }
 
 sub form_footer {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('general_ledger');
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-  my $locale   = $main::locale;
-  my $cgi      = $::request->{cgi};
-
-  my $follow_ups_block;
-  if ($form->{id}) {
-    my $follow_ups = FU->follow_ups('trans_id' => $form->{id});
-
-    if (@{ $follow_ups} ) {
-      my $num_due       = sum map { $_->{due} * 1 } @{ $follow_ups };
-      $follow_ups_block = qq|<p>| . $locale->text("There are #1 unfinished follow-ups of which #2 are due.", scalar @{ $follow_ups }, $num_due) . qq|</p>|;
-    }
-  }
-
-  my ($dec) = ($form->{totaldebit} =~ /\.(\d+)/);
-  $dec = length $dec;
-  my $decimalplaces = ($dec > 2) ? $dec : 2;
-  my $radieren = ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0;
-
-  map {
-    $form->{$_} = $form->format_amount(\%myconfig, $form->{$_}, 2, "&nbsp;")
-  } qw(totaldebit totalcredit);
-
-  print qq|
-    <tr class=listtotal>
-    <th colspan="3" align=right class=listtotal> $form->{totaldebit}</th>
-    <th align=right class=listtotal> $form->{totalcredit}</th>
-    <td colspan=6></td>
-    </tr>
-  </table>
-  </td>
-  </tr>
-</table>
-
-<input name=callback type=hidden value="$form->{callback}">
-
-$follow_ups_block
-
-<br>
-|;
-
-  my $transdate = $form->datetonum($form->{transdate}, \%myconfig);
-  my $closedto  = $form->datetonum($form->{closedto},  \%myconfig);
-
-  if ($form->{id}) {
-
-    if (!$form->{storno}) {
-      print qq|<input class=submit type=submit name=action value="| . $locale->text('Storno') . qq|">|;
-    }
-
-    # Löschen und Ändern von Buchungen nicht mehr möglich (GoB) nur am selben Tag möglich
-    if (!$form->{locked} && $radieren) {
-      print qq|
-        <input class=submit type=submit name=action value="| . $locale->text('Post') . qq|" accesskey="b">
-        <input class=submit type=submit name=action value="| . $locale->text('Delete') . qq|">|;
-    }
-
-    print qq|
-        <input class=submit type=submit name=action id=update_button value="| . $locale->text('Update') . qq|">
-        <input type="button" class="submit" onclick="follow_up_window()" value="|
-      . $locale->text('Follow-Up')
-      . qq|"> |;
+  $::lxdebug->enter_sub;
+  $::auth->assert('general_ledger');
 
-  } else {
-    if ($form->{draft_id}) {
-      my $remove_draft_checked = $form->{remove_draft} ? 'checked' : '';
-      print qq|<p>\n|
-        . qq|  <input name="remove_draft" id="remove_draft" type="checkbox" class="checkbox" ${remove_draft_checked}>|
-        . qq|  <label for="remove_draft">| . $locale->text('Remove Draft') . qq|</label>\n|
-        . qq|</p>\n|;
-    }
+  my ($follow_ups, $follow_ups_due);
 
-    print qq|
-        <input class=submit type=submit name=action id=update_button value="| . $locale->text('Update') . qq|">
-        <input class=submit type=submit name=action value="| . $locale->text('Post') . qq|"> |
-        . NTI($cgi->submit('-name' => 'action', '-value' => $locale->text('Save draft'), '-class' => 'submit'))
-        . $cgi->hidden('-name' => 'draft_id',          '-default' => [$form->{draft_id}])
-        . $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}]);
+  if ($::form->{id}) {
+    $follow_ups     = FU->follow_ups('trans_id' => $::form->{id});
+    $follow_ups_due = sum map { $_->{due} * 1 } @{ $follow_ups || [] };
   }
 
-  print "
-  </form>
+  my $radieren = $::form->current_date(\%::myconfig) eq $::form->{gldate};
 
-</body>
-</html>
-";
-  $main::lxdebug->leave_sub();
+  print $::form->parse_html_template('gl/form_footer', {
+    radieren       => $radieren,
+    follow_ups     => $follow_ups,
+    follow_ups_due => $follow_ups_due,
+  });
 
+  $::lxdebug->leave_sub;
 }
 
 sub delete {
diff --git a/templates/webpages/gl/form_footer.html b/templates/webpages/gl/form_footer.html
new file mode 100644 (file)
index 0000000..48ad995
--- /dev/null
@@ -0,0 +1,52 @@
+[%- USE HTML %]
+[%- USE LxERP %]
+[%- USE T8 %]
+[%- USE L %]
+    <tr class=listtotal>
+    <th colspan="3" align=right class=listtotal> [% LxERP.format_amount(totaldebit, 2) | html %]</th>
+    <th align=right class=listtotal> [% LxERP.format_amount(totalcredit, 2) | html %]</th>
+    <td colspan=6></td>
+    </tr>
+  </table>
+  </td>
+  </tr>
+</table>
+
+<input name=callback type=hidden value="[% callback %]">
+
+[%- IF id && follow_ups.size %]
+  <p>[% LxERP.t8('There are #1 unfinished follow-ups of which #2 are due.', follow_ups.size , follow_ups_due) %]</p>
+[%- END %]
+
+<br>
+
+[%- IF id %]
+
+ [%- IF !storno %]
+      [% L.submit_tag('action', LxERP.t8('Storno')) %]
+ [%- END %]
+
+ [% IF !locked && radieren %]
+      [% L.submit_tag('action', LxERP.t8('Post'), accesskey='b') %]
+      [% L.submit_tag('action', LxERP.t8('Delete')) %]
+ [%- END %]
+      [% L.submit_tag('action', LxERP.t8('Update'), id='update_button') %]
+      [% L.submit_tag('action', LxERP.t8('Follow-Up'), onclick='follow_up_window()') %]
+
+[%- ELSE %]
+
+ [%- IF draft_id %]
+      <p>[% L.checkbox_tag('remove_draft', checked=remove_draft, label=LxERP.t8('Remove Draft')) %]</p>
+ [%- END %]
+
+      [% L.submit_tag('action', LxERP.t8('Update'), id='update_button') %]
+      [% L.submit_tag('action', LxERP.t8('Post')) %]
+      [% L.submit_tag('action', LxERP.t8('Save Draft')) %]
+      [% L.hidden_tag('draft_id', draft_id) %]
+      [% L.hidden_tag('draft_description', draft_description) %]
+[%- END %]
+
+  </form>
+
+</body>
+</html>
diff --git a/templates/webpages/gl/form_header.html b/templates/webpages/gl/form_header.html
new file mode 100644 (file)
index 0000000..e6ba49e
--- /dev/null
@@ -0,0 +1,157 @@
+[%- USE HTML %]
+[%- USE LxERP %]
+[%- USE T8 %]
+[%- USE L %]
+<body onLoad="focus()">
+
+<script type="text/javascript">
+  <!--
+  function setTaxkey(row) {
+    var accno  = document.getElementById('accno_' + row);
+    var taxkey = accno.options[accno.selectedIndex].value;
+    var reg = /--([0-9]*)/;
+    var found = reg.exec(taxkey);
+    var index = found[1];
+    index = parseInt(index);
+    var tax = 'taxchart_' + row;
+    for (var i = 0; i < document.getElementById(tax).options.length; ++i) {
+      var reg2 = new RegExp("^"+ index, "");
+      if (reg2.exec(document.getElementById(tax).options[i].value)) {
+        document.getElementById(tax).options[i].selected = true;
+        break;
+      }
+    }
+  };
+
+  function copy_debit_to_credit() {
+    var txt = document.getElementsByName('debit_1')[0].value;
+    document.getElementsByName('credit_2')[0].value = txt;
+  };
+  //-->
+  </script>
+  <script type="text/javascript" src="js/show_form_details.js"></script>
+<script type="text/javascript" src="js/follow_up.js"></script>
+
+<form method=post name="gl" action=gl.pl>
+
+[% FOREACH name IN [ 'id', 'closedto', 'locked', 'storno', 'storno_id', 'previous_id', 'previous_gldate' ] %]
+[% L.hidden_tag(name, $name) %]
+[%- END %]
+
+<input type=hidden name=title value="[% hide_title | html %]">
+
+<input type="hidden" name="follow_up_trans_id_1" value="[% id | html %]">
+<input type="hidden" name="follow_up_trans_type_1" value="gl_transaction">
+<input type="hidden" name="follow_up_trans_info_1" value="[% id | html %]">
+<input type="hidden" name="follow_up_rowcount" value="1">
+
+<table width=100%>
+  <tr>
+    <th class=listtop>[% title | html %]</th>
+  </tr>
+[%- IF saved_message %]
+  <tr>
+    <td>[% saved_message | html %]</th>
+  </tr>
+[%- END %]
+
+  <tr height="5"></tr>
+  <tr>
+    <td>
+      <table width=100%>
+        <tr>
+          <td colspan="6" align="left">[% 'Previous transnumber text' | $T8 %] [% previous_id  %] . [% 'Previous transdate text' | $T8 %] [% previous_gldate %]</td>
+        </tr>
+        <tr>
+          <th align=right>[% 'Reference' | $T8 %]</th>
+          <td>[% L.input_tag('reference', reference,  size=20, readonly=id) %]</td>
+          <td align=left>
+            <table>
+              <tr>
+                <th align=right width=50% nowrap>[% 'Date' | $T8 %]</th>
+                <td>[% L.date_tag('transdate', transdate, readonly=id) %]</td>
+              </tr>
+            </table>
+          </td>
+        </tr>
+[%- IF id %]
+        <tr>
+          <th align=right>[% 'Belegnummer' | $T8 %]</th>
+          <td>[% L.input_tag('id', id,  size=20, readonly=id) %]</td>
+          <td align=left>
+          <table>
+              <tr>
+                <th align=right width=50%>[% 'Buchungsdatum' | $T8 %]</th>
+                <td align=left>[% L.date_tag('gldate', gldate, readonly=id) %]</td>
+              </tr>
+            </table>
+          </td>
+        </tr>
+[%- END %]
+
+[%- IF selectdepartment %]
+        <tr>
+          <th align=right nowrap>[% 'Department' | $T8 %]</th>
+          <td colspan=3><select name=department>[% selectdepartment %]</select></td>
+          <input type=hidden name=selectdepartment value="[% selectdepartment | html %]">
+        </tr>
+[%- END %]
+
+        <tr>
+          <th align=right width=1%>[% 'Description' | $T8 %]</th>
+          <td width=1%>[% L.areainput_tag('description', description, cols=50, readonly=id) %]</td>
+          <td>
+            <table>
+              <tr>
+                <th align=left>[% 'MwSt. inkl.' | $T8 %]</th>
+                <td>[% L.checkbox_tag('taxincluded', checked=taxincluded) %]</td>
+              </tr>
+            </table>
+         </td>
+[%- IF id %]
+          <td align=left>
+            <table width=100%>
+              <tr>
+                <th align=right width=50%>[% 'Mitarbeiter' | $T8 %]</th>
+                <td align=left>[% L.input_tag('employee', employee, size=20, readonly=id) %]</td>
+              </tr>
+            </table>
+          </td>
+[%- END %]
+        </tr>
+
+      <tr>
+       <td colspan=4>
+        <table>
+         <tr>
+          <td>[% 'OB Transaction' | $T8 %] [% L.checkbox_tag('ob_transaction' checked=ob_transaction) %]</td>
+          <td>[% 'CB Transaction' | $T8 %] [% L.checkbox_tag('cb_transaction' checked=cb_transaction) %]</td>
+         </tr>
+        </table>
+       </td>
+      </tr>
+      <tr>
+       <td width="1%" align="right" nowrap>[% 'Show details' | $T8 %]</td>
+       <td width="1%">[% L.checkbox_tag('show_details', checked=show_details, onclick='show_form_details();') %]</td>
+      </tr>
+
+      <tr>
+      <td colspan=4>
+          <table width=100%>
+           <tr class=listheading>
+          <th class=listheading style="width:15%">[% 'Account' | $T8 %]</th>
+          <th class=listheading style="width:10%">[% 'Chart balance' | $T8 %]</th>
+          <th class=listheading style="width:10%">[% 'Debit' | $T8 %]</th>
+          <th class=listheading style="width:10%">[% 'Credit' | $T8 %]</th>
+          <th class=listheading style="width:10%">[% 'Tax' | $T8 %]</th>
+          <th class=listheading style="width:5%">[% 'Taxkey' | $T8 %]</th>
+
+[%- IF show_details %]
+          <th class=listheading style="width:20%">[% 'Source' | $T8 %]</th>
+          <th class=listheading style="width:20%">[% 'Memo' | $T8 %]</th>
+          <th class=listheading style="width:20%">[% 'Project Number' | $T8 %]</th>
+[%- END %]
+
+        </tr>
+
+[%- PROCESS 'gl/form_header_chart_balances_js.html' %]