From e9e60985f22a94e8148cd5bbac281d31721f4f7c Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 17 Jan 2017 13:44:59 +0100 Subject: [PATCH] =?utf8?q?Lager:=20Einlagernfunktionalit=C3=A4t=20aus=20wh?= =?utf8?q?.pl=20entfernt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Diese wird inzwischen von SL::Controller::Inventory zur Verfügung gestellt. --- bin/mozilla/wh.pl | 85 ---------- locale/de/all | 1 - .../wh/warehouse_selection_stock.html | 148 ------------------ 3 files changed, 234 deletions(-) delete mode 100644 templates/webpages/wh/warehouse_selection_stock.html diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index 8b69306bb..e64224aa8 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -112,10 +112,6 @@ sub transfer_warehouse_selection { $form->{title} = $locale->text('Removal from Warehouse'); $content = $form->parse_html_template('wh/warehouse_selection'); - } elsif ($form->{trans_type} eq 'stock') { - $form->{title} = $locale->text('Stock'); - $content = $form->parse_html_template('wh/warehouse_selection_stock'); - } elsif (!$form->{trans_type} || ($form->{trans_type} eq 'transfer')) { $form->{nextsub} = "transfer_parts_selection"; $form->{title} = $locale->text('Transfer'); @@ -308,46 +304,6 @@ sub transfer_parts { # Transfer: stock # -------------------------------------------------------------------- -sub transfer_stock_update_part { - $main::lxdebug->enter_sub(); - - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; - - $form->{trans_type} = 'stock'; - $form->{qty} = $form->parse_amount(\%myconfig, $form->{qty}); - - if (!$form->{partnumber} && !$form->{description} && !$form->{ean}) { - delete @{$form}{qw(parts_id partunit ean)}; - transfer_warehouse_selection(); - - } elsif (($form->{partnumber} && ($form->{partnumber} ne $form->{old_partnumber})) || $form->{description} || $form->{ean}) { - -# $form->{no_services} = 1; # services may now be transfered. fix for Bug 1383. - $form->{no_assemblies} = 0; # assemblies duerfen eingelagert werden (z.B. bei retouren) - - my $parts = Common->retrieve_parts(\%myconfig, $form, 'description', 1); - - if (!scalar @{ $parts }) { - new_item(action => "transfer_stock_update_part"); - } elsif (scalar @{ $parts } == 1) { - @{$form}{qw(parts_id partnumber description ean warehouse_id bin_id)} = @{$parts->[0]}{qw(id partnumber description ean warehouse_id bin_id)}; - transfer_stock_get_partunit(); - transfer_warehouse_selection(); - - } else { - select_part('transfer_stock_part_selected', @{ $parts }); - } - - } else { - transfer_stock_get_partunit(); - transfer_warehouse_selection(); - } - - $main::lxdebug->leave_sub(); -} - # -------------------------------------------------------------------- # Transfer: assemblies # Dies ist die Auswahlmaske für ein assembly. @@ -486,47 +442,6 @@ sub create_assembly { $main::lxdebug->leave_sub(); } -sub transfer_stock { - $main::lxdebug->enter_sub(); - - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; - - $form->{qty} = $form->parse_amount(\%myconfig, $form->{qty}); - - if ($form->{qty} <= 0) { - $form->show_generic_error($locale->text('Invalid quantity.')); - } - - if (!$form->{warehouse_id} || !$form->{bin_id}) { - $form->error($locale->text('The warehouse or the bin is missing.')); - } - - my $transfer = { - 'transfer_type' => 'stock', - 'dst_warehouse_id' => $form->{warehouse_id}, - 'dst_bin_id' => $form->{bin_id}, - 'chargenumber' => $form->{chargenumber}, - 'bestbefore' => $form->{bestbefore}, - 'parts_id' => $form->{parts_id}, - 'qty' => $form->{qty}, - 'unit' => $form->{unit}, - 'comment' => $form->{comment}, - }; - - WH->transfer($transfer); - - delete @{$form}{qw(parts_id partnumber description qty unit chargenumber bestbefore comment ean)}; - - $form->{saved_message} = $locale->text('The parts have been stocked.'); - $form->{trans_type} = 'stock'; - - transfer_warehouse_selection(); - - $main::lxdebug->leave_sub(); -} - # -------------------------------------------------------------------- # Transfer: removal # -------------------------------------------------------------------- diff --git a/locale/de/all b/locale/de/all index 820ed2d66..da4278f9d 100755 --- a/locale/de/all +++ b/locale/de/all @@ -3009,7 +3009,6 @@ $self->{texts} = { 'The parts for this delivery order have already been transferred in.' => 'Die Artikel dieses Lieferscheins wurden bereits eingelagert.', 'The parts for this delivery order have already been transferred out.' => 'Die Artikel dieses Lieferscheins wurden bereits ausgelagert.', 'The parts have been removed.' => 'Die Waren wurden aus dem Lager entnommen.', - 'The parts have been stocked.' => 'Die Artikel wurden eingelagert.', 'The parts have been transferred.' => 'Die Waren wurden umgelagert.', 'The partsgroup has been created.' => 'Die Warengruppe wurde erstellt.', 'The partsgroup has been deleted.' => 'Die Warengruppe wurde gelöscht.', diff --git a/templates/webpages/wh/warehouse_selection_stock.html b/templates/webpages/wh/warehouse_selection_stock.html deleted file mode 100644 index d77f8c5e2..000000000 --- a/templates/webpages/wh/warehouse_selection_stock.html +++ /dev/null @@ -1,148 +0,0 @@ -[%- USE T8 %] -[%- USE L %] -[%- USE HTML %][%- USE JavaScript %][%- USE LxERP %] -

[% title %]

- - - - - -
- - - - - [% IF saved_message %] -

[% saved_message %]

- [% END %] - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - [% IF INSTANCE_CONF.get_show_bestbefore %] - - - - - [% END %] - - - - - - - - - - - - - - - - -
[% 'Destination warehouse' | $T8 %] - -
[% 'Destination bin' | $T8 %]:
[% 'Part Number' | $T8 %] - - - -
[% 'Part Description' | $T8 %] - - -
[% 'Charge number' | $T8 %]
[% 'Best Before' | $T8 %] - [% L.date_tag('bestbefore', bestbefore) %] -
[% 'EAN' | $T8 %]
[% 'Quantity' | $T8 %] - - -
[% 'Optional comment' | $T8 %]
-

- -

- - [%- IF parts_id %] - - [%- END %] -

-
- -- 2.20.1