Merge remote-tracking branch 'origin/new/bug_3388'
This commit is contained in:
commit
c0e1984981
|
|
@ -65,7 +65,7 @@ sub GetBookSeller {
|
|||
$searchstring = q{%} . $searchstring . q{%};
|
||||
my $query =
|
||||
'select aqbooksellers.*, count(*) as basketcount from aqbooksellers left join aqbasket '
|
||||
. 'on aqbasket.booksellerid = aqbooksellers.id where name lIke ? group by aqbooksellers.id order by name';
|
||||
. 'on aqbasket.booksellerid = aqbooksellers.id where name like ? group by aqbooksellers.id order by name';
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $sth = $dbh->prepare($query);
|
||||
|
|
@ -141,20 +141,22 @@ sub AddBookseller {
|
|||
INSERT INTO aqbooksellers
|
||||
(
|
||||
name, address1, address2, address3, address4,
|
||||
postal, phone, fax, url, contact,
|
||||
postal, phone, accountnumber, fax, url,
|
||||
contact,
|
||||
contpos, contphone, contfax, contaltphone, contemail,
|
||||
contnotes, active, listprice, invoiceprice, gstreg,
|
||||
listincgst,invoiceincgst, gstrate, discount,
|
||||
notes
|
||||
)
|
||||
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) |
|
||||
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) |
|
||||
;
|
||||
my $sth = $dbh->prepare($query);
|
||||
$sth->execute(
|
||||
$data->{'name'}, $data->{'address1'},
|
||||
$data->{'address2'}, $data->{'address3'},
|
||||
$data->{'address4'}, $data->{'postal'},
|
||||
$data->{'phone'}, $data->{'fax'},
|
||||
$data->{'phone'}, $data->{'accountnumber'},
|
||||
$data->{'fax'},
|
||||
$data->{'url'}, $data->{'contact'},
|
||||
$data->{'contpos'}, $data->{'contphone'},
|
||||
$data->{'contfax'}, $data->{'contaltphone'},
|
||||
|
|
@ -192,7 +194,7 @@ sub ModBookseller {
|
|||
my $dbh = C4::Context->dbh;
|
||||
my $query = 'UPDATE aqbooksellers
|
||||
SET name=?,address1=?,address2=?,address3=?,address4=?,
|
||||
postal=?,phone=?,fax=?,url=?,contact=?,contpos=?,
|
||||
postal=?,phone=?,accountnumber=?,fax=?,url=?,contact=?,contpos=?,
|
||||
contphone=?,contfax=?,contaltphone=?,contemail=?,
|
||||
contnotes=?,active=?,listprice=?, invoiceprice=?,
|
||||
gstreg=?,listincgst=?,invoiceincgst=?,
|
||||
|
|
@ -203,7 +205,8 @@ sub ModBookseller {
|
|||
$data->{'name'}, $data->{'address1'},
|
||||
$data->{'address2'}, $data->{'address3'},
|
||||
$data->{'address4'}, $data->{'postal'},
|
||||
$data->{'phone'}, $data->{'fax'},
|
||||
$data->{'phone'}, $data->{'accountnumber'},
|
||||
$data->{'fax'},
|
||||
$data->{'url'}, $data->{'contact'},
|
||||
$data->{'contpos'}, $data->{'contphone'},
|
||||
$data->{'contfax'}, $data->{'contaltphone'},
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ if ( $op eq 'display' ) {
|
|||
address3 => $supplier->{'address3'},
|
||||
address4 => $supplier->{'address4'},
|
||||
phone => $supplier->{'phone'},
|
||||
accountnumber => $supplier->{'accountnumber'},
|
||||
fax => $supplier->{'fax'},
|
||||
url => $supplier->{'url'},
|
||||
contact => $supplier->{'contact'},
|
||||
|
|
@ -152,6 +153,7 @@ if ( $op eq 'display' ) {
|
|||
address3 => $supplier->{'address3'},
|
||||
address4 => $supplier->{'address4'},
|
||||
phone => $supplier->{'phone'},
|
||||
accountnumber=> $supplier->{'accountnumber'},
|
||||
fax => $supplier->{'fax'},
|
||||
url => $supplier->{'url'},
|
||||
contact => $supplier->{'contact'},
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ $data{'address2'}=$addresses[1];
|
|||
$data{'address3'}=$addresses[2];
|
||||
$data{'address4'}=$addresses[3];
|
||||
$data{'phone'}=$input->param('company_phone');
|
||||
$data{'accountnumber'}=$input->param('accountnumber');
|
||||
$data{'fax'}=$input->param('company_fax');
|
||||
$data{'url'}=$input->param('website');
|
||||
$data{'contact'}=$input->param('company_contact_name');
|
||||
|
|
|
|||
|
|
@ -53,7 +53,9 @@ if (f.company.value == "") {
|
|||
<li><label for="company_fax">Fax</label>
|
||||
<input type="text" size="20" id="company_fax" name="company_fax" value="[% fax %]" /></li>
|
||||
<li><label for="website">Website</label>
|
||||
<input type="text" size="40" id="website" name="website" value="[% url %]" /></li></ol>
|
||||
<input type="text" size="40" id="website" name="website" value="[% url %]" /></li>
|
||||
<li><label for="accountnumber">Account number</label>
|
||||
<input type="text" size="40" id="accountnumber" name="accountnumber" value="[% accountnumber %]" /></li></ol>
|
||||
</fieldset>
|
||||
<fieldset class="rows">
|
||||
<legend>Contact details</legend>
|
||||
|
|
@ -136,7 +138,7 @@ if (f.company.value == "") {
|
|||
<input type="text" size="6" id="discount" name="discount" value="[% discount %]" />%</li>
|
||||
<li><label for="gstrate">Tax rate</label><input type="text" name="gstrate" id="gstrate" size="6" value="[% gstrate %]"/>% (leave blank for default tax of [% default_gst_rate %]%)</li>
|
||||
<li><label for="notes">Notes</label>
|
||||
<textarea cols="40" rows="4" id="notes" name="notes" >[% notes %]</textarea></li></ol>
|
||||
<textarea cols="40" rows="4" id="notes" name="notes" >[% notes %]</textarea></li></ol>
|
||||
</fieldset>
|
||||
<fieldset class="action"><input type="button" value="Save" onclick="check(this.form);" /> [% IF ( id ) %]
|
||||
<a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% id %]">[% ELSE %]<a class="cancel" href="/cgi-bin/koha/acqui/acqui-home.pl">
|
||||
|
|
@ -154,7 +156,10 @@ if (f.company.value == "") {
|
|||
<p><span class="label">Phone: </span>[% phone %]</p>
|
||||
<p><span class="label">Fax: </span>[% fax %]</p>
|
||||
[% IF ( url ) %]
|
||||
<p><span class="label">Web site: </span><a href="[% url %]">[% url %]</a></p>
|
||||
<p><span class="label">Website: </span><a href="[% url %]">[% url %]</a></p>
|
||||
[% END %]
|
||||
[% IF ( accountnumber ) %]
|
||||
<p><span class="label">Account number: </span>[% accountnumber %]</p>
|
||||
[% END %]
|
||||
</div>
|
||||
<div id="supplier-contact-details" class="yui-u">
|
||||
|
|
|
|||
Loading…
Reference in New Issue