X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=c86de3763fcce8aa3895778c7a89ab3cc40b9f68;hb=4bbf708cfb8324cbad57b0a379d0489124aad132;hp=1fc3fe3d653fd939046486a0930875c7e7903392;hpb=084d1390974678cedb644ba2142243c9d589df74;p=kivitendo-erp.git
diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl
index 1fc3fe3d6..c86de3763 100644
--- a/bin/mozilla/oe.pl
+++ b/bin/mozilla/oe.pl
@@ -41,6 +41,7 @@ use SL::IS;
use SL::PE;
use SL::ReportGenerator;
use List::Util qw(max reduce sum);
+use Data::Dumper;
require "bin/mozilla/io.pl";
require "bin/mozilla/arap.pl";
@@ -465,6 +466,8 @@ sub update {
check_oe_access();
+# $main::lxdebug->message(0, Dumper($form));
+
set_headings($form->{"id"} ? "edit" : "add");
map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate) unless $recursive_call;
@@ -491,8 +494,8 @@ sub update {
&& ($form->{"partsgroup_$i"} eq "")) {
$form->{creditremaining} += ($form->{oldinvtotal} - $form->{oldtotalpaid});
- &check_form;
+ &check_form;
} else {
if ($form->{type} =~ /^sales/) {
@@ -503,7 +506,11 @@ sub update {
my $rows = scalar @{ $form->{item_list} };
- $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{discount} * 100);
+ # hier ist das problem fuer bug 817 $form->{discount} wird nicht durchgeschliffen
+ # ferner fallunterscheidung fuer verkauf oder einkauf s.a. bug 736 jb 04.05.2009
+ # select discount as vendor_discount from vendor ||
+ # select discount as customer_discount from customer
+ $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"$form->{vc}_discount"} * 100);
if ($rows) {
$form->{"qty_$i"} = 1 unless ($form->{"qty_$i"});
@@ -660,11 +667,22 @@ sub search {
text('button') . qq|>
|;
-
+ $button3 = qq|
+
+ text('button') . qq|> |
+ |;
+ $button4 = qq|
+
+ text('button') . qq|> |
+ |;
+
#write Trigger
$jsscript =
- Form->write_trigger(\%myconfig, "2", "transdatefrom", "BR", "trigger3",
- "transdateto", "BL", "trigger4");
+ Form->write_trigger(\%myconfig, "4", "transdatefrom", "BR", "trigger3",
+ "transdateto", "BL", "trigger4",
+ "reqdatefrom", "BR", "trigger5", "reqdateto", "BL", "trigger6");
my $vc = $form->{vc} eq "customer" ? "customers" : "vendors";
@@ -766,10 +784,15 @@ $employee_block
$projectnumber |
- | . $locale->text('From') . qq| | $button1
+ | . $locale->text('Order Date') . " " . $locale->text('From') . qq| | $button1
| . $locale->text('Bis') . qq| | $button2
+
+ | . $locale->text('Delivery Date') . " " . $locale->text('From') . qq| | $button3
+ | . $locale->text('Bis') . qq| | $button4
+
+
| . $locale->text('Include in Report') . qq| |
@@ -915,7 +938,8 @@ 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 employee_id salesman_id);
+ transaction_description transdatefrom transdateto type vc employee_id salesman_id
+ reqdatefrom reqdateto);
my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables);
@@ -955,7 +979,7 @@ sub orders {
$report->set_columns(%column_defs);
$report->set_column_order(@columns);
- $report->set_export_options('orders', @hidden_variables);
+ $report->set_export_options('orders', @hidden_variables, qw(sort sortdir));
$report->set_sort_indicator($form->{sort}, $form->{sortdir});
my @options;
@@ -967,8 +991,16 @@ sub orders {
push @options, $locale->text('Order Number') . " : $form->{ordnumber}" if $form->{ordnumber};
push @options, $locale->text('Notes') . " : $form->{notes}" if $form->{notes};
push @options, $locale->text('Transaction description') . " : $form->{transaction_description}" if $form->{transaction_description};
- push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1) if $form->{transdatefrom};
- push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{transdateto}, 1) if $form->{transdateto};
+ if ( $form->{transdatefrom} or $form->{transdateto} ) {
+ push @options, $locale->text('Order Date');
+ push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1) if $form->{transdatefrom};
+ push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{transdateto}, 1) if $form->{transdateto};
+ };
+ if ( $form->{reqdatefrom} or $form->{reqdateto} ) {
+ push @options, $locale->text('Delivery Date');
+ push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{reqdatefrom}, 1) if $form->{reqdatefrom};
+ push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{reqdateto}, 1) if $form->{reqdateto};
+ };
push @options, $locale->text('Open') if $form->{open};
push @options, $locale->text('Closed') if $form->{closed};
push @options, $locale->text('Delivered') if $form->{delivered};
|