[Bug 41297] New: Add duplicate invoice number detection on EDI invoice import
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Bug ID: 41297 Summary: Add duplicate invoice number detection on EDI invoice import Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org EDIFACT invoice processing should detect and block duplicate invoice numbers, notify the supplier (possibly via an EDI CONTRL message), and alert library staff. While Koha has the AcqWarnOnDuplicateInvoice system preference for manual invoice creation (implemented in Bug 10366), this check is not applied to invoices created automatically via EDIFACT/EDI processing in Koha/EDI.pm. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38195 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38195 [Bug 38195] EDI/Edifact classes should use Koha::Objects instead of plain DBIC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |40383 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383 [Bug 40383] Modernise the EDIFACT Message display modal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 189962 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189962&action=edit Bug 41297: Block duplicate EDIFACT invoice processing This patch adds duplicate invoice detection and blocking for EDIFACT invoice processing, with email notifications to library staff and vendors. Key features: 1. System preferences to enable/disable duplicate blocking and email notifications 2. Database index on aqinvoices (invoicenumber, booksellerid) for performance 3. Email notifications using the message_queue (GetPreparedLetter → EnqueueLetter pattern) 4. Vendor contact-based notifications via a new aqcontacts.edi_error_notification flag 5. Two notice templates (EDI_DUP_INV_LIBRARY and EDI_DUP_INV_VENDOR) Changes: - Add EdiBlockDuplicateInvoice system preference - Add EdiBlockDuplicateInvoiceEmailNotice system preference - Add EdiBlockDuplicateInvoiceEmailAddresses system preference - Add edi_error_notification column to aqcontacts table - Add duplicate invoice detection logic to Koha::EDI::process_invoice - Add email notification support using standard Koha messaging queue - Add "Contact about EDI errors" checkbox to vendor contacts UI - Add notice templates to sample_notices.yml for fresh installations - Add test coverage in t/db_dependent/Koha/EDI.t Test plan: 1. Run database update: perl installer/data/mysql/updatedatabase.pl 2. Enable system preferences: - Set EdiBlockDuplicateInvoice to "Block" - Set EdiBlockDuplicateInvoiceEmailNotice to "Send" - Set EdiBlockDuplicateInvoiceEmailAddresses to valid email(s) 3. Edit a vendor and add a contact with "Contact about EDI errors" enabled 4. Process an EDIFACT invoice 5. Attempt to process the same invoice again - should be blocked 6. Check message_queue table for queued notifications 7. Run tests: prove t/db_dependent/Koha/EDI.t :: duplicate_invoice_blocking -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Sponsorship status|--- |Sponsored Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hdunne-howrie@westminster.g | |ov.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 189963 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189963&action=edit Bug 41297: Block duplicate EDIFACT invoice processing This patch adds duplicate invoice detection and blocking for EDIFACT invoice processing, with email notifications to library staff and vendors. Key features: 1. System preferences to enable/disable duplicate blocking and email notifications 2. Database index on aqinvoices (invoicenumber, booksellerid) for performance 3. Email notifications using the message_queue (GetPreparedLetter → EnqueueLetter pattern) 4. Vendor contact-based notifications via a new aqcontacts.edi_error_notification flag 5. Two notice templates (EDI_DUP_INV_LIBRARY and EDI_DUP_INV_VENDOR) Changes: - Add EdiBlockDuplicateInvoice system preference - Add EdiBlockDuplicateInvoiceEmailNotice system preference - Add EdiBlockDuplicateInvoiceEmailAddresses system preference - Add edi_error_notification column to aqcontacts table - Add duplicate invoice detection logic to Koha::EDI::process_invoice - Add email notification support using standard Koha messaging queue - Add "Contact about EDI errors" checkbox to vendor contacts UI - Add notice templates to sample_notices.yml for fresh installations - Add test coverage in t/db_dependent/Koha/EDI.t Test plan: 1. Run database update: perl installer/data/mysql/updatedatabase.pl 2. Enable system preferences: - Set EdiBlockDuplicateInvoice to "Block" - Set EdiBlockDuplicateInvoiceEmailNotice to "Send" - Set EdiBlockDuplicateInvoiceEmailAddresses to valid email(s) 3. Edit a vendor and add a contact with "Contact about EDI errors" enabled 4. Process an EDIFACT invoice 5. Attempt to process the same invoice again - should be blocked 6. Check message_queue table for queued notifications 7. Run tests: prove t/db_dependent/Koha/EDI.t :: duplicate_invoice_blocking -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189962|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 189964 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189964&action=edit Bug 41297: Block duplicate EDIFACT invoice processing This patch adds duplicate invoice detection and blocking for EDIFACT invoice processing, with email notifications to library staff and vendors. Key features: 1. System preferences to enable/disable duplicate blocking and email notifications 2. Database index on aqinvoices (invoicenumber, booksellerid) for performance 3. Email notifications using the message_queue (GetPreparedLetter → EnqueueLetter pattern) 4. Vendor contact-based notifications via a new aqcontacts.edi_error_notification flag 5. Two notice templates (EDI_DUP_INV_LIBRARY and EDI_DUP_INV_VENDOR) Changes: - Add EdiBlockDuplicateInvoice system preference - Add EdiBlockDuplicateInvoiceEmailNotice system preference - Add EdiBlockDuplicateInvoiceEmailAddresses system preference - Add edi_error_notification column to aqcontacts table - Add duplicate invoice detection logic to Koha::EDI::process_invoice - Add email notification support using standard Koha messaging queue - Add "Contact about EDI errors" checkbox to vendor contacts UI - Add notice templates to sample_notices.yml for fresh installations - Add test coverage in t/db_dependent/Koha/EDI.t Test plan: 1. Run database update: perl installer/data/mysql/updatedatabase.pl 2. Enable system preferences: - Set EdiBlockDuplicateInvoice to "Block" - Set EdiBlockDuplicateInvoiceEmailNotice to "Send" - Set EdiBlockDuplicateInvoiceEmailAddresses to valid email(s) 3. Edit a vendor and add a contact with "Contact about EDI errors" enabled 4. Process an EDIFACT invoice 5. Attempt to process the same invoice again - should be blocked 6. Check message_queue table for queued notifications 7. Run tests: prove t/db_dependent/Koha/EDI.t :: duplicate_invoice_blocking Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189963|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Comma delimited| |Royal Borough of Kensington list of Sponsors| |and Chelsea | |<https://www.rbkc.gov.uk/>, | |Westminster City Council | |<https://www.westminster.go | |v.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189964|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194511 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194511&action=edit Bug 41297: Database updates Patch from commit 7cb1c12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194512 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194512&action=edit Bug 41297: Automated schema update Patch from commit 00e4ef6 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194513 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194513&action=edit Bug 41297: Block duplicate EDIFACT invoice processing This patch adds duplicate invoice detection and blocking for EDIFACT invoice processing, with email notifications to library staff and vendors. Key features: 1. System preferences to enable/disable duplicate blocking and email notifications 2. Database index on aqinvoices (invoicenumber, booksellerid) for performance 3. Email notifications using the message_queue (GetPreparedLetter → EnqueueLetter pattern) 4. Vendor contact-based notifications via a new aqcontacts.edi_error_notification flag 5. Two notice templates (EDI_DUP_INV_LIBRARY and EDI_DUP_INV_VENDOR) Changes: - Add EdiBlockDuplicateInvoice system preference - Add EdiBlockDuplicateInvoiceEmailNotice system preference - Add EdiBlockDuplicateInvoiceEmailAddresses system preference - Add edi_error_notification column to aqcontacts table - Add duplicate invoice detection logic to Koha::EDI::process_invoice - Add email notification support using standard Koha messaging queue - Add "Contact about EDI errors" checkbox to vendor contacts UI - Add notice templates to sample_notices.yml for fresh installations - Add test coverage in t/db_dependent/Koha/EDI.t Test plan: 1. Run database update: perl installer/data/mysql/updatedatabase.pl 2. Enable system preferences: - Set EdiBlockDuplicateInvoice to "Block" - Set EdiBlockDuplicateInvoiceEmailNotice to "Send" - Set EdiBlockDuplicateInvoiceEmailAddresses to valid email(s) 3. Edit a vendor and add a contact with "Contact about EDI errors" enabled 4. Process an EDIFACT invoice 5. Attempt to process the same invoice again - should be blocked 6. Check message_queue table for queued notifications 7. Run tests: prove t/db_dependent/Koha/EDI.t :: duplicate_invoice_blocking Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42001 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 [Bug 42001] Add duplicate purchase order number detection on EDI quote import -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194511|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194512|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194513|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194690 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194690&action=edit Bug 41297: Database updates Patch from commit b5b073c -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #8 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194691 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194691&action=edit Bug 41297: Automated schema update Patch from commit df009d9 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #9 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194692 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194692&action=edit Bug 41297: Block duplicate EDIFACT invoice processing This patch adds duplicate invoice detection and blocking for EDIFACT invoice processing, with email notifications to library staff and vendors. Key features: 1. System preferences to enable/disable duplicate blocking and email notifications 2. Database index on aqinvoices (invoicenumber, booksellerid) for performance 3. Email notifications using the message_queue (GetPreparedLetter → EnqueueLetter pattern) 4. Vendor contact-based notifications via a new aqcontacts.edi_error_notification flag 5. Two notice templates (EDI_DUP_INV_LIBRARY and EDI_DUP_INV_VENDOR) Changes: - Add EdiBlockDuplicateInvoice system preference - Add EdiBlockDuplicateInvoiceEmailNotice system preference - Add EdiBlockDuplicateInvoiceEmailAddresses system preference - Add edi_error_notification column to aqcontacts table - Add duplicate invoice detection logic to Koha::EDI::process_invoice - Add email notification support using standard Koha messaging queue - Add "Contact about EDI errors" checkbox to vendor contacts UI - Add notice templates to sample_notices.yml for fresh installations - Add test coverage in t/db_dependent/Koha/EDI.t Test plan: 1. Run database update: perl installer/data/mysql/updatedatabase.pl 2. Enable system preferences: - Set EdiBlockDuplicateInvoice to "Block" - Set EdiBlockDuplicateInvoiceEmailNotice to "Send" - Set EdiBlockDuplicateInvoiceEmailAddresses to valid email(s) 3. Edit a vendor and add a contact with "Contact about EDI errors" enabled 4. Process an EDIFACT invoice 5. Attempt to process the same invoice again - should be blocked 6. Check message_queue table for queued notifications 7. Run tests: prove t/db_dependent/Koha/EDI.t :: duplicate_invoice_blocking Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #10 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194693 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194693&action=edit Bug 41297: (follow-up) Improve system preference descriptions Clarify the three EdiBlockDuplicate* preferences: - EdiBlockDuplicateInvoice: draw comparison with AcqWarnOnDuplicateInvoice to make it clear this is the EDI equivalent for automated processing - EdiBlockDuplicateInvoiceEmailNotice: name the EDI_DUP_INV_LIBRARY and EDI_DUP_INV_VENDOR notice templates and their respective audiences - EdiBlockDuplicateInvoiceEmailAddresses: clarify these are acquisitions staff addresses (not vendor contacts), name the EDI_DUP_INV_LIBRARY template, and note vendor contacts come from their EDI account settings Updated in acquisitions.pref, atomicupdate, and sysprefs.sql. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194690|0 |1 is obsolete| | Attachment #194691|0 |1 is obsolete| | Attachment #194692|0 |1 is obsolete| | Attachment #194693|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #11 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198457 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198457&action=edit Bug 41297: Database updates Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198458 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198458&action=edit Bug 41297: Automated schema update Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #13 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198459 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198459&action=edit Bug 41297: Block duplicate EDIFACT invoice processing This patch adds duplicate invoice detection and blocking for EDIFACT invoice processing, with email notifications to library staff and vendors. Key features: 1. System preferences to enable/disable duplicate blocking and email notifications 2. Database index on aqinvoices (invoicenumber, booksellerid) for performance 3. Email notifications using the message_queue (GetPreparedLetter → EnqueueLetter pattern) 4. Vendor contact-based notifications via a new aqcontacts.edi_error_notification flag 5. Two notice templates (EDI_DUP_INV_LIBRARY and EDI_DUP_INV_VENDOR) Changes: - Add EdiBlockDuplicateInvoice system preference - Add EdiBlockDuplicateInvoiceEmailNotice system preference - Add EdiBlockDuplicateInvoiceEmailAddresses system preference - Add edi_error_notification column to aqcontacts table - Add duplicate invoice detection logic to Koha::EDI::process_invoice - Add email notification support using standard Koha messaging queue - Add "Contact about EDI errors" checkbox to vendor contacts UI - Add notice templates to sample_notices.yml for fresh installations - Add test coverage in t/db_dependent/Koha/EDI.t Test plan: 1. Run database update: perl installer/data/mysql/updatedatabase.pl 2. Enable system preferences: - Set EdiBlockDuplicateInvoice to "Block" - Set EdiBlockDuplicateInvoiceEmailNotice to "Send" - Set EdiBlockDuplicateInvoiceEmailAddresses to valid email(s) 3. Edit a vendor and add a contact with "Contact about EDI errors" enabled 4. Process an EDIFACT invoice 5. Attempt to process the same invoice again - should be blocked 6. Check message_queue table for queued notifications 7. Run tests: prove t/db_dependent/Koha/EDI.t :: duplicate_invoice_blocking Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #14 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198460 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198460&action=edit Bug 41297: (follow-up) Improve system preference descriptions Rename to place the preferences adjacent to EdifactInvoiceImport on the system preferences page and align notifications preferences with conventions. - EdiBlockDuplicateInvoice -> EdifactInvoiceImportBlockDuplicates - EdiBlockDuplicateInvoiceEmailNotice -> EdifactInvoiceImportBlockDuplicatesEmailNotice - EdiBlockDuplicateInvoiceEmailAddresses -> EdifactInvoiceImportBlockDuplicatesEmailAddresses - Change EdiBlockDuplicateInvoiceEmailNotice from YesNo to Choice, matching the EmailPurchaseSuggestions/EmailAddressForSuggestions pattern. Options are: Do not send / AcquisitionsDefaultEmailAddress / specific email addresses / KohaAdminEmailAddress. - EdiBlockDuplicateInvoiceEmailAddresses is now only used when the choice is set to 'specific email addresses', matching EmailAddressForSuggestions. - Pass from_address (AcquisitionsDefaultEmailAddress with fallback) and reply_address (AcquisitionsDefaultReplyTo) to EnqueueLetter for both library and vendor notifications, consistent with other acquisitions notices. - Add UPDATE in atomicupdate to migrate existing YesNo installs to Choice. Update all references in EDI.pm, acquisitions.pref, atomicupdate, sysprefs.sql, and tests. Also fix test mock values for EmailNotice from the old YesNo value (1) to the correct Choice value ('EdifactInvoiceImportBlockDuplicatesEmailAddresses'). Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198460|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #15 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198461 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198461&action=edit Bug 41297: (follow-up) Improve system preference descriptions Rename to place the preferences adjacent to EdifactInvoiceImport on the system preferences page and align notifications preferences with conventions. - EdiBlockDuplicateInvoice -> EdifactInvoiceImportBlockDuplicates - EdiBlockDuplicateInvoiceEmailNotice -> EdifactInvoiceImportBlockDuplicatesEmailNotice - EdiBlockDuplicateInvoiceEmailAddresses -> EdifactInvoiceImportBlockDuplicatesEmailAddresses - Change EdiBlockDuplicateInvoiceEmailNotice from YesNo to Choice, matching the EmailPurchaseSuggestions/EmailAddressForSuggestions pattern. Options are: Do not send / AcquisitionsDefaultEmailAddress / specific email addresses / KohaAdminEmailAddress. - EdiBlockDuplicateInvoiceEmailAddresses is now only used when the choice is set to 'specific email addresses', matching EmailAddressForSuggestions. - Pass from_address (AcquisitionsDefaultEmailAddress with fallback) and reply_address (AcquisitionsDefaultReplyTo) to EnqueueLetter for both library and vendor notifications, consistent with other acquisitions notices. - Add UPDATE in atomicupdate to migrate existing YesNo installs to Choice. Update all references in EDI.pm, acquisitions.pref, atomicupdate, sysprefs.sql, and tests. Also fix test mock values for EmailNotice from the old YesNo value (1) to the correct Choice value ('EdifactInvoiceImportBlockDuplicatesEmailAddresses'). Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198457|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198458|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198459|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198461|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #16 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201321 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201321&action=edit Bug 41297: Database updates Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #17 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201322 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201322&action=edit Bug 41297: Automated schema update Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #18 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201323 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201323&action=edit Bug 41297: Block duplicate EDIFACT invoice processing This patch adds duplicate invoice detection and blocking for EDIFACT invoice processing, with email notifications to library staff and vendors. Key features: 1. System preferences to enable/disable duplicate blocking and email notifications 2. Database index on aqinvoices (invoicenumber, booksellerid) for performance 3. Email notifications using the message_queue (GetPreparedLetter → EnqueueLetter pattern) 4. Vendor contact-based notifications via a new aqcontacts.edi_error_notification flag 5. Two notice templates (EDI_DUP_INV_LIBRARY and EDI_DUP_INV_VENDOR) Changes: - Add EdiBlockDuplicateInvoice system preference - Add EdiBlockDuplicateInvoiceEmailNotice system preference - Add EdiBlockDuplicateInvoiceEmailAddresses system preference - Add edi_error_notification column to aqcontacts table - Add duplicate invoice detection logic to Koha::EDI::process_invoice - Add email notification support using standard Koha messaging queue - Add "Contact about EDI errors" checkbox to vendor contacts UI - Add notice templates to sample_notices.yml for fresh installations - Add test coverage in t/db_dependent/Koha/EDI.t Test plan: 1. Run database update: perl installer/data/mysql/updatedatabase.pl 2. Enable system preferences: - Set EdiBlockDuplicateInvoice to "Block" - Set EdiBlockDuplicateInvoiceEmailNotice to "Send" - Set EdiBlockDuplicateInvoiceEmailAddresses to valid email(s) 3. Edit a vendor and add a contact with "Contact about EDI errors" enabled 4. Process an EDIFACT invoice 5. Attempt to process the same invoice again - should be blocked 6. Check message_queue table for queued notifications 7. Run tests: prove t/db_dependent/Koha/EDI.t :: duplicate_invoice_blocking Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #19 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201324 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201324&action=edit Bug 41297: (follow-up) Improve system preference descriptions Rename to place the preferences adjacent to EdifactInvoiceImport on the system preferences page and align notifications preferences with conventions. - EdiBlockDuplicateInvoice -> EdifactInvoiceImportBlockDuplicates - EdiBlockDuplicateInvoiceEmailNotice -> EdifactInvoiceImportBlockDuplicatesEmailNotice - EdiBlockDuplicateInvoiceEmailAddresses -> EdifactInvoiceImportBlockDuplicatesEmailAddresses - Change EdiBlockDuplicateInvoiceEmailNotice from YesNo to Choice, matching the EmailPurchaseSuggestions/EmailAddressForSuggestions pattern. Options are: Do not send / AcquisitionsDefaultEmailAddress / specific email addresses / KohaAdminEmailAddress. - EdiBlockDuplicateInvoiceEmailAddresses is now only used when the choice is set to 'specific email addresses', matching EmailAddressForSuggestions. - Pass from_address (AcquisitionsDefaultEmailAddress with fallback) and reply_address (AcquisitionsDefaultReplyTo) to EnqueueLetter for both library and vendor notifications, consistent with other acquisitions notices. - Add UPDATE in atomicupdate to migrate existing YesNo installs to Choice. Update all references in EDI.pm, acquisitions.pref, atomicupdate, sysprefs.sql, and tests. Also fix test mock values for EmailNotice from the old YesNo value (1) to the correct Choice value ('EdifactInvoiceImportBlockDuplicatesEmailAddresses'). Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #20 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201325 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201325&action=edit Bug 41297: (QA follow-up) Sort new system preferences in sysprefs.sql Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #21 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201326 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201326&action=edit Bug 41297: (QA follow-up) Fix up the atomicupdate Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #22 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201327 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201327&action=edit Bug 41297: (QA follow-up) Fix the duplicate invoice notices * Was using OPACBaseURL instead of staffClientBaseURL * Fixed [% aqbooksellers.name %] to [% bookseller.name %] Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #23 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201328 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201328&action=edit Bug 41297: (QA follow-up) Avoid extra database query Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|38195 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38195 [Bug 38195] EDI/Edifact classes should use Koha::Objects instead of plain DBIC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Patch doesn't apply CC| |pedro.amorim@openfifth.co.u | |k -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201321|0 |1 is obsolete| | Attachment #201322|0 |1 is obsolete| | Attachment #201323|0 |1 is obsolete| | Attachment #201324|0 |1 is obsolete| | Attachment #201325|0 |1 is obsolete| | Attachment #201326|0 |1 is obsolete| | Attachment #201327|0 |1 is obsolete| | Attachment #201328|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #24 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205147 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205147&action=edit Bug 41297: Database updates Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #25 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205148 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205148&action=edit Bug 41297: Automated schema update Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #26 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205149 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205149&action=edit Bug 41297: Block duplicate EDIFACT invoice processing This patch adds duplicate invoice detection and blocking for EDIFACT invoice processing, with email notifications to library staff and vendors. Key features: 1. System preferences to enable/disable duplicate blocking and email notifications 2. Database index on aqinvoices (invoicenumber, booksellerid) for performance 3. Email notifications using the message_queue (GetPreparedLetter → EnqueueLetter pattern) 4. Vendor contact-based notifications via a new aqcontacts.edi_error_notification flag 5. Two notice templates (EDI_DUP_INV_LIBRARY and EDI_DUP_INV_VENDOR) Changes: - Add EdiBlockDuplicateInvoice system preference - Add EdiBlockDuplicateInvoiceEmailNotice system preference - Add EdiBlockDuplicateInvoiceEmailAddresses system preference - Add edi_error_notification column to aqcontacts table - Add duplicate invoice detection logic to Koha::EDI::process_invoice - Add email notification support using standard Koha messaging queue - Add "Contact about EDI errors" checkbox to vendor contacts UI - Add notice templates to sample_notices.yml for fresh installations - Add test coverage in t/db_dependent/Koha/EDI.t Test plan: 1. Run database update: perl installer/data/mysql/updatedatabase.pl 2. Enable system preferences: - Set EdiBlockDuplicateInvoice to "Block" - Set EdiBlockDuplicateInvoiceEmailNotice to "Send" - Set EdiBlockDuplicateInvoiceEmailAddresses to valid email(s) 3. Edit a vendor and add a contact with "Contact about EDI errors" enabled 4. Process an EDIFACT invoice 5. Attempt to process the same invoice again - should be blocked 6. Check message_queue table for queued notifications 7. Run tests: prove t/db_dependent/Koha/EDI.t :: duplicate_invoice_blocking Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #27 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205150 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205150&action=edit Bug 41297: (follow-up) Improve system preference descriptions Rename to place the preferences adjacent to EdifactInvoiceImport on the system preferences page and align notifications preferences with conventions. - EdiBlockDuplicateInvoice -> EdifactInvoiceImportBlockDuplicates - EdiBlockDuplicateInvoiceEmailNotice -> EdifactInvoiceImportBlockDuplicatesEmailNotice - EdiBlockDuplicateInvoiceEmailAddresses -> EdifactInvoiceImportBlockDuplicatesEmailAddresses - Change EdiBlockDuplicateInvoiceEmailNotice from YesNo to Choice, matching the EmailPurchaseSuggestions/EmailAddressForSuggestions pattern. Options are: Do not send / AcquisitionsDefaultEmailAddress / specific email addresses / KohaAdminEmailAddress. - EdiBlockDuplicateInvoiceEmailAddresses is now only used when the choice is set to 'specific email addresses', matching EmailAddressForSuggestions. - Pass from_address (AcquisitionsDefaultEmailAddress with fallback) and reply_address (AcquisitionsDefaultReplyTo) to EnqueueLetter for both library and vendor notifications, consistent with other acquisitions notices. - Add UPDATE in atomicupdate to migrate existing YesNo installs to Choice. Update all references in EDI.pm, acquisitions.pref, atomicupdate, sysprefs.sql, and tests. Also fix test mock values for EmailNotice from the old YesNo value (1) to the correct Choice value ('EdifactInvoiceImportBlockDuplicatesEmailAddresses'). Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #28 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205151 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205151&action=edit Bug 41297: (QA follow-up) Sort new system preferences in sysprefs.sql Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #29 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205152 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205152&action=edit Bug 41297: (QA follow-up) Fix up the atomicupdate Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #30 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205153 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205153&action=edit Bug 41297: (QA follow-up) Fix the duplicate invoice notices * Was using OPACBaseURL instead of staffClientBaseURL * Fixed [% aqbooksellers.name %] to [% bookseller.name %] Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #31 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205154 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205154&action=edit Bug 41297: (QA follow-up) Avoid extra database query Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #32 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- 1) the dbic appears to have a malformed checksum, doing a dbic myself is stripping away is_boolean decorations on VendorEdiAccount.pm, please verify. 2) New edi_error_notification DB column has a comment on a fresh install path but not on an upgrade, please verify. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #205147|0 |1 is obsolete| | Attachment #205148|0 |1 is obsolete| | Attachment #205149|0 |1 is obsolete| | Attachment #205150|0 |1 is obsolete| | Attachment #205151|0 |1 is obsolete| | Attachment #205152|0 |1 is obsolete| | Attachment #205153|0 |1 is obsolete| | Attachment #205154|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #33 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 206008 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206008&action=edit Bug 41297: Database updates Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #34 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 206009 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206009&action=edit Bug 41297: Automated schema update Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #35 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 206010 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206010&action=edit Bug 41297: Block duplicate EDIFACT invoice processing This patch adds duplicate invoice detection and blocking for EDIFACT invoice processing, with email notifications to library staff and vendors. Key features: 1. System preferences to enable/disable duplicate blocking and email notifications 2. Database index on aqinvoices (invoicenumber, booksellerid) for performance 3. Email notifications using the message_queue (GetPreparedLetter → EnqueueLetter pattern) 4. Vendor contact-based notifications via a new aqcontacts.edi_error_notification flag 5. Two notice templates (EDI_DUP_INV_LIBRARY and EDI_DUP_INV_VENDOR) Changes: - Add EdiBlockDuplicateInvoice system preference - Add EdiBlockDuplicateInvoiceEmailNotice system preference - Add EdiBlockDuplicateInvoiceEmailAddresses system preference - Add edi_error_notification column to aqcontacts table - Add duplicate invoice detection logic to Koha::EDI::process_invoice - Add email notification support using standard Koha messaging queue - Add "Contact about EDI errors" checkbox to vendor contacts UI - Add notice templates to sample_notices.yml for fresh installations - Add test coverage in t/db_dependent/Koha/EDI.t Test plan: 1. Run database update: perl installer/data/mysql/updatedatabase.pl 2. Enable system preferences: - Set EdiBlockDuplicateInvoice to "Block" - Set EdiBlockDuplicateInvoiceEmailNotice to "Send" - Set EdiBlockDuplicateInvoiceEmailAddresses to valid email(s) 3. Edit a vendor and add a contact with "Contact about EDI errors" enabled 4. Process an EDIFACT invoice 5. Attempt to process the same invoice again - should be blocked 6. Check message_queue table for queued notifications 7. Run tests: prove t/db_dependent/Koha/EDI.t :: duplicate_invoice_blocking Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #36 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 206011 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206011&action=edit Bug 41297: (follow-up) Improve system preference descriptions Rename to place the preferences adjacent to EdifactInvoiceImport on the system preferences page and align notifications preferences with conventions. - EdiBlockDuplicateInvoice -> EdifactInvoiceImportBlockDuplicates - EdiBlockDuplicateInvoiceEmailNotice -> EdifactInvoiceImportBlockDuplicatesEmailNotice - EdiBlockDuplicateInvoiceEmailAddresses -> EdifactInvoiceImportBlockDuplicatesEmailAddresses - Change EdiBlockDuplicateInvoiceEmailNotice from YesNo to Choice, matching the EmailPurchaseSuggestions/EmailAddressForSuggestions pattern. Options are: Do not send / AcquisitionsDefaultEmailAddress / specific email addresses / KohaAdminEmailAddress. - EdiBlockDuplicateInvoiceEmailAddresses is now only used when the choice is set to 'specific email addresses', matching EmailAddressForSuggestions. - Pass from_address (AcquisitionsDefaultEmailAddress with fallback) and reply_address (AcquisitionsDefaultReplyTo) to EnqueueLetter for both library and vendor notifications, consistent with other acquisitions notices. - Add UPDATE in atomicupdate to migrate existing YesNo installs to Choice. Update all references in EDI.pm, acquisitions.pref, atomicupdate, sysprefs.sql, and tests. Also fix test mock values for EmailNotice from the old YesNo value (1) to the correct Choice value ('EdifactInvoiceImportBlockDuplicatesEmailAddresses'). Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #37 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 206012 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206012&action=edit Bug 41297: (QA follow-up) Sort new system preferences in sysprefs.sql Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #38 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 206013 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206013&action=edit Bug 41297: (QA follow-up) Fix up the atomicupdate Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #39 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 206014 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206014&action=edit Bug 41297: (QA follow-up) Fix the duplicate invoice notices * Was using OPACBaseURL instead of staffClientBaseURL * Fixed [% aqbooksellers.name %] to [% bookseller.name %] Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #40 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 206015 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206015&action=edit Bug 41297: (QA follow-up) Avoid extra database query Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #41 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 206016 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206016&action=edit Bug 41297: (QA follow-up) Fix DBIC checksums and missing upgrade comment The VendorEdiAccount.pm result class carried a hand-edited, non-genuine md5sum comment ("md5sum:original_schema_bug_41297") left over from an unrelated edit. Running dbic --force with a real checksum in place caused DBIx::Class::Schema::Loader to treat the custom section as untrustworthy and drop the manual is_boolean decorations entirely. The Aqcontact.pm checksum was also stale - it had not been recomputed after edi_error_notification was added by hand, so the file didn't match what a genuine dbic run would produce. Regenerated both files with a real `dbic --force` run against the migrated database, then restored the is_boolean flags for VendorEdiAccount.pm below the DO NOT MODIFY marker. Also add the missing COMMENT clause to the edi_error_notification ALTER TABLE in the atomicupdate, so upgraded instances get the same column comment ('is the edi error notification contact') as a fresh install via kohastructure.sql. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 --- Comment #42 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- (In reply to Pedro Amorim (ammopt) from comment #32)
1) the dbic appears to have a malformed checksum, doing a dbic myself is stripping away is_boolean decorations on VendorEdiAccount.pm, please verify. 2) New edi_error_notification DB column has a comment on a fresh install path but not on an upgrade, please verify.
I think both were bad rebases.. I've fixed them in a final QA follow-up to show the works been done.. would be happy for that to be squashed if you prefer. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org