Bug 6842 FU : library transfer limits edits not stored
Followup : Changes the DeleteBranchTransferLimits signature : one now needs to delete only the limits for ONE branch
This commit is contained in:
parent
74f7638f99
commit
54e6b44da9
|
|
@ -2967,14 +2967,17 @@ sub CreateBranchTransferLimit {
|
|||
|
||||
=head2 DeleteBranchTransferLimits
|
||||
|
||||
DeleteBranchTransferLimits();
|
||||
DeleteBranchTransferLimits($frombranch);
|
||||
|
||||
Deletes all the branch transfer limits for one branch
|
||||
|
||||
=cut
|
||||
|
||||
sub DeleteBranchTransferLimits {
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $sth = $dbh->prepare("TRUNCATE TABLE branch_transfer_limits");
|
||||
$sth->execute();
|
||||
my $branch = shift;
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $sth = $dbh->prepare("DELETE FROM branch_transfer_limits WHERE fromBranch = ?");
|
||||
$sth->execute($branch);
|
||||
}
|
||||
|
||||
sub ReturnLostItem{
|
||||
|
|
|
|||
|
|
@ -93,7 +93,8 @@ while ( my $row = $sth->fetchrow_hashref ) {
|
|||
|
||||
## If Form Data Passed, Update the Database
|
||||
if ( $input->param('updateLimits') ) {
|
||||
DeleteBranchTransferLimits();
|
||||
DeleteBranchTransferLimits($branchcode);
|
||||
|
||||
|
||||
foreach my $code ( @codes ) {
|
||||
foreach my $toBranch ( @branchcodes ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue