Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 77923db3

Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt

  • ID 77923db35bd792bcc4a5581a4f01e8d3599b0153
  • Vorgänger 89dd4ca8
  • Nachfolger f5e4c22b

Die Berichtsoptionen in oe.pl (Anfragen, Aufträge, Angebote) auf die Verwendung von ReportGenerator umgestellt.

Unterschiede anzeigen:

bin/mozilla/oe.pl
30 30
# Order entry module
31 31
# Quotation module
32 32
#======================================================================
33
use Data::Dumper;
33

  
34
use POSIX qw(strftime);
34 35

  
35 36
use SL::OE;
36 37
use SL::IR;
37 38
use SL::IS;
38 39
use SL::PE;
40
use SL::ReportGenerator;
39 41

  
40 42
require "bin/mozilla/io.pl";
41 43
require "bin/mozilla/arap.pl";
44
require "bin/mozilla/report_generator.pl";
42 45

  
43 46
1;
44 47

  
......
1569 1572
  $lxdebug->leave_sub();
1570 1573
}
1571 1574

  
1575
sub create_subtotal_row {
1576
  $lxdebug->enter_sub();
1577

  
1578
  my ($totals, $columns, $column_alignment, $subtotal_columns, $class) = @_;
1579

  
1580
  my $row = { map { $_ => { 'data' => '', 'class' => $class, 'align' => $column_alignment->{$_}, } } @{ $columns } };
1581

  
1582
  map { $row->{$_}->{data} = $form->format_amount(\%myconfig, $totals->{$_}, 2) } @{ $subtotal_columns };
1583

  
1584
  $row->{tax}->{data} = $form->format_amount(\%myconfig, $totals->{amount} - $totals->{netamount}, 2);
1585

  
1586
  map { $totals->{$_} = 0 } @{ $subtotal_columns };
1587

  
1588
  $lxdebug->leave_sub();
1589

  
1590
  return $row;
1591
}
1592

  
1572 1593
sub orders {
1573 1594
  $lxdebug->enter_sub();
1574 1595

  
1575 1596
  $ordnumber = ($form->{type} =~ /_order$/) ? "ordnumber" : "quonumber";
1576 1597

  
1577
  # construct href
1578
  my @fields =
1579
    qw(type vc login password transdatefrom transdateto
1580
       open closed notdelivered delivered department
1581
       transaction_description);
1582
  push @fields, $form->{vc};
1583
  $href = "$form->{script}?action=orders&"
1584
    . join("&", map { "${_}=" . E($form->{$_}) } @fields)
1585
    . "&${ordnumber}=" . E($form->{$ordnumber});
1586
  $callback = $href;
1587

  
1588
  # split vendor / customer
1589
  ($form->{ $form->{vc} }, $form->{"$form->{vc}_id"}) =
1590
    split(/--/, $form->{ $form->{vc} });
1598
  ($form->{ $form->{vc} }, $form->{"${form->{vc}}_id"}) = split(/--/, $form->{ $form->{vc} });
1599

  
1600
  $form->{sort} ||= 'transdate';
1591 1601

  
1592 1602
  OE->transactions(\%myconfig, \%$form);
1593 1603

  
1594
  @columns = (
1604
  $form->{rowcount} = scalar @{ $form->{OE} };
1605

  
1606
  my @columns = (
1595 1607
    "transdate",               "reqdate",
1596
    "id",                      "$ordnumber",
1608
    "id",                      $ordnumber,
1597 1609
    "name",                    "netamount",
1598 1610
    "tax",                     "amount",
1599 1611
    "curr",                    "employee",
1600 1612
    "shipvia",                 "globalprojectnumber",
1601 1613
    "transaction_description", "open",
1602
    "closed",                  "delivered"
1614
    "delivered"
1603 1615
  );
1604 1616

  
1605
  $form->{l_open} = $form->{l_closed} = "Y"
1606
    if ($form->{open} && $form->{closed});
1607

  
1608
  $form->{"l_delivered"} = "Y"
1609
    if ($form->{"delivered"} && $form->{"notdelivered"});
1610

  
1611
  foreach $item (@columns) {
1612
    if ($form->{"l_$item"} eq "Y") {
1613
      push @column_index, $item;
1614

  
1615
      # add column to href and callback
1616
      $callback .= "&l_$item=Y";
1617
      $href     .= "&l_$item=Y";
1618
    }
1619
  }
1620

  
1621 1617
  # only show checkboxes if gotten here via sales_order form.
1622
  if ($form->{type} =~ /sales_order/) {
1623
    unshift @column_index, "ids";
1618
  my $allow_multiple_orders = $form->{type} eq 'sales_order';
1619
  if ($allow_multiple_orders) {
1620
    unshift @columns, "ids";
1624 1621
  }
1625 1622

  
1626
  if ($form->{l_subtotal} eq 'Y') {
1627
    $callback .= "&l_subtotal=Y";
1628
    $href     .= "&l_subtotal=Y";
1629
  }
1623
  $form->{l_open}      = $form->{l_closed} = "Y" if ($form->{open}      && $form->{closed});
1624
  $form->{l_delivered} = "Y"                     if ($form->{delivered} && $form->{notdelivered});
1630 1625

  
1626
  my $attachment_basename;
1631 1627
  if ($form->{vc} eq 'vendor') {
1632 1628
    if ($form->{type} eq 'purchase_order') {
1633
      $form->{title} = $locale->text('Purchase Orders');
1629
      $form->{title}       = $locale->text('Purchase Orders');
1630
      $attachment_basename = $locale->text('purchase_order_list');
1634 1631
    } else {
1635
      $form->{title} = $locale->text('Request for Quotations');
1632
      $form->{title}       = $locale->text('Request for Quotations');
1633
      $attachment_basename = $locale->text('rfq_list');
1636 1634
    }
1637
    $name     = $locale->text('Vendor');
1638
    $employee = $locale->text('Employee');
1639
  }
1640
  if ($form->{vc} eq 'customer') {
1635

  
1636
  } else {
1641 1637
    if ($form->{type} eq 'sales_order') {
1642
      $form->{title} = $locale->text('Sales Orders');
1638
      $form->{title}       = $locale->text('Sales Orders');
1639
      $attachment_basename = $locale->text('sales_order_list');
1643 1640
    } else {
1644
      $form->{title} = $locale->text('Quotations');
1641
      $form->{title}       = $locale->text('Quotations');
1642
      $attachment_basename = $locale->text('quotation_list');
1645 1643
    }
1646
    $employee = $locale->text('Employee');
1647
    $name = $locale->text('Customer');
1648
  }
1649

  
1650
  $column_header{id} =
1651
      qq|<th><a class=listheading href=$href&sort=id>|
1652
    . $locale->text('ID')
1653
    . qq|</a></th>|;
1654
  $column_header{transdate} =
1655
      qq|<th><a class=listheading href=$href&sort=transdate>|
1656
    . $locale->text('Date')
1657
    . qq|</a></th>|;
1658
  $column_header{reqdate} =
1659
      qq|<th><a class=listheading href=$href&sort=reqdate>|
1660
    . $locale->text('Required by')
1661
    . qq|</a></th>|;
1662
  $column_header{ordnumber} =
1663
      qq|<th><a class=listheading href=$href&sort=ordnumber>|
1664
    . $locale->text('Order')
1665
    . qq|</a></th>|;
1666
  $column_header{quonumber} =
1667
      qq|<th><a class=listheading href=$href&sort=quonumber>|
1668
    . ($form->{"type"} eq "request_quotation" ?
1669
       $locale->text('RFQ') :
1670
       $locale->text('Quotation'))
1671
    . qq|</a></th>|;
1672
  $column_header{name} =
1673
    qq|<th><a class=listheading href=$href&sort=name>$name</a></th>|;
1674
  $column_header{netamount} =
1675
    qq|<th class=listheading>| . $locale->text('Amount') . qq|</th>|;
1676
  $column_header{tax} =
1677
    qq|<th class=listheading>| . $locale->text('Tax') . qq|</th>|;
1678
  $column_header{amount} =
1679
    qq|<th class=listheading>| . $locale->text('Total') . qq|</th>|;
1680
  $column_header{curr} =
1681
    qq|<th class=listheading>| . $locale->text('Curr') . qq|</th>|;
1682
  $column_header{shipvia} =
1683
      qq|<th><a class=listheading href=$href&sort=shipvia>|
1684
    . $locale->text('Ship via')
1685
    . qq|</a></th>|;
1686
  $column_header{globalprojectnumber} =
1687
    qq|<th class="listheading">| . $locale->text('Project Number') . qq|</th>|;
1688
  $column_header{open} =
1689
    qq|<th class=listheading>| . $locale->text('O') . qq|</th>|;
1690
  $column_header{closed} =
1691
    qq|<th class=listheading>| . $locale->text('C') . qq|</th>|;
1692
  $column_header{"delivered"} =
1693
    qq|<th class="listheading">| . $locale->text("Delivered") . qq|</th>|;
1694

  
1695
  $column_header{employee} =
1696
    qq|<th><a class=listheading href=$href&sort=employee>$employee</a></th>|;
1697
  $column_header{transaction_description} =
1698
    qq|<th><a class=listheading href="$href&sort=transaction_description">|
1699
    . $locale->text("Transaction description") . qq|</a></th>|;
1700

  
1701
  $column_header{ids} = qq|<th></th>|;
1702

  
1703
  if ($form->{ $form->{vc} }) {
1704
    $option = $locale->text(ucfirst $form->{vc});
1705
    $option .= " : $form->{$form->{vc}}";
1644
  }
1645

  
1646
  my $report = SL::ReportGenerator->new(\%myconfig, $form);
1647

  
1648
  my @hidden_variables = map { "l_${_}" } @columns;
1649
  push @hidden_variables, "l_subtotal", $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered ordnumber quonumber
1650
                                                        transaction_description transdatefrom transdateto type vc);
1651

  
1652
  my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables);
1653

  
1654
  my %column_defs = (
1655
    'ids'                     => { 'text' => '', },
1656
    'transdate'               => { 'text' => $locale->text('Date'), },
1657
    'reqdate'                 => { 'text' => $locale->text('Required by'), },
1658
    'id'                      => { 'text' => $locale->text('ID'), },
1659
    'ordnumber'               => { 'text' => $locale->text('Order'), },
1660
    'quonumber'               => { 'text' => $form->{type} eq "request_quotation" ? $locale->text('RFQ') : $locale->text('Quotation'), },
1661
    'name'                    => { 'text' => $form->{vc} eq 'customer' ? $locale->text('Customer') : $locale->text('Vendor'), },
1662
    'netamount'               => { 'text' => $locale->text('Amount'), },
1663
    'tax'                     => { 'text' => $locale->text('Tax'), },
1664
    'amount'                  => { 'text' => $locale->text('Total'), },
1665
    'curr'                    => { 'text' => $locale->text('Curr'), },
1666
    'employee'                => { 'text' => $locale->text('Salesperson'), },
1667
    'shipvia'                 => { 'text' => $locale->text('Ship via'), },
1668
    'globalprojectnumber'     => { 'text' => $locale->text('Project Number'), },
1669
    'transaction_description' => { 'text' => $locale->text('Transaction description'), },
1670
    'open'                    => { 'text' => $locale->text('Open'), },
1671
    'delivered'               => { 'text' => $locale->text('Delivered'), },
1672
  );
1673

  
1674
  foreach my $name (qw(id transdate reqdate quonumber ordnumber name employee shipvia)) {
1675
    $column_defs{$name}->{link} = $href . "&sort=$name";
1676
  }
1677

  
1678
  my %column_alignment = map { $_ => 'right' } qw(netamount tax amount curr);
1679

  
1680
  $form->{"l_type"} = "Y";
1681
  map { $column_defs{$_}->{visible} = $form->{"l_${_}"} ? 1 : 0 } @columns;
1682
  $column_defs{ids}->{visible} = $allow_multiple_orders ? 'HTML' : 0;
1683

  
1684
  $report->set_columns(%column_defs);
1685
  $report->set_column_order(@columns);
1686

  
1687
  $report->set_export_options('orders', @hidden_variables);
1688

  
1689
  my @options;
1690
  if ($form->{customer}) {
1691
    push @options, $locale->text('Customer') . " : $form->{customer}";
1692
  }
1693
  if ($form->{vendor}) {
1694
    push @options, $locale->text('Vendor') . " : $form->{vendor}";
1706 1695
  }
1707 1696
  if ($form->{department}) {
1708
    $option .= "\n<br>" if ($option);
1709 1697
    ($department) = split /--/, $form->{department};
1710
    $option .= $locale->text('Department') . " : $department";
1698
    push @options, $locale->text('Department') . " : $department";
1699
  }
1700
  if ($form->{ordnumber}) {
1701
    push @options, $locale->text('Order Number') . " : $form->{ordnumber}";
1702
  }
1703
  if ($form->{notes}) {
1704
    push @options, $locale->text('Notes') . " : $form->{notes}";
1705
  }
1706
  if ($form->{transaction_description}) {
1707
    push @options, $locale->text('Transaction description') . " : $form->{transaction_description}";
1711 1708
  }
1712 1709
  if ($form->{transdatefrom}) {
1713
    $option .= "\n<br>"
1714
      . $locale->text('From') . " "
1715
      . $locale->date(\%myconfig, $form->{transdatefrom}, 1);
1710
    push @options, $locale->text('From') . "&nbsp;" . $locale->date(\%myconfig, $form->{transdatefrom}, 1);
1716 1711
  }
1717 1712
  if ($form->{transdateto}) {
1718
    $option .= "\n<br>"
1719
      . $locale->text('Bis') . " "
1720
      . $locale->date(\%myconfig, $form->{transdateto}, 1);
1713
    push @options, $locale->text('Bis') . "&nbsp;" . $locale->date(\%myconfig, $form->{transdateto}, 1);
1721 1714
  }
1722 1715
  if ($form->{open}) {
1723
    $option .= "\n<br>" if ($option);
1724
    $option .= $locale->text('Open');
1716
    push @options, $locale->text('Open');
1725 1717
  }
1726 1718
  if ($form->{closed}) {
1727
    $option .= "\n<br>" if ($option);
1728
    $option .= $locale->text('Closed');
1719
    push @options, $locale->text('Closed');
1729 1720
  }
1730

  
1731
  $form->header;
1732

  
1733
  print qq|
1734
<body>
1735

  
1736
<form method="post" action="oe.pl">
1737
<table width=100%>
1738
  <tr>
1739
    <th class=listtop>$form->{title}</th>
1740
  </tr>
1741
  <tr height="5"></tr>
1742
  <tr>
1743
    <td>$option</td>
1744
  </tr>
1745
  <tr>
1746
    <td>
1747
      <table width=100%>
1748
	<tr class=listheading>|;
1749

  
1750
  map { print "\n$column_header{$_}" } @column_index;
1751

  
1752
  print qq|
1753
	</tr>
1754
|;
1755

  
1756
  # add sort and escape callback
1757
  $callback_escaped = $form->escape($callback . "&sort=$form->{sort}");
1758

  
1759
  if (@{ $form->{OE} }) {
1760
    $sameitem = $form->{OE}->[0]->{ $form->{sort} };
1721
  if ($form->{delivered}) {
1722
    push @options, $locale->text('Delivered');
1761 1723
  }
1762

  
1763
  $action = "edit";
1764

  
1765
  foreach $oe (@{ $form->{OE} }) {
1766
    $form->{rowcount} = ++$j;
1767

  
1768
    if ($form->{l_subtotal} eq 'Y') {
1769
      if ($sameitem ne $oe->{ $form->{sort} }) {
1770
        &subtotal;
1771
        $sameitem = $oe->{ $form->{sort} };
1772
      }
1773
    }
1774

  
1775
    map { $oe->{$_} *= $oe->{exchangerate} } (qw(netamount amount));
1776

  
1777
    $column_data{netamount} =
1778
        "<td align=right>"
1779
      . $form->format_amount(\%myconfig, $oe->{netamount}, 2, "&nbsp;")
1780
      . "</td>";
1781
    $column_data{tax} = "<td align=right>"
1782
      . $form->format_amount(\%myconfig, $oe->{amount} - $oe->{netamount},
1783
                             2, "&nbsp;")
1784
      . "</td>";
1785
    $column_data{amount} =
1786
      "<td align=right>"
1787
      . $form->format_amount(\%myconfig, $oe->{amount}, 2, "&nbsp;") . "</td>";
1788

  
1789
    $totalnetamount += $oe->{netamount};
1790
    $totalamount    += $oe->{amount};
1791

  
1792
    $subtotalnetamount += $oe->{netamount};
1793
    $subtotalamount    += $oe->{amount};
1794

  
1795
    $column_data{ids} =
1796
      qq|<td><input name="multi_id_$j" class=checkbox type=checkbox><input type="hidden" name="trans_id_$j" value="$oe->{id}"></td>|;
1797
    $column_data{id}        = "<td>$oe->{id}</td>";
1798
    $column_data{transdate} = "<td>$oe->{transdate}&nbsp;</td>";
1799
    $column_data{reqdate}   = "<td>$oe->{reqdate}&nbsp;</td>";
1800

  
1801
    $column_data{$ordnumber} =
1802
      "<td><a href=oe.pl?action=$action&type=$form->{type}&id=$oe->{id}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&callback=$callback_escaped>$oe->{$ordnumber}</a></td>";
1803
    $column_data{name} = "<td>$oe->{name}</td>";
1804

  
1805
    $column_data{employee} = "<td>$oe->{employee}&nbsp;</td>";
1806
    $column_data{shipvia}  = "<td>$oe->{shipvia}&nbsp;</td>";
1807
    $column_data{globalprojectnumber}  = "<td>" . H($oe->{globalprojectnumber}) . "</td>";
1808

  
1809
    if ($oe->{closed}) {
1810
      $column_data{closed} = "<td align=center>X</td>";
1811
      $column_data{open}   = "<td>&nbsp;</td>";
1812
    } else {
1813
      $column_data{closed} = "<td>&nbsp;</td>";
1814
      $column_data{open}   = "<td align=center>X</td>";
1815
    }
1816
    $column_data{"delivered"} = "<td>" .
1817
      ($oe->{"delivered"} ? $locale->text("Yes") : $locale->text("No")) .
1818
      "</td>";
1819
    $column_data{transaction_description} = "<td>" . H($oe->{transaction_description}) . "</td>";
1820

  
1821
    $i++;
1822
    $i %= 2;
1823
    print "
1824
        <tr class=listrow$i>";
1825

  
1826
    map { print "\n$column_data{$_}" } @column_index;
1827

  
1828
    print qq|
1829
	</tr>
1830
|;
1831

  
1724
  if ($form->{notdelivered}) {
1725
    push @options, $locale->text('Not delivered');
1832 1726
  }
1833 1727

  
1834
  if ($form->{l_subtotal} eq 'Y') {
1835
    &subtotal;
1836
  }
1728
  $report->set_options('top_info_text'        => join("\n", @options),
1729
                       'raw_top_info_text'    => $form->parse_html_template('oe/orders_top'),
1730
                       'raw_bottom_info_text' => $form->parse_html_template('oe/orders_bottom', { 'SHOW_CONTINUE_BUTTON' => $allow_multiple_orders }),
1731
                       'output_format'        => 'HTML',
1732
                       'title'                => $form->{title},
1733
                       'attachment_basename'  => $attachment_basename . strftime('_%Y%m%d', localtime time),
1734
    );
1735
  $report->set_options_from_form();
1837 1736

  
1838
  # print totals
1839
  print qq|
1840
        <tr class=listtotal>|;
1737
  # add sort and escape callback, this one we use for the add sub
1738
  $form->{callback} = $href .= "&sort=$form->{sort}";
1841 1739

  
1842
  map { $column_data{$_} = "<td>&nbsp;</td>" } @column_index;
1740
  # escape callback for href
1741
  $callback = $form->escape($href);
1843 1742

  
1844
  $column_data{netamount} =
1845
    "<th class=listtotal align=right>"
1846
    . $form->format_amount(\%myconfig, $totalnetamount, 2, "&nbsp;") . "</th>";
1847
  $column_data{tax} = "<th class=listtotal align=right>"
1848
    . $form->format_amount(\%myconfig, $totalamount - $totalnetamount,
1849
                           2, "&nbsp;")
1850
    . "</th>";
1851
  $column_data{amount} =
1852
    "<th class=listtotal align=right>"
1853
    . $form->format_amount(\%myconfig, $totalamount, 2, "&nbsp;") . "</th>";
1743
  my @subtotal_columns = qw(netamount amount);
1854 1744

  
1855
  map { print "\n$column_data{$_}" } @column_index;
1745
  my %totals    = map { $_ => 0 } @subtotal_columns;
1746
  my %subtotals = map { $_ => 0 } @subtotal_columns;
1856 1747

  
1857
  print qq|
1858
        </tr>
1859
      </td>
1860
    </table>
1861
  </tr>
1862
  <tr>
1863
    <td><hr size=3 noshade></td>
1864
  </tr>
1865
</table>|;
1866

  
1867
  # multiple invoice edit button only if gotten there via sales_order form.
1748
  my $idx = 0;
1868 1749

  
1869
  if ($form->{type} =~ /sales_order/) {
1870
    print qq|
1871
  <input class"submit" type="submit" name="action" value="|
1872
      . $locale->text('Continue') . qq|">
1873
  <input type="hidden" name="nextsub" value="edit">
1874
  <input type="hidden" name="type" value="$form->{type}">
1875
  <input type="hidden" name="vc" value="$form->{vc}">
1876
  <input type="hidden" name="login" value="$form->{login}">
1877
  <input type="hidden" name="password" value="$form->{password}">
1878
  <input type="hidden" name="callback" value="$callback">
1879
  <input type="hidden" name="rowcount" value="$form->{rowcount}">|;
1880
  }
1881

  
1882
  print qq|
1883
</form>
1750
  my $edit_url = build_std_url('action=edit', 'type', 'vc');
1884 1751

  
1885
<br>
1886
<form method=post action=$form->{script}>
1752
  foreach $oe (@{ $form->{OE} }) {
1753
    map { $oe->{$_} *= $oe->{exchangerate} } @subtotal_columns;
1887 1754

  
1888
<input name=callback type=hidden value="$form->{callback}">
1755
    $oe->{tax}       = $oe->{amount} - $oe->{netamount};
1756
    $oe->{open}      = $oe->{closed}    ? $locale->text('No')  : $locale->text('Yes');
1757
    $oe->{delivered} = $oe->{delivered} ? $locale->text('Yes') : $locale->text('No');
1889 1758

  
1890
<input type=hidden name=type value=$form->{type}>
1891
<input type=hidden name=vc value=$form->{vc}>
1759
    map { $subtotals{$_} += $oe->{$_};
1760
          $totals{$_}    += $oe->{$_} } @subtotal_columns;
1892 1761

  
1893
<input type=hidden name=login value=$form->{login}>
1894
<input type=hidden name=password value=$form->{password}>
1762
    map { $oe->{$_} = $form->format_amount(\%myconfig, $oe->{$_}, 2) } qw(netamount tax amount);
1895 1763

  
1896
</form>
1764
    my $row = { };
1897 1765

  
1898
</body>
1899
</html>
1900
|;
1766
    foreach my $column (@columns) {
1767
      next if ($column eq 'ids');
1768
      $row->{$column} = {
1769
        'data'  => $oe->{$column},
1770
        'align' => $column_alignment{$column},
1771
      };
1772
    }
1901 1773

  
1902
  $lxdebug->leave_sub();
1903
}
1774
    $row->{ids} = {
1775
      'raw_data' =>   $cgi->hidden('-name' => "trans_id_${idx}", '-value' => $oe->{id})
1776
                    . $cgi->checkbox('-name' => "multi_id_${idx}", '-value' => 1, '-label' => ''),
1777
      'valign'   => 'center',
1778
      'align'    => 'center',
1779
    };
1904 1780

  
1905
sub subtotal {
1906
  $lxdebug->enter_sub();
1781
    $row->{$ordnumber}->{link} = $edit_url . "&id=" . E($oe->{id}) . "&callback=${callback}";
1907 1782

  
1908
  map { $column_data{$_} = "<td>&nbsp;</td>" } @column_index;
1783
    my $row_set = [ $row ];
1909 1784

  
1910
  $column_data{netamount} =
1911
      "<th class=listsubtotal align=right>"
1912
    . $form->format_amount(\%myconfig, $subtotalnetamount, 2, "&nbsp;")
1913
    . "</th>";
1914
  $column_data{tax} = "<td class=listsubtotal align=right>"
1915
    . $form->format_amount(\%myconfig, $subtotalamount - $subtotalnetamount,
1916
                           2, "&nbsp;")
1917
    . "</th>";
1918
  $column_data{amount} =
1919
    "<th class=listsubtotal align=right>"
1920
    . $form->format_amount(\%myconfig, $subtotalamount, 2, "&nbsp;") . "</th>";
1785
    if (($form->{l_subtotal} eq 'Y')
1786
        && (($idx == (scalar @{ $form->{OE} } - 1))
1787
            || ($oe->{ $form->{sort} } ne $form->{OE}->[$idx + 1]->{ $form->{sort} }))) {
1788
      push @{ $row_set }, create_subtotal_row(\%subtotals, \@columns, \%column_alignment, \@subtotal_columns, 'listsubtotal');
1789
    }
1921 1790

  
1922
  $subtotalnetamount = 0;
1923
  $subtotalamount    = 0;
1791
    $report->add_data($row_set);
1924 1792

  
1925
  print "
1926
        <tr class=listsubtotal>
1927
";
1793
    $idx++;
1794
  }
1928 1795

  
1929
  map { print "\n$column_data{$_}" } @column_index;
1796
  $report->add_separator();
1797
  $report->add_data(create_subtotal_row(\%totals, \@columns, \%column_alignment, \@subtotal_columns, 'listtotal'));
1930 1798

  
1931
  print qq|
1932
        </tr>
1933
|;
1799
  $report->generate_with_headers();
1934 1800

  
1935 1801
  $lxdebug->leave_sub();
1936 1802
}
locale/de/all
211 211
  'Business Volume'             => 'Gesch?ftsvolumen',
212 212
  'Business deleted!'           => 'Firma gel?scht.',
213 213
  'Business saved!'             => 'Firma gespeichert.',
214
  'C'                           => 'G',
215 214
  'CANCELED'                    => 'Storniert',
216 215
  'CSV export -- options'       => 'CSV-Export -- Optionen',
217 216
  'Calculate'                   => 'Berechnen',
......
727 726
  'New Buchungsgruppe <TMPL_VAR __counter__>' => 'Neue Buchungsgruppe <TMPL_VAR __counter__>',
728 727
  'New Templates'               => 'neue Vorlagen',
729 728
  'New contact'                 => 'Neuer Ansprechpartner',
729
  'New sales order'             => 'Neuer Auftrag',
730 730
  'New unit'                    => 'Neue Einheit',
731 731
  'Next Dunning Level'          => 'N?chste Mahnstufe',
732 732
  'No'                          => 'Nein',
......
766 766
  'Number missing in Row'       => 'Nummer fehlt in Zeile',
767 767
  'Number of copies'            => 'Anzahl Kopien',
768 768
  'Number pages'                => 'Seiten nummerieren',
769
  'O'                           => 'O',
770 769
  'OBE-Export erfolgreich!'     => 'OBE-Export erfolgreich!',
771 770
  'Obsolete'                    => 'Ung?ltig',
772 771
  'Oct'                         => 'Okt',
......
1316 1315
  'print'                       => 'drucken',
1317 1316
  'proforma'                    => 'Proforma',
1318 1317
  'purchase_order'              => 'Auftrag',
1318
  'purchase_order_list'         => 'lieferantenauftragsliste',
1319 1319
  'quarter'                     => 'Viertelj?hrliche (quartalsweise) Abgabe',
1320
  'quotation_list'              => 'angebotsliste',
1320 1321
  'report_generator_nextsub is not defined.' => 'report_generator_nextsub ist nicht definiert.',
1321 1322
  'request_quotation'           => 'Angebotsanforderung',
1322 1323
  'reset'                       => 'zur?cksetzen',
1324
  'rfq_list'                    => 'anfragenliste',
1323 1325
  's'                           => 's',
1324 1326
  'sales_order'                 => 'Kundenauftrag',
1327
  'sales_order_list'            => 'auftragsliste',
1325 1328
  'sales_quotation'             => 'Verkaufsangebot',
1326 1329
  'saved'                       => 'gespeichert',
1327 1330
  'saved!'                      => 'gespeichert',
locale/de/oe
24 24
  'Bin'                         => 'Lagerplatz',
25 25
  'Bin List'                    => 'Lagerliste',
26 26
  'Bis'                         => 'bis',
27
  'C'                           => 'G',
28 27
  'CANCELED'                    => 'Storniert',
28
  'CSV export -- options'       => 'CSV-Export -- Optionen',
29 29
  'Cannot delete order!'        => 'Auftrag kann nicht gel?scht werden!',
30 30
  'Cannot delete quotation!'    => 'Angebot kann nicht gel?scht werden!',
31 31
  'Cannot save order!'          => 'Auftrag kann nicht gespeichert werden!',
......
41 41
  'Contact'                     => 'Kontakt',
42 42
  'Contact Person'              => 'Ansprechpartner',
43 43
  'Continue'                    => 'Weiter',
44
  'Could not spawn html2ps or GhostScript.' => 'html2ps oder GhostScript konnte nicht gestartet werden.',
45
  'Could not write the html2ps config file.' => 'Die tempor&auml;re html2ps-Konfigurationsdatei konnte nicht geschrieben werden.',
46
  'Could not write the temporary HTML file.' => 'Eine tempor&auml;re HTML-Datei konnte nicht geschrieben werden.',
44 47
  'Country'                     => 'Land',
45 48
  'Credit Limit'                => 'Kreditlimit',
46 49
  'Credit Limit exceeded!!!'    => 'Kreditlimit ?berschritten!',
......
136 139
  'November'                    => 'November',
137 140
  'Number'                      => 'Nummer',
138 141
  'Number missing in Row'       => 'Nummer fehlt in Zeile',
139
  'O'                           => 'O',
140 142
  'Oct'                         => 'Okt',
141 143
  'October'                     => 'Oktober',
142 144
  'Open'                        => 'Offen',
......
150 152
  'PAYMENT POSTED'              => 'Rechung gebucht',
151 153
  'PDF'                         => 'PDF',
152 154
  'PDF (OpenDocument/OASIS)'    => 'PDF (OpenDocument/OASIS)',
155
  'PDF export -- options'       => 'PDF-Export -- Optionen',
153 156
  'POSTED'                      => 'Gebucht',
154 157
  'POSTED AS NEW'               => 'Als neu gebucht',
155 158
  'PRINTED'                     => 'Gedruckt',
......
198 201
  'Sales Order'                 => 'Kundenauftrag',
199 202
  'Sales Orders'                => 'Auftr?ge',
200 203
  'Salesman'                    => 'Verk?ufer/in',
204
  'Salesperson'                 => 'Verk?ufer',
201 205
  'Save'                        => 'Speichern',
202 206
  'Save and Close'              => 'Speichern und schlie?en',
203 207
  'Save as new'                 => 'als neu speichern',
......
265 269
  'pick_list'                   => 'Entnahmeliste',
266 270
  'proforma'                    => 'Proforma',
267 271
  'purchase_order'              => 'Auftrag',
272
  'purchase_order_list'         => 'lieferantenauftragsliste',
273
  'quotation_list'              => 'angebotsliste',
274
  'report_generator_nextsub is not defined.' => 'report_generator_nextsub ist nicht definiert.',
268 275
  'request_quotation'           => 'Angebotsanforderung',
276
  'rfq_list'                    => 'anfragenliste',
269 277
  'sales_order'                 => 'Kundenauftrag',
278
  'sales_order_list'            => 'auftragsliste',
270 279
  'sales_quotation'             => 'Verkaufsangebot',
271 280
  'saved!'                      => 'gespeichert',
272 281
  'sent'                        => 'gesendet',
......
297 306
  'check_project'               => 'check_project',
298 307
  'continue'                    => 'continue',
299 308
  'create_backorder'            => 'create_backorder',
309
  'create_subtotal_row'         => 'create_subtotal_row',
300 310
  'customer_details'            => 'customer_details',
301 311
  'delete'                      => 'delete',
302 312
  'delete_order_quotation'      => 'delete_order_quotation',
......
307 317
  'edit'                        => 'edit',
308 318
  'edit_e_mail'                 => 'edit_e_mail',
309 319
  'employee_selection_internal' => 'employee_selection_internal',
320
  'export_as_csv'               => 'export_as_csv',
321
  'export_as_pdf'               => 'export_as_pdf',
310 322
  'form_footer'                 => 'form_footer',
311 323
  'form_header'                 => 'form_header',
312 324
  'format_dates'                => 'format_dates',
......
335 347
  'quotation'                   => 'quotation',
336 348
  'reformat_numbers'            => 'reformat_numbers',
337 349
  'relink_accounts'             => 'relink_accounts',
350
  'report_generator_do'         => 'report_generator_do',
338 351
  'request_for_quotation'       => 'request_for_quotation',
339 352
  'sales_invoice'               => 'sales_invoice',
340 353
  'sales_order'                 => 'sales_order',
......
358 371
  'ship_to'                     => 'ship_to',
359 372
  'show_history'                => 'show_history',
360 373
  'show_vc_details'             => 'show_vc_details',
361
  'subtotal'                    => 'subtotal',
362 374
  'update'                      => 'update',
363 375
  'validate_items'              => 'validate_items',
364 376
  'vendor_details'              => 'vendor_details',
......
368 380
  'weiter'                      => 'continue',
369 381
  'l?schen'                     => 'delete',
370 382
  'email'                       => 'e_mail',
383
  'als_csv_exportieren'         => 'export_as_csv',
384
  'als_pdf_exportieren'         => 'export_as_pdf',
371 385
  'rechnung'                    => 'invoice',
372 386
  'nein'                        => 'no',
373 387
  'auftrag'                     => 'order',
templates/webpages/oe/orders_bottom_de.html
1
<TMPL_IF SHOW_CONTINUE_BUTTON>
2
 Neuer Auftrag<br>
3
 <input class="submit" type="submit" name="action" value="Weiter">
4
</TMPL_IF>
5
 <input type="hidden" name="nextsub" value="edit">
6
 <input type="hidden" name="type" value="<TMPL_VAR type ESCAPE=HTML>">
7
 <input type="hidden" name="vc" value="<TMPL_VAR vc ESCAPE=HTML>">
8
 <input type="hidden" name="login" value="<TMPL_VAR login ESCAPE=HTML>">
9
 <input type="hidden" name="password" value="<TMPL_VAR password ESCAPE=HTML>">
10
 <input type="hidden" name="callback" value="<TMPL_VAR callback ESCAPE=HTML>">
11
 <input type="hidden" name="rowcount" value="<TMPL_VAR rowcount ESCAPE=HTML>">
12
</form>
templates/webpages/oe/orders_bottom_master.html
1
<TMPL_IF SHOW_CONTINUE_BUTTON>
2
 <translate>New sales order</translate><br>
3
 <input class="submit" type="submit" name="action" value="<translate>Continue</translate>">
4
</TMPL_IF>
5
 <input type="hidden" name="nextsub" value="edit">
6
 <input type="hidden" name="type" value="<TMPL_VAR type ESCAPE=HTML>">
7
 <input type="hidden" name="vc" value="<TMPL_VAR vc ESCAPE=HTML>">
8
 <input type="hidden" name="login" value="<TMPL_VAR login ESCAPE=HTML>">
9
 <input type="hidden" name="password" value="<TMPL_VAR password ESCAPE=HTML>">
10
 <input type="hidden" name="callback" value="<TMPL_VAR callback ESCAPE=HTML>">
11
 <input type="hidden" name="rowcount" value="<TMPL_VAR rowcount ESCAPE=HTML>">
12
</form>
templates/webpages/oe/orders_top_de.html
1
<form method="post" action="oe.pl">
templates/webpages/oe/orders_top_master.html
1
<form method="post" action="oe.pl">

Auch abrufbar als: Unified diff