diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 516a111dd7..dad54e398b 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -684,8 +684,7 @@ sub CanBookBeIssued { my $branch = _GetCircControlBranch($item,$borrower); my $itype = ( C4::Context->preference('item-level_itypes') ) ? $item->{'itype'} : $biblioitem->{'itemtype'}; - my $loanlength = GetLoanLength( $borrower->{'categorycode'}, $itype, $branch ); - $duedate = CalcDateDue( C4::Dates->new( $issuedate, 'iso' ), $loanlength, $branch, $borrower ); + $duedate = CalcDateDue( C4::Dates->new( $issuedate, 'iso' ), $itype, $branch, $borrower ); # Offline circ calls AddIssue directly, doesn't run through here # So issuingimpossible should be ok. @@ -1042,8 +1041,7 @@ sub AddIssue { ); unless ($datedue) { my $itype = ( C4::Context->preference('item-level_itypes') ) ? $biblio->{'itype'} : $biblio->{'itemtype'}; - my $loanlength = GetLoanLength( $borrower->{'categorycode'}, $itype, $branch ); - $datedue = CalcDateDue( C4::Dates->new( $issuedate, 'iso' ), $loanlength, $branch, $borrower ); + $datedue = CalcDateDue( C4::Dates->new( $issuedate, 'iso' ), $itype, $branch, $borrower ); } $sth->execute( @@ -1173,6 +1171,66 @@ sub GetLoanLength { return 21; } + +=head2 GetHardDueDate + + my ($hardduedate,$hardduedatecompare) = &GetHardDueDate($borrowertype,$itemtype,branchcode) + +Get the Hard Due Date and it's comparison for an itemtype, a borrower type and a branch + +=cut + +sub GetHardDueDate { + my ( $borrowertype, $itemtype, $branchcode ) = @_; + my $dbh = C4::Context->dbh; + my $sth = + $dbh->prepare( +"select hardduedate, hardduedatecompare from issuingrules where categorycode=? and itemtype=? and branchcode=?" + ); + $sth->execute( $borrowertype, $itemtype, $branchcode ); + my $results = $sth->fetchrow_hashref; + return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) + if defined($results) && $results->{hardduedate} ne 'NULL'; + + $sth->execute( $borrowertype, "*", $branchcode ); + $results = $sth->fetchrow_hashref; + return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) + if defined($results) && $results->{hardduedate} ne 'NULL'; + + $sth->execute( "*", $itemtype, $branchcode ); + $results = $sth->fetchrow_hashref; + return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) + if defined($results) && $results->{hardduedate} ne 'NULL'; + + $sth->execute( "*", "*", $branchcode ); + $results = $sth->fetchrow_hashref; + return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) + if defined($results) && $results->{hardduedate} ne 'NULL'; + + $sth->execute( $borrowertype, $itemtype, "*" ); + $results = $sth->fetchrow_hashref; + return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) + if defined($results) && $results->{hardduedate} ne 'NULL'; + + $sth->execute( $borrowertype, "*", "*" ); + $results = $sth->fetchrow_hashref; + return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) + if defined($results) && $results->{hardduedate} ne 'NULL'; + + $sth->execute( "*", $itemtype, "*" ); + $results = $sth->fetchrow_hashref; + return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) + if defined($results) && $results->{hardduedate} ne 'NULL'; + + $sth->execute( "*", "*", "*" ); + $results = $sth->fetchrow_hashref; + return (C4::Dates->new($results->{hardduedate}, 'iso'),$results->{hardduedatecompare}) + if defined($results) && $results->{hardduedate} ne 'NULL'; + + # if no rule is set => return undefined + return (undef, undef); +} + =head2 GetIssuingRule my $irule = &GetIssuingRule($borrowertype,$itemtype,branchcode) @@ -2197,15 +2255,12 @@ sub AddRenewal { unless ($datedue) { my $borrower = C4::Members::GetMemberDetails( $borrowernumber, 0 ) or return undef; - my $loanlength = GetLoanLength( - $borrower->{'categorycode'}, - (C4::Context->preference('item-level_itypes')) ? $biblio->{'itype'} : $biblio->{'itemtype'} , - $issuedata->{'branchcode'} ); # that's the circ control branch. + my $itemtype = (C4::Context->preference('item-level_itypes')) ? $biblio->{'itype'} : $biblio->{'itemtype'} , $datedue = (C4::Context->preference('RenewalPeriodBase') eq 'date_due') ? C4::Dates->new($issuedata->{date_due}, 'iso') : C4::Dates->new(); - $datedue = CalcDateDue($datedue,$loanlength,$issuedata->{'branchcode'},$borrower); + $datedue = CalcDateDue($datedue,$itemtype,$issuedata->{'branchcode'},$borrower); } # Update the issues record to have the new due date, and a new count @@ -2307,39 +2362,78 @@ sub GetIssuingCharges { my $item_type; # Get the book's item type and rental charge (via its biblioitem). - my $qcharge = "SELECT itemtypes.itemtype,rentalcharge FROM items - LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber"; - $qcharge .= (C4::Context->preference('item-level_itypes')) - ? " LEFT JOIN itemtypes ON items.itype = itemtypes.itemtype " - : " LEFT JOIN itemtypes ON biblioitems.itemtype = itemtypes.itemtype "; - - $qcharge .= "WHERE items.itemnumber =?"; - - my $sth1 = $dbh->prepare($qcharge); - $sth1->execute($itemnumber); - if ( my $data1 = $sth1->fetchrow_hashref ) { - $item_type = $data1->{'itemtype'}; - $charge = $data1->{'rentalcharge'}; - my $q2 = "SELECT rentaldiscount FROM borrowers + my $charge_query = 'SELECT itemtypes.itemtype,rentalcharge FROM items + LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber'; + $charge_query .= (C4::Context->preference('item-level_itypes')) + ? ' LEFT JOIN itemtypes ON items.itype = itemtypes.itemtype' + : ' LEFT JOIN itemtypes ON biblioitems.itemtype = itemtypes.itemtype'; + + $charge_query .= ' WHERE items.itemnumber =?'; + + my $sth = $dbh->prepare($charge_query); + $sth->execute($itemnumber); + if ( my $item_data = $sth->fetchrow_hashref ) { + $item_type = $item_data->{itemtype}; + $charge = $item_data->{rentalcharge}; + my $branch = C4::Branch::mybranch(); + my $discount_query = q|SELECT rentaldiscount, + issuingrules.itemtype, issuingrules.branchcode + FROM borrowers LEFT JOIN issuingrules ON borrowers.categorycode = issuingrules.categorycode WHERE borrowers.borrowernumber = ? - AND (issuingrules.itemtype = ? OR issuingrules.itemtype = '*')"; - my $sth2 = $dbh->prepare($q2); - $sth2->execute( $borrowernumber, $item_type ); - if ( my $data2 = $sth2->fetchrow_hashref ) { - my $discount = $data2->{'rentaldiscount'}; - if ( $discount eq 'NULL' ) { - $discount = 0; - } + AND (issuingrules.itemtype = ? OR issuingrules.itemtype = '*') + AND (issuingrules.branchcode = ? OR issuingrules.branchcode = '*')|; + my $discount_sth = $dbh->prepare($discount_query); + $discount_sth->execute( $borrowernumber, $item_type, $branch ); + my $discount_rules = $discount_sth->fetchall_arrayref({}); + if (@{$discount_rules}) { + # We may have multiple rules so get the most specific + my $discount = _get_discount_from_rule($discount_rules, $branch, $item_type); $charge = ( $charge * ( 100 - $discount ) ) / 100; } - $sth2->finish; } - $sth1->finish; + $sth->finish; # we havent _explicitly_ fetched all rows return ( $charge, $item_type ); } +# Select most appropriate discount rule from those returned +sub _get_discount_from_rule { + my ($rules_ref, $branch, $itemtype) = @_; + my $discount; + + if (@{$rules_ref} == 1) { # only 1 applicable rule use it + $discount = $rules_ref->[0]->{rentaldiscount}; + return (defined $discount) ? $discount : 0; + } + # could have up to 4 does one match $branch and $itemtype + my @d = grep { $_->{branchcode} eq $branch && $_->{itemtype} eq $itemtype } @{$rules_ref}; + if (@d) { + $discount = $d[0]->{rentaldiscount}; + return (defined $discount) ? $discount : 0; + } + # do we have item type + all branches + @d = grep { $_->{branchcode} eq q{*} && $_->{itemtype} eq $itemtype } @{$rules_ref}; + if (@d) { + $discount = $d[0]->{rentaldiscount}; + return (defined $discount) ? $discount : 0; + } + # do we all item types + this branch + @d = grep { $_->{branchcode} eq $branch && $_->{itemtype} eq q{*} } @{$rules_ref}; + if (@d) { + $discount = $d[0]->{rentaldiscount}; + return (defined $discount) ? $discount : 0; + } + # so all and all (surely we wont get here) + @d = grep { $_->{branchcode} eq q{*} && $_->{itemtype} eq q{*} } @{$rules_ref}; + if (@d) { + $discount = $d[0]->{rentaldiscount}; + return (defined $discount) ? $discount : 0; + } + # none of the above + return 0; +} + =head2 AddIssuingCharge &AddIssuingCharge( $itemno, $borrowernumber, $charge ) @@ -2589,17 +2683,20 @@ sub UpdateHoldingbranch { =head2 CalcDateDue -$newdatedue = CalcDateDue($startdate,$loanlength,$branchcode); -this function calculates the due date given the loan length , +$newdatedue = CalcDateDue($startdate,$itemtype,$branchcode,$borrower); + +this function calculates the due date given the start date and configured circulation rules, checking against the holidays calendar as per the 'useDaysMode' syspref. C<$startdate> = C4::Dates object representing start date of loan period (assumed to be today) +C<$itemtype> = itemtype code of item in question C<$branch> = location whose calendar to use -C<$loanlength> = loan length prior to adjustment +C<$borrower> = Borrower object =cut sub CalcDateDue { - my ($startdate,$loanlength,$branch,$borrower) = @_; + my ($startdate,$itemtype,$branch,$borrower) = @_; my $datedue; + my $loanlength = GetLoanLength($borrower->{'categorycode'},$itemtype, $branch); if(C4::Context->preference('useDaysMode') eq 'Days') { # ignoring calendar my $timedue = time + ($loanlength) * 86400; @@ -2611,19 +2708,27 @@ sub CalcDateDue { $datedue = $calendar->addDate($startdate, $loanlength); } + # if Hard Due Dates are used, retreive them and apply as necessary + my ($hardduedate, $hardduedatecompare) = GetHardDueDate($borrower->{'categorycode'},$itemtype, $branch); + if ( $hardduedate->output('iso') && $hardduedate->output('iso') ne '0000-00-00') { + # if the calculated due date is after the 'before' Hard Due Date (ceiling), override + if ( $datedue->output( 'iso' ) gt $hardduedate->output( 'iso' ) && $hardduedatecompare == -1) { + $datedue = $hardduedate; + # if the calculated date is before the 'after' Hard Due Date (floor), override + } elsif ( $datedue->output( 'iso' ) lt $hardduedate->output( 'iso' ) && $hardduedatecompare == 1) { + $datedue = $hardduedate; + # if the hard due date is set to 'exactly', overrride + } elsif ( $hardduedatecompare == 0) { + $datedue = $hardduedate; + } + # in all other cases, keep the date due as it is + } + # if ReturnBeforeExpiry ON the datedue can't be after borrower expirydate if ( C4::Context->preference('ReturnBeforeExpiry') && $datedue->output('iso') gt $borrower->{dateexpiry} ) { $datedue = C4::Dates->new( $borrower->{dateexpiry}, 'iso' ); } - # if ceilingDueDate ON the datedue can't be after the ceiling date - if ( C4::Context->preference('ceilingDueDate') - && ( C4::Context->preference('ceilingDueDate') =~ C4::Dates->regexp('syspref') ) ) { - my $ceilingDate = C4::Dates->new( C4::Context->preference('ceilingDueDate') ); - if ( $datedue->output( 'iso' ) gt $ceilingDate->output( 'iso' ) ) { - $datedue = $ceilingDate; - } - } return $datedue; } diff --git a/C4/Members.pm b/C4/Members.pm index ace939da2b..9fdb357664 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -70,6 +70,8 @@ BEGIN { &PutPatronImage &RmPatronImage + &GetHideLostItemsPreference + &IsMemberBlocked &GetMemberAccountRecords &GetBorNotifyAcctRecord @@ -1807,6 +1809,25 @@ sub RmPatronImage { return $dberror; } +=head2 GetHideLostItemsPreference + + $hidelostitemspref = &GetHideLostItemsPreference($borrowernumber); + +Returns the HideLostItems preference for the patron category of the supplied borrowernumber +C<&$hidelostitemspref>return value of function, 0 or 1 + +=cut + +sub GetHideLostItemsPreference { + my ($borrowernumber) = @_; + my $dbh = C4::Context->dbh; + my $query = "SELECT hidelostitems FROM borrowers,categories WHERE borrowers.categorycode = categories.categorycode AND borrowernumber = ?"; + my $sth = $dbh->prepare($query); + $sth->execute($borrowernumber); + my $hidelostitems = $sth->fetchrow; + return $hidelostitems; +} + =head2 GetRoadTypeDetails (OUEST-PROVENCE) ($roadtype) = &GetRoadTypeDetails($roadtypeid); diff --git a/C4/Search.pm b/C4/Search.pm index 21c61fba1d..35f016665a 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -25,6 +25,7 @@ use Lingua::Stem; use C4::Search::PazPar2; use XML::Simple; use C4::Dates qw(format_date); +use C4::Members qw(GetHideLostItemsPreference); use C4::XSLT; use C4::Branch; use C4::Reserves; # CheckReserves @@ -391,7 +392,7 @@ sub getRecords { warn "Ignoring unrecognized sort '$sort' requested" if $sort_by; } } - if ($sort_by) { + if ($sort_by && !$scan) { if ( $results[$i]->sort( "yaz", $sort_by ) < 0 ) { warn "WARNING sort $sort_by failed"; } @@ -1482,7 +1483,7 @@ sub searchResults { # add imageurl to itemtype if there is one $oldbiblio->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $oldbiblio->{itemtype} }->{imageurl} ); - $oldbiblio->{'authorised_value_images'} = C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $oldbiblio->{'biblionumber'}, $marcrecord ) ); + $oldbiblio->{'authorised_value_images'} = ($search_context eq 'opac' && C4::Context->preference('AuthorisedValueImages')) || ($search_context eq 'intranet' && C4::Context->preference('StaffAuthorisedValueImages')) ? C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $oldbiblio->{'biblionumber'}, $marcrecord ) ) : []; $oldbiblio->{normalized_upc} = GetNormalizedUPC( $marcrecord,$marcflavour); $oldbiblio->{normalized_ean} = GetNormalizedEAN( $marcrecord,$marcflavour); $oldbiblio->{normalized_oclc} = GetNormalizedOCLCNumber($marcrecord,$marcflavour); @@ -1593,7 +1594,8 @@ sub searchResults { my $prefix = $item->{$hbranch} . '--' . $item->{location} . $item->{itype} . $item->{itemcallnumber}; # For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item - if ( $item->{onloan} ) { + my $userenv = C4::Context->userenv; + if ( $item->{onloan} && !(C4::Members::GetHideLostItemsPreference($userenv->{'number'}) && $item->{itemlost}) ) { $onloan_count++; my $key = $prefix . $item->{onloan} . $item->{barcode}; $onloan_items->{$key}->{due_date} = format_date($item->{onloan}); diff --git a/admin/categorie.pl b/admin/categorie.pl index 4a5d68390c..d0211fdb03 100755 --- a/admin/categorie.pl +++ b/admin/categorie.pl @@ -92,7 +92,7 @@ if ($op eq 'add_form') { my $data; if ($categorycode) { my $dbh = C4::Context->dbh; - my $sth=$dbh->prepare("select categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,issuelimit,reservefee,overduenoticerequired,category_type from categories where categorycode=?"); + my $sth=$dbh->prepare("select categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,issuelimit,reservefee,hidelostitems,overduenoticerequired,category_type from categories where categorycode=?"); $sth->execute($categorycode); $data=$sth->fetchrow_hashref; $sth->finish; @@ -109,6 +109,7 @@ if ($op eq 'add_form') { overduenoticerequired => $data->{'overduenoticerequired'}, issuelimit => $data->{'issuelimit'}, reservefee => sprintf("%.2f",$data->{'reservefee'}), + hidelostitems => $data->{'hidelostitems'}, category_type => $data->{'category_type'}, DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), "type_".$data->{'category_type'} => 1, @@ -128,12 +129,12 @@ if ($op eq 'add_form') { } if ($is_a_modif) { - my $sth=$dbh->prepare("UPDATE categories SET description=?,enrolmentperiod=?, enrolmentperioddate=?,upperagelimit=?,dateofbirthrequired=?,enrolmentfee=?,reservefee=?,overduenoticerequired=?,category_type=? WHERE categorycode=?"); - $sth->execute(map { $input->param($_) } ('description','enrolmentperiod','enrolmentperioddate','upperagelimit','dateofbirthrequired','enrolmentfee','reservefee','overduenoticerequired','category_type','categorycode')); + my $sth=$dbh->prepare("UPDATE categories SET description=?,enrolmentperiod=?, enrolmentperioddate=?,upperagelimit=?,dateofbirthrequired=?,enrolmentfee=?,reservefee=?,hidelostitems=?,overduenoticerequired=?,category_type=? WHERE categorycode=?"); + $sth->execute(map { $input->param($_) } ('description','enrolmentperiod','enrolmentperioddate','upperagelimit','dateofbirthrequired','enrolmentfee','reservefee','hidelostitems','overduenoticerequired','category_type','categorycode')); $sth->finish; } else { - my $sth=$dbh->prepare("INSERT INTO categories (categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,reservefee,overduenoticerequired,category_type) values (?,?,?,?,?,?,?,?,?,?)"); - $sth->execute(map { $input->param($_) } ('categorycode','description','enrolmentperiod','enrolmentperioddate','upperagelimit','dateofbirthrequired','enrolmentfee','reservefee','overduenoticerequired','category_type')); + my $sth=$dbh->prepare("INSERT INTO categories (categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,reservefee,hidelostitems,overduenoticerequired,category_type) values (?,?,?,?,?,?,?,?,?,?)"); + $sth->execute(map { $input->param($_) } ('categorycode','description','enrolmentperiod','enrolmentperioddate','upperagelimit','dateofbirthrequired','enrolmentfee','reservefee','hidelostitems','overduenoticerequired','category_type')); $sth->finish; } if (C4::Context->preference('EnhancedMessagingPreferences')) { @@ -156,7 +157,7 @@ if ($op eq 'add_form') { $sth->finish; $template->param(total => $total->{'total'}); - my $sth2=$dbh->prepare("select categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,issuelimit,reservefee,overduenoticerequired,category_type from categories where categorycode=?"); + my $sth2=$dbh->prepare("select categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,issuelimit,reservefee,hidelostitems,overduenoticerequired,category_type from categories where categorycode=?"); $sth2->execute($categorycode); my $data=$sth2->fetchrow_hashref; $sth2->finish; @@ -173,6 +174,7 @@ if ($op eq 'add_form') { overduenoticerequired => $data->{'overduenoticerequired'}, issuelimit => $data->{'issuelimit'}, reservefee => sprintf("%.2f",$data->{'reservefee'}), + hidelostitems => $data->{'hidelostitems'}, category_type => $data->{'category_type'}, ); # END $OP eq DELETE_CONFIRM @@ -205,6 +207,7 @@ if ($op eq 'add_form') { overduenoticerequired => $results->[$i]{'overduenoticerequired'}, issuelimit => $results->[$i]{'issuelimit'}, reservefee => sprintf("%.2f",$results->[$i]{'reservefee'}), + hidelostitems => $results->[$i]{'hidelostitems'}, category_type => $results->[$i]{'category_type'}, "type_".$results->[$i]{'category_type'} => 1); if (C4::Context->preference('EnhancedMessagingPreferences')) { diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index 9ad132c6ba..3c77f93893 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -26,6 +26,7 @@ use C4::Auth; use C4::Koha; use C4::Debug; use C4::Branch; # GetBranches +use C4::Dates qw/format_date format_date_in_iso/; my $input = new CGI; my $dbh = C4::Context->dbh; @@ -100,8 +101,8 @@ elsif ($op eq 'delete-branch-item') { # save the values entered elsif ($op eq 'add') { my $sth_search = $dbh->prepare("SELECT COUNT(*) AS total FROM issuingrules WHERE branchcode=? AND categorycode=? AND itemtype=?"); - my $sth_insert = $dbh->prepare("INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, reservesallowed, issuelength, fine, finedays, firstremind, chargeperiod,rentaldiscount) VALUES(?,?,?,?,?,?,?,?,?,?,?,?)"); - my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, reservesallowed=?, issuelength=?, rentaldiscount=? WHERE branchcode=? AND categorycode=? AND itemtype=?"); + my $sth_insert = $dbh->prepare("INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, reservesallowed, issuelength, hardduedate, hardduedatecompare, fine, finedays, firstremind, chargeperiod,rentaldiscount) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); + my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, reservesallowed=?, issuelength=?, hardduedate=?, hardduedatecompare=?, rentaldiscount=? WHERE branchcode=? AND categorycode=? AND itemtype=?"); my $br = $branch; # branch my $bor = $input->param('categorycode'); # borrower category @@ -116,15 +117,18 @@ elsif ($op eq 'add') { $maxissueqty =~ s/\s//g; $maxissueqty = undef if $maxissueqty !~ /^\d+/; my $issuelength = $input->param('issuelength'); + my $hardduedate = $input->param('hardduedate'); + $hardduedate = format_date_in_iso($hardduedate); + my $hardduedatecompare = $input->param('hardduedatecompare'); my $rentaldiscount = $input->param('rentaldiscount'); $debug and warn "Adding $br, $bor, $cat, $fine, $maxissueqty"; $sth_search->execute($br,$bor,$cat); my $res = $sth_search->fetchrow_hashref(); if ($res->{total}) { - $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed,$reservesallowed, $issuelength,$rentaldiscount, $br,$bor,$cat); + $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed,$reservesallowed, $issuelength,$hardduedate,$hardduedatecompare,$rentaldiscount, $br,$bor,$cat); } else { - $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed,$reservesallowed,$issuelength,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount); + $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed,$reservesallowed,$issuelength,$hardduedate,$hardduedatecompare,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount); } } elsif ($op eq "set-branch-defaults") { @@ -377,6 +381,14 @@ while (my $row = $sth2->fetchrow_hashref) { $row->{'humancategorycode'} ||= $row->{'categorycode'}; $row->{'default_humancategorycode'} = 1 if $row->{'humancategorycode'} eq '*'; $row->{'fine'} = sprintf('%.2f', $row->{'fine'}); + if ($row->{'hardduedate'} ne '0000-00-00') { + $row->{'hardduedate'} = format_date( $row->{'hardduedate'}); + $row->{'hardduedatebefore'} = 1 if ($row->{'hardduedatecompare'} == -1); + $row->{'hardduedateexact'} = 1 if ($row->{'hardduedatecompare'} == 0); + $row->{'hardduedateafter'} = 1 if ($row->{'hardduedatecompare'} == 1); + } else { + $row->{'hardduedate'} = 0; + } push @row_loop, $row; } $sth->finish; diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 4e72229697..87ecac4521 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -162,7 +162,6 @@ $tabsysprefs{IssuingInProcess} = "Circulation"; $tabsysprefs{patronimages} = "Circulation"; $tabsysprefs{printcirculationslips} = "Circulation"; $tabsysprefs{ReturnBeforeExpiry} = "Circulation"; -$tabsysprefs{ceilingDueDate} = "Circulation"; $tabsysprefs{SpecifyDueDate} = "Circulation"; $tabsysprefs{AutomaticItemReturn} = "Circulation"; $tabsysprefs{ReservesMaxPickUpDelay} = "Circulation"; @@ -175,7 +174,6 @@ $tabsysprefs{canreservefromotherbranches} = "Circulation"; $tabsysprefs{finesMode} = "Circulation"; $tabsysprefs{numReturnedItemsToShow} = "Circulation"; $tabsysprefs{emailLibrarianWhenHoldIsPlaced} = "Circulation"; -$tabsysprefs{globalDueDate} = "Circulation"; $tabsysprefs{itemBarcodeInputFilter} = "Circulation"; $tabsysprefs{WebBasedSelfCheck} = "Circulation"; $tabsysprefs{ShowPatronImageInWebBasedSelfCheck} = "Circulation"; diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 3d42326fc3..5542163b17 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -64,6 +64,8 @@ if($query->cookie("holdfor")){ my $biblionumber = $query->param('biblionumber'); my $fw = GetFrameworkCode($biblionumber); +my $showallitems = $query->param('showallitems'); + ## get notes and subjects from MARC record my $marcflavour = C4::Context->preference("marcflavour"); my $record = GetMarcBiblio($biblionumber); @@ -109,8 +111,12 @@ my $branches = GetBranches(); my $itemtypes = GetItemTypes(); my $dbh = C4::Context->dbh; -# change back when ive fixed request.pl -my @items = &GetItemsInfo( $biblionumber, 'intra' ); +# 'intra' param included, even though it's not respected in GetItemsInfo currently +my @all_items= GetItemsInfo($biblionumber, 'intra'); +my @items; +for my $itm (@all_items) { + push @items, $itm unless ( $itm->{itemlost} && GetHideLostItemsPreference($borrowernumber) && !$showallitems); +} my $dat = &GetBiblioData($biblionumber); # get count of holds @@ -141,7 +147,11 @@ foreach my $subscription (@subscriptions) { if ( defined $dat->{'itemtype'} ) { $dat->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $dat->{itemtype} }{imageurl} ); } -$dat->{'count'} = scalar @items; + +$dat->{'count'} = scalar @all_items; +$dat->{'showncount'} = scalar @items; +$dat->{'hiddencount'} = scalar @all_items - scalar @items; + my $shelflocations = GetKohaAuthorisedValues('items.location', $fw); my $collections = GetKohaAuthorisedValues('items.ccode' , $fw); my (@itemloop, %itemfields); diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 054229f397..d848188ef8 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -34,6 +34,7 @@ use C4::Dates qw/format_date/; use C4::Circulation; # to use itemissues use C4::Members; # to use GetMember use C4::Search; # enabled_staff_search_views +use C4::Members qw/GetHideLostItemsPreference/; my $query=new CGI; @@ -66,8 +67,10 @@ my $biblionumber=$query->param('biblionumber'); my $title=$query->param('title'); my $bi=$query->param('bi'); $bi = $biblionumber unless $bi; +my $itemnumber = $query->param('itemnumber'); my $data=GetBiblioData($biblionumber); my $dewey = $data->{'dewey'}; +my $showallitems = $query->param('showallitems'); #coping with subscriptions my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber); @@ -85,16 +88,27 @@ my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber); my @results; my $fw = GetFrameworkCode($biblionumber); -my @items= GetItemsInfo($biblionumber); -my $count=@items; -$data->{'count'}=$count; +my @all_items= GetItemsInfo($biblionumber); +my @items; +for my $itm (@all_items) { + push @items, $itm unless ( $itm->{itemlost} && + GetHideLostItemsPreference($loggedinuser) && + !$showallitems && + ($itemnumber != $itm->{itemnumber})); +} + +my $totalcount=@all_items; +my $showncount=@items; +my $hiddencount = $totalcount - $showncount; +$data->{'count'}=$totalcount; +$data->{'showncount'}=$showncount; +$data->{'hiddencount'}=$hiddencount; # can be zero my $ccodes= GetKohaAuthorisedValues('items.ccode',$fw); my $itemtypes = GetItemTypes; $data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'}; $results[0]=$data; -my $itemnumber; ($itemnumber) and @items = (grep {$_->{'itemnumber'} == $itemnumber} @items); foreach my $item (@items){ $item->{itemlostloop}= GetAuthorisedValues(GetAuthValCode('items.itemlost',$fw),$item->{itemlost}) if GetAuthValCode('items.itemlost',$fw); @@ -144,7 +158,7 @@ $template->param(loggedinuser => $loggedinuser); $template->param(biblionumber => $biblionumber); $template->param(biblioitemnumber => $bi); $template->param(itemnumber => $itemnumber); -$template->param(ONLY_ONE => 1) if ( $itemnumber && $count != @items ); +$template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items ); $template->param(z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber))); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/catalogue/search.pl b/catalogue/search.pl index b22837ad83..b1a0b4fe1d 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -383,7 +383,7 @@ my @indexes; @indexes = split("\0",$params->{'idx'}); # if a simple index (only one) display the index used in the top search box -if ($indexes[0] && !$indexes[1]) { +if ($indexes[0] && (!$indexes[1] || $params->{'scan'})) { $template->param("ms_".$indexes[0] => 1);} @@ -396,7 +396,7 @@ my @limits; @limits = split("\0",$params->{'limit'}) if $params->{'limit'}; if($params->{'multibranchlimit'}) { -push @limits, join(" or ", map { "branch: $_ "} @{GetBranchesInCategory($params->{'multibranchlimit'})}) ; + push @limits, '('.join( " or ", map { "branch: $_ " } @{ GetBranchesInCategory( $params->{'multibranchlimit'} ) } ).')'; } my $available; diff --git a/circ/circulation.pl b/circ/circulation.pl index 1ed4afd74a..e521e19f2a 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -136,11 +136,8 @@ if ( $barcode ) { } } -my ($datedue,$invalidduedate,$globalduedate); +my ($datedue,$invalidduedate); -if(C4::Context->preference('globalDueDate') && (C4::Context->preference('globalDueDate') =~ C4::Dates->regexp('syspref'))){ - $globalduedate = C4::Dates->new(C4::Context->preference('globalDueDate')); -} my $duedatespec_allow = C4::Context->preference('SpecifyDueDate'); if($duedatespec_allow){ if ($duedatespec) { @@ -157,16 +154,7 @@ if($duedatespec_allow){ $invalidduedate = 1; $template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec); } - } else { - # pass global due date to tmpl if specifyduedate is true - # and we have no barcode (loading circ page but not checking out) - if($globalduedate && ! $barcode ){ - $duedatespec = $globalduedate->output(); - $stickyduedate = 1; - } } -} else { - $datedue = $globalduedate if ($globalduedate); } my $todaysdate = C4::Dates->new->output('iso'); @@ -311,10 +299,6 @@ if ($barcode) { unless($confirm_required) { AddIssue( $borrower, $barcode, $datedue, $cancelreserve ); $inprocess = 1; - if($globalduedate && ! $stickyduedate && $duedatespec_allow ){ - $duedatespec = $globalduedate->output(); - $stickyduedate = 1; - } } } diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql b/installer/data/mysql/de-DE/mandatory/sysprefs.sql index 7b62465774..2e1069ee5f 100644 --- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql +++ b/installer/data/mysql/de-DE/mandatory/sysprefs.sql @@ -150,8 +150,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('emailLibrarianWhenHoldIsPlaced',0,'If ON, emails the librarian whenever a hold is placed',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numReturnedItemsToShow','20','Number of returned items to show on the check-in page',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, \'off\', \'test\' (emails admin report) or \'production\' (accrue overdue fines). Requires accruefines cronjob.','off|test|production','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts','10','free'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ceilingDueDate','','If set, date due will not be past this date. Enter date according to the dateformat System Preference',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free'); @@ -299,3 +297,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','','free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index cb06622c10..9f47292445 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -151,8 +151,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('emailLibrarianWhenHoldIsPlaced',0,'If ON, emails the librarian whenever a hold is placed',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numReturnedItemsToShow','20','Number of returned items to show on the check-in page',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, \'off\', \'test\' (emails admin report) or \'production\' (accrue overdue fines). Requires accruefines cronjob.','off|test|production','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts','10','free'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ceilingDueDate','','If set, date due will not be past this date. Enter date according to the dateformat System Preference',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat|libsuite8','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free'); @@ -299,3 +297,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','','free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql index 31e7c6f161..25f3f5878d 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql @@ -151,8 +151,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('emailLibrarianWhenHoldIsPlaced',0,'Si activé, envoie un mail à la bibliothèque lorsqu''une réservation est posée',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numReturnedItemsToShow','20','Nombre d''exemplaires rendus à afficher sur la page de retour',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choisissez un mode pour le calcul des amendes : Test ou Production.','test|production','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','Si défini, autorise une date de retour statique pour tous les prêts','10','free'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ceilingDueDate','','Si présent, les dates de retour des prêts ne pourront être antérieures à cette date. Formatez cette date conformément à la préférence système dateformat.',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','Si activé, permet de définir le format des codes à barre','whitespace|T-prefix|cuecat','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Activer s''il n''y a qu''une seule bibliothèque sur ce catalogue, cela cache le sélecteur de bibliothèque inutile',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Texte à afficher dans l''ancre du logo de l''OPAC',NULL,'free'); @@ -301,4 +299,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','','free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo'); - +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); diff --git a/installer/data/mysql/it-IT/necessari/sysprefs.sql b/installer/data/mysql/it-IT/necessari/sysprefs.sql index 35116c1852..3c3d3c8cf3 100644 --- a/installer/data/mysql/it-IT/necessari/sysprefs.sql +++ b/installer/data/mysql/it-IT/necessari/sysprefs.sql @@ -61,7 +61,6 @@ insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, -- insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('FrameworksLoaded','auth_val.sql|authority_framework.sql|class_sources.sql|message_transport_types.sql|notices.sql|parameters.sql|patron_categories.sql|sample_holidays.sql|sample_itemtypes.sql|sample_labels.sql|sample_news.sql|sample_notices_message_attributes.sql|sample_notices_message_transports.sql|stopwords.sql|subtag_registry.sql|sysprefs.sql|unimarc_framework.sql|userflags.sql|userpermissions.sql',NULL,'Frameworks loaded through webinstaller','choice'); insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('FRBRizeEditions','1','','Se ON, Koha farà delle richieste a uno o più ISBN web services per trovare gli ISBN associabili e li visualizzarà in un tab \'Edizioni\' nella visualizzazione dettagliata','YesNo'); insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('gist','0','','Valore predefinito per la Goods and Services tax (l\'IVA) calcolato non in %, ma in forma numerica (0.12 for 12%), impostare a 0 per disabilitarla.','Float'); -insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('globalDueDate','','10','Se impostata forza un’unica data di scadenza per tutti i prestiti','free'); insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('GoogleJackets','1','','Se ON, visualizza le copertine usando Google Books','YesNo'); insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('hidelostitems','0','','Se ON, viene disabilitata la visualizzazione nell\'OPAC delle copie perse.','YesNo'); insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('hide_marc','0','','Se su ON, disabilita la visualizzazione dei campi del MARC, codici di sottocampi e indicatori (mostra ancora i dati)','YesNo'); @@ -224,7 +223,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('casAuthentication', '0', 'Enable or disable CAS authentication', '', 'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('casLogout', '0', 'Does a logout from Koha should also log the user out of CAS?', '', 'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('casServerUrl', 'https://localhost:8443/cas', 'URL of the cas server', '', 'Free'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ceilingDueDate','','If set, date due will not be past this date. Enter date according to the dateformat System Preference',NULL,'free'); INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('CurrencyFormat','FR','US|FR','Determines the display format of currencies. eg: \'36000\' is displayed as \'360 000,00\' in \'FR\' or \'360,000.00\' in \'US\'.','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('DisplayMultiPlaceHold','1','Display the ability to place multiple holds or not','','YesNo'); INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('DisplayOPACiconsXSLT', '1', '', 'If ON, displays the format, audience, type icons in XSLT MARC21 results and display pages.', 'YesNo'); @@ -285,4 +283,5 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowPurchaseSuggestionBranchChoice', 0, 'Allow user to choose branch when making a purchase suggestion','1','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','','free'); -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo'); \ No newline at end of file +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index a62e07c9fb..1171cb12db 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -420,6 +420,7 @@ CREATE TABLE `categories` ( `overduenoticerequired` tinyint(1) default NULL, `issuelimit` smallint(6) default NULL, `reservefee` decimal(28,6) default NULL, + `hidelostitems` tinyint(1) NOT NULL default '0' `category_type` varchar(1) NOT NULL default 'A', PRIMARY KEY (`categorycode`), UNIQUE KEY `categorycode` (`categorycode`) @@ -965,6 +966,8 @@ CREATE TABLE `issuingrules` ( `chargename` varchar(100) default NULL, `maxissueqty` int(4) default NULL, `issuelength` int(4) default NULL, + `hardduedate` date default NULL, + `hardduedatecompare` tinyint NOT NULL default "0", `renewalsallowed` smallint(6) NOT NULL default "0", `reservesallowed` smallint(6) NOT NULL default "0", `branchcode` varchar(10) NOT NULL default '', diff --git a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql index b564b46014..f3bc969b75 100644 --- a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql +++ b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql @@ -149,8 +149,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('emailLibrarianWhenHoldIsPlaced',0,'If ON, emails the librarian whenever a hold is placed',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numReturnedItemsToShow','20','Number of returned items to show on the check-in page',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, \'off\', \'test\' (emails admin report) or \'production\' (accrue overdue fines). Requires accruefines cronjob.','off|test|production','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts','10','free'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ceilingDueDate','','If set, date due will not be past this date. Enter date according to the dateformat System Preference',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free'); @@ -298,3 +296,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','','free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); diff --git a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql index b28fa36f2a..3feec7fd6d 100644 --- a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -177,7 +177,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('noItemTypeImages',0,'If ON, disables item-type images',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('emailLibrarianWhenHoldIsPlaced',0,'If ON, emails the librarian whenever a hold is placed',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, \'off\', \'test\' (emails admin report) or \'production\' (accrue overdue fines). Requires accruefines cronjob.','off|test|production','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts','10','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free'); @@ -286,7 +285,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('intranetbookbag','1','If ON, enables display of Cart feature in the intranet','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacSerialDefaultTab', 'subscriptions', 'Define the default tab for serials in OPAC.', 'holdings|serialcollection|subscriptions', 'Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numReturnedItemsToShow','20','Number of returned items to show on the check-in page',NULL,'Integer'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ceilingDueDate','','If set, date due will not be past this date. Enter date according to the dateformat System Preference',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OAI-PMH:ConfFile','','If empty, Koha OAI Server operates in normal mode, otherwise it operates in extended mode.',NULL,'File'); ('OPACXSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on OPAC','YesNo'), ('OPACXSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on OPAC','YesNo'), @@ -353,3 +351,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','','free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); diff --git a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql index a72e79aa67..f8b1ea09b5 100644 --- a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -176,7 +176,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('noItemTypeImages',0,'If ON, disables item-type images',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('emailLibrarianWhenHoldIsPlaced',0,'If ON, emails the librarian whenever a hold is placed',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, \'off\', \'test\' (emails admin report) or \'production\' (accrue overdue fines). Requires accruefines cronjob.','off|test|production','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts','10','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free'); @@ -311,7 +310,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('intranetbookbag','1','If ON, enables display of Cart feature in the intranet','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacSerialDefaultTab', 'subscriptions', 'Define the default tab for serials in OPAC.', 'holdings|serialcollection|subscriptions', 'Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numReturnedItemsToShow','20','Number of returned items to show on the check-in page',NULL,'Integer'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ceilingDueDate','','If set, date due will not be past this date. Enter date according to the dateformat System Preference',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OAI-PMH:ConfFile','','If empty, Koha OAI Server operates in normal mode, otherwise it operates in extended mode.',NULL,'File'); ('OPACXSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on OPAC','YesNo'), ('OPACXSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on OPAC','YesNo'), @@ -378,3 +376,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','','free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 23b5d6723b..f2d6776e2a 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -37,6 +37,7 @@ use Getopt::Long; # Koha modules use C4::Context; use C4::Installer; +use C4::Dates; use MARC::Record; use MARC::File::XML ( BinaryEncoding => 'utf8' ); @@ -4134,6 +4135,37 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.03.00.033'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages', '1', '', NULL, 'YesNo')"); + print "Upgrade to $DBversion done (System pref StaffAuthorisedValueImages)\n"; + SetVersion ($DBversion); +} + +$DBversion = '3.03.00.034'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE `categories` ADD `hidelostitems` tinyint(1) NOT NULL default '0' AFTER `reservefee`"); + print "Upgrade to $DBversion done (Add hidelostitems preference to borrower categories)\n"; + SetVersion ($DBversion); +} + +$DBversion = '3.03.00.035'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE `issuingrules` ADD hardduedate date default NULL AFTER issuelength"); + $dbh->do("ALTER TABLE `issuingrules` ADD hardduedatecompare tinyint NOT NULL default 0 AFTER hardduedate"); + my $duedate; + if (C4::Context->preference("globalDueDate")) { + $duedate = C4::Dates::format_date_in_iso(C4::Context->preference("globalDueDate")); + $dbh->do("UPDATE `issuingrules` SET hardduedate = '$duedate', hardduedatecompare = 0"); + } elsif (C4::Context->preference("ceilingDueDate")) { + $duedate = C4::Dates::format_date_in_iso(C4::Context->preference("ceilingDueDate")); + $dbh->do("UPDATE `issuingrules` SET hardduedate = '$duedate', hardduedatecompare = -1"); + } + $dbh->do("DELETE FROM `systempreferences` WHERE variable = 'globalDueDate' OR variable = 'ceilingDueDate'"); + print "Upgrade to $DBversion done (Move global and ceiling due dates to Circ Rules level)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl index 39e341a637..fbf66e0e7b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl @@ -411,7 +411,9 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl index ba9e468b14..52e8657ae8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl @@ -151,6 +151,15 @@ +
  •  
  • " />
  •   Clone these rules to: + + before + on + after + + + None defined @@ -133,6 +146,29 @@ for="tobranch">Clone these rules to: + + " /> + + /lib/calendar/cal.gif" alt="Show Calendar" border="0" id="CalendarDueDate" style="cursor: pointer;"/> + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl index e3b0a8f786..a939b42580 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl @@ -217,6 +217,7 @@ function verify_images() {
    + @@ -364,6 +365,10 @@ function verify_images() {
    Item type
    + + +

    &showallitems=1">Show all items ( hidden) +

    @@ -371,7 +376,7 @@ function verify_images() {
    itemdata_copynumber
    serial
    - +

    No physical items for this record

    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl index c8c0c06b94..16c2c5b3a4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl @@ -32,7 +32,8 @@
  • Volume:
  • Physical Details:  
  • Notes:
  • -
  • No. of Items:  
  • +
  • No. of Items:  total ( shown / hidden) +&showallitems=1">Show all items

  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl index dc7ed5f412..4d509c3dd3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl @@ -415,7 +415,7 @@ No patron matched
    - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tmpl index c21bc945e9..1464d43c18 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tmpl @@ -57,9 +57,9 @@ - Only Item: + Only Item: -
    or Any available + or any available

    #reserves">, ()

    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/acqcontract.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/acqcontract.tmpl new file mode 100644 index 0000000000..da0cf817ae --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/acqcontract.tmpl @@ -0,0 +1,19 @@ + + +

    Vendor Contracts

    + +

    You can define contracts (with a start and end date) and attach it to a vendor. This is used so that at the end of the year you can see how much you spent on a specific contract with a vendor. In some places, contracts are set up with a minimum and maximum yearly amount.

    + +

    Add a Contract

    + +

    At the top of a vendor search results page with only result or at the top of a vendor information page you will see a 'New Contract' button.

    + +

    The contract form will ask for some very basic information about the contract.

    + +

    Important: You will not be able to enter a contract retrospectively, the end date must not be before today's date.

    + +

    Once the contract is saved it will appear below the vendor information.

    + +

    It will also be an option when creating a basket.

    + + \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/acqui-home.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/acqui-home.tmpl index 278302d355..8b0c0e05b9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/acqui-home.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/acqui-home.tmpl @@ -1,17 +1,13 @@ -

    Acquisitions Help

    +

    Acquisitions

    -

    What is Acquisitions?

    The Koha Acquisitions module provides a way where the library can record orders placed with vendors and manage purchase budgets.

    -

    You do not need to use Acquisitions to add items to your catalog. If you do not want to track orders and budget expenditure, then use the "Add MARC" feature in Cataloging to add new bibliographic and item records.

    -

    How to place an order?

    +

    You do not need to use Acquisitions to add items to your catalog, Acquisitions is used only to track vendors and spending against your budgets.

    -

    To place an order, the first step is to locate your Vendor (supplier). If no Vendor exists, you will need to create one. Once you have a Vendor you can place an order.

    What needs to be setup to use Acquisitions?

    -

    To make the most of acquisitions the following needs to be setup under System Administration

    - \ No newline at end of file +

    Before using the Acquisitions Module you will want to make sure that you have completed all of the set up.

    + +

    First, set your Acquisitions System Preferences and Acquisitions Administration to match your library's workflow.

    + + \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/basket.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/basket.tmpl index 5b7799a3c8..99d97a0298 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/basket.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/basket.tmpl @@ -1,20 +1,95 @@ -

    Placing an Order Help

    +

    Placing an Order

    -

    What is a Basket and Order?

    -

    A Basket is used to group a set of order lines. An order is placed for an individual item.

    -

    An Order can have multiple copies/units placed against it. A Basket can have multiple Orders.

    +

    Once your basket is created you are presented with several options for adding items to the order.

    -

    How do I add Items to an Order?

    -
      -
    1. From an existing record - Use the search to locate the bibliographic record of the item that you wish to order more copies of.
    2. -
    3. From A Suggestion - view suggestions placed by Patrons and add to the item to the basket.
    4. -
    5. From a new (empty) record - If you know that the item is not in the library already, then create a new record from scratch.
    6. -
    - -

    TIP: Always check your Catalog first

    -

    It is highly advisable that you get in the habit of checking the catalog first before placing an order for a new item. This saves unnecessary duplicate bibliographic records in your database and any need to merge/deduplicate records.

    + -

    Do I have to "Close" a Basket?

    -

    No, this is not necessary, you will still be able to mark items received without closing a basket. Closing a basket is good practice for keeping track of late orders which is discussed in this manual.

    \ No newline at end of file +

    Once you have entered the info about the item you need to enter the Accounting information.

    + + + +

    Once an item is added to the basket you will be presented with a basket summary.

    + +

    From here you can edit or remove the items you have added.

    + +

    Also on the summary page you have the option to edit the information you entered about the basket by clicking the 'Edit basket header information' button, deleting the basket altogether by clicking the 'Delete this basket' button, or exporting your basket as a CSV file by clicking the 'Export this basket as CSV' button.

    + +

    Once you're sure your basket is complete you can click 'Close this basket' button to indicate that this basket is complete and has been sent to the vendor.

    + +

    Important: A basket with at least one items marked as 'uncertain price' will not be able to be closed

    + +

    Clicking the 'Uncertain Prices' button will up a list of items with uncertain prices to quick editing.

    + +

    Important: The Uncertain Prices page is independent of the basket, it is linked to the vendor, so you will see all items on order for this vendor with uncertain prices.

    + +

    Printing Baskets

    + +

    When you are finished adding items to your basket you want to click 'Close this Basket'

    + +

    You will be asked if you want to create a purchase order at this time.

    + +

    Your completed order will be listed on the Basket Grouping page for the printing or further modification.

    + +

    Clicking 'Print' below your order will generate a PDF for printing. The PDF will have all of your library information followed by the items in your order.

    + + \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/basketgroup.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/basketgroup.tmpl new file mode 100644 index 0000000000..b43f0f58d8 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/basketgroup.tmpl @@ -0,0 +1,12 @@ + + +

    Basket Groups

    + +

    A basket group is a group of closed baskets that you can perform actions on.

    + +

    Create a basket group

    + +

    A basket group is simply a group of baskets. In some libraries, you have several staff members that create baskets, and, at the end of a period of time, someone then groups them together to send to the vendor in bulk. That said, it is possible to have one basket in a basket group if that's the workflow used in your library.

    + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/basketheader.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/basketheader.tmpl new file mode 100644 index 0000000000..48cde6e607 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/basketheader.tmpl @@ -0,0 +1,16 @@ + + +

    Adding a Basket

    + +

    When adding a basket you want to give it a name that will help you identify it later. The notes fields are optional and can contain any type of information.

    + +

    If you have added contracts to the vendor you're ordering from, you will also have an option to choose which contract you're ordering these items under.

    + +

    When finished, click 'Save'

    + +

    Editing Basket Headers

    + +

    After creating your basket you can edit the name of the basket, the notes associated with it and the contract you're ordering against.

    + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/booksellers.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/booksellers.tmpl index 7a16728b0e..effa75922e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/booksellers.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/booksellers.tmpl @@ -1,58 +1,9 @@ -

    Ordering

    - -

    - Receiving OrdersAfter your orders have been entered into the system and sent off to the vendors, you will need to mark them received. - -TIP: To receive serials see the 'Receiving Serials' part of this manual.

    - +

    Vendor Search

    + +

    At the top of the various Acquisition pages there is a quick search box where you can perform either a Vendor Search or an Order Search.

    + +

    In the Vendor Search you can enter any part of the vendor name to get results.

    \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/lateorders.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/lateorders.tmpl index 70ff67f132..2ae604450a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/lateorders.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/lateorders.tmpl @@ -1,13 +1,15 @@ -

    Late Orders

    -

    -Late orders is a report that checks for orders that were placed X days ago and still haven't been marked as received. -

    - +

    Claims & Late Orders

    +

    If you have entered in an email address for the vendors in your system you can send them claim emails when an order is late. Before you can send claims you will need to set up an acquisitions claim notice.

    + +

    Upon clicking on the link to 'Late Orders' from the Acquisitions page you will be presented with a series of filter options on the left hand side.

    + +

    Once you filter your orders to show you the things you consider to be late you will be presented with a list of these items.

    + +

    To the right of each late title you will be see a checkbox. Check off the ones you want a claim letter sent to and click 'Claim Order.' This will automatically send an email to the vendor at the email address you have on file.

    + +

    If you would rather use a different acquisition claim letter (other than the default) you can create that in the notices module and choose it from the menu above the list of late items.

    \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/neworderbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/neworderbiblio.tmpl new file mode 100644 index 0000000000..e37523a3f7 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/neworderbiblio.tmpl @@ -0,0 +1,15 @@ + + +

    Order from an Existing Record

    + +

    If you are ordering another copy of an existing item, you can simply search for the record in your system

    + + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/neworderempty.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/neworderempty.tmpl index 85af6a9c02..0cd90a02e5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/neworderempty.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/neworderempty.tmpl @@ -1,18 +1,11 @@ -

    Order Details Help

    +

    Order from a New Empty Record

    -

    What is the "Vendor Price"?

    -

    The vendor price is the price given to you by the vendor, sometimes called the "List Price". Depending on how the Vendor is setup this may or maynot include any discount given to you by the vendor and/or any sales tax. See Vendors for more information.

    +

    To order from a record that can't be found anywhere else, choose the 'From a new (empty) record'

    -

    What is the "Replacement Price"?

    -

    The replacement price is the total cost of what it would cost to replace the item if you had to purchase the item retail at recommended retail. This is the amount that a patron could be charged if item is lost or damaged beyond repair.

    - -

    What is the "Budgeted Price"?

    -

    This is the price you expect to pay for the item, including any discount and any relevant sales tax (depending on the vendor setup) and is the amount that will be charged to your Committed budget.

    - -

    What is the "Actual Price"?

    -

    This is the price that shows on the invoice or packing slip when you receive the item. When placing an order, Koha will automatically calculate this for you. When an item is received, this can be over keyed with the actual value. This is to take into account any slight differences in rounding or price fluctuations between ordering the item and actually recieving it.

    -

    The Actual price is what is committed to your Spent budget.

    + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/newordersuggestion.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/newordersuggestion.tmpl new file mode 100644 index 0000000000..b7075c70e5 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/newordersuggestion.tmpl @@ -0,0 +1,11 @@ + + +

    Order from Purchase Suggestion

    + +

    If you allow patrons to make purchase suggestions then you can place orders from those suggestions

    + + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/orderreceive.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/orderreceive.tmpl index e74243668a..dcf43f7aad 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/orderreceive.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/orderreceive.tmpl @@ -1,21 +1,17 @@ -

    Receiving Orders Help

    +

    Receiving Orders

    -

    How do I receive items that have arrived?

    -

    Firstly, check the catalog details that you are recieiving the right item. If these are correct, you can add the item details.

    -

    For each item you will need to check the following:

    - - -

    How do I receive multiple identical items?

    -

    If you have ordered multiple copies of the same item, then use the "+" to bring up another Item Details input fieldset.

    -

    For each copy you will need to set that Item Barcode, Home Library and Item Type.

    -

    Each time you add a new item, the Quantity Received under Accounting Details should be updated.

    -

    If you press the "+" by mistake, use the "-" button to remove the unwanted Item Details input fieldset

    +

    Orders can be received from the vendor information page or the vendor search results page.

    + +

    After clicking 'Receive shipment' you will be asked to enter a vendor invoice number and a shipment received date.

    + +

    The receive page will list all items still on order with the vendor regardless of the basket the item is from.

    + +

    To receive a specific item, click the 'Receive' link to the right of the item.

    + +

    From this form you can alter the cost information. You can also choose to only receive 1 of multiple items if only 1 arrived. Once you have made any changes necessary, click 'Save' to mark the item as received.

    + +

    You will also see that the item is received if you view the basket.

    \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/parcel.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/parcel.tmpl index 59877f9547..841136b3a1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/parcel.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/parcel.tmpl @@ -1,30 +1,17 @@

    Receiving Orders

    -

    After your orders have been entered into the system and sent off to the vendors, you will need to mark them received. -TIP: To receive serials see the 'Receiving Serials' part of this manual.

    - + +

    Orders can be received from the vendor information page or the vendor search results page.

    + +

    After clicking 'Receive shipment' you will be asked to enter a vendor invoice number and a shipment received date.

    + +

    The receive page will list all items still on order with the vendor regardless of the basket the item is from.

    + +

    To receive a specific item, click the 'Receive' link to the right of the item.

    + +

    From this form you can alter the cost information. You can also choose to only receive 1 of multiple items if only 1 arrived. Once you have made any changes necessary, click 'Save' to mark the item as received.

    + +

    You will also see that the item is received if you view the basket.

    \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/parcels.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/parcels.tmpl index f7b2eddaa2..f1dd6b3ac2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/parcels.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/parcels.tmpl @@ -2,29 +2,16 @@

    Receiving Orders

    -

    After your orders have been entered into the system and sent off to the vendors, you will need to mark them received.

    +

    Orders can be received from the vendor information page or the vendor search results page.

    - - \ No newline at end of file +

    After clicking 'Receive shipment' you will be asked to enter a vendor invoice number and a shipment received date.

    + +

    The receive page will list all items still on order with the vendor regardless of the basket the item is from.

    + +

    To receive a specific item, click the 'Receive' link to the right of the item.

    + +

    From this form you can alter the cost information. You can also choose to only receive 1 of multiple items if only 1 arrived. Once you have made any changes necessary, click 'Save' to mark the item as received.

    + +

    You will also see that the item is received if you view the basket.

    + + \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/supplier.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/supplier.tmpl index bc169d1ac6..20783841c3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/supplier.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/supplier.tmpl @@ -1,43 +1,51 @@ -

    Creating a vendor

    +

    Vendors

    - \ No newline at end of file +

    Before any orders can be places you must first enter at least one vendor.

    + +

    Add a Vendor

    + +

    To add a vendor click the 'New Vendor' button on the Acquisitions page.

    + +

    The vendor add form is broken into three pieces.

    + + + +

    View/Edit a Vendor

    + +

    To view a vendor's information page you must search for the vendor from the Acquisitions home page. Your search can be for any part of the Vendor's name.

    + +

    From the results, click on the name of the vendor you want to view or edit.

    + +

    To make changes to the vendor, simply click the 'Edit' button.

    + + \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/z3950_search.tmpl new file mode 100644 index 0000000000..61571747d2 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/z3950_search.tmpl @@ -0,0 +1,17 @@ + + +

    Order from an External Source

    + +

    If you want to search other libraries for an item to purchase you can use the 'From an external source' option which will allow you to order from a MARC record found via a Z39.50 search

    + + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/suggestion/suggestion.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/suggestion/suggestion.tmpl index 9089b01d6b..3a5a3967bb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/suggestion/suggestion.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/suggestion/suggestion.tmpl @@ -1,65 +1,24 @@ -

    Suggestions Management

    -

    What are Purchase Suggestions?

    -

    -Purchase suggestions give the users of the OPAC a way to lodge requests for the library to purchase for items. -

    -

    -IMPORTANT: To use this feature, purchase suggestions need to be turned on in -system preferences.
    +

    Purchase Suggestions

    -

    - -IMPORTANT: Suggestions are only managed here if the emailPurchaseSuggestions preference is turned off.
    +

    Depending on your settings in the suggestion system preference, patrons may be able to make purchase suggestions via the OPAC. When a suggestion is waiting for library review, it will appear on the Acquisitions home page in the list of links on the left of the page.

    - -

    Manage Suggestions
    -

    -

    -To manage suggestions, go to More > Acquisitions -

    - +

    Clicking 'Manage suggestions' will take you to the suggestion management tool. If there are no pending suggestions you can access the suggestion management tool by clicking the 'Manage suggestions' link on the menu on the left of the Acquisitions page.

    + +

    Your suggestions will be sorted into three categories: Accepted, Pending, and Rejected. Each accepted or rejected suggestion will show the name of the librarian who managed the suggestion and the reason they gave for accepting or rejecting it (found under 'Status').

    + +

    For libraries with lots of suggestions, there are filters on the left hand side of the Manage Suggestions page to assist in limiting the number of titles displayed on the screen.

    + +

    Clicking on the blue headings will expand the filtering options and clicking '[clear]' will clear all filters and show all suggestions.

    + +

    When reviewing 'Pending' suggestions you can choose to check the box next to the item(s) you want to approve/reject and then choose the status and reason for your selection. You can also choose to completely delete the suggestion by checking the 'Delete selected' box.

    + +

    Reasons for accepting and rejecting suggestions are defined by the SUGGEST authorized value.

    + +

    If you choose 'Others...' as your reason you will be prompted to enter your reason in a text box. Clicking 'Cancel' to the right of the box will bring back the pull down menu with authorized reasons.

    + +

    Once you have clicked 'Submit' the suggestion will be moved to the matching tab. The status will also be updated on the patron's account in the OPAC and an email notice will be sent to the patron using the template that matches the status you have chosen.

    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl index 53ff7b7eb4..1001d8ebf0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl @@ -391,6 +391,7 @@ function checkMultiHold() { Information + "> @@ -458,9 +459,14 @@ function checkMultiHold() { + - + + +

    &cardnumber=&showallitems=1">Show all items ( hidden)

    + + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl index f7c2adf6cd..bd0752cd08 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl @@ -247,7 +247,15 @@ - + +

    OR

    + +
    diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl index 468e90f78a..95a8fed1e3 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -582,7 +582,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {

    At library:

    At branch:

    -

    Issues between: and: now (current)

    +

    Subscription from: to: now (current)

    Missing issues:

    ()

    diff --git a/kohaversion.pl b/kohaversion.pl index 3fbc4e1b34..cd55624253 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.03.00.032'; + our $VERSION = '3.03.00.035'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install diff --git a/opac/opac-search.pl b/opac/opac-search.pl index d22049f3fe..c145729d7e 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -317,7 +317,7 @@ my @limits; @limits = split("\0",$params->{'limit'}) if $params->{'limit'}; if($params->{'multibranchlimit'}) { -push @limits, join(" or ", map { "branch: $_ "} @{GetBranchesInCategory($params->{'multibranchlimit'})}) ; + push @limits, '('.join( " or ", map { "branch: $_ " } @{ GetBranchesInCategory( $params->{'multibranchlimit'} ) } ).')'; } my $available; diff --git a/reserve/request.pl b/reserve/request.pl index 7e513648eb..a047f4d894 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -57,6 +57,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my $multihold = $input->param('multi_hold'); $template->param(multi_hold => $multihold); +my $showallitems = $input->param('showallitems'); # get Branches and Itemtypes my $branches = GetBranches(); @@ -319,6 +320,7 @@ foreach my $biblionumber (@biblionumbers) { my $biblioitem = $biblioiteminfos_of->{$biblioitemnumber}; my $num_available = 0; my $num_override = 0; + my $hiddencount = 0; $biblioitem->{description} = $itemtypes->{ $biblioitem->{itemtype} }{description}; @@ -376,7 +378,7 @@ foreach my $biblionumber (@biblionumbers) { $item->{notforloanvalue} = $notforloan_label_of->{ $item->{notforloan} }; } - + # Management of lost or long overdue items if ( $item->{itemlost} ) { @@ -386,6 +388,10 @@ foreach my $biblionumber (@biblionumbers) { : $item->{itemlost} == 2 ? "(long overdue)" : ""; $item->{backgroundcolor} = 'other'; + if (GetHideLostItemsPreference($borrowernumber) && !$showallitems) { + $item->{hide} = 1; + $hiddencount++; + } } # Check the transit status @@ -458,6 +464,7 @@ foreach my $biblionumber (@biblionumbers) { $biblioloopiter{warn} = 1; $biblioloopiter{none_avail} = 1; } + $template->param( hiddencount => $hiddencount); push @bibitemloop, $biblioitem; }