Bug 40918 - Invoice Adjustment Reason always "No reason" even if report shows a saved reason
Summary: Invoice Adjustment Reason always "No reason" even if report shows a saved reason
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low critical
Assignee: Jonathan Druart
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords: regression, rel_25_05_candidate
Depends on: 38714
Blocks:
  Show dependency treegraph
 
Reported: 2025-09-30 21:47 UTC by Lisette Scheer
Modified: 2025-10-09 21:03 UTC (History)
4 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 40918: Fix invoice adjustement reason selection (2.42 KB, patch)
2025-10-06 10:40 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40918: Fix invoice adjustement reason selection (2.47 KB, patch)
2025-10-06 22:19 UTC, Eric Phetteplace
Details | Diff | Splinter Review
Bug 40918: Fix invoice adjustement reason selection (2.54 KB, patch)
2025-10-09 14:28 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lisette Scheer 2025-09-30 21:47:00 UTC
To recreate:
1. Go to Acquisition.
2. Create a vendor.
3. Click "Receive Shipment"
4. Enter an invoice number and save.
5. Go to Administration->Authorized Values->Add A Category
6. Name it ADJ_REASON
7. Put in 2 options
8. Go to invoices in Aqusition
9. Add an adjustment (enter an amount and select a reason, then save)
10. The reason is set to "no reason"
11. Go to reports
12. new sql report
select * from aqinvoice_adjustments
13. Run the report and see your reason is saved.
14. go back to the invoice and click save adjustments
15. run the report again, see there's no longer a reason.
Comment 1 Katrin Fischer 2025-10-05 13:20:22 UTC
This reads like a data loss bug, upping severity.
Comment 2 Jonathan Druart 2025-10-06 10:37:20 UTC
There is a foo here...
Comment 3 Jonathan Druart 2025-10-06 10:40:37 UTC
Created attachment 187458 [details] [review]
Bug 40918: Fix invoice adjustement reason selection

From
  commit 46f7158f44ced21571dc9deef9ca240fc34a8e6b
  Bug 38714: acqui/invoice.tt

Debugging stuff left, sorry!

Test plan:
1. Go to Acquisition.
2. Create a vendor.
3. Click "Receive Shipment"
4. Enter an invoice number and save.
5. Go to Administration->Authorized Values->Add A Category
6. Name it ADJ_REASON
7. Put in 2 options
8. Go to invoices in Aqusition
9. Add an adjustment (enter an amount and select a reason, then save)
10. The reason is set to "no reason"
11. Go to reports
12. new sql report
select * from aqinvoice_adjustments
13. Run the report and see your reason is saved.
14. go back to the invoice and click save adjustments
15. Run the report and see your reason is saved.
Comment 4 Eric Phetteplace 2025-10-06 22:19:23 UTC
Created attachment 187502 [details] [review]
Bug 40918: Fix invoice adjustement reason selection

From
  commit 46f7158f44ced21571dc9deef9ca240fc34a8e6b
  Bug 38714: acqui/invoice.tt

Debugging stuff left, sorry!

Test plan:
1. Go to Acquisition.
2. Create a vendor.
3. Click "Receive Shipment"
4. Enter an invoice number and save.
5. Go to Administration->Authorized Values->Add A Category
6. Name it ADJ_REASON
7. Put in 2 options
8. Go to invoices in Aqusition
9. Add an adjustment (enter an amount and select a reason, then save)
10. The reason is set to "no reason"
11. Go to reports
12. new sql report
select * from aqinvoice_adjustments
13. Run the report and see your reason is saved.
14. go back to the invoice and click save adjustments
15. Run the report and see your reason is saved.

Signed-off-by: Eric Phetteplace <ephetteplace@cca.edu>
Comment 5 Martin Renvoize (ashimema) 2025-10-09 14:28:59 UTC
Created attachment 187666 [details] [review]
Bug 40918: Fix invoice adjustement reason selection

From
  commit 46f7158f44ced21571dc9deef9ca240fc34a8e6b
  Bug 38714: acqui/invoice.tt

Debugging stuff left, sorry!

Test plan:
1. Go to Acquisition.
2. Create a vendor.
3. Click "Receive Shipment"
4. Enter an invoice number and save.
5. Go to Administration->Authorized Values->Add A Category
6. Name it ADJ_REASON
7. Put in 2 options
8. Go to invoices in Aqusition
9. Add an adjustment (enter an amount and select a reason, then save)
10. The reason is set to "no reason"
11. Go to reports
12. new sql report
select * from aqinvoice_adjustments
13. Run the report and see your reason is saved.
14. go back to the invoice and click save adjustments
15. Run the report and see your reason is saved.

Signed-off-by: Eric Phetteplace <ephetteplace@cca.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 6 Lucas Gass (lukeg) 2025-10-09 21:03:23 UTC
Nice work everyone!

Pushed to main for 25.11