Bugzilla – Attachment 132406 Details for
Bug 30130
Allow setting EDI type at the vendor level
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30130: Use new standard field in account definition
Bug-30130-Use-new-standard-field-in-account-defini.patch (text/plain), 5.40 KB, created by
Nick Clemens (kidclamp)
on 2022-03-29 12:07:37 UTC
(
hide
)
Description:
Bug 30130: Use new standard field in account definition
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-03-29 12:07:37 UTC
Size:
5.40 KB
patch
obsolete
>From 81dad7f7d0d876f556c3d956fe3c399d130d69b3 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 21 Feb 2022 16:25:24 +0000 >Subject: [PATCH] Bug 30130: Use new standard field in account definition > >This patch uses the new 'standard' field to in the edifact account >configuration area to allow setting the message standard as either >'EDItEUR' or 'BiC'. > >This just replaces the currently hard coded hash of SAN's in >Koha::Edifact::Order to distinguish between the two standards instead of >requireing a bug submission per vender san we identify to be a BiC type >vendor. > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/Edifact/Order.pm | 20 +++++----------- > admin/edi_accounts.pl | 4 +++- > .../prog/en/modules/admin/edi_accounts.tt | 23 +++++++++++++++++++ > 3 files changed, 32 insertions(+), 15 deletions(-) > >diff --git a/Koha/Edifact/Order.pm b/Koha/Edifact/Order.pm >index f21a7a8b76..548c62c429 100644 >--- a/Koha/Edifact/Order.pm >+++ b/Koha/Edifact/Order.pm >@@ -263,7 +263,7 @@ sub order_msg_header { > push @header, > beginning_of_message( > $self->{basket}->basketno, >- $self->{recipient}->san, >+ $self->{recipient}->standard, > $self->{is_response} > ); > >@@ -297,29 +297,21 @@ sub order_msg_header { > > sub beginning_of_message { > my $basketno = shift; >- my $supplier_san = shift; >+ my $standard = shift; > my $response = shift; > my $document_message_no = sprintf '%011d', $basketno; > >- # Peters & Bolinda use the BIC recommendation to use 22V a code not in Edifact >- # If the order is in response to a quote >- my %bic_sans = ( >- '5013546025065' => 'Peters', >- '9377779308820' => 'Bolinda', >- ); >- > # my $message_function = 9; # original 7 = retransmission > # message_code values >- # 220 prder >+ # 220 order > # 224 rush order > # 228 sample order :: order for approval / inspection copies > # 22C continuation order for volumes in a set etc. > # my $message_code = '220'; >- if ( exists $bic_sans{$supplier_san} && $response ) { >- return "BGM+22V+$document_message_no+9$seg_terminator"; >- } > >- return "BGM+220+$document_message_no+9$seg_terminator"; >+ # If the order is in response to a quote and we're dealing with a BIC supplier >+ my $code = ( $response && ( $standard eq 'BIC' ) ) ? '22V' : '220'; >+ return "BGM+$code+$document_message_no+9$seg_terminator"; > } > > sub name_and_address { >diff --git a/admin/edi_accounts.pl b/admin/edi_accounts.pl >index 293f7ef666..9f1be0bf20 100755 >--- a/admin/edi_accounts.pl >+++ b/admin/edi_accounts.pl >@@ -76,6 +76,7 @@ else { > upload_directory => scalar $input->param('upload_directory'), > download_directory => scalar $input->param('download_directory'), > san => scalar $input->param('san'), >+ standard => scalar $input->param('standard'), > transport => scalar $input->param('transport'), > quotes_enabled => $input->param('quotes_enabled') ? 1 : 0, > invoices_enabled => $input->param('invoices_enabled') ? 1 : 0, >@@ -133,7 +134,8 @@ $template->param( > code => '92', > description => 'Assigned by buyer', > }, >- ] >+ ], >+ standards => [ 'BIC', 'EUR' ] > ); > > output_html_with_http_headers( $input, $cookie, $template->output ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_accounts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_accounts.tt >index e2da7795ba..6c0955ed05 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_accounts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_accounts.tt >@@ -193,6 +193,27 @@ EDI accounts › Administration › Koha > <label for="san">SAN: </label> > <input type="text" name="san" id="san" size="20" maxlength="20" value="[% account.san | html %]" /> > </li> >+ <li> >+ <label for="standard">Standard:</label> >+ <select name="standard" id="standard"> >+ [% FOREACH standard IN standards %] >+ [% IF standard == 'BIC' %] >+ [% SET description = 'BiC' %] >+ [% ELSE %] >+ [% SET description = 'EDItEUR' %] >+ [% END %] >+ [% IF standard == account.standard %] >+ <option value="[% standard | html %]" selected="selected"> >+ [% description | html %] >+ </option> >+ [% ELSE %] >+ <option value="[% standard | html %]"> >+ [% description | html %] >+ </option> >+ [% END %] >+ [% END %] >+ </select> >+ </li> > <li> > <label for="quotes_enabled">Quotes enabled: </label> > [% IF account.quotes_enabled %] >@@ -292,6 +313,7 @@ EDI accounts › Administration › Koha > <th>Upload directory</th> > <th>Qualifier</th> > <th>SAN</th> >+ <th>Standard</th> > <th>Quotes</th> > <th>Orders</th> > <th>Invoices</th> >@@ -319,6 +341,7 @@ EDI accounts › Administration › Koha > ([% account.id_code_qualifier | html %]) > </td> > <td>[% account.san | html %]</td> >+ <td>[% IF account.standard == 'BIC' %]BiC[% ELSE %]EDItEUR[% END %]</td> > [% IF account.quotes_enabled %] > <td>Yes</td> > [% ELSE %] >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30130
:
130852
|
130860
|
130960
|
130966
|
130967
|
130968
|
130969
|
130970
|
130991
|
130992
|
130993
|
130994
|
130995
|
130996
|
132404
|
132405
| 132406 |
132407
|
132408
|
132409
|
132410