Bugzilla – Attachment 175849 Details for
Bug 38765
Internal server error when merging invoices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38765: Parse dates correctly
Bug-38765-Parse-dates-correctly.patch (text/plain), 3.96 KB, created by
Emily Lamancusa (emlam)
on 2024-12-20 17:23:45 UTC
(
hide
)
Description:
Bug 38765: Parse dates correctly
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2024-12-20 17:23:45 UTC
Size:
3.96 KB
patch
obsolete
>From 18795a7a4c62c8433502411383eb01af5513a578 Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Date: Fri, 20 Dec 2024 12:12:14 -0500 >Subject: [PATCH] Bug 38765: Parse dates correctly > >Some dates in invoices.tt are being formatted to the system DateFormat >when they are not being displayed, which causes processing errors when >the code expects ISO format. Dates should be formatted for local format >only when they are being displayed. > >To test: >1. Go to Acquisitions and create some invoices > i. Search for a vendor (can submit a blank search box) > ii. Click on vendor name > iii. Click "Receive shipments" button > iv. In the "Receive a new shipment" section, enter any value in the > "Vendor invoice" field and click "Next" > v. Click the "My Vendor" breadcrumb and repeat iii-iv a few times >2. Go to Acquisitions > Invoices >3. Search for some invoices (can submit with all blank filters) >4. Select the checkboxes by two or more invoices >5. Click "Merge selected invoices" >6. Click "Merge" without editing the input data at all >--> Internal server error! "The given date <date> does not match the > date format (iso)" >7. Apply patch >8. Repeat steps 2-6 >--> The invoices are merged successfully! >--- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >index 6c46799d2a..69083c1ad6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >@@ -5,6 +5,7 @@ > [% USE Branches %] > [% SET footerjs = 1 %] > [% PROCESS 'i18n.inc' %] >+[% INCLUDE 'js-date-format.inc' %] > [% INCLUDE 'doc-head-open.inc' %] > <title>[% FILTER collapse %] > [% t("Invoices") | html %] › >@@ -70,7 +71,7 @@ > </thead> > <tbody> > [% FOREACH invoice IN invoices %] >- <tr data-invoiceid="[% invoice.invoiceid | html %]" data-booksellerid="[% invoice.booksellerid | html %]" data-shipmentdate="[% invoice.shipmentdate | $KohaDates %]" data-billingdate="[% invoice.billingdate | $KohaDates %]" data-shipmentcost="[% invoice.shipmentcost | html %]" data-shipment_budgetid="[% invoice.shipmentcost_budgetid | html %]" data-closedate="[% invoice.closedate | $KohaDates %]"> >+ <tr data-invoiceid="[% invoice.invoiceid | html %]" data-booksellerid="[% invoice.booksellerid | html %]" data-shipmentdate="[% invoice.shipmentdate | html %]" data-billingdate="[% invoice.billingdate | html %]" data-shipmentcost="[% invoice.shipmentcost | html %]" data-shipment_budgetid="[% invoice.shipmentcost_budgetid | html %]" data-closedate="[% invoice.closedate | html %]"> > [% IF CAN_user_acquisition_merge_invoices %] > <td>[% invoice.is_linked_to_subscriptions | html %]</td> > [% END %] >@@ -506,7 +507,7 @@ > } else { > $('#merge_table tbody').empty(); > $.each(invoices, function (idx, invoice) { >- var row = $('<tr data-invoiceid="' + invoice.invoiceid + '"><td>' + invoice.invoicenumber + '</td><td>' + invoice.shipmentdate + '</td><td>' + invoice.billingdate + '</td><td>' + invoice.shipmentcost + '</td></tr>'); >+ var row = $('<tr data-invoiceid="' + invoice.invoiceid + '"><td>' + invoice.invoicenumber + '</td><td>' + $date(invoice.shipmentdate) + '</td><td>' + $date(invoice.billingdate) + '</td><td>' + invoice.shipmentcost + '</td></tr>'); > $(row).appendTo('#merge_table tbody'); > $(row).click(function () { > $('#merge_table tbody tr').removeClass('active'); >-- >2.34.1
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 38765
:
175849
|
175855