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

(-)a/C4/Circulation.pm (-4 / +4 lines)
Lines 1634-1640 sub GetBranchItemRule { Link Here
1634
=head2 AddReturn
1634
=head2 AddReturn
1635
1635
1636
  ($doreturn, $messages, $iteminformation, $borrower) =
1636
  ($doreturn, $messages, $iteminformation, $borrower) =
1637
      &AddReturn($barcode, $branch, $exemptfine, $dropbox, $returndate);
1637
      &AddReturn( $barcode, $branch [,$exemptfine] [,$dropbox] [,$returndate] );
1638
1638
1639
Returns a book.
1639
Returns a book.
1640
1640
Lines 1645-1660 Returns a book. Link Here
1645
=item C<$branch> is the code of the branch where the book is being returned.
1645
=item C<$branch> is the code of the branch where the book is being returned.
1646
1646
1647
=item C<$exemptfine> indicates that overdue charges for the item will be
1647
=item C<$exemptfine> indicates that overdue charges for the item will be
1648
removed.
1648
removed. Optional.
1649
1649
1650
=item C<$dropbox> indicates that the check-in date is assumed to be
1650
=item C<$dropbox> indicates that the check-in date is assumed to be
1651
yesterday, or the last non-holiday as defined in C4::Calendar .  If
1651
yesterday, or the last non-holiday as defined in C4::Calendar .  If
1652
overdue charges are applied and C<$dropbox> is true, the last charge
1652
overdue charges are applied and C<$dropbox> is true, the last charge
1653
will be removed.  This assumes that the fines accrual script has run
1653
will be removed.  This assumes that the fines accrual script has run
1654
for _today_.
1654
for _today_. Optional.
1655
1655
1656
=item C<$return_date> allows the default return date to be overridden
1656
=item C<$return_date> allows the default return date to be overridden
1657
by the given return date.
1657
by the given return date. Optional.
1658
1658
1659
=back
1659
=back
1660
1660
(-)a/t/db_dependent/Circulation_issue.t (-2 / +11 lines)
Lines 10-16 use C4::Circulation; Link Here
10
use C4::Items;
10
use C4::Items;
11
use C4::Context;
11
use C4::Context;
12
12
13
use Test::More tests => 25;
13
use Test::More tests => 27;
14
14
15
BEGIN {
15
BEGIN {
16
    use_ok('C4::Circulation');
16
    use_ok('C4::Circulation');
Lines 331-336 is_deeply( Link Here
331
    "With issuing rules (renewal allowed, 1 remaining) and with a valid parameter, Getrenewcount of item1 returns 0 renews left"
331
    "With issuing rules (renewal allowed, 1 remaining) and with a valid parameter, Getrenewcount of item1 returns 0 renews left"
332
);
332
);
333
333
334
$dbh->do("TRUNCATE TABLE old_issues");
335
AddReturn('barcode_1');
336
my $return = $dbh->selectrow_hashref("SELECT DATE(returndate) AS return_date, CURRENT_DATE() AS today FROM old_issues LIMIT 1" );
337
ok( $return->{return_date} eq $return->{today}, "Item returned with no return date specified has todays date" );
338
339
$dbh->do("TRUNCATE TABLE old_issues");
340
C4::Circulation::AddIssue( $borrower_1, 'barcode_1', $daysago10, 0, $today );
341
AddReturn('barcode_1', undef, undef, undef, '2014-04-01 23:42');
342
$return = $dbh->selectrow_hashref("SELECT * FROM old_issues LIMIT 1" );
343
ok( $return->{returndate} eq '2014-04-01 23:42:00', "Item returned with a return date of '2014-04-01 23:42' has that return date" );
334
344
335
#End transaction
345
#End transaction
336
$dbh->rollback;
346
$dbh->rollback;
337
- 

Return to bug 10694