svn commit: r576060 - /ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r576060 - /ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml

jacopoc
Author: jacopoc
Date: Sun Sep 16 01:08:36 2007
New Revision: 576060

URL: http://svn.apache.org/viewvc?rev=576060&view=rev
Log:
In billing account->invoices screen, the link to capture a payment is now only shown for open invoices.

Modified:
    ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml

Modified: ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml?rev=576060&r1=576059&r2=576060&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/BillingAccountForms.xml Sun Sep 16 01:08:36 2007
@@ -64,6 +64,7 @@
                 <field-map field-name="compareDate" env-name="invoiceDate"/>
                 <field-map field-name="lastNameFirst" value="Y"/>
             </service>
+            <set field="paidInvoice" value="${bsh: org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId).compareTo(BigDecimal.ZERO)==0}" type="Boolean"/>
             <set field="amountToApply" value="${bsh:
                 import java.text.NumberFormat;
                 return(NumberFormat.getNumberInstance(context.get(&quot;locale&quot;)).format(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId)));}"/>
@@ -84,7 +85,10 @@
         <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}&amp;billingAccountId=${billingAccountId}" description="${uiLabelMap.AccountingCapture}"/></field>
+        <field name="capture" use-when="${bsh:!paidInvoice}" widget-style="buttontext">
+            <hyperlink target="capturePaymentsByInvoice?invoiceId=${invoiceId}&amp;billingAccountId=${billingAccountId}" description="${uiLabelMap.AccountingCapture}"/>
+        </field>
+        <field name="capture" use-when="${bsh:paidInvoice}"><display/></field>
     </form>
 
     <form name="EditBillingAccount" type="single" target="updateBillingAccount" title="" default-map-name="billingAccount">