Skip to content

Commit

Permalink
EdifactEbsco - Rename module to EdifactEbsco
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemhall committed Oct 9, 2024
1 parent b43cb95 commit c14346b
Show file tree
Hide file tree
Showing 45 changed files with 3,503 additions and 3,505 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
release-version: ${{ steps.myvars.outputs.tag_version }}
release-name: ${{ steps.myvars.outputs.github_repo }}
minimum-version: ${{ steps.koha-version-oldstable.outputs.version-major-minor }}
plugin-module: "Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced.pm"
plugin-module: "Koha/Plugin/Com/ByWaterSolutions/EdifactEbsco.pm"

- name: See if kpz was created
run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced;
package Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco;

## It's good practive to use Modern::Perl
use Modern::Perl;
Expand Down Expand Up @@ -28,9 +28,9 @@ our $VERSION = "{VERSION}";

## Here is our metadata, some keys are required, some are optional
our $metadata = {
name => 'Edifact - Enhanced',
name => 'Edifact - Ebsco',
author => 'Kyle M Hall',
description => 'Edifact Enhanced plugin',
description => 'Edifact Enhanced plugin customized for Ebsco',
date_authored => '2015-12-21',
date_updated => '1900-01-01',
minimum_version => '22.05.06',
Expand Down Expand Up @@ -60,30 +60,30 @@ sub new {
sub edifact {
my ( $self, $args ) = @_;

require Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact;
require Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco::Edifact;

my $edifact = Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact->new($args);
my $edifact = Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco::Edifact->new($args);
return $edifact;
}

sub edifact_order {
my ( $self, $args ) = @_;

require Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Order;
require Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco::Edifact::Order;

$args->{params}->{plugin} = $self;
my $edifact_order = Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Order->new( $args->{params} );
my $edifact_order = Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco::Edifact::Order->new( $args->{params} );
return $edifact_order;
}

sub edifact_transport {
my ( $self, $args ) = @_;

require Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Transport;
require Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco::Edifact::Transport;

$args->{params}->{plugin} = $self;

my $edifact_transport = Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Transport->new( $args->{vendor_edi_account_id}, $self );
my $edifact_transport = Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco::Edifact::Transport->new( $args->{vendor_edi_account_id}, $self );

return $edifact_transport;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact;
package Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco::Edifact;

# Copyright 2014 PTFS-Europe Ltd
#
Expand All @@ -22,8 +22,8 @@ use warnings;
use File::Slurp;
use Carp;
use Encode qw( from_to );
use Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Segment;
use Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Message;
use Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco::Edifact::Segment;
use Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco::Edifact::Message;

my $separator = {
component => q{\:},
Expand Down Expand Up @@ -174,7 +174,7 @@ sub message_array {
elsif ( $seg->tag eq 'UNT' ) {
$in_msg = 0;
if ( @{$msg} ) {
push @{$msg_arr}, Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Message->new($msg);
push @{$msg_arr}, Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco::Edifact::Message->new($msg);
$msg = [];
}
}
Expand Down Expand Up @@ -226,7 +226,7 @@ sub segmentize {
}x;
my @segmented;
while ( $raw =~ /($re)/g ) {
push @segmented, Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Segment->new( { seg_string => $1 } );
push @segmented, Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco::Edifact::Segment->new( { seg_string => $1 } );
}
return \@segmented;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Message;
package Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco::Edifact::Message;

# Copyright 2014 PTFS-Europe Ltd
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Order;
package Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco::Edifact::Order;

use Modern::Perl;
use utf8;
Expand Down Expand Up @@ -140,7 +140,7 @@ sub interchange_header {
my $hdr =
'UNB+UNOC:3'; # controling agency character set syntax version number
# Interchange Sender

# If plugin is set to send Buyer SAN in header *and* the vendor username as buyer SAN is set, send that
# If plugin is set to send Buyer SAN in header *and* the buyer sand should come from the library ean description
if ( $self->{plugin}->retrieve_data('buyer_san_in_header') && $self->{plugin}->retrieve_data('buyer_san_extract_from_library_ean_description') ) {
Expand Down Expand Up @@ -320,7 +320,7 @@ sub order_msg_header {
push @header,
name_and_address(
'BUYER',
$self->{sender}->ean,
$self->{sender}->ean,
$self->{sender}->id_code_qualifier,
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Segment;
package Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco::Edifact::Segment;

# Copyright 2014 PTFS-Europe Ltd
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package Koha::Plugin::Com::ByWaterSolutions::EdifactEnhanced::Edifact::Transport;
package Koha::Plugin::Com::ByWaterSolutions::EdifactEbsco::Edifact::Transport;

# Copyright 2014 PTFS-Europe Ltd
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<script type="text/javascript">
$( document ).ready(function() {
$('.in-header').on('change', function() {
$('.in-header').not(this).prop('checked', !$(this).prop('checked') );
$('.in-header').not(this).prop('checked', !$(this).prop('checked') );
});

check_if_buyer_san_use_username();
Expand Down Expand Up @@ -103,18 +103,18 @@ function check_if_buyer_san_use_library_ean_split_first_part() {

<fieldset class="rows">
<legend>Fields to send in</legend>
<ol>
<li>
<label for="buyer_san_in_header">Header: </label>
<input type="checkbox" class="in-header" name="buyer_san_in_header" id="buyer_san_in_header" value="1" [% IF buyer_san_in_header %]checked="checked"[% END %]>
<ol>
<li>
<label for="buyer_san_in_header">Header: </label>
<input type="checkbox" class="in-header" name="buyer_san_in_header" id="buyer_san_in_header" value="1" [% IF buyer_san_in_header %]checked="checked"[% END %]>
<span class="hint">If this box is checked, it will replace the Library EAN in the header.</span>
</li>
<li>
<label for="buyer_san_in_nadby">NAD+BY: </label>
<input type="checkbox" name="buyer_san_in_nadby" id="buyer_san_in_nadby" value="1" [% IF buyer_san_in_nadby %]checked="checked"[% END %]>
</li>
<li>
<label for="buyer_san_in_nadby">NAD+BY: </label>
<input type="checkbox" name="buyer_san_in_nadby" id="buyer_san_in_nadby" value="1" [% IF buyer_san_in_nadby %]checked="checked"[% END %]>
<span class="hint">If this box is checked, it will be sent in an additional NAD+BY segment.</span>
</li>
</ol>
</li>
</ol>
</fieldset>
</ol>
</fieldset>
Expand All @@ -123,18 +123,18 @@ function check_if_buyer_san_use_library_ean_split_first_part() {
<legend>Library EAN</legend>
<fieldset class="rows">
<legend>Fields to send in</legend>
<ol>
<li>
<label for="branch_ean_in_header">Header: </label>
<input type="checkbox" class="in-header" name="branch_ean_in_header" id="branch_ean_in_header" value="1" [% IF branch_ean_in_header %]checked="checked"[% END %]>
<ol>
<li>
<label for="branch_ean_in_header">Header: </label>
<input type="checkbox" class="in-header" name="branch_ean_in_header" id="branch_ean_in_header" value="1" [% IF branch_ean_in_header %]checked="checked"[% END %]>
<span class="hint">If this box is checked, it will replace the Library EAN in the header. This is the default non-plugin behavior.</span>
</li>
<li>
<label for="branch_ean_in_nadby">NAD+BY: </label>
<input type="checkbox" name="branch_ean_in_nadby" id="branch_ean_in_nadby" value="1" [% IF branch_ean_in_nadby %]checked="checked"[% END %]>
</li>
<li>
<label for="branch_ean_in_nadby">NAD+BY: </label>
<input type="checkbox" name="branch_ean_in_nadby" id="branch_ean_in_nadby" value="1" [% IF branch_ean_in_nadby %]checked="checked"[% END %]>
<span class="hint">If this box is checked, it will be sent in an additional NAD+BY segment.</span>
</li>
</ol>
</li>
</ol>
</fieldset>
</fieldset>

Expand Down
Loading

0 comments on commit c14346b

Please sign in to comment.