X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDO.pm;h=ed4d2f516d4bc9314657c3368a18a638afc6cdda;hb=d975f05c964dbc034da664b156744fdb3088c2a0;hp=4ba4828509494fbc07b930efb89fa003bd2095dc;hpb=6b23fb212fb1cee6e1034601d3ceb22a182e50f0;p=kivitendo-erp.git diff --git a/SL/DO.pm b/SL/DO.pm index 4ba482850..ed4d2f516 100644 --- 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,