From: Sven Schöling Date: Mon, 27 Feb 2012 13:21:56 +0000 (+0100) Subject: Lieferadressen bei Kundenwechsel nicht leaken lassen. X-Git-Tag: release-2.7.0~10 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=752fd6ad6e059ac1e890ed463e02cad29a646d14;p=kivitendo-erp.git Lieferadressen bei Kundenwechsel nicht leaken lassen. Fix zu Bug 1823. Achtung, es gibt noch ein Szenario was nicht erkannt wird: Wenn die Lieferadresse im originalen Kunden gelöscht wurde, und somit keinem Kunden mehr zugewordnet ist, wird nicht erkannt dass diese Lieferadresse nicht zum zweiten Kunden gehört (wie auch) und nicht gelöscht. Gleiches Problem auch bei Ansprechpartnern. --- diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index ccc5f2b13..d18378aea 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -280,7 +280,7 @@ sub form_header { $::form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]); $::form->{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); $::form->{ALL_SHIPTO} = SL::DB::Manager::Shipto->get_all(query => [ - or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, shipto_id => $::form->{shipto_id} * 1 ] + or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, and => [ shipto_id => $::form->{shipto_id} * 1, trans_id => undef ] ] ]); $::form->{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all(query => [ or => [ diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 9c6cd67a5..d99d1eb37 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -312,7 +312,7 @@ sub form_header { $TMPL_VAR{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]); $TMPL_VAR{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); $TMPL_VAR{ALL_SHIPTO} = SL::DB::Manager::Shipto->get_all(query => [ - or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, shipto_id => $::form->{shipto_id} * 1 ] + or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, and => [ shipto_id => $::form->{shipto_id} * 1, trans_id => undef ] ] ]); $TMPL_VAR{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all(query => [ or => [ diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 39ec0eb2f..c1b281c6b 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -342,7 +342,7 @@ sub form_header { $TMPL_VAR{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]); $TMPL_VAR{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); $TMPL_VAR{ALL_SHIPTO} = SL::DB::Manager::Shipto->get_all(query => [ - or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, shipto_id => $::form->{shipto_id} * 1 ] + or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, and => [ shipto_id => $::form->{shipto_id} * 1, trans_id => undef ] ] ]); $TMPL_VAR{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all(query => [ or => [