From ba5f105a984178770a267da4504f4358662d6ffc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20K=C3=B6hler?= Date: Thu, 24 Nov 2005 15:46:47 +0000 Subject: [PATCH] =?utf8?q?Merge=20von=20578=20aus=20unstable:=20Bug=20Nr?= =?utf8?q?=20190=20geloest.=20Abteilung1=20und=202=20wurden=20bei=20der=20?= =?utf8?q?Lieferadresse=20nicht=20beruecksichtigt=20DB-Schema=20=C3=A4nder?= =?utf8?q?t=20sich!?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Form.pm | 6 +++--- SL/IS.pm | 2 +- sql/Pg-upgrade-2.1.1-2.1.2.sql | 4 ++++ sql/lx-office.sql | 2 ++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/SL/Form.pm b/SL/Form.pm index ebc7e82f8..62a76e710 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1253,7 +1253,7 @@ sub add_shipto { ##LINET my $shipto; foreach - my $item (qw(name street zipcode city country contact phone fax email)) { + my $item (qw(name department_1 department_2 street zipcode city country contact phone fax email)) { if ($self->{"shipto$item"}) { $shipto = 1 if ($self->{$item} ne $self->{"shipto$item"}); } @@ -1261,10 +1261,10 @@ sub add_shipto { } if ($shipto) { - my $query = qq|INSERT INTO shipto (trans_id, shiptoname, shiptostreet, + my $query = qq|INSERT INTO shipto (trans_id, shiptoname, shiptodepartment_1, shiptodepartment_2, shiptostreet, shiptozipcode, shiptocity, shiptocountry, shiptocontact, shiptophone, shiptofax, shiptoemail) VALUES ($id, - '$self->{shiptoname}', '$self->{shiptostreet}', + '$self->{shiptoname}', '$self->{shiptodepartment_1}', '$self->{shiptodepartment_2}', '$self->{shiptostreet}', '$self->{shiptozipcode}', '$self->{shiptocity}', '$self->{shiptocountry}', '$self->{shiptocontact}', '$self->{shiptophone}', '$self->{shiptofax}', diff --git a/SL/IS.pm b/SL/IS.pm index b74a7944b..eac4440ae 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -1357,7 +1357,7 @@ sub get_customer { # get shipto if we did not converted an order or invoice if (!$form->{shipto}) { map { delete $form->{$_} } - qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail); + qw(shiptoname shiptodepartment_1 shiptodepartment_2 shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail); $query = qq|SELECT s.* FROM shipto s WHERE s.trans_id = $form->{customer_id}|; diff --git a/sql/Pg-upgrade-2.1.1-2.1.2.sql b/sql/Pg-upgrade-2.1.1-2.1.2.sql index d6b0ebb0a..476e4020b 100644 --- a/sql/Pg-upgrade-2.1.1-2.1.2.sql +++ b/sql/Pg-upgrade-2.1.1-2.1.2.sql @@ -128,6 +128,10 @@ alter table vendor add column user_password varchar(12); alter table customer add column salesman_id integer; alter table vendor add column salesman_id integer; +-- Shipto +alter table shipto add column shiptodepartment_1 varchar(75); +alter table shipto add column shiptodepartment_2 varchar(75); + -- Addon for business alter table business add column salesman boolean; alter table business alter column salesman set default 'false'; diff --git a/sql/lx-office.sql b/sql/lx-office.sql index d2c0bca27..3be0a8546 100644 --- a/sql/lx-office.sql +++ b/sql/lx-office.sql @@ -417,6 +417,8 @@ CREATE TABLE "employee" ( CREATE TABLE "shipto" ( "trans_id" integer, "shiptoname" character varying(75), + "shiptodepartment_1" character varying(75), + "shiptodepartment_2" character varying(75), "shiptostreet" character varying(75), "shiptozipcode" character varying(75), "shiptocity" character varying(75), -- 2.20.1