Bug 40655

Summary: Transport cost matrix doesn't save changes
Product: Koha Reporter: Lisette Scheer <lisette>
Component: System AdministrationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40620
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Lisette Scheer 2025-08-14 20:11:50 UTC
When editing transport-cost-matrix, it will save the numbers but not if you've enabled transfers.

It also doesn't reflect disabled/enabled correctly from the database, so if you go in and make changes it re-disables them. 

To recreate:

1. Turn on the UseTransportCostMatrix system preference
2. Got to Administration/transport cost matrix
3. Edit a number of boxes to add numbers and uncheck the 'disabled' box
4. save
5. Observe that all (or most?) of the boxes are still disabled.
6. Run a report: select * from transport_cost where cost !='0.00' 
7. Observe that they are disabled. 
8. in koha-mysql: update transport_cost set disable_transfer = 0 where cost !=0.00;
9. Repeat step 6, they should have 0 instead of 1 for disable_transfer
10. Navigate to the transport cost matrix (don't refresh the page!)
11. Observe that the boxes are still disabled
12. Save (no changes needed)
13. Repeat step 6
14. Observe they are once again marked as disable_transfer 1