Bugzilla – Attachment 182067 Details for
Bug 39787
Sending EDI order from basket fails if only one Library EAN exists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39787: Fix missing sender EAN when only one EAN is defined
Bug-39787-Fix-missing-sender-EAN-when-only-one-EAN.patch (text/plain), 2.81 KB, created by
David Nind
on 2025-05-08 10:56:49 UTC
(
hide
)
Description:
Bug 39787: Fix missing sender EAN when only one EAN is defined
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-05-08 10:56:49 UTC
Size:
2.81 KB
patch
obsolete
>From d25db02af45877720065c80e9d7f030648bafaf2 Mon Sep 17 00:00:00 2001 >From: Slava Shishkin <slavashishkin@gmail.com> >Date: Wed, 7 May 2025 19:51:22 +0300 >Subject: [PATCH] Bug 39787: Fix missing sender EAN when only one EAN is > defined >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >If only one EAN is defined for the library, the Create EDIFACT order >button template used the eans.0 object instead of its ean field. >As a result, the data-ean attribute contained an object, not the EAN >string. Fixed by explicitly accessing the field: eans.0.ean. > >Steps to reproduce: >1. Ensure only one Library EAN is configured in > /cgi-bin/koha/admin/edi_ean_accounts.pl. >2. Create a new basket. >3. Inspect the HTML of the Create EDIFACT order button. >4. The data-ean attribute will show an object instead > of EAN string â e.g. Koha::Schema::Result... (this is the bug). >5. Apply the patch and reload the basket page. >6. Inspect the HTML again â data-ean should now show > the EAN string (fixed). >7. Click the button, confirm basket closure, then go to EDIFACT messages >(/cgi-bin/koha/acqui/edifactmsgs.pl) and verify the message was created. > >Signed-off-by: David Nind <david@davidnind.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index 25592a3b50..65a052e1d6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -131,7 +131,14 @@ > [% ELSE %] > <div class="btn-group"> > [% IF eans.size == 1 %] >- <a class="btn btn-default btn-xs submit-form-link" href="#" data-ean="[% eans.0 | html %]" data-basketno="[% basketno | html %]" data-action="basket.pl" data-method="post" data-op="cud-ediorder" >+ <a >+ class="btn btn-default btn-xs submit-form-link" >+ href="#" >+ data-ean="[% eans.0.ean | html %]" >+ data-basketno="[% basketno | html %]" >+ data-action="basket.pl" >+ data-method="post" >+ data-op="cud-ediorder" > ><i class="fa fa-download"></i> Create EDIFACT order</a > > > [% ELSE %] >-- >2.39.5
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 39787
:
182036
|
182067
|
182074