[GIT] Evergreen ILS branch main updated. 81a6cc2680e30f3a11e0ac390a1881c2d2ba0e5b

This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Evergreen ILS". The branch, main has been updated via 81a6cc2680e30f3a11e0ac390a1881c2d2ba0e5b (commit) via 6685d0da29a654a877f8e268fedb47fd299ece8d (commit) via b0214dd02e24f899b03b0ca45ab7e2c73e900492 (commit) via 2e615647b82f9573226207fb66898426da6eb71c (commit) from 5b796601dad9bc8f7b5ab7de141a147a5bf59a40 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 81a6cc2680e30f3a11e0ac390a1881c2d2ba0e5b Author: Galen Charlton <gmc@equinoxOLI.org> Date: Wed Mar 19 14:53:09 2025 -0400 LP#1949243: stamp version update Signed-off-by: Galen Charlton <gmc@equinoxOLI.org> diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index f2428586a1..0f7b681dab 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -92,7 +92,7 @@ CREATE TRIGGER no_overlapping_deps BEFORE INSERT OR UPDATE ON config.db_patch_dependencies FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates'); -INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1461', :eg_version); -- berick/llewellyn.masrshall/JBoyer +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1462', :eg_version); -- jeffdavis/gmcharlt CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1949243_edi_lin_seq_id.sql b/Open-ILS/src/sql/Pg/upgrade/1462.data.lp1949243_edi_lin_seq_id.sql similarity index 76% rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1949243_edi_lin_seq_id.sql rename to Open-ILS/src/sql/Pg/upgrade/1462.data.lp1949243_edi_lin_seq_id.sql index 882875f7cc..29dffa0520 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1949243_edi_lin_seq_id.sql +++ b/Open-ILS/src/sql/Pg/upgrade/1462.data.lp1949243_edi_lin_seq_id.sql @@ -1,6 +1,6 @@ BEGIN; -SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); +SELECT evergreen.upgrade_deps_block_check('1462', :eg_version); INSERT INTO acq.edi_attr (key, label) VALUES ('LINEITEM_SEQUENTIAL_ID', commit 6685d0da29a654a877f8e268fedb47fd299ece8d Author: Galen Charlton <gmc@equinoxOLI.org> Date: Thu Jan 30 16:25:53 2025 -0500 LP#1949243: (follow-up) fix off-by-one error Adjusted a for loop so that an extra empty line item is not added to the order. Signed-off-by: Galen Charlton <gmc@equinoxOLI.org> diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm index 441597fce6..ca0bd0666d 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm @@ -462,7 +462,7 @@ EDI my $li_count = scalar(@lis); # EDI lineitem segments - for (my $i = 0; $i <= $li_count; $i++) { + for (my $i = 0; $i < $li_count; $i++) { $lis[$i]->{seq_id} = $i + 1; $edi .= $self->build_lineitem_segments($lis[$i]); } commit b0214dd02e24f899b03b0ca45ab7e2c73e900492 Author: Jeff Davis <jeff.davis@bc.libraries.coop> Date: Mon Mar 18 13:39:07 2024 -0700 LP#1949243: Allow enumerating EDI LIN lines sequentially Evergreen has been enumerating lineitems using the internal lineitem ID (e.g. LIN+523964), but they should be enumerated sequentially starting at 1 (e.g. LIN+1). This commit adds a new "LINEITEM_SEQUENTIAL_ID" EDI attribute to support sequential enumeration for vendors that want it. Signed-off-by: Jeff Davis <jeff.davis@bc.libraries.coop> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org> diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm index 5f6111e5bd..441597fce6 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm @@ -459,11 +459,14 @@ NAD+SU+$c{provider_id}::92' CUX+2:$c{currency_type}:9' EDI - # EDI lineitem segments - $edi .= $self->build_lineitem_segments($_) for @lis; - my $li_count = scalar(@lis); + # EDI lineitem segments + for (my $i = 0; $i <= $li_count; $i++) { + $lis[$i]->{seq_id} = $i + 1; + $edi .= $self->build_lineitem_segments($lis[$i]); + } + # Count the number of segments in the EDI message by counting the # number of newlines. Add to count for lines below, not including # the UNZ segment. @@ -503,9 +506,14 @@ sub build_lineitem_segments { my $idqual = $li_hash->{idqual}; my $quantity = $li_hash->{quantity}; my $price = $li_hash->{estimated_unit_price}; + my $seq_id = $li_hash->{seq_id}; + + # enumerate lineitems using Evergreen's internal lineitem ID, + # unless the vendor wants us to enumerate them sequentially + $seq_id = $id unless $c{edi_attrs}->{LINEITEM_SEQUENTIAL_ID}; # Line item identifier segments - my $edi = "LIN+$id++$idval:$idqual'\n"; + my $edi = "LIN+$seq_id++$idval:$idqual'\n"; $edi .= "PIA+5+$idval:$idqual'\n"; $edi .= $self->IMD('BTI', $li_hash->{title}); diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 411ebbdaf3..65c51061ab 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -18614,7 +18614,10 @@ INSERT INTO acq.edi_attr (key, label) VALUES 'Lineitem Identifier Fields (LIN/PIA) Use Vendor-Encoded ID Value When Available', 'aea', 'label')), ('LINEITEM_REF_ID_ONLY', oils_i18n_gettext('LINEITEM_REF_ID_ONLY', - 'Lineitem Reference Field (RFF) Uses Lineitem ID Only', 'aea', 'label')) + 'Lineitem Reference Field (RFF) Uses Lineitem ID Only', 'aea', 'label')), + ('LINEITEM_SEQUENTIAL_ID', + oils_i18n_gettext('LINEITEM_SEQUENTIAL_ID', + 'Lineitems Are Enumerated Sequentially', 'aea', 'label')) ; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1949243_edi_lin_seq_id.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1949243_edi_lin_seq_id.sql new file mode 100644 index 0000000000..882875f7cc --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1949243_edi_lin_seq_id.sql @@ -0,0 +1,10 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +INSERT INTO acq.edi_attr (key, label) VALUES + ('LINEITEM_SEQUENTIAL_ID', + oils_i18n_gettext('LINEITEM_SEQUENTIAL_ID', + 'Lineitems Are Enumerated Sequentially', 'aea', 'label')); + +COMMIT; diff --git a/docs/RELEASE_NOTES_NEXT/Acquisitions/lp1949243_edi_fix_ftx_lin.adoc b/docs/RELEASE_NOTES_NEXT/Acquisitions/lp1949243_edi_fix_ftx_lin.adoc new file mode 100644 index 0000000000..c310bf1953 --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/Acquisitions/lp1949243_edi_fix_ftx_lin.adoc @@ -0,0 +1,9 @@ +== EDI Attribute Added for Enumerating Lineitems Sequentially == + +Historically, Evergreen's EDI output has used the internal lineitem ID as the +line sequence number in LIN lines. Some vendors (e.g. ULS) would prefer LIN to +use a sequentially assigned number instead. A new EDI attribute, "Lineitems +Are Enumerated Sequentially," has been added to support that. See +[LP 1949243](https://bugs.launchpad.net/evergreen/+bug/1949243) for further +discussion. + commit 2e615647b82f9573226207fb66898426da6eb71c Author: Jeff Davis <jeff.davis@bc.libraries.coop> Date: Mon Mar 18 13:42:14 2024 -0700 LP#1949243: add missing field to FTX line in EDIWriter Release-note: Fix EDI output by adding a field to the FTX line. Signed-off-by: Jeff Davis <jeff.davis@bc.libraries.coop> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org> diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm index ba4b07fac2..5f6111e5bd 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm @@ -527,7 +527,7 @@ sub build_lineitem_segments { for my $note (@{$li_hash->{notes}}) { if ($note) { - $edi .= "FTX+LIN+1+$note'\n" + $edi .= "FTX+LIN+1++$note'\n" } else { $edi .= "FTX+LIN+1'\n" } ----------------------------------------------------------------------- Summary of changes: Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm | 18 +++++++++++++----- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 5 ++++- .../Pg/upgrade/1462.data.lp1949243_edi_lin_seq_id.sql | 10 ++++++++++ .../Acquisitions/lp1949243_edi_fix_ftx_lin.adoc | 9 +++++++++ 5 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/1462.data.lp1949243_edi_lin_seq_id.sql create mode 100644 docs/RELEASE_NOTES_NEXT/Acquisitions/lp1949243_edi_fix_ftx_lin.adoc hooks/post-receive -- Evergreen ILS
participants (1)
-
Git User