From 7cb1c12abbdb3a9d5cf15cfbc9b8c45b1942f499 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 5 Feb 2026 11:52:15 +0000 Subject: [PATCH] Bug 41297: Database updates --- installer/data/mysql/kohastructure.sql | 2 ++ installer/data/mysql/mandatory/sysprefs.sql | 3 +++ 2 files changed, 5 insertions(+) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index a29c7e49292..5ba0748d244 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -628,6 +628,7 @@ CREATE TABLE `aqcontacts` ( `claimissues` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'should this contact receive serial claims', `acqprimary` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'is this the primary contact for acquisitions messages', `serialsprimary` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'is this the primary contact for serials messages', + `edi_error_notification` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'is the edi error notification contact', `booksellerid` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `booksellerid_aqcontacts_fk` (`booksellerid`), @@ -700,6 +701,7 @@ CREATE TABLE `aqinvoices` ( KEY `aqinvoices_fk_aqbooksellerid` (`booksellerid`), KEY `edifact_msg_fk` (`message_id`), KEY `aqinvoices_fk_shipmentcost_budgetid` (`shipmentcost_budgetid`), + KEY `idx_invoicenumber_booksellerid` (`invoicenumber`(100), `booksellerid`), CONSTRAINT `aqinvoices_fk_aqbooksellerid` FOREIGN KEY (`booksellerid`) REFERENCES `aqbooksellers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `aqinvoices_fk_shipmentcost_budgetid` FOREIGN KEY (`shipmentcost_budgetid`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `edifact_msg_fk` FOREIGN KEY (`message_id`) REFERENCES `edifact_messages` (`id`) ON DELETE SET NULL diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 585d7a5d8d8..2017465986d 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -240,6 +240,9 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('EdifactInvoiceImport', 'automatic', 'automatic|manual', 'If on, don\'t auto-import EDI invoices, just keep them in the database with the status \'new\'', 'Choice'), ('EdifactLSL', 'ccode', 'location|ccode|', 'Map EDI sub-location code (GIR+LSL) to Koha Item field, empty to ignore', 'Choice'), ('EdifactLSQ', 'location', 'location|ccode|', 'Map EDI sequence code (GIR+LSQ) to Koha Item field, empty to ignore', 'Choice'), +('EdiBlockDuplicateInvoice', '0', NULL, 'Block processing of EDIFACT invoices when a duplicate invoice number is detected for the same supplier. When enabled, duplicate invoices will be rejected and logged as errors.', 'YesNo'), +('EdiBlockDuplicateInvoiceEmailAddresses', '', NULL, 'Comma-separated list of email addresses to notify when duplicate EDIFACT invoices are detected (e.g., "purchasing@library.org,edi_support@library.org"). Requires EdiBlockDuplicateInvoiceEmailNotice to be enabled.', 'Textarea'), +('EdiBlockDuplicateInvoiceEmailNotice', '0', NULL, 'Send email notification when duplicate EDIFACT invoices are detected. Requires EdiBlockDuplicateInvoice to be enabled.', 'YesNo'), ('ElasticsearchBoostFieldMatch', '0', NULL, 'Add a "match" query to es when searching, will follow indexes chosen in advanced search, or use title-cover for generic keyword or title index search', 'YesNo'), ('ElasticsearchCrossFields', '1', NULL, 'Enable "cross_fields" option for searches using Elastic search.', 'YesNo'), ('ElasticsearchIndexStatus_authorities', '0', 'Authorities index status', NULL, NULL), -- 2.53.0