Author: jleroux
Date: Sun Apr 7 10:29:10 2019 New Revision: 1857076 URL: http://svn.apache.org/viewvc?rev=1857076&view=rev Log: Improved: Have the ability to edit/remove terms of an invoice (OFBIZ-9290) Currently the user has the ability to add terms to an invoice, but doesn't have the functions to edit or remove existing terms. jleroux: Based on Akshay Modak's patch, which was, mmm..., imperfect Thanks: Pierre Smits for report, Akshay Modak for initial patch Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml ofbiz/ofbiz-framework/trunk/applications/accounting/widget/InvoiceForms.xml ofbiz/ofbiz-framework/trunk/applications/accounting/widget/InvoiceScreens.xml Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=1857076&r1=1857075&r2=1857076&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Sun Apr 7 10:29:10 2019 @@ -270,6 +270,23 @@ under the License. <response name="success" type="view" value="invoiceTerms"/> <response name="error" type="view" value="invoiceTerms"/> </request-map> + <request-map uri="updateInvoiceTerm"> + <security https="true" auth="true"/> + <event type="service" invoke="updateInvoiceTerm"/> + <response name="success" type="view" value="invoiceTerms"/> + <response name="error" type="view" value="invoiceTerms"/> + </request-map> + <request-map uri="deleteInvoiceTerm"> + <security https="true" auth="true"/> + <event type="service" invoke="deleteInvoiceTerm"/> + <response name="success" type="view" value="invoiceTerms"/> + <response name="error" type="view" value="invoiceTerms"/> + </request-map> + <request-map uri="editInvoiceTerm"> + <security https="true" auth="true"/> + <response name="success" type="view" value="invoiceTerms"/> + <response name="error" type="view" value="invoiceTerms"/> + </request-map> <request-map uri="sendPerEmail"> <security https="true" auth="true"/> Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/widget/InvoiceForms.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/widget/InvoiceForms.xml?rev=1857076&r1=1857075&r2=1857076&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/accounting/widget/InvoiceForms.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/accounting/widget/InvoiceForms.xml Sun Apr 7 10:29:10 2019 @@ -465,10 +465,23 @@ under the License. <field name="uomId" title="${uiLabelMap.Uom}"> <display-entity entity-name="Uom"/> </field> + <field name="edit" title="" widget-style="buttontext"> + <hyperlink description="${uiLabelMap.CommonEdit}" target="editInvoiceTerm" also-hidden="false"> + <parameter param-name="invoiceTermId"/> + <parameter param-name="invoiceId"/> + </hyperlink> + </field> + <field name="delete" title="" widget-style="buttontext"> + <hyperlink description="${uiLabelMap.CommonDelete}" target="deleteInvoiceTerm" also-hidden="false"> + <parameter param-name="invoiceTermId"/> + <parameter param-name="invoiceId"/> + </hyperlink> + </field> </form> - <form name="EditInvoiceTerm" type="single" target="createInvoiceTerm" title="" - header-row-style="header-row" default-table-style="basic-table"> + <form name="EditInvoiceTerm" type="single" target="createInvoiceTerm" title="" + header-row-style="header-row" default-table-style="basic-table" default-map-name="invoiceTerm" default-entity-name="InvoiceTerm" > + <alt-target use-when="invoiceTerm!=null" target="updateInvoiceTerm"/> <auto-fields-entity entity-name="InvoiceTerm"/> <field name="invoiceId"><hidden/></field> <field name="termTypeId"> Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/widget/InvoiceScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/widget/InvoiceScreens.xml?rev=1857076&r1=1857075&r2=1857076&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/accounting/widget/InvoiceScreens.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/accounting/widget/InvoiceScreens.xml Sun Apr 7 10:29:10 2019 @@ -546,6 +546,9 @@ under the License. <field-map field-name="invoiceId" from-field="invoiceId"/> <order-by field-name="invoiceTermId"/> </entity-and> + <entity-one entity-name="InvoiceTerm" value-field="invoiceTerm"> + <field-map field-name="invoiceTermId" from-field="parameters.invoiceTermId"/> + </entity-one> </actions> <widgets> <decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}"> |
Free forum by Nabble | Edit this page |