Commit graph

1181 commits

Author SHA1 Message Date
1ace57be46
Bug 36635: Fix vendor's issue show view
Should be "show" not "cud-show"

Test plan:
Create an issue for a vendor, click on the issue's id on the issue list
table
Notice that with the patch applied the issue is displayed. Without the
patch the "show" view is empty

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 18:06:33 +02:00
747f513231
Bug 36511: Some scripts missing a dependency following Bug 24879
These files needed the addition of 'use C4::Auth qw( check_cookie_auth
);'.

To test, apply the patch and restart services.

- If necessary, enable the LocalCoverImages system preference.
- Open the browser console and then the "Network" tab. You can click
  "Images" to filter for the correct kind of request.
- Perform a catalog search. After the search has loaded, check that
  there are no 500 errors in the Network tab.

- Go to Cataloging -> Label creator.
- If necessary, create a label batch and add some items.
- Export your batch and test both the "Download as CSV" and "Download as
  XML" links. Both should trigger the correct download.

- Go to Serials -> Claims, and select a vendor with late issues.
- Select all late issues and click "Download selected claims" at the
  bottom of the page.
- Your CSV file should download correctly.

The file acqui/check_uniqueness.pl has been corrected as well but I'm
not sure how to test it!

Signed-off-by: danyonsewell <danyonsewell@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-10 09:09:50 +02:00
a9d8c681d9
Bug 36173: (follow-up) Tidy
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 11:51:18 +02:00
d704495138
Bug 36173: Display basket info when cancelling an order
The basketno is missing from the 2 links in acqui/parcel.tt

Better to retrieve the basketno from the order in the controller.

Test plan:
Create an order, receive it
On the parcel view notice that the "Cancel order" link leads to a
confirmation page that does not contain the info of the basket.
It's fixed with this patch applied.

Note: Don't fully receive, but 'Receive shipment' from vendor, choose an invoice, and cancel the order from the list to be received

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 11:51:18 +02:00
94da493d0e
Bug 36053: Correct input name for item replacement fields
To test:
1 - Follow test plan and use sample record from bug 35912 ( or similar)
2 - Confirm that when the order is saved the replacement price is $0.00
3 - Apply patch, restart_all
4 - Delete previous orders, and stage and add to basket again
5 - Confirm that upon adding orders to basket the replacement price is saved correctly

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 11:51:09 +02:00
f7efa5ae92
Bug 24879: Add check_cookie_auth when missing
This can certainly be improved to adjust the permissions, but at least
they are no longer opened to the world..

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-03 17:05:50 +02:00
bb2dcfdced
Bug 27595: Place holds when ordering from a suggestion
This patch updates the ordering code to place a hold when adding to a basket from a
suggestion if the new preference PlaceHoldsOnOrdersFromSuggestions is enabled.

To test:
1 - Apply all patches
2 - updatedatabase
3 - See new system preference PlaceHoldsOnOrdersFromSuggestions
4 - Create a new purchase suggestion, mark it accepted
5 - Go to acquisitions, find a vendor, find a basket, 'Add to basket' -> 'From a suggestion'
6 - Complete order, confirm no hold was placed
7 - Enable the new system preference
8 - Repeast 4-6
9 - Confirm a hold was placed

Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-19 10:25:03 +01:00
Julian Maurice
24b33936a5
Bug 35921: Improve perfs of acqui-home.pl when there are many budgets
When there are a lot of budgets with the same owner, most of the time of
acqui-home.pl is spent loading the same patron over and over.

This patch makes sure each borrower is loaded only once.

Test plan:
0. Do not apply the patch yet
1. Create a thousand budgets with the following command (make sure the
   budget_owner_id is an existing borrowernumber):
       perl -MKoha::Database -e '
           my $schema = Koha::Database->schema;
           my $period = $schema->resultset("Aqbudgetperiod")->create({
               budget_period_startdate => "2000-01-01",
               budget_period_enddate => "2999-12-31"
           });
           $schema->resultset("Aqbudget")->create({
               budget_owner_id => 1,
               budget_period_id => $period->id
           }) for (1..1000)
       '
2. Measure the time it takes to load acqui/acqui-home.pl (do it several
   times and keep the average time)
3. Apply the patch
4. Repeat step 2

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 18:03:42 +01:00
a4ad43724c
Bug 33431: Fix remaining cases
This patch tweaks three remaining cases, that are not covered by tests.

To test:
1. Apply this patch
2. Make use of those places
=> SUCCESS: No behavior change

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 11:03:39 +01:00
7095b707ff
Bug 33171: Fix missing price when mapped from MarcItemFieldsToOrder
This patch fixes an issue where the price is not passed to the UI when read from MarcItemFieldsToOrder.

Test plan:
1) In Administration, copy and paste the following into MarcItemFieldsToOrder:
quantity: 975$q
budget_code: 975$h
price: 975$p
itype: 975$y
coded_location_qualifier: 975$a
barcode: 975$b
enumchron: 975$c
2) Save
3) Navigate to Acquisitions and find a basket
4) Click Add to basket and select From a new file
5) Choose the file attached to this bug
6) Upload file and click Stage for import
7) Click Add staged files to basket once the job is finished
8) Check the box next to the record
9) The price should show 10.00 under Item record 1
10) coded location qualifier, barcode, enumchron should also have values as per the other commit on this bug
11) Save and import, the basket should not have a value of 0 as the price has been read correctly
12) Check the database, the newest item should have values for price, coded_location_qualifier, barcode and enumchron

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-03-18 11:03:37 +01:00
4a6cf13021
Bug 33171: Add coded_location_qualifier, barcode, and enumchron to MarcItemFieldsToOrder
Some libraries would like to use the following item fields with the MarcItemFieldsToOrder system preference:
* coded_location_qualifier
* barcode
* enumchron

Test Plan:
1) Set up MarcItemFieldsToOrder, verify it is functioning
2) Test coded_location_qualifier, barcode, and enumchron
3) Note the fields are imported and set for the items

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-03-18 11:03:36 +01:00
6b1b371888
Bug 36233: Use select2 to load vendors on invoice search
This patch moves the dropdown to use select2 and avoids loading all
vendors at page load.

To test:
 1 - Create some extra vendors in your system, ideally over 20
 2 - Search for a vendor in acquisitions
 3 - Click 'Invoices'
 4 - Note the dropdown of all vendors 'Vendor:' in search bar on left
 5 - The vendor you came from shoudl eb selected
 6 - Apply patch
 7 - Repeat
 8 - Note only a partial list of vendors is loaded, confirm current vendor still selected
 9 - Search in the dropdown and confirm vendors are returned
10 - Select a vendor and search
11 - confirm selection is retained

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-15 09:38:37 +01:00
fce3ca13a5
Bug 36193: (follow-up) Use buttons and don't nest forms
When changing action links into forms, we should use a submit button rather than JS to submit

Receipt cancelling needed a form embedded in the page as we cannot nest forms

Fixed searching on invoice.pl

Fixed resetting mappings (original button did not need cud-)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-12 17:47:31 +01:00
50b7679adb
Bug 36193: cud- treatment for Acq order receipt cancelling
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-12 17:47:28 +01:00
65a4349288
Bug 36193: Fix acq receiving
This patch addresses the CSRF error when receiving in acquisitions.

To test:
1. Have at least one order to receive
2. Follow the steps to receive them
3. Have the logs open:
   $ ktd --shell
  k$ tail -f /var/log/koha/kohadev/*.log
4. Click to confirm receipt
=> FAIL: An error modal is displayed
=> FAIL: There's an error about missing CSRF token in POST
5. Apply this patch
6. Reload everything:
  k$ restart_all
7. Repeat 1-4
=> SUCCESS: Receipt works :-D
=> SUCCESS: No error log
8. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-12 17:47:28 +01:00
c3035f7e1b
Bug 35892: Populate order price using GetMarcPrice if no price specified
Previously this happened after the fact, automagically, if no price was included in the order record. We should
rather load the Marc price into the order form if we don't have a price form the '...ToOrder' system preferences

To test:

Setup -- Set systempreferences below

MarcFieldsToOrder:
price: 949$g
quantity: 949$k
budget_code: 949$l
discount: 949$m
sort1: 949$n
sort2: 949$q

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
replacementprice: 949$v
itemcallnumber: 949$o
quantity: 949$k
budget_code: 949$l

Stage the attached bib-303.marcxml file
Add to basket from the staged file
Note that item prices are populated as '6.50' from 949$g
Cancel
Update MarcFieldsToOrder and map price to "020$c"
Add to basket from the staged file
Note the price is not populated, because 020$c contains a dollar sign
Cancel
Apply patch, restart all
Add to basket from the staged file
Note the price is now correctly populated from fallback to GetMarcPrice

Note: GetMarcPrice does some automatic munging, that's why 020$c on it's own doesn't work - this could be done to fields in MarcFieldsToOrder/MarcItemFieldsToOrder but this would be an enhancement.
This bug simply restores the previous behavious, but does it on the front end and is more obvious to the user

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 16:36:44 +01:00
649e1de190
Bug 35913: Restore price fall back to MarcFieldsToOrder if not set by MarcItemFieldsToOrder
To test:
Setup -- Set systempreferences below

MarcFieldsToOrder:
price: 949$g
quantity: 949$k
budget_code: 949$l
discount: 949$m
sort1: 949$n
sort2: 949$q

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

Stage the attached bib-303.marcxml file
Add to basket from the staged file
Select the biblio
Note items have prices
Cancel
Remove 'price' mapping from MarcItemFieldsToOrder
Apply patch
Add to basket from file again
Note item prices, and other fields, come through as expected

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 16:36:40 +01:00
bb54d3f1ce
Bug 34478: Manual fix - reopen basket - add cud- - basket.tt
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:23 +01:00
fe6c8e7aa0
Bug 34478: Manual fix - adjust op for acqui/cancelorder
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:17 +01:00
d57384dbd5
Bug 34478: Manual fix - acqui/basket.pl - export
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:52 +01:00
c83330ab9c
Bug 34478: Manual fix - acqui/vendor_issues.pl
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:50 +01:00
95c4f93671
Bug 34478: Basket group export CSV option should not check cud-op
The Export CSV operation is GET and uses op=export, so the script should
not check for "cud-op."

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:17 +01:00
3737241a6a
Bug 34478: Changes for addorder
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:48 +01:00
9a34fa9849
Bug 34478: Changes for acqui/supplier
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:47 +01:00
30fcf2f089
Bug 34478: Manual fix - Switch to post, update op - neworderempty_duplicate
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:43 +01:00
43a4a705bf
Bug 34478: Manual fix - Switch to post, update op, add missing include - basket
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:42 +01:00
b091b70724
Bug 34478: Rename action with op - acqui/cancelorder
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:34 +01:00
adbe19c06b
Bug 34478: op =~ ^cud- in pl/pm - Manual parcels.pl
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:32 +01:00
d4a1c1e51f
Bug 34478: Manual fix - parcels.pl (cud-confirm cud-new)
Bug 34478: [TO SQUASH] Manual fix - parcels.pl (cud-confirm cud-new)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:23 +01:00
acee057c4c
Bug 34478: Manual fix - edi_ean (cud-ediorder)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:22 +01:00
ed70fdc2a8
Bug 34478: Manual fix - basketgroups
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:22 +01:00
1f081b86b6
Bug 34478: Manual fix - duplicate_orders (cud-select)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:15 +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
211dc16280
Bug 30070: Update edifactmsgs to use the API
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-17 11:38:53 +01:00
2fbd47fdd6
Bug 35634: (bug 33105 follow-up) fix typo issues_manage vs issue_manage
issue_manage inserted into the DB but issues_manage is tested in the
controller script.

Test plan:
  git grep issues_manage
should no longer return any results

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-11 15:44:46 +01:00
Aleisha Amohia
0c9cabbff7
Bug 34708: Add ability to modify orderline to increase quantity
This enhancement allows libraries to modify an existing orderline and increase the quantity in the order. The quantity is increased by adding more items to the order, through the usual Item for which is visible when adding or modifying an order.

To test:

1. Ensure you have a budget, fund, vendor etc. to use the Acquisitions module
2. Open a new basket. Make sure you do NOT check the 'orders are standing' option
3. Add an order to the basket using any method. Add an item or more to this orderline and save the order to the basket
4. Click Modify to edit the orderline
5. Notice the quantity text field. Try to directly change this number. You'll get an error pop-up and be redirected back to the basket.

6. Apply the patch, restart services, refresh the basket page

7. Click Modify to edit the orderline
8. Notice the item form and Items list table is visible with your existing item(s) for this order. There should be no Action buttons as actions can't be done on an existing item order.
9. Confirm you are able to add more items to the Items list and to the order by filling out the form and clicking 'Add item' as normal. Confirm the quantity increases accordingly.
10. Confirm the Edit and Delete buttons for newly added items work as expected
11. Save and confirm the quantity for the orderline has increased
12. Confirm this behaviour persists with the other methods of adding new orders to a basket

Sponsored-by: Pymble Ladies' College
Signed-off-by: Katariina Hanhisalo <katariina.hanhisalo@xamk.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Perltidy
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-09 10:15:05 -03:00
7e2f6d66d6
Bug 35254: Add import_record_id to order inputs
This patch follows the logic of bug 32166 and adds specific inputs for each order to avoid any misalignment when some records are not imported

To test:
1 - Find a vendor in acquisitions
2 - Create or find an open basket
3 - Add to basket form a new file
4 - Stage file and add to basket
5 - Select the second record in the list
6 - Enter price info
7 - Save (don't forget, you need to set item type in the second tab)
8 - The order has no price info!
9 - Apply patch
10 - Repeat 3-7 above, staging file fresh
11 - Confirm order has correct prices
12 - Test with a file with many records
13 - Confirm any combination of choosing/skipping records works as expected

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-08 17:52:45 -03:00
Aleisha Amohia
0ef83c041d
Bug 34908: Sort item types alphabetically by description when adding a new empty record as an order to a basket
To test:

1. Go to Koha administration -> Item types. Add a new item type "B" with the description "Test" so it will be obvious if it is sorted by the code "B" instead of the description "Test".
2. Go to Acquisitions. Add to a basket from a new empty record
3. In the Catalog details section, note the Item type dropdown. Confirm your "Test" item type, is showing near the top of the list, indicating it has been sorted based on the code "B"
4. Apply patch and restart services. Refresh the page.
5. Open the Item type dropdown again and confirm your "Test" item type is showing in the expected alphabetical order.

NC amended patch - tidied

Sponsored-by: South Taranaki District Council
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-25 12:09:54 -03:00
472e38f9ad
Bug 14092: (QA follow-up) Avoid fiddling with the hash in the template
prove t/db_dependent/Acquisition.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 16:31:15 -03:00
e922ac237c
Bug 14092: Add 'any status' option to acq order search form
Sometimes it's really helpful to see all orders for a basket, a
vendor or a standing order, including the cancelled ones.
Currently this is not possible, as we have search options for
every single status and one for "any except cancelled",
but no "Any status" option.

This patch adds the "Any status" option. The sometimes
appearing empty entry is updated to "Any status except cancelled"
as this is what it does.

Testing data:
* Requires multiple order lines with different order status
* Must include at least one order line with status 'cancelled'

To test:
* Go to acquisitions
* Open the advanced search page from the top search options:
  Order search > config icon > Advanced search link
* Verify the status pull down looks as described above
* Apply patch
* Verify there is now an "Any status" option in the pull down
* Try searches for different status, including "Any status"
* Verify the results are as expected
* Create a new basket
* Create an order line by 'From an existing order (copy)'
* Verify the search form there also works as expected

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-20 16:31:15 -03:00
ef16271ed5
Bug 31631: (QA follow-up) Tidy code
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 15:41:37 -03:00
Aleisha Amohia
3a720e5181
Bug 31631: (follow-up) Use CalculateFundValuesIncludingTax when modifying existing order
This patch depends on Bug 31840.

To test:
1) Edit an order and increase the price so that you would expect it to
trigger a warning that you will exceed the amount allowed for this Fund
2) Confirm the warning is triggered

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-10-18 15:41:35 -03:00
3ca1ab63ac
Bug 31631: Optionally use tax-exclusive values for calculating fund values
Test plan:
1. Apply patches
2. sudo koha-upgrade-schema <instance>
3. Restart services
4. Set TaxRates syspref = 0.15
5. Create a new fund with amount = 1000
6. Add an order to a basket with the following values:
- Fund = Choose the fund from step #5
- Quantity = 1
- Vendor price = 10
- Tax rate = 15%
- Discount = 20%
- Retail price = 10.00
- Replacement cost = 10.00
- Actual cost = 10.00
- Ensure the basket belongs to a vendor with ("List prices" = "Don't include tax" and "Invoice prices" = "Don't include tax")
7. Go to the Acquisitions home page
8. Confirm the 'Ordered' column for the step #5 fund contains 9.20
9. Click on the 9.20 link and confirm the ordered.pl page that loads
also contains 9.20 as the 'Subtotal'

10. Change 'CalculateFundValuesIncludingTax' = 'Exclude'
11. On the Acquisitions home page confirm the 'Ordered' column now
contains 8.00
12. Click on the 8.00 link and confirm the ordered.pl page also contains
8.00 as the 'Subtotal'

13. Close your basket and receive your order - change the 'Actual costs'
= 8.00 (the $10 retail price less the 20% discount, tax exclusive)
14. Go to the Acquisitions home page and confirm the 'Spent' column now
contains 8.00
15. Click on the 8.00 link and confirm the spent.pl page also contains
8.00 as the 'Subtotal'

16. Change 'CalculateFundValuesIncludingTax' = 'Include'
17. Confirm the 'Spent' column on the Acquisitions home page now shows
9.20
18. Click on the 9.20 link and confirm the spent.pl page also contains
9.20 as the 'Subtotal'

Sponsored-by: Waikato Institute of Technology, New Zealand

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-10-18 15:41:35 -03:00
Emily Lamancusa
461d17b270
Bug 34752: (QA follow-up) perltidy
Signed-off-by: emlam <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 10:25:55 -03:00
772140dbc6
Bug 34752: Add AV handling to sort1/sort2 on baskets
This patch adds Authorized Value handling for the display of sort1 and
sort2 fields in the acquisitions basket display page.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: emlam <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 10:25:55 -03:00
214a30e657
Bug 33170: Refactor MARCItemFieldsToOrder to make adding more fields trivial
There is no need for this code to have a hard coded list of fields directly in the code.
Any invalid keys would be skipped anyway.
If we refactor this code then adding new fields will be much simpler.

Test Plan:
1) Set up your MARCItemFieldsToOrder, verify everything is working
2) Apply this patch
3) Restart all the things!
4) Verify there has been no change to the MARCItemFieldsToOrder
   functionality

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 10:31:49 -03:00
9f41a0fb97
Bug 34645: (follow-up) save sort1 and sort2 in order
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:15:36 -04:00
f3bf1f3da5
Bug 34645: always use discount, sort1, and sort2 from MarcFieldsToOrder
These values are stored at the order level, not per item. This patch simply sets the order values from the values retrieved from MarcFieldsToOrder even inf MarcItemFields to order is being used for other fields

To test:
Setup -- Set systempreferences below

MarcFieldsToOrder:
price: 949$g
quantity: 949$k
budget_code: 949$l
discount: 949$m
sort1: 949$n
sort2: 949$q

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

Stage the attached bib-303.marcxml file
Add to basket from the staged file
Note that discount and sort1 and sort2 are not populated per the Marc
Apply patch, restart all
Stage and add to basket again
Confirm discount and sort1 and sort2 are populated correctly

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-04 09:15:36 -04:00
06c2b4898b
Bug 28449: Add column with invoice number to basket summary page
At the moment it's quite a lot of clicks to get from the basket
summary to the invoice something was received in. This adds a nice
shortcut by creating a new column for the invoicenumber in the basket
summary table.

To test:
* Make sure you have a basket with some received and unreceived
  order lines
* Verify that the (received) shows for your received lines
* Verify no invoice number or link to it in sight
* Apply patch
* Verify that there is now a column for the Invoice containing
  the invoice number as a link to the invoice
* Test with a staff patron, that doesn't have edit_invoices permission
* Verify that now instead of a link you see the invoice number as text

Be happy, sign off ;)

Note: this doesn't change the CSV export. The way the CSV is built is
quite different to the summary table, so it would be better handled
in a separate bug/patch. The columns are already quite different!

Sponsored-by: The Research University in the Helmholtz Association (KIT)

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-09-25 10:53:50 -03:00
b3427f71ae
Bug 34445: Set default budget in addorderiso2709.pl
This patch allows the default budget to be used as a fallback if no budget is selected. Currently the default budget is set using lines 129-133 but then is never used.

QA follow-up:
- perl tidied
- budget_codes changed to budget_ids for consistency

Test plan:
1) Apply patch
2) restart_all
3) Follow the steps from the bug description
4) Order lines should be added properly

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Rearranged comments
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-08-30 10:07:05 -03:00