Lines 1484-1530
sub GetLoanLength {
Link Here
|
1484 |
my $loanlength = $sth->fetchrow_hashref; |
1484 |
my $loanlength = $sth->fetchrow_hashref; |
1485 |
|
1485 |
|
1486 |
return $loanlength |
1486 |
return $loanlength |
1487 |
if defined($loanlength) && $loanlength->{issuelength}; |
1487 |
if defined($loanlength) && defined $loanlength->{issuelength}; |
1488 |
|
1488 |
|
1489 |
$sth->execute( $borrowertype, '*', $branchcode ); |
1489 |
$sth->execute( $borrowertype, '*', $branchcode ); |
1490 |
$loanlength = $sth->fetchrow_hashref; |
1490 |
$loanlength = $sth->fetchrow_hashref; |
1491 |
return $loanlength |
1491 |
return $loanlength |
1492 |
if defined($loanlength) && $loanlength->{issuelength}; |
1492 |
if defined($loanlength) && defined $loanlength->{issuelength}; |
1493 |
|
1493 |
|
1494 |
$sth->execute( '*', $itemtype, $branchcode ); |
1494 |
$sth->execute( '*', $itemtype, $branchcode ); |
1495 |
$loanlength = $sth->fetchrow_hashref; |
1495 |
$loanlength = $sth->fetchrow_hashref; |
1496 |
return $loanlength |
1496 |
return $loanlength |
1497 |
if defined($loanlength) && $loanlength->{issuelength}; |
1497 |
if defined($loanlength) && defined $loanlength->{issuelength}; |
1498 |
|
1498 |
|
1499 |
$sth->execute( '*', '*', $branchcode ); |
1499 |
$sth->execute( '*', '*', $branchcode ); |
1500 |
$loanlength = $sth->fetchrow_hashref; |
1500 |
$loanlength = $sth->fetchrow_hashref; |
1501 |
return $loanlength |
1501 |
return $loanlength |
1502 |
if defined($loanlength) && $loanlength->{issuelength}; |
1502 |
if defined($loanlength) && defined $loanlength->{issuelength}; |
1503 |
|
1503 |
|
1504 |
$sth->execute( $borrowertype, $itemtype, '*' ); |
1504 |
$sth->execute( $borrowertype, $itemtype, '*' ); |
1505 |
$loanlength = $sth->fetchrow_hashref; |
1505 |
$loanlength = $sth->fetchrow_hashref; |
1506 |
return $loanlength |
1506 |
return $loanlength |
1507 |
if defined($loanlength) && $loanlength->{issuelength}; |
1507 |
if defined($loanlength) && defined $loanlength->{issuelength}; |
1508 |
|
1508 |
|
1509 |
$sth->execute( $borrowertype, '*', '*' ); |
1509 |
$sth->execute( $borrowertype, '*', '*' ); |
1510 |
$loanlength = $sth->fetchrow_hashref; |
1510 |
$loanlength = $sth->fetchrow_hashref; |
1511 |
return $loanlength |
1511 |
return $loanlength |
1512 |
if defined($loanlength) && $loanlength->{issuelength}; |
1512 |
if defined($loanlength) && defined $loanlength->{issuelength}; |
1513 |
|
1513 |
|
1514 |
$sth->execute( '*', $itemtype, '*' ); |
1514 |
$sth->execute( '*', $itemtype, '*' ); |
1515 |
$loanlength = $sth->fetchrow_hashref; |
1515 |
$loanlength = $sth->fetchrow_hashref; |
1516 |
return $loanlength |
1516 |
return $loanlength |
1517 |
if defined($loanlength) && $loanlength->{issuelength}; |
1517 |
if defined($loanlength) && defined $loanlength->{issuelength}; |
1518 |
|
1518 |
|
1519 |
$sth->execute( '*', '*', '*' ); |
1519 |
$sth->execute( '*', '*', '*' ); |
1520 |
$loanlength = $sth->fetchrow_hashref; |
1520 |
$loanlength = $sth->fetchrow_hashref; |
1521 |
return $loanlength |
1521 |
return $loanlength |
1522 |
if defined($loanlength) && $loanlength->{issuelength}; |
1522 |
if defined($loanlength) && defined $loanlength->{issuelength}; |
1523 |
|
1523 |
|
1524 |
# if no rule is set => 21 days (hardcoded) |
1524 |
# if no rule is set => 0 day (hardcoded) |
1525 |
return { |
1525 |
return { |
1526 |
issuelength => 21, |
1526 |
issuelength => 0, |
1527 |
renewalperiod => 21, |
1527 |
renewalperiod => 0, |
1528 |
lengthunit => 'days', |
1528 |
lengthunit => 'days', |
1529 |
}; |
1529 |
}; |
1530 |
|
1530 |
|