]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 7468: Use Modern::Perl
Katrin Fischer [Thu, 16 Jan 2020 01:34:35 +0000 (01:34 +0000)]
Bug 7468: Use Modern::Perl

Just a tiny coding guidelines fix.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 7468: fix the export labels popup header
Maryse Simard [Thu, 16 Jan 2020 14:19:39 +0000 (09:19 -0500)]
Bug 7468: fix the export labels popup header

When exporting a barcode range, the export popup should display "1 batch
to export" instead of "0 batches to export". In this context, it can be
considered a label batch and should be counted as such.

To test:
When clicking the "Print range" button, the popup should show "1 batch
to export".

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 7468: (follow-up) Add missing filters
Maryse Simard [Wed, 17 Jul 2019 15:51:26 +0000 (11:51 -0400)]
Bug 7468: (follow-up) Add missing filters

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 7468: (follow-up) fix label-edit-range template
Maryse Simard [Wed, 17 Jul 2019 13:41:09 +0000 (09:41 -0400)]
Bug 7468: (follow-up) fix label-edit-range template

Edit the labels/label-edit-range.tt template to follow current
standards :
    - Use footer javascript
    - Use bootstrap grid
    - Use jQuery Validation plugin for validation

Also fixes breadcrumbs to be more specific.

To test:
Make sure the page looks correct and still works as expected.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 7468: (follow-up) Make sure only integers are accepted as from/to values
Charles Farmer [Wed, 8 Aug 2018 20:20:40 +0000 (16:20 -0400)]
Bug 7468: (follow-up) Make sure only integers are accepted as from/to values

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 7468: Showing the error message according to the community interface patterns...
Charles Farmer [Fri, 26 Jan 2018 20:49:48 +0000 (15:49 -0500)]
Bug 7468: Showing the error message according to the community interface patterns, fixing a javascript condition

TEST PLAN++

1) Apply all the patches
2) Connect to the intranet with an account with permissions to visit the "Tools" page
3) Go to /cgi-bin/koha/labels/label-home.pl
    . Either by entering the URL directly
    . OR, from the front page, by clicking "Tools", followed by the hyperlink "Label creator" under the "Catalog" section
4) Under the "+ New" button, a new option should be available: "Barcode range"
5) Fill the "From:" and the "To:" fields of the "Print barcode range" form
    . Keeping both fields at "0" should trigger a warning beside the first field: "*Cannot be smaller than 1"
    . If the value "From:" is greater the "To:" value, a warning should appear beside the second field: "*Cannot be smaller than the starting value"
    . Make sure the form doesn't let you enter non-numerical values
    . For a casual test, use "From: 1000" and "To: 1100"
6) After pressing the "Print Range" button, choose a template, a layout, and a starting position
    . The "DEFAULT TEMPLATE 01" has a page height of 5pt and a page width of 0pt, don't use it
    . All the default layouts should look alike, since we're only printing a barcode over a number, and not bibliographic information
    . Using a layout not defined as 'Barcode' will show a warning message
7) Clicking the "Export" button should lead to a second dialog window with a "Download as PDF" hyperlink. Clicking the link should prop up a download dialog box
8) Save the PDF locally, or simply open it, and make sure the options you used were taken into account

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 7468: Add warning when range has non-existent barcodes
David Bourgault [Thu, 5 Oct 2017 13:40:19 +0000 (09:40 -0400)]
Bug 7468: Add warning when range has non-existent barcodes

+ Added a warning when the user selects a range with some non-existent barcodes, and a layout without barcodes.
This allows the user to print barcodes of items not in the database if he so desires, but will warn him if he tries to print only biblios (which results in missing entries or a blank page).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 7468: Fix 'false' message on Firefox
David Bourgault [Wed, 4 Oct 2017 13:12:11 +0000 (09:12 -0400)]
Bug 7468: Fix 'false' message on Firefox

It seems I was using an href to a javascript function in the 'Print Range' button, which Chrome didn't mind, but Firefox did understand.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 7468: Print barcodes by range
David Bourgault [Mon, 18 Sep 2017 14:55:05 +0000 (10:55 -0400)]
Bug 7468: Print barcodes by range

Adds an option to the label creator to print a range of barcodes.
Only allows printing to PDF.

C4/Label.pm had to get minor changes to override database-based barcode
generation. Same with labels/label-create-pdf.pl. By default, the
barcode is fetched from the database using the itemnumber, but when
printing ranges, you might not have a corresponding  database entry.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 3426: Keep note about sequence of subfields
Katrin Fischer [Thu, 16 Jan 2020 01:00:28 +0000 (01:00 +0000)]
Bug 3426: Keep note about sequence of subfields

Bug 9156 changed the wording of the pref slightly to make it
clear that the subfield sequence of the record will be used,
not the sequence of the subfields defined in the pref.

This just reinstates the note:
The order of the subfields in the record will be preserved.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 3426: Allow for multiple fields in itemcallnumber syspref
Nick Clemens [Thu, 19 Dec 2019 05:29:47 +0000 (05:29 +0000)]
Bug 3426: Allow for multiple fields in itemcallnumber syspref

Note that we change both cataloguing/additem.pl and C4/Items->PrepareItemrecordfordisplay

I can find no code that uses callnumber from the C4/Items sub, except for the itemrecorddisplay script
which is not called with an itemnumber from Koha and should be deprecated for REST or ILSDI or OAI (imho)

To test:
 1 - Define itemcallnumber syspref as "082ab,092ab,9520,245a"
 2 - Find a record with no items
 3 - Ensure it has no 082 field, but an 092 field
 4 - Go to add an item - itemcallnumber is empty
 5 - Apply patch
 6 - Go to add item, itemcallnumber should be the 092ab fields
 7 - Delete the 092 field
 8 - Go to add item, itemcallnumber should be the 245a
 9 - Edit the callnumber to be "testing" and save item
10 - For should now show itemcallnumber="testing" as default
11 - Browse to http://localhost:8081/cgi-bin/koha/services/itemrecorddisplay.pl?itemnumber=## subbing the correct itemnumber
12 - Ensure the callnumber is defaulting to testing
13 - delete the item you created
14 - browse to URL above - callnumber should now be 245 again
15 - Add an 092 field to record and ensure it is now default callnumber
16 - Add an 082 field, it should now be default

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24435: Add Koha::Biblio->items_count
Tomas Cohen Arazi [Thu, 16 Jan 2020 16:32:25 +0000 (13:32 -0300)]
Bug 24435: Add Koha::Biblio->items_count

This patch introduces a handy shortcut to get the items count for a
biblio. So instead of calling:

  $count = $biblio->items->count;
you can call:
  $count = $biblio->items_count;

The use case for this, is when we want to embed information on objects
to be sent as API responses. In that case, calling ->items->count needs
to be done manually on the controller script, with interesting added
complexity. With this kind of method, we can just require it to be
embedded automagically by calling the following on the API:

   $biblio->to_api({ embed => { items_count => {} } });

If there are several nested layers of objects, doing manually can get
really tricky and error prone.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24435: Unit tests
Tomas Cohen Arazi [Thu, 16 Jan 2020 16:32:04 +0000 (13:32 -0300)]
Bug 24435: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24430: Remove CountBiblioInOrders and its traces
Tomas Cohen Arazi [Wed, 15 Jan 2020 19:28:00 +0000 (16:28 -0300)]
Bug 24430: Remove CountBiblioInOrders and its traces

This patch replaces the only uses of CountBiblioInOrders and makes that
code use $biblio->orders->count instead.

Test nothing breaks in basket.pl and parcel.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24430: Add ->orders and ->active_orders_count to Koha::Biblio
Tomas Cohen Arazi [Wed, 15 Jan 2020 19:25:52 +0000 (16:25 -0300)]
Bug 24430: Add ->orders and ->active_orders_count to Koha::Biblio

This patch introduces an accessor to the related orders, and a method
that returns the active orders count. The target usage for the count is the
API. In the rest of the codebase, we would just call:

    $biblio->orders->count

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24430: Unit tests
Tomas Cohen Arazi [Wed, 15 Jan 2020 19:25:19 +0000 (16:25 -0300)]
Bug 24430: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24419: Add Koha::Suggestion->suggester accessor
Tomas Cohen Arazi [Tue, 14 Jan 2020 15:47:19 +0000 (12:47 -0300)]
Bug 24419: Add Koha::Suggestion->suggester accessor

This patch adds a ->suggester accessor to the Koha::Suggestion class. It
will return undef if no suggester, and a Koha::Patron object otherwise.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Suggestion.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24418: Unit tests
Tomas Cohen Arazi [Tue, 14 Jan 2020 13:09:12 +0000 (10:09 -0300)]
Bug 24418: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24418: Add koha_object(s)_class methods to Suggestion
Tomas Cohen Arazi [Tue, 14 Jan 2020 13:11:00 +0000 (10:11 -0300)]
Bug 24418: Add koha_object(s)_class methods to Suggestion

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24418: Add Koha::Biblio->suggestions
Tomas Cohen Arazi [Tue, 14 Jan 2020 13:09:40 +0000 (10:09 -0300)]
Bug 24418: Add Koha::Biblio->suggestions

This patch adds the mentioned accessor. To test:

1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 12502: (follow-up) Adds formatting for datatables export
Maryse Simard [Thu, 14 Nov 2019 13:50:30 +0000 (08:50 -0500)]
Bug 12502: (follow-up) Adds formatting for datatables export

Add a format option to the datatables export that remove .noExport
elements present in a data cell, just as .noExport columns are
not exported.

To test:
1. For late orders (which uses .noExport elements in data cells) :
    Export data in any format using the export button at the top
    of the datatable.
        => data should exclude "Add/Edit note" label, but
        otherwise look the same as before the patch.
2. Try exporting data in other datatables in Koha and make sure
exported data is the same before and after applying the patch.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 12502: (QA follow-up) Remove the Save button
Maryse Simard [Thu, 14 Nov 2019 13:48:13 +0000 (08:48 -0500)]
Bug 12502: (QA follow-up) Remove the Save button

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 12502: (follow-up) Use modal to add/edit order notes
Maryse Simard [Tue, 16 Jul 2019 19:24:51 +0000 (15:24 -0400)]
Bug 12502: (follow-up) Use modal to add/edit order notes

Replace inputs to edit notes by a link opening a modal, similar
to the basket summary page. This makes it possible for the notes
to appear in the datatable exports.

Also fix exporting with the export as csv button at the bottom
of the page to export notes.

Test plan :
1) In the late orders table (acqui/lateorders.pl), a link should
appear in both the internal and vendor note column, following the
current value if it exist.
    -> This link should read "Add ..." if there is no existing note
    or "Edit ..." if there is.
2) Click on the link. A modal should appear. Confirm that saving a
note works as expected.
3) Try exporting to any format using either the button at the top
of the table or the one at the bottom of the page.
    -> The three new columns and their values should appear in the
    export.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 12502: Add vendor note, internal note, ordernumber and isbn to late orders page
David Bourgault [Mon, 25 Sep 2017 19:18:38 +0000 (15:18 -0400)]
Bug 12502: Add vendor note, internal note, ordernumber and isbn to late orders page

Test plan:

0) Make sure you have a late order
    a) Create a test vendor unless you have one
    b) Create a test basket unless you have one
    c) Close the basket to mark the order as late
1) Go to the late orders table
Before patch : Orderno, ISBN, vendor notes, internal notes are absent
After patch: fields are present

2) Edit the vendor note and/or the internal note
3) Press the save notes button
4) Refresh page and cache (CTRL+F5), if notes have been correctly saved, your modifications should be displayed.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 16784: (follow-up) Add missing filter
Owen Leonard [Wed, 15 Jan 2020 18:00:18 +0000 (18:00 +0000)]
Bug 16784: (follow-up) Add missing filter

This follow-up adds a missing template filter quiet qa tool warning.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 16784: Add table configuration on suggestions table
Owen Leonard [Sun, 12 Jan 2020 20:28:16 +0000 (20:28 +0000)]
Bug 16784: Add table configuration on suggestions table

This patch adds DataTables column configuration and export options to
the suggestions management tables in the staff interface.

The columns settings made via the administrative interface will affect
tables under each tab in the interface whether it be organized by
status, library, etc. However because of the way the KohaTable function
is currently written, changes made via the "Columns" button will only
affect the visible table.

To test, apply the patch and go to Acquisitions -> Suggestions.

 - Under each tab, the table of suggestions should have a DataTables
   toolbar with export and columns buttons. These controls should work
   correctly:
   - Showing and hiding columns should work as expected
   - Exports should work, excluding the first and last columns
 - Test the tables when using the various "Organize by" settings.
 - Test changing the settings in Administration -> Columns settings.
   - Verify that the changes you make to that configuration are
     reflected in the suggestions tables.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 15686: Rename "item level holds" circ rule column to "OPAC item level holds"
Lisette Scheer [Fri, 10 Jan 2020 21:26:16 +0000 (21:26 +0000)]
Bug 15686: Rename "item level holds" circ rule column to "OPAC item level holds"

This patch changes the column heading on smart-rules.pl to indicate that it only effects item level holds on the OPAC side, rather than the intranet.
To test:
1. Go to Administration, circulation and fine rules.
2. Observe incorrect heading on both the top and bottom of the table.
3. Apply the patch.
4. Repeat step 1.
5. Observe new headings.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24343: Show subtitle, number and parts in course reserves list of titles in staff...
Owen Leonard [Sat, 4 Jan 2020 21:53:45 +0000 (21:53 +0000)]
Bug 24343: Show subtitle, number and parts in course reserves list of titles in staff client

Adapted from Bug 23784: At the moment only the title will display in the
course reserves details, but not the information from other title
fields. For series with multiple volumes that can lead to confusing
display. The patch makes use of the new include to display 245$abnp.

To test:
- Add mulitple records to a course reserve course
  Make sure you have titles with different combinations of 245$b$n$p
  - Look at the course details in the staff client
  - Verify only $a displays
  - Apply patch
  - Reload
  - Verify now the full information displays

  Depending on your installation, you might want ot check that the 245
  are correctly mapped and save the record once so the database
  fields are correctly filled.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24344: Modify OPAC link to suggest existing record for purchase
Owen Leonard [Sat, 4 Jan 2020 23:12:25 +0000 (23:12 +0000)]
Bug 24344: Modify OPAC link to suggest existing record for purchase

This patch modifies the link to suggest purchase of an existing record
from the OPAC. The icon is changed to "gift" and the text shortened to
"Suggest for purchase."

To test, apply the patch and view the detail page of any record in the
OPAC. Confirm that the modifications look good.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24289: (RM follow-up) Correction to DB update version
Martin Renvoize [Mon, 20 Jan 2020 14:39:06 +0000 (14:39 +0000)]
Bug 24289: (RM follow-up) Correction to DB update version

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24008: Remove minus sign when displaying credit value
Jonathan Druart [Mon, 23 Dec 2019 14:35:25 +0000 (15:35 +0100)]
Bug 24008: Remove minus sign when displaying credit value

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24008: Display warnings in a list
Jonathan Druart [Tue, 10 Dec 2019 11:27:08 +0000 (12:27 +0100)]
Bug 24008: Display warnings in a list

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24008: Display a warning message when deleting a patron with outstanding credits
Jonathan Druart [Mon, 2 Dec 2019 13:24:04 +0000 (14:24 +0100)]
Bug 24008: Display a warning message when deleting a patron with outstanding credits

So far nothing is displayed if a librarian removes patron with
outstanding credits.
Note that outstanding debits blocks the deletion.

Test plan:
- Create a patron with outstanding credit
- Create a patron with outstanding debits
- Delete the 2 patrons
=> With credit - You get a warning but do not block the deletion
=> With debits - You get a warning message that blocks the deletion

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24214: Fix due date formatting when sticky
Jonathan Druart [Wed, 11 Dec 2019 11:20:54 +0000 (12:20 +0100)]
Bug 24214: Fix due date formatting when sticky

When checking out and sticky due date is selected, on the next screen
the due date is displayed iso-formatted, instead of following the
dateformat syspref

Test plan:
0/ Do not apply the patch
1/ Check an item out, with a selected due date. Tick "Remember for
session"
2/ Next screen you see the date like YYYY-MM-DD HH:MM
regarless the value of the dateformat syspref
3/ Apply this patch
4/ Reload the page
=> The date is correctly formatted
5/ Check an item out
=> Due date is correctly set

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24289: DBRev 19.12.00.011
Martin Renvoize [Mon, 20 Jan 2020 13:56:04 +0000 (13:56 +0000)]
Bug 24289: DBRev 19.12.00.011

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24289: Make sure sample_holidays will load after sample_libraries
Jonathan Druart [Thu, 26 Dec 2019 11:06:10 +0000 (12:06 +0100)]
Bug 24289: Make sure sample_holidays will load after sample_libraries

They are inserted depending on their alpha order, and sample_holidays
will fail because of missing branchcode.
This patch suggests a simple fix: rename sample_holidays to
sample_libraries_holidays, to make sure it will be loaded after
sample_libraries

Test plan:
Start a fresh installation and select all sample data

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24289: DBIC changes
Jonathan Druart [Thu, 26 Dec 2019 10:53:57 +0000 (11:53 +0100)]
Bug 24289: DBIC changes

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24289: Add foreign keys on *_holidays.branchcode tables
Jonathan Druart [Thu, 26 Dec 2019 10:42:43 +0000 (11:42 +0100)]
Bug 24289: Add foreign keys on *_holidays.branchcode tables

Those are missing foreign keys, it will also clean the holidays tables
and automatically remove the holidays when a library is removed.

Test plan:
0. Do not apply this patch
1. Create a new library
2. Create special and repeatable holiday for this library
3. Remove the library
=> Notice that the holidays still exist in DB
4. Apply this patch
5. Execute the update database entry
=> Notice that the holidays for this library have been removed from the DB
6. Repeat 1-3
=> Notice that the holidays have been removed along with the library

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24393: Remove event attributes from patron clubs list template
Owen Leonard [Thu, 9 Jan 2020 19:09:31 +0000 (19:09 +0000)]
Bug 24393: Remove event attributes from patron clubs list template

This patch removes some instances of the "onclick" attributes from the
template that lists patron clubs and templates.

To test, apply the patch and go to Tools -> Patron clubs.

 - Test the process of deleting a club template. Clicking the "Delete"
   button should trigger a confirmation. Confirming should delete the
   template.

 - Test the process of deleting a club. In the "Clubs" section of the
   page, click the "Actions" menu next to any club. Clicking the
   "Delete" link should trigger a confirmation. Confirming should delete
   the club.

 - Also in the "Clubs" section of the page, find a club which has
   enrollments. Select "Search to hold" from the "Actions" menu. It
   should take you to the advanced search. On the search results page
   you should have the option to place a hold for the club you selected.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24061: Close after timeout if onafterprint no supported
Jonathan Druart [Fri, 22 Nov 2019 09:16:15 +0000 (10:16 +0100)]
Bug 24061: Close after timeout if onafterprint no supported

Not supported on Chrome < 63
https://www.w3schools.com/tags/ev_onafterprint.asp

Signed-off-by: Gabriel DeCarufel <gabriel@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24061: Close the window after the page has been printed
Jonathan Druart [Wed, 20 Nov 2019 08:19:51 +0000 (09:19 +0100)]
Bug 24061: Close the window after the page has been printed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 16683: Help links to fields 59X in cataloguing form are broken
Owen Leonard [Thu, 21 Nov 2019 16:26:53 +0000 (16:26 +0000)]
Bug 16683: Help links to fields 59X in cataloguing form are broken

This patch adds more specificity to handling of MARC21 documentation
links in the basic MARC editor.

To test, apply the patch and make sure the "advancedMARCeditor" system
preference is set to "Display."

You may need to edit a bibliographic framework so that 09x, 59x, and 69x
tags will display in the editor.

Edit or create a bibliographic record using that framework. Next to each
tag label in the editor should be a "?" link. Clicking this link should
open a new window with the correct Library of Congress documentation
page.

Check the links for 09x, 59x, and 69x tags as well as others to confirm
they open the correct pages.

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 17667: Add tests
Jonathan Druart [Wed, 18 Dec 2019 17:10:07 +0000 (18:10 +0100)]
Bug 17667: Add tests

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 17667: Do not modify quantity of the original standing order when a receipt is...
Jonathan Druart [Wed, 18 Dec 2019 17:10:15 +0000 (18:10 +0100)]
Bug 17667: Do not modify quantity of the original standing order when a receipt is cancelled

When cancelling a receipt, the quantity of the original order is
increased.

Test plan:
Create a basket, mark is as "standing orders"
Create an order
receive it
cancel the receipt
=> Without this patch the quantity of the original order is 2
=> With this patch applied the quantity it always 1

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24433: OPAC account page no longer asks for confirmation before deleting hold
Owen Leonard [Thu, 16 Jan 2020 14:52:00 +0000 (14:52 +0000)]
Bug 24433: OPAC account page no longer asks for confirmation before deleting hold

This patch restores markup added by Bug 21870 and subsequently removed
accidentally by Bug 21772. This allows the OPAC user summary page to
display a confirmation dialog before deleting a hold.

To test, apply the patch and  log in to the OPAC as a user with holds.

 - On the "Your summary" page, click the "Holds" tab.
 - Click the "Cancel" button next to any hold.
 - You should see a modal dialog asking for confirmation, showing the
   correct title.
 - Test both the "Yes" and "No" actions.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24341: Allow for more complex markup in OPAC confirmation dialogs
Owen Leonard [Fri, 3 Jan 2020 17:40:34 +0000 (17:40 +0000)]
Bug 24341: Allow for more complex markup in OPAC confirmation dialogs

This patch changes the globally-available confirmModal() function in the
OPAC so that it uses jQuery's html() function for adding information to
the confirmation modal's body. This will allow for more than just plain
text to be added.

This patch also removes some obsolete lines from the JavaScript in
opac-user.tt and renames some variable for clarity.

To test, apply the patch log in to the OPAC as a user who has holds and
article requests.

 - Test the following interactions, both the confirmation and cancel
   options for each:
     - Cancel a hold
     - Suspend all holds
     - Resume all holds
     - Cancel an article request

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21296: suspend hold ignores system preference on intranet
Owen Leonard [Wed, 20 Nov 2019 20:04:10 +0000 (20:04 +0000)]
Bug 21296: suspend hold ignores system preference on intranet

This patch modifies the DataTable configuration for the table of holds
which displays under the "Holds" tab on the patron's checkout and
details pages. A variable is now defined in the JavaScript with the
value of the "SuspendHoldsIntranet" system preference. This variable is
passed to the DataTable configuration to determine whether the column is
visible or not.

One of the changes made in this patch moves a <script> block so that it
appears before some of the JS includes on the page. This helps keep the
string-defining JS together in one block.

To test, apply the patch and set the "SuspendHoldsIntranet" system
preference to "Allow."

 - Open the checkout page for a patron with one or more holds.
 - Under the "Holds" tab, the table of holds should have a "Suspend"
   column with controls for suspending or resuming holds.
 - Check that the same is true on the patron detail page.
 - Set the "SuspendHoldsIntranet" system preference to "Don't allow."
 - Test the checkout and detail pages again and confirm that the
   "Suspend" column does not appear.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24404: Add missing space on invoices page / remove . from status
Katrin Fischer [Sun, 12 Jan 2020 09:32:17 +0000 (10:32 +0100)]
Bug 24404: Add missing space on invoices page / remove . from status

On the bottom of the invoices page the summary of adjustments and
shipping shows as:

Adjustments plus shipping:2.00

The patch adds the missing space between text and amount.

To test:
- 'Receive shipment' from a result in your vendor search
- Start a new invoice by entering an invoice number, amount
  for shipping cost and fund.
- Finish receive (you don't need to receive anything)
- You should now be on invoice.pl
- Verify Status is 'Open.' and in 'Invoice details' we
  have the amount with the missing space.
- Apply patch, reload the page.
- Verify the missing space is there and the . is gone.
- Close invoice, no . there either.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24333: Add password class to AutoSelfCheck syspref
Nick Clemens [Thu, 9 Jan 2020 12:48:04 +0000 (12:48 +0000)]
Bug 24333: Add password class to AutoSelfCheck syspref

To test:
1 - Go to Administration
2 - Search sysprefs for AutoSelfCheck
3 - Enter something into AutoSelfCheckPass
4 - Note it is not masked
5 - Apply patch
6 - Reload page
7 - Note password is now masked

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24018: Remove die "Not logged in"
Jonathan Druart [Tue, 12 Nov 2019 15:10:53 +0000 (16:10 +0100)]
Bug 24018: Remove die "Not logged in"

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24423: Add biblionumber to modify items link
Nick Clemens [Wed, 15 Jan 2020 15:27:56 +0000 (15:27 +0000)]
Bug 24423: Add biblionumber to modify items link

To test:
- Find/create a bib with at least one item
- From detail.pl, use the checkboxes in the holdings table to select one or more items
- click the "Modify Selected Items" link just above the holdings table to take your item(s) to batch modification
- Change something and click save
- Observe that the Return to the Record link points to a url without a biblionumber: "/cgi-bin/koha/catalogue/detail.pl?biblionumber="
- Apply patch
- Repeat
- The link now works!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Bug 24423: Fix for deletion - cleanup accidental debug inclusiopm

To test:
Repeat prior test plan with 'Delete selected'

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24395: Show initial float using the Price TT plugin on summary page
Katrin Fischer [Tue, 14 Jan 2020 18:44:01 +0000 (18:44 +0000)]
Bug 24395: Show initial float using the Price TT plugin on summary page

For displaying monetary amounts, we should be using the Price TT
plugin everywhere. This adds it to the cash register summary page.

To test:
- Create a cash register
- Check the cash register table for "Initial float"
- Verify the amount shows with more than 2 decimals
- Edit cash register - verify the same display there
- Apply patch
- Check again - it should display now with only 2 decimals

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22220: Fix bib Apache rewrite rule for intranet
Marcel de Rooy [Thu, 16 Jan 2020 14:33:39 +0000 (14:33 +0000)]
Bug 22220: Fix bib Apache rewrite rule for intranet

Trivial change. Speaks for itself.
Since koha/detail.pl does not exist, we cannot break things ;)

Test plan:
[1] Copy the change in apache-shared-intranet.conf to your actual
    apache configuration. Probably in /etc/koha/.
[2] Restart Apache.
[3] Try a biblionumber say 123 on intranet with [your_staff_client]/bib/123.
    Does the detail page come up?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21520: (RM follow-up) Add missed schema update
Martin Renvoize [Mon, 20 Jan 2020 13:33:58 +0000 (13:33 +0000)]
Bug 21520: (RM follow-up) Add missed schema update

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24445: Add z3950 to makefile (bug 13937 follow-up)
Mason James [Fri, 29 Nov 2019 12:11:15 +0000 (12:11 +0000)]
Bug 24445: Add z3950 to makefile (bug 13937 follow-up)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21520: (RM follow-up) Reduce added constraints
Martin Renvoize [Thu, 16 Jan 2020 14:37:15 +0000 (14:37 +0000)]
Bug 21520: (RM follow-up) Reduce added constraints

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21250: DBRev 19.12.00.010
Martin Renvoize [Wed, 15 Jan 2020 16:17:41 +0000 (16:17 +0000)]
Bug 21250: DBRev 19.12.00.010

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24275: Apply anti-the to title column in inventory table
Nick Clemens [Thu, 19 Dec 2019 13:19:11 +0000 (13:19 +0000)]
Bug 24275: Apply anti-the to title column in inventory table

To test:
1 - Go to Tools->Inventory
2 - Click submit (or add options to get a subset of titles)
3 - Try sorting by title, note that titles with leading articles sort including the articles
4 - Apply patch
5 - Reload the page
6 - Note that leading articles are ignored for sorting

Signed-off-by: Deb <dstephen@dubuque.lib.ia.us>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21520: (QA follow-up): Updatedatabase
Matthias Meusburger [Mon, 13 Jan 2020 15:26:30 +0000 (16:26 +0100)]
Bug 21520: (QA follow-up): Updatedatabase

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21520: QA Follow-up: do not build html tags with TT conditions
Matthias Meusburger [Fri, 3 Jan 2020 10:53:34 +0000 (10:53 +0000)]
Bug 21520: QA Follow-up: do not build html tags with TT conditions

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21520: More complex OAI sets mappings
Matthias Meusburger [Wed, 20 Nov 2019 14:59:28 +0000 (15:59 +0100)]
Bug 21520: More complex OAI sets mappings

Currently, the rules used to create OAI sets are processed with the 'or'
boolean operator between each rule.

This patch allows to use 'or' or 'and' between the rules.

The evaluation of the rules is done according to the boolean operators
precedence: AND has a higher precedence than OR.

For example:

A and B or C and D

will be evaluated as follow:

(A and B) or (C and D)

Test plan:

 - Apply the patch
 - Apply the atomicupdate
 - Prove t/db_dependant/OAI/AndSets.t
 - Check that existing mappings still work
 - Try modifying existing mappings
 - Try creating new mappings
 - Check that the boolean operators precedence is correctly taken into account

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 20567: Count found holds for holds limit
Jonathan Druart [Tue, 14 Jan 2020 09:34:48 +0000 (10:34 +0100)]
Bug 20567: Count found holds for holds limit

Signed-off-by: Hans Palsson <hans.palsson@hkr.se>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 20567: Add tests
Jonathan Druart [Tue, 14 Jan 2020 09:33:03 +0000 (10:33 +0100)]
Bug 20567: Add tests

Signed-off-by: Hans Palsson <hans.palsson@hkr.se>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23893: Special care for booleans
Tomas Cohen Arazi [Wed, 15 Jan 2020 12:45:24 +0000 (09:45 -0300)]
Bug 23893: Special care for booleans

This patch acknowledges the fact that in D8 the Mojo::JSON->true and
Mojo::JSON->false values don't translate into integers when passed to
DBIC. It works correctly on D9 onwards, but we haven't formally
deprecated Jessie. This is adding back this translation, in the right
place now that all mappings code has been integrated into
Koha::Object(s) directly.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Object.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24391: Remove event attributes from patron clubs edit template
Owen Leonard [Thu, 9 Jan 2020 17:45:47 +0000 (17:45 +0000)]
Bug 24391: Remove event attributes from patron clubs edit template

This patch removes "onclick" attributes from the template for adding and
editing patron club templates.

To test, apply the patch and go to Tools -> Patron clubs -> New club
template.

Test the process of adding and deleting both club and enrollment fields.
Test during the template add process and when editing an existing
template.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24366: Make sure accessors are used on the right object
Tomas Cohen Arazi [Mon, 13 Jan 2020 19:45:58 +0000 (16:45 -0300)]
Bug 24366: Make sure accessors are used on the right object

This patch makes the Koha::Biblio->to_api method try the accessors on
$self first, and fallback to $self->biblioitem on those he can't.

This way it won't happen that (for example) ->holds will be tried
against ->biblioitem.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24366: Improve hashref construction
Jonathan Druart [Mon, 13 Jan 2020 14:16:20 +0000 (15:16 +0100)]
Bug 24366: Improve hashref construction

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24366: Merge biblioitem in Koha::Biblio->to_api
Tomas Cohen Arazi [Tue, 7 Jan 2020 17:41:50 +0000 (14:41 -0300)]
Bug 24366: Merge biblioitem in Koha::Biblio->to_api

This patch moves the bilbioitem object merge into the
Koha::Biblio->to_api method, as opposed to doing it in the controller.
This is an inevitable change as other endpoints might require to embed
biblio objects, and they need to carry the biblioitem information.

Also, if we merge the tables, the transition will be straightforward
(remove the tests this patch introduces, and merge the mappings from
Koha::Biblioitem into Koha::Biblio).

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t \
           t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass! i.e. the new to_api method is tested, and the
API tests don't expect any behavior change.
3. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24366: Unit tests
Tomas Cohen Arazi [Tue, 7 Jan 2020 17:45:41 +0000 (14:45 -0300)]
Bug 24366: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24350: ->pickup_locations returns unblessed objects
Tomas Cohen Arazi [Tue, 14 Jan 2020 13:29:47 +0000 (10:29 -0300)]
Bug 24350: ->pickup_locations returns unblessed objects

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (RM follow-up) Italian sample notice
Martin Renvoize [Tue, 14 Jan 2020 09:29:45 +0000 (09:29 +0000)]
Bug 23354: (RM follow-up) Italian sample notice

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 18731: Overload K::A::Fund->to_api to avoid conflict
Tomas Cohen Arazi [Mon, 13 Jan 2020 18:44:33 +0000 (15:44 -0300)]
Bug 18731: Overload K::A::Fund->to_api to avoid conflict

This patch overloads the to_api methods on the Fund class, so
conflicting (on mapping) attribute names are not a problem.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Acquisition/Fund.t \
           t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (RM follow-up) Update translated sample_notices
Martin Renvoize [Mon, 13 Jan 2020 16:46:24 +0000 (16:46 +0000)]
Bug 23354: (RM follow-up) Update translated sample_notices

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (RM follow-up) Reword remaining can_be_added_manually
Martin Renvoize [Mon, 13 Jan 2020 16:36:21 +0000 (16:36 +0000)]
Bug 23354: (RM follow-up) Reword remaining can_be_added_manually

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24361: Remove warning from GetAgeRestriction
Jonathan Druart [Mon, 13 Jan 2020 14:35:57 +0000 (15:35 +0100)]
Bug 24361: Remove warning from GetAgeRestriction

Use of uninitialized value $record_restrictions in uc at /kohadevbox/koha/C4/Circulation.pm line 3981

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: Compiled CSS
Martin Renvoize [Mon, 13 Jan 2020 14:13:41 +0000 (14:13 +0000)]
Bug 23354: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: DBRev 19.12.00.009
Martin Renvoize [Mon, 13 Jan 2020 14:12:47 +0000 (14:12 +0000)]
Bug 23354: DBRev 19.12.00.009

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (QA follow-up) Fix spelling in templates
Josef Moravec [Sun, 12 Jan 2020 18:43:03 +0000 (18:43 +0000)]
Bug 23354: (QA follow-up) Fix spelling in templates

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (QA follow-up) Make db update idempotent
Josef Moravec [Sun, 12 Jan 2020 18:41:30 +0000 (18:41 +0000)]
Bug 23354: (QA follow-up) Make db update idempotent

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (QA follow-up) Rename test file
Martin Renvoize [Fri, 10 Jan 2020 11:52:31 +0000 (11:52 +0000)]
Bug 23354: (QA follow-up) Rename test file

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (QA follow-up) Allow manual receipt printing
Martin Renvoize [Fri, 10 Jan 2020 11:48:56 +0000 (11:48 +0000)]
Bug 23354: (QA follow-up) Allow manual receipt printing

This patch adds an alert message that allows receipt printing for
transactions when FinePaymentAutoPopup is not enabled.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (QA follow-up) Add missing filters, remove tab chars
Josef Moravec [Fri, 10 Jan 2020 09:16:21 +0000 (09:16 +0000)]
Bug 23354: (QA follow-up) Add missing filters, remove tab chars

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (QA follow-up) Mark boolean columns in schema
Josef Moravec [Fri, 10 Jan 2020 09:11:30 +0000 (09:11 +0000)]
Bug 23354: (QA follow-up) Mark boolean columns in schema

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: Prevent negatives from being entered
Martin Renvoize [Wed, 20 Nov 2019 12:52:13 +0000 (12:52 +0000)]
Bug 23354: Prevent negatives from being entered

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: Format price on item add
Martin Renvoize [Wed, 20 Nov 2019 12:38:57 +0000 (12:38 +0000)]
Bug 23354: Format price on item add

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (follow-up) Fix for sending code instead of description
Martin Renvoize [Wed, 20 Nov 2019 09:30:48 +0000 (09:30 +0000)]
Bug 23354: (follow-up) Fix for sending code instead of description

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (follow-up) Update for bugs 23049 and 23805
Martin Renvoize [Wed, 20 Nov 2019 07:53:05 +0000 (07:53 +0000)]
Bug 23354: (follow-up) Update for bugs 23049 and 23805

Remove all mentions of accounttype and replace with debit_type_code and
credit_type_code as appropriate.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (follow-up) Ensure 'CASH' payment type is present
Martin Renvoize [Fri, 25 Oct 2019 13:37:34 +0000 (14:37 +0100)]
Bug 23354: (follow-up) Ensure 'CASH' payment type is present

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (follow-up) Make display of debit types configurable
Martin Renvoize [Thu, 17 Oct 2019 12:19:34 +0000 (13:19 +0100)]
Bug 23354: (follow-up) Make display of debit types configurable

This patch adds a the ability to define where a debit type will be
available as a option for use.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: Update to account for bug 23049
Martin Renvoize [Thu, 3 Oct 2019 16:13:25 +0000 (17:13 +0100)]
Bug 23354: Update to account for bug 23049

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: Add Icon for POS system
Martin Renvoize [Thu, 3 Oct 2019 13:39:00 +0000 (14:39 +0100)]
Bug 23354: Add Icon for POS system

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (follow-up) Use 'format_price' for totals
Martin Renvoize [Mon, 23 Sep 2019 13:12:13 +0000 (14:12 +0100)]
Bug 23354: (follow-up) Use 'format_price' for totals

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (follow-up) Input type on jEditable
Martin Renvoize [Mon, 23 Sep 2019 12:51:11 +0000 (13:51 +0100)]
Bug 23354: (follow-up) Input type on jEditable

Update the jEditable plugin to a maintained version and use the new
'number' type to enable increment arrows on click and remap onblur event
to submit.

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: Add tests for Koha::Charges::Sales
Martin Renvoize [Tue, 17 Sep 2019 11:28:56 +0000 (12:28 +0100)]
Bug 23354: Add tests for Koha::Charges::Sales

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: Add permissions
Martin Renvoize [Wed, 11 Sep 2019 09:44:56 +0000 (10:44 +0100)]
Bug 23354: Add permissions

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (follow-up) Responses to feedback
Martin Renvoize [Thu, 5 Sep 2019 09:13:57 +0000 (10:13 +0100)]
Bug 23354: (follow-up) Responses to feedback

This patch impliments a number of refinements requested after the first
round of feedback from the sponsors.

1) Fix padding on pay page
2) Switch 'items to add' from right to left on the page
3) Fix editable columns on pay page
4) Add explanitory text to pay page

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: Add ability to remove items
Martin Renvoize [Tue, 13 Aug 2019 10:16:25 +0000 (11:16 +0100)]
Bug 23354: Add ability to remove items

This patch adds the ability to remove items from a transactions on the
new Point of Sale pay page.

Test plan:
1) Populate a transaction with at least one item.
2) Note the new button to 'Remove item' on the items table.
3) Click the button and confirm the item is removed
4) Signoff

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: Add receipting to Pay page
Martin Renvoize [Tue, 17 Sep 2019 11:28:30 +0000 (12:28 +0100)]
Bug 23354: Add receipting to Pay page

This patch adds receipt printing to the new Point of Sale pay page.

Test plan:
1) Apply patch and run database update
2) Enable automatic receipt printing via the `` system preference.
3) Make a payment for an item via the new POS pay page.
4) Note that a receipt printing dialogue is shown automatically after
   payment.
5) Note that a new notice is available under tools where you can alter
   the content of the receipt.
6) Signoff

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: Add a Point Of Sale 'pay' screen
Martin Renvoize [Tue, 23 Jul 2019 16:23:55 +0000 (17:23 +0100)]
Bug 23354: Add a Point Of Sale 'pay' screen

This patch adds a new Point Of Sale module to Koha's staff client front
page. The module button leads directly to a 'Pay' page giving the staff
user the ability to record anonymous payments for items that would not
normally require a patron to be registered at the library.

Test plan:
1) Enable `UseCashRegisters` via the system preferences.
2) Ensure your user has the 'manage_cash_registers' permission.
3) Add a cash register for your current branch.
4) Add at least one 'MANUAL_INV' authorized value.
5) Navigate to the new 'POS' pay page via the main menu.
6) Add an item to the 'sale' by clicking 'add' from the right side of
   the screen.
7) Note that said item was added to the table of items this sale on the
   left.
8) At this point you should be able to 'click to edit' the quantity or
   price of the item in the table on the left.
9) Enter an amount greater than the price of the item into the 'amount
   collected from patron' box.
10) Click 'Confirm'
11) Varify that the same change to give modal from the paycollect pages
    appears here.
12) Click 'Confirm'
13) Payment will have been recorded (check the database) and you will be
    back at a fresh 'Pay' page ready for the next transaction.
14) Signoff

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23790: fr-CA translation of ACCOUNT_DEBIT and ACCOUNT_CREDIT notices
Caroline Cyr La Rose [Wed, 9 Oct 2019 19:34:24 +0000 (15:34 -0400)]
Bug 23790: fr-CA translation of ACCOUNT_DEBIT and ACCOUNT_CREDIT notices

This patch provides the fr-CA translation of the ACCOUNT_DEBIT and ACCOUNT_CREDIT notices.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested deleting from letter table, then loading the file.
File loads without problem, no errors.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>