Commit graph

37316 commits

Author SHA1 Message Date
8f7a3bf5ea
Bug 24492: Update GPL license
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-05 13:05:10 +00:00
2ff054962e
Bug 24492: Add branch details page
This patch adds a new 'branch details' page to the POS system which
displays a summary of the cash register transactions for a branch
since each register was last cashed up. It also allows for cashing
up individual registers or cashing up all registers at a given branch
in one transaction.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-05 13:04:58 +00:00
764053f2f4
Bug 22615: Fix perlcritic
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-05 13:03:46 +00:00
81655e7dbf
Bug 22615: Add endpoint for getting one ill backend
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-05 13:03:40 +00:00
def667f7fc
Bug 22615: Add /ill_backends endpoint
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-05 13:03:32 +00:00
29bca18047
Bug 24369: DBRev 19.12.00.036
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-05 13:01:54 +00:00
1af4010ff7
Bug 24369: Add CORS support to the API
This patch adds CORS support for API requests. It uses the
AccessControlAllowOrigin syspref. To test:

1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth.t
=> SUCCESS: Tests pass!
3. Set the AccessControlAllowOrigin to any string (for example, *)
4. Use any API testing tool (Postman?) to place a request on the API
=> SUCCESS: The response headers include Access-Control-Allow-Origin,
    containing what you set on the syspref
5. Sign off :-D

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-05 12:59:50 +00:00
c951f8e06a
Bug 24369: Add CORS support to output_with_http_headers()
This patch adds CORS support to output_with_headers(). It will use the
AccessControlAllowOrigin syspref to pick the value and set the Access-Control-Allow-Origin header.

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

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-05 12:59:44 +00:00
2526bc3c9f
Bug 24369: Add AccessControlAllowOrigin syspref
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-05 12:59:31 +00:00
Julian Maurice
33f122621a
Bug 24552: Be compatible with Search::Elasticsearch 6.00
There is no need to specify the `client` param here because
'5_0::Direct' is the default value for Search::Elasticsearch 5.x and it
breaks when Search::Elasticsearch 6.x is installed

Test plan:
1. Apply the patch
2. Make sure you have Search::Elasticsearch 5.x
3. Reload starman
4. Verify that search works
5. Install Search::Elasticsearch 6.x
6. Reload starman
7. Verify that search works

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-05 12:57:35 +00:00
98c53cd064
Bug 23354: (RM follow-up) Correction for cash register selection
The form element for selectin cash register override at point of sale was
misnamed and as such one could not actually override the cash register.

This patch corrects the form element name and updates the logic very
slighlty to ensure we still fall back to the defualt no the subsequent
page load.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-05 08:56:35 +00:00
8d8c5f7311
Bug 23354: (RM follow-up) Correction for cash register selection
The form element for selectin cash register override at point of sale was
misnamed and as such one could not actually override the cash register.

This patch corrects the form element name and updates the logic very
slighlty to ensure we still fall back to the defualt no the subsequent
page load.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-05 08:54:03 +00:00
69af9e18cd
Bug 24790: Add POS to the 'More' dropdown on the staff client
This trivial patch adds 'Point of sale' to the dropdown.

To test:
1. Notice there is no 'Point of sale' entry in the staff dropdown
=> FAIL: No dropdown
2. Apply this patch and reload
=> SUCCESS: Point of sale displays and works
3. Play with enabling/disabling the feature and removing permissions
=> SUCCESS: The entry in the dropdown respects the configured
permissions and settings.
4. Sign off :-D

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 16:17:24 +00:00
95b1b6662d
Bug 24082: DBRev 19.12.00.035
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 16:14:52 +00:00
15655f0dbc
Bug 24082: (QA follow-up): Template fixes
This patch introduces missing TT filters and also replaces tabs for
spaces to fix indentation problems.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 16:14:47 +00:00
342f45b5dc
Bug 24082: Add access to historical transactions
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 16:14:44 +00:00
d16710382e
Bug 24082: Add refund action to relevant lines
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 16:14:41 +00:00
d4d1ffb91c
Bug 24082: Add anonymous_refund permission to cash_management
This patch adds the new `anonymous_refund` permission to the
`cash_management` flag and binds it to the visability of the register
details page.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 16:14:37 +00:00
0359a04bf8
Bug 22529: Use new C4::Auth::haspermission from svc/members/search
The svc/members/search script can be used to retrieve patrons with a
specific permission. This feature is only used once, to link patrons to
funds.
The code in the script is duplicated from what we have in
C4::Auth::haspermission, and it makes sense to clean it.

Test plan:
Create a fund and add users to this fund.
When you search for users you must only have a list of patrons with the
acquisition.order_manage permission.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described. No errors
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 16:14:32 +00:00
c16476af44
Bug 24801: Display all the categories - Selenium fix
To make sure we are going to be able to click on the "Delete" button of
our newly created category PATRON_CAT, we are displaying them all.

Test plan:
Create several patron categories that will fill the first page:

use t::lib::TestBuilder;
my $builder = t::lib::TestBuilder->new;
for my $i ( 1..20 ) {
    $builder->build_object({ class => 'Koha::Patron::Categories', value => { description => "cat_$i" } });
}

Execute the selenium tests.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 14:56:19 +00:00
c0f3c9f29a
Bug 24775: Add ID to POS submit payment button
This patch simply adds an ID to the submit button to make it easier to
overide styling and functionality.

Test Plan:
0/ Inspect the element on page and note there is no id
1/ Apply patch
2/ Refresh page
3/ Inspect the element on page and note there is now an id

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 14:51:13 +00:00
c5c7f3efa2
Bug 24479: Use $Price filters for '0' amounts
This patch adds the use of the $Price TT filter to properly format '0'
amounts in the POS system.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 14:50:42 +00:00
4237fa9512
Bug 24081: DBRev 19.12.00.034
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 14:49:27 +00:00
ce2744e0e3
Bug 24081: (QA follow-up) Fix small typo
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 14:46:25 +00:00
87ff988393
Bug 24081: Add discount action to boraccount
This patch adds the ability to apply discounts to existing patron
charges from the boraccount page.

Test plan
1/ Carry out some accounting actions that end up with debts on the
patron record. (Add a manual invoice for example)
2/ Note a new 'Apply discount' action button on the unpaid debt
3/ Paid debts do not display the action button
4/ Click the button
5/ Enter an amount into the resulting modal and click confirm
6/ Confirm that the outstanding debt has been reduced by the amount you
specified.
7/ Confirm that a new 'Discount' line appears on the patrons account
8/ Confirm that in the 'details' view of the debt that the discount line
was used against the debt to create the reduction.
9/ Signoff

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 14:46:22 +00:00
a2fa0acb7d
Bug 24081: Add DISCOUNT to the allowed 'reduce' types
This patch adds the DISCOUNT type to the handled types list in the
reduce method introduced in bug 23442

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 14:46:19 +00:00
12381ead91
Bug 24081: Add credit_types, offset_types and permissions
This patch adds the credit_type, offset_type and permissions required
for the addition of a discounting workflow in the accounts system.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 14:46:13 +00:00
7c6300c657
Bug 24540: Prevent add button being triggered on enter
This patch prevents the add button being triggered by hitting return
from inside the collected from patron form input.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 14:44:18 +00:00
5b78de6cef
Bug 24741: (bug 21674 follow-up) Fix destructive update DB 19.12.00.017
Previous version of the SQL query did not deal correctly with subgroup.

Test plan:
checkout the following commit to be just before 017
  commit 715da06db5
  Bug 22868: DBRev 19.12.00.016
reset_all # recreate the DB
Create a complex tree of library groups, with several groups, subgroups,
etc.
When you add a new library, refresh the page to add it several time.
When ready, git checkout master, restart all the things, execute the
updatedatabase script, then go to the library groups page.
You should see that the duplicated entries have been removed, but
subgroups have not been deleted

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested with duplicated entries on groups and subgroups,
going back to the right commit and doing clean install.
Patch works, subgroups are preserved. No errors.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 14:44:10 +00:00
027f72da7c
Bug 23355: (RM follow-up) Tidy Template
At Jonatans request, I have tidied the table markup

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 09:04:57 +00:00
2f98da053b
Bug 23355: Make "Print receipt" translatable
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-04 08:54:03 +00:00
f7630d7469
Bug 23355: (RM follow-up) Remove reintroduced relationship
As part of an accidental push of a DO NOT PUSH schema update commit
we re-introduced a formerly removed relationship accessor

This patch removes that mistake.

Tests added to the pre-push hook to prevent future mishaps.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 16:27:36 +00:00
bdefa10107
Bug 23355: (RM follow-up) Add DROP statement for cash_register_actions
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 16:09:55 +00:00
ab0f1df0c1
Bug 23355: DBRev 19.12.00.033
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 15:03:02 +00:00
3252c8d2dd
Bug 23355: (QA follow-up) Add a modal confirm to the cashup action
This patch adds a simple modal to confirm the cashup action adding a
safely measure to it.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 15:03:02 +00:00
dd44efbc84
Bug 23355: Rename staff_id for manager_id
This patch makes the parameter naming more consistent and also fixes the
tests (there was a missmatch on the parameter naming, and tests count
was incorrect).

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 15:03:02 +00:00
d6684f13fc
Bug 23355: (QA follow-up) Missing koha_object(s)_class definitions
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 15:03:02 +00:00
a1d89f8b88
Bug 23355: (QA follow-up) Add missing TT filters
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 15:03:02 +00:00
d3015f84e3
Bug 23355: License fixes
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 15:03:01 +00:00
4d2037914c
Bug 23355: Add cashup permissions
Add new 'cashup' sub-permissions to the 'cash_management' permission to
allow fine grained control over whome may 'cashup' a cash register.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 15:03:01 +00:00
fcb545b4ae
Bug 23355: Add register details page
This patch adds a new page which can be accessed via the menu to the
left of the point of sale page.  This new page displays a list of
transactions since the last 'cashup' action, a summary of transaction
amounts and a button to allow the recording of a new 'cashup action.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 15:03:01 +00:00
16b3a16374
Bug 23355: Split tests for Line vs Lines
This patch simply splits the existing tests for accountlines into two
test files, one for the singular object and one for the set.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 15:03:01 +00:00
39ebdb4ea2
Bug 23355: Link cash_register_actions to cash_registers by foreign key
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 15:03:01 +00:00
8781527637
Bug 23355: Add accountline deletion test
This patch adds a test to ensure database relations do not cascade
deletions when a cash register is deleted.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 15:03:00 +00:00
747531e8de
Bug 23355: Add CASHUP actions
This patch adds methods relating to cashup procedures to the cash
register object to ease adding and querying for cashup actions related
to the register.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 15:03:00 +00:00
5cf1e85191
Bug 23355: [DO NOT PUSH] DBIC Classes
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 15:03:00 +00:00
239ac3303c
Bug 23355: Add cash_register_actions table
This patch adds the new cash_register_actions database table to allow
for storing of cash register actions which are not already stored as
accountlines.

Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 15:03:00 +00:00
e2adf9f28c
Bug 23534: Fix selenium tests
The title of the page now contains lot of info (is it what we really
want?)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 15:03:00 +00:00
292f562605
Bug 24756: Catch two failed to load-variations in Security.t
Test 7 in Security.t failed when 'failed to load HTTP resource' was
returned by libxml2 instead of 'failed to load external entity'.

We now remove the debugging with Dumper again and adjust the regex to
include both variations.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 10:39:00 +00:00
bd9960a2d2
Bug 24757: (RM follow-up) Restore test count
Somehow we lost a '0' on the test count for
t/db_dependent/Koha/Patrons.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-03 10:31:12 +00:00