https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30144
--- Comment #19 from Kyle M Hall (khall) <[email protected]> --- Created attachment 193321 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193321&action=edit Bug 30144: Add UI for servicing instructions This patch adds the user interface for managing and displaying EDIFACT servicing instructions in the acquisitions module. Changes to acqui/neworderempty.pl: - Parses servicing_instruction JSON for editing existing orders - Fetches EDIFACT_SI authorized values for dropdown - Passes data to template in both array and JSON formats Changes to acqui/addorder.pl: - Accepts servicing_instruction_groups_json from form submission - Validates and stores JSON in database Changes to acqui/basket.pl: - Fetches EDIFACT_SI authorized values - Formats servicing instructions for display in get_order_infos() - Creates human-readable display strings with: * LVC codes replaced with descriptions * Groups separated by <br> tags * Format: "Description" or "Description: free text" Changes to neworderempty.tt: - Dynamic UI for adding/removing servicing instruction groups - Each group can contain: * One LVC (coded) instruction only, OR * One LVT (free-text) instruction only, OR * One LVC + one LVT combination - Validation prevents: * More than 2 instructions per group * Duplicate LVC or LVT in same group - LVC instructions use dropdown populated from EDIFACT_SI authorized values - LVT instructions use free-text input - Groups serialized to JSON hidden field for form submission - Smart button labels show what can be added to each group Changes to basket.tt: - Displays servicing instructions in basket table - Pre-formatted in Perl (no JavaScript parsing needed) - Shows LVC descriptions instead of codes - Multiple groups displayed on separate lines Changes to columns_settings.yml: - Adds servicing_instruction column to basket table configuration Display format examples: - LVC only: "Barcode labelling" - LVT only: "Handle with care" - Combined: "Binding: Apply to spine" - Multiple groups (on separate lines): Barcode labelling Binding: Special instructions Test plan: 1. Create/edit order 2. Add servicing instruction groups 3. Try to add more than 2 instructions to a group (should prevent) 4. Try to add duplicate LVC or LVT to group (should prevent) 5. Save order 6. View basket and verify instructions display correctly 7. Edit order and verify instructions load into form Signed-off-by: Kyle M Hall <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
