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

(-)a/C4/Reserves.pm (-2 / +1 lines)
Lines 257-263 sub GetReservesFromBiblionumber { Link Here
257
    my ($biblionumber) = shift or return (0, []);
257
    my ($biblionumber) = shift or return (0, []);
258
    my ($all_dates) = shift;
258
    my ($all_dates) = shift;
259
    my ($itemnumber) = shift;
259
    my ($itemnumber) = shift;
260
    warn "ITEMNUMBER: $itemnumber";
261
    my $dbh   = C4::Context->dbh;
260
    my $dbh   = C4::Context->dbh;
262
261
263
    # Find the desired items in the reserves
262
    # Find the desired items in the reserves
Lines 281-287 sub GetReservesFromBiblionumber { Link Here
281
        WHERE biblionumber = ? ";
280
        WHERE biblionumber = ? ";
282
    push( @params, $biblionumber );
281
    push( @params, $biblionumber );
283
    unless ( $all_dates ) {
282
    unless ( $all_dates ) {
284
        $query .= " AND reservedate <= CURRENT_DATE() ";
283
        $query .= " AND reservedate <= CAST(NOW() AS DATE) ";
285
    }
284
    }
286
    if ( $itemnumber ) {
285
    if ( $itemnumber ) {
287
        $query .= " AND ( itemnumber IS NULL OR itemnumber = ? )";
286
        $query .= " AND ( itemnumber IS NULL OR itemnumber = ? )";
(-)a/t/db_dependent/Budgets.t (-1 / +4 lines)
Lines 85-90 ok($budget_id=AddBudget( Link Here
85
#| budget_owner_id        | int(11)       | YES  |     | NULL              |       | 
85
#| budget_owner_id        | int(11)       | YES  |     | NULL              |       | 
86
#| budget_permission      | int(1)        | YES  |     | 0                 |       | 
86
#| budget_permission      | int(1)        | YES  |     | 0                 |       | 
87
87
88
C4::Context::dbh->do('INSERT INTO aqorders ( ordernumber, budget_id ) VALUES ( 987654321, ? )', {}, ( $budget_id ) );
89
ok( GetBudgetByOrderNumber( '987654321' )->{'budget_id'} eq $budget_id, "GetBudgetByOrderNumber returns valid data" );
90
C4::Context::dbh->do('DELETE FROM aqorders WHERE ordernumber = 987654321');
91
88
my $budget;
92
my $budget;
89
ok($budget=GetBudget($budget_id) ,"GetBudget OK");
93
ok($budget=GetBudget($budget_id) ,"GetBudget OK");
90
$$budget{budget_permission}=1;
94
$$budget{budget_permission}=1;
91
- 

Return to bug 8037