|
Lines 1665-1670
sub SearchOrders {
Link Here
|
| 1665 |
my $basketgroupname = $params->{basketgroupname}; |
1665 |
my $basketgroupname = $params->{basketgroupname}; |
| 1666 |
my $owner = $params->{owner}; |
1666 |
my $owner = $params->{owner}; |
| 1667 |
my $pending = $params->{pending}; |
1667 |
my $pending = $params->{pending}; |
|
|
1668 |
my $ordered = $params->{ordered}; |
| 1668 |
|
1669 |
|
| 1669 |
my $dbh = C4::Context->dbh; |
1670 |
my $dbh = C4::Context->dbh; |
| 1670 |
my @args = (); |
1671 |
my @args = (); |
|
Lines 1690-1698
sub SearchOrders {
Link Here
|
| 1690 |
WHERE (datecancellationprinted is NULL) |
1691 |
WHERE (datecancellationprinted is NULL) |
| 1691 |
}; |
1692 |
}; |
| 1692 |
|
1693 |
|
| 1693 |
$query .= q{ |
1694 |
if ( $pending ) { |
| 1694 |
AND (quantity > quantityreceived OR quantityreceived is NULL) |
1695 |
$query .= q{ AND (quantity > quantityreceived OR quantityreceived is NULL)}; |
| 1695 |
} if $pending; |
1696 |
} |
|
|
1697 |
if ( $ordered ) { |
| 1698 |
$query .= q{ AND (quantity > quantityreceived OR quantityreceived is NULL)} |
| 1699 |
unless $pending; |
| 1700 |
$query .= q{ AND aqorders.orderstatus IN ( "ordered", "partial" )}; |
| 1701 |
} |
| 1696 |
|
1702 |
|
| 1697 |
my $userenv = C4::Context->userenv; |
1703 |
my $userenv = C4::Context->userenv; |
| 1698 |
if ( C4::Context->preference("IndependentBranches") ) { |
1704 |
if ( C4::Context->preference("IndependentBranches") ) { |