[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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org