Author: jacopoc
Date: Wed Jul 11 02:44:37 2007 New Revision: 555228 URL: http://svn.apache.org/viewvc?view=rev&rev=555228 Log: Migration of some billing account screens to widgets. Based on a patch by Wickersheimer Jeremy OFBIZ-1120 Removed: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/billingaccount/BillingAccountInvoices.bsh ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/billingaccount/EditBillingAccountTerms.bsh ofbiz/trunk/applications/accounting/webapp/accounting/billingaccount/EditBillingAccountTerms.ftl Modified: ofbiz/trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml ofbiz/trunk/applications/accounting/widget/BillingAccountScreens.xml Modified: ofbiz/trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml?view=diff&rev=555228&r1=555227&r2=555228 ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml Wed Jul 11 02:44:37 2007 @@ -83,7 +83,6 @@ <field name="invoiceDate"><display description="${bsh:invoiceDate.toString().substring(0,10)}"/></field> <field name="total" widget-area-style="align-text"><display type="currency" currency="${currencyUomId}"/></field> <field name="amountToApply" widget-area-style="align-text"><display type="currency" currency="${currencyUomId}"/></field> - <field name="capture"><hyperlink target="capturePaymentsByInvoice?invoiceId=${invoiceId}&billingAccountId=${billingAccountId}" description="${uiLabelMap.AccountingCapture}"/></field> </form> <form name="invoiceHeader" type="single" title="Invoice header information" default-map-name="invoice"> Modified: ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml?view=diff&rev=555228&r1=555227&r2=555228 ============================================================================== --- ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml Wed Jul 11 02:44:37 2007 @@ -47,6 +47,46 @@ <field name="roleTypeId"><display-entity entity-name="RoleType"/></field> </form> + <form name="ListBillingAccountInvoices" type="list" list-name="billingAccountInvoices" paginate-target="BillingAccountInvoices" default-entity-name="Invoice"> + <actions> + <entity-condition entity-name="Invoice" list-name="billingAccountInvoices"> + <condition-expr field-name="billingAccountId" env-name="billingAccountId"/> + </entity-condition> + </actions> + <row-actions> + <service service-name="getPartyNameForDate" result-map-name="partyNameResultFrom"> + <field-map field-name="partyId" env-name="partyIdFrom"/> + <field-map field-name="compareDate" env-name="invoiceDate"/> + <field-map field-name="lastNameFirst" value="Y"/> + </service> + <service service-name="getPartyNameForDate" result-map-name="partyNameResultTo"> + <field-map field-name="partyId" env-name="partyId"/> + <field-map field-name="compareDate" env-name="invoiceDate"/> + <field-map field-name="lastNameFirst" value="Y"/> + </service> + <set field="amountToApply" value="${bsh: + import java.text.NumberFormat; + return(NumberFormat.getNumberInstance(context.get("locale")).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId)));}"/> + <set field="total" value="${bsh: + import java.text.NumberFormat; + return(NumberFormat.getNumberInstance(context.get("locale")).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd(delegator,invoiceId)));}"/> + </row-actions> + <field name="billingAccountId"><hidden/></field> + <field name="invoiceId" widget-style="buttontext"> + <hyperlink description="${invoiceId}" target="invoiceOverview?invoiceId=${invoiceId}"/> + </field> + <field name="invoiceTypeId"><display-entity entity-name="InvoiceType" description="${description}"/></field> + <field name="invoiceDate"><display/></field> + <field name="statusId"><display-entity entity-name="StatusItem" description="${description}"/></field> + <field name="description"><display/></field> + <field name="partyIdFrom"><display description="${partyNameResultFrom.fullName} [${partyIdFrom}]"/></field> + <field name="partyIdTo" parameter-name="partyId"><display description="${partyNameResultTo.fullName} [${partyId}]"/></field> + <field name="invoiceDate"><display description="${bsh:invoiceDate.toString().substring(0,10)}"/></field> + <field name="total" widget-area-style="align-text"><display type="currency" currency="${currencyUomId}"/></field> + <field name="amountToApply" widget-area-style="align-text"><display type="currency" currency="${currencyUomId}"/></field> + <field name="capture"><hyperlink target="capturePaymentsByInvoice?invoiceId=${invoiceId}&billingAccountId=${billingAccountId}" description="${uiLabelMap.AccountingCapture}"/></field> + </form> + <form name="EditBillingAccount" type="single" target="updateBillingAccount" title="" default-map-name="billingAccount"> <alt-target use-when="billingAccount==null" target="createBillingAccount"/> <auto-fields-service service-name="updateBillingAccount" map-name="billingAccount"/> @@ -125,4 +165,49 @@ <field name="partyId" title="${uiLabelMap.PartyPartyId}"><lookup target-form-name="LookupPartyName"/></field> <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> + + <form name="ListBillingAccountTerms" type="list" list-name="billingAccountTermsList" default-entity-name="BillingAccountTerm" paginate-target="EditBillingAccountTerms"> + <actions> + <entity-condition entity-name="BillingAccountTerm" list-name="billingAccountTermsList"> + <condition-expr field-name="billingAccountId" env-name="billingAccountId"/> + </entity-condition> + </actions> + <field name="billingAccountId"><hidden/></field> + <field name="termTypeId" title="${uiLabelMap.PartyTermType}"> + <display-entity entity-name="TermType" description="${description}"/> + </field> + <field name="termValue" title="${uiLabelMap.CommonValue}"><display/></field> + <field name="uomId" title="${uiLabelMap.CommonUom}"> + <display-entity entity-name="Uom" description="${description}"/> + </field> + <field name="billingAccountTermId" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink description="${uiLabelMap.CommonEdit}" target="EditBillingAccountTerms?billingAccountId=${billingAccountId}&billingAccountTermId=${billingAccountTermId}"/> + </field> + <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink description="${uiLabelMap.CommonDelete}" target="removeBillingAccountTerm?billingAccountId=${billingAccountId}&billingAccountTermId=${billingAccountTermId}"/> + </field> + </form> + <form name="EditBillingAccountTerms" type="single" target="updateBillingAccountTerm" title="" default-map-name="billingAccountTerm"> + <alt-target use-when="billingAccountTermId==null" target="createBillingAccountTerm"/> + <field name="billingAccountId"><hidden/></field> + <field use-when="billingAccountTermId!=null" name="billingAccountTermId"><hidden/></field> + <field name="termTypeId" title="${uiLabelMap.PartyTermType}"> + <drop-down> + <entity-options entity-name="TermType" description="${description}"> + <entity-constraint name="parentTypeId" value="FINANCIAL_TERM"/> + <entity-order-by field-name="description"/> + </entity-options> + </drop-down> + </field> + <field name="uomId" title="${uiLabelMap.CommonUom}"> + <drop-down allow-empty="true"> + <entity-options entity-name="Uom" description="${description}"> + <entity-order-by field-name="description"/> + </entity-options> + </drop-down> + </field> + <field name="termValue" title="${uiLabelMap.PartyTermValue}"><text size="10"/></field> + <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit button-type="button"/></field> + </form> + </forms> Modified: ofbiz/trunk/applications/accounting/widget/BillingAccountScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/BillingAccountScreens.xml?view=diff&rev=555228&r1=555227&r2=555228 ============================================================================== --- ofbiz/trunk/applications/accounting/widget/BillingAccountScreens.xml (original) +++ ofbiz/trunk/applications/accounting/widget/BillingAccountScreens.xml Wed Jul 11 02:44:37 2007 @@ -142,14 +142,30 @@ <set field="headerItem" value="billingaccount"/> <set field="tabButtonItem" value="EditBillingAccountTerms"/> - <script location="component://accounting/webapp/accounting/WEB-INF/actions/billingaccount/EditBillingAccountTerms.bsh"/> + <set field="billingAccountId" from-field="parameters.billingAccountId"/> + <set field="billingAccountTermId" from-field="parameters.billingAccountTermId"/> + <entity-one entity-name="BillingAccount" value-name="billingAccount"/> </actions> <widgets> <decorator-screen name="CommonBillingAccountDecorator"> <decorator-section name="body"> - <platform-specific> - <html><html-template location="component://accounting/webapp/accounting/billingaccount/EditBillingAccountTerms.ftl"/></html> - </platform-specific> + <label style="head1">${uiLabelMap.PageTitleEditBillingAccountTerms} - ${uiLabelMap.AccountingAccountId}: ${billingAccount.billingAccountId}</label> + <include-form name="ListBillingAccountTerms" location="component://accounting/widget/BillingAccountForms.xml"/> + <section> + <condition> + <not><if-empty field-name="parameters.billingAccountTermId"/></not> + </condition> + <actions> + <entity-one entity-name="BillingAccountTerm" value-name="billingAccountTerm"/> + </actions> + <widgets> + <label style="head1">${uiLabelMap.PageTitleEditBillingAccountTerms}</label> + </widgets> + <fail-widgets> + <label style="head1">${uiLabelMap.AccountingCreateBillingAccountTerm}</label> + </fail-widgets> + </section> + <include-form name="EditBillingAccountTerms" location="component://accounting/widget/BillingAccountForms.xml"/> </decorator-section> </decorator-screen> </widgets> @@ -163,12 +179,14 @@ <set field="headerItem" value="billingaccount"/> <set field="tabButtonItem" value="BillingAccountInvoices"/> - <script location="component://accounting/webapp/accounting/WEB-INF/actions/billingaccount/BillingAccountInvoices.bsh"/> + <set field="billingAccountId" from-field="parameters.billingAccountId"/> + <set field="billingAccountTermId" from-field="parameters.billingAccountTermId"/> + <entity-one entity-name="BillingAccount" value-name="billingAccount"/> </actions> <widgets> <decorator-screen name="CommonBillingAccountDecorator"> <decorator-section name="body"> - <include-form name="ListInvoices" location="component://accounting/webapp/accounting/invoice/InvoiceForms.xml"/> + <include-form name="ListBillingAccountInvoices" location="component://accounting/widget/BillingAccountForms.xml"/> </decorator-section> </decorator-screen> </widgets> |
Free forum by Nabble | Edit this page |