From 7fa051d837b497d264bb43bc9ee3e5fc1fadbbd6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Hinderer?= Date: Mon, 27 Jul 2009 10:33:27 +0200 Subject: [PATCH] bug 3440: C4/Branch.pm: the branch{zip,city,country,url,notes} rows should be taken into account during Add and Mod operations. Signed-off-by: Galen Charlton --- C4/Branch.pm | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/C4/Branch.pm b/C4/Branch.pm index 7dfd737245..a6ab59cc80 100644 --- a/C4/Branch.pm +++ b/C4/Branch.pm @@ -199,34 +199,43 @@ sub ModBranch { my $query = " INSERT INTO branches (branchcode,branchname,branchaddress1, - branchaddress2,branchaddress3,branchphone, - branchfax,branchemail,branchip,branchprinter) - VALUES (?,?,?,?,?,?,?,?,?,?) + branchaddress2,branchaddress3,branchzip,branchcity, + branchcountry,branchphone,branchfax,branchemail, + branchurl,branchip,branchprinter,branchnotes) + VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) "; my $sth = $dbh->prepare($query); $sth->execute( $data->{'branchcode'}, $data->{'branchname'}, $data->{'branchaddress1'}, $data->{'branchaddress2'}, - $data->{'branchaddress3'}, $data->{'branchphone'}, - $data->{'branchfax'}, $data->{'branchemail'}, + $data->{'branchaddress3'}, $data->{'branchzip'}, + $data->{'branchcity'}, $data->{'branchcountry'}, + $data->{'branchphone'}, $data->{'branchfax'}, + $data->{'branchemail'}, $data->{'branchurl'}, $data->{'branchip'}, $data->{'branchprinter'}, + $data->{'branchnotes'}, ); return 1 if $dbh->err; } else { my $query = " UPDATE branches SET branchname=?,branchaddress1=?, - branchaddress2=?,branchaddress3=?,branchphone=?, - branchfax=?,branchemail=?,branchip=?,branchprinter=? + branchaddress2=?,branchaddress3=?,branchzip=?, + branchcity=?,branchcountry=?,branchphone=?, + branchfax=?,branchemail=?,branchurl=?,branchip=?, + branchprinter=?,branchnotes=? WHERE branchcode=? "; my $sth = $dbh->prepare($query); $sth->execute( $data->{'branchname'}, $data->{'branchaddress1'}, $data->{'branchaddress2'}, - $data->{'branchaddress3'}, $data->{'branchphone'}, - $data->{'branchfax'}, $data->{'branchemail'}, + $data->{'branchaddress3'}, $data->{'branchzip'}, + $data->{'branchcity'}, $data->{'branchcountry'}, + $data->{'branchphone'}, $data->{'branchfax'}, + $data->{'branchemail'}, $data->{'branchurl'}, $data->{'branchip'}, $data->{'branchprinter'}, + $data->{'branchnotes'}, $data->{'branchcode'}, ); } -- 2.39.5