X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fio.pl;h=c65d742da99bc0ce36f3a0ffaaf7fae058e48a65;hb=cb253140;hp=866e5ec32a05050339a8b9a26e709495764a01af;hpb=9133b2d0676dc5c0d9b00679d80ba5594bc3c168;p=kivitendo-erp.git
diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl
index 866e5ec32..c65d742da 100644
--- a/bin/mozilla/io.pl
+++ b/bin/mozilla/io.pl
@@ -36,6 +36,7 @@
#
#######################################################################
+use Carp;
use CGI;
use CGI::Ajax;
use List::Util qw(min max first);
@@ -437,13 +438,16 @@ sub set_pricegroup {
sub select_item {
$main::lxdebug->enter_sub();
+ my %params = @_;
+
my $form = $main::form;
my %myconfig = %main::myconfig;
my $locale = $main::locale;
my $cgi = $main::cgi;
-# diese variable kommt schon in der methode display_row vor, kann man die besser wiederverwenden? @mb fragen. ich check das jetzt erstmal so ein
- my $is_purchase = (first { $_ eq $form->{type} } qw(request_quotation purchase_order purchase_delivery_order)) || ($form->{script} eq 'ir.pl');
+ my $mode = $params{mode} || croak "Missing parameter 'mode'";
+ my $is_purchase = $mode eq 'IS';
+
_check_io_auth();
my @column_index = qw(ndx partnumber description rop onhand unit sellprice);
@@ -455,10 +459,10 @@ sub select_item {
qq|
| . $locale->text('Part Description') . qq|
|;
$column_data{sellprice} =
qq|
| . $locale->text('Price') . qq|
|;
- if ($is_purchase){
- $column_data{rop} =
- qq|
| . $locale->text('ROP') . qq|
|;
- }# ende if $is_purchase -> Ãberschrift Mindestlagerbestand - ähnliche Prüfung weiter unten
+ if ($is_purchase){
+ $column_data{rop} =
+ qq|
| . $locale->text('ROP') . qq|
|;
+ }# ende if $is_purchase -> Ãberschrift Mindestlagerbestand - ähnliche Prüfung weiter unten
$column_data{onhand} =
qq|
|;
}# ende if $is_purchase -> Falls der Aufruf über eine Einkaufsmaske kam, handelt es sich um einen Lieferantenauftrag und uns interessiert auch die Mindestbestandsmenge
- $column_data{unit} =
- qq|