my $dbh = C4::Context->dbh;
my $query = "UPDATE aqbasketgroups SET ";
my @params;
- foreach my $field (qw(name billingplace deliveryplace deliverycomment closed)) {
+ foreach my $field (qw(name billingplace deliveryplace freedeliveryplace deliverycomment closed)) {
if ( defined $basketgroupinfo->{$field} ) {
$query .= "$field=?, ";
push(@params, $basketgroupinfo->{$field});
sub GetBasketgroups {
my $booksellerid = shift;
die "bookseller id is required to edit a basketgroup" unless $booksellerid;
- my $query = "SELECT * FROM aqbasketgroups WHERE booksellerid=?";
+ my $query = "SELECT * FROM aqbasketgroups WHERE booksellerid=? ORDER BY `id` DESC";
my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare($query);
$sth->execute($booksellerid);
my $dbh = C4::Context->dbh;
my @params;
+
+ # update uncertainprice to an integer, just in case (under FF, checked boxes have the value "ON" by default)
+ $orderinfo->{uncertainprice}=1 if $orderinfo->{uncertainprice};
+
# delete($orderinfo->{'branchcode'});
# the hash contains a lot of entries not in aqorders, so get the columns ...
my $sth = $dbh->prepare("SELECT * FROM aqorders LIMIT 1;");
my $query = "UPDATE aqorders_items set itemnumber=? where itemnumber=? and ordernumber=?";
my @params = ($orderiteminfo->{'newitemnumber'}, $orderiteminfo->{'itemnumber'}, $orderiteminfo->{'ordernumber'});
- warn $query;
- warn Data::Dumper::Dumper(@params);
my $sth = $dbh->prepare($query);
$sth->execute(@params);
return 0;
aqbudgets.budget_name AS budget,
borrowers.branchcode AS branch,
aqbooksellers.name AS supplier,
- biblio.author,
+ biblio.author, biblio.title,
biblioitems.publishercode AS publisher,
biblioitems.publicationyear,
";
if ( defined $title ) {
$query .= " AND biblio.title LIKE ? ";
+ $title =~ s/\s+/%/g;
push @query_params, "%$title%";
}
}
}
$query .= " ORDER BY id";
- warn $query;
my $sth = $dbh->prepare($query);
$sth->execute( @query_params );
my $cnt = 1;