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

(-)a/C4/Circulation.pm (-31 / +20 lines)
Lines 321-341 A recall for this item was found, and the item needs to be transferred to the re Link Here
321
321
322
=cut
322
=cut
323
323
324
my $query = CGI->new;
325
326
my $stickyduedate      = $query->param('stickyduedate');
327
my $duedatespec        = $query->param('duedatespec');
328
my $restoreduedatespec = $query->param('restoreduedatespec') || $duedatespec;
329
if ( $restoreduedatespec && $restoreduedatespec eq "highholds_empty" ) {
330
    undef $restoreduedatespec;
331
}
332
my $issueconfirmed = $query->param('issueconfirmed');
333
my $cancelreserve  = $query->param('cancelreserve');
334
my $cancel_recall  = $query->param('cancel_recall');
335
my $recall_id      = $query->param('recall_id');
336
my $debt_confirmed = $query->param('debt_confirmed') || 0;     # Don't show the debt error dialog twice
337
my $charges        = $query->param('charges')        || q{};
338
339
sub transferbook {
324
sub transferbook {
340
    my $params   = shift;
325
    my $params   = shift;
341
    my $tbr      = $params->{to_branch};
326
    my $tbr      = $params->{to_branch};
Lines 815-820 sub CanBookBeIssued { Link Here
815
800
816
    my $onsite_checkout     = $params->{onsite_checkout}     || 0;
801
    my $onsite_checkout     = $params->{onsite_checkout}     || 0;
817
    my $override_high_holds = $params->{override_high_holds} || 0;
802
    my $override_high_holds = $params->{override_high_holds} || 0;
803
    my $issueconfirmed      = $params->{issueconfirmed}      || 0;
818
804
819
    my $item_object = $params->{item};
805
    my $item_object = $params->{item};
820
    if ( !$item_object and $barcode ) {
806
    if ( !$item_object and $barcode ) {
Lines 840-846 sub CanBookBeIssued { Link Here
840
826
841
    my $now = dt_from_string();
827
    my $now = dt_from_string();
842
    my $message;
828
    my $message;
843
    my @message;
829
    my @message_log;
844
830
845
    $duedate ||= CalcDateDue( $now, $effective_itemtype, $circ_library->branchcode, $patron );
831
    $duedate ||= CalcDateDue( $now, $effective_itemtype, $circ_library->branchcode, $patron );
846
832
Lines 852-858 sub CanBookBeIssued { Link Here
852
            } else {
838
            } else {
853
                $message = "sticky due date is invalid or due date in the past";
839
                $message = "sticky due date is invalid or due date in the past";
854
            }
840
            }
855
            push( @message, "sticky due date is invalid or due date in the past" );
841
            push( @message_log, "sticky due date is invalid or due date in the past" );
856
        }
842
        }
857
843
858
    }
844
    }
Lines 906-912 sub CanBookBeIssued { Link Here
906
            } else {
892
            } else {
907
                $message = "borrower is restricted";
893
                $message = "borrower is restricted";
908
            }
894
            }
909
            push( @message, "borrower is restricted" );
895
            push( @message_log, "borrower is restricted" );
910
        }
896
        }
911
    }
897
    }
912
898
Lines 986-992 sub CanBookBeIssued { Link Here
986
                } else {
972
                } else {
987
                    $message = "borrower had amend";
973
                    $message = "borrower had amend";
988
                }
974
                }
989
                push( @message, "borrower had amend" );
975
                push( @message_log, "borrower had amend" );
990
            }
976
            }
991
        } elsif ( $patron_borrowing_status->{noissuescharge}->{overlimit} && !$allowfineoverride ) {
977
        } elsif ( $patron_borrowing_status->{noissuescharge}->{overlimit} && !$allowfineoverride ) {
992
            $issuingimpossible{DEBT} = $patron_borrowing_status->{noissuescharge}->{charge};
978
            $issuingimpossible{DEBT} = $patron_borrowing_status->{noissuescharge}->{charge};
Lines 998-1004 sub CanBookBeIssued { Link Here
998
                } else {
984
                } else {
999
                    $message = "borrower had amend";
985
                    $message = "borrower had amend";
1000
                }
986
                }
1001
                push( @message, "borrower had amend" );
987
                push( @message_log, "borrower had amend" );
1002
            }
988
            }
1003
        }
989
        }
1004
    }
990
    }
Lines 1086-1092 sub CanBookBeIssued { Link Here
1086
                    } else {
1072
                    } else {
1087
                        $message = "item is checked out for someone else";
1073
                        $message = "item is checked out for someone else";
1088
                    }
1074
                    }
1089
                    push( @message, "item is checked out for someone else" );
1075
                    push( @message_log, "item is checked out for someone else" );
1090
                }
1076
                }
1091
            }
1077
            }
1092
        }
1078
        }
Lines 1121-1127 sub CanBookBeIssued { Link Here
1121
                } else {
1107
                } else {
1122
                    $message = "too many checkout";
1108
                    $message = "too many checkout";
1123
                }
1109
                }
1124
                push( @message, "too many checkout" );
1110
                push( @message_log, "too many checkout" );
1125
            }
1111
            }
1126
        } else {
1112
        } else {
1127
            $issuingimpossible{TOO_MANY}                  = $toomany->{reason};
1113
            $issuingimpossible{TOO_MANY}                  = $toomany->{reason};
Lines 1161-1167 sub CanBookBeIssued { Link Here
1161
                } else {
1147
                } else {
1162
                    $message = "item not for loan";
1148
                    $message = "item not for loan";
1163
                }
1149
                }
1164
                push( @message, "item not for loan" );
1150
                push( @message_log, "item not for loan" );
1165
            }
1151
            }
1166
        }
1152
        }
1167
    } else {
1153
    } else {
Lines 1214-1220 sub CanBookBeIssued { Link Here
1214
            } else {
1200
            } else {
1215
                $message = "item lost";
1201
                $message = "item lost";
1216
            }
1202
            }
1217
            push( @message, "item lost" );
1203
            push( @message_log, "item lost" );
1218
        }
1204
        }
1219
    }
1205
    }
1220
    if ( C4::Context->preference("IndependentBranches") ) {
1206
    if ( C4::Context->preference("IndependentBranches") ) {
Lines 1324-1330 sub CanBookBeIssued { Link Here
1324
                        } else {
1310
                        } else {
1325
                            $message = "item is on reserve and waiting, but has been reserved by some other patron.";
1311
                            $message = "item is on reserve and waiting, but has been reserved by some other patron.";
1326
                        }
1312
                        }
1327
                        push( @message, "item is on reserve and waiting, but has been reserved by some other patron" );
1313
                        push(
1314
                            @message_log,
1315
                            "item is on reserve and waiting, but has been reserved by some other patron"
1316
                        );
1328
                    }
1317
                    }
1329
                } elsif ( $restype eq "Reserved" ) {
1318
                } elsif ( $restype eq "Reserved" ) {
1330
1319
Lines 1344-1350 sub CanBookBeIssued { Link Here
1344
                        } else {
1333
                        } else {
1345
                            $message = "item is on reserve for someone else";
1334
                            $message = "item is on reserve for someone else";
1346
                        }
1335
                        }
1347
                        push( @message, "item is on reserve for someone else" );
1336
                        push( @message_log, "item is on reserve for someone else" );
1348
                    }
1337
                    }
1349
                } elsif ( $restype eq "Transferred" ) {
1338
                } elsif ( $restype eq "Transferred" ) {
1350
1339
Lines 1364-1370 sub CanBookBeIssued { Link Here
1364
                        } else {
1353
                        } else {
1365
                            $message = "item is determined hold being transferred for someone else";
1354
                            $message = "item is determined hold being transferred for someone else";
1366
                        }
1355
                        }
1367
                        push( @message, "item is determined hold being transferred for someone else" );
1356
                        push( @message_log, "item is determined hold being transferred for someone else" );
1368
                    }
1357
                    }
1369
                } elsif ( $restype eq "Processing" ) {
1358
                } elsif ( $restype eq "Processing" ) {
1370
1359
Lines 1384-1390 sub CanBookBeIssued { Link Here
1384
                        } else {
1373
                        } else {
1385
                            $message = "item is determined hold being processed for someone else";
1374
                            $message = "item is determined hold being processed for someone else";
1386
                        }
1375
                        }
1387
                        push( @message, "item is determined hold being processed for someone else" );
1376
                        push( @message_log, "item is determined hold being processed for someone else" );
1388
                    }
1377
                    }
1389
                }
1378
                }
1390
            }
1379
            }
Lines 1434-1440 sub CanBookBeIssued { Link Here
1434
            } else {
1423
            } else {
1435
                $message = "age restriction";
1424
                $message = "age restriction";
1436
            }
1425
            }
1437
            push( @message, "age restriction" );
1426
            push( @message_log, "age restriction" );
1438
        } else {
1427
        } else {
1439
            $issuingimpossible{AGE_RESTRICTION} = "$agerestriction";
1428
            $issuingimpossible{AGE_RESTRICTION} = "$agerestriction";
1440
        }
1429
        }
Lines 1504-1510 sub CanBookBeIssued { Link Here
1504
1493
1505
        my $infos = (
1494
        my $infos = (
1506
            {
1495
            {
1507
                message        => \@message,
1496
                message        => \@message_log,
1508
                borrowernumber => $borrower->borrowernumber,
1497
                borrowernumber => $borrower->borrowernumber,
1509
                barcode        => $barcode,
1498
                barcode        => $barcode,
1510
                manager_id     => $user,
1499
                manager_id     => $user,
Lines 1522-1528 sub CanBookBeIssued { Link Here
1522
        ) if C4::Context->preference("IssueLog");
1511
        ) if C4::Context->preference("IssueLog");
1523
    }
1512
    }
1524
1513
1525
    return ( \%issuingimpossible, \%needsconfirmation, \%alerts, \%messages, );
1514
    return ( \%issuingimpossible, \%needsconfirmation, \%alerts, \%messages, \@message_log );
1526
}
1515
}
1527
1516
1528
=head2 CanBookBeReturned
1517
=head2 CanBookBeReturned
(-)a/circ/circulation.pl (-1 / +1 lines)
Lines 349-354 if ( @$barcodes && $op eq 'cud-checkout' ) { Link Here
349
                {
349
                {
350
                    onsite_checkout     => $onsite_checkout,
350
                    onsite_checkout     => $onsite_checkout,
351
                    override_high_holds => $override_high_holds || $override_high_holds_tmp || 0,
351
                    override_high_holds => $override_high_holds || $override_high_holds_tmp || 0,
352
                    issueconfirmed      => $issueconfirmed,
352
                }
353
                }
353
            );
354
            );
354
        } catch {
355
        } catch {
355
- 

Return to bug 9762