Commit Graph

1235 Commits

Author SHA1 Message Date
Emily Lamancusa ea49cfb38b
Bug 39572: Improve EDIFACT order confirmation message
Add EAN account information to EDIFACT order confirmation message
when the BasketConfirmations system preference is enabled.

To test:
1. Set EDIFACT system preference to Enable
2. Set BasketConfirmations system preference to Enable
3. Create at least 2 EANs, one with a description and one without a
   description
   i. Go to Acquisitions > Library EANs
   ii. Click "New EAN" and fill in the fields
4. Create an EDI account
   i. Go to Acquisitions > EDI accounts
   ii. Click "New account"
   iii. Click Submit (for testing purposes you don't need to fill in
         the fields)
5. Find or create a basket for the same vendor that's on the EDI account
6. Add an order to the basket from any source
7. In the menu bar at the top of the basket screen, click "Create
   EDIFACT order" and select an EAN
--> Note that the confirmation page doesn't tell you which EAN was
    selected
8. Click "No, don't close"
9. Apply patch and restart_all
10. Repeat step 7
--> The confirmation page should now display both the basket and the
    selected EAN
11. Click "Cancel"
--> Confirm that the basket is still open
12. Repeat step 7
13. Click "Yes, generate order and close basket"
--> Confirm the basket is closed
14. Click "EDIFACT messages" in the sidebar menu
--> Confirm that you see a message with type ORDERS for that basket

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0c9e5029b3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-07-24 10:23:14 +02:00
Emily Lamancusa 6b02fb0adc
Bug 31632: (QA follow-up) Align behavior with order from suggestion
If an order is added from a suggestion in the first place, the
suggestion automatically changes status to ORDERED, and a notice is
sent out to the patron. If a suggestion is linked to the order after
the fact, it should move to ORDERED and notify the patron as well.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8436f799c1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-07-10 22:47:25 +02:00
Aleisha Amohia 9071ce3936
Bug 31632: (follow-up) CSRF protection for linking order to suggestion
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 73de7c716e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-07-10 22:47:24 +02:00
Aleisha Amohia 70477134ac
Bug 31632: Link a suggestion to an existing order
This enhancement allows library staff to link an order (in an unclosed basket, or a standing order) to an accepted suggestion.

To test:

1) In the staff interface, go to Suggestions and create at least two suggestions.
2) Mark at least two suggestions as Accepted.
3) Go to Acquisitions, create a vendor if you don't have one already.
4) Have or create two baskets - one should be standing, and one not standing (normal).
5) In the normal basket (not standing), add an order from any source but NOT from a suggestion.
6) When you save the order, there should be a new link in the Modify column of the Orders table - "Search for suggestion to link". Click this.
7) Choose one of your suggestions to link to the order.
8) You should be redirected back to the basket. Confirm your order has been correctly linked to the suggestion. Confirm there is no link to "Search for suggestion to link" for this order now that a suggestion has already been linked.
9) Add another order to this basket from any source but NOT from a suggestion.
10) Close the basket. Confirm there is no link to "Search for suggestion to link" because the basket is closed, but you could reopen the basket to link the order if you wanted to.
11) Go to Baskets in the left navigation so you can find your standing basket.
12) Add an order to your standing basket from any source but NOT from a suggestion.
13) Go to the vendor and Receive shipments. Receive your standing order and finish receiving.
14) Go to the standing basket. There should be a new unreceived standing order for the record you just received, with a link to "Search for suggestion to link". Click this.
15) Choose a suggestion to link to the order.
16) You should be redirected back to the basket. Confirm your orders for this record have been correctly linked to the suggestion.

Sponsored-by: Pymble Ladies' College
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7546669920)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-07-10 22:47:23 +02:00
Matt Blenkinsop 064825e3e0
Bug 40066: Restore budget check to booksellers.pl
Test plan:
1) Navigate to a vendor record and select the baskets view from the left menu
2) Click "add to basket" in the table
3) A modal will display requiring the user to define a budget and fund
4) Apply patch and restart_all
5) Repeat steps 1 and 2
6) You will get the modal to add to the basket

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

Amended-by: Jonathan Druart
Remove import of GetBudget

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3293ae32bc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-17 21:43:04 +02:00
Matt Blenkinsop 9105ba1e63
Bug 38010: (QA follow-up) Move syspref values to config endpoint
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:26 +02:00
Matt Blenkinsop 6fa18591cb
Bug 38010: (QA follow-up) UI fixes
This patch addresses
- Translation issues in VendorList
- Removing the pagers from the contracts table
- Removing redundant code from the vendors template file

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:13 +02:00
Matt Blenkinsop e85ae2c02c
Bug 38010: (QA follow-up) Remove unnecessary code from booksellers.pl
Bug 38010: (QA follow-up) Fix QA tests

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:05 +02:00
Matt Blenkinsop 1a4eda23f6
Bug 38010: (QA follow-up) Rebase acquisitions amd vendor menus
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:04 +02:00
Matt Blenkinsop 2b3bb63c29
Bug 38010: (QA follow-up) Restore navigation links
This patch restores any links that previously pointed to booksellers.pl as this script is still in use. All references to supplier.pl remain pointed at the new Vue app

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:01 +02:00
Matt Blenkinsop 4a6008150d
Bug 38010: Delete old code
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:53 +02:00
Matt Blenkinsop 239ad17d3d
Bug 38010: Update links to vendor module
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:37 +02:00
Matt Blenkinsop 1018810681
Bug 38010: Add the form to add a new vendor
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:30 +02:00
Matt Blenkinsop 28f772b1e3
Bug 38010: Add permissions
This patch adds a permissions store and utility methods for implementing permissions checks in a Vue app

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:28 +02:00
Matt Blenkinsop b71b62059a
Bug 38010: Add vue app and list component
This patch adds the base vue app as well as the component to list vendors

Amended-by: Jonathan Druart
chmod 755 acqui/vendors.pl

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:27 +02:00
Jonathan Druart 69b8341a8c
Bug 39325: Manual fixes
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:23 +02:00
Jonathan Druart 1d844a7d2f
Bug 39325: Automatic fix
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:22 +02:00
Jonathan Druart 15a030bc76
Bug 39319: Fixes for Pod::Checker
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-14 08:51:21 +02:00
Nick Clemens c5f598d874
Bug 39044: Pass budgets to template
This simply copies the fetch of budgets from the acqui/histsearch.pl script.

We should in the future make this a template or other method to avoid code duplication,
but we should fix the functionality first.

To test:
1 - Go to Acqusitions
2 - See the dropdown "Fund: All funds" in the order search section
3 - Click it
4 - Feel disappointed
5 - Apply patch and restart all
6 - Reload and click the dropdown
7 - Options! Feel warm and fuzzy

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-13 15:31:00 +01:00
Koha Development Team d659526b5a
Bug 38664: Tidy the whole codebase
This commit is generated using:
  % perl misc/devel/tidy.pl
*within* ktd, to get the same version of perltidy than what will be used
by our CI (currently v20230309).

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:24 +01:00
Emily Lamancusa 0f01f2b31d
Bug 38155: (QA follow-up) Fix TT filters and scalar context
data-referer is the url for the current search page, to redirect
back after performing the operation. Since it is a url, variables within
this link all need to use the uri filter, not html or KohaDates.

Also specify scalar context when splitting the input parameter to
prevent param in list context warnings.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-23 10:35:31 +01:00
Brendan Lawlor 8b038c880c
Bug 38155: Fix Acquisitions Reopen selected invoices button
This patch updates the reopen selected invoices link button to use
the form-submit.js method from bug 36246. The link needs to have a single
data-invoiceid parameter, so the js on invoices.tt creates a comma
separated list from the checkboxes.

The list of invoiceid is split into an array in invoice.pl

To test:
1. Add some invoices for a vendor using the 'receive shipments' button
2. Go to Acquisitions->Invoices
3. Select multiple invoices using the checkboxes
4. Click the 'Close selected invoices' button
5. Confirm it works
6. Go to the Closed invoices tab
7. Select multiple invoices using the checkboxes
8. Click the 'Reopen selected invoices' button
9. Confirm it works
6. Confirm reopening individual invoices from the Actions button still works

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-23 10:35:30 +01:00
Brendan Lawlor e15d90563f
Bug 38155: Fix Acquisitions close selected invoices button
This patch updates the closed selected invoices link button to use
the form-submit.js method from bug 36246. The link needs to have a single
data-invoiceid parameter, so the js on invoices.tt creates a comma
separated list from the checkboxes.

The list of invoiceid is split into an array in invoice.pl

To test:
1. Add some invoices for a vendor using the 'receive shipments' button
2. Go to Acquisitions->Invoices
3. Select multiple invoices using the checkbox
4. Click the 'Close selected invoices' button
5. Confirm it works
6. Confirm closing individual invoices from the Actions button still works

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-23 10:35:30 +01:00
Matt Blenkinsop 55d7ec38e7
Bug 37993: (QA follow-up): Add missing data for breadcrumbs
The vendor name was missing from the breadcrumbs, this patch adds it back in

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-03 17:33:57 +01:00
Martin Renvoize 0146359332
Bug 37993: Remove edi_ean page
In the previous patch we replace the only link to the edi_ean selection
page with a select list embedded in the page.  As such, we no longer
need this page at all.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-03 17:33:56 +01:00
Martin Renvoize 7454a1d380
Bug 37993: Replace edi_ean link with dropdown
The edi_ean page is a slim page with a single select input for selecting
the appropriate library and ean.  This patch replaces the link to that
page with a simple select in the menu on the original page instead.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-03 17:33:56 +01:00
Jonathan Druart 9588731d40
Bug 38343: Add info if there are closed invoices not displayed
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-22 10:22:40 +01:00
Emily Lamancusa d013a4aef0
Bug 38343: (QA follow-up) Improve tests and tidy
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-22 10:22:40 +01:00
Jonathan Druart e868ff21ff
Bug 38343: Do not show closed invoices by default when receiving
Filter out closed invoices by default when receiving.

Test plan:
1.) go to acquisition module and search for a vendor
2.) click on button 'receive shipment'
3.) enter an invoice number and click 'next'
4.) click on button 'finish receiving'
5.) activate the checkbox 'close'
6.) click on button 'save'
7.) Check that your Invoice has been modified. The status is now "Closed on ..." and the checkbox is now 'Reopen'
8.) Click on the link to the vendor to go the vendors page
9.) click on button 'receive shipment'
=> The closed invoice is no longer displayed

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-22 10:22:39 +01:00
Michał Dudzik 1b923e946a
Bug 37265: Consideration of UniqueItemFields setting when receiving items in an order
When using the Koha acquisition module to receive items (basket receiving
an order), Koha does not consideration of UniqueItemFields setting.
The problem is that you can accidentally attach 3 items to an order with the same values.

Test plan:
1. Set preference UniqueItemFields: Public note (itemnotes)
2. Go to the acquisition module.
3. Create a basket with the option for 'Create items when:' set to receiving an order.
4. Add an order to the basket, for example: From a new (empty) record with the Quantity set to 3 or more.
5. Close the basket.
6. Receive the order.
7. Add a public note: TEST, and receive the first item (Add item).
8. You will see that the next item has the same public note.
9. Apply this patch and repeat step 7 - the public note is not used for the next note.

Sponsored-by: kohawbibliotece.pl
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-10-02 10:50:41 +01:00
Paul Derscheid 4a12b7b858
Bug 34805: (QA follow-up) Tidy acqui/acqui-home.pl
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 13:54:22 +02:00
Owen Leonard cfd89edc04
Bug 34805: Add order search form to acq start page
This patch adds the order search form to the Acquisitions home page.
I've modified acqui-home.pl so that it will pass the same default date
limiters as histsearch.pl.

To test, apply the patch and go to Acquisitions.

Test the order search form to confirm that it works as expected. Any
search from this version of the form should return identical results to
seraches performed from the "Advanced search" link in the sidebar.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 13:54:22 +02:00
Pedro Amorim c8cc04a397
Bug 35044: (QA follow-up): DRY code before set_additional_fields
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-23 18:21:26 +02:00
Pedro Amorim e3787c157f
Bug 35044: Update: Invoices
Added fixme comment to invoices.tt, the search works so nothing to do
here, but the code is not DRY

Test plan, k-t-d:

Preparation: Create additional fields for table 'aqinvoices':
2 text fields, one repeatable, one not-repeatable
2 AV fields, one repeatable, one not-repeatable

1) Add a new invoice for an existing vendor, visit:
/cgi-bin/koha/acqui/parcels.pl?booksellerid=1
2) Input something in the mandatory "Vendor invoice" field.
3) Fill in all additional fields, click the '+New' and 'Clear' links,
   hit 'Save'
4) Search for invoices, visit:
http://localhost:8081/cgi-bin/koha/acqui/invoices.pl
5) Click "Search" on the left column of the page
6) Click the invoice we just created. Verify all the fields show
   correctly.
7) Go back to the additional fields configuration, set all additional
   fields as "searchable"
8) Return to http://localhost:8081/cgi-bin/koha/acqui/invoices.pl
9) Perform some searches using the additional fields values.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-23 18:21:22 +02:00
Pedro Amorim 1c7c2a260c
Bug 35044: Update: Acquisition orders
Test plan, k-t-d:

Preparation: Create additional fields for table 'aqorders':
2 text fields, one repeatable, one not-repeatable
2 AV fields, one repeatable, one not-repeatable
2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field
942$c
Attempt to create a repeatable MARC field (get or set). Notice you're
unable to.

1) Add a new order for an existing basket, with an existing record,
   visit:
/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=1&basketno=1&biblionumber=76
2) Set the mandatory "Koha item type" for the item. Click the 'Add item'
   button below.
3) Notice the accounting details now have quantity:1
4) Set the mandatory "Fund" input in accounting details.
5) At the bottom, fill in all additional fields, click the '+New' and
   'Clear' links,  hit 'Save'
6) In the orders table shown, click "Modify". Notice all the fields are
   presented correctly in the edit form.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-23 18:21:22 +02:00
Pedro Amorim 891a1a0bde
Bug 35044: Update: Order baskets
Test plan, k-t-d:

Preparation: Create additional fields for table 'aqbasket':
2 text fields, one repeatable, one not-repeatable
2 AV fields, one repeatable, one not-repeatable

1) Add a new basket, visit:
/cgi-bin/koha/acqui/basketheader.pl?booksellerid=1&op=add_form
2) Fill in name and all additional fields, click the '+New' and 'Clear'
   links,  hit 'Save'
3) Notice the basket screen shows repeated fields separated by comma.
4) Notice that only non-null additional fields labels are shown.
5) Edit the basket. Notice all fields are shown as expected.

Additional testing:

Having a repeatable field with multiple instances, go back to the
additional fields configuration and make the additional field
non-repeatable again. Edit the basket again. Notice the multiple text
instances are still shown, but the '+New' link no longer shows.
You're able to remove existing multiple instances, but unable to add new
ones, this is because the field is no longer repeatable.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-23 18:21:21 +02:00
Matt Blenkinsop 16d4ccd87a
Bug 35026: (QA follow-up): Restore order grouping
This patch restores the grouping of orderlines by fund rather than one line per item. It also re-enables the reading of the barcoe, enumchron and coded_location_qualifier fields as well as passing the sort1 and sort2 values to the orderline.

It also reintroduces some missed functionality for when MarcItemFieldsToOrder is not passed through and can now create order lines and records for an imported file when this is the case

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-19 18:59:48 +02:00
Matt Blenkinsop 7608566440
Bug 35026: Make add_items_from_import_record DRY
This patch improves the code in add_items_from_import_record to make sure that the code is not repeating itself

It also fixes a minor error in the template file and rebases in changes from bugs 35254 and 33170

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-19 18:59:44 +02:00
Matt Blenkinsop 5292426e3e
Bug 35026: Tidy file
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-19 18:59:44 +02:00
Matt Blenkinsop e5c44980ee
Bug 35026: Refactor addorderiso2709.pl to use the MarcOrder class
This script uses the newly created MarcOrder class to refactor the script into a cleaner controller function. This MarcOrder class will also be used in bug 34355 to automate the creation of order lines from marc records.

Test plan:
1) In system preferences, click Search and then select the Acquisitions option from the left hand menu
2) Paste the following into MarcFieldsToOrder
price: 975$p
quantity: 975$q
budget_code: 975$h
3) Paste the following into MarcItemFieldsToOrder
homebranch: 949$a
holdingbranch: 949$b
itype: 949$y
nonpublic_note: 949$x
public_note: 949$z
loc: 949$c
ccode: 949$8
notforloan: 949$7
uri: 949$u
copyno: 949$t
price: 949$g
replacementprice: 949$v
itemcallnumber: 949$o
quantity: 949$k
budget_code: 949$l
Now save the sysprefs
4) Navigate to acquisitions and go into a basket
5) Click Add to basket and select “From a new file”
6) Download the file attached to this bug
7) Import the file and when the job is complete click “Add staged files to basket”
8) Click the checkbox next to the record to display the items and confirm that the data matches the mappings from the file that you imported - there should be 8 items, grouped in 4 pairs of identical items
9) Fill in the required fields and click “Save”
10) That basket should be correctly populated with an order matching the file that you imported

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-19 18:59:43 +02:00
Eric Garcia 54575f3c30
Bug 37343: Fixed search for vendors when transferring an item in acquistions
To test:
1. Have several vendors in acquistions
2. Add a basket and click "+Add to basket"
3. I used an mrc file to add an order from a new file
4. Stage for import -> add staged files to basket
5. Select the items and choose an item type
6. In the Orders table click 'Transfer' under the 'Modify' column
7. Try searching for vendors, nothing happens.
8. Apply patch restart_all
9. Click 'Transfer' again and try searching for vendors.
10. Notice vendors appear

NOTE:
Vendor search is a GET operation not POST. Use 'do_search' instead of 'cud-do_search'.

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>
2024-07-22 07:37:24 +01:00
Brendan Lawlor f80cc53470
Bug 37377: Fix orders search do_search param
This patch fixes the orders search in Acquisitions.

The form method is GET no need to prepend with cud-

Test plan:
1. Create an order that you can search for
2. Try order search, nothing happens
3. Apply patch restart all, refresh browser
4. Try order seach again and get results

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-22 07:26:42 +01:00
Phil Ringnalda fb9edbcf5c
Bug 37152: Aquisitions basket and OPAC suggestion deletion should use the op cud-delete
Both deleting a basket in Aquisitions and deleting a suggestion in the OPAC
take care of the confirmation in a javascript modal, rather than having a
whole separate page for confirmation, so they should be using the op
cud-delete rather than either cud-delete_confirm (which shouldn't ever be
used) or delete_confirm (which they aren't doing, they already confirmed).

Test plan:
1. There's no wrong behavior to see, so apply patch and restart_all
2. Aquisitions - Vendor search for My Vendor - Click My Basket
3. Click Delete basket, in the popup again Delete basket
4. Click Show baskets for vendor My Vendor and verify the basket is gone
5. OPAC - Your account - Purchase suggestions
6. Create a suggestion, then click the checkbox for it, Delete selected,
   confirm
7. Verify the suggestion was deleted

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 11:49:57 +02:00
Emily Lamancusa 94e1d8ed0c
Bug 30493: (QA follow-up) Fix for the only_my_library case as well
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-21 15:02:54 +02:00
Baptiste Wojtkowski e87f4cd550
Bug 30493: Pending archived suggestions appear on intranet home page
If suggestions are archived before their status is changed to something other than "Pending", they still appear on the intranet home page and the acquisitions home page as suggestions to be managed.

WITHOUT PATCH:
1. Go to Acquisitions > Suggestions
2. Click on New purchase suggestion
3. Fill in the form (title only is fine)
4. Click on Submit your suggestion
5. Go to the home page (click the Koha logo)
   --> Notice it says that there is 1 pending suggestion
6. Go to Acquisitions
   --> Notice it says that there is 1 pending suggestion
7. Go to Suggestions
8. Click on the up arrow to the right of the Edit button and choose Archive
   --> There are no more pending suggestions
9. Go to the home page (click the Koha logo)
   --> Notice it says that there is 1 pending suggestion
10. Go to Acquisitions
   --> Notice it says that there is 1 pending suggestion

The search function was fetching suggestions without considering the
"archived" field. I now pick only suggestion that are pending AND not
archived.

WITH PATCH:
9. Go to the home page (click the Koha logo)
   --> Notice it says that there is no pending suggestion
10. Go to Acquisitions
   --> Notice it says that there is no pending suggestion

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-21 15:02:54 +02:00
Martin Renvoize 13c2be5a1e
Bug 36620: (QA follow-up) Tidy controller
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-17 10:36:31 +02:00
Janusz Kaczmarek 3cfe1af7db
Bug 36620: Broken order management for suggestions with quantity
Test plan
=========
Scenario A (the bug)
--------------------
1. In OPAC, create a purchase suggestion with defined quantity
   ("Copies" in staff interface).
2. Accept the suggestion.
2. Have a budget, fund, vendor etc. to use the Acquisitions module.
   Ensure that AcqCreateItem syspref is set to 'placing an order'.
3. Create a new basket and add to basket an order line from accepted
   suggestion.  Note the initial Quantity set to the quantity entered
   in suggestion.  Note increasing this number while you add items
   to the order with the 'Add item' button. Save the order, close the
   basket.
4. Start receiving shipments for this order (create invoice etc.).
   Receive items you created by 'Add item' until there is nothing more
   to receive.  Note the number of unreecived items in the order (eqal
   to the initial quantity from the suggestion) that cannot be regulary
   received (with the items table on the left).  This is the *bug*.
   [This is due to the ambiguity of $data->{quantity} in the neworderempty.pl
   -- it normally comes from the order: GetOrder, but in the case of a yet
   empty order created from a suggestion, it comes from the suggestions table:
   GetSuggestion].
5. Apply the patch, restart plack etc.
6. Repeat step 2 and 3. While adding items in order note that you start
   from quantity 0, and that the suggested quantity is shown in brackets.
7. Continue with p. 4.  You should be able to receive the order in the
   regular way (with the items created).

Scenario B (bonus)
------------------
Repeat the above with AcqCreateItem syspref is set to 'receiving the order',
or 'cataloging the record'.  These cases do not create a bug as it does
the case with 'placing an order'.  Note however, after applying the patch,
the initial quantity in the order is set to 0 and there is the bonus infomation
about the suggested number of items (from the suggestion).

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-17 10:36:30 +02:00
Fridolin Somers b7a5cc5bee
Bug 35927: Selecting MARC framework again doesn't work when adding to basket from an external source
Like Bug 19372, selecting MARC framework currently doesn't work when adding to basket from an external source.
Strangly I can reproduce on koha-testing-docker, but we have this issue with a Ubuntu Focal install.
Looks like it comes from a bad syntaxe than needs to be replaced in any case.

Test plan:
1) Add an order to a basket from an external source
2) Select another framework than the default one on the search result
   view. Before doing 'add order' on choosen search result line.
3) Chek the framework code you will pick will be used in the created biblio record

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 17:46:16 +02:00
Marcel de Rooy 21c87aeb15
Bug 36018: biblio->active_orders should be ->uncancelled_orders
Active orders are more than just not cancelled. See filter_by_active
in Koha::Acquisition::Orders. They are still in the acq process; we
still need to receive items on those orders.

When we cancel and want to delete a biblio, we should check for not
cancelled orders (broader than active orders as in Orders.pm).

Test plan:
Git grep active_orders.
Run t/db_dependent/Koha/Biblio.t
Run t/db_dependent/Koha/Acquisition/Order.t
Add two order lines in a basket referring to same biblio. Try to
cancel with delete biblio. Should not be possible.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 16:45:46 +02:00
Marcel de Rooy b7448dbd75
Bug 36018: Rename orders->filter_by_current
Current is a bit misleading here. It means the ones that are not
cancelled.
We already use the filter_out_etc naming schema. So in harmony with
that, we switch it to filter_out_cancelled.

Test plan:
Run t/db_dependent/Koha/Acquisition/Order.t
Run git grep -l '::Orders' | xargs grep filter_by_current
* All occurrences should be related to Recalls, not Orders.
Go to acqui/basket.pl. Delete a whole basket who has some active
and some cancelled lines.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 16:45:46 +02:00