Bug 34452

Summary: Button 'Update adjustments' is hidden
Product: Koha Reporter: Michaela Sieber <michaela.sieber>
Component: AcquisitionsAssignee: Katrin Fischer <katrin.fischer>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, lisette, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.03,22.11.09
Circulation function:
Bug Depends on: 32746, 33721    
Bug Blocks:    
Attachments: acqui/invoice.pl Hidden Button Update Adjustments
Bug 34452: Restore fund label and 'Update adjustments' button
Bug 34452: Restore fund label and 'Update adjustments' button
Bug 34452: Restore fund label and 'Update adjustments' button
Bug 34452: Restore fund label and 'Update adjustments' button

Description Michaela Sieber 2023-08-01 18:55:53 UTC
To recreate:
1. Go to acquisition modul
2. search for Vendor
3. Button receive shipment and create invoive
4. click finish receiving (we don't need an order line for this test)
5. Click +Add an adjustment
6. Enter an amount and save via Button 'Update adjustments'
7. Now change the amount
8. recognize that there is not button to save or update the changed amount


The Button 'Update adjustments' is hidden, you first have to click on 'Add an adjustment'

That is not intuitive and changed with Version 22.11 and the new UI.

Check in older Koha Versions (e.g. 21.11) that the Button 'Update adjustments' was always visible underneath the Link to 'Add an adjustment'.
Comment 1 Michaela Sieber 2023-08-01 19:16:40 UTC
Created attachment 154130 [details]
acqui/invoice.pl Hidden Button Update Adjustments

Screenshot old vs. new UI
Comment 2 Lisette Scheer 2023-08-03 23:08:15 UTC
I believe this is related to changed made in Bug 32746. 
If you click the add an adjustment button and then make changes to your existing adjustment, it will let you save those, as a workaround until this is fixed.
Comment 3 Katrin Fischer 2023-08-04 14:36:55 UTC
Created attachment 154281 [details] [review]
Bug 34452: Restore fund label and 'Update adjustments' button

This patch fixed 2 small and recent regressions:

* The "Update adjustments" button used to always display. It's
  required to save a new first adjustment, but also to save
  changes to existing adjustments edited inline. It now would
  only display after "Add adjustments" was clicked. We retore
  to display it always. (bug 32746)

* We have several "Fund" pull downs on this page, but they are
  for different things and require different labelling.
  "Fund" was changed to "Shipping fund" which matches at the top,
  but doesn't work for the adjustments table and single adjustment
  form. Now we use "Shipping fund" "Fund" and no label in the table
  as the table header covers it there. (bug 33721)

To test.
  * Add a vendor
  * Receive shipment
  * Add invoice and save
  * Click on "Finish receiving"
  * Verify the button "Update adjustments" appears after clicking
    "Add new adjustment"
  * Verify the button is gone after you clicked it and the table shows
  * Change something in the table - no button to save change :(
  * Apply patch
  * Repeat steps, button "Update adjustments" should not always be
    visible.
Comment 4 Sam Lau 2023-08-04 14:59:18 UTC
Created attachment 154285 [details] [review]
Bug 34452: Restore fund label and 'Update adjustments' button

This patch fixed 2 small and recent regressions:

* The "Update adjustments" button used to always display. It's
  required to save a new first adjustment, but also to save
  changes to existing adjustments edited inline. It now would
  only display after "Add adjustments" was clicked. We retore
  to display it always. (bug 32746)

* We have several "Fund" pull downs on this page, but they are
  for different things and require different labelling.
  "Fund" was changed to "Shipping fund" which matches at the top,
  but doesn't work for the adjustments table and single adjustment
  form. Now we use "Shipping fund" "Fund" and no label in the table
  as the table header covers it there. (bug 33721)

To test.
  * Add a vendor
  * Receive shipment
  * Add invoice and save
  * Click on "Finish receiving"
  * Verify the button "Update adjustments" appears after clicking
    "Add new adjustment"
  * Verify the button is gone after you clicked it and the table shows
  * Change something in the table - no button to save change :(
  * Apply patch
  * Repeat steps, button "Update adjustments" should not always be
    visible.

Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 5 Biblibre Sandboxes 2023-08-07 20:07:28 UTC
Created attachment 154310 [details] [review]
Bug 34452: Restore fund label and 'Update adjustments' button

This patch fixed 2 small and recent regressions:

* The "Update adjustments" button used to always display. It's
  required to save a new first adjustment, but also to save
  changes to existing adjustments edited inline. It now would
  only display after "Add adjustments" was clicked. We retore
  to display it always. (bug 32746)

* We have several "Fund" pull downs on this page, but they are
  for different things and require different labelling.
  "Fund" was changed to "Shipping fund" which matches at the top,
  but doesn't work for the adjustments table and single adjustment
  form. Now we use "Shipping fund" "Fund" and no label in the table
  as the table header covers it there. (bug 33721)

To test.
  * Add a vendor
  * Receive shipment
  * Add invoice and save
  * Click on "Finish receiving"
  * Verify the button "Update adjustments" appears after clicking
    "Add new adjustment"
  * Verify the button is gone after you clicked it and the table shows
  * Change something in the table - no button to save change :(
  * Apply patch
  * Repeat steps, button "Update adjustments" should not always be
    visible.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Comment 6 Katrin Fischer 2023-08-07 20:11:55 UTC
*** Bug 34492 has been marked as a duplicate of this bug. ***
Comment 7 Victor Grousset/tuxayo 2023-08-12 09:08:28 UTC
Created attachment 154394 [details] [review]
Bug 34452: Restore fund label and 'Update adjustments' button

This patch fixed 2 small and recent regressions:

* The "Update adjustments" button used to always display. It's
  required to save a new first adjustment, but also to save
  changes to existing adjustments edited inline. It now would
  only display after "Add adjustments" was clicked. We retore
  to display it always. (bug 32746)

* We have several "Fund" pull downs on this page, but they are
  for different things and require different labelling.
  "Fund" was changed to "Shipping fund" which matches at the top,
  but doesn't work for the adjustments table and single adjustment
  form. Now we use "Shipping fund" "Fund" and no label in the table
  as the table header covers it there. (bug 33721)

To test.
  * Add a vendor
  * Receive shipment
  * Add invoice and save
  * Click on "Finish receiving"
  * Verify the button "Update adjustments" appears after clicking
    "Add new adjustment"
  * Verify the button is gone after you clicked it and the table shows
  * Change something in the table - no button to save change :(
  * Apply patch
  * Repeat steps, button "Update adjustments" should not always be
    visible.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 8 Victor Grousset/tuxayo 2023-08-12 09:10:15 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 9 Tomás Cohen Arazi (tcohen) 2023-08-15 08:25:03 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 10 Fridolin Somers 2023-08-17 18:52:10 UTC
Pushed to 23.05.x for 23.05.03
Comment 11 Pedro Amorim 2023-08-18 13:51:41 UTC
Nice work everyone!

Pushed to 22.11.x for next release