Merge branch 'master' of github.com:kivitendo/kivitendo-erp
authorJan Büren <jan@kivitendo-premium.de>
Tue, 10 Mar 2015 17:03:38 +0000 (18:03 +0100)
committerJan Büren <jan@kivitendo-premium.de>
Tue, 10 Mar 2015 17:03:38 +0000 (18:03 +0100)
SL/DO.pm
SL/IS.pm
bin/mozilla/do.pl
templates/webpages/client_config/_warehouse.html

index 17876e5..3b69819 100644 (file)
--- a/SL/DO.pm
+++ b/SL/DO.pm
@@ -298,7 +298,7 @@ SQL
 
     CVar->get_non_editable_ic_cvars(form               => $form,
                                     dbh                => $dbh,
-                                    row                => $i, 
+                                    row                => $i,
                                     sub_module         => 'delivery_order_items',
                                     may_converted_from => ['orderitems', 'delivery_order_items']);
 
@@ -1008,7 +1008,7 @@ sub order_details {
 
     CVar->get_non_editable_ic_cvars(form               => $form,
                                     dbh                => $dbh,
-                                    row                => $i, 
+                                    row                => $i,
                                     sub_module         => 'delivery_order_items',
                                     may_converted_from => ['orderitems', 'delivery_order_items']);
 
@@ -1190,6 +1190,7 @@ sub transfer_in_out {
       'transfer_type'                 => $params{direction} eq 'in' ? 'stock' : 'shipped',
       'project_id'                    => $request->{project_id},
       'delivery_order_items_stock_id' => $request->{delivery_order_items_stock_id},
+      'comment'                       => $request->{comment},
     };
   }
 
index a41ec01..30570c0 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -375,7 +375,7 @@ sub invoice_details {
 
       CVar->get_non_editable_ic_cvars(form               => $form,
                                       dbh                => $dbh,
-                                      row                => $i, 
+                                      row                => $i,
                                       sub_module         => 'invoice',
                                       may_converted_from => ['delivery_order_items', 'orderitems', 'invoice']);
 
@@ -761,7 +761,7 @@ sub post_invoice {
 
       CVar->get_non_editable_ic_cvars(form               => $form,
                                       dbh                => $dbh,
-                                      row                => $i, 
+                                      row                => $i,
                                       sub_module         => 'invoice',
                                       may_converted_from => ['delivery_order_items', 'orderitems', 'invoice']);
 
@@ -1298,7 +1298,7 @@ SQL
 sub transfer_out {
   $::lxdebug->enter_sub;
 
-  my ($self, $form, $dbh) = @_; 
+  my ($self, $form, $dbh) = @_;
 
   my (@errors, @transfers);
 
@@ -1316,7 +1316,7 @@ sub transfer_out {
                                                        $form->{"id_$i"},
                                                        $form->{"qty_$i"},
                                                        $form->{"unit_$i"});
-
+    next if ($err eq 'ignore service');
     if (!@{ $err } && $wh_id && $bin_id) {
       push @transfers, {
         'parts_id'         => $form->{"id_$i"},
@@ -1327,6 +1327,7 @@ sub transfer_out {
         'src_bin_id'       => $bin_id,
         'project_id'       => $form->{"project_id_$i"},
         'invoice_id'       => $form->{"invoice_id_$i"},
+        'comment'          => $::locale->text("Default transfer invoice"),
       };
     }
 
@@ -1352,7 +1353,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 'ignore service';
   }
 
   # test negative qty
@@ -1384,7 +1385,7 @@ sub _determine_wh_and_bin {
     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\"",
-                                    $part->description, 
+                                    $part->description,
                                     $::form->format_amount(\%::myconfig, -1*$diff_qty),
                                     $part->unit_obj->name,
                                     SL::DB::Warehouse->new(id => $wh_id)->load->description,
index e3c192a..aae537f 100644 (file)
@@ -1599,8 +1599,7 @@ sub transfer_in_out_default {
                         'bin_id' => $part_info_map{$form->{"id_$i"}}{bin_id},
                         'qty' => $qty,
                         'parts_id' => $form->{"id_$i"},
-                        'comment' => 'Default transfer DO',
-                        'ok' => 1,
+                        'comment' => $locale->text("Default transfer delivery order"),
                         'unit' => $part_info_map{$form->{"id_$i"}}{unit},
                         'warehouse_id' => $part_info_map{$form->{"id_$i"}}{warehouse_id},
                         'oe_id' => $form->{id},
index 18df06d..b8854d1 100644 (file)
   </tr>
 
  <tr>
-   <td align="right" nowrap="true">[% LxERP.t8('Default Warehouse with ignoring on hand') %]</td>
+   <td align="right" nowrap="true">[% LxERP.t8('Default Warehouse with ignoring onhand') %]</td>
    <td>
     [% L.select_tag('defaults.warehouse_id_ignore_onhand', SELF.all_warehouses, id='warehouse_id_ignore_onhand', with_empty=1, default=SELF.defaults.warehouse_id_ignore_onhand, title_key='description',
                     onchange="warehouse_selected(this.selectedIndex == 0 ? -1 : warehouses[this.selectedIndex - 1].id, -1, 'bin_id_ignore_onhand')") %]
    </td>
    <td>
-    [% LxERP.t8('This is the default bin for ignoring onhand') %]<br>
-    [% LxERP.t8('If the default transfer out always succeed use this bin for negative stock quantity.') %]<br>
+    [% LxERP.t8('This is the default warehouse for ignoring onhand') %]<br>
    </td>
   </tr>
   <tr>
    <td align="right" nowrap="true">[% LxERP.t8('Default Bin with ignoring onhand') %]</td>
    <td>[% L.select_tag('defaults.bin_id_ignore_onhand', [], id='bin_id_ignore_onhand', with_empty=1) %]</td>
+   <td>[% LxERP.t8('If the default transfer out always succeed use this bin for negative stock quantity.') %]</td>
   </tr>
-
   <tr><td colspan="3"><hr /></td></tr>
   <tr>
    <td align="right">[% LxERP.t8('Transfer out on posting sales invoices?') %]</td>
@@ -81,7 +80,6 @@
    [% LxERP.t8('Transfer out all items of a sales invoice when posting it. Items are transfered out acording to the settings above.') %]
    </td>
   </tr>
-
   <tr><td colspan="3"><hr /></td></tr>
   <tr>
   <tr>
    [% LxERP.t8('The default delivery plan only checks if all delivery orders have been created not if the goods are transferred. This feature will check if all the goods are transferred. Caveat: Only the state of the delivery orders are checked not partial transferred delivery orders (in technical terms: the table inventory is not checked') %]
    </td>
   </tr>
-
  </table>
 </div>