Lines 600-605
EOF
Link Here
|
600 |
plan tests => 2; |
600 |
plan tests => 2; |
601 |
|
601 |
|
602 |
my $code = 'ISSUESLIP'; |
602 |
my $code = 'ISSUESLIP'; |
|
|
603 |
my $now = dt_from_string; |
604 |
my $one_minute_ago = dt_from_string->subtract( minutes => 1 ); |
603 |
|
605 |
|
604 |
my $branchcode = $library->{branchcode}; |
606 |
my $branchcode = $library->{branchcode}; |
605 |
|
607 |
|
Lines 647-656
EOF
Link Here
|
647 |
|
649 |
|
648 |
reset_template( { template => $template, code => $code, module => 'circulation' } ); |
650 |
reset_template( { template => $template, code => $code, module => 'circulation' } ); |
649 |
|
651 |
|
650 |
C4::Circulation::AddIssue( $patron, $item1->{barcode} ); # Add a first checkout |
652 |
my $checkout = C4::Circulation::AddIssue( $patron, $item1->{barcode} ); # Add a first checkout |
|
|
653 |
$checkout->set_columns( { timestamp => $now, issuedate => $one_minute_ago } )->update; # FIXME $checkout is a Koha::Schema::Result::Issues, must be a Koha::Checkout |
651 |
my $first_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
654 |
my $first_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
652 |
|
655 |
|
653 |
C4::Circulation::AddIssue( $patron, $item2->{barcode} ); # Add a second checkout |
656 |
$checkout = C4::Circulation::AddIssue( $patron, $item2->{barcode} ); # Add a second checkout |
|
|
657 |
$checkout->set_columns( { timestamp => $now, issuedate => $now } )->update; |
654 |
my $yesterday = dt_from_string->subtract( days => 1 ); |
658 |
my $yesterday = dt_from_string->subtract( days => 1 ); |
655 |
C4::Circulation::AddIssue( $patron, $item3->{barcode}, $yesterday ); # Add an overdue |
659 |
C4::Circulation::AddIssue( $patron, $item3->{barcode}, $yesterday ); # Add an overdue |
656 |
my $second_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
660 |
my $second_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
Lines 705-714
EOF
Link Here
|
705 |
|
709 |
|
706 |
reset_template( { template => $tt_template, code => $code, module => 'circulation' } ); |
710 |
reset_template( { template => $tt_template, code => $code, module => 'circulation' } ); |
707 |
|
711 |
|
708 |
C4::Circulation::AddIssue( $patron, $item1->{barcode} ); # Add a first checkout |
712 |
$checkout = C4::Circulation::AddIssue( $patron, $item1->{barcode} ); # Add a first checkout |
|
|
713 |
$checkout->set_columns( { timestamp => $now, issuedate => $one_minute_ago } )->update; |
709 |
my $first_tt_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
714 |
my $first_tt_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
710 |
|
715 |
|
711 |
C4::Circulation::AddIssue( $patron, $item2->{barcode} ); # Add a second checkout |
716 |
$checkout = C4::Circulation::AddIssue( $patron, $item2->{barcode} ); # Add a second checkout |
|
|
717 |
$checkout->set_columns( { timestamp => $now, issuedate => $now } )->update; |
712 |
C4::Circulation::AddIssue( $patron, $item3->{barcode}, $yesterday ); # Add an overdue |
718 |
C4::Circulation::AddIssue( $patron, $item3->{barcode}, $yesterday ); # Add an overdue |
713 |
my $second_tt_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
719 |
my $second_tt_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
714 |
|
720 |
|
715 |
- |
|
|