Commit graph

1251 commits

Author SHA1 Message Date
5a333e3cfa
Bug 34478: Use op and cud in pay -> paycollect redirect
The pay to paycollect post/redirect flow here doesn't actually
consistute a state change, however it's much simpler to add the csrf
token check flow here than to refactor the code to a get (url's quickly
grow too large for a GET) or rework it in other ways.  I opted to do
this for now and work on a refactor at a future date.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:19 +01:00
bc2bb89930
Bug 34478: (follow-up) Remove check_csrf from pl files
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:58:41 +01:00
84922d4ad9
Bug 34478: Changes for members/member-flags
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:46 +01:00
7bd78700cf
Bug 34478: Manual fix - add op - members/housebound
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:31 +01:00
0a92c55c7e
Bug 34478: Manual fix - add op - members/maninvoice
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:31 +01:00
1244fffa9c
Bug 34478: Manual fix - add op - members/mancredit
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:30 +01:00
f731a19676
Bug 34478: Manual fix - add op - members/member-password
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:29 +01:00
44949a88ea
Bug 34478: Manual fix - add op - members/discharge
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:27 +01:00
7f25a1a131
Bug 34478: op =~ ^cud- in pl/pm - Manual cud-email => email
Wrong replace of 'email' in a lot of places.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:14 +01:00
e8d02c58d2
Bug 34478: Add missing op - members-update
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:04 +01:00
c790129c7d
Bug 34478: Rename action with op - mod_debarment
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:03 +01:00
dd5f3701ce
Bug 34478: op modify=>edit_form, add=>add_form - memberentry.pl
Bug 34478: TO SQUASH op modify=>edit_form, add=>add_form ( pass opadd to template )- memberentry.pl

The template expects opadd when showing the form - along the way it was changed to 'add' and broke new patron
entry

Bug 34478: TO SQUASH op modify=>edit_form, add=>add_form ( pass op to template )- memberentry.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:02 +01:00
6870eb5329
Bug 34478: op=modify should be op=add_form - memberentry.pl
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:01 +01:00
fc781b238e
Bug 34478: actionType parameter not used - memberentry.pl
Bug 34478: [TO SQUASH] actionType parameter not used - memberentry.pl

syntax error at members/memberentry.pl line 103, near "\|"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:00 +01:00
b78641fd2f
Bug 34478: Rename action with op - members/boraccount
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:57 +01:00
0e1239e93b
Bug 34478: Manual fix - fix ops and method - deletemem
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:41 +01:00
9f99265f34
Bug 34478: Manual fix - Rename action with op change to post - merge-patrons
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:40 +01:00
1a98ef7584
Bug 34478: Manual fix - account payout
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:16 +01:00
b92e9a2115
Bug 34478: Manual fix - memberentry (modify)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:13 +01:00
18e808240f
Bug 34478: op =~ ^cud- in pl/pm
This is the result of
  bash op_must_start_with_cud-perl.sh

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:11 +01:00
314fe71ff8
Bug 34478: Remove check_csrf from pl files
We should no longer need to check CSRF token from pl files

TODO - there is a change for some files where we returned 403

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:01 +01:00
7e7159bf58
Bug 34478: Remove generate_csrf from pl
We do not longer need to generate_csrf from pl files

TODO - members/boraccount.tt and sco/sco-main.tt needs to be adjusted

Bug 34478: [TO SQUASH] Remove generate_csrf from pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:55:56 +01:00
Thibaud Guillot
fc75a344b8
Bug 30230: Add new 'list_borrowers' permission
When a patron search is performed only a user with edit_borrowers
permission can search by name. Search can works only with cardnumber but
it makes searching less intuitive I think.

So, as mentioned in the discussion, I've added a new 'list_borrowers' permission,
completely independent of 'edit_borrowers', so that I can search for a member via the interface
and get the results. In addition to the permission to perform check in and checkouts, this no longer poses an obstacle to simple use.

Test plan:

1) Check with a user without 'edit_borrowers' permission that the patron search can only be performed with cardnumber
2) Apply this patch
3) Make the updatedatabase to add new 'list_borrowers' permissions
4) Set 'list_borrowers' permission on one user and see the difference

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:08 +01:00
f83b9ab1ff
Bug 30287: Conditionally render notice preview
This patch adds conditional formatting based on whether the notice was
generated from an HTML template or a plaintext one. We simply drop the
'html_line_break' filter for the case where the notice should already be
html formatted.

I was tempted to replace the html_line_break for plaintext formatted
notices too as I believe this closer resembles how we actually output
such generated notices.. but I decided that should be for another bug.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2023-12-19 13:42:10 +01:00
b0c4bc3623
Bug 12133: (QA follow-up) Tidy for qa script
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-10 10:59:42 -03:00
Emmi Takkinen
319216f7d1
Bug 12133: Fix QA issue
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-10 10:59:41 -03:00
Emmi Takkinen
d9a989eaf0
Bug 12133: Add requirements for guarantor and guarantee
Add two requirements when registering a new patron:

- A child patron must have a guarantor. This is controlled by
  a new syspref ChildNeedsGuarantor.
- A guarantor cannot be a guarantee.

Test plan:
1. Add a child patron without guarantor or child patron with guarantee
as guarantor succesfully.
2. Apply this patch.
3. Add a child patron as a guarantor.
=> Error is raised.
4. Turn syspref "ChildNeedsGuarantor" ON.
5. Add a child patron without a guarantor and error "Child needs a
guarantor" is raised.
6. Add guarantor. Guarantor can either be existing patron or added with
"Contact" section.
=> Save without errors.

Also prove t/db_dependent/Koha/Patron.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-10 10:59:40 -03:00
Katrin Fischer
6322e08a02
Bug 32986: (QA follow-up) Fix QA script complaints: tabs and TT filters
* Perltidied the section with tabs in printslip.pl
* Fixed indentation and tabs in letter.tt
* Added missing TT filters to members-toolbar.inc

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-08 17:59:33 -03:00
c3b40a5499
Bug 32986: Add patron_slip module to letters and allow printing on members account
This patch adds a new module to letters 'patron_slip' / Patrons toolbar
(slip)

This also combines some of the slip printing JS to make things more
direct

To test:
1 - Apply patch
2 - restart_all
3 - yarn build
4 - Confirm you can print slip, summary, quickslip, and checkin slip
  when viewing a patron's account
5 - Enable  DisplayClearScreenButton syspref, and test that it works
  with both values
6 - Go to Tools->Notices and slips
7 - Define a new notice in the 'Patron toolbar (slip)' module
8 - Enter content like below in the 'Print' transport:
Patron has [% borrower.holds.count %] holds

List of holds:
[% FOREACH hold IN borrower.holds %]
===============================
    Reserve id: [% hold.reserve_id %]
    Title [% hold.biblio.title %]
[% END %]
9 - Go to patron scree
10 - Note new option under 'Print'
11 - Print the new slip and confirm it works (try with and without
  placing holds for patron

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-08 17:59:33 -03:00
9d69ae986a
Bug 34519: Add a template plugin for fetch searchable patron attributes
This patch moves code form scripts to a template plguin and unifies the calls

To test:
1 - Add a searchable patron attribute type
2 - Add values to several patrons and test patron searching from
    Patrons home
    Patrons search results
    Holds request screen
    Article request screen
    Patron search sidebar
3 - Apply patch
4 - Confirm results are the same

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-08 17:52:37 -03:00
Michael Hafen
0f122a9400
Bug 32730: Add Patron Lists tab to patron details and circulation pages
Test Plan:
1. Apply patch
2. create a patron list if there aren't any
3. search for a patron
4. observe the "Patron lists" tab showing the list that the patron is not in
5. try adding the patron to the list and removing them from the list to
   be sure the feature has full operation
6. click "Check Out" on the side bar menu to navigate to the circulation
   page for this patron
7. observe the "Patron lists" tab, and verify it operates as it did on the
   patron details page

Bug 32730: (follow-up) Minor corrections
   by Owen Leonard

This patch corrects an instance of an incorrect capital letter
("Patron Lists" -> "Patron lists") and makes minor tweaks to
indentation.

Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Edit: (tcohen) new files should be run through perltidy ALWAYS. Did it
and squashed it here.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-01 17:23:09 -03:00
e08bf3bb4c
Bug 35127: Fix 'Search type' for patron search
We need to fallback on the syspref DefaultPatronSearchMethod but keep
the value when one is passed!

Test plan:
Search for patrons, and use the "search type". Set it to different
values than DefaultPatronSearchMethod and confirm that the value is
kept.
Fix is expected when searching for patrons in the header (use the
options to select a different value and run the search)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 10:35:26 -03:00
a8e770d9c4
Bug 34910: (follow-up) alert in patron details
The anonymous patron details page should show an alert message.

1) Configure an existing borrowernumber in system preference 'AnonymousPatron'
2) Go to details page of this borrower :
   /cgi-bin/koha/members/moremember.pl?borrowernumber=x
3) Check you see alert 'This is the anonymous patron.'

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi>
Signed-off-by: Päivi Knuutinen <paivi.knuutinen@joensuu.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 10:25:59 -03:00
Emmi Takkinen
70fc698899
Bug 26558: Make guarantor information persist despite an error
When one tries to create an account with patron guarantor and
error occurs (already used username, wrong age etc.), guarantor
information is lost. This patch always saves added patron
guarantor information to the template param new_guarantors.

To test:
1. Create a new account but cause an error that will keep the
account from saving (enter the wrong age for a category or
give the patron a username that's already being used).
2. Search for and select a guarantor.
3. Try to save the account and wait for the "The following
fields are wrong. Please fix them." message.
=> Note that the guarantor information is gone and you need
to search for and select the guarantor again.
4. Apply this patch.
5. Repeat steps 1.-3.
=> Note that guarantor information hasn't been lost.

This patch also removes code block from duplicate patron
check because we now save param new_guarantors even if
error doesn't occur.

To test:
1. Create a new account but cause a duplicate patron error.
2. Search for and select a guarantor.
3. Try to save the account.
=> Guarantor information should persist.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 12:13:05 -03:00
fe21bbad2a
Bug 28130: (QA follow-up) Tidy
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 10:31:39 -03:00
Aleisha Amohia
84e5c570db
Bug 28130: Manage a patron's subscription alerts
This enhancement adds an 'Alert subscriptions' page to a patron account to easily view or cancel email alerts the patron has subscribed to.

To test:

1. Go to Cataloging. Create a biblio.
2. Go to Tools -> Notices & slips. Create a notice under the "Serials (new issue)" module, if you don't already have one.
3. Go to Serials. Create a subscription. Link the biblio you just created. Add info like the callnumber, location, library. Choose your notice under Patron notification. Fill out the remaining details and save your subscription.
4. Open this record in the OPAC. Under the Subscriptions tab, click the button to "Subscribe to email notification on new issues"
5. Go back to the staff interface. Go to your patron account.
6. Notice there is a new "Alert subscriptions" tab in the left sidebar menu. The number in brackets should say 1, for the subscription you just enabled email alerts.
7. Click into the page. Confirm your subscription shows in the table.
8. Click the button to unsubscribe. A confirmation should pop up. Confirm you can cancel the unsubscribe action. Then confirm you can unsubscribe using this button.
9. Confirm tests pass t/db_dependent/Koha/Patron.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Wuerttemberg
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 10:31:37 -03:00
emilyrose
1c01617634
Bug 34870: Perform UTF8 encoding before redirection
Display special characters correctly when writing off an invoice.

The issue arises because pay.pl does not perform UTF-8 encoding on the “notes” parameter before redirecting the page. By using uri_escape_utf8, characters with a code above 255 are also UTF-8 encoded. Then, paycollect.pl can collect the information without any trouble.

This patch work with “;” and “:” characters.

TEST PLAN
1) Go to any patron profile > Accounting
2) Click “Create manual invoice”
3) Fill the fields and click the “Save” button
4) Repeat steps 2 and 3
5) Click “Make a payment”
6) Add a note with special characters for each one (e.g., éçö)
7) Select the created invoices and click the “Write off selected” button
8) In the note field, you should see “�” symbols where the special characters are supposed to be
9) Click the “Cancel” button
10) Now add a note with “:;” for one of the invoices
11) Select the invoices and click the “Write off selected” button
12) You should see a page with an error 500
13) Go back to the “Make a payment” page
14) Apply the patch
15) Add a note with special characters for each one (e.g., éçö)
16) Add “:;” to one of the note fields
17) Select the invoices and click the “Write off selected” button
18) Now the special characters are displayed correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 11:08:27 -04:00
7fd26e069e
Bug 33948: Replace GetAllIssues with Koha::Checkouts - staff
This patch replace GetAllIssues in readingrec.pl which is the only
occurrence in the staff code.

To test this patch you will need several items in your checkout history
in order to confirm that the display is the same before and after the
patch.

However there is one change! And it's a bug fix (or an enhancement, it
depends on how you see things). It includes checkouts with deleted items, which is
a long standing bug (see bug 8483).

Performance will be compared as well.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-09-22 12:35:49 -03:00
b987fd5afd
Bug 33940: Move C4::Members cardnumber sub to Koha::Policy::Patrons::Cardnumber
Test plan:
The idea here is to confirm this patch does not introduce regression.
For that you will play with the CardnumberLength syspref and create a
new user, modify an existing one, and check that the UI does not let you
modify an invalid cardnumber.
The onboarding process and the patron import tool will also have to be tested

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Bug 33940: Fix selfreg

please squash with first patch

Bug 33940: Fix messages we sent to templates

please squash with the first patch

Bug 33940: Fix what we send to memberentry

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-09-15 11:57:06 -03:00
e0b3a6c2aa
Bug 34731: Don't call SendQueuedMessages if message_id is bad
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-09-12 09:44:59 -03:00
Amit Gupta
1a64c1c1db
Bug 22990: Add CSRF protection to boraccount, pay and suggestion
Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Test plan would have been nioe.
Tested by changing MAX_AGE with suggestions.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-08-07 21:00:01 -03:00
8939dc9928
Bug 33271: Add collective owing message to moremember page
To test:
1. Turn on NoIssuesChargeGuarantorsWithGuarantees and set the amount to 5.
2. Create a guarantor/guarantee relationship.
3. Add a manual invoice to the guarantor that is larger than 5.00.
4. Notice the message on that circulation ( check out tab ) page. " Charges: Patron's guarantors and their other guarantees collectively owe X. Checkouts are BLOCKED because fine balance is OVER THE LIMIT. "
5. Look at the moremember ( details ) page. The same message does not appear.
6. Apply patch, restart_all
7. Try step 5 again, the message should now appear.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-07-03 14:51:41 -03:00
b804313c20
Bug 34094: Use DefaultPatronSearchMethod consistently
This patch updates the patron search bar and pages to default search
method to that defined by DefaultPatronSearchMethod system preference.

Test plan
1) Prior to this patch confirm that regardless of what you set
   DefaultPatronSearchMethod to, the search in /members/member.pl,
   members/members-home.pl and the search from the patrons search top bar
   all default to 'contains'.
2) Apply the patch
3) Confirm that the system preference now affects the default option for
   match type upon page load.

Signed-off-by: Sam Lau <samalau@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-07-03 14:51:37 -03:00
399eb51d34
Bug 33803: Remove comment about tab width
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-06 09:58:47 -03:00
Emmi Takkinen
b5f8c52657
Bug 33010: Do not filter checkins with logged in patrons branch in printslip.pl
If one tries to print checkin slip for checkins that
have been checked out from different branch, list
of checkins is empty. One has to change their branch
as checkout library to be able to print checkins.

This happens because we filter (or rather search) patrons
old checkouts with logged in patrons branch. This patch
removes this search so that checkout are filtered using
just filter_by_todays_checkins.

To test:
1. Checkout items for patron from branch A.
2. Switch to branch B and checkin items.
3. Print checkin slip.
=> Checkins list is empty.
4. Switch back to branch A.
5. Print checkin slip again.
=> Checkins are printed.
6. Apply this patch, restart services if needed.
7. Switch back to branch B and print checkin slip.
=> Checkins should now print.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-18 11:35:11 -03:00
a4b687c3aa
Bug 31448: Replace 'Print' with 'Receipt' dropdown
This patch replaces the 'Print' button with a 'Receipt' menu dropdown
exposing 'Print' and 'Email' options when `UseEmailReceipts` is enabled

Test plan
1. Enable `UseEmailReceipts`
2. Navigate to a patron with paid charges
3. Note the new dropdown 'Receipt' menu
4. Confirm 'Print' works as expected
5. Confirm 'Email' works as expected

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-05 10:18:45 -03:00
Maryse Simard
54307579ce
Bug 26598: Display guarantee's fines on guarantor's details page
A new tab is added to the details page of a patron to show, in a table, the fines of the patron's guarantees. A warning appears in the "Guarantees" section of the patron to make it obvious that fines exists.

+ resolve a git merge conflict

To test:
1) Apply patch
2) Choose a patron that has guarantees and navigate to the patron's details page
3) If the guarantees don't have any fines, the display should be unchanged
4) Add fines to the guarantee
5) Go back to the guarantor's details page
    => A warning should appear in the "Guarantees" section with the total due
6) Clicking on the link accompanying the warning focuses on the new
"Guarantees' fines" tab containing a table of all guarantee's and their
fines.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-06 10:03:16 -03:00
561dac9335
Bug 32373: Show patron restriction date
This is a rebased submission following bug 31095 which removed the use of GetDebarments. This patch now uses $patron->restrictions to find the date and pass it to the template

Test plan:
1) Create a restriction on a patron and navigate to that patron in Checkouts or the patron details page
2) There should be a message with details about the restriction but the creation date of the restriction won't be included in the message
3) Apply patch
4) The message should now say "Restricted since DATE" as in the screenshot attached.
5) Change the 'dateformat' syspref and refresh, the date should change to reflect the syspref

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 12:34:13 +02:00
9d250efae9
Bug 32426: Changes for members/memberentry.pl
Test plan:
Note: We will address this again when installing a plugin, but
first we test with the legacy userid code.

Add a new user with members/memberentry in staff.
Edit this user, change userid in staff. Try full form and partial
one.
If you remove userid or replace by a space (when mandatory), Koha
should regenerate a legacy userid.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-27 12:49:54 +02:00
4017946876
Bug 31095: Remove GetDebarments from members/memberentry.pl
This patch removes the use of GetDebarments from members/memberentry.pl
and replaces the references in the templates with patron.restrictions.

Test plan
1. Add a new user and confirm that the patron restrictions section does
   not appear on the form
2. Edit the user and confirm the patron restrictions section now appears
3. Add a manual restriction using the patron edit form
4. Confirm the restriction appears on the patron edit form
5. Confirm you can remove the restriction usine the patron edit form

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-01-31 10:19:36 -03:00