=head2 GetBooksellersWithLateOrders
-%results = GetBooksellersWithLateOrders($delay);
+%results = GetBooksellersWithLateOrders( $delay, $estimateddeliverydatefrom, $estimateddeliverydateto );
Searches for suppliers with late orders.
=cut
sub GetBooksellersWithLateOrders {
- my ( $delay, $branch, $estimateddeliverydatefrom, $estimateddeliverydateto ) = @_; # FIXME: Branch argument unused.
+ my ( $delay, $estimateddeliverydatefrom, $estimateddeliverydateto ) = @_;
my $dbh = C4::Context->dbh;
# FIXME NOT quite sure that this operation is valid for DBMs different from Mysql, HOPING so
sub ModBookseller {
my ($data) = @_;
my $dbh = C4::Context->dbh;
+ return unless $data->{'id'};
my $query = 'UPDATE aqbooksellers
SET name=?,address1=?,address2=?,address3=?,address4=?,
postal=?,phone=?,accountnumber=?,fax=?,url=?,contact=?,contpos=?,
discount=?,notes=?,gstrate=?,deliverytime=?
WHERE id=?';
my $sth = $dbh->prepare($query);
- $sth->execute(
+ return $sth->execute(
$data->{'name'}, $data->{'address1'},
$data->{'address2'}, $data->{'address3'},
$data->{'address4'}, $data->{'postal'},
$data->{deliverytime},
$data->{'id'}
);
- return;
}
=head2 DelBookseller
my $id = shift;
my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare('DELETE FROM aqbooksellers WHERE id=?');
- $sth->execute($id);
- return;
+ return $sth->execute($id);
}
1;