my $dbh = C4::Context->dbh;
my $query = "SELECT * FROM aqbooksellers WHERE name LIKE ?";
my $sth =$dbh->prepare($query);
- $sth->execute( "$searchstring%" );
+ $sth->execute( "%$searchstring%" );
my @results;
# count how many baskets this bookseller has.
# if it has none, the bookseller can be deleted
postal, phone, fax, url, contact,
contpos, contphone, contfax, contaltphone, contemail,
contnotes, active, listprice, invoiceprice, gstreg,
- listincgst,invoiceincgst, specialty, discount, invoicedisc,
- nocalc, notes
+ listincgst,invoiceincgst, discount,
+ notes
)
- VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
+ VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
";
my $sth = $dbh->prepare($query);
$sth->execute(
$data->{'active'}, $data->{'listprice'},
$data->{'invoiceprice'}, $data->{'gstreg'},
$data->{'listincgst'}, $data->{'invoiceincgst'},
- $data->{'specialty'}, $data->{'discount'},
- $data->{'invoicedisc'}, $data->{'nocalc'},
- $data->{'notes'}
+ $data->{'discount'}, $data->{'notes'}
);
# return the id of this new supplier
The entry to modify is determined by C<$bookseller-E<gt>{id}>.
The easiest way to get all of the necessary fields is to look up a
-book seller with C<&booksellers>, modify what's necessary, then call
-C<&ModSupplier> with the result.
+book seller with C<&GetBookseller>, modify what's necessary, then call
+C<&ModBookseller> with the result.
=cut
postal=?,phone=?,fax=?,url=?,contact=?,contpos=?,
contphone=?,contfax=?,contaltphone=?,contemail=?,
contnotes=?,active=?,listprice=?, invoiceprice=?,
- gstreg=?, listincgst=?,invoiceincgst=?,
- specialty=?,discount=?,invoicedisc=?,nocalc=?, notes=?
+ gstreg=?,listincgst=?,invoiceincgst=?,
+ discount=?, notes=?, gstrate=?
WHERE id=?
";
my $sth = $dbh->prepare($query);
$data->{'active'}, $data->{'listprice'},
$data->{'invoiceprice'}, $data->{'gstreg'},
$data->{'listincgst'}, $data->{'invoiceincgst'},
- $data->{'specialty'}, $data->{'discount'},
- $data->{'invoicedisc'}, $data->{'nocalc'},
- $data->{'notes'}, $data->{'id'}
+ $data->{'discount'},
+ $data->{'notes'}, $data->{'gstrate'},
+ $data->{'id'}
);
$sth->finish;
}