Bugzilla – Attachment 7890 Details for
Bug 7606
Editing a vendor in acq creates a new vendor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7606: Editing a vendor in acq creates a new vendor
Bug-7606-Editing-a-vendor-in-acq-creates-a-new-ven.patch (text/plain), 2.54 KB, created by
Katrin Fischer
on 2012-02-26 14:19:23 UTC
(
hide
)
Description:
Bug 7606: Editing a vendor in acq creates a new vendor
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2012-02-26 14:19:23 UTC
Size:
2.54 KB
patch
obsolete
>From f452ab897b65d2e3f3e52d8207cc18875064e81a Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >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 >--- > acqui/updatesupplier.pl | 10 +++++----- > .../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 3e79362..844e504 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 d4bfe72..05b7fac 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 ) %] > <form action="updatesupplier.pl" name="updatesupplier" method="post"> > <div class="yui-g"> >- <input type="hidden" name="id" value="[% booksellerid %]" /> >+ <input type="hidden" name="booksellerid" value="[% booksellerid %]" /> > <fieldset class="rows"> > <legend>Company details</legend> > <ol><li><label for="company" class="required">Name * </label> >-- >1.7.5.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7606
:
7890
|
7894