Lines 653-663
EOF
Link Here
|
653 |
reset_template( { template => $template, code => $code, module => 'circulation' } ); |
653 |
reset_template( { template => $template, code => $code, module => 'circulation' } ); |
654 |
|
654 |
|
655 |
my $checkout = C4::Circulation::AddIssue( $patron, $item1->{barcode} ); # Add a first checkout |
655 |
my $checkout = C4::Circulation::AddIssue( $patron, $item1->{barcode} ); # Add a first checkout |
656 |
$checkout->set_columns( { timestamp => $now, issuedate => $one_minute_ago } )->update; # FIXME $checkout is a Koha::Schema::Result::Issues, must be a Koha::Checkout |
656 |
$checkout->set( { timestamp => $now, issuedate => $one_minute_ago } )->store; |
657 |
my $first_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
657 |
my $first_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
658 |
|
658 |
|
659 |
$checkout = C4::Circulation::AddIssue( $patron, $item2->{barcode} ); # Add a second checkout |
659 |
$checkout = C4::Circulation::AddIssue( $patron, $item2->{barcode} ); # Add a second checkout |
660 |
$checkout->set_columns( { timestamp => $now, issuedate => $now } )->update; |
660 |
$checkout->set( { timestamp => $now, issuedate => $now } )->store; |
661 |
my $yesterday = dt_from_string->subtract( days => 1 ); |
661 |
my $yesterday = dt_from_string->subtract( days => 1 ); |
662 |
C4::Circulation::AddIssue( $patron, $item3->{barcode}, $yesterday ); # Add an overdue |
662 |
C4::Circulation::AddIssue( $patron, $item3->{barcode}, $yesterday ); # Add an overdue |
663 |
my $second_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
663 |
my $second_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
Lines 713-723
EOF
Link Here
|
713 |
reset_template( { template => $tt_template, code => $code, module => 'circulation' } ); |
713 |
reset_template( { template => $tt_template, code => $code, module => 'circulation' } ); |
714 |
|
714 |
|
715 |
$checkout = C4::Circulation::AddIssue( $patron, $item1->{barcode} ); # Add a first checkout |
715 |
$checkout = C4::Circulation::AddIssue( $patron, $item1->{barcode} ); # Add a first checkout |
716 |
$checkout->set_columns( { timestamp => $now, issuedate => $one_minute_ago } )->update; |
716 |
$checkout->set( { timestamp => $now, issuedate => $one_minute_ago } )->store; |
717 |
my $first_tt_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
717 |
my $first_tt_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
718 |
|
718 |
|
719 |
$checkout = C4::Circulation::AddIssue( $patron, $item2->{barcode} ); # Add a second checkout |
719 |
$checkout = C4::Circulation::AddIssue( $patron, $item2->{barcode} ); # Add a second checkout |
720 |
$checkout->set_columns( { timestamp => $now, issuedate => $now } )->update; |
720 |
$checkout->set( { timestamp => $now, issuedate => $now } )->store; |
721 |
C4::Circulation::AddIssue( $patron, $item3->{barcode}, $yesterday ); # Add an overdue |
721 |
C4::Circulation::AddIssue( $patron, $item3->{barcode}, $yesterday ); # Add an overdue |
722 |
my $second_tt_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
722 |
my $second_tt_slip = C4::Members::IssueSlip( $branchcode, $patron->{borrowernumber} ); |
723 |
|
723 |
|
Lines 776-784
EOF
Link Here
|
776 |
my $issue1 = C4::Circulation::AddIssue( $patron, $item1->{barcode} ); # Add a first checkout |
776 |
my $issue1 = C4::Circulation::AddIssue( $patron, $item1->{barcode} ); # Add a first checkout |
777 |
my $issue2 = C4::Circulation::AddIssue( $patron, $item2->{barcode}, $yesterday ); # Add an first overdue |
777 |
my $issue2 = C4::Circulation::AddIssue( $patron, $item2->{barcode}, $yesterday ); # Add an first overdue |
778 |
my $issue3 = C4::Circulation::AddIssue( $patron, $item3->{barcode}, $two_days_ago ); # Add an second overdue |
778 |
my $issue3 = C4::Circulation::AddIssue( $patron, $item3->{barcode}, $two_days_ago ); # Add an second overdue |
779 |
$issue1 = Koha::Checkout->_new_from_dbic( $issue1 )->unblessed; # ->unblessed should be enough but AddIssue does not return a Koha::Checkout object |
779 |
$issue1 = $issue1->unblessed; |
780 |
$issue2 = Koha::Checkout->_new_from_dbic( $issue2 )->unblessed; |
780 |
$issue2 = $issue2->unblessed; |
781 |
$issue3 = Koha::Checkout->_new_from_dbic( $issue3 )->unblessed; |
781 |
$issue3 = $issue3->unblessed; |
782 |
|
782 |
|
783 |
# For items.content |
783 |
# For items.content |
784 |
my @item_fields = qw( date_due title barcode author itemnumber ); |
784 |
my @item_fields = qw( date_due title barcode author itemnumber ); |
785 |
- |
|
|