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

(-)a/C4/Circulation.pm (-4 / +7 lines)
Lines 2938-2951 sub CreateBranchTransferLimit { Link Here
2938
2938
2939
=head2 DeleteBranchTransferLimits
2939
=head2 DeleteBranchTransferLimits
2940
2940
2941
  DeleteBranchTransferLimits();
2941
DeleteBranchTransferLimits($frombranch);
2942
2943
Deletes all the branch transfer limits for one branch
2942
2944
2943
=cut
2945
=cut
2944
2946
2945
sub DeleteBranchTransferLimits {
2947
sub DeleteBranchTransferLimits {
2946
   my $dbh = C4::Context->dbh;
2948
    my $branch = shift;
2947
   my $sth = $dbh->prepare("TRUNCATE TABLE branch_transfer_limits");
2949
    my $dbh    = C4::Context->dbh;
2948
   $sth->execute();
2950
    my $sth    = $dbh->prepare("DELETE FROM branch_transfer_limits WHERE fromBranch = ?");
2951
    $sth->execute($branch);
2949
}
2952
}
2950
2953
2951
sub ReturnLostItem{
2954
sub ReturnLostItem{
(-)a/admin/branch_transfer_limits.pl (-2 / +2 lines)
Lines 93-99 while ( my $row = $sth->fetchrow_hashref ) { Link Here
93
93
94
## If Form Data Passed, Update the Database
94
## If Form Data Passed, Update the Database
95
if ( $input->param('updateLimits') ) {
95
if ( $input->param('updateLimits') ) {
96
	DeleteBranchTransferLimits();
96
    DeleteBranchTransferLimits($branchcode);
97
97
98
98
	foreach my $code ( @codes ) {
99
	foreach my $code ( @codes ) {
99
		foreach my $toBranch ( @branchcodes ) {
100
		foreach my $toBranch ( @branchcodes ) {
100
- 

Return to bug 6842