X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Foe.pl;h=cb55f0714f7fb776811dafe350bb61293ee8cdea;hb=29d636435456494e8dc702ccc1015452a71275d9;hp=40eecc38846ac380e8f6dc063855bf1394d41507;hpb=77923db35bd792bcc4a5581a4f01e8d3599b0153;p=kivitendo-erp.git
diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl
index 40eecc388..cb55f0714 100644
--- a/bin/mozilla/oe.pl
+++ b/bin/mozilla/oe.pl
@@ -41,7 +41,7 @@ use SL::ReportGenerator;
require "bin/mozilla/io.pl";
require "bin/mozilla/arap.pl";
-require "bin/mozilla/report_generator.pl";
+require "bin/mozilla/reportgenerator.pl";
1;
@@ -122,7 +122,7 @@ sub edit {
set_headings("edit");
# editing without stuff to edit? try adding it first
- if ($form->{rowcount}) {
+ if ($form->{rowcount} && !$form->{print_and_save}) {
map { $id++ if $form->{"multi_id_$_"} } (1 .. $form->{rowcount});
if (!$id) {
@@ -1010,9 +1010,31 @@ sub form_footer {
-
+ |
+
+|;
+
+ if ($form->{type} =~ /^sales_/) {
+ print qq|
+
+ | . $locale->text('Ertrag') . qq| |
+ | . $form->format_amount(\%myconfig, $form->{marge_total}, 2, 0) . qq| |
+
+
+ | . $locale->text('Ertrag prozentual') . qq| |
+ | . $form->format_amount(\%myconfig, $form->{marge_percent}, 2, 0) . qq| % |
+
+|;
+ }
+
+ print qq|
+
+
+
+ |
+
$taxincluded
-
+
$subtotal
$tax
@@ -1042,11 +1064,11 @@ sub form_footer {
Dateiname |
Webdavlink |
|;
- foreach $file (keys %{ $form->{WEBDAV} }) {
+ foreach $file (@{ $form->{WEBDAV} }) {
$webdav_list .= qq|
- $file |
- $form->{WEBDAV}{$file} |
+ $file->{name} |
+ $file->{type} |
|;
}
@@ -1110,12 +1132,10 @@ sub form_footer {
|;
}
- if (1) {
print qq|
|;
-}
if ($form->{type} =~ /sales_order$/) {
print qq|
@@ -1142,14 +1162,6 @@ sub form_footer {
. $locale->text('Order') . qq|">
|;
}
- } elsif ($form->{type} =~ /sales_order$/ && $form->{rowcount} && !$form->{proforma}) {
- print qq|
- Workflow $form->{heading}
-
-
-|;
}
$form->hide_form("saved_xyznumber");
@@ -1523,7 +1535,6 @@ sub search {
$employee |
|
. $locale->text('Ship via') . qq| |
- $employee |
|
@@ -1534,6 +1545,12 @@ sub search {
. $locale->text('Total') . qq| |
+ |
+ . $locale->text('Ertrag') . qq| |
+ |
+ . $locale->text('Ertrag prozentual') . qq| |
+
+
|
. $locale->text('Project Number') . qq| |
|
@@ -1611,7 +1628,7 @@ sub orders {
"curr", "employee",
"shipvia", "globalprojectnumber",
"transaction_description", "open",
- "delivered"
+ "delivered", "marge_total", "marge_percent"
);
# only show checkboxes if gotten here via sales_order form.
@@ -1647,7 +1664,7 @@ sub orders {
my @hidden_variables = map { "l_${_}" } @columns;
push @hidden_variables, "l_subtotal", $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered ordnumber quonumber
- transaction_description transdatefrom transdateto type vc);
+ transaction_description transdatefrom transdateto type vc employee_id);
my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables);
@@ -1669,6 +1686,8 @@ sub orders {
'transaction_description' => { 'text' => $locale->text('Transaction description'), },
'open' => { 'text' => $locale->text('Open'), },
'delivered' => { 'text' => $locale->text('Delivered'), },
+ 'marge_total' => { 'text' => $locale->text('Ertrag'), },
+ 'marge_percent' => { 'text' => $locale->text('Ertrag prozentual'), }
);
foreach my $name (qw(id transdate reqdate quonumber ordnumber name employee shipvia)) {
@@ -1686,6 +1705,8 @@ sub orders {
$report->set_export_options('orders', @hidden_variables);
+ $report->set_sort_indicator($form->{sort}, 1);
+
my @options;
if ($form->{customer}) {
push @options, $locale->text('Customer') . " : $form->{customer}";
@@ -1740,7 +1761,7 @@ sub orders {
# escape callback for href
$callback = $form->escape($href);
- my @subtotal_columns = qw(netamount amount);
+ my @subtotal_columns = qw(netamount amount marge_total);
my %totals = map { $_ => 0 } @subtotal_columns;
my %subtotals = map { $_ => 0 } @subtotal_columns;
@@ -1759,7 +1780,7 @@ sub orders {
map { $subtotals{$_} += $oe->{$_};
$totals{$_} += $oe->{$_} } @subtotal_columns;
- map { $oe->{$_} = $form->format_amount(\%myconfig, $oe->{$_}, 2) } qw(netamount tax amount);
+ map { $oe->{$_} = $form->format_amount(\%myconfig, $oe->{$_}, 2) } qw(netamount tax amount marge_total marge_percent);
my $row = { };
@@ -2062,8 +2083,8 @@ sub delete {
-
+
| |