ActionBar: Übersetzungen
[kivitendo-erp.git] / SL / DO.pm
index 4ba4828..ed4d2f5 100644 (file)
--- a/SL/DO.pm
+++ b/SL/DO.pm
@@ -25,7 +25,8 @@
 # GNU General Public License for more details.
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1335, USA.
 #======================================================================
 #
 # Delivery Order entry module
@@ -745,15 +746,14 @@ sub retrieve {
     $sth   = prepare_execute_query($form, $dbh, $query, $form->{id});
 
     $ref   = $sth->fetchrow_hashref("NAME_lc");
-    delete $ref->{id};
-    map { $form->{$_} = $ref->{$_} } keys %$ref;
+    $form->{$_} = $ref->{$_} for grep { m{^shipto(?!_id$)} } keys %$ref;
     $sth->finish();
 
-    if ($form->{shipto_id}) {
+    if ($ref->{shipto_id}) {
       my $cvars = CVar->get_custom_variables(
         dbh      => $dbh,
         module   => 'ShipTo',
-        trans_id => $form->{shipto_id},
+        trans_id => $ref->{shipto_id},
       );
       $form->{"shiptocvar_$_->{name}"} = $_->{value} for @{ $cvars };
     }
@@ -779,7 +779,7 @@ sub retrieve {
   # stuff different from the whole will not be overwritten, but saved with a suffix.
   $query =
     qq|SELECT doi.id AS delivery_order_items_id,
-         p.partnumber, p.assembly, p.listprice, doi.description, doi.qty,
+         p.partnumber, p.part_type, p.listprice, doi.description, doi.qty,
          doi.sellprice, doi.parts_id AS id, doi.unit, doi.discount, p.notes AS partnotes,
          doi.reqdate, doi.project_id, doi.serialnumber, doi.lastcost,
          doi.ordnumber, doi.transdate, doi.cusordnumber, doi.longdescription,