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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 6ff770d892 Implemented: Added Add Invoice Attribute functionality 
(OFBIZ-12420). (#1451)
6ff770d892 is described below

commit 6ff770d89275bc36e63f91a11ad10bbc4e0eb86e
Author: Ravi Lodhi <[email protected]>
AuthorDate: Fri Jul 10 20:21:24 2026 +0530

    Implemented: Added Add Invoice Attribute functionality (OFBIZ-12420). 
(#1451)
    
    Implemented: Added Add Invoice Attribute functionality (OFBIZ-12420)
    
    Thanks Pierre Smits and Ravi Lodhi for your contribution.
---
 .../webapp/accounting/WEB-INF/controller.xml       | 18 +++++++++++++++
 .../accounting/AccountingInvoiceAttributeCpd.xml   | 27 ++++++++++++++++++----
 2 files changed, 41 insertions(+), 4 deletions(-)

diff --git a/applications/accounting/webapp/accounting/WEB-INF/controller.xml 
b/applications/accounting/webapp/accounting/WEB-INF/controller.xml
index af10cf2b73..75f4d25a08 100644
--- a/applications/accounting/webapp/accounting/WEB-INF/controller.xml
+++ b/applications/accounting/webapp/accounting/WEB-INF/controller.xml
@@ -239,6 +239,24 @@ under the License.
         <security https="true" auth="true"/>
         <response name="success" type="view" value="invoiceAttributes"/>
     </request-map>
+    <request-map uri="createInvoiceAttribute">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createInvoiceAttribute"/>
+        <response name="success" type="view" value="invoiceAttributes"/>
+        <response name="error" type="view" value="invoiceAttributes"/>
+    </request-map>
+    <request-map uri="updateInvoiceAttribute">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateInvoiceAttribute"/>
+        <response name="success" type="view" value="invoiceAttributes"/>
+        <response name="error" type="view" value="invoiceAttributes"/>
+    </request-map>
+    <request-map uri="deleteInvoiceAttribute">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deleteInvoiceAttribute"/>
+        <response name="success" type="view" value="invoiceAttributes"/>
+        <response name="error" type="view" value="invoiceAttributes"/>
+    </request-map>
     <request-map uri="invoiceContactMech">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="invoiceContactMech"/>
diff --git 
a/applications/accounting/widget/accounting/AccountingInvoiceAttributeCpd.xml 
b/applications/accounting/widget/accounting/AccountingInvoiceAttributeCpd.xml
index cf35aeb8da..77f99ca45c 100644
--- 
a/applications/accounting/widget/accounting/AccountingInvoiceAttributeCpd.xml
+++ 
b/applications/accounting/widget/accounting/AccountingInvoiceAttributeCpd.xml
@@ -51,6 +51,9 @@ under the License.
                              <ws:screenlet 
title="${uiLabelMap.CommonAttributes}">
                                  <ws:include-grid name="InvoiceAttributes" 
location="component://accounting/widget/accounting/AccountingInvoiceAttributeCpd.xml"/>
                              </ws:screenlet>
+                             <ws:screenlet title="${uiLabelMap.CommonAdd} 
${uiLabelMap.CommonAttributes}">
+                                 <ws:include-form name="AddInvoiceAttribute" 
location="component://accounting/widget/accounting/AccountingInvoiceAttributeCpd.xml"/>
+                             </ws:screenlet>
                          </ws:decorator-section>
                      </ws:decorator-screen>
                 </ws:widgets>
@@ -62,12 +65,28 @@ under the License.
 
     <wf:forms>
 
-        <wf:grid name="InvoiceAttributes" 
paginate-target="Accounting/Invoice/Attributes" list-name="invoiceAttributes"
-            odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar"
-            extends="CommonDynamicGrid" 
extends-resource="component://common/widget/CommonForms.xml">
-            <wf:auto-fields-entity entity-name="InvoiceAttribute" 
default-field-type="display"/>
+        <wf:grid name="InvoiceAttributes" target="updateInvoiceAttribute" 
paginate-target="invoiceAttributes" list-name="invoiceAttributes"
+            odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar" separate-columns="true">
+            <wf:auto-fields-entity entity-name="InvoiceAttribute" 
default-field-type="edit"/>
+            <wf:field name="invoiceId"><wf:hidden/></wf:field>
+            <wf:field name="attrName"><wf:display/></wf:field>
+            <wf:field name="submitButton" 
title="${uiLabelMap.CommonUpdate}"><wf:submit button-type="button"/></wf:field>
+            <wf:field name="deleteLink" title=" " widget-style="buttontext">
+                <wf:hyperlink description="${uiLabelMap.CommonDelete}" 
target="deleteInvoiceAttribute" also-hidden="false">
+                    <wf:parameter param-name="invoiceId"/>
+                    <wf:parameter param-name="attrName"/>
+                </wf:hyperlink>
+            </wf:field>
         </wf:grid>
 
+        <wf:form name="AddInvoiceAttribute" type="single" 
target="createInvoiceAttribute" title=""
+            header-row-style="header-row" default-table-style="basic-table">
+            <wf:auto-fields-entity entity-name="InvoiceAttribute" 
default-field-type="edit"/>
+            <wf:field name="invoiceId"><wf:hidden/></wf:field>
+            <wf:field name="attrName" required-field="true"></wf:field>
+            <wf:field name="submitButton" 
title="${uiLabelMap.CommonCreate}"><wf:submit button-type="button"/></wf:field>
+        </wf:form>
+
     </wf:forms>
 
 </compound-widgets>

Reply via email to