From 752fd6ad6e059ac1e890ed463e02cad29a646d14 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 27 Feb 2012 14:21:56 +0100 Subject: [PATCH] Lieferadressen bei Kundenwechsel nicht leaken lassen. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. --- bin/mozilla/do.pl | 2 +- bin/mozilla/is.pl | 2 +- bin/mozilla/oe.pl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 => [ -- 2.20.1