From baec1daa103d72166a1e3040314d2767088b00f1 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 26 Feb 2012 15:14:27 +0100 Subject: [PATCH] Bug 7606: Editing a vendor in acq creates a new vendor To test: Before patch: - editing a new vendor will create a new vendor After patch: - editing a vendor saves changes correctly, no new vendor is created Also: - after saving or cancelling an edit page redirects correctly - adding new vendors works correctly Signed-off-by: Nicole C. Engard Followed test plan and all tests pass. Signed-off-by: Paul Poulain This is a follow-up for 7113 --- acqui/updatesupplier.pl | 10 +++++----- .../intranet-tmpl/prog/en/modules/acqui/supplier.tt | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/acqui/updatesupplier.pl b/acqui/updatesupplier.pl index 3e79362dfd..844e504712 100755 --- a/acqui/updatesupplier.pl +++ b/acqui/updatesupplier.pl @@ -66,10 +66,10 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user( ); #print $input->header(); -my $supplier=$input->param('supplier'); +my $booksellerid=$input->param('booksellerid'); #print startpage; my %data; -$data{'booksellerid'}=$input->param('booksellerid'); +$data{'id'}=$booksellerid; $data{'name'}=$input->param('company'); $data{'postal'}=$input->param('company_postal'); @@ -109,13 +109,13 @@ if ($gstrate eq '') { $data{'discount'}=$input->param('discount'); $data{'active'}=$input->param('status'); if($data{'name'}) { - if ($data{'booksellerid'}){ + if ($data{'id'}){ ModBookseller(\%data); } else { - $data{booksellerid}=AddBookseller(\%data); + $data{id}=AddBookseller(\%data); } #redirect to booksellers.pl -print $input->redirect("booksellers.pl?booksellerid=".$data{booksellerid}); +print $input->redirect("booksellers.pl?booksellerid=".$data{id}); } else { print $input->redirect("supplier.pl?op=enter"); # fail silently. } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt index d4bfe72ce3..05b7fac08c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt @@ -39,7 +39,7 @@ if (f.company.value == "") { [% IF ( enter ) %]
- +
Company details
  1. -- 2.39.5