Bug 24157 - Additional acquisitions permissions
Summary: Additional acquisitions permissions
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Alex Arnaud
URL:
Keywords:
: 20375 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-12-03 19:34 UTC by Jonathan Druart
Modified: 2021-06-14 21:33 UTC (History)
6 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Add more granularity in the acquisition permissions: - reopen_closed_invoices to reopen and close invoices - edit_invoices to edit invoices - delete_invoices to delete invoices - merge_invoices to merge invoices - delete_baskets to delete baskets
Version(s) released in:
20.11.00


Attachments
Bug 24157: New permission - reopen_closed_invoices (11.38 KB, patch)
2019-12-13 17:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24157: New permission - edit_invoices (32.70 KB, patch)
2019-12-13 17:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24157: Add new method Acq::Invoice::Adjustement->fund (2.37 KB, patch)
2019-12-13 17:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24157: New permission - delete_invoices (5.17 KB, patch)
2019-12-13 17:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24157: New permission - delete_baskets (5.97 KB, patch)
2019-12-13 17:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24157: New permission - reopen_closed_invoices (11.31 KB, patch)
2020-02-10 13:53 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24157: New permission - edit_invoices (32.40 KB, patch)
2020-02-10 13:53 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24157: Add new method Acq::Invoice::Adjustement->fund (2.36 KB, patch)
2020-02-10 13:53 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24157: New permission - delete_invoices (5.16 KB, patch)
2020-02-10 13:53 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24157: New permission - delete_baskets (5.97 KB, patch)
2020-02-10 13:53 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24157: New permission - reopen_closed_invoices (11.44 KB, patch)
2020-03-06 19:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24157: New permission - edit_invoices (32.49 KB, patch)
2020-03-06 19:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24157: Add new method Acq::Invoice::Adjustement->fund (2.42 KB, patch)
2020-03-06 19:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24157: New permission - delete_invoices (5.22 KB, patch)
2020-03-06 19:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24157: New permission - delete_baskets (6.03 KB, patch)
2020-03-06 19:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24157: (follow-up) Conditionally show controls to reopen and close invoice (2.43 KB, patch)
2020-03-06 19:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24157: New permission - reopen_closed_invoices (11.40 KB, patch)
2020-07-21 09:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24157: New permission - edit_invoices (32.45 KB, patch)
2020-07-21 09:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24157: Add new method Acq::Invoice::Adjustement->fund (2.41 KB, patch)
2020-07-21 09:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24157: New permission - delete_invoices (5.21 KB, patch)
2020-07-21 09:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24157: New permission - delete_baskets (6.02 KB, patch)
2020-07-21 09:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24157: (follow-up) Conditionally show controls to reopen and close invoice (2.42 KB, patch)
2020-07-21 09:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24157: New permission - merge_invoices (11.01 KB, patch)
2020-07-21 09:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24157: (follow-up) New permission - delete_invoices (1.21 KB, patch)
2020-07-21 09:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24157: Handle the case where logged in user does not have edit_invoices (4.14 KB, patch)
2020-07-24 11:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24157: New permission - reopen_closed_invoices (11.52 KB, patch)
2020-07-24 13:08 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 24157: New permission - edit_invoices (32.53 KB, patch)
2020-07-24 13:08 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 24157: Add new method Acq::Invoice::Adjustement->fund (2.47 KB, patch)
2020-07-24 13:08 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 24157: New permission - delete_invoices (5.26 KB, patch)
2020-07-24 13:08 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 24157: New permission - delete_baskets (6.07 KB, patch)
2020-07-24 13:08 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 24157: (follow-up) Conditionally show controls to reopen and close invoice (2.48 KB, patch)
2020-07-24 13:08 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 24157: New permission - merge_invoices (11.09 KB, patch)
2020-07-24 13:08 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 24157: (follow-up) New permission - delete_invoices (1.27 KB, patch)
2020-07-24 13:08 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 24157: Handle the case where logged in user does not have edit_invoices (4.22 KB, patch)
2020-07-24 13:08 UTC, Alex Arnaud
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2019-12-03 19:34:23 UTC
Add separate permissions allowing selected users to:
 * Reopen a closed invoice
 * Edit an invoice
 * Delete a basket
 * Delete an invoice
Comment 1 Jonathan Druart 2019-12-13 17:10:12 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2019-12-13 17:10:15 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2019-12-13 17:10:18 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2019-12-13 17:10:22 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2019-12-13 17:10:25 UTC Comment hidden (obsolete)
Comment 6 Martin Renvoize 2020-02-10 13:53:42 UTC
Created attachment 98651 [details] [review]
Bug 24157: New permission - reopen_closed_invoices

New permission to reopen a closed invoice.

Test plan:
- Remove the new permission "reopen_closed_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, close it
=> You are not able to reopen the invoice
- Add the permission
=> You are able to reopen the invoice

Sponsored-by: Galway-Mayo Institute of Technology
Comment 7 Martin Renvoize 2020-02-10 13:53:45 UTC
Created attachment 98652 [details] [review]
Bug 24157: New permission - edit_invoices

Add a new permission to edit invoices

Test plan:
- Remove the new permission "edit_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, edit it (click "detail")
=> You can see the detail of the invoice, but cannot edit it. It's a read-only view.
- Add the permission
=> The form is back and you can modify the invoices and save the changes.
Also, you are able to create adjustments.

Sponsored-by: Galway-Mayo Institute of Technology
Comment 8 Martin Renvoize 2020-02-10 13:53:49 UTC
Created attachment 98653 [details] [review]
Bug 24157: Add new method Acq::Invoice::Adjustement->fund

Moving to its own commit in case we want to cherry-pick or move it to
its own bug report.

Sponsored-by: Galway-Mayo Institute of Technology
Comment 9 Martin Renvoize 2020-02-10 13:53:52 UTC
Created attachment 98654 [details] [review]
Bug 24157: New permission - delete_invoices

Add a new permission to delete invoices

Test plan:
- Remove the new permission "delete_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, try to delete it
=> There is no way to delete it
- Add the permission
=> Now you can delete the invoice

Sponsored-by: Galway-Mayo Institute of Technology
Comment 10 Martin Renvoize 2020-02-10 13:53:55 UTC
Created attachment 98655 [details] [review]
Bug 24157: New permission - delete_baskets

Add a new permission to delete acquisition baskets

Test plan:
- Remove the new permission "delete_basket" for a given patron,
use it to log in into Koha
- Create basket, try to delete it
=> There is no way to delete it
- Add the permission
=> Now you can delete the basket

Sponsored-by: Galway-Mayo Institute of Technology
Comment 11 Martin Renvoize 2020-02-10 13:54:16 UTC
Rebased to allow the application to sandboxes for testing.
Comment 12 Owen Leonard 2020-03-06 19:19:24 UTC
Created attachment 100283 [details] [review]
Bug 24157: New permission - reopen_closed_invoices

New permission to reopen a closed invoice.

Test plan:
- Remove the new permission "reopen_closed_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, close it
=> You are not able to reopen the invoice
- Add the permission
=> You are able to reopen the invoice

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 13 Owen Leonard 2020-03-06 19:19:27 UTC
Created attachment 100284 [details] [review]
Bug 24157: New permission - edit_invoices

Add a new permission to edit invoices

Test plan:
- Remove the new permission "edit_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, edit it (click "detail")
=> You can see the detail of the invoice, but cannot edit it. It's a read-only view.
- Add the permission
=> The form is back and you can modify the invoices and save the changes.
Also, you are able to create adjustments.

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 14 Owen Leonard 2020-03-06 19:19:30 UTC
Created attachment 100285 [details] [review]
Bug 24157: Add new method Acq::Invoice::Adjustement->fund

Moving to its own commit in case we want to cherry-pick or move it to
its own bug report.

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 15 Owen Leonard 2020-03-06 19:19:33 UTC
Created attachment 100286 [details] [review]
Bug 24157: New permission - delete_invoices

Add a new permission to delete invoices

Test plan:
- Remove the new permission "delete_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, try to delete it
=> There is no way to delete it
- Add the permission
=> Now you can delete the invoice

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 16 Owen Leonard 2020-03-06 19:19:36 UTC
Created attachment 100287 [details] [review]
Bug 24157: New permission - delete_baskets

Add a new permission to delete acquisition baskets

Test plan:
- Remove the new permission "delete_basket" for a given patron,
use it to log in into Koha
- Create basket, try to delete it
=> There is no way to delete it
- Add the permission
=> Now you can delete the basket

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 17 Owen Leonard 2020-03-06 19:19:38 UTC
Created attachment 100288 [details] [review]
Bug 24157: (follow-up) Conditionally show controls to reopen and close invoice

This follow-up makes minor changes to the template so that the checkbox
for reopening or closing an invoice are not displayed when the user
doens't have the correct permissions.

To test, apply the patch and try the process of viewing or editing an
invoice as a user with these various permissions:

 - edit_invoices ON
 - edit_invoices OFF
 - reopen_closed_invoices ON
 - reopen_closed_invoices OFF
Comment 18 Martin Renvoize 2020-03-25 11:29:28 UTC
Followup looks good to me.. Setting to signedoff :)
Comment 19 Alex Arnaud 2020-07-10 10:07:51 UTC
I think the third commit "Add new method Acq::Invoice::Adjustement->fund" is not the right place here. Right ?
I don't see any use of it and no old code removed.
Comment 20 Alex Arnaud 2020-07-10 10:23:05 UTC
Blocker:

I still see the "Merge selected invoices" button in invoices list if i don't have the "edit_invoices" permission.
So i can select invoices, click on it, but i get an empty invoice form and merge is not done.

So IMO there is two options:

1) i can see the merge option and the merge should be done,
2) i can't see the merge option and the checkboxes if i don't have the "edit_invoices" permission.

Questioning: should we assume that merging is editing and deleting ?
Comment 21 Daphne Hoolahan 2020-07-14 16:35:04 UTC
Comment on attachment 100288 [details] [review]
Bug 24157: (follow-up) Conditionally show controls to reopen and close invoice

Review of attachment 100288 [details] [review]:
-----------------------------------------------------------------

Suggested extension of this to conditionally show controls to delete invoices too, so that the checkbox
for deleting an invoice is not displayed when the user doesn't have the correct permissions.
Comment 22 Jonathan Druart 2020-07-21 09:13:21 UTC
Created attachment 107132 [details] [review]
Bug 24157: New permission - reopen_closed_invoices

New permission to reopen a closed invoice.

Test plan:
- Remove the new permission "reopen_closed_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, close it
=> You are not able to reopen the invoice
- Add the permission
=> You are able to reopen the invoice

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 23 Jonathan Druart 2020-07-21 09:13:25 UTC
Created attachment 107133 [details] [review]
Bug 24157: New permission - edit_invoices

Add a new permission to edit invoices

Test plan:
- Remove the new permission "edit_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, edit it (click "detail")
=> You can see the detail of the invoice, but cannot edit it. It's a read-only view.
- Add the permission
=> The form is back and you can modify the invoices and save the changes.
Also, you are able to create adjustments.

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 24 Jonathan Druart 2020-07-21 09:13:28 UTC
Created attachment 107134 [details] [review]
Bug 24157: Add new method Acq::Invoice::Adjustement->fund

Moving to its own commit in case we want to cherry-pick or move it to
its own bug report.

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 25 Jonathan Druart 2020-07-21 09:13:31 UTC
Created attachment 107135 [details] [review]
Bug 24157: New permission - delete_invoices

Add a new permission to delete invoices

Test plan:
- Remove the new permission "delete_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, try to delete it
=> There is no way to delete it
- Add the permission
=> Now you can delete the invoice

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 26 Jonathan Druart 2020-07-21 09:13:35 UTC
Created attachment 107136 [details] [review]
Bug 24157: New permission - delete_baskets

Add a new permission to delete acquisition baskets

Test plan:
- Remove the new permission "delete_basket" for a given patron,
use it to log in into Koha
- Create basket, try to delete it
=> There is no way to delete it
- Add the permission
=> Now you can delete the basket

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 27 Jonathan Druart 2020-07-21 09:13:39 UTC
Created attachment 107137 [details] [review]
Bug 24157: (follow-up) Conditionally show controls to reopen and close invoice

This follow-up makes minor changes to the template so that the checkbox
for reopening or closing an invoice are not displayed when the user
doens't have the correct permissions.

To test, apply the patch and try the process of viewing or editing an
invoice as a user with these various permissions:

 - edit_invoices ON
 - edit_invoices OFF
 - reopen_closed_invoices ON
 - reopen_closed_invoices OFF
Comment 28 Jonathan Druart 2020-07-21 09:13:42 UTC
Created attachment 107138 [details] [review]
Bug 24157: New permission - merge_invoices

Add a new permission to merge invoices

Test plan:
- Remove the new permission "merge_invoices" for a given patron,
use it to log in into Koha
- Create 2 invoices, try to merge them
=> There is no way to merge it
- Add the permission
=> Now you can merge the invoices

Sponsored-by: Galway-Mayo Institute of Technology
Comment 29 Jonathan Druart 2020-07-21 09:13:45 UTC
Created attachment 107139 [details] [review]
Bug 24157: (follow-up) New permission - delete_invoices

Hide the "Delete" invoice link if necessary on
/cgi-bin/koha/acqui/invoice.pl?invoiceid=X
Comment 30 Jonathan Druart 2020-07-21 09:14:05 UTC
(In reply to Alex Arnaud from comment #19)
> I think the third commit "Add new method Acq::Invoice::Adjustement->fund" is
> not the right place here. Right ?
> I don't see any use of it and no old code removed.

Hi Alex,
It is used in "Bug 24157: New permission - edit_invoices"

  [% adjustement.fund.budget_name | html %]


(In reply to Alex Arnaud from comment #20)
> Blocker:
> 
> I still see the "Merge selected invoices" button in invoices list if i don't
> have the "edit_invoices" permission.
> So i can select invoices, click on it, but i get an empty invoice form and
> merge is not done.
> 
> So IMO there is two options:
> 
> 1) i can see the merge option and the merge should be done,
> 2) i can't see the merge option and the checkboxes if i don't have the
> "edit_invoices" permission.
> 
> Questioning: should we assume that merging is editing and deleting ?

I created a new merge_invoices permissions.

(In reply to Daphne Hoolahan from comment #21)
> Comment on attachment 100288 [details] [review] [review]
> Bug 24157: (follow-up) Conditionally show controls to reopen and close
> invoice
> 
> Review of attachment 100288 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> Suggested extension of this to conditionally show controls to delete
> invoices too, so that the checkbox
> for deleting an invoice is not displayed when the user doesn't have the
> correct permissions.

Hi Daphne,
I found a "Delete" link on the invoice detail page, but I did not find one on a view where a checkbox is visible. Can you detail a bit more please?
Comment 31 Alex Arnaud 2020-07-24 10:33:50 UTC
I have the "Merge invoices" permission, but not "Edit invoices"
  => I see the merge button but it doesn't work. I get redirect to an empty invoice form and merge is not done.

I have the "Reopen closed invoices" but not "Edit invoices"
  => I see the reopen button ut it doesn't work. I get redirect to an empty invoice form and reopening is not done.
Comment 32 Jonathan Druart 2020-07-24 11:07:25 UTC
Created attachment 107309 [details] [review]
Bug 24157: Handle the case where logged in user does not have edit_invoices

This patch make possible the reopening and merging of invoices even if
the logged in user does not have the edit_invoices permission

I don't think it really makes sense but at least it's now possible.
Comment 33 Jonathan Druart 2020-07-24 11:08:41 UTC
This is a bit an edge case and I don't think it really makes sense. But it should be handled correctly now. Thanks Alex!
Comment 34 Alex Arnaud 2020-07-24 12:50:35 UTC
(In reply to Jonathan Druart from comment #32)
> Created attachment 107309 [details] [review] [review]
> Bug 24157: Handle the case where logged in user does not have edit_invoices
> 
> This patch make possible the reopening and merging of invoices even if
> the logged in user does not have the edit_invoices permission
> 
> I don't think it really makes sense but at least it's now possible.

It makes sense IMO. If you see the button or link, you should be able to do it.
I would have agreed with hidding this buttons also.
Comment 35 Alex Arnaud 2020-07-24 13:08:02 UTC
Created attachment 107346 [details] [review]
Bug 24157: New permission - reopen_closed_invoices

New permission to reopen a closed invoice.

Test plan:
- Remove the new permission "reopen_closed_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, close it
=> You are not able to reopen the invoice
- Add the permission
=> You are able to reopen the invoice

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Comment 36 Alex Arnaud 2020-07-24 13:08:08 UTC
Created attachment 107347 [details] [review]
Bug 24157: New permission - edit_invoices

Add a new permission to edit invoices

Test plan:
- Remove the new permission "edit_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, edit it (click "detail")
=> You can see the detail of the invoice, but cannot edit it. It's a read-only view.
- Add the permission
=> The form is back and you can modify the invoices and save the changes.
Also, you are able to create adjustments.

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Comment 37 Alex Arnaud 2020-07-24 13:08:13 UTC
Created attachment 107348 [details] [review]
Bug 24157: Add new method Acq::Invoice::Adjustement->fund

Moving to its own commit in case we want to cherry-pick or move it to
its own bug report.

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Comment 38 Alex Arnaud 2020-07-24 13:08:19 UTC
Created attachment 107349 [details] [review]
Bug 24157: New permission - delete_invoices

Add a new permission to delete invoices

Test plan:
- Remove the new permission "delete_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, try to delete it
=> There is no way to delete it
- Add the permission
=> Now you can delete the invoice

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Comment 39 Alex Arnaud 2020-07-24 13:08:24 UTC
Created attachment 107350 [details] [review]
Bug 24157: New permission - delete_baskets

Add a new permission to delete acquisition baskets

Test plan:
- Remove the new permission "delete_basket" for a given patron,
use it to log in into Koha
- Create basket, try to delete it
=> There is no way to delete it
- Add the permission
=> Now you can delete the basket

Sponsored-by: Galway-Mayo Institute of Technology

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Comment 40 Alex Arnaud 2020-07-24 13:08:29 UTC
Created attachment 107351 [details] [review]
Bug 24157: (follow-up) Conditionally show controls to reopen and close invoice

This follow-up makes minor changes to the template so that the checkbox
for reopening or closing an invoice are not displayed when the user
doens't have the correct permissions.

To test, apply the patch and try the process of viewing or editing an
invoice as a user with these various permissions:

 - edit_invoices ON
 - edit_invoices OFF
 - reopen_closed_invoices ON
 - reopen_closed_invoices OFF

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Comment 41 Alex Arnaud 2020-07-24 13:08:34 UTC
Created attachment 107352 [details] [review]
Bug 24157: New permission - merge_invoices

Add a new permission to merge invoices

Test plan:
- Remove the new permission "merge_invoices" for a given patron,
use it to log in into Koha
- Create 2 invoices, try to merge them
=> There is no way to merge it
- Add the permission
=> Now you can merge the invoices

Sponsored-by: Galway-Mayo Institute of Technology
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Comment 42 Alex Arnaud 2020-07-24 13:08:40 UTC
Created attachment 107353 [details] [review]
Bug 24157: (follow-up) New permission - delete_invoices

Hide the "Delete" invoice link if necessary on
/cgi-bin/koha/acqui/invoice.pl?invoiceid=X

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Comment 43 Alex Arnaud 2020-07-24 13:08:45 UTC
Created attachment 107354 [details] [review]
Bug 24157: Handle the case where logged in user does not have edit_invoices

This patch make possible the reopening and merging of invoices even if
the logged in user does not have the edit_invoices permission

I don't think it really makes sense but at least it's now possible.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Comment 44 Jonathan Druart 2020-07-30 15:46:41 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 45 Lucas Gass 2020-07-31 21:23:40 UTC
enhancement will not be backported to 20.05.x series
Comment 46 Katrin Fischer 2020-08-05 10:44:44 UTC
*** Bug 20375 has been marked as a duplicate of this bug. ***