This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release24.09 by this push:
     new 442dfd12b3 Fixed: Invoice import is not visible from UI and not 
working (OFBIZ- 12089) (#1332)
442dfd12b3 is described below

commit 442dfd12b37992235c7f137e2a3b3cc7d9b28584
Author: ratneshup <[email protected]>
AuthorDate: Sat Jun 6 12:51:43 2026 +0530

    Fixed: Invoice import is not visible from UI and not working (OFBIZ- 12089) 
(#1332)
    
    Handles trailing empty CSV headers in invoice import and fix
    Accounting ImportExport menu navigation.
    
    Prevented IllegalArgumentException and NullPointerException during CSV
    imports when uploaded templates contain trailing empty column headers
    (trailing commas). Also fixed Accounting Import/Export menu visibility
    and navigation.
---
 .../main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java  | 2 +-
 applications/accounting/widget/AccountingMenus.xml                      | 1 +
 applications/accounting/widget/GlSetupScreens.xml                       | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java
 
b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java
index b536017115..1312e2c01d 100644
--- 
a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java
+++ 
b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java
@@ -3673,7 +3673,7 @@ public class InvoiceServices {
         String organizationPartyId = (String) 
context.get("organizationPartyId");
         String encoding = System.getProperty("file.encoding");
         String csvString = 
Charset.forName(encoding).decode(fileBytes).toString();
-        Builder csvFormatBuilder = Builder.create().setHeader();
+        Builder csvFormatBuilder = 
Builder.create().setHeader().setAllowMissingColumnNames(true);
         CSVFormat fmt = csvFormatBuilder.get();
         List<String> errMsgs = new LinkedList<>();
         List<String> newErrMsgs;
diff --git a/applications/accounting/widget/AccountingMenus.xml 
b/applications/accounting/widget/AccountingMenus.xml
index 7199e962b7..cbfdd1dfa0 100644
--- a/applications/accounting/widget/AccountingMenus.xml
+++ b/applications/accounting/widget/AccountingMenus.xml
@@ -114,6 +114,7 @@ under the License.
             </condition>
             <link target="EditFinAccount"/>
         </menu-item>
+        <menu-item name="ImportExport" 
title="${uiLabelMap.CommonImportExport}"><link 
target="ImportExport"/></menu-item>
     </menu>
 
     <menu name="AccountingShortcutAppBar" 
title="${uiLabelMap.AccountingManager}">
diff --git a/applications/accounting/widget/GlSetupScreens.xml 
b/applications/accounting/widget/GlSetupScreens.xml
index 94015532da..0fe3417681 100644
--- a/applications/accounting/widget/GlSetupScreens.xml
+++ b/applications/accounting/widget/GlSetupScreens.xml
@@ -103,6 +103,7 @@ under the License.
         <section>
             <actions>
                 <set field="titleProperty" value="CommonImportExport"/>
+                <set field="headerItem" value="invoices"/>
                 <entity-one entity-name="PartyGroup" value-field="partyGroup">
                     <field-map field-name="partyId" 
value="${groovy:parameters.get('ApplicationDecorator|organizationPartyId')}"/>
                 </entity-one>

Reply via email to