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;
sum(quantity) AS itemsexpected,
sum(quantityreceived) AS itemsreceived
FROM aqorders LEFT JOIN aqbasket ON aqbasket.basketno = aqorders.basketno
- WHERE aqbasket.booksellerid = $bookseller and datereceived IS NOT NULL
+ WHERE aqbasket.booksellerid = ? and datereceived IS NOT NULL
";
+ push @query_params, $bookseller;
if ( defined $code ) {
$strsth .= ' and aqorders.booksellerinvoicenumber like ? ';
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,
";
OR datereceived IS NULL
OR aqorders.quantityreceived < aqorders.quantity
)
+ AND (aqorders.datecancellationprinted IS NULL OR aqorders.datecancellationprinted='0000-00-00')
";
my $having = "";
if ($dbdriver eq "mysql") {
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;
=head1 AUTHOR
-Koha Development Team <info@koha.org>
+Koha Development Team <http://koha-community.org/>
=cut