X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=452613c8f5f24e8282797758acef958b3129daaa;hb=4cedba163990bd449e05da972691ebf035d61de3;hp=6281afe4d625a381abe160e379ee1dfb3fa1daf7;hpb=cae6316e718234083b892b042e61714ceb13b0ca;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 6281afe4d..452613c8f 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,23 @@ sub form_footer { - + + + + + + + + + + + + +
| . $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| %
+ + $taxincluded - +
$subtotal $tax @@ -1110,12 +1124,10 @@ sub form_footer { |; } - if (1) { print qq| |; -} if ($form->{type} =~ /sales_order$/) { print qq| @@ -1142,14 +1154,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"); @@ -1534,6 +1538,12 @@ sub search { . $locale->text('Total') . qq| + + + +
| + . $locale->text('Ertrag') . qq| | + . $locale->text('Ertrag prozentual') . qq|
| . $locale->text('Project Number') . qq| | @@ -1611,7 +1621,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. @@ -1669,6 +1679,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)) { @@ -1742,7 +1754,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; @@ -1761,7 +1773,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 = { }; @@ -2064,8 +2076,8 @@ sub delete { - + @@ -2158,7 +2170,6 @@ sub invoice { $exchangerate = $form->check_exchangerate(\%myconfig, $form->{currency}, $orddate, $buysell); - print(STDERR "CURRENCY $form->{currency} DEFAULT: $form->{defaultcurrency} EXCHANGE $exchangerate\n"); if (!$exchangerate) { &backorder_exchangerate($orddate, $buysell); @@ -2173,7 +2184,7 @@ sub invoice { # if not it's most likely a collective order, which can't be saved back # so they just have to be closed if (($form->{ordnumber} ne '') || ($form->{quonumber} ne '')) { - OE->close_order(\%myconfig, \%$form); + OE->close_order(\%myconfig, \%$form) if ($form->{id}); } else { OE->close_orders(\%myconfig, \%$form); }