From: Bernd Blessmann Date: Wed, 11 Jan 2012 10:39:24 +0000 (+0100) Subject: Merge branch 'master' of vc.linet-services.de:public/lx-office-erp X-Git-Tag: release-2.7.0beta1~61^2~3^2 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/565b41f3b09495c750cb4a6402f446ea63cef4cd?hp=e8e83d4709e70e2e5a64e544ce88caa6d5ab1e15 Merge branch 'master' of vc.linet-services.de:public/lx-office-erp --- diff --git a/SL/DATEV.pm b/SL/DATEV.pm index 7f38c88c1..cd04053ba 100644 --- a/SL/DATEV.pm +++ b/SL/DATEV.pm @@ -426,10 +426,11 @@ sub _get_transactions { $ref->{is_tax} = 1; } - if ( !$ref->{invoice} - && $ref->{is_tax} - && !($prev_ref->{is_tax}) - && (_sign($ref->{amount}) == _sign($prev_ref->{amount}))) { + if ( !$ref->{invoice} # we have a non-invoice booking (=gl) + && $ref->{is_tax} # that has "is_tax" set + && !($prev_ref->{is_tax}) # previous line wasn't is_tax + && (_sign($ref->{amount}) == _sign($prev_ref->{amount}))) # and sign same as previous sign + { $trans->[$i - 1]->{tax_amount} = $ref->{amount}; } } @@ -442,7 +443,10 @@ sub _get_transactions { } for my $j (0 .. (scalar(@{$trans}) - 1)) { - if (abs($trans->[$j]->{'amount'}) > abs($absumsatz)) { + # for gl-bookings no split is allowed and there is no AR/AP account, so we always use the maximum value as a reference + # for ap/ar bookings we can always search for AR/AP in link and use that + if ( ( not $trans->[$j]->{'invoice'} and abs($trans->[$j]->{'amount'}) > abs($absumsatz) ) + or ($trans->[$j]->{'invoice'} and ($trans->[$j]->{'link'} eq 'AR' or $trans->[$j]->{'link'} eq 'AP'))) { $absumsatz = $trans->[$j]->{'amount'}; $notsplitindex = $j; } diff --git a/SL/WH.pm b/SL/WH.pm index 352ca1af8..f760f5e9b 100644 --- a/SL/WH.pm +++ b/SL/WH.pm @@ -620,6 +620,11 @@ sub get_warehouse_report { push @filter_vars, '%' . $filter{ean} . '%'; } + if ($filter{date}) { + push @filter_ary, "i.itime <= ?"; + push @filter_vars, $filter{date}; + } + # prepare qty comparison for later filtering my ($f_qty_op, $f_qty, $f_qty_base_unit); diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index 2b49ba00c..62be1d1d7 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -824,7 +824,7 @@ sub generate_report { my @columns = qw(warehousedescription bindescription partnumber partdescription chargenumber bestbefore qty stock_value); # filter stuff - map { $filter{$_} = $form->{$_} if ($form->{$_}) } qw(warehouse_id bin_id partnumber description chargenumber bestbefore); + map { $filter{$_} = $form->{$_} if ($form->{$_}) } qw(warehouse_id bin_id partnumber description chargenumber bestbefore date); $filter{qty_op} = WH->convert_qty_op($form->{qty_op}); if ($filter{qty_op}) { diff --git a/config/lx_office.conf.default b/config/lx_office.conf.default index 5570baf6c..387eff279 100644 --- a/config/lx_office.conf.default +++ b/config/lx_office.conf.default @@ -78,6 +78,14 @@ webdav = 0 vertreter = 0 # Show fields used for the best before date +# ATTENTION! If you enabled this feature you can not simply turn it off again +# without taking care that best_before fields are emptied in the database. +# This can be done with the following query: +# +# UPDATE inventory SET bestbefore = NULL; +# +# Any stock contents containing a best before date will be impossible to stock +# out otherwise. show_best_before = 0 ## Pictures for parts diff --git a/locale/de/all b/locale/de/all index 6e5013b2f..9e3ba9eae 100644 --- a/locale/de/all +++ b/locale/de/all @@ -1407,7 +1407,7 @@ $self->{texts} = { 'Proforma Invoice' => 'Proformarechnung', 'Program' => 'Programm', 'Project' => 'Projekt', - 'Project Description' => '', + 'Project Description' => 'Projektbeschreibung', 'Project Number' => 'Projektnummer', 'Project Number missing!' => 'Projektnummer fehlt!', 'Project Numbers' => 'Projektnummern', @@ -1655,6 +1655,7 @@ $self->{texts} = { 'Step 3 of 3: Default units' => 'Schritt 3 von 3: Standardeinheiten', 'Steuersatz' => 'Steuersatz', 'Stock' => 'Einlagern', + 'Stock Qty for Date' => 'Lagerbestand am', 'Stock value' => 'Bestandswert', 'Stocked Qty' => 'Lagermenge', 'Storno' => 'Storno', diff --git a/templates/webpages/ic/search.html b/templates/webpages/ic/search.html index ff9f0b77e..c679f0f8b 100644 --- a/templates/webpages/ic/search.html +++ b/templates/webpages/ic/search.html @@ -92,6 +92,8 @@ + + diff --git a/templates/webpages/wh/report_filter.html b/templates/webpages/wh/report_filter.html index affe4c265..a5cbe12d8 100644 --- a/templates/webpages/wh/report_filter.html +++ b/templates/webpages/wh/report_filter.html @@ -1,4 +1,5 @@ [%- USE T8 %] +[%- USE L %] [% USE HTML %][% USE JavaScript %]