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

(-)a/C4/Circulation.pm (-32 / +21 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 809-814 sub CanBookBeIssued { Link Here
809
794
810
    my $onsite_checkout     = $params->{onsite_checkout}     || 0;
795
    my $onsite_checkout     = $params->{onsite_checkout}     || 0;
811
    my $override_high_holds = $params->{override_high_holds} || 0;
796
    my $override_high_holds = $params->{override_high_holds} || 0;
797
    my $issueconfirmed      = $params->{issueconfirmed}      || 0;
812
798
813
    my $item_object = $params->{item};
799
    my $item_object = $params->{item};
814
    if ( !$item_object and $barcode ) {
800
    if ( !$item_object and $barcode ) {
Lines 834-840 sub CanBookBeIssued { Link Here
834
820
835
    my $now = dt_from_string();
821
    my $now = dt_from_string();
836
    my $message;
822
    my $message;
837
    my @message;
823
    my @message_log;
838
824
839
    $duedate ||= CalcDateDue( $now, $effective_itemtype, $circ_library->branchcode, $patron );
825
    $duedate ||= CalcDateDue( $now, $effective_itemtype, $circ_library->branchcode, $patron );
840
826
Lines 846-852 sub CanBookBeIssued { Link Here
846
            } else {
832
            } else {
847
                $message = "sticky due date is invalid or due date in the past";
833
                $message = "sticky due date is invalid or due date in the past";
848
            }
834
            }
849
            push( @message, "sticky due date is invalid or due date in the past" );
835
            push( @message_log, "sticky due date is invalid or due date in the past" );
850
        }
836
        }
851
837
852
    }
838
    }
Lines 900-906 sub CanBookBeIssued { Link Here
900
            } else {
886
            } else {
901
                $message = "borrower is restricted";
887
                $message = "borrower is restricted";
902
            }
888
            }
903
            push( @message, "borrower is restricted" );
889
            push( @message_log, "borrower is restricted" );
904
        }
890
        }
905
    }
891
    }
906
892
Lines 980-986 sub CanBookBeIssued { Link Here
980
                } else {
966
                } else {
981
                    $message = "borrower had amend";
967
                    $message = "borrower had amend";
982
                }
968
                }
983
                push( @message, "borrower had amend" );
969
                push( @message_log, "borrower had amend" );
984
            }
970
            }
985
        } elsif ( $patron_borrowing_status->{noissuescharge}->{overlimit} && !$allowfineoverride ) {
971
        } elsif ( $patron_borrowing_status->{noissuescharge}->{overlimit} && !$allowfineoverride ) {
986
            $issuingimpossible{DEBT} = $patron_borrowing_status->{noissuescharge}->{charge};
972
            $issuingimpossible{DEBT} = $patron_borrowing_status->{noissuescharge}->{charge};
Lines 992-998 sub CanBookBeIssued { Link Here
992
                } else {
978
                } else {
993
                    $message = "borrower had amend";
979
                    $message = "borrower had amend";
994
                }
980
                }
995
                push( @message, "borrower had amend" );
981
                push( @message_log, "borrower had amend" );
996
            }
982
            }
997
        }
983
        }
998
    }
984
    }
Lines 1080-1086 sub CanBookBeIssued { Link Here
1080
                    } else {
1066
                    } else {
1081
                        $message = "item is checked out for someone else";
1067
                        $message = "item is checked out for someone else";
1082
                    }
1068
                    }
1083
                    push( @message, "item is checked out for someone else" );
1069
                    push( @message_log, "item is checked out for someone else" );
1084
                }
1070
                }
1085
            }
1071
            }
1086
        }
1072
        }
Lines 1115-1121 sub CanBookBeIssued { Link Here
1115
                } else {
1101
                } else {
1116
                    $message = "too many checkout";
1102
                    $message = "too many checkout";
1117
                }
1103
                }
1118
                push( @message, "too many checkout" );
1104
                push( @message_log, "too many checkout" );
1119
            }
1105
            }
1120
        } else {
1106
        } else {
1121
            $issuingimpossible{TOO_MANY}                  = $toomany->{reason};
1107
            $issuingimpossible{TOO_MANY}                  = $toomany->{reason};
Lines 1150-1156 sub CanBookBeIssued { Link Here
1150
                } else {
1136
                } else {
1151
                    $message = "item not for loan";
1137
                    $message = "item not for loan";
1152
                }
1138
                }
1153
                push( @message, "item not for loan" );
1139
                push( @message_log, "item not for loan" );
1154
            }
1140
            }
1155
        }
1141
        }
1156
    } else {
1142
    } else {
Lines 1203-1209 sub CanBookBeIssued { Link Here
1203
            } else {
1189
            } else {
1204
                $message = "item lost";
1190
                $message = "item lost";
1205
            }
1191
            }
1206
            push( @message, "item lost" );
1192
            push( @message_log, "item lost" );
1207
        }
1193
        }
1208
    }
1194
    }
1209
    if ( C4::Context->preference("IndependentBranches") ) {
1195
    if ( C4::Context->preference("IndependentBranches") ) {
Lines 1313-1319 sub CanBookBeIssued { Link Here
1313
                        } else {
1299
                        } else {
1314
                            $message = "item is on reserve and waiting, but has been reserved by some other patron.";
1300
                            $message = "item is on reserve and waiting, but has been reserved by some other patron.";
1315
                        }
1301
                        }
1316
                        push( @message, "item is on reserve and waiting, but has been reserved by some other patron" );
1302
                        push(
1303
                            @message_log,
1304
                            "item is on reserve and waiting, but has been reserved by some other patron"
1305
                        );
1317
                    }
1306
                    }
1318
                } elsif ( $restype eq "Reserved" ) {
1307
                } elsif ( $restype eq "Reserved" ) {
1319
1308
Lines 1333-1339 sub CanBookBeIssued { Link Here
1333
                        } else {
1322
                        } else {
1334
                            $message = "item is on reserve for someone else";
1323
                            $message = "item is on reserve for someone else";
1335
                        }
1324
                        }
1336
                        push( @message, "item is on reserve for someone else" );
1325
                        push( @message_log, "item is on reserve for someone else" );
1337
                    }
1326
                    }
1338
                } elsif ( $restype eq "Transferred" ) {
1327
                } elsif ( $restype eq "Transferred" ) {
1339
1328
Lines 1353-1359 sub CanBookBeIssued { Link Here
1353
                        } else {
1342
                        } else {
1354
                            $message = "item is determined hold being transferred for someone else";
1343
                            $message = "item is determined hold being transferred for someone else";
1355
                        }
1344
                        }
1356
                        push( @message, "item is determined hold being transferred for someone else" );
1345
                        push( @message_log, "item is determined hold being transferred for someone else" );
1357
                    }
1346
                    }
1358
                } elsif ( $restype eq "Processing" ) {
1347
                } elsif ( $restype eq "Processing" ) {
1359
1348
Lines 1373-1379 sub CanBookBeIssued { Link Here
1373
                        } else {
1362
                        } else {
1374
                            $message = "item is determined hold being processed for someone else";
1363
                            $message = "item is determined hold being processed for someone else";
1375
                        }
1364
                        }
1376
                        push( @message, "item is determined hold being processed for someone else" );
1365
                        push( @message_log, "item is determined hold being processed for someone else" );
1377
                    }
1366
                    }
1378
                }
1367
                }
1379
            }
1368
            }
Lines 1423-1429 sub CanBookBeIssued { Link Here
1423
            } else {
1412
            } else {
1424
                $message = "age restriction";
1413
                $message = "age restriction";
1425
            }
1414
            }
1426
            push( @message, "age restriction" );
1415
            push( @message_log, "age restriction" );
1427
        } else {
1416
        } else {
1428
            $issuingimpossible{AGE_RESTRICTION} = "$agerestriction";
1417
            $issuingimpossible{AGE_RESTRICTION} = "$agerestriction";
1429
        }
1418
        }
Lines 1493-1499 sub CanBookBeIssued { Link Here
1493
1482
1494
        my $infos = (
1483
        my $infos = (
1495
            {
1484
            {
1496
                message        => \@message,
1485
                message        => \@message_log,
1497
                borrowernumber => $borrower->borrowernumber,
1486
                borrowernumber => $borrower->borrowernumber,
1498
                barcode        => $barcode,
1487
                barcode        => $barcode,
1499
                manager_id     => $user,
1488
                manager_id     => $user,
Lines 1511-1517 sub CanBookBeIssued { Link Here
1511
        ) if C4::Context->preference("IssueLog");
1500
        ) if C4::Context->preference("IssueLog");
1512
    }
1501
    }
1513
1502
1514
    return ( \%issuingimpossible, \%needsconfirmation, \%alerts, \%messages, );
1503
    return ( \%issuingimpossible, \%needsconfirmation, \%alerts, \%messages, \@message_log );
1515
}
1504
}
1516
1505
1517
=head2 CanBookBeReturned
1506
=head2 CanBookBeReturned
Lines 4122-4128 sub SendCirculationAlert { Link Here
4122
4111
4123
  $items = updateWrongTransfer($itemNumber,$borrowernumber,$waitingAtLibrary,$FromLibrary);
4112
  $items = updateWrongTransfer($itemNumber,$borrowernumber,$waitingAtLibrary,$FromLibrary);
4124
4113
4125
This function validate the line of brachtransfer but with the wrong destination (mistake from a librarian ...), and create a new line in branchtransfer from the actual library to the original library of reservation 
4114
This function validate the line of brachtransfer but with the wrong destination (mistake from a librarian ...), and create a new line in branchtransfer from the actual library to the original library of reservation
4126
4115
4127
=cut
4116
=cut
4128
4117
(-)a/circ/circulation.pl (-1 / +1 lines)
Lines 348-353 if ( @$barcodes && $op eq 'cud-checkout' ) { Link Here
348
                {
348
                {
349
                    onsite_checkout     => $onsite_checkout,
349
                    onsite_checkout     => $onsite_checkout,
350
                    override_high_holds => $override_high_holds || $override_high_holds_tmp || 0,
350
                    override_high_holds => $override_high_holds || $override_high_holds_tmp || 0,
351
                    issueconfirmed      => $issueconfirmed,
351
                }
352
                }
352
            );
353
            );
353
        } catch {
354
        } catch {
354
- 

Return to bug 9762