View | Details | Raw Unified | Return to bug 8037
Collapse All | Expand All

(-)a/C4/Reserves.pm (-2 / +1 lines)
Lines 278-284 sub GetReservesFromBiblionumber { Link Here
278
    my ($biblionumber) = shift or return (0, []);
278
    my ($biblionumber) = shift or return (0, []);
279
    my ($all_dates) = shift;
279
    my ($all_dates) = shift;
280
    my ($itemnumber) = shift;
280
    my ($itemnumber) = shift;
281
    warn "ITEMNUMBER: $itemnumber";
282
    my $dbh   = C4::Context->dbh;
281
    my $dbh   = C4::Context->dbh;
283
282
284
    # Find the desired items in the reserves
283
    # Find the desired items in the reserves
Lines 303-309 sub GetReservesFromBiblionumber { Link Here
303
        WHERE biblionumber = ? ";
302
        WHERE biblionumber = ? ";
304
    push( @params, $biblionumber );
303
    push( @params, $biblionumber );
305
    unless ( $all_dates ) {
304
    unless ( $all_dates ) {
306
        $query .= " AND reservedate <= CURRENT_DATE() ";
305
        $query .= " AND reservedate <= CAST(NOW() AS DATE) ";
307
    }
306
    }
308
    if ( $itemnumber ) {
307
    if ( $itemnumber ) {
309
        $query .= " AND ( itemnumber IS NULL OR itemnumber = ? )";
308
        $query .= " AND ( itemnumber IS NULL OR itemnumber = ? )";
(-)a/t/db_dependent/Budgets.t (-1 / +4 lines)
Lines 92-97 ok($budget_id=AddBudget( Link Here
92
#| budget_owner_id        | int(11)       | YES  |     | NULL              |       | 
92
#| budget_owner_id        | int(11)       | YES  |     | NULL              |       | 
93
#| budget_permission      | int(1)        | YES  |     | 0                 |       | 
93
#| budget_permission      | int(1)        | YES  |     | 0                 |       | 
94
94
95
C4::Context::dbh->do('INSERT INTO aqorders ( ordernumber, budget_id ) VALUES ( 987654321, ? )', {}, ( $budget_id ) );
96
ok( GetBudgetByOrderNumber( '987654321' )->{'budget_id'} eq $budget_id, "GetBudgetByOrderNumber returns valid data" );
97
C4::Context::dbh->do('DELETE FROM aqorders WHERE ordernumber = 987654321');
98
95
my $budget;
99
my $budget;
96
ok($budget=GetBudget($budget_id) ,"GetBudget OK");
100
ok($budget=GetBudget($budget_id) ,"GetBudget OK");
97
$$budget{budget_permission}=1;
101
$$budget{budget_permission}=1;
98
- 

Return to bug 8037