Lines 65-71
sub GetBookSeller {
Link Here
|
65 |
$searchstring = q{%} . $searchstring . q{%}; |
65 |
$searchstring = q{%} . $searchstring . q{%}; |
66 |
my $query = |
66 |
my $query = |
67 |
'select aqbooksellers.*, count(*) as basketcount from aqbooksellers left join aqbasket ' |
67 |
'select aqbooksellers.*, count(*) as basketcount from aqbooksellers left join aqbasket ' |
68 |
. 'on aqbasket.booksellerid = aqbooksellers.id where name lIke ? group by aqbooksellers.id order by name'; |
68 |
. 'on aqbasket.booksellerid = aqbooksellers.id where name like ? group by aqbooksellers.id order by name'; |
69 |
|
69 |
|
70 |
my $dbh = C4::Context->dbh; |
70 |
my $dbh = C4::Context->dbh; |
71 |
my $sth = $dbh->prepare($query); |
71 |
my $sth = $dbh->prepare($query); |
Lines 141-160
sub AddBookseller {
Link Here
|
141 |
INSERT INTO aqbooksellers |
141 |
INSERT INTO aqbooksellers |
142 |
( |
142 |
( |
143 |
name, address1, address2, address3, address4, |
143 |
name, address1, address2, address3, address4, |
144 |
postal, phone, fax, url, contact, |
144 |
postal, phone, accountnumber, fax, url, |
|
|
145 |
contact, |
145 |
contpos, contphone, contfax, contaltphone, contemail, |
146 |
contpos, contphone, contfax, contaltphone, contemail, |
146 |
contnotes, active, listprice, invoiceprice, gstreg, |
147 |
contnotes, active, listprice, invoiceprice, gstreg, |
147 |
listincgst,invoiceincgst, gstrate, discount, |
148 |
listincgst,invoiceincgst, gstrate, discount, |
148 |
notes |
149 |
notes |
149 |
) |
150 |
) |
150 |
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) | |
151 |
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) | |
151 |
; |
152 |
; |
152 |
my $sth = $dbh->prepare($query); |
153 |
my $sth = $dbh->prepare($query); |
153 |
$sth->execute( |
154 |
$sth->execute( |
154 |
$data->{'name'}, $data->{'address1'}, |
155 |
$data->{'name'}, $data->{'address1'}, |
155 |
$data->{'address2'}, $data->{'address3'}, |
156 |
$data->{'address2'}, $data->{'address3'}, |
156 |
$data->{'address4'}, $data->{'postal'}, |
157 |
$data->{'address4'}, $data->{'postal'}, |
157 |
$data->{'phone'}, $data->{'fax'}, |
158 |
$data->{'phone'}, $data->{'accountnumber'}, |
|
|
159 |
$data->{'fax'}, |
158 |
$data->{'url'}, $data->{'contact'}, |
160 |
$data->{'url'}, $data->{'contact'}, |
159 |
$data->{'contpos'}, $data->{'contphone'}, |
161 |
$data->{'contpos'}, $data->{'contphone'}, |
160 |
$data->{'contfax'}, $data->{'contaltphone'}, |
162 |
$data->{'contfax'}, $data->{'contaltphone'}, |
Lines 192-198
sub ModBookseller {
Link Here
|
192 |
my $dbh = C4::Context->dbh; |
194 |
my $dbh = C4::Context->dbh; |
193 |
my $query = 'UPDATE aqbooksellers |
195 |
my $query = 'UPDATE aqbooksellers |
194 |
SET name=?,address1=?,address2=?,address3=?,address4=?, |
196 |
SET name=?,address1=?,address2=?,address3=?,address4=?, |
195 |
postal=?,phone=?,fax=?,url=?,contact=?,contpos=?, |
197 |
postal=?,phone=?,accountnumber=?,fax=?,url=?,contact=?,contpos=?, |
196 |
contphone=?,contfax=?,contaltphone=?,contemail=?, |
198 |
contphone=?,contfax=?,contaltphone=?,contemail=?, |
197 |
contnotes=?,active=?,listprice=?, invoiceprice=?, |
199 |
contnotes=?,active=?,listprice=?, invoiceprice=?, |
198 |
gstreg=?,listincgst=?,invoiceincgst=?, |
200 |
gstreg=?,listincgst=?,invoiceincgst=?, |
Lines 203-209
sub ModBookseller {
Link Here
|
203 |
$data->{'name'}, $data->{'address1'}, |
205 |
$data->{'name'}, $data->{'address1'}, |
204 |
$data->{'address2'}, $data->{'address3'}, |
206 |
$data->{'address2'}, $data->{'address3'}, |
205 |
$data->{'address4'}, $data->{'postal'}, |
207 |
$data->{'address4'}, $data->{'postal'}, |
206 |
$data->{'phone'}, $data->{'fax'}, |
208 |
$data->{'phone'}, $data->{'accountnumber'}, |
|
|
209 |
$data->{'fax'}, |
207 |
$data->{'url'}, $data->{'contact'}, |
210 |
$data->{'url'}, $data->{'contact'}, |
208 |
$data->{'contpos'}, $data->{'contphone'}, |
211 |
$data->{'contpos'}, $data->{'contphone'}, |
209 |
$data->{'contfax'}, $data->{'contaltphone'}, |
212 |
$data->{'contfax'}, $data->{'contaltphone'}, |