]> wagnertech.de Git - mfinanz.git/commitdiff
Merge branch 'master' of ssh://git-jbueren@lx-office.linet-services.de/~/lx-office-erp
authorJan Büren <jan@lx-office-hosting.de>
Fri, 10 Dec 2010 10:57:21 +0000 (11:57 +0100)
committerJan Büren <jan@lx-office-hosting.de>
Fri, 10 Dec 2010 10:57:21 +0000 (11:57 +0100)
SL/IS.pm
SL/Template/LaTeX.pm
doc/dokumentenvorlagen-und-variablen.html

index 53de890e70f391495806dc25ea9ecc6f1612d189..8e7dcc9f156464d6bd6fe433c6f127baa63d2b6f 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -1251,7 +1251,7 @@ sub cogs {
   my $transdate  = $form->{invdate} ? $dbh->quote($form->{invdate}) : "current_date";
   my $taxzone_id = $form->{"taxzone_id"} * 1;
   my $query =
-    qq|SELECT i.id, i.trans_id, i.base_qty, i.allocated, i.sellprice,
+    qq|SELECT i.id, i.trans_id, i.base_qty, i.allocated, i.sellprice, i.price_factor,
          c1.accno AS inventory_accno, c1.new_chart_id AS inventory_new_chart, date($transdate) - c1.valid_from AS inventory_valid,
          c2.accno AS    income_accno, c2.new_chart_id AS    income_new_chart, date($transdate) - c2.valid_from AS    income_valid,
          c3.accno AS   expense_accno, c3.new_chart_id AS   expense_new_chart, date($transdate) - c3.valid_from AS   expense_valid
@@ -1277,7 +1277,7 @@ sub cogs {
 
     # total expenses and inventory
     # sellprice is the cost of the item
-    my $linetotal = $form->round_amount(($ref->{sellprice} * $qty) / ( $basefactor || 1 ), 2);
+    my $linetotal = $form->round_amount(($ref->{sellprice} * $qty) / ($ref->{price_factor} * ( $basefactor || 1 )), 2);
 
     if (!$main::eur) {
       $ref->{expense_accno} = ($form->{"expense_accno_$row"}) ? $form->{"expense_accno_$row"} : $ref->{expense_accno};
index eb99b1bb4193ec2330de40fe878c7af5f9be501f..7b89aa4ab370e78682f5207c7f3f5e15e0da0cf7 100644 (file)
@@ -264,7 +264,7 @@ sub _parse_config_lines {
     $comment_start = '\s*%';
   } elsif (ref $self eq 'SL::Template::HTML') {
     $comment_start = '\s*<!--';
-    $comment_end   = '>\s*';
+    $comment_end   = '(?:--)?>\s*';
   } else {
     $comment_start = '\s*\#';
   }
index ba8a1d16d07fbc3232a95c7637f8eec58d309f64..be7dd20013a1291e91dd4860f00e25d75770e31c 100644 (file)
@@ -206,7 +206,7 @@ td {
   &auml;quivalente Beispiel f&uuml;r HTML-Dokumentenvorlagen sieht so
   aus:</p>
 
- <p><code>&lt;!-- config: tag-stye=($ $)&gt;</code></p>
+ <p><code>&lt;!-- config: tag-style=($ $) --&gt;</code></p>
 
  <small><a href="dokumentenvorlagen-und-variablen.html#inhaltsverzeichnis">
    zum Inhaltsverzeichnis</a></small><br>