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

(-)a/C4/Circulation.pm (-4 / +7 lines)
Lines 2974-2987 sub CreateBranchTransferLimit { Link Here
2974
2974
2975
=head2 DeleteBranchTransferLimits
2975
=head2 DeleteBranchTransferLimits
2976
2976
2977
  DeleteBranchTransferLimits();
2977
DeleteBranchTransferLimits($frombranch);
2978
2979
Deletes all the branch transfer limits for one branch
2978
2980
2979
=cut
2981
=cut
2980
2982
2981
sub DeleteBranchTransferLimits {
2983
sub DeleteBranchTransferLimits {
2982
   my $dbh = C4::Context->dbh;
2984
    my $branch = shift;
2983
   my $sth = $dbh->prepare("TRUNCATE TABLE branch_transfer_limits");
2985
    my $dbh    = C4::Context->dbh;
2984
   $sth->execute();
2986
    my $sth    = $dbh->prepare("DELETE FROM branch_transfer_limits WHERE fromBranch = ?");
2987
    $sth->execute($branch);
2985
}
2988
}
2986
2989
2987
sub ReturnLostItem{
2990
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