]> wagnertech.de Git - mfinanz.git/blobdiff - SL/IS.pm
PriceSource: Dokufix
[mfinanz.git] / SL / IS.pm
index a1542850f8ecc1bc42eb4dd3aee56c46af1d6e9c..cc3ce370a28c03941433ef33d1c08ae37329a6bc 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -1316,7 +1316,6 @@ sub transfer_out {
                                                        $form->{"id_$i"},
                                                        $form->{"qty_$i"},
                                                        $form->{"unit_$i"});
-
     if (!@{ $err } && $wh_id && $bin_id) {
       push @transfers, {
         'parts_id'         => $form->{"id_$i"},
@@ -1353,7 +1352,7 @@ sub _determine_wh_and_bin {
   # ignore service if they are not configured to be transfered
   if ($part->is_service && !$conf->get_transfer_default_services) {
     $::lxdebug->leave_sub(2);
-    return;
+    return (\@errors);
   }
 
   # test negative qty
@@ -1377,14 +1376,14 @@ sub _determine_wh_and_bin {
                                                       parts_id => $part->id,
                                                       bin_id   => $bin_id);
     if ($error == 1) {
-      push @errors, $::locale->text("Part \"#1\" has chargenumber or best before date set. So it cannot be transfered automaticaly.",
+      push @errors, $::locale->text('Part "#1" has chargenumber or best before date set. So it cannot be transfered automaticaly.',
                                     $part->description);
     }
     my $form_unit_obj = SL::DB::Unit->new(name => $unit)->load;
     my $part_unit_qty = $form_unit_obj->convert_to($qty, $part->unit_obj);
     my $diff_qty      = $max_qty - $part_unit_qty;
     if (!@errors && $diff_qty < 0) {
-      push @errors, $::locale->text("For part \"#1\" there are missing #2 #3 in the default warehouse/bin \"#4/#5\"",
+      push @errors, $::locale->text('For part "#1" there are missing #2 #3 in the default warehouse/bin "#4/#5".',
                                     $part->description,
                                     $::form->format_amount(\%::myconfig, -1*$diff_qty),
                                     $part->unit_obj->name,
@@ -1392,7 +1391,7 @@ sub _determine_wh_and_bin {
                                     SL::DB::Bin->new(      id => $bin_id)->load->description);
     }
   } else {
-    push @errors, $::locale->text("For part \"#1\" there is no default warehouse and bin defined.",
+    push @errors, $::locale->text('For part "#1" there is no default warehouse and bin defined.',
                                   $part->description);
   }
 
@@ -1403,7 +1402,7 @@ sub _determine_wh_and_bin {
     if ($wh_id && $bin_id) {
       @errors = ();
     } else {
-      push @errors, $::locale->text("For part \"#1\" there is no default warehouse and bin for ignoring onhand defined.",
+      push @errors, $::locale->text('For part "#1" there is no default warehouse and bin for ignoring onhand defined.',
                                     $part->description);
     }
   }