Bug 10081: add library name to IndependentBranches error message

With IndependentBranches turned on, if you try to check out an item
which belongs to another library you will get an error message which is
missing the library name. This patch corrects the problem by passing the
necessary variable to the template and outputting the library name using
the KohaBranchName TT plugin.

To test, turn on IndependentBranches and try to check out an item
belonging to another library (note that you must test with a staff user
who is not a superlibrarian). The error message you see should include
the name of the library to which the item belongs:

"This item belongs to Nelsonville and cannot be checked out from this
location."

Checkouts of items belonging to the library should be unaffected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10765 - [SIGNED-OFF] Update POD of C4::Koha::GetSupportList() to use TT syntax

This patch updates the example template syntax in the POD for
C4::Koha::GetSupportList() to use Template Toolkit syntax.

To test, view the POD for  C4::Koha::GetSupportList() and confirm that
it looks correct.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
This patch works as advertised (verified with "perldoc C4::Koha"),
for GetSupportList, but it does not fix a a similar example for
GetItemTypes, getauthtypes and getframework in the same file,
which still has the old template syntax. So a followup or separate
bug(s) for those are called for.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
It seems the default option is not in used in templates.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10764 - Update POD of C4::Items::GetItemStatus() to use TT syntax

This patch updates the example template syntax in the POD for
C4::Items::GetItemStatus() to use Template Toolkit syntax.

To test, view the POD for C4::Items::GetItemStatus() and confirm that it
looks correct.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
This patch works as advertised (verified with "perldoc C4::Items"),
for GetItemStatus, but it does not fix a a similar example for
GetItemLocation in the same file, which still has the old template
syntax. So a followup or separate bug for that is called for.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
It seems the default option is not in used in templates.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10763 - [SIGNED-OFF] Update POD of C4::Creators::Lib::html_table() to use TT syntax

This patch updates the example template syntax in the POD for
C4::Creators::Lib::html_table() to use Template Toolkit syntax.

To test, view the POD for C4::Creators::Lib::html_table() and confirm
that it looks correct.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Checked the POD with "perldoc C4/Creators/Lib.pm" before and after applying
the patch. The example now uses TT syntax, and looks sensible.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 8670 - Update POD of C4::Branch::GetBranches() to use TT syntax

This patch updates the example template syntax in the POD for
C4::Branch::GetBranches() to use Template Toolkit syntax.

To test, view the POD for C4::Branch::GetBranches() and confirm that it
looks correct.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Checked the POD with "perldoc C4/Branch.pm" before and after applying
the patch. The example now uses TT syntax, and looks sensible.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10628: make sure AutomaticItemReturn doesn't prevent holds queue from filling local holds with local items

For some reason, C4::HoldsQueue::MapItemsToHoldRequests used the system
preference AutomaticItemReturn to decide if an attempt to fill local
holds with local items. No explanation of this behavior is provided.

This patch removes this behavior, and also adjusts the calculation
of the lead-cost library to always return the pickup library if it
is on the list of libraries that could fill the hold -- on the
basis that if the item is already at the pickup library, its
transport cost is inherently zero.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and adds unit tests.
Tested with some examples and those worked correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>