Lines 819-825
sub GetBasketgroups {
Link Here
|
819 |
|
819 |
|
820 |
=head3 GetPendingOrders |
820 |
=head3 GetPendingOrders |
821 |
|
821 |
|
822 |
$orders = &GetPendingOrders($supplierid,$grouped,$owner,$basketno,$ordernumber,$search,$ean); |
822 |
$orders = &GetPendingOrders($supplierid,$grouped,$owner,$basketno,$ordernumber,$search,$ean,$basketgroupno); |
823 |
|
823 |
|
824 |
Finds pending orders from the bookseller with the given ID. Ignores |
824 |
Finds pending orders from the bookseller with the given ID. Ignores |
825 |
completed and cancelled orders. |
825 |
completed and cancelled orders. |
Lines 845-851
Results are ordered from most to least recent.
Link Here
|
845 |
=cut |
845 |
=cut |
846 |
|
846 |
|
847 |
sub GetPendingOrders { |
847 |
sub GetPendingOrders { |
848 |
my ($supplierid,$grouped,$owner,$basketno,$ordernumber,$search,$ean) = @_; |
848 |
my ($supplierid,$grouped,$owner,$basketno,$ordernumber,$search,$ean,$basketgroupno) = @_; |
849 |
my $dbh = C4::Context->dbh; |
849 |
my $dbh = C4::Context->dbh; |
850 |
my $strsth = " |
850 |
my $strsth = " |
851 |
SELECT ".($grouped?"count(*),":"")."aqbasket.basketno, |
851 |
SELECT ".($grouped?"count(*),":"")."aqbasket.basketno, |
Lines 892-897
sub GetPendingOrders {
Link Here
|
892 |
$strsth .= " AND aqbasket.authorisedby=? "; |
892 |
$strsth .= " AND aqbasket.authorisedby=? "; |
893 |
push @query_params, $userenv->{'number'}; |
893 |
push @query_params, $userenv->{'number'}; |
894 |
} |
894 |
} |
|
|
895 |
if ($basketgroupno) { |
896 |
$strsth .= " AND aqbasket.basketgroupid=? "; |
897 |
push @query_params, $basketgroupno; |
898 |
} |
895 |
$strsth .= " group by aqbasket.basketno" if $grouped; |
899 |
$strsth .= " group by aqbasket.basketno" if $grouped; |
896 |
$strsth .= " order by aqbasket.basketno"; |
900 |
$strsth .= " order by aqbasket.basketno"; |
897 |
my $sth = $dbh->prepare($strsth); |
901 |
my $sth = $dbh->prepare($strsth); |