From 7bad0cfe52a5aba07d47bbaf850d2233e7b90e8c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 31 Aug 2009 18:04:07 +0200 Subject: [PATCH] Bugfix: Mnge wurde nicht korrekt auf onhand gemappt. --- SL/IC.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SL/IC.pm b/SL/IC.pm index c9511b4db..0ce8ff492 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -944,9 +944,6 @@ sub all_parts { push @bsooqr_tokens, q|module = 'oe' AND quotation AND cv = 'vendor'| if $form->{rfq}; push @where_tokens, join ' OR ', map { "($_)" } @bsooqr_tokens if $bsooqr; - $renamed_columns{onhand} = 'onhand_before_bsooqr'; - $renamed_columns{qty} = 'onhand'; - $joins_needed{partsgroup} = 1; $joins_needed{pfac} = 1; $joins_needed{makemodel} = 1 if grep { $form->{$_} || $form->{"l_$_"} } @makemodel_filters; @@ -954,6 +951,12 @@ sub all_parts { $joins_needed{apoe} = 1 if $joins_needed{cv} || grep { $form->{$_} || $form->{"l_$_"} } @apoe_filters; $joins_needed{invoice_oi} = 1 if $joins_needed{apoe} || grep { $form->{$_} || $form->{"l_$_"} } @invoice_oi_filters; + # in bsoorq, use qtys instead of onhand + if ($joins_needed{invoice_oi}) { + $renamed_columns{onhand} = 'onhand_before_bsooqr'; + $renamed_columns{qty} = 'onhand'; + } + # special case for description search. # up in the simple filter section the description filter got interpreted as something like: WHERE description ILIKE '%$form->{description}%' # now we'd like to search also for the masked description entered in orderitems and invoice, so... -- 2.20.1