From 3104ecb8005c53701e17d5beae6a6fbedac0e16b Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 10 Nov 2023 15:06:04 +0000 Subject: [PATCH] Bug 30070: Update edifactmsgs to use the API --- acqui/edifactmsgs.pl | 13 -- .../prog/en/modules/acqui/edifactmsgs.tt | 140 ++++++++++-------- 2 files changed, 77 insertions(+), 76 deletions(-) diff --git a/acqui/edifactmsgs.pl b/acqui/edifactmsgs.pl index 179b23423ff..72b429f5854 100755 --- a/acqui/edifactmsgs.pl +++ b/acqui/edifactmsgs.pl @@ -50,17 +50,4 @@ if ( $cmd && $cmd eq 'import' ) { process_invoice($invoice); } -my @msgs = $schema->resultset('EdifactMessage')->search( - { - deleted => 0, - }, - { - join => 'vendor', - order_by => { -desc => 'transfer_date' }, - } - -)->all; - -$template->param( messages => \@msgs ); - output_html_with_http_headers( $q, $cookie, $template->output ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt index 7940e17a8ad..b21e6b76e9f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt @@ -40,58 +40,7 @@

EDIFACT messages

-[% IF ( messages ) %] - - - - - - - - - - - - - -[% FOREACH msg IN messages %] - - - - - - - - - - -[% END %] - - -
TypeTransferredStatusVendorDetailsFilenameActions
[% msg.message_type | html %][% msg.transfer_date | $KohaDates %][% msg.status | html %] - - [% msg.vendor.name | html %] - - -[% IF msg.message_type == 'QUOTE' || msg.message_type == 'ORDERS' %] - [% IF msg.basketno %] - - Basket: [% msg.basketno.basketno | html %] - - [% END %] -[% ELSE %] - - - Invoices - -[% END %] -[% msg.filename | html %] - View message - Delete - [% IF msg.status == 'new' %] - Import - [% END %] -
+
- -[% ELSE %] -
There are no EDIFACT messages.
-[% END %] - @@ -132,13 +76,83 @@ [% INCLUDE 'datatables.inc' %]